Browse Source

Sort contents by flag

master
Chris Smith 13 years ago
parent
commit
afad57563e
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      www/test.php

+ 7
- 1
www/test.php View File

@@ -29,7 +29,13 @@
29 29
    $res->contents = array();
30 30
 
31 31
    foreach($asset->contents as $content) {
32
-    $res->contents[] = getAsset($content);
32
+    $child = getAsset($content);
33
+
34
+    if (!isset($res->contents[$child->flag->name])) {
35
+     $res->contents[$child->flag->name] = array();
36
+    }
37
+
38
+    $res->contents[$child->flag->name][] = $child;
33 39
    }
34 40
   }
35 41
 

Loading…
Cancel
Save