Merge branch 'sprint/zentaomax42_lanzongjun' into 'master'

* fix bug cp project

See merge request easycorp/zentaopms!4976
This commit is contained in:
王怡栋
2022-08-16 05:07:32 +00:00
+2 -2
View File
@@ -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)
{