summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-07-15 14:57:43 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-07-15 14:57:43 -0700
commit993e041274362ddec68ddf4566c72913464de504 (patch)
tree3f4843f55e4534eed94bff7566b5fd1d22d760b1
parent155d2b809b5d416f39bc71ce10c2704b886eccef (diff)
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.
-rw-r--r--modules/gallery/controllers/reauthenticate.php25
1 files changed, 1 insertions, 24 deletions
diff --git a/modules/gallery/controllers/reauthenticate.php b/modules/gallery/controllers/reauthenticate.php
index 29387536..7378ea73 100644
--- a/modules/gallery/controllers/reauthenticate.php
+++ b/modules/gallery/controllers/reauthenticate.php
@@ -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);