Add option to enable or disable global tags per projects

This commit is contained in:
Timo
2020-04-04 20:39:17 +02:00
committed by GitHub
parent 1cc0ac0713
commit 67a5dd6a89
42 changed files with 185 additions and 62 deletions

View File

@@ -605,4 +605,20 @@ class ProjectModel extends Base
->join(ColumnModel::TABLE, 'id', 'project_id')
->count();
}
/**
* Change usage of global tags
*
* @param integer $project_id Project id
* @param bool $global_tags New global tag value
* @return bool
*/
public function changeGlobalTagUsage($project_id, $global_tags)
{
return $this->exists($project_id) &&
$this->db
->table(self::TABLE)
->eq('id', $project_id)
->save(array('enable_global_tags' => $global_tags));
}
}