*
* @return boolean success flag
*/
- function prepare($args)
+ function prepare(array $args = array())
{
parent::prepare($args);
// TRANS: Client error displayed when the session token does not match or is not given.
$this->clientError(_('There was a problem with your session token.'.
' Try again, please.'));
- return false;
}
// Only for logged-in users
if (empty($this->user)) {
// TRANS: Error message displayed when trying to perform an action that requires a logged in user.
$this->clientError(_('Not logged in.'));
- return false;
}
$id = $this->arg('peopletag_id');
- $this->peopletag = Profile_list::staticGet('id', $id);
+ $this->peopletag = Profile_list::getKV('id', $id);
if (empty($this->peopletag)) {
- // TRANS: Client error displayed trying to reference a non-existing people tag.
- $this->clientError(_('No such people tag.'));
- return false;
+ // TRANS: Client error displayed trying to reference a non-existing list.
+ $this->clientError(_('No such list.'));
}
$field = $this->arg('field');
// TRANS: Client error displayed when trying to add an unindentified field to profile.
// TRANS: %s is a field name.
$this->clientError(sprintf(_('Unidentified field %s.'), htmlspecialchars($field)), 404);
- return false;
}
$this->field = $field;
* @return void
*/
- function handle($args)
+ function handle()
{
$this->msg = null;
}
}
$this->elementEnd('body');
- $this->elementEnd('html');
+ $this->endHTML();
}
function getResults()
else {
$cnt = $profile->find();
}
- // @todo FIXME: Call-time pass-by-reference has been deprecated.
- Event::handle('EndProfileCompletionSearch', $this, &$profile, $search_engine);
+ Event::handle('EndProfileCompletionSearch', array($this, &$profile, $search_engine));
}
while ($profile->fetch()) {