]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Mapstraction/map.php
Merge remote-tracking branch 'statusnet/180' into statusnet_1.1.x
[quix0rs-gnu-social.git] / plugins / Mapstraction / map.php
index 7dab8e10a9bd0b154e69976275fdbb291f56847c..856e00e159e51d6a81e4a948466a2993c3b666a2 100644 (file)
@@ -22,7 +22,7 @@
  * @category  Mapstraction
  * @package   StatusNet
  * @author    Evan Prodromou <evan@status.net>
- * @copyright 2009 StatusNet, Inc.
+ * @copyright 2009-2011 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link      http://status.net/
  */
@@ -42,8 +42,7 @@ if (!defined('STATUSNET')) {
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
-class MapAction extends OwnerDesignAction
+class MapAction extends Action
 {
     var $profile = null;
     var $page    = null;
@@ -54,7 +53,7 @@ class MapAction extends OwnerDesignAction
         parent::prepare($args);
 
         $nickname_arg = $this->arg('nickname');
-        $nickname     = common_canonical_nickname($nickname_arg);
+        $nickname     = Nickname::normalize($nickname_arg);
 
         // Permanent redirect on non-canonical nickname
 
@@ -70,6 +69,7 @@ class MapAction extends OwnerDesignAction
         $this->user = User::staticGet('nickname', $nickname);
 
         if (!$this->user) {
+            // TRANS: Client error displayed when referring to a non-existing user.
             $this->clientError(_m('No such user.'), 404);
             return false;
         }
@@ -77,6 +77,7 @@ class MapAction extends OwnerDesignAction
         $this->profile = $this->user->getProfile();
 
         if (!$this->profile) {
+            // TRANS: Error message displayed when referring to a user without a profile.
             $this->serverError(_m('User has no profile.'));
             return false;
         }
@@ -116,7 +117,6 @@ class MapAction extends OwnerDesignAction
      *
      * @return boolean event handler return
      */
-
     function showScripts()
     {
         parent::showScripts();