Changeset 28843 for extensions
- Timestamp:
- Jun 29, 2014, 4:23:14 PM (10 years ago)
- Location:
- extensions/header_manager
- Files:
-
- 1 added
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/header_manager/admin/add.php
r26308 r28843 15 15 16 16 $conf['header_manager']['keep_ratio'] = isset($_POST['keep_ratio']); 17 conf_update_param('header_manager', serialize($conf['header_manager']));17 conf_update_param('header_manager', $conf['header_manager']); 18 18 19 19 $banner = get_banner($_POST['picture_file']); … … 113 113 $conf['header_manager']['width'] = intval($_POST['width']); 114 114 $conf['header_manager']['height'] = intval($_POST['height']); 115 conf_update_param('header_manager', serialize($conf['header_manager']));115 conf_update_param('header_manager', $conf['header_manager']); 116 116 117 117 $picture['banner_src'] = HEADER_MANAGER_DIR . $picture['filename']; -
extensions/header_manager/admin/config.php
r26298 r28843 6 6 { 7 7 $conf['header_manager']['image'] = pwg_get_session_var('added_banner'); 8 conf_update_param('header_manager', serialize($conf['header_manager']));8 conf_update_param('header_manager', $conf['header_manager']); 9 9 pwg_unset_session_var('added_banner'); 10 10 } … … 16 16 if ($_POST['display'] == 'with_text') 17 17 { 18 $conf['page_banner'] = $_POST['conf_page_banner']; 19 conf_update_param('page_banner', $conf['page_banner']); 18 conf_update_param('page_banner', $_POST['conf_page_banner'], true); 20 19 } 21 20 … … 27 26 'banner_on_picture' => isset($_POST['banner_on_picture']), 28 27 ); 29 conf_update_param('header_manager', serialize($conf['header_manager']));28 conf_update_param('header_manager', $conf['header_manager']); 30 29 31 30 $page['infos'][] = l10n('Information data registered in database'); … … 44 43 { 45 44 $conf['header_manager']['image'] = 'random'; 46 conf_update_param('header_manager', serialize($conf['header_manager']));45 conf_update_param('header_manager', $conf['header_manager']); 47 46 } 48 47 -
extensions/header_manager/main.inc.php
r26298 r28843 11 11 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); 12 12 13 global $prefixeTable; 13 global $prefixeTable, $conf; 14 14 15 define('HEADER_MANAGER_PATH', PHPWG_PLUGINS_PATH . 'header_manager/'); 15 16 define('HEADER_MANAGER_ADMIN', get_root_url() . 'admin.php?page=plugin-header_manager'); 16 17 define('HEADER_MANAGER_DIR', PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'banners/'); 17 18 define('HEADER_MANAGER_TABLE', $prefixeTable . 'category_banner'); 18 define('HEADER_MANAGER_VERSION', 'auto'); 19 20 include_once(HEADER_MANAGER_PATH . 'include/functions.inc.php'); 21 include_once(HEADER_MANAGER_PATH . 'include/header_manager.inc.php'); 19 22 20 23 21 add_event_handler('init', 'header_manager_init'); 24 $conf['header_manager'] = safe_unserialize($conf['header_manager']); 25 22 26 23 27 if (defined('IN_ADMIN')) … … 32 36 } 33 37 34 include_once(HEADER_MANAGER_PATH . 'include/functions.inc.php');35 include_once(HEADER_MANAGER_PATH . 'include/header_manager.inc.php');36 37 38 /**39 * initialization40 */41 function header_manager_init()42 {43 global $conf, $pwg_loaded_plugins, $page;44 45 include_once(HEADER_MANAGER_PATH . 'maintain.inc.php');46 $maintain = new header_manager_maintain('header_manager');47 $maintain->autoUpdate(HEADER_MANAGER_VERSION, 'install');48 49 $conf['header_manager'] = unserialize($conf['header_manager']);50 }51 38 52 39 /**
Note: See TracChangeset
for help on using the changeset viewer.