summaryrefslogtreecommitdiff
path: root/core/controllers
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2009-02-12 02:51:44 +0000
committerAndy Staudacher <andy.st@gmail.com>2009-02-12 02:51:44 +0000
commit989c24dc996f9cd29cf660662476fc26c77ba835 (patch)
tree5a8020cfb27a5e63a4accad63bd103b0b1342137 /core/controllers
parentc69b483e34ad80bde06007a0588aa5906f09424e (diff)
Move l10n enable/disable option to Options menu.
Only available to admins at this point.
Diffstat (limited to 'core/controllers')
-rw-r--r--core/controllers/l10n_client.php11
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");