| 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)
|
| Line | |
|---|
| 1 | <?php |
|---|
| 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 | */ |
|---|
| 11 | |
|---|
| 12 | if (!defined('DC_CONTEXT_ADMIN')) {return;} |
|---|
| 13 | |
|---|
| 14 | $is_admin = $core->auth->check('admin,contentadmin', $core->blog->id) || $core->auth->isSuperAdmin(); |
|---|
| 15 | |
|---|
| 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.php'; |
|---|
Note: See
TracBrowser
for help on using the repository browser.