- Timestamp:
- 07/07/10 12:00:37 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/www/app/models/worker.php
r329 r386 92 92 WHERE `Factory`.`last_poll` > '$time' 93 93 $sqlWhere 94 ORDER BY `Platform`.`name` ASC, `Application`.`name` ASC, `Worker`.`version` ASC");94 ORDER BY `Platform`.`name` ASC, `Application`.`name` ASC, `Worker`.`version`, `Worker`.`development` ASC"); 95 95 96 96 if (is_array($active)) { 97 foreach ($active as &$app) { 98 $app['id'] = $app['Platform']['id'] . '_' . $app['Doctype']['code'] . '_' . $app['Application']['id'] . '_' 99 . $app['Worker']['version']; 97 $prev_ids = array(); 98 $result = array(); 99 100 foreach ($active as $i => $app) { 101 $active[$i]['id'] = $app['Platform']['id'] . '_' . $app['Doctype']['code'] . '_' . $app['Application']['id'] . '_' 102 . $app['Worker']['version']; 103 104 if (in_array($active[$i]['id'], $prev_ids)) { 105 // This is a development version of the previous application. Don't list it. 106 continue; 107 } 108 $prev_ids[] = $active[$i]['id']; 100 109 101 110 $formats = $this->query("SELECT DISTINCT … … 116 125 AND `DoctypesWorker`.`doctype_id` = '" . $app['Doctype']['id'] . "'"); 117 126 118 $a pp['Format'] = array();127 $active[$i]['Format'] = array(); 119 128 foreach ($formats as $format) { 120 $a pp['Format'][] = $format['Format'];129 $active[$i]['Format'][] = $format['Format']; 121 130 } 131 132 $result[] = $active[$i]; 122 133 } 123 return $active; 134 135 return $result; 124 136 } 125 137 return array();
Note: See TracChangeset
for help on using the changeset viewer.