From 08102f31518be9a2e4d6365cddfd9a86ca660730 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Thu, 4 Mar 2021 12:29:57 +0800 Subject: [PATCH] - Remove ajaxSetUnfoldID function of misc. --- module/misc/control.php | 47 ----------------------------------------- 1 file changed, 47 deletions(-) diff --git a/module/misc/control.php b/module/misc/control.php index 49734fcea7..e762ad7c73 100644 --- a/module/misc/control.php +++ b/module/misc/control.php @@ -235,51 +235,4 @@ class misc extends control $this->session->set($sessionVar, $captcha->getPhrase()); $captcha->build()->output(); } - - /** - * Ajax set unfoldID. - * - * @param int $objectID - * @param string $objectType - * @param string $action add|delete - * @access public - * @return void - */ - public function ajaxSetUnfoldID($objectID, $objectType, $action = 'add') - { - $account = $this->app->user->account; - if($objectType == 'project') - { - $condition = "owner={$account}&module=project§ion=task&key=unfoldTasks"; - $settingPath = $account . ".project.task.unfoldTasks"; - } - else - { - $condition = "owner={$account}&module=product§ion=browse&key=unfoldStories"; - $settingPath = $account . ".product.browse.unfoldStories"; - } - - $this->loadModel('setting'); - $setting = $this->setting->createDAO($this->setting->parseItemParam($condition), 'select')->fetch(); - $newUnfoldID = $this->post->newUnfoldID; - if(empty($newUnfoldID)) die(); - - $newUnfoldID = json_decode($newUnfoldID); - $unfoldIdList = $setting ? json_decode($setting->value, true) : array(); - foreach($newUnfoldID as $unfoldID) - { - unset($unfoldIdList[$objectID][$unfoldID]); - if($action == 'add') $unfoldIdList[$objectID][$unfoldID] = $unfoldID; - } - - if(empty($setting)) - { - $this->setting->setItem($settingPath, json_encode($unfoldIdList)); - } - else - { - $this->dao->update(TABLE_CONFIG)->set('value')->eq(json_encode($unfoldIdList))->where('id')->eq($setting->id)->exec(); - } - die('success'); - } }