* adjust for import task.
This commit is contained in:
@@ -217,7 +217,7 @@ $lang->project->menu->team = array('link' => 'Team|project|team|projectID=%
|
||||
$lang->project->menu->doc = array('link' => 'Doc|project|doc|porjectID=%s', 'subModule' => 'doc');
|
||||
$lang->project->menu->product = array('link' => "{$lang->productCommon}|project|manageproducts|projectID=%s", 'alias' => 'edit,start,suspend,delay,close');
|
||||
$lang->project->menu->view = 'Info|project|view|projectID=%s';
|
||||
$lang->project->menu->create = array('link' => '<span class="icon-add"> </span>New|project|create', 'float' => 'right');
|
||||
$lang->project->menu->create = array('link' => '<span class="icon-plus"> </span>New|project|create', 'float' => 'right');
|
||||
$lang->project->menu->all = array('link' => "<i class='icon-th-large'></i> {$lang->projectCommon}s|project|index|locate=no&status=undone&projectID=%s", 'float' => 'right');
|
||||
$lang->project->menu->index = array('link' => "<i class='icon-home'></i>Homepage|project|index|locate=no", 'float' => 'right');
|
||||
|
||||
@@ -266,7 +266,7 @@ $lang->doc->menu->browse = array('link' => 'Doc|doc|browse|libID=%s', 'alias' =
|
||||
$lang->doc->menu->edit = 'Edit Library|doc|editLib|libID=%s';
|
||||
$lang->doc->menu->module = 'Modules|tree|browse|libID=%s&viewType=doc';
|
||||
$lang->doc->menu->delete = array('link' => 'Delete Library|doc|deleteLib|libID=%s', 'target' => 'hiddenwin');
|
||||
$lang->doc->menu->create = array('link' => '<span class="icon-add1"> </span>New Library|doc|createLib', 'float' => 'right');
|
||||
$lang->doc->menu->create = array('link' => '<span class="icon-plus"> </span>New Library|doc|createLib', 'float' => 'right');
|
||||
|
||||
/* Report menu. */
|
||||
$lang->report = new stdclass();
|
||||
@@ -286,9 +286,9 @@ $lang->company->menu->dept = array('link' => 'Department|dept|browse', '
|
||||
$lang->company->menu->browseGroup = array('link' => 'Group|group|browse', 'subModule' => 'group');
|
||||
$lang->company->menu->view = array('link' => 'Company|company|view', 'alias' => 'edit');
|
||||
$lang->company->menu->dynamic = 'Dynamic|company|dynamic|';
|
||||
$lang->company->menu->addGroup = array('link' => '<span class="icon-add"> </span>Add Group|group|create', 'float' => 'right');
|
||||
$lang->company->menu->batchAddUser = array('link' => '<span class="icon-green-user-batchCreate"> </span>Batch Add|user|batchCreate', 'subModule' => 'user', 'float' => 'right');
|
||||
$lang->company->menu->addUser = array('link' => '<span class="icon-add"> </span>Add User|user|create|dept=%s&from=company', 'subModule' => 'user', 'float' => 'right');
|
||||
$lang->company->menu->addGroup = array('link' => '<span class="icon-plus"> </span>Add Group|group|create', 'float' => 'right');
|
||||
$lang->company->menu->batchAddUser = array('link' => '<span class="icon-plus-sign"> </span>Batch Add|user|batchCreate', 'subModule' => 'user', 'float' => 'right');
|
||||
$lang->company->menu->addUser = array('link' => '<span class="icon-plus"> </span>Add User|user|create|dept=%s&from=company', 'subModule' => 'user', 'float' => 'right');
|
||||
|
||||
$lang->dept = new stdclass();
|
||||
$lang->group = new stdclass();
|
||||
|
||||
@@ -1009,6 +1009,7 @@ class projectModel extends model
|
||||
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
|
||||
->where('t1.status')->in('wait, doing, pause, cancel')
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->andWhere('t2.product')->in(array_keys($branches))
|
||||
->andWhere("(t1.story = 0 OR t2.branch in ('0','" . join("','", $branches) . "'))")
|
||||
->fetchGroup('project', 'id');
|
||||
return $tasks;
|
||||
@@ -1796,9 +1797,16 @@ class projectModel extends model
|
||||
*/
|
||||
public function getProjectBranches($projectID)
|
||||
{
|
||||
return $this->dao->select('product, branch')->from(TABLE_PROJECTPRODUCT)
|
||||
$productBranchPairs = $this->dao->select('product, branch')->from(TABLE_PROJECTPRODUCT)
|
||||
->where('project')->eq($projectID)
|
||||
->fetchPairs();
|
||||
$branches = $this->loadModel('branch')->getByProducts(array_keys($productBranchPairs));
|
||||
foreach($productBranchPairs as $product => $branch)
|
||||
{
|
||||
if($branch == 0 and isset($branches[$product])) $productBranchPairs[$product] = join(',', array_keys($branches[$product]));
|
||||
}
|
||||
|
||||
return $productBranchPairs;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,9 +50,9 @@ class settingModel extends model
|
||||
public function setItem($path, $value = '')
|
||||
{
|
||||
/* fix bug when account has dot. */
|
||||
$account = $this->app->user->account;
|
||||
$account = isset($this->app->user->account) ? $this->app->user->account : '';
|
||||
$replace = false;
|
||||
if(strpos($path, $account) === 0)
|
||||
if($account and strpos($path, $account) === 0)
|
||||
{
|
||||
$replace = true;
|
||||
$path = preg_replace("/^{$account}/", 'account', $path);
|
||||
|
||||
@@ -384,13 +384,13 @@ class userModel extends model
|
||||
|
||||
if($this->post->groups)
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('account')->eq($this->post->account)->exec();
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('account')->eq($oldUser->account)->exec();
|
||||
foreach($this->post->groups as $groupID)
|
||||
{
|
||||
$data = new stdclass();
|
||||
$data->account = $this->post->account;
|
||||
$data->group = $groupID;
|
||||
$this->dao->insert(TABLE_USERGROUP)->data($data)->exec();
|
||||
$this->dao->replace(TABLE_USERGROUP)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
if(!empty($user->password) and $user->account == $this->app->user->account) $this->app->user->password = $user->password;
|
||||
|
||||
Reference in New Issue
Block a user