diff options
-rw-r--r-- | modules/gallery/controllers/admin_identity.php | 3 | ||||
-rw-r--r-- | modules/gallery/controllers/albums.php | 2 | ||||
-rw-r--r-- | modules/gallery/controllers/login.php | 6 | ||||
-rw-r--r-- | modules/gallery/helpers/login.php | 2 | ||||
-rw-r--r-- | modules/gallery/views/maintenance.html.php | 2 | ||||
-rw-r--r-- | modules/user/helpers/user.php | 11 |
6 files changed, 7 insertions, 19 deletions
diff --git a/modules/gallery/controllers/admin_identity.php b/modules/gallery/controllers/admin_identity.php index dcc3edcb..520b1966 100644 --- a/modules/gallery/controllers/admin_identity.php +++ b/modules/gallery/controllers/admin_identity.php @@ -45,7 +45,7 @@ class Admin_Identity_Controller extends Admin_Controller { if ($new_provider != $active_provider) { - module::event("pre_identity_change", $active_provider, $new_provider); + module::event("identity_before_change", $active_provider, $new_provider); module::deactivate($active_provider); module::uninstall($active_provider); @@ -57,7 +57,6 @@ class Admin_Identity_Controller extends Admin_Controller { module::install($new_provider); module::activate($new_provider); - // @todo this type of collation is questionable from an i18n perspective message::success(t("Changed to %description", array("description" => $providers->$new_provider))); diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php index 24ceb0c9..d393422e 100644 --- a/modules/gallery/controllers/albums.php +++ b/modules/gallery/controllers/albums.php @@ -29,7 +29,7 @@ class Albums_Controller extends Items_Controller { $view = new Theme_View("page.html", "login"); $view->page_title = t("Log in to Gallery"); $view->content = new View("login_ajax.html"); - $view->content->form = login::get_login_form("login/auth_html"); + $view->content->form = login::get_form("login/auth_html"); print $view; return; } else { diff --git a/modules/gallery/controllers/login.php b/modules/gallery/controllers/login.php index 86e2b0a4..720e6375 100644 --- a/modules/gallery/controllers/login.php +++ b/modules/gallery/controllers/login.php @@ -21,7 +21,7 @@ class Login_Controller extends Controller { public function ajax() { $view = new View("login_ajax.html"); - $view->form = login::get_login_form("login/auth_ajax"); + $view->form = login::get_form("login/auth_ajax"); print $view; } @@ -40,7 +40,7 @@ class Login_Controller extends Controller { } public function html() { - print login::get_login_form("login/auth_html"); + print login::get_form("login/auth_html"); } public function auth_html() { @@ -55,7 +55,7 @@ class Login_Controller extends Controller { } private function _auth($url) { - $form = login::get_login_form($url); + $form = login::get_form($url); $valid = $form->validate(); if ($valid) { $user = identity::lookup_user_by_name($form->login->inputs["name"]->value); diff --git a/modules/gallery/helpers/login.php b/modules/gallery/helpers/login.php index d44153ad..cb961604 100644 --- a/modules/gallery/helpers/login.php +++ b/modules/gallery/helpers/login.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class login_Core { - static function get_login_form($url) { + static function get_form($url) { $form = new Forge($url, "", "post", array("id" => "g-login-form")); $form->set_attr('class', "g-narrow"); $group = $form->group("login")->label(t("Login")); diff --git a/modules/gallery/views/maintenance.html.php b/modules/gallery/views/maintenance.html.php index 0aeaaec2..55395b73 100644 --- a/modules/gallery/views/maintenance.html.php +++ b/modules/gallery/views/maintenance.html.php @@ -43,7 +43,7 @@ <p> <?= t("This site is currently only accessible by site administrators.") ?> </p> - <?= login::get_login_form("login/auth_html") ?> + <?= login::get_form("login/auth_html") ?> </body> </html> diff --git a/modules/user/helpers/user.php b/modules/user/helpers/user.php index 47f57d3d..f67429c7 100644 --- a/modules/user/helpers/user.php +++ b/modules/user/helpers/user.php @@ -24,17 +24,6 @@ * Note: by design, this class does not do any permission checking. */ class user_Core { - static function get_login_form($url) { - $form = new Forge($url, "", "post", array("id" => "g-login-form")); - $form->set_attr('class', "g-one-quarter"); - $group = $form->group("login")->label(t("Login")); - $group->input("name")->label(t("Username"))->id("g-username")->class(null); - $group->password("password")->label(t("Password"))->id("g-password")->class(null); - $group->inputs["name"]->error_messages("invalid_login", t("Invalid name or password")); - $group->submit("")->value(t("Login")); - return $form; - } - /** * Make sure that we have a session and group_ids cached in the session. */ |