This commit is contained in:
lanzongjun
2022-08-16 11:22:57 +08:00
parent 5b380fedb4
commit 4b21f31e5c
+2 -2
View File
@@ -143,14 +143,14 @@ class project extends control
public function ajaxGetCopyProjects()
{
$data = fixer::input('post')->get();
$projectParis = $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('undifined', 0, '', array_keys($projectParis));
$projects = $this->project->getPairsByModel('undifined', 0, '', array_keys($projectPairs));
$html = empty($projects) ? "<div class='text-center'>{$this->lang->noData}</div>" : '';
foreach($projects as $id => $name)
{