*
* @return boolean success flag
*/
- function prepare($args)
+ function prepare(array $args=array())
{
if (!parent::prepare($args)) {
return false;
if ($cur->hasBlocked($this->profile)) {
// TRANS: Client error displayed when blocking a user that has already been blocked.
$this->clientError(_('You already blocked that user.'));
- return false;
}
return true;
/**
* Handle request
*
- * Shows a page with list of favorite notices
- *
* @param array $args $_REQUEST args; handled in prepare()
*
* @return void
*/
- function handle($args)
+ function handle(array $args=array())
{
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($this->arg('no')) {
if (!$result) {
// TRANS: Server error displayed when blocking a user fails.
$this->serverError(_('Failed to save block information.'));
- return;
}
}
function defaultReturnTo()
{
$user = common_current_user();
- if ($user) {
+
+ if ($user instanceof User) {
return common_local_url('subscribers',
array('nickname' => $user->nickname));
} else {