From fa54dff413cbb30567f788931a82bedc7647598e Mon Sep 17 00:00:00 2001 From: iamazhi Date: Thu, 29 Aug 2013 16:35:31 +0800 Subject: [PATCH] * finish task#1412. --- module/admin/control.php | 18 --------------- module/admin/lang/en.php | 9 -------- module/admin/lang/zh-cn.php | 9 -------- module/admin/view/setflow.html.php | 36 ------------------------------ module/my/control.php | 1 - module/my/js/index.js | 1 - module/my/view/index.html.php | 1 - module/upgrade/model.php | 24 -------------------- 8 files changed, 99 deletions(-) delete mode 100644 module/admin/view/setflow.html.php diff --git a/module/admin/control.php b/module/admin/control.php index 8924d8ee02..24bd712c76 100644 --- a/module/admin/control.php +++ b/module/admin/control.php @@ -181,22 +181,4 @@ class admin extends control $this->view->position[] = $this->lang->admin->clearData; $this->display(); } - - /** - * Set flow. - * - * @access public - * @return void - */ - public function setFlow() - { - if($_POST) - { - if($this->post->flow != 'full') die(js::locate($this->createLink('extension', 'install', "extension={$this->post->flow}"), 'parent')); - - $this->loadModel('setting')->setItem('system.common.global.flow', 'full'); - die(js::reload( 'parent.parent')); - } - $this->display(); - } } diff --git a/module/admin/lang/en.php b/module/admin/lang/en.php index 5d52870b45..2891b54bda 100644 --- a/module/admin/lang/en.php +++ b/module/admin/lang/en.php @@ -55,12 +55,3 @@ $lang->admin->bind = new stdclass(); $lang->admin->bind->caption = 'Bind with community account'; $lang->admin->bind->action = 'bind'; $lang->admin->bind->success = "Bind success"; - -$lang->admin->selectFlow = 'How do you plan to use zentao?'; - -$lang->admin->flowList['full'] = 'All features(including product, project, plan, release, story, task, bug, case, testtask, doc and so on.)'; -$lang->admin->flowList['zentaotest'] = 'Only testing(including product, release, bug, case, testtask, doc and so on.)'; -$lang->admin->flowList['zentaotask'] = 'Only task (including project, task, doc and so on.)'; -$lang->admin->flowList['zentaostory'] = 'Only story(including product, story, plan, release, doc and so on.)'; - -$lang->admin->flowNotice = "You can remove testing, task or story extension in admin->extension panel to use all features again."; diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php index fd5e9e7b1e..c8347fb6cc 100644 --- a/module/admin/lang/zh-cn.php +++ b/module/admin/lang/zh-cn.php @@ -55,12 +55,3 @@ $lang->admin->bind = new stdclass(); $lang->admin->bind->caption = '关联社区账号'; $lang->admin->bind->action = '关联'; $lang->admin->bind->success = "关联账户成功"; - -$lang->admin->selectFlow = '您计划如何使用禅道?'; - -$lang->admin->flowList['full'] = '所有功能(包括产品、项目、需求、计划、发布、任务、Bug、用例、测试任务和文档等功能。)'; -$lang->admin->flowList['zentaotest'] = '仅测试管理(包括产品、版本、Bug、用例、测试任务和文档管理等功能。)'; -$lang->admin->flowList['zentaotask'] = '仅任务管理(包括项目、任务和文档管理。)'; -$lang->admin->flowList['zentaostory'] = '仅需求管理(包括产品、需求、计划、发布和文档管理等功能。)'; - -$lang->admin->flowNotice = "注:如果您使用的不是所有功能,后续可以到“管理->插件”中,卸载相应的插件,即可重新使用禅道所有功能。"; diff --git a/module/admin/view/setflow.html.php b/module/admin/view/setflow.html.php deleted file mode 100644 index a7cee5e37d..0000000000 --- a/module/admin/view/setflow.html.php +++ /dev/null @@ -1,36 +0,0 @@ - - * @package admin - * @version $Id$ - * @link http://www.zentao.net - */ -?> - -
- - - admin->flowList as $type => $name):?> - - - - - - - - - - -
admin->selectFlow?>
- $name"; - ?> -
{$lang->admin->flowNotice}

"?>
-
- - diff --git a/module/my/control.php b/module/my/control.php index 0cb9b822a5..eabfb06279 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -43,7 +43,6 @@ class my extends control $this->app->loadClass('pager', true); $pager = new pager($recTotal = 1000, $this->config->my->dynamicCounts); // Init the $recTotal var, thus omit one sql query. - $this->view->setFlow = (!(isset($this->config->global->flow) or strpos($this->app->company->admins, ",{$this->app->user->account},") === false)) ? true : false; $this->view->projectStats = $projectStats; $this->view->productStats = $productStats; $this->view->actions = $this->loadModel('action')->getDynamic('all', 'latest3days', 'date_desc', $pager); diff --git a/module/my/js/index.js b/module/my/js/index.js index fdb7c7a150..a2c933d982 100644 --- a/module/my/js/index.js +++ b/module/my/js/index.js @@ -14,5 +14,4 @@ $(function() { $(this).sparkline('html', {height:'25px'}); }) - if(flow) $.colorbox({href:createLink('admin', 'setFlow'), open:true, width:800, height:277, transition:'none', iframe:true}); }); diff --git a/module/my/view/index.html.php b/module/my/view/index.html.php index 0d2d4e2062..0d0eb0bdd0 100644 --- a/module/my/view/index.html.php +++ b/module/my/view/index.html.php @@ -37,5 +37,4 @@ - diff --git a/module/upgrade/model.php b/module/upgrade/model.php index bb38434846..b0b015c53b 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -83,7 +83,6 @@ class upgradeModel extends model $this->execSQL($this->getUpgradeFile('4.0')); case '4_0_1': $this->execSQL($this->getUpgradeFile('4.0.1')); - $this->processFlow(); $this->addPriv4_0_1(); case '4_1': $this->execSQL($this->getUpgradeFile('4.1')); @@ -627,29 +626,6 @@ class upgradeModel extends model } } - /** - * Process flow. - * - * @access public - * @return void - */ - public function processFlow() - { - /* First delete all flow records. */ - $this->setting->deleteItems('owner=system&module=common§ion=global&key=flow'); - - /* Search the extension table to check zentaotest, zentaotask, zentaostory exists or not. */ - $flow = 'full'; - $extension = $this->dao->select('code')->from(TABLE_EXTENSION) - ->where('code')->in('zentaotest,zentaotask,zentaostory') - ->andWhere('status')->eq('installed') - ->fetch('code'); - if($extension) $flow = 'only' . ucfirst(str_replace('zentao', '', $extension)); - - /* Update database again. */ - $this->setting->setItem('system.common.global.flow', $flow, 0); - } - /** * Add priv for version 4.0.1 *