]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Directory/actions/userdirectory.php
copy-paste TagSub to SearchSub :D
[quix0rs-gnu-social.git] / plugins / Directory / actions / userdirectory.php
index 20ec5c19e327205d1bd5ea33fcdb2be9896729e3..85835e2c1f85b3e70bddfe6f54c9f06e2ed62736 100644 (file)
@@ -187,18 +187,6 @@ class UserdirectoryAction extends Action
         $this->elementEnd('div');
     }
 
-    /**
-     * Local navigation
-     *
-     * This page is part of the public group, so show that.
-     *
-     * @return void
-     */
-    function showLocalNav()
-    {
-        $nav = new PublicGroupNav($this);
-        $nav->show();
-    }
 
     /**
      * Content area
@@ -213,7 +201,7 @@ class UserdirectoryAction extends Action
 
         $this->elementStart('div', array('id' => 'user_directory'));
 
-        $alphaNav = new AlphaNav($this, true, array('All'));
+        $alphaNav = new AlphaNav($this, false, false, array('0-9', 'All'));
         $alphaNav->show();
 
         $profile = null;
@@ -320,7 +308,16 @@ class UserdirectoryAction extends Action
             $sort   = $this->getSortKey();
             $sql    = 'SELECT profile.* FROM profile, user WHERE profile.id = user.id';
 
-            if ($this->filter != 'all') {
+            switch($this->filter)
+            {
+            case 'all':
+                // NOOP
+                break;
+            case '0-9':
+                $sql .=
+                    '  AND LEFT(profile.nickname, 1) BETWEEN \'0\' AND \'9\'';
+                break;
+            default:
                 $sql .= sprintf(
                     ' AND LEFT(LOWER(profile.nickname), 1) = \'%s\'',
                     $this->filter