Revision 2855:e9cd0c9d6560,
1.1 KB
checked in by franck <carnet.franck.paul@…>, 11 years ago
(diff) |
dcCKEditor and dcLegacyEditor may be tuned by admin too, not only super-admin, fixes #2018
|
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_admin = $core->auth->check('admin,contentadmin', $core->blog->id) || $core->auth->isSuperAdmin(); |
---|
16 | |
---|
17 | $core->blog->settings->addNameSpace('dclegacyeditor'); |
---|
18 | $dclegacyeditor_active = $core->blog->settings->dclegacyeditor->active; |
---|
19 | |
---|
20 | if (!empty($_POST['saveconfig'])) { |
---|
21 | try { |
---|
22 | $dclegacyeditor_active = (empty($_POST['dclegacyeditor_active']))?false:true; |
---|
23 | $core->blog->settings->dclegacyeditor->put('active', $dclegacyeditor_active, 'boolean'); |
---|
24 | |
---|
25 | dcPage::addSuccessNotice(__('The configuration has been updated.')); |
---|
26 | http::redirect($p_url); |
---|
27 | } catch(Exception $e) { |
---|
28 | $core->error->add($e->getMessage()); |
---|
29 | } |
---|
30 | } |
---|
31 | |
---|
32 | include dirname(__FILE__).'/tpl/index.tpl'; |
---|
33 | |
---|
Note: See
TracBrowser
for help on using the repository browser.