diff --git a/db/update16.0.beta1.sql b/db/update16.0.beta1.sql index 6634ac2b81..0ad3e88553 100644 --- a/db/update16.0.beta1.sql +++ b/db/update16.0.beta1.sql @@ -5,3 +5,5 @@ ALTER TABLE `zt_task` ADD `v1` varchar(40) NOT NULL AFTER `lines`; ALTER TABLE `zt_task` ADD `v2` varchar(40) NOT NULL AFTER `v1`; ALTER TABLE `zt_task` ADD `mr` mediumint(8) unsigned NOT NULL AFTER `repo`; ALTER TABLE `zt_bug` ADD `mr` mediumint(8) unsigned NOT NULL AFTER `repo`; + +UPDATE `zt_grouppriv` SET `method`='addReview' where `module`='mr' and `method`='addBug'; diff --git a/module/mr/model.php b/module/mr/model.php index 9a577e46c5..33dbda8a56 100644 --- a/module/mr/model.php +++ b/module/mr/model.php @@ -793,7 +793,7 @@ class mrModel extends model */ public function getReview($repoID, $MRID, $revision = '') { - if(empty($repoID) OR empty($MRID)) return array(); + if(empty($repoID) or empty($MRID)) return array(); $reviews = array(); $bugs = $this->dao->select('t1.*, t2.realname')->from(TABLE_BUG)->alias('t1') diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 479f87c305..3ee0d81265 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -735,10 +735,6 @@ class upgradeModel extends model $this->updateObjectBranch(); $this->updateProjectStories(); $this->appendExec('15_7_1'); - case '16_0_beta1': - $this->saveLogs('Execute 16_0_beta1'); - $this->adjustPriv16_0_beta1(); - $this->appendExec('16_0_beta1'); } $this->deletePatch(); @@ -5408,24 +5404,4 @@ class upgradeModel extends model return true; } - - /** - * Adjust priv 16_0_beta1. - * - * @access public - * @return bool - */ - public function adjustPriv16_0_beta1() - { - $groups = $this->dao->select('`group`')->from(TABLE_GROUPPRIV)->where('module')->eq('mr')->andWhere('method')->eq('addBug')->fetchPairs('group', 'group'); - foreach($groups as $groupID) - { - $groupPriv = new stdclass(); - $groupPriv->group = $groupID; - $groupPriv->module = 'mr'; - $groupPriv->method = 'addReview'; - $this->dao->replace(TABLE_GROUPPRIV)->data($groupPriv)->exec(); - } - return true; - } }