plusieurs auteurs pour les sources
[mw_sourceml] / app / out / default / views / users / morceaux / list.php
index 37e200e..6c30f3f 100644 (file)
@@ -1,21 +1,3 @@
-<?php
-
-  $albums = array();
-  if(isset($_GET[$this->param("groupe")]) && $_GET[$this->param("groupe")] && is_array($this->out["albums"][$_GET[$this->param("groupe")]]))
-  { foreach($this->out["albums"][$_GET[$this->param("groupe")]] as $id_album => $album)
-    { $albums[$id_album] = $album;
-    }
-  }
-  else
-  { foreach($this->out["albums"] as $id_groupe => $_albums)
-    { foreach($this->out["albums"][$id_groupe] as $id_album => $album)
-      { $albums[$id_album] = $album;
-      }
-    }
-  }
-
-?>
-
 <h2>Morceaux</h2>
 
 <ul class="buttons">
@@ -41,7 +23,7 @@
     </select>
   </li>
 <?php endif; ?>
-<?php if($albums) : ?>
+<?php if($this->out["albums"]) : ?>
   <li>
     <span id="album_select">
 <?php
@@ -54,7 +36,7 @@
       <option value="<?php echo $this->url("users/morceaux", $url_params) ?>"<?php echo !isset($_GET[$this->param("album")]) ? " selected=\"selected\"" : "" ?>>Tous les morceaux</option>
 <?php $url_params["album"] = ""; ?>
       <option value="<?php echo $this->url("users/morceaux", $url_params) ?>"<?php echo isset($_GET[$this->param("album")]) && !$_GET[$this->param("album")] ? " selected=\"selected\"" : "" ?>>Hors album</option>
-      <?php foreach($albums as $id_album => $album) : $url_params["album"] = $id_album; ?>
+      <?php foreach($this->out["albums"] as $id_album => $album) : $url_params["album"] = $id_album; ?>
       <option value="<?php echo $this->url("users/morceaux", $url_params) ?>"<?php echo $_GET[$this->param("album")] == $id_album ? " selected=\"selected\"" : "" ?>>Album: <?php echo $album["reference"] ? $album["reference"]["titre"] : $album["titre"] ?></option>
       <?php endforeach; ?>
     </select>