Changeset 23177 for extensions/Back2Front/admin.php
- Timestamp:
- Jun 13, 2013, 2:01:34 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Back2Front/admin.php
r12361 r23177 3 3 4 4 global $conf, $template; 5 load_language('plugin.lang', B2F_PATH);6 $conf['back2front'] = explode(',', $conf['back2front']);7 5 8 include_once(B2F_PATH .'functions.inc.php');6 include_once(B2F_PATH . 'include/functions.inc.php'); 9 7 10 8 // Enregistrement de la configuration … … 12 10 { 13 11 $conf['back2front'] = array( 14 $conf['back2front'][0],15 $_POST['switch_mode'],16 $_POST['transition'],17 $_POST['position'],18 serialize(stripslashes_deep(str_replace(array("'",'"',','), null, $_POST['link_name']))),19 isset($_POST['show_thumbnail']),20 );12 'versos_cat' => $conf['back2front']['versos_cat'], 13 'switch_mode' => $_POST['switch_mode'], 14 'transition' => $_POST['transition'], 15 'position' => $_POST['position'], 16 'link_name' => stripslashes_deep($_POST['link_name']), 17 'show_thumbnail' => isset($_POST['show_thumbnail']), 18 ); 21 19 22 conf_update_param('back2front', implode (',',$conf['back2front']));20 conf_update_param('back2front', serialize($conf['back2front'])); 23 21 array_push($page['infos'], l10n('Information data registered in database')); 24 22 } 25 23 26 24 // Gestion des langues pour le bloc menu 27 $conf['back2front'][4] = unserialize($conf['back2front'][4]);28 25 $template->append('link_name', array( 29 26 'LANGUAGE_NAME' => l10n('Default'), 30 27 'LANGUAGE_CODE' => 'default', 31 'VALUE' => @$conf['back2front'][ 4]['default'],32 ) 33 ); 28 'VALUE' => @$conf['back2front']['link_name']['default'], 29 )); 30 34 31 foreach (get_languages() as $language_code => $language_name) 35 32 { … … 37 34 'LANGUAGE_NAME' => $language_name, 38 35 'LANGUAGE_CODE' => $language_code, 39 'VALUE' => isset($conf['back2front'][4][$language_code]) ? $conf['back2front'][4][$language_code] : '', 40 ) 41 ); 36 'VALUE' => @$conf['back2front']['link_name'][$language_code], 37 )); 42 38 } 43 39 44 40 $template->assign(array( 45 41 'B2F_PATH' => B2F_PATH, 46 'SWITCH_MODE' => $conf['back2front'][ 1],47 'TRANSITION' => $conf['back2front'][ 2],48 'POSITION' => $conf['back2front'][ 3],49 'SHOW_THUMBNAIL' => $conf['back2front'][ 5],50 ));42 'SWITCH_MODE' => $conf['back2front']['switch_mode'], 43 'TRANSITION' => $conf['back2front']['transition'], 44 'POSITION' => $conf['back2front']['position'], 45 'SHOW_THUMBNAIL' => $conf['back2front']['show_thumbnail'], 46 )); 51 47 52 $template->set_filename('back2front_conf', dirname(__FILE__).'/template/admin.tpl');48 $template->set_filename('back2front_conf', realpath(B2F_PATH.'template/admin.tpl')); 53 49 $template->assign_var_from_handle('ADMIN_CONTENT', 'back2front_conf'); 54 50
Note: See TracChangeset
for help on using the changeset viewer.