X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FMapstraction%2Fmap.php;h=856e00e159e51d6a81e4a948466a2993c3b666a2;hb=0b53b6768e03932f4beec6b6655763e6ecedc36d;hp=734e480884a3b4db5ebe94f04f951bfbdc71ae96;hpb=a92228c713c73b4015766b45eecd4769a57ae232;p=quix0rs-gnu-social.git diff --git a/plugins/Mapstraction/map.php b/plugins/Mapstraction/map.php index 734e480884..856e00e159 100644 --- a/plugins/Mapstraction/map.php +++ b/plugins/Mapstraction/map.php @@ -22,7 +22,7 @@ * @category Mapstraction * @package StatusNet * @author Evan Prodromou - * @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/ */ @@ -38,11 +38,11 @@ if (!defined('STATUSNET')) { * @package StatusNet * @author Evan Prodromou * @author Craig Andrews + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org * @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; @@ -53,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 @@ -69,14 +69,16 @@ class MapAction extends OwnerDesignAction $this->user = User::staticGet('nickname', $nickname); if (!$this->user) { - $this->clientError(_('No such user.'), 404); + // TRANS: Client error displayed when referring to a non-existing user. + $this->clientError(_m('No such user.'), 404); return false; } $this->profile = $this->user->getProfile(); if (!$this->profile) { - $this->serverError(_('User has no profile.')); + // TRANS: Error message displayed when referring to a user without a profile. + $this->serverError(_m('User has no profile.')); return false; } @@ -115,7 +117,6 @@ class MapAction extends OwnerDesignAction * * @return boolean event handler return */ - function showScripts() { parent::showScripts(); @@ -142,8 +143,6 @@ class MapAction extends OwnerDesignAction // of refactoring from within a plugin, so I'm just abusing // the ApiAction method. Don't do this unless you're me! - require_once(INSTALLDIR.'/lib/api.php'); - $act = new ApiAction('/dev/null'); $arr = $act->twitterStatusArray($notice, true);