- Timestamp:
- 03/14/10 18:30:11 (2 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
common/db/tags.php (modified) (2 diffs)
-
common/tags.php (modified) (1 diff)
-
www/controllers/task.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/common/db/tags.php
r1099 r1106 61 61 // Each parent id appears only once 62 62 function tag_get_parents($tag_ids) { 63 if (count($tag_ids) == 0) { 64 return array(); 65 } 66 63 67 $query = sprintf("SELECT DISTINCT(`parent`) 64 68 FROM ia_tags … … 103 107 // Get a list of tags from a list of tag ids 104 108 function tag_get_by_ids($tag_ids) { 109 if (count($tag_ids) == 0) { 110 return array(); 111 } 112 105 113 $query = sprintf( 106 114 "SELECT `id`, `name`, `type`, `parent` -
trunk/common/tags.php
r1099 r1106 83 83 foreach ($tags_by_id as &$tag) { 84 84 if (!isset($has_parent[$tag["id"]])) { 85 // Set the array for the tags with no parents and no children 86 if (!isset($tag["sub_tags"])) { 87 $tag["sub_tags"] = array(); 88 } 85 89 $roots[] = $tag; 86 90 } -
trunk/www/controllers/task.php
r1099 r1106 284 284 285 285 if (request_is_post()) { 286 $algorithm_tags_id = request("algorithm_tags" );286 $algorithm_tags_id = request("algorithm_tags", array()); 287 287 $method_tags_id = tag_get_parents($algorithm_tags_id); 288 288 289 289 if (!is_array($algorithm_tags_id)) { 290 290 flash_error("Datele trimise sunt invalide. Raporteaza aceasta problema unui admin."); 291 redirect(url_task_edit_tag ($task_id));291 redirect(url_task_edit_tags($task_id)); 292 292 } 293 293 … … 295 295 if (!is_tag_id($tag_id)) { 296 296 flash_error("Datele trimise sunt invalide. Raporteaza aceasta problema unui admin."); 297 redirect(url_task_edit_tag ($task_id));297 redirect(url_task_edit_tags($task_id)); 298 298 } 299 299 } … … 308 308 if ($count != count($algorithm_tags_id)) { 309 309 flash_error("Datele trimise sunt invalide. Raporteaza aceasta problema unui admin."); 310 redirect(url_task_edit_tag ($task_id));310 redirect(url_task_edit_tags($task_id)); 311 311 } 312 312
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)