]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Merge pull request #274 from NumEricR/select-theme
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Wed, 9 Oct 2013 06:33:48 +0000 (23:33 -0700)
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>
Wed, 9 Oct 2013 06:33:48 +0000 (23:33 -0700)
Update select theme filter and sort names (dev branch PR)

inc/poche/Poche.class.php

index 5299e374b7dc30c83f13f3bb4d9f47d461ea614d..806da54b64cdcbf044107f86ae20e2414d52d03a 100644 (file)
@@ -275,7 +275,7 @@ class Poche
         while (($theme = readdir($handle)) !== false) {
             # Themes are stored in a directory, so all directory names are themes
             # @todo move theme installation data to database
-            if (! is_dir(THEME . '/' . $theme) || in_array($theme, array('..', '.', '.git'))) {
+            if (! is_dir(THEME . '/' . $theme) || in_array($theme, array('..', '.'))) {
                 continue;
             }
             
@@ -288,6 +288,7 @@ class Poche
             $themes[] = array('name' => $theme, 'current' => $current);
         }
         
+        sort($themes);
         return $themes;
     }