diff options
Diffstat (limited to 'core/controllers/l10n_client.php')
-rw-r--r-- | core/controllers/l10n_client.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/controllers/l10n_client.php b/core/controllers/l10n_client.php index 41e05c98..3e95248a 100644 --- a/core/controllers/l10n_client.php +++ b/core/controllers/l10n_client.php @@ -20,6 +20,7 @@ class L10n_Client_Controller extends Controller { public function save($string) { access::verify_csrf(); + user::active()->admin or access::forbidden(); $input = Input::instance(); $message = $input->post("l10n-message-source"); @@ -55,6 +56,16 @@ class L10n_Client_Controller extends Controller { print json_encode(new stdClass()); } + public function toggle_l10n_mode() { + access::verify_csrf(); + + $session = Session::instance(); + $session->set("l10n_mode", + !$session->get("l10n_mode", false)); + + url::redirect(url::site("albums/1")); + } + private static function _l10n_client_form() { $form = new Forge("l10n_client/save", "", "post", array("id" => "gL10nClientSaveForm")); $group = $form->group("l10n_message"); |