diff --git a/module/admin/control.php b/module/admin/control.php
index 33b0d415cf..3ee44fb187 100644
--- a/module/admin/control.php
+++ b/module/admin/control.php
@@ -120,32 +120,4 @@ class admin extends control
echo "Repairing TABLE: " . $result->Table . "\t" . $result->Msg_type . ":" . $result->Msg_text . "\n";
}
}
-
- /**
- * Confirm clear data.
- *
- * @param string $confirm ''|no|yes
- * @access public
- * @return void
- */
- public function clearData($confirm = '')
- {
- if($confirm == 'no')
- {
- die(js::confirm($this->lang->admin->confirmClearData, inlink('clearData', "confirm=yes")));
- }
- elseif($confirm == 'yes')
- {
- $result = $this->admin->clearData();
-
- if(!$result) die(js::alert($this->lang->admin->clearDataFailed));
-
- echo js::alert($this->lang->admin->clearDataSuccessfully);
- die(js::locate(inLink('index'), 'parent'));
- }
-
- $this->view->title = $this->lang->admin->clearData;
- $this->view->position[] = $this->lang->admin->clearData;
- $this->display();
- }
}
diff --git a/module/admin/lang/en.php b/module/admin/lang/en.php
index 588ea5665b..2d472c33c3 100644
--- a/module/admin/lang/en.php
+++ b/module/admin/lang/en.php
@@ -19,16 +19,6 @@ $lang->admin->welcome = 'Welcome to ZenTaoPMS.';
$lang->admin->browseCompany = 'Browse Company';
-$lang->admin->clearData = 'Reset';
-$lang->admin->pleaseInputYes = "Input 'yes' to reset zentao:";
-$lang->admin->confirmClearData = 'Are you sure to reset zentao?';
-$lang->admin->clearDataFailed = 'Failed to reset zentao!';
-$lang->admin->clearDataSuccessfully = 'Successfully reset zentao';
-$lang->admin->clearDataDesc = <<
-This action is very dangerous, think over before you do it!
-EOT;
-
$lang->admin->info = new stdclass();
$lang->admin->info->caption = 'zentao information';
$lang->admin->info->version = 'The current version of the system is %s,';
diff --git a/module/admin/lang/zh-cn.php b/module/admin/lang/zh-cn.php
index 6135f3d129..072a784d86 100644
--- a/module/admin/lang/zh-cn.php
+++ b/module/admin/lang/zh-cn.php
@@ -19,16 +19,6 @@ $lang->admin->welcome = '欢迎使用禅道管理软件后台管理系统';
$lang->admin->browseCompany = '浏览公司';
-$lang->admin->clearData = '重置禅道';
-$lang->admin->pleaseInputYes = '确认重置禅道数据请输入yes:';
-$lang->admin->confirmClearData = '您确认要重置禅道数据吗?';
-$lang->admin->clearDataFailed = '禅道重置失败!';
-$lang->admin->clearDataSuccessfully = '禅道重置成功!';
-$lang->admin->clearDataDesc = <<
-该功能存在极大的风险,执行之前务必三思!
-EOT;
-
$lang->admin->info = new stdclass();
$lang->admin->info->caption = '禅道系统信息';
$lang->admin->info->version = '当前系统的版本是%s,';
diff --git a/module/admin/model.php b/module/admin/model.php
index 0749e4ec5b..4a5a793ce4 100644
--- a/module/admin/model.php
+++ b/module/admin/model.php
@@ -138,39 +138,4 @@ class adminModel extends model
$register->email = $this->app->user->email;
return $register;
}
-
- /**
- * Clear data.
- *
- * @access public
- * @return void
- */
- public function clearData()
- {
- $result = $this->dbh->query('SHOW TABLES')->fetchAll();
- if(!isset($this->config->global->showDemoUsers)) return false;
-
- foreach($result as $item)
- {
- $table = current((array)$item);
- if(strpos($table, $this->config->db->prefix) === false) continue;
- if($table == $this->config->db->prefix . 'company') continue;
- if($table == $this->config->db->prefix . 'group') continue;
- if($table == $this->config->db->prefix . 'user')
- {
- $deleteUsers = array('productManager', 'projectManager', 'testManager', 'dev1', 'dev2', 'dev3', 'tester1', 'tester2', 'tester3');
- $this->dao->delete()->from($table)->where('account')->in($deleteUsers)->exec();
- if(dao::isError()) return false;
- continue;
- }
- if($table == $this->config->db->prefix . 'config')
- {
- $this->loadModel('setting')->deleteItems('key=showDemoUsers');
- if(dao::isError()) return false;
- continue;
- }
- if(!$this->dbh->query("TRUNCATE TABLE `$table`")) return false;
- }
- return true;
- }
}
diff --git a/module/admin/view/cleardata.html.php b/module/admin/view/cleardata.html.php
deleted file mode 100755
index 5e2164fa54..0000000000
--- a/module/admin/view/cleardata.html.php
+++ /dev/null
@@ -1,41 +0,0 @@
-
- * @package admin
- * @version $Id: view.html.php 2568 2012-02-09 06:56:35Z shiyangyangwork@yahoo.cn $
- * @link http://www.zentao.net
- */
-?>
-
-
-
-
-
- admin->clearData;?>
-
-
-
-
-
- admin->clearDataDesc);?>
-
-
-
-
-
-
-
diff --git a/module/admin/view/index.html.php b/module/admin/view/index.html.php
index 1ba8cedd1b..de329cdbc8 100644
--- a/module/admin/view/index.html.php
+++ b/module/admin/view/index.html.php
@@ -11,7 +11,6 @@
*/
?>
-config->global->showDemoUsers) ? true : false; js::set('showDemoUsers', $showDemoUsers);?>
' . $lang->admin->notice->ignore, 'hiddenwin', 'class="close" data-dismiss="alert" style="font-size: 12px"');?>
diff --git a/module/common/lang/en.php b/module/common/lang/en.php
index 65ee2d5007..1b31e2f3f2 100644
--- a/module/common/lang/en.php
+++ b/module/common/lang/en.php
@@ -277,7 +277,6 @@ $lang->admin->menu->index = array('link' => 'Index|admin|index');
$lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension,editor');
$lang->admin->menu->custom = array('link' => 'Custom|custom|index', 'subModule' => 'custom');
$lang->admin->menu->mail = array('link' => 'Email|mail|index', 'subModule' => 'mail');
-$lang->admin->menu->clearData = array('link' => 'Reset|admin|cleardata');
$lang->admin->menu->convert = array('link' => 'Import|convert|index', 'subModule' => 'convert');
$lang->admin->menu->trashes = array('link' => 'Trash|action|trash', 'subModule' => 'action');
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index 6a1a6062d6..bc49a03104 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -277,7 +277,6 @@ $lang->admin->menu->index = array('link' => '首页|admin|index');
$lang->admin->menu->extension = array('link' => '扩展|extension|browse', 'subModule' => 'extension,editor');
$lang->admin->menu->custom = array('link' => '自定义|custom|index', 'subModule' => 'custom');
$lang->admin->menu->mail = array('link' => '发信|mail|index', 'subModule' => 'mail');
-$lang->admin->menu->clearData = array('link' => '重置禅道|admin|cleardata');
$lang->admin->menu->convert = array('link' => '导入|convert|index', 'subModule' => 'convert');
$lang->admin->menu->trashes = array('link' => '回收站|action|trash', 'subModule' => 'action');
diff --git a/module/common/model.php b/module/common/model.php
index 06f097017f..12978215e5 100644
--- a/module/common/model.php
+++ b/module/common/model.php
@@ -446,9 +446,6 @@ class commonModel extends model
if(!isset($lang->$moduleName->menu)) {echo "
"; return;}
- /* Unset clearData menu when the data of pms is demo. */
- if(!isset($app->config->global->showDemoUsers) or !$app->config->global->showDemoUsers) unset($lang->admin->menu->clearData);
-
/* Get the sub menus of the module, and get current module and method. */
$submenus = $lang->$moduleName->menu;
$currentModule = $app->getModuleName();
diff --git a/tools/check.php b/tools/check.php
index 46b926bc95..fd266d8bd3 100755
--- a/tools/check.php
+++ b/tools/check.php
@@ -15,7 +15,6 @@ foreach(glob($moduleRoot . '/group/ext/lang/zh-cn/*.php') as $resourceFile)
$whiteList[] = 'api-getsessionid';
$whiteList[] = 'admin-setflow';
-$whiteList[] = 'admin-cleardata';
$whiteList[] = 'bug-buildtemplates';
$whiteList[] = 'bug-sendmail';
$whiteList[] = 'board-managechild';
diff --git a/www/js/my.full.js b/www/js/my.full.js
index 4dd0b26d39..2547a8fa53 100644
--- a/www/js/my.full.js
+++ b/www/js/my.full.js
@@ -630,17 +630,6 @@ function ajaxGetSearchForm()
}
}
-/**
- * Hide the link of clearData.
- *
- * @access public
- * @return void
- */
-function hideClearDataLink()
-{
- if(typeof showDemoUsers == 'undefined' || !showDemoUsers) $('#submenuclearData').addClass('hidden');
-}
-
/**
* add one option of a select to another select.
*
@@ -1186,8 +1175,6 @@ $(document).ready(function()
autoCheck();
toggleSearch();
- hideClearDataLink();
-
$(window).resize(saveWindowSize); // When window resized, call it again.
if(needPing) setTimeout('setPing()', 1000 * 60); // After 5 minutes, begin ping.