} /* === Hook === */ foreach (cot_getextplugins('admin.config.edit.update.done') as $pl) { include $pl; } /* ===== */ $cache && $cache->clear(); if ($updated) { $errors ? cot_message('adm_partially_updated', 'warning') : cot_message('Updated'); } else { if (!$errors) { cot_message('adm_already_updated'); } } } elseif ($a == 'reset' && !empty($v)) { cot_config_reset($p, $v, $o, ''); $optionslist = cot_config_list($o, $p, ''); /* === Hook === */ foreach (cot_getextplugins('admin.config.edit.reset.done') as $pl) { include $pl; } /* ===== */ $cache && $cache->clear(); cot_redirect(cot_url('admin', array('m' => 'config', 'n' => 'edit', 'o' => $o, 'p' => $p), '', true)); } if ($o == 'core') { $adminpath[] = array(cot_url('admin', 'm=config'), $L['Configuration']); $adminpath[] = array(cot_url('admin', 'm=config&n=edit&o=' . $o . '&p=' . $p), $L['core_' . $p]); } else { $adminpath[] = array(cot_url('admin', 'm=extensions'), $L['Extensions']); $plmod = $o == 'module' ? 'mod' : 'pl';
if (cot_module_active($n)) { $is_module = true; $parse = true; } if (!$parse) { cot_redirect(cot_url('admin', 'm=structure', '', true)); } // Edit structure for a module if (file_exists(cot_incfile($n, $is_module ? 'module' : 'plug'))) { require_once cot_incfile($n, $is_module ? 'module' : 'plug'); } if (empty($adminhelp)) { $adminhelp = $L['adm_help_structure']; } if ($a == 'reset' && !empty($al)) { cot_config_reset($n, $v, $is_module, $al); } if ($a == 'update' && !empty($_POST)) { $editconfig = cot_import('editconfig', 'P', 'TXT'); if (!empty($editconfig)) { $owner = $is_module ? 'module' : 'plug'; $optionslist = cot_config_list($owner, $n, $editconfig); foreach ($optionslist as $key => $val) { $data = cot_import($key, 'P', sizeof($cot_import_filters[$key]) ? $key : 'NOC'); if ($optionslist[$key]['config_value'] != $data) { if (is_null($optionslist[$key]['config_subdefault'])) { $optionslist[$key]['config_value'] = $data; $optionslist[$key]['config_subcat'] = $editconfig; $db->insert($db_config, $optionslist[$key]); } else { $db->update($db_config, array('config_value' => $data), "config_name = ? AND config_owner = ? AND config_cat = ? AND config_subcat = ?", array($key, $owner, $n, $editconfig));
<?php /** * pagecattree Plugin for Cotonti CMF * * @version 2.0.0 * @author esclkm, http://www.littledev.ru * @copyright (c) 2008-2011 esclkm, http://www.littledev.ru */ defined('COT_CODE') or die('Wrong URL.'); cot_config_reset($n, $v, $is_module ? 'module' : 'plug', $structure_code); cot_redirect(cot_url('admin', 'm=other&p=cateditor&n=' . $n, '', true));