Merge branch 'sprint/tianshujie_fixbug' into 'master'
Sprint/tianshujie fixbug See merge request easycorp/zentaopms!2694
This commit is contained in:
@@ -2663,6 +2663,8 @@ class storyModel extends model
|
||||
{
|
||||
$storyQuery .= " AND `status` NOT IN ('draft', 'closed')";
|
||||
}
|
||||
|
||||
if($this->app->rawModule == 'build' and $this->app->rawMethod == 'linkstory') $storyQuery .= " AND `parent` != '-1'";
|
||||
}
|
||||
elseif(strpos($storyQuery, $allBranch) !== false)
|
||||
{
|
||||
|
||||
@@ -5257,8 +5257,9 @@ class upgradeModel extends model
|
||||
$products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('acl')->eq('custom')->fetchAll();
|
||||
foreach($products as $product)
|
||||
{
|
||||
$groups = explode(',', $product->whitelist);
|
||||
$accounts = $this->dao->select('account')->from(TABLE_USERGROUP)->where('`group`')->in($groups)->fetchPairs('account');
|
||||
$groups = explode(',', $product->whitelist);
|
||||
$accounts = $this->dao->select('account')->from(TABLE_USERGROUP)->where('`group`')->in($groups)->fetchPairs('account');
|
||||
$whiteList = '';
|
||||
foreach($accounts as $account)
|
||||
{
|
||||
$acl = new stdclass();
|
||||
@@ -5269,9 +5270,11 @@ class upgradeModel extends model
|
||||
$acl->source = 'upgrade';
|
||||
|
||||
$this->dao->insert(TABLE_ACL)->data($acl)->exec();
|
||||
|
||||
$whiteList .= ',' . $account;
|
||||
}
|
||||
|
||||
$this->dao->update(TABLE_PRODUCT)->set('acl')->eq('private')->where('id')->eq($product->id)->exec();
|
||||
$this->dao->update(TABLE_PRODUCT)->set('acl')->eq('private')->set('whitelist')->eq($whiteList)->where('id')->eq($product->id)->exec();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user