Index: trunk/extensions/SemanticForms/includes/SF_Utils.inc |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | <p style="position: absolute; left: 45%; top: 45%;"><img src="$sfgScriptPath/skins/loading.gif" /></p> |
78 | 78 | |
79 | 79 | END; |
80 | | - $form_body = ' ' . Xml::element('input', array('type' => 'hidden', 'name' => 'wpTextbox1', 'id' => 'wpTextbox1', 'value' => $page_contents), null) . "\n"; |
| 80 | + $form_body = ' ' . Xml::tags('input', array('type' => 'hidden', 'name' => 'wpTextbox1', 'id' => 'wpTextbox1', 'value' => $page_contents), null) . "\n"; |
81 | 81 | $form_body .= ' ' . Xml::element('input', array('type' => 'hidden', 'name' => 'wpSummary', 'value' => $edit_summary), null) . "\n"; |
82 | 82 | $form_body .= ' ' . Xml::element('input', array('type' => 'hidden', 'name' => 'wpStarttime', 'value' => $start_time), null) . "\n"; |
83 | 83 | $form_body .= ' ' . Xml::element('input', array('type' => 'hidden', 'name' => 'wpEdittime', 'value' => $edit_time), null) . "\n"; |
— | — | @@ -245,7 +245,7 @@ |
246 | 246 | global $sfgMaxAutocompleteValues; |
247 | 247 | |
248 | 248 | $db = wfGetDB( DB_SLAVE ); |
249 | | - $fname = "SFUtils;:getAllPagesForCategory"; |
| 249 | + $fname = "SFUtils::getAllPagesForCategory"; |
250 | 250 | $top_category = str_replace(' ', '_', $top_category); |
251 | 251 | $categories = array($top_category); |
252 | 252 | $checkcategories = array($top_category); |
— | — | @@ -265,7 +265,8 @@ |
266 | 266 | array('categorylinks', 'page'), |
267 | 267 | array('page_title', 'page_namespace'), |
268 | 268 | array('cl_from = page_id', $conditions), |
269 | | - $fname); |
| 269 | + $fname, |
| 270 | + 'SORT BY cl_sortkey'); |
270 | 271 | if ($res) { |
271 | 272 | while ($res && $row = $db->fetchRow($res)) { |
272 | 273 | if (array_key_exists('page_title', $row)) { |
— | — | @@ -293,14 +294,12 @@ |
294 | 295 | } |
295 | 296 | } |
296 | 297 | if (count($newcategories) == 0) { |
297 | | - sort($pages); |
298 | 298 | return $pages; |
299 | 299 | } else { |
300 | 300 | $categories = array_merge($categories, $newcategories); |
301 | 301 | } |
302 | 302 | $checkcategories = array_diff($newcategories, array()); |
303 | 303 | } |
304 | | - sort($pages); |
305 | 304 | return $pages; |
306 | 305 | } |
307 | 306 | |
— | — | @@ -330,6 +329,7 @@ |
331 | 330 | while ($res = $query_result->getNext()) { |
332 | 331 | $pages[] = $res[0]->getNextText(SMW_OUTPUT_WIKI); |
333 | 332 | } |
| 333 | + sort($pages); |
334 | 334 | return $pages; |
335 | 335 | } |
336 | 336 | |