]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't add empty classes to menu items
authorEvan Prodromou <evan@status.net>
Wed, 6 Jul 2011 15:18:53 +0000 (11:18 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 6 Jul 2011 15:18:53 +0000 (11:18 -0400)
lib/action.php

index 21e5f78db13567c0e406c922ca77382c2e62d54b..d63569cba3596b55fd2e4276216c227985ba72bf 100644 (file)
@@ -1360,9 +1360,13 @@ class Action extends HTMLOutputter // lawsuit
             $classes[] = 'current';
         }
 
-        $lattrs['class'] = implode(' ', $classes);
+        if (!empty($classes)) {
+            $lattrs['class'] = implode(' ', $classes);
+        }
 
-        (is_null($id)) ? $lattrs : $lattrs['id'] = $id;
+        if (!is_null($id)) {
+            $lattrs['id'] = $id;
+        }
 
         $this->elementStart('li', $lattrs);
         $attrs['href'] = $url;