application/models/Tracker/Tracker_Category_Model.php 1 location
|
@@ 26-33 (lines=8) @@
|
| 23 |
|
$status = ['code' => 0]; |
| 24 |
|
|
| 25 |
|
if(in_array($category, array_keys($this->enabledCategories))) { |
| 26 |
|
foreach($idList as $id) { |
| 27 |
|
if(!(ctype_digit($id) && $this->setByID($this->User->id, (int) $id, $category))) { |
| 28 |
|
$status['code'] = 1; |
| 29 |
|
} else { |
| 30 |
|
//Category update was successful, update history too. |
| 31 |
|
$this->History->userUpdateCategory((int) $id, $category); |
| 32 |
|
} |
| 33 |
|
} |
| 34 |
|
} else { |
| 35 |
|
$status['code'] = 2; |
| 36 |
|
} |
application/models/Tracker/Tracker_List_Model.php 1 location
|
@@ 223-230 (lines=8) @@
|
| 220 |
|
*/ |
| 221 |
|
$status = ['code' => 0]; |
| 222 |
|
|
| 223 |
|
foreach($idList as $id) { |
| 224 |
|
if(!(ctype_digit($id) && $this->deleteByID($this->User->id, (int) $id))) { |
| 225 |
|
$status['code'] = 1; |
| 226 |
|
} else { |
| 227 |
|
//Delete was successful, update history too. |
| 228 |
|
$this->History->userRemoveTitle((int) $id); |
| 229 |
|
} |
| 230 |
|
} |
| 231 |
|
|
| 232 |
|
return $status; |
| 233 |
|
} |