source: extensions/CommentEditor/admin/config.tab.php @ 3473

Last change on this file since 3473 was 3462, checked in by Criss, 15 years ago

Display edit block on picture page if request comes from this page
Add simple administration configuration management
Add and remove default configuration from databaseon plugin install / uninstall

  • Property svn:eol-style set to LF
File size: 1.1 KB
Line 
1<?php
2/* $Id: config.tab.php,v 1.1 2009/06/26 08:56:33 Criss Exp $ */
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4check_status(ACCESS_ADMINISTRATOR);
5if (isset($_POST['submit'])) {
6    $new_value = false;
7    if (isset($_POST['ce_display_info'])) {
8        if ("1" == $_POST['ce_display_info']) {
9            $new_value = true;
10        }
11    }
12    $ce_config->setValue(CE_CFG_DISPLAY_INFO, $new_value);
13    $new_value = false;
14    if (isset($_POST['ce_display_error'])) {
15        if ("1" == $_POST['ce_display_error']) {
16            $new_value = true;
17        }
18    }
19    $ce_config->setValue(CE_CFG_DISPLAY_ERROR, $new_value);
20
21
22    // Save config
23    $saved = $ce_config->saveConfig();
24    global $page;
25    if ($saved) {
26        array_push($page['infos'], l10n('ce_config_saved'));
27    } else {
28        array_push($page['errors'], l10n('ce_config_saved_with_errors'));
29    }
30}
31
32$template->assign('display_info',
33  ($ce_config->getValue(CE_CFG_DISPLAY_INFO))? CE_CHECKED:'');
34$template->assign('display_error',
35  ($ce_config->getValue(CE_CFG_DISPLAY_ERROR))? CE_CHECKED:'');
36
37?>
Note: See TracBrowser for help on using the repository browser.