]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Better list-unwrapping in MoreMenu
authorEvan Prodromou <evan@status.net>
Tue, 23 Aug 2011 04:32:46 +0000 (00:32 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 23 Aug 2011 04:32:46 +0000 (00:32 -0400)
lib/moremenu.php

index 8aed58a921aadbf57b6f8383e25a677880773888..3562ac41485bd77338b269bd23f48ec6db894205 100644 (file)
@@ -101,7 +101,12 @@ class MoreMenu extends Menu
                 $extended = array_slice($items, self::SOFT_MAX, self::HARD_MAX - self::SOFT_MAX);
 
                 foreach ($extended as $item) {
-                    list($actionName, $args, $label, $description, $id) = $item;
+                       if (count($item) == 5) {
+                               list($actionName, $args, $label, $description, $id) = $item;
+                       } else {
+                               list($actionName, $args, $label, $description) = $item;
+                               $id = null;                 
+                       }
                     $this->item($actionName, $args, $label, $description, $id, 'extended_menu');
                 }
 
@@ -109,7 +114,12 @@ class MoreMenu extends Menu
                     $seeAll = $this->seeAllItem();
 
                     if (!empty($seeAll)) {
-                        list($actionName, $args, $label, $description, $id) = $seeAll;
+                               if (count($seeAll) == 5) {
+                                       list($actionName, $args, $label, $description, $id) = $seeAll;
+                               } else {
+                                       list($actionName, $args, $label, $description) = $seeAll;
+                                       $id = null;                 
+                               }
                         $this->item($actionName, $args, $label, $description, $id, 'extended_menu see_all');
                     }
                 }