This commit is contained in:
liugang
2018-05-18 14:01:05 +08:00
8 changed files with 39 additions and 6 deletions
+12
View File
@@ -292,6 +292,7 @@ CREATE TABLE IF NOT EXISTS `zt_doclib` (
`groups` varchar(255) NOT NULL,
`users` text NOT NULL,
`main` enum('0','1') NOT NULL default '0',
`collector` text NOT NULL,
`order` tinyint(5) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL default '0',
PRIMARY KEY (`id`)
@@ -404,6 +405,7 @@ CREATE TABLE IF NOT EXISTS `zt_module` (
`order` smallint(5) unsigned NOT NULL default '0',
`type` char(30) NOT NULL,
`owner` varchar(30) NOT NULL,
`collector` text NOT NULL,
`short` varchar(30) NOT NULL,
`deleted` enum('0','1') NOT NULL default '0',
PRIMARY KEY (`id`),
@@ -1109,6 +1111,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(1, 'my', 'testCase'),
(1, 'my', 'testTask'),
(1, 'my', 'todo'),
(1, 'my', 'calendar'),
(1, 'my', 'unbind'),
(1, 'my', 'manageContacts'),
(1, 'my', 'deleteContacts'),
@@ -1421,6 +1424,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(2, 'my', 'story'),
(2, 'my', 'task'),
(2, 'my', 'todo'),
(2, 'my', 'calendar'),
(2, 'my', 'unbind'),
(2, 'my', 'manageContacts'),
(2, 'my', 'deleteContacts'),
@@ -1605,6 +1609,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(3, 'my', 'testCase'),
(3, 'my', 'testTask'),
(3, 'my', 'todo'),
(3, 'my', 'calendar'),
(3, 'my', 'unbind'),
(3, 'my', 'manageContacts'),
(3, 'my', 'deleteContacts'),
@@ -1844,6 +1849,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(4, 'my', 'testCase'),
(4, 'my', 'testTask'),
(4, 'my', 'todo'),
(4, 'my', 'calendar'),
(4, 'my', 'unbind'),
(4, 'my', 'manageContacts'),
(4, 'my', 'deleteContacts'),
@@ -2070,6 +2076,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(5, 'my', 'testCase'),
(5, 'my', 'testTask'),
(5, 'my', 'todo'),
(5, 'my', 'calendar'),
(5, 'my', 'unbind'),
(5, 'my', 'manageContacts'),
(5, 'my', 'deleteContacts'),
@@ -2342,6 +2349,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(6, 'my', 'testCase'),
(6, 'my', 'testTask'),
(6, 'my', 'todo'),
(6, 'my', 'calendar'),
(6, 'my', 'unbind'),
(6, 'my', 'manageContacts'),
(6, 'my', 'deleteContacts'),
@@ -2566,6 +2574,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(7, 'my', 'testCase'),
(7, 'my', 'testTask'),
(7, 'my', 'todo'),
(7, 'my', 'calendar'),
(7, 'my', 'unbind'),
(7, 'my', 'manageContacts'),
(7, 'my', 'deleteContacts'),
@@ -2816,6 +2825,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(8, 'my', 'testCase'),
(8, 'my', 'testTask'),
(8, 'my', 'todo'),
(8, 'my', 'calendar'),
(8, 'my', 'unbind'),
(8, 'my', 'manageContacts'),
(8, 'my', 'deleteContacts'),
@@ -3054,6 +3064,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(9, 'my', 'testCase'),
(9, 'my', 'testTask'),
(9, 'my', 'todo'),
(9, 'my', 'calendar'),
(9, 'my', 'unbind'),
(9, 'my', 'manageContacts'),
(9, 'my', 'deleteContacts'),
@@ -3199,6 +3210,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
(10, 'my', 'profile'),
(10, 'my', 'task'),
(10, 'my', 'todo'),
(10, 'my', 'calendar'),
(10, 'my', 'unbind'),
(10, 'product', 'browse'),
(10, 'product', 'doc'),
+1
View File
@@ -72,6 +72,7 @@ $lang->index->methodOrder[0] = 'index';
$lang->resource->my = new stdclass();
$lang->resource->my->index = 'index';
$lang->resource->my->todo = 'todo';
$lang->resource->my->calendar = 'calendar';
$lang->resource->my->task = 'task';
$lang->resource->my->bug = 'bug';
$lang->resource->my->testTask = 'testTask';
+1
View File
@@ -4,6 +4,7 @@ $lang->my->common = 'Dashboard';
/* Method List。*/
$lang->my->index = 'Home';
$lang->my->todo = 'My Todo';
$lang->my->calendar = 'Calendar';
$lang->my->task = 'My Task';
$lang->my->bug = 'My Bug';
$lang->my->testTask = 'My Build';
+1
View File
@@ -4,6 +4,7 @@ $lang->my->common = '我的地盘';
/* 方法列表。*/
$lang->my->index = '首页';
$lang->my->todo = '我的待办';
$lang->my->calendar = '日程';
$lang->my->task = '我的任务';
$lang->my->bug = '我的Bug';
$lang->my->testTask = '我的版本';
+1
View File
@@ -62,6 +62,7 @@ class todo extends control
$this->send(array('result' => 'success', 'id' => $todoID, 'name' => $todo->name, 'pri' => $todo->pri, 'priName' => $this->lang->todo->priList[$todo->pri], 'time' => date(DT_DATE4, strtotime($todo->date)) . ' ' . $todo->begin));
}
if(isonlybody()) die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent.parent'));
die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent'));
}
-1
View File
@@ -135,4 +135,3 @@ $lang->upgrade->fromVersions['9_8'] = '9.8';
$lang->upgrade->fromVersions['9_8_1'] = '9.8.1';
$lang->upgrade->fromVersions['9_8_2'] = '9.8.2';
$lang->upgrade->fromVersions['9_8_3'] = '9.8.3';
$lang->upgrade->fromVersions['10_0_beta'] = '10.0.beta';
-1
View File
@@ -135,4 +135,3 @@ $lang->upgrade->fromVersions['9_8'] = '9.8';
$lang->upgrade->fromVersions['9_8_1'] = '9.8.1';
$lang->upgrade->fromVersions['9_8_2'] = '9.8.2';
$lang->upgrade->fromVersions['9_8_3'] = '9.8.3';
$lang->upgrade->fromVersions['10_0_beta'] = '10.0.beta';
+23 -4
View File
@@ -217,8 +217,8 @@ class upgradeModel extends model
$this->execSQL($this->getUpgradeFile('9.8.2'));
$this->addUniqueKeyToTeam();
case '9_8_3':
case '10_0_beta':
$this->execSQL($this->getUpgradeFile('10_0_beta'));
$this->execSQL($this->getUpgradeFile('9.8.3'));
$this->adjustPriv10_0_alpha();
}
$this->deletePatch();
@@ -326,8 +326,7 @@ class upgradeModel extends model
case '9_8':
case '9_8_1': $confirmContent .= file_get_contents($this->getUpgradeFile('9.8.1'));
case '9_8_2': $confirmContent .= file_get_contents($this->getUpgradeFile('9.8.2'));
case '9_8_3':
case '10_0_beta': $confirmContent .= file_get_contents($this->getUpgradeFile('10.0.beta'));
case '9_8_3': $confirmContent .= file_get_contents($this->getUpgradeFile('9.8.3'));
}
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
}
@@ -2283,4 +2282,24 @@ class upgradeModel extends model
$this->dao->exec("ALTER TABLE " . TABLE_TEAM . " ADD UNIQUE `team` (`root`, `type`, `account`)");
return !dao::isError();
}
/**
* Adjust priv for 10_0_alpha.
*
* @access public
* @return bool
*/
public function adjustPriv10_0_alpha()
{
$groups = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('my')->andWhere('method')->eq('todo')->fetchPairs('group', 'group');
foreach($groups as $group)
{
$groupPriv = new stdclass();
$groupPriv->group = $groupID;
$groupPriv->module = 'my';
$groupPriv->method = 'calendar';
$this->dao->replace(TABLE_GROUPPRIV)->data($data)->exec();
}
return true;
}
}