File dashboard.php changed (mode: 100644) (index b7bd7e6..467cef7) |
... |
... |
function displayDashboard() |
56 |
56 |
function printBuildTable($buildsets, $builders) |
function printBuildTable($buildsets, $builders) |
57 |
57 |
{ |
{ |
58 |
58 |
// sort builders by their name |
// sort builders by their name |
59 |
|
ksort($builders); |
|
|
59 |
|
uksort($builders, "builderCmp"); |
60 |
60 |
|
|
61 |
61 |
// output table header |
// output table header |
62 |
62 |
print '<table class="dashboard"><tr><td></td>' . "\n"; |
print '<table class="dashboard"><tr><td></td>' . "\n"; |
|
... |
... |
function printBuildTable($buildsets, $builders) |
100 |
100 |
print "</table>\n"; |
print "</table>\n"; |
101 |
101 |
} |
} |
102 |
102 |
|
|
|
103 |
|
/** |
|
104 |
|
* @brief Custom key comparison function. |
|
105 |
|
* |
|
106 |
|
* Treats keys with slashes in them as greater than other keys. |
|
107 |
|
* |
|
108 |
|
* @param a First key. |
|
109 |
|
* @param b Second key. |
|
110 |
|
* |
|
111 |
|
* @returns Value less than, equal to or greater than zero to indicate order. |
|
112 |
|
*/ |
|
113 |
|
function builderCmp($a, $b) |
|
114 |
|
{ |
|
115 |
|
$condA = (strpos($a, '/') !== false); |
|
116 |
|
$condB = (strpos($b, '/') !== false); |
|
117 |
|
if ($condA ^ $condB) { |
|
118 |
|
return $condA ? 1 : -1; |
|
119 |
|
} |
|
120 |
|
return strcmp($a, $b); |
|
121 |
|
} |
|
122 |
|
|
103 |
123 |
/** |
/** |
104 |
124 |
* @brief Checks whether particular status has associated output. |
* @brief Checks whether particular status has associated output. |
105 |
125 |
* |
* |