Merge branch 'sprint/zentaomax42_lanzongjun' into 'master'
* fix bug cp project See merge request easycorp/zentaopms!4976
This commit is contained in:
@@ -143,14 +143,14 @@ class project extends control
|
||||
public function ajaxGetCopyProjects()
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
$projects = $this->dao->select('id, name')->from(TABLE_PROJECT)
|
||||
$projectPairs = $this->dao->select('id, name')->from(TABLE_PROJECT)
|
||||
->where('type')->eq('project')
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('vision')->eq($this->config->vision)
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF(trim($data->name))->andWhere('name')->like("%$data->name%")->fi()
|
||||
->fetchPairs();
|
||||
|
||||
$projects = $this->project->getPairsByModel('', 0, '', array_keys($projectPairs));
|
||||
$html = empty($projects) ? "<div class='text-center'>{$this->lang->noData}</div>" : '';
|
||||
foreach($projects as $id => $name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user