* fix bug #11040.
This commit is contained in:
@@ -475,6 +475,8 @@ class groupModel extends model
|
||||
ksort($this->lang->moduleOrder, SORT_ASC);
|
||||
foreach($this->lang->moduleOrder as $moduleName)
|
||||
{
|
||||
if(!isset($resources->$moduleName)) continue;
|
||||
|
||||
$resource = $resources->$moduleName;
|
||||
unset($resources->$moduleName);
|
||||
$this->lang->resource->$moduleName = $resource;
|
||||
|
||||
@@ -3973,7 +3973,21 @@ class upgradeModel extends model
|
||||
*/
|
||||
public function adjustPriv15_0()
|
||||
{
|
||||
$this->dao->update(TABLE_GROUPPRIV)->set('module')->eq('execution')->where('module')->eq('project')->exec();
|
||||
$executionPriv = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('execution')->limit(1)->fetch();
|
||||
if(empty($executionPriv)) $this->dao->update(TABLE_GROUPPRIV)->set('module')->eq('execution')->where('module')->eq('project')->exec();
|
||||
|
||||
$groups = $this->dao->select('id')->from(TABLE_GROUP)->fetchPairs('id', 'id');
|
||||
foreach($groups as $groupID)
|
||||
{
|
||||
$groupPriv = new stdclass();
|
||||
$groupPriv->group = $groupID;
|
||||
$groupPriv->module = 'my';
|
||||
$groupPriv->method = 'work';
|
||||
$this->dao->replace(TABLE_GROUPPRIV)->data($groupPriv)->exec();
|
||||
|
||||
$groupPriv->method = 'contribute';
|
||||
$this->dao->replace(TABLE_GROUPPRIV)->data($groupPriv)->exec();
|
||||
}
|
||||
|
||||
$stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('program')->andWhere('method')->like('PGM%')->query();
|
||||
while($grouppriv = $stmt->fetch())
|
||||
|
||||
Reference in New Issue
Block a user