Revision 3875:cb0f24701f13,
943 bytes
checked in by franck <carnet.franck.paul@…>, 7 years ago
(diff) |
Switch .tpl extensions to .php for some included "template" (coded in HTML/PHP)
|
Rev | Line | |
---|
[2614] | 1 | <?php |
---|
[3731] | 2 | /** |
---|
| 3 | * @brief dcLegacyEditor, a plugin for Dotclear 2 |
---|
| 4 | * |
---|
| 5 | * @package Dotclear |
---|
| 6 | * @subpackage Plugins |
---|
| 7 | * |
---|
| 8 | * @copyright Olivier Meunier & Association Dotclear |
---|
| 9 | * @copyright GPL-2.0-only |
---|
| 10 | */ |
---|
[2614] | 11 | |
---|
[3730] | 12 | if (!defined('DC_CONTEXT_ADMIN')) {return;} |
---|
[2614] | 13 | |
---|
[2855] | 14 | $is_admin = $core->auth->check('admin,contentadmin', $core->blog->id) || $core->auth->isSuperAdmin(); |
---|
| 15 | |
---|
[2614] | 16 | $core->blog->settings->addNameSpace('dclegacyeditor'); |
---|
| 17 | $dclegacyeditor_active = $core->blog->settings->dclegacyeditor->active; |
---|
| 18 | |
---|
| 19 | if (!empty($_POST['saveconfig'])) { |
---|
| 20 | try { |
---|
[3730] | 21 | $dclegacyeditor_active = (empty($_POST['dclegacyeditor_active'])) ? false : true; |
---|
[2614] | 22 | $core->blog->settings->dclegacyeditor->put('active', $dclegacyeditor_active, 'boolean'); |
---|
| 23 | |
---|
| 24 | dcPage::addSuccessNotice(__('The configuration has been updated.')); |
---|
| 25 | http::redirect($p_url); |
---|
[3730] | 26 | } catch (Exception $e) { |
---|
| 27 | $core->error->add($e->getMessage()); |
---|
[2614] | 28 | } |
---|
| 29 | } |
---|
| 30 | |
---|
[3875] | 31 | include dirname(__FILE__) . '/tpl/index.php'; |
---|
Note: See
TracBrowser
for help on using the repository browser.