From d7451619b664bc439bb4b7346dd0ba8794e7f2a0 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 3 Apr 2024 21:56:12 +0800 Subject: [PATCH] 1 --- webapp/controller/BagController.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/webapp/controller/BagController.class.php b/webapp/controller/BagController.class.php index ee5f6bb2..cbb9cbe3 100644 --- a/webapp/controller/BagController.class.php +++ b/webapp/controller/BagController.class.php @@ -141,9 +141,21 @@ class BagController extends BaseAuthedController { $this->_rspErr(4, 'The prop function has not been realized yet'); } } + public function rename() { + $userInfo = $this->_getOrmUserInfo(); + if ($userInfo['rename_count'] == 0){ + $errCode = 0; + $errMsg = ''; + $this->internalRename(getReqVal('name', ''), getReqVal('name_sign', ''), $errCode, $errMsg); + if ($errCode) { + $this->_rspErr($errCode, $errMsg); + return; + } + } $itemDto = Bag::findByType(mt\Item::FUNC_TYPE, mt\Item::FUNC_RENAME_CARD_SUBTYPE); + error_log(json_encode($itemDto)); if (!$itemDto || $itemDto['item_num'] < 0) { $this->_rspErr(1, 'Not enough item'); return;