Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -284,8 +284,10 @@ |
285 | 285 | $pages[] = array( 'title' => $cur_value ); |
286 | 286 | } |
287 | 287 | // return if we've reached the maximum number of allowed values |
288 | | - if ( count( $pages ) > $sfgMaxAutocompleteValues ) |
| 288 | + if ( count( $pages ) > $sfgMaxAutocompleteValues ) { |
| 289 | + sort( $pages ); |
289 | 290 | return $pages; |
| 291 | + } |
290 | 292 | } |
291 | 293 | } |
292 | 294 | } |
— | — | @@ -293,12 +295,14 @@ |
294 | 296 | } |
295 | 297 | } |
296 | 298 | if ( count( $newcategories ) == 0 ) { |
| 299 | + sort( $pages ); |
297 | 300 | return $pages; |
298 | 301 | } else { |
299 | 302 | $categories = array_merge( $categories, $newcategories ); |
300 | 303 | } |
301 | 304 | $checkcategories = array_diff( $newcategories, array() ); |
302 | 305 | } |
| 306 | + sort( $pages ); |
303 | 307 | return $pages; |
304 | 308 | } |
305 | 309 | |
— | — | @@ -388,7 +392,7 @@ |
389 | 393 | * Parse the form definition and store the resulting HTML in the |
390 | 394 | * page_props table, if caching has been specified in LocalSettings.php |
391 | 395 | */ |
392 | | - function cacheFormDefinition( $parser, $text ) { |
| 396 | + static function cacheFormDefinition( $parser, $text ) { |
393 | 397 | global $sfgCacheFormDefinitions; |
394 | 398 | if ( ! $sfgCacheFormDefinitions ) |
395 | 399 | return true; |