Add the possibility to make tags global from project settings
This commit is contained in:
@@ -160,12 +160,20 @@ class TagModel extends Base
|
||||
* @param string $tag
|
||||
* @return bool
|
||||
*/
|
||||
public function update($tag_id, $tag, $color_id = null)
|
||||
public function update($tag_id, $tag, $color_id = null, $project_id = null)
|
||||
{
|
||||
return $this->db->table(self::TABLE)->eq('id', $tag_id)->update(array(
|
||||
'name' => $tag,
|
||||
'color_id' => $color_id,
|
||||
));
|
||||
if($project_id !== null){
|
||||
return $this->db->table(self::TABLE)->eq('id', $tag_id)->update(array(
|
||||
'name' => $tag,
|
||||
'color_id' => $color_id,
|
||||
'project_id' => $project_id
|
||||
));
|
||||
} else {
|
||||
return $this->db->table(self::TABLE)->eq('id', $tag_id)->update(array(
|
||||
'name' => $tag,
|
||||
'color_id' => $color_id
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user