* Finish task#4369.

This commit is contained in:
滔哥
2018-06-01 16:14:37 +08:00
parent ea693ad835
commit a104f067f3
5 changed files with 28 additions and 7 deletions
+3 -2
View File
@@ -485,7 +485,8 @@ class doc extends control
if($objectType == 'module') $table = TABLE_MODULE;
$collectors = $this->dao->select('collector')->from($table)->where('id')->eq($objectID)->fetch('collector');
if(strpos($collectors, ",{$this->app->user->account},") !== false)
$hasCollect = strpos($collectors, ",{$this->app->user->account},") !== false;
if($hasCollect)
{
$collectors = str_replace(",{$this->app->user->account},", ',', $collectors);
}
@@ -500,7 +501,7 @@ class doc extends control
$this->dao->update($table)->set('collector')->eq($collectors)->where('id')->eq($objectID)->exec();
die(js::reload('parent'));
$this->send(array('status' => $hasCollect ? 'no' : 'yes'));
}
/**