Changeset 28839
- Timestamp:
- Jun 29, 2014, 4:21:03 PM (10 years ago)
- Location:
- extensions/ContactForm
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/ContactForm/admin/config.php
r28343 r28839 33 33 'cf_redirect_url' => $_POST['cf_redirect_url'], 34 34 ); 35 $conf['ContactForm_before'] = $_POST['cf_before'];36 $conf['ContactForm_after'] = $_POST['cf_after'];37 35 38 conf_update_param('ContactForm', pwg_db_real_escape_string(serialize($conf['ContactForm'])));39 conf_update_param('ContactForm_before', $conf['ContactForm_before']);40 conf_update_param('ContactForm_after', $conf['ContactForm_after']);36 conf_update_param('ContactForm', $conf['ContactForm']); 37 conf_update_param('ContactForm_before', trim($_POST['cf_before']), true); 38 conf_update_param('ContactForm_after', trim($_POST['cf_after']), true); 41 39 42 40 $page['infos'][] = l10n('Information data registered in database'); -
extensions/ContactForm/include/functions.inc.php
r28628 r28839 141 141 142 142 $conf['ContactForm']['cf_must_initialize'] = false; 143 conf_update_param('ContactForm', serialize($conf['ContactForm']));143 conf_update_param('ContactForm', $conf['ContactForm']); 144 144 } 145 145 -
extensions/ContactForm/main.inc.php
r28324 r28839 13 13 */ 14 14 15 if (!defined('PHPWG_ROOT_PATH'))die('Hacking attempt!');15 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); 16 16 17 17 global $prefixeTable; 18 18 19 defined('CONTACT_FORM_ID') or define('CONTACT_FORM_ID', basename(dirname(__FILE__))); 20 define('CONTACT_FORM_PATH', PHPWG_PLUGINS_PATH . CONTACT_FORM_ID . '/'); 21 define('CONTACT_FORM_ADMIN', get_root_url() . 'admin.php?page=plugin-' . CONTACT_FORM_ID); 22 define('CONTACT_FORM_PUBLIC', get_absolute_root_url() . make_index_url(array('section' => 'contact')) . '/'); 23 define('CONTACT_FORM_TABLE', $prefixeTable .'contact_form'); 24 define('CONTACT_FORM_VERSION', 'auto'); 19 define('CONTACT_FORM_ID', basename(dirname(__FILE__))); 20 define('CONTACT_FORM_PATH', PHPWG_PLUGINS_PATH . CONTACT_FORM_ID . '/'); 21 define('CONTACT_FORM_ADMIN', get_root_url() . 'admin.php?page=plugin-' . CONTACT_FORM_ID); 22 define('CONTACT_FORM_PUBLIC', get_absolute_root_url() . make_index_url(array('section' => 'contact')) . '/'); 23 define('CONTACT_FORM_TABLE', $prefixeTable .'contact_form'); 24 25 include(CONTACT_FORM_PATH . 'include/functions.inc.php'); 25 26 26 27 … … 40 41 add_event_handler('before_parse_mail_template', 'contact_form_mail_template', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 41 42 42 include(CONTACT_FORM_PATH . 'include/functions.inc.php');43 44 43 45 44 /** … … 48 47 function contact_form_init() 49 48 { 50 global $conf, $template , $pwg_loaded_plugins;49 global $conf, $template; 51 50 52 include_once(CONTACT_FORM_PATH . 'maintain.inc.php'); 53 $maintain = new ContactForm_maintain(CONTACT_FORM_ID); 54 $maintain->autoUpdate(CONTACT_FORM_VERSION, 'install'); 55 56 $conf['ContactForm'] = unserialize($conf['ContactForm']); 51 $conf['ContactForm'] = safe_unserialize($conf['ContactForm']); 52 57 53 load_language('plugin.lang', CONTACT_FORM_PATH); 58 54 load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true));
Note: See TracChangeset
for help on using the changeset viewer.