Index: trunk/extensions/Collection/Collection.php |
— | — | @@ -228,7 +228,13 @@ |
229 | 229 | function wfAjaxCollectionSetSorting( $items_string ) { |
230 | 230 | $parsed = array(); |
231 | 231 | parse_str( $items_string, &$parsed ); |
232 | | - Collection::setSorting( $parsed['item'] ); |
| 232 | + $items = array(); |
| 233 | + foreach ( $parsed['item'] as $s ) { |
| 234 | + if ( is_numeric( $s ) ) { |
| 235 | + $items[] = intval( $s ); |
| 236 | + } |
| 237 | + } |
| 238 | + Collection::setSorting( $items ); |
233 | 239 | return wfAjaxCollectionGetItemList(); |
234 | 240 | } |
235 | 241 | |
Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -284,6 +284,9 @@ |
285 | 285 | |
286 | 286 | static function renameChapter( $index, $name ) { |
287 | 287 | $collection = $_SESSION['wsCollection']; |
| 288 | + if ( $collection['items'][$index]['type'] != 'chapter ') { |
| 289 | + return; |
| 290 | + } |
288 | 291 | $collection['items'][$index]['title'] = $name; |
289 | 292 | $_SESSION['wsCollection'] = $collection; |
290 | 293 | self::touchSession(); |