Revision 2614:db6f6a1f4f25,
1.0 KB
checked in by Nicolas <nikrou77@…>, 12 years ago
(diff) |
Move legacy editor to a plugin. First step for alternate editors.
Addresses #1896
|
Line | |
---|
1 | <?php |
---|
2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
3 | # |
---|
4 | # This file is part of Dotclear 2. |
---|
5 | # |
---|
6 | # Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear |
---|
7 | # Licensed under the GPL version 2.0 license. |
---|
8 | # See LICENSE file or |
---|
9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
10 | # |
---|
11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
12 | |
---|
13 | if (!defined('DC_CONTEXT_ADMIN')) { return; } |
---|
14 | |
---|
15 | $is_super_admin = $core->auth->isSuperAdmin(); |
---|
16 | $core->blog->settings->addNameSpace('dclegacyeditor'); |
---|
17 | $dclegacyeditor_active = $core->blog->settings->dclegacyeditor->active; |
---|
18 | |
---|
19 | if (!empty($_POST['saveconfig'])) { |
---|
20 | try { |
---|
21 | $dclegacyeditor_active = (empty($_POST['dclegacyeditor_active']))?false:true; |
---|
22 | $core->blog->settings->dclegacyeditor->put('active', $dclegacyeditor_active, 'boolean'); |
---|
23 | |
---|
24 | dcPage::addSuccessNotice(__('The configuration has been updated.')); |
---|
25 | http::redirect($p_url); |
---|
26 | } catch(Exception $e) { |
---|
27 | $core->error->add($e->getMessage()); |
---|
28 | } |
---|
29 | } |
---|
30 | |
---|
31 | include dirname(__FILE__).'/tpl/index.tpl'; |
---|
32 | |
---|
Note: See
TracBrowser
for help on using the repository browser.