mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-22 23:05:18 -04:00
Remove the code to call the controller directly and just use redirect. Now that all the form calls actually return the form as a json object, calling the form creation controller method i no longer required.
This commit is contained in:
@@ -46,10 +46,8 @@ class Reauthenticate_Controller extends Controller {
|
||||
Session::instance()->delete("reauthenticate");
|
||||
if (empty($reauthenticate["in_dialog"])) {
|
||||
message::success(t("Successfully re-authenticated!"));
|
||||
url::redirect($reauthenticate["continue_url"]);
|
||||
} else {
|
||||
self::_call_admin_function($reauthenticate);
|
||||
}
|
||||
url::redirect($reauthenticate["continue_url"]);
|
||||
} else {
|
||||
$name = $user->name;
|
||||
log::warning("user", t("Failed re-authentication for %name", array("name" => $name)));
|
||||
@@ -88,27 +86,6 @@ class Reauthenticate_Controller extends Controller {
|
||||
return $form;
|
||||
}
|
||||
|
||||
private static function _call_admin_function($reauthenticate) {
|
||||
$controller_name = $reauthenticate["controller"];
|
||||
$args = $reauthenticate["args"];
|
||||
if ($controller_name == "index") {
|
||||
$controller_name = "dashboard";
|
||||
}
|
||||
|
||||
$controller_name = "Admin_{$controller_name}_Controller";
|
||||
if ($args) {
|
||||
$method = array_shift($args);
|
||||
} else {
|
||||
$method = "index";
|
||||
}
|
||||
|
||||
if (!method_exists($controller_name, $method)) {
|
||||
throw new Kohana_404_Exception();
|
||||
}
|
||||
|
||||
call_user_func_array(array(new $controller_name, $method), $args);
|
||||
}
|
||||
|
||||
static function valid_password($password_input) {
|
||||
if (!identity::is_correct_password(identity::active_user(), $password_input->value)) {
|
||||
$password_input->add_error("invalid_password", 1);
|
||||
|
||||
Reference in New Issue
Block a user