Explorar el Código

Sort contents by flag

master
Chris Smith hace 13 años
padre
commit
afad57563e
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7
    1
      www/test.php

+ 7
- 1
www/test.php Ver fichero

@@ -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…
Cancelar
Guardar