Commit 52600ce0 authored by Evan Prodromou's avatar Evan Prodromou

trim whitespace

darcs-hash:20080520191412-84dde-a607dbe848279639630edd1ab4616d05cc2318d1.gz
parent 3f5ededc
<?php <?php
/* /*
* Laconica - a distributed open-source microblogging tool * Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc. * Copyright (C) 2008, Controlez-Vous, Inc.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by * it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details. * GNU Affero General Public License for more details.
* *
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
...@@ -24,31 +24,31 @@ require_once(INSTALLDIR.'/actions/showstream.php'); ...@@ -24,31 +24,31 @@ require_once(INSTALLDIR.'/actions/showstream.php');
class AllAction extends ShowstreamAction { class AllAction extends ShowstreamAction {
// XXX: push this up to a common function. // XXX: push this up to a common function.
function show_notices($profile) { function show_notices($profile) {
$notice = DB_DataObject::factory('notice'); $notice = DB_DataObject::factory('notice');
# XXX: chokety and bad # XXX: chokety and bad
$notice->whereAdd('EXISTS (SELECT subscribed from subscription where subscriber = '.$profile->id.' and subscribed = notice.profile_id)', 'OR'); $notice->whereAdd('EXISTS (SELECT subscribed from subscription where subscriber = '.$profile->id.' and subscribed = notice.profile_id)', 'OR');
$notice->whereAdd('profile_id = ' . $profile->id, 'OR'); $notice->whereAdd('profile_id = ' . $profile->id, 'OR');
$notice->orderBy('created DESC'); $notice->orderBy('created DESC');
$page = $this->arg('page') || 1; $page = $this->arg('page') || 1;
$notice->limit((($page-1)*NOTICES_PER_PAGE), NOTICES_PER_PAGE); $notice->limit((($page-1)*NOTICES_PER_PAGE), NOTICES_PER_PAGE);
$notice->find(); $notice->find();
common_element_start('div', 'notices'); common_element_start('div', 'notices');
common_element('h2', 'notices', _t('Notices')); common_element('h2', 'notices', _t('Notices'));
while ($notice->fetch()) { while ($notice->fetch()) {
$this->show_notice($notice); $this->show_notice($notice);
} }
# XXX: show a link for the next page # XXX: show a link for the next page
common_element_end('div'); common_element_end('div');
} }
......
...@@ -129,7 +129,7 @@ class AvatarAction extends SettingsAction { ...@@ -129,7 +129,7 @@ class AvatarAction extends SettingsAction {
$avatar->created = DB_DataObject_Cast::dateTime(); # current time $avatar->created = DB_DataObject_Cast::dateTime(); # current time
$val = $avatar->validate(); $val = $avatar->validate();
if ($val !== TRUE) { if ($val !== TRUE) {
$err = ''; $err = '';
foreach ($val as $k=>$v) { foreach ($val as $k=>$v) {
...@@ -138,7 +138,7 @@ class AvatarAction extends SettingsAction { ...@@ -138,7 +138,7 @@ class AvatarAction extends SettingsAction {
return; return;
} }
} }
foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) { foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) {
$scaled[] = $this->scale_avatar($user, $avatar, $size); $scaled[] = $this->scale_avatar($user, $avatar, $size);
} }
......
<?php <?php
/* /*
* Laconica - a distributed open-source microblogging tool * Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc. * Copyright (C) 2008, Controlez-Vous, Inc.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by * it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details. * GNU Affero General Public License for more details.
* *
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
if (!defined('LACONICA')) { exit(1); } if (!defined('LACONICA')) { exit(1); }
class LoginAction extends Action { class LoginAction extends Action {
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);
if (common_logged_in()) { if (common_logged_in()) {
...@@ -43,7 +43,7 @@ class LoginAction extends Action { ...@@ -43,7 +43,7 @@ class LoginAction extends Action {
common_server_error(_t('Error setting user.')); common_server_error(_t('Error setting user.'));
return; return;
} }
# success! # success!
common_redirect(common_local_url('all', common_redirect(common_local_url('all',
array('nickname' => array('nickname' =>
$nickname))); $nickname)));
...@@ -51,9 +51,9 @@ class LoginAction extends Action { ...@@ -51,9 +51,9 @@ class LoginAction extends Action {
$this->show_form(_t('Incorrect username or password.')); $this->show_form(_t('Incorrect username or password.'));
} }
} }
function show_form($error=NULL) { function show_form($error=NULL) {
common_show_header(_t('Login')); common_show_header(_t('Login'));
if (!is_null($error)) { if (!is_null($error)) {
common_element('div', array('class' => 'error'), $msg); common_element('div', array('class' => 'error'), $msg);
......
<?php <?php
/* /*
* Laconica - a distributed open-source microblogging tool * Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc. * Copyright (C) 2008, Controlez-Vous, Inc.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by * it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details. * GNU Affero General Public License for more details.
* *
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
......
<?php <?php
/* /*
* Laconica - a distributed open-source microblogging tool * Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc. * Copyright (C) 2008, Controlez-Vous, Inc.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by * it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details. * GNU Affero General Public License for more details.
* *
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
if (!defined('LACONICA')) { exit(1); } if (!defined('LACONICA')) { exit(1); }
class NewnoticeAction extends Action { class NewnoticeAction extends Action {
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);
# XXX: Ajax! # XXX: Ajax!
...@@ -40,7 +40,7 @@ class NewnoticeAction extends Action { ...@@ -40,7 +40,7 @@ class NewnoticeAction extends Action {
$this->show_form(); $this->show_form();
} }
} }
function save_new_notice() { function save_new_notice() {
$user = common_current_user(); $user = common_current_user();
assert($user); # XXX: maybe an error instead... assert($user); # XXX: maybe an error instead...
...@@ -49,7 +49,7 @@ class NewnoticeAction extends Action { ...@@ -49,7 +49,7 @@ class NewnoticeAction extends Action {
$notice->profile_id = $user->id; # user id *is* profile id $notice->profile_id = $user->id; # user id *is* profile id
$notice->created = DB_DataObject_Cast::dateTime(); $notice->created = DB_DataObject_Cast::dateTime();
$notice->content = trim($this->arg('content')); $notice->content = trim($this->arg('content'));
$val = $notice->validate(); $val = $notice->validate();
if ($val === TRUE) { if ($val === TRUE) {
return $notice->insert(); return $notice->insert();
...@@ -58,7 +58,7 @@ class NewnoticeAction extends Action { ...@@ -58,7 +58,7 @@ class NewnoticeAction extends Action {
return NULL; return NULL;
} }
} }
function show_form() { function show_form() {
common_show_header(_t('New notice')); common_show_header(_t('New notice'));
common_element_start('form', array('id' => 'newnotice', 'method' => 'POST', common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
......
...@@ -69,7 +69,7 @@ class PasswordAction extends SettingsAction { ...@@ -69,7 +69,7 @@ class PasswordAction extends SettingsAction {
$this->show_form(_t('Error saving user; invalid.')); $this->show_form(_t('Error saving user; invalid.'));
return; return;
} }
if (!$user->update($original)) { if (!$user->update($original)) {
common_server_error(_t('Can\'t save new password.')); common_server_error(_t('Can\'t save new password.'));
return; return;
......
...@@ -76,7 +76,7 @@ class ProfilesettingsAction extends SettingsAction { ...@@ -76,7 +76,7 @@ class ProfilesettingsAction extends SettingsAction {
$this->show_form(_t('Error saving user; invalid.')); $this->show_form(_t('Error saving user; invalid.'));
return; return;
} }
if (!$user->update($original)) { if (!$user->update($original)) {
common_server_error(_t('Couldnt update user.')); common_server_error(_t('Couldnt update user.'));
return; return;
...@@ -99,7 +99,7 @@ class ProfilesettingsAction extends SettingsAction { ...@@ -99,7 +99,7 @@ class ProfilesettingsAction extends SettingsAction {
$this->show_form(_t('Error saving profile; invalid.')); $this->show_form(_t('Error saving profile; invalid.'));
return; return;
} }
if (!$profile->update($orig_profile)) { if (!$profile->update($orig_profile)) {
common_server_error(_t('Couldnt save profile.')); common_server_error(_t('Couldnt save profile.'));
return; return;
......
<?php <?php
/* /*
* Laconica - a distributed open-source microblogging tool * Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc. * Copyright (C) 2008, Controlez-Vous, Inc.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by * it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details. * GNU Affero General Public License for more details.
* *
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
......
<?php <?php
/* /*
* Laconica - a distributed open-source microblogging tool * Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc. * Copyright (C) 2008, Controlez-Vous, Inc.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by * it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details. * GNU Affero General Public License for more details.
* *
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
...@@ -20,10 +20,10 @@ ...@@ -20,10 +20,10 @@
if (!defined('LACONICA')) { exit(1); } if (!defined('LACONICA')) { exit(1); }
class RegisterAction extends Action { class RegisterAction extends Action {
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);
if (common_logged_in()) { if (common_logged_in()) {
common_user_error(_t('Already logged in.')); common_user_error(_t('Already logged in.'));
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') { } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
...@@ -40,10 +40,10 @@ class RegisterAction extends Action { ...@@ -40,10 +40,10 @@ class RegisterAction extends Action {
$email = $this->arg('email'); $email = $this->arg('email');
# Input scrubbing # Input scrubbing
$nickname = common_canonical_nickname($nickname); $nickname = common_canonical_nickname($nickname);
$email = common_canonical_email($email); $email = common_canonical_email($email);
if ($this->nickname_exists($nickname)) { if ($this->nickname_exists($nickname)) {
$this->show_form(_t('Username already exists.')); $this->show_form(_t('Username already exists.'));
} else if ($this->email_exists($email)) { } else if ($this->email_exists($email)) {
...@@ -63,14 +63,14 @@ class RegisterAction extends Action { ...@@ -63,14 +63,14 @@ class RegisterAction extends Action {
} }
# checks if *CANONICAL* nickname exists # checks if *CANONICAL* nickname exists
function nickname_exists($nickname) { function nickname_exists($nickname) {
$user = User::staticGet('nickname', $nickname); $user = User::staticGet('nickname', $nickname);
return ($user !== false); return ($user !== false);
} }
# checks if *CANONICAL* email exists # checks if *CANONICAL* email exists
function email_exists($email) { function email_exists($email) {
$email = common_canonical_email($email); $email = common_canonical_email($email);
$user = User::staticGet('email', $email); $user = User::staticGet('email', $email);
...@@ -83,7 +83,7 @@ class RegisterAction extends Action { ...@@ -83,7 +83,7 @@ class RegisterAction extends Action {
$profile->nickname = $nickname; $profile->nickname = $nickname;
$profile->profileurl = common_profile_url($nickname); $profile->profileurl = common_profile_url($nickname);
$profile->created = DB_DataObject_Cast::dateTime(); # current time $profile->created = DB_DataObject_Cast::dateTime(); # current time
$val = $profile->validate(); $val = $profile->validate();
if ($val !== TRUE) { if ($val !== TRUE) {
# XXX: some feedback here, please! # XXX: some feedback here, please!
...@@ -99,7 +99,7 @@ class RegisterAction extends Action { ...@@ -99,7 +99,7 @@ class RegisterAction extends Action {
$user->password = common_munge_password($password, $id); $user->password = common_munge_password($password, $id);
$user->email = $email; $user->email = $email;
$user->created = DB_DataObject_Cast::dateTime(); # current time $user->created = DB_DataObject_Cast::dateTime(); # current time
$val = $user->validate(); $val = $user->validate();
if ($val !== TRUE) { if ($val !== TRUE) {
# XXX: some feedback here, please! # XXX: some feedback here, please!
...@@ -107,7 +107,7 @@ class RegisterAction extends Action { ...@@ -107,7 +107,7 @@ class RegisterAction extends Action {
$profile->delete(); $profile->delete();
return FALSE; return FALSE;
} }
$result = $user->insert(); $result = $user->insert();
if (!$result) { if (!$result) {
# Try to clean up... # Try to clean up...
...@@ -115,9 +115,9 @@ class RegisterAction extends Action { ...@@ -115,9 +115,9 @@ class RegisterAction extends Action {
} }
return $result; return $result;
} }
function show_form($error=NULL) { function show_form($error=NULL) {
common_show_header(_t('Register')); common_show_header(_t('Register'));
common_element_start('form', array('method' => 'POST', common_element_start('form', array('method' => 'POST',
'id' => 'login', 'id' => 'login',
......
<?php <?php
/* /*
* Laconica - a distributed open-source microblogging tool * Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc. * Copyright (C) 2008, Controlez-Vous, Inc.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by * it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details. * GNU Affero General Public License for more details.
* *
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
...@@ -33,20 +33,20 @@ class ShownoticeAction extends Action { ...@@ -33,20 +33,20 @@ class ShownoticeAction extends Action {
if (!$notice->getProfile()) { if (!$notice->getProfile()) {
$this->no_such_notice(); $this->no_such_notice();
} }
# Looks like we're good; show the header # Looks like we're good; show the header
common_show_header($profile->nickname." status on ".$notice->created); common_show_header($profile->nickname." status on ".$notice->created);
$this->show_notice($notice); $this->show_notice($notice);
common_show_footer(); common_show_footer();
} }
function no_such_notice() { function no_such_notice() {
common_user_error('No such notice.'); common_user_error('No such notice.');
} }
function show_notice($notice) { function show_notice($notice) {
$profile = $notice->getProfile(); $profile = $notice->getProfile();
# XXX: RDFa # XXX: RDFa
...@@ -57,13 +57,13 @@ class ShownoticeAction extends Action { ...@@ -57,13 +57,13 @@ class ShownoticeAction extends Action {
'class' => 'avatar profile', 'class' => 'avatar profile',
'width' => AVATAR_PROFILE_SIZE, 'width' => AVATAR_PROFILE_SIZE,
'height' => AVATAR_PROFILE_SIZE, 'height' => AVATAR_PROFILE_SIZE,
'alt' => 'alt' =>
($profile->fullname) ? $profile->fullname : ($profile->fullname) ? $profile->fullname :
$profile->nickname)); $profile->nickname));
} }
common_element('a', array('href' => $profile->profileurl, common_element('a', array('href' => $profile->profileurl,
'class' => 'nickname', 'class' => 'nickname',
'title' => 'title' =>
($profile->fullname) ? $profile->fullname : ($profile->fullname) ? $profile->fullname :
$profile->nickname), $profile->nickname),
$profile->nickname); $profile->nickname);
......
<?php <?php
/* /*
* Laconica - a distributed open-source microblogging tool * Laconica - a distributed open-source microblogging tool
* Copyright (C) 2008, Controlez-Vous, Inc. * Copyright (C) 2008, Controlez-Vous, Inc.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by * it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details. * GNU Affero General Public License for more details.
* *
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
...@@ -22,47 +22,47 @@ if (!defined('LACONICA')) { exit(1); } ...@@ -22,47 +22,47 @@ if (!defined('LACONICA')) { exit(1); }
class SubscribeAction extends Action { class SubscribeAction extends Action {
function handle($args) { function handle($args) {
parent::handle($args); parent::handle($args);
if (!common_logged_in()) { if (!common_logged_in()) {
common_user_error(_t('Not logged in.')); common_user_error(_t('Not logged in.'));
return; return;
} }
$other_nickname = $this->arg('subscribeto'); $other_nickname = $this->arg('subscribeto');
$other = User::staticGet('nickname', $other_nickname); $other = User::staticGet('nickname', $other_nickname);
if (!$other) { if (!$other) {
common_user_error(_t('No such user.')); common_user_error(_t('No such user.'));
return; return;
} }