X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fredirectingaction.php;h=0827f11a0a097ff84e887f47768af3da36c83a21;hb=dd61ae8fbeee64c85f8186672292335592be1ff5;hp=f1158527424f3fd5a1c27739da3fd54d56d0c00e;hpb=3f2c805652cd641f82af41cd5f92cb54d0457a59;p=quix0rs-gnu-social.git diff --git a/lib/redirectingaction.php b/lib/redirectingaction.php index f115852742..0827f11a0a 100644 --- a/lib/redirectingaction.php +++ b/lib/redirectingaction.php @@ -42,23 +42,21 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 * @link http://status.net/ */ - - class RedirectingAction extends Action { - /** * Redirect browser to the page our hidden parameters requested, * or if none given, to the url given by $this->defaultReturnTo(). - * + * * To be called only after successful processing. - * - * @fixme rename this -- it obscures Action::returnToArgs() which - * returns a list of arguments, and is a bit confusing. - * + * + * Note: this was named returnToArgs() up through 0.9.2, which + * caused problems because there's an Action::returnToArgs() + * already which does something different. + * * @return void */ - function returnToArgs() + function returnToPrevious() { // Now, gotta figure where we go back to $action = false; @@ -77,7 +75,7 @@ class RedirectingAction extends Action if ($action) { common_redirect(common_local_url($action, $args, $params), 303); } else { - $url = $this->defaultReturnToUrl(); + $url = $this->defaultReturnTo(); } common_redirect($url, 303); } @@ -86,11 +84,12 @@ class RedirectingAction extends Action * If we reached this form without returnto arguments, where should * we go? May be overridden by subclasses to a reasonable destination * for that action; default implementation throws an exception. - * + * * @return string URL */ function defaultReturnTo() { - $this->clientError(_("No return-to arguments.")); + // TRANS: Client error displayed when return-to was defined without a target. + $this->clientError(_('No return-to arguments.')); } }