Changeset 9966 for extensions/SmiliesSupport/admin.php
- Timestamp:
- Apr 1, 2011, 10:56:28 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SmiliesSupport/admin.php
r9789 r9966 10 10 { 11 11 // the smilies.txt file is not saved if the directory is changed 12 if (isset($_POST['text1']) AND $_POST['text1'] != $conf_smiliessupport[0]) { 12 if (isset($_POST['text1']) AND $_POST['text1'] != $conf_smiliessupport[0]) 13 { 13 14 $not_save_file = true; 14 15 } 15 16 17 // new configuration 16 18 $conf_smiliessupport = array( 17 19 isset($_POST['text1']) ? $_POST['text1'] : 'plugins/SmiliesSupport/smilies_1', … … 19 21 isset($_POST['text3']) ? $_POST['text3'] : 'smile.png', 20 22 ); 21 22 23 if (empty($_POST['text'])) $_POST['text'] = ':) smile.png'; 23 24 24 $new_value_smiliessupport = implode 25 $query = 'UPDATE ' . CONFIG_TABLE . '26 SET value= "' . $new_value_smiliessupport . '"27 WHERE param= "smiliessupport"';25 $new_value_smiliessupport = implode(",", $conf_smiliessupport); 26 $query = "UPDATE " . CONFIG_TABLE . " 27 SET value='" . $new_value_smiliessupport . "' 28 WHERE param='smiliessupport'"; 28 29 pwg_query($query); 29 30 if (!isset($not_save_file)) { 30 31 // new definitions file 32 if (!isset($not_save_file)) 33 { 31 34 $smilies_file = PHPWG_ROOT_PATH.$conf_smiliessupport[0].'/smilies.txt'; 32 35 … … 38 41 $page['infos'][] = l10n('Information data registered in database'); 39 42 } else { 40 $page['errors'][] = l10n('File/directory read error').' '.$smilies_file;43 $page['errors'][] = l10n('File/directory read error').' : '.$smilies_file; 41 44 } 42 45 } 46 } 47 48 // check if the representant exists 49 if (!file_exists(PHPWG_ROOT_PATH.$conf_smiliessupport[0].'/'.$conf_smiliessupport[2])) { 50 $page['errors'][] = l10n('File/directory read error').' : '.$conf_smiliessupport[0].'/'.$conf_smiliessupport[2]; 43 51 } 44 52 … … 49 57 )); 50 58 59 // build the table of smilies 51 60 include_once(SMILIES_PATH . '/smiliessupport.inc.php'); 52 $template->assign(' SMILIESSUPPORT_PAGE', SmiliesTable($conf_smiliessupport));61 $template->assign('smiliesfiles', get_smilies($conf_smiliessupport)); 53 62 63 // get the content of definitions file 54 64 $smilies_file = PHPWG_ROOT_PATH.$conf_smiliessupport[0].'/smilies.txt'; 55 56 65 if (file_exists($smilies_file)) { 57 66 $content_file = file_get_contents($smilies_file);
Note: See TracChangeset
for help on using the changeset viewer.