$this->user = User::staticGet('nickname', $nickname);
if (!$this->user) {
- $this->clientError(_('No such user.'), 404);
+ $this->clientError(_m('No such user.'), 404);
return false;
}
$this->profile = $this->user->getProfile();
if (!$this->profile) {
- $this->serverError(_('User has no profile.'));
+ $this->serverError(_m('User has no profile.'));
return false;
}
}
}
- $this->elementStart('script', array('type' => 'text/javascript'));
- $this->raw('/*<![CDATA[*/'); // XHTML compat for Safari
- $this->raw('var _notices = ' . json_encode($jsonArray).'; ');
- $this->raw('showMapstraction($("#map_canvas"),_notices);');
- $this->raw('/*]]>*/'); // XHTML compat for Safari
- $this->elementEnd('script');
+ $this->inlineScript('$(document).ready(function() { '.
+ ' var _notices = ' . json_encode($jsonArray).'; ' .
+ 'showMapstraction($("#map_canvas"), _notices); });');
return true;
}