From f07434a3cbb574369046a1ce66499ea6de42e63d Mon Sep 17 00:00:00 2001 From: Tijn Kuyper Date: Sat, 8 Dec 2012 15:52:40 +0100 Subject: [PATCH] And more notice removals. Also some plugin GUI clean-up (rss, tagwords, trackback) --- contact.php | 4 +- e107_admin/comment.php | 2 +- e107_admin/credits.php | 2 +- e107_admin/docs.php | 2 +- e107_admin/image.php | 6 +- e107_admin/menus.php | 4 +- e107_admin/plugin.php | 4 +- e107_admin/theme.php | 6 +- e107_admin/update_routines.php | 116 +++++++++--------- e107_core/shortcodes/single/nextprev.php | 2 +- e107_handlers/admin_ui.php | 2 +- e107_handlers/comment_class.php | 2 +- e107_handlers/form_handler.php | 4 +- e107_handlers/menumanager_class.php | 23 ++-- e107_handlers/theme_handler.php | 2 +- e107_languages/English/admin/help/menus.php | 2 +- e107_plugins/faqs/faqs.php | 6 +- e107_plugins/forum/forum.php | 4 +- e107_plugins/gallery/gallery.php | 2 +- e107_plugins/gsitemap/admin_config.php | 10 +- e107_plugins/log/admin_config.php | 23 ++-- e107_plugins/log/stats.php | 20 +-- .../newforumposts_main/admin_config.php | 44 +++---- .../newforumposts_main/languages/English.php | 6 +- e107_plugins/pdf/admin_pdf_config.php | 74 ++++++----- e107_plugins/rss_menu/admin_prefs.php | 31 ++--- e107_plugins/tagwords/tagwords_template.php | 15 +-- e107_plugins/trackback/admin_config.php | 31 ++--- .../languages/English_admin_trackback.php | 2 +- 29 files changed, 217 insertions(+), 234 deletions(-) diff --git a/contact.php b/contact.php index a3437b9e8..ca4c57dd6 100644 --- a/contact.php +++ b/contact.php @@ -27,7 +27,7 @@ include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE); require_once(HEADERF); -if (!$CONTACT_FORM) { +if (!vartrue($CONTACT_FORM)) { if (file_exists(THEME."contact_template.php")) { require_once(THEME."contact_template.php"); } @@ -158,7 +158,7 @@ if(isset($_POST['send-contactus'])) if(SITECONTACTINFO && $CONTACT_INFO) { - $text = $tp->parseTemplate($CONTACT_INFO, TRUE, $contact_shortcodes); + $text = $tp->parseTemplate($CONTACT_INFO, TRUE, vartrue($contact_shortcodes)); $ns -> tablerender(LANCONTACT_01, $text,"contact"); } diff --git a/e107_admin/comment.php b/e107_admin/comment.php index 3425c0c2d..af0dd6cee 100644 --- a/e107_admin/comment.php +++ b/e107_admin/comment.php @@ -135,7 +135,7 @@ class comments_admin_form_ui extends e_admin_form_ui $id = $row['comment_type']; $list[$id] = e107::getComment()->getTable($id); } - return $list; + return vartrue($list); } if($mode == 'batch') diff --git a/e107_admin/credits.php b/e107_admin/credits.php index e70823845..311c57562 100644 --- a/e107_admin/credits.php +++ b/e107_admin/credits.php @@ -44,7 +44,7 @@ require_once(e_ADMIN."auth.php");

Cameron Hanly, Miroslav Yovchev, Steven Davies,
Henk Jongedijk, James Currie, Martin Nicholls,
- Steven Davies, Thom Michelbrink + Steven Davies, Thom Michelbrink, Tijn Kuyper

3rd Parties

diff --git a/e107_admin/docs.php b/e107_admin/docs.php index 8982b3b8f..9bf80ccd1 100644 --- a/e107_admin/docs.php +++ b/e107_admin/docs.php @@ -74,7 +74,7 @@ $text_h = ''; foreach ($helplist as $key => $helpdata) { $filename = $doc_fpath.$helpdata['fname']; - $filename_alt = $doc_fpath_alt.$$helpdata['fname']; + $filename_alt = $doc_fpath_alt.vartrue($$helpdata['fname']); if(is_readable($filename)) $tmp = file_get_contents($filename); diff --git a/e107_admin/image.php b/e107_admin/image.php index 2e745f9b3..3d997711a 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -40,7 +40,7 @@ if(isset($_POST['submit_cancel_show'])) include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_'.e_PAGE); -if($_GET['action'] == 'nav' && e_AJAX_REQUEST) //XXX Doesn't work correctly inside the class for some reason +if(vartrue($_GET['action']) == 'nav' && e_AJAX_REQUEST) //XXX Doesn't work correctly inside the class for some reason { define("e_IFRAME",true); // require_once(e_ADMIN."auth.php"); @@ -518,13 +518,13 @@ class media_form_ui extends e_admin_form_ui return; } - $tagid = $_GET['tagid']; + $tagid = vartrue($_GET['tagid']); $path = $this->getController()->getListModel()->get('media_url'); $title = $this->getController()->getListModel()->get('media_name'); $id = $this->getController()->getListModel()->get('media_id'); $preview = basename($path); - $bbcode = ($_GET['bbcode']=='file') ? "file" : ""; + $bbcode = (vartrue($_GET['bbcode']) == 'file') ? "file" : ""; // $save = ($_GET['bbcode']!='file') ? "e-dialog-save" : ""; // e-dialog-close $text = $this->renderValue('options',$value,'',$id); diff --git a/e107_admin/menus.php b/e107_admin/menus.php index 3a7ff87e1..c4055324d 100644 --- a/e107_admin/menus.php +++ b/e107_admin/menus.php @@ -116,7 +116,7 @@ if($_POST) - if ($message != "") + if (vartrue($message) != "") { echo $ns -> tablerender('Updated', "

".$message."


"); } @@ -126,7 +126,7 @@ if($_POST) if (!isset($_GET['configure'])) { $men->menuScanMenus(); - $text .= $men->menuRenderMessage(); + $text = $men->menuRenderMessage(); $text .= $men->menuSelectLayout(); $text .= $men->menuVisibilityOptions(); $text .= $men->menuInstanceParameters(); diff --git a/e107_admin/plugin.php b/e107_admin/plugin.php index ec8a2084e..22f6ae585 100644 --- a/e107_admin/plugin.php +++ b/e107_admin/plugin.php @@ -861,14 +861,14 @@ class pluginManager{ $text = "
- ".$caption." + ".vartrue($caption)." ".$frm->colGroup($this->fields,$this->fieldpref). $frm->thead($this->fields,$this->fieldpref)." "; - if($pluginRenderPlugin) + if(vartrue($pluginRenderPlugin)) { $text .= $pluginRenderPlugin; } diff --git a/e107_admin/theme.php b/e107_admin/theme.php index 3f6ca906b..266e9953d 100644 --- a/e107_admin/theme.php +++ b/e107_admin/theme.php @@ -103,17 +103,17 @@ else { $mode = (e_QUERY) ? e_QUERY :"main" ; -if($_POST['selectadmin']) +if(vartrue($_POST['selectadmin'])) { $mode = "admin"; } -if($_POST['upload']) +if(vartrue($_POST['upload'])) { $mode = "choose"; } -if($_POST['selectmain'] || varset($_POST['setUploadTheme'])) +if(vartrue($_POST['selectmain']) || varset($_POST['setUploadTheme'])) { $mode = "main"; } diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index 8881ecbd9..b2c06ee88 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -20,7 +20,7 @@ /** * @package e107 * @subpackage admin - * @version $Id$; + * @version $Id$; * * Update routines from older e107 versions to current. * @@ -306,8 +306,8 @@ function update_706_to_800($type='') // List of DB tables newly required (defined in core_sql.php) (The existing dblog table gets renamed) // No Longer required. - automatically checked against core_sql.php. // $new_tables = array('audit_log', 'dblog', 'news_rewrite', 'core_media', 'core_media_cat','cron', 'mail_recipients', 'mail_content'); - - // List of core prefs that need to be converted from serialized to e107ArrayStorage. + + // List of core prefs that need to be converted from serialized to e107ArrayStorage. $serialized_prefs = array("'emote'", "'menu_pref'", "'search_prefs'", "'emote_default'"); @@ -324,7 +324,7 @@ function update_706_to_800($type='') // List of changed DB tables (defined in core_sql.php) // No Longer required. - automatically checked against core_sql.php. // (primarily those which have changed significantly; for the odd field write some explicit code - it'll run faster) - // $changed_tables = array('user', 'dblog', 'admin_log', 'userclass_classes', 'banlist', 'menus', + // $changed_tables = array('user', 'dblog', 'admin_log', 'userclass_classes', 'banlist', 'menus', // 'plugin', 'news', 'news_category', 'online', 'page', 'links', 'comments'); @@ -332,7 +332,7 @@ function update_706_to_800($type='') // key = plugin directory name. Data = comma-separated list of tables to check // (primarily those which have changed significantly; for the odd field write some explicit code - it'll run faster) // No Longer required. - automatically checked by db-verify - /* $pluginChangedTables = array('linkwords' => 'linkwords', + /* $pluginChangedTables = array('linkwords' => 'linkwords', 'featurebox' => 'featurebox', 'links_page' => 'links_page', 'poll' => 'polls', @@ -340,7 +340,7 @@ function update_706_to_800($type='') ); */ -/* +/* $setCorePrefs = array( //modified prefs during upgrade. 'adminstyle' => 'infopanel', 'admintheme' => 'bootstrap', @@ -357,16 +357,16 @@ function update_706_to_800($type='') $do_save = TRUE; - - - // List of changed menu locations. + + + // List of changed menu locations. $changeMenuPaths = array( array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'sitebutton_menu'), array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'compliance_menu'), array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'powered_by_menu'), array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'sitebutton_menu'), array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'counter_menu'), - array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'latestnews_menu'), + array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'latestnews_menu'), array('oldpath' => 'compliance_menu', 'newpath' => 'siteinfo', 'menu' => 'compliance_menu'), array('oldpath' => 'powered_by_menu', 'newpath' => 'siteinfo', 'menu' => 'powered_by_menu'), array('oldpath' => 'sitebutton_menu', 'newpath' => 'siteinfo', 'menu' => 'sitebutton_menu'), @@ -377,7 +377,7 @@ function update_706_to_800($type='') array('oldpath' => 'other_news_menu', 'newpath' => 'news', 'menu' => 'other_news_menu'), array('oldpath' => 'other_news_menu', 'newpath' => 'news', 'menu' => 'other_news2_menu') - ); + ); // List of DB tables (key) and field (value) which need changing to accommodate IPV6 addresses @@ -395,7 +395,7 @@ function update_706_to_800($type='') if (!$just_check) { - foreach($setCorePrefs as $k=>$v) + foreach(vartrue($setCorePrefs) as $k=>$v) { $pref[$k] = $v; } @@ -615,32 +615,32 @@ function update_706_to_800($type='') // Add index to download history // Deprecated by db-verify-class - // if (FALSE !== ($temp = addIndexToTable('download_requests', 'download_request_datestamp', $just_check, $updateMessages))) - // { - // if ($just_check) - // { - // return update_needed($temp); - // } + // if (FALSE !== ($temp = addIndexToTable('download_requests', 'download_request_datestamp', $just_check, $updateMessages))) + // { + // if ($just_check) + // { + // return update_needed($temp); + // } // } // Extra index to tmp table // Deprecated by db-verify-class - // if (FALSE !== ($temp = addIndexToTable('tmp', 'tmp_time', $just_check, $updateMessages))) - // { - // if ($just_check) - // { - // return update_needed($temp); - // } + // if (FALSE !== ($temp = addIndexToTable('tmp', 'tmp_time', $just_check, $updateMessages))) + // { + // if ($just_check) + // { + // return update_needed($temp); + // } // } // Extra index to rss table (if used) // Deprecated by db-verify-class - // if (FALSE !== ($temp = addIndexToTable('rss', 'rss_name', $just_check, $updateMessages, TRUE))) - // { - // if ($just_check) - // { - // return update_needed($temp); - // } + // if (FALSE !== ($temp = addIndexToTable('rss', 'rss_name', $just_check, $updateMessages, TRUE))) + // { + // if ($just_check) + // { + // return update_needed($temp); + // } // } // Front page prefs (logic has changed) @@ -1070,8 +1070,8 @@ function update_706_to_800($type='') // $_pdateMessages[] = LAN_UPDATE_XX24; // catch_error($sql); } - - + + //-- Media-manger import -------------------------------------------------- @@ -1196,11 +1196,11 @@ function update_706_to_800($type='') } - + $count = $sql->db_Select_gen("SELECT * FROM `#core_media_cat` WHERE `media_cat_owner` = '_common' LIMIT 1 "); - - if($count != 1) + + if($count != 1) { if ($just_check) return update_needed('Add Media-Manager Categories and Import existing images.'); @@ -1220,9 +1220,9 @@ function update_706_to_800($type='') mysql_query("INSERT INTO `".MPREFIX."core_media_cat` VALUES(0, 'news', 'news_thumb', 'News Thumbnails (Legacy)', 'Legacy news thumbnails. ', 253, '', 1);"); $med->import('news_thumb', e_IMAGE.'newspost_images',"^thumb_"); - $med->import('news',e_IMAGE.'newspost_images'); - $med->import('page',e_IMAGE.'custom'); - + $med->import('news',e_IMAGE.'newspost_images'); + $med->import('page',e_IMAGE.'custom'); + } // Check for Legacy Download Images. @@ -1267,35 +1267,35 @@ function update_706_to_800($type='') - - $count = $sql->db_Select_gen("SELECT * FROM `#core_media_cat` WHERE media_cat_owner='_icon' "); + + $count = $sql->db_Select_gen("SELECT * FROM `#core_media_cat` WHERE media_cat_owner='_icon' "); - if(!$count) - { - if ($just_check) return update_needed('Add icons to media-manager'); + if(!$count) + { + if ($just_check) return update_needed('Add icons to media-manager'); $query = "INSERT INTO `".MPREFIX."core_media_cat` (`media_cat_id`, `media_cat_owner`, `media_cat_category`, `media_cat_title`, `media_cat_diz`, `media_cat_class`, `media_cat_image`, `media_cat_order`) VALUES (0, '_icon', '_icon_16', 'Icons 16px', 'Available where icons are used in admin. ', 253, '', 0), (0, '_icon', '_icon_32', 'Icons 32px', 'Available where icons are used in admin. ', 253, '', 0), (0, '_icon', '_icon_48', 'Icons 48px', 'Available where icons are used in admin. ', 253, '', 0), (0, '_icon', '_icon_64', 'Icons 64px', 'Available where icons are used in admin. ', 253, '', 0); - "; + "; - if(!mysql_query($query)) - { - // echo "mysyql error"; - // error or already exists. - } + if(!mysql_query($query)) + { + // echo "mysyql error"; + // error or already exists. + } - $med->importIcons(e_PLUGIN); + $med->importIcons(e_PLUGIN); $med->importIcons(e_IMAGE."icons/"); - $med->importIcons(e_THEME.$pref['sitetheme']."/images/"); - e107::getMessage()->addDebug("Icon category added"); - } - - - // Any other images should be imported manually via Media Manager batch-import. - + $med->importIcons(e_THEME.$pref['sitetheme']."/images/"); + e107::getMessage()->addDebug("Icon category added"); + } + + + // Any other images should be imported manually via Media Manager batch-import. + // ------------------------------------------------------------------ @@ -1561,7 +1561,7 @@ function catch_error(&$target) function get_default_prefs() { - $xmlArray = e107::getSingleton('xmlClass')->loadXMLfile(e_CORE."xml/default_install.xml",'advanced'); + $xmlArray = e107::getSingleton('xmlClass')->loadXMLfile(e_CORE."xml/default_install.xml",'advanced'); $pref = e107::getSingleton('xmlClass')->e107ImportPrefs($xmlArray,'core'); return $pref; } diff --git a/e107_core/shortcodes/single/nextprev.php b/e107_core/shortcodes/single/nextprev.php index 6e3beeedb..faa87c77b 100644 --- a/e107_core/shortcodes/single/nextprev.php +++ b/e107_core/shortcodes/single/nextprev.php @@ -172,7 +172,7 @@ function nextprev_shortcode($parm = '') $e_vars->caption = sprintf(defset($e_vars->caption, $e_vars->caption), $current_page, $total_pages); // urldecoded by parse_str() - $pagetitle = explode('|',$parm['pagetitle']); + $pagetitle = explode('|', vartrue($parm['pagetitle'])); // new - bullet support $bullet = vartrue($parm['bullet'], ''); diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index f372becfb..cf041d265 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -4251,7 +4251,7 @@ class e_admin_ui extends e_admin_controller_ui } if(vartrue($att['validate'])) { - $this->validationRules[$key] = array((true === $att['validate'] ? 'required' : $att['validate']), varset($att['rule']), $att['title'], varset($att['error'], $att['help'])); + $this->validationRules[$key] = array((true === $att['validate'] ? 'required' : $att['validate']), varset($att['rule']), $att['title'], varset($att['error'], vartrue($att['help']))); } /*elseif(vartrue($att['check'])) could go? { diff --git a/e107_handlers/comment_class.php b/e107_handlers/comment_class.php index c493ebe38..7d497e780 100644 --- a/e107_handlers/comment_class.php +++ b/e107_handlers/comment_class.php @@ -68,7 +68,7 @@ class comment { require_once(e107::coreTemplatePath('comment')); } - elseif(!$COMMENT_TEMPLATE) // BC template. + elseif(!vartrue($COMMENT_TEMPLATE)) // BC template. { global $sc_style; /* diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 099c6b8f9..20c7a6298 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -1738,7 +1738,7 @@ class e_form { case 'options': - if($attributes['type']=='method') // Allow override with 'options' function. + if($attributes['type'] == "method") // Allow override with 'options' function. { $attributes['mode'] = "read"; if(isset($attributes['method']) && $attributes['method'] && method_exists($this, $attributes['method'])) @@ -1865,7 +1865,7 @@ class e_form $opts = $wparms['__options']; unset($wparms['__options']); - if(vartrue($opts['multiple']) || $attributes['data']=='comma') + if(vartrue($opts['multiple']) || vartrue($attributes['data']) == 'comma') { $ret = array(); $value = is_array($value) ? $value : explode(',', $value); diff --git a/e107_handlers/menumanager_class.php b/e107_handlers/menumanager_class.php index aa3250015..bbac75c00 100644 --- a/e107_handlers/menumanager_class.php +++ b/e107_handlers/menumanager_class.php @@ -68,7 +68,7 @@ class e_menuManager { $this->dbLayout = ($this->curLayout != $pref['sitetheme_deflayout']) ? $this->curLayout : ""; //menu_layout is left blank when it's default. - if(isset($_POST['menu_id']) || $_GET['id']) + if(isset($_POST['menu_id']) || vartrue($_GET['id'])) { $this->menuId = (isset($_POST['menu_id'])) ? intval($_POST['menu_id']) : intval($_GET['id']); } @@ -82,7 +82,7 @@ class e_menuManager { $this->menuSaveParameters(); } - if ($_GET['mode'] == "deac") + if (vartrue($_GET['mode']) == "deac") { $this->menuDeactivate(); } @@ -112,7 +112,7 @@ class e_menuManager { $this->menuModify(); - if($_POST['menuActivate']) + if(vartrue($_POST['menuActivate'])) { $this->menuActivateLoc = key($_POST['menuActivate']); $this->menuActivateIds = $_POST['menuselect']; @@ -120,7 +120,7 @@ class e_menuManager { } - if($_POST['menuSetCustomPages']) + if(vartrue($_POST['menuSetCustomPages'])) { $this->menuSetCustomPages($_POST['custompages']); } @@ -147,7 +147,7 @@ class e_menuManager { $cnt = $sql->db_Select("menus", "*", "menu_location > 0 AND menu_layout = '$curLayout' ORDER BY menu_name "); // calculate height to remove vertical scroll-bar. - $text .= ""; + $text = ""; return $text; } @@ -427,7 +427,7 @@ class e_menuManager { } } - $this->menuAddMessage($message, E_MESSAGE_INFO); + $this->menuAddMessage(vartrue($message), E_MESSAGE_INFO); } @@ -454,7 +454,7 @@ class e_menuManager { */ function menuInstanceParameters() { - if(!$_GET['parmsId']) return; + if(!vartrue($_GET['parmsId'])) return; $id = intval($_GET['parmsId']); $frm = e107::getForm(); $sql = e107::getDb(); @@ -494,7 +494,7 @@ class e_menuManager { function menuVisibilityOptions() { - if(!$_GET['vis']) return; + if(!vartrue($_GET['vis'])) return; global $sql,$ns,$frm; require_once(e_HANDLER."userclass_class.php"); @@ -899,11 +899,12 @@ class e_menuManager { //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------// function menuSelectLayout() { - global $rs, $pref; + global $rs; + $pref = e107::getPref(); // onchange=\"urljump(this.options[selectedIndex].value);\" - $text .= ""; + $text = ""; $text .= "
".MENLAN_30." "; $text .= "
"; + $text = ""; } return $text; } diff --git a/e107_languages/English/admin/help/menus.php b/e107_languages/English/admin/help/menus.php index de65e8899..3c96d9e07 100644 --- a/e107_languages/English/admin/help/menus.php +++ b/e107_languages/English/admin/help/menus.php @@ -44,7 +44,7 @@ else $frm = e107::getForm(); -$text .= " +$text = " You can arrange where and in which order your menu items are from here. Use the dropdown menu to move the menus up and down until you are satisfied with their positioning.
diff --git a/e107_plugins/faqs/faqs.php b/e107_plugins/faqs/faqs.php index dfe809d96..9464bfaf0 100644 --- a/e107_plugins/faqs/faqs.php +++ b/e107_plugins/faqs/faqs.php @@ -44,14 +44,14 @@ if (!$FAQ_VIEW_TEMPLATE) $rs = new form; $cobj = new comment; -if (!$_GET['elan']) +if (!vartrue($_GET['elan'])) { $qs = explode(".", e_QUERY); $action = $qs[0]; $id = $qs[1]; $idx = $qs[2]; } -$from = ($from ? $from : 0); +$from = (vartrue($from) ? $from : 0); $amount = 50; if (isset($_POST['faq_submit'])) @@ -215,7 +215,7 @@ class faq $ret['title'] = FAQLAN_FAQ; $ret['text'] = $text; - $ret['caption'] = $caption; + $ret['caption'] = vartrue($caption); return $ret; } diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index a24a41119..89f714398 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -191,7 +191,7 @@ else } } -if (USER && $allread != TRUE && $total_new_threads && $total_new_threads >= $total_read_threads) +if (USER && vartrue($allread) != TRUE && $total_new_threads && $total_new_threads >= $total_read_threads) { $fVars->INFO .= "
".LAN_199.''.(e_QUERY != 'new' ? ", ".LAN_421."" : ''); } @@ -275,7 +275,7 @@ function parse_parent($parent) { $status = '( '.LAN_405.' )'; } - return $status; + return vartrue($status); } function parse_forum($f, $restricted_string = '') diff --git a/e107_plugins/gallery/gallery.php b/e107_plugins/gallery/gallery.php index 29732ff52..98307b76c 100644 --- a/e107_plugins/gallery/gallery.php +++ b/e107_plugins/gallery/gallery.php @@ -43,7 +43,7 @@ class gallery { $this->catList = e107::getMedia()->getCategories('gallery'); - if(($_GET['cat']) && isset($this->catList[$_GET['cat']])) + if((vartrue($_GET['cat'])) && isset($this->catList[$_GET['cat']])) { $this->showImages($_GET['cat']); } diff --git a/e107_plugins/gsitemap/admin_config.php b/e107_plugins/gsitemap/admin_config.php index 6f2f0b687..0dc17ad91 100644 --- a/e107_plugins/gsitemap/admin_config.php +++ b/e107_plugins/gsitemap/admin_config.php @@ -87,7 +87,7 @@ class gsitemap { $this -> instructions(); } - else if(!$_POST['edit']) + else if(!vartrue($_POST['edit'])) { $this -> showList(); } @@ -107,7 +107,7 @@ class gsitemap if (!$count) { - $text .= " + $text = " ".GSLAN_39."

" .$frm->admin_button('import',LAN_YES,'submit')." @@ -151,7 +151,7 @@ class gsitemap foreach($glArray as $row2) { $datestamp = $gen->convert_date($row2['gsitemap_lastmod'], "short"); - $rowStyle = ($rowStyle == "odd") ? "even" : "odd"; + $rowStyle = (vartrue($rowStyle) == "odd") ? "even" : "odd"; $text .= " @@ -457,7 +457,7 @@ class gsitemap for ($i=0.1; $i<1.0; $i=$i+0.1) { - $sel = ($editArray['gsitemap_priority'] == number_format($i,1))? "selected='selected'" : ""; + $sel = (vartrue($editArray['gsitemap_priority']) == number_format($i,1))? "selected='selected'" : ""; $text .= "\n"; }; @@ -467,7 +467,7 @@ class gsitemap
".$val['caption'].":".$val['html']."
".$val['caption'].":".$val['html']."
".$row2['gsitemap_id'] ."
@@ -296,7 +296,7 @@ switch ($action) - @@ -304,12 +304,12 @@ switch ($action) - + - @@ -317,14 +317,14 @@ switch ($action) - - - - - "; @@ -369,10 +369,9 @@ switch ($action)
".ADSTAT_L4." + ".ADSTAT_ON."   ".ADSTAT_OFF."
".ADSTAT_L18."".r_userclass("statUserclass", $pref['statUserclass'],'off','public, member, admin, classes')."".r_userclass("statUserclass", $pref['statUserclass'],'off','public, member, admin, classes')."
".ADSTAT_L20." + ".ADSTAT_ON."   ".ADSTAT_OFF."
".ADSTAT_L21." +
".ADSTAT_L5." + ".gen_select(ADSTAT_L6, 'statBrowser',$pref['statBrowser']) .gen_select(ADSTAT_L7, 'statOs',$pref['statOs']) .gen_select(ADSTAT_L8, 'statScreen',$pref['statScreen']) @@ -340,13 +340,13 @@ switch ($action)
".ADSTAT_L78."
".ADSTAT_L79."
+
".ADSTAT_L12."
".ADSTAT_L13."
+ ".ADSTAT_L14."
".ADSTAT_L6."
".ADSTAT_L7."
@@ -360,7 +360,7 @@ switch ($action)
".ADSTAT_L26."
".ADSTAT_L27."
+
- ".$frm->admin_button('updatesettings', LAN_UPDATE, 'update')." + ".$frm->admin_button('updatesettings', LAN_UPDATE, 'update')."
- - "; + "; $ns->tablerender(ADSTAT_L16, $text); break; // case config diff --git a/e107_plugins/log/stats.php b/e107_plugins/log/stats.php index 901b88bee..c1b2b488c 100644 --- a/e107_plugins/log/stats.php +++ b/e107_plugins/log/stats.php @@ -938,20 +938,20 @@ class siteStats require($logfile); } - $this -> filesiteTotal = $siteTotal; - $this -> filesiteUnique = $siteUnique; + $this -> filesiteTotal = vartrue($siteTotal); + $this -> filesiteUnique = vartrue($siteUnique); /* set order var */ $this -> order = $order; - $this -> fileInfo = $pageInfo; - $this -> fileBrowserInfo = $browserInfo; - $this -> fileOsInfo = $osInfo; - $this -> fileScreenInfo = $screenInfo; - $this -> fileDomainInfo = $domainInfo; - $this -> fileReferInfo = $refInfo; - $this -> fileQueryInfo = $searchInfo; - $this -> fileRecent = $visitInfo; + $this -> fileInfo = vartrue($pageInfo); + $this -> fileBrowserInfo = vartrue($browserInfo); + $this -> fileOsInfo = vartrue($osInfo); + $this -> fileScreenInfo = vartrue($screenInfo); + $this -> fileDomainInfo = vartrue($domainInfo); + $this -> fileReferInfo = vartrue($refInfo); + $this -> fileQueryInfo = vartrue($searchInfo); + $this -> fileRecent = vartrue($visitInfo); /* get main stat info from database */ if($sql -> db_Select('logstats', 'log_data', "log_id='pageTotal'")) diff --git a/e107_plugins/newforumposts_main/admin_config.php b/e107_plugins/newforumposts_main/admin_config.php index 3cfda5a79..32223ad8e 100644 --- a/e107_plugins/newforumposts_main/admin_config.php +++ b/e107_plugins/newforumposts_main/admin_config.php @@ -26,67 +26,67 @@ require_once (e_HANDLER.'userclass_class.php'); include_lan(e_PLUGIN.'newforumposts_main/languages/'.e_LANGUAGE.'.php'); require_once (e_ADMIN.'auth.php'); +$frm = e107::getForm(); + if(isset($_POST['updatesettings'])) { $pref['nfp_display'] = $_POST['nfp_display']; $pref['nfp_caption'] = $_POST['nfp_caption']; $pref['nfp_amount'] = $_POST['nfp_amount']; - $pref['nfp_layer'] = $_POST['nfp_layer']; - $pref['nfp_posts'] = $_POST['nfp_posts']; + $pref['nfp_layer'] = vartrue($_POST['nfp_layer']); + $pref['nfp_posts'] = vartrue($_POST['nfp_posts']); $pref['nfp_layer_height'] = ($_POST['nfp_layer_height'] ? $_POST['nfp_layer_height'] : 200); save_prefs(); - $message = "".NFPM_L14.""; + $message = "".NFPM_L13.""; } -if($message) +if(vartrue($message)) { $ns->tablerender("", "
$message
"); } -$text = "
+$text = " -
"; +
+ ".$frm->admin_button('updatesettings', LAN_UPDATE, 'update')." +
+ "; $ns->tablerender(NFPM_L12, $text); require_once (e_ADMIN."footer.php"); diff --git a/e107_plugins/newforumposts_main/languages/English.php b/e107_plugins/newforumposts_main/languages/English.php index 43ff13e5a..684b3b36b 100644 --- a/e107_plugins/newforumposts_main/languages/English.php +++ b/e107_plugins/newforumposts_main/languages/English.php @@ -20,9 +20,9 @@ define("NFPM_L9", "Number of new posts to display?"); define("NFPM_L10", "Display inside scrolling layer?"); define("NFPM_L11", "Layer height"); define("NFPM_L12", "New Forum Posts Configuration"); -define("NFPM_L13", "Update New Forum Posts Settings"); -define("NFPM_L14", "New Forum Posts settings updated."); -define("NFPM_L15", "Check to display latest forum posts.
Default is latest topics."); +define("NFPM_L13", "New Forum Posts settings updated."); +define("NFPM_L14", "Check to display latest forum posts."); +define("NFPM_L15", "Default is latest topics."); define('NFPM_L16', '[user deleted]'); define('NFPM_L17', 'New Posts on Popular Thread'); define('NFPM_L18', 'New Posts'); diff --git a/e107_plugins/pdf/admin_pdf_config.php b/e107_plugins/pdf/admin_pdf_config.php index f82dc0334..64853e65e 100644 --- a/e107_plugins/pdf/admin_pdf_config.php +++ b/e107_plugins/pdf/admin_pdf_config.php @@ -80,7 +80,8 @@ function getDefaultPDFPrefs() function getPDFPrefs() { - global $sql, $eArrayStorage; + global $eArrayStorage; + $sql = e107::getDb(); if(!is_object($sql)){ $sql = new db; } $num_rows = $sql -> db_Select("core", "*", "e107_name='pdf' "); @@ -184,27 +185,26 @@ foreach ($fontList as $font => $info) $text = " -
".$rs -> form_open("post", e_SELF, "pdfform", "", "enctype='multipart/form-data'")." - +
- - + + - - + + - - + + "; $text .= " - - + - - + + - - + + - - + + - - + + - - + - - + - - + - - + - - + - - - - -
".PDF_LAN_5."".$rs -> form_text("pdf_margin_left", 10, $pdfpref['pdf_margin_left'], 10)."".PDF_LAN_5."".$rs -> form_text("pdf_margin_left", 10, $pdfpref['pdf_margin_left'], 10)."
".PDF_LAN_6."".$rs -> form_text("pdf_margin_right", 10, $pdfpref['pdf_margin_right'], 10)."".PDF_LAN_6."".$rs -> form_text("pdf_margin_right", 10, $pdfpref['pdf_margin_right'], 10)."
".PDF_LAN_7."".$rs -> form_text("pdf_margin_top", 10, $pdfpref['pdf_margin_top'], 10)."".PDF_LAN_7."".$rs -> form_text("pdf_margin_top", 10, $pdfpref['pdf_margin_top'], 10)."
".PDF_LAN_8." + ".PDF_LAN_8." ".$rs -> form_select_open("pdf_font_family"); foreach($coreList as $font => $info) { @@ -215,70 +215,68 @@ $text .= "
".PDF_LAN_9."".$rs -> form_text("pdf_font_size", 10, $pdfpref['pdf_font_size'], 10)."".PDF_LAN_9."".$rs -> form_text("pdf_font_size", 10, $pdfpref['pdf_font_size'], 10)."
".PDF_LAN_10."".$rs -> form_text("pdf_font_size_sitename", 10, $pdfpref['pdf_font_size_sitename'], 10)."".PDF_LAN_10."".$rs -> form_text("pdf_font_size_sitename", 10, $pdfpref['pdf_font_size_sitename'], 10)."
".PDF_LAN_11."".$rs -> form_text("pdf_font_size_page_url", 10, $pdfpref['pdf_font_size_page_url'], 10)."".PDF_LAN_11."".$rs -> form_text("pdf_font_size_page_url", 10, $pdfpref['pdf_font_size_page_url'], 10)."
".PDF_LAN_12."".$rs -> form_text("pdf_font_size_page_number", 10, $pdfpref['pdf_font_size_page_number'], 10)."".PDF_LAN_12."".$rs -> form_text("pdf_font_size_page_number", 10, $pdfpref['pdf_font_size_page_number'], 10)."
".PDF_LAN_13." + ".PDF_LAN_13." ".$rs -> form_radio("pdf_show_logo", "1", ($pdfpref['pdf_show_logo'] ? "1" : "0"), "", "").PDF_LAN_3." ".$rs -> form_radio("pdf_show_logo", "0", ($pdfpref['pdf_show_logo'] ? "0" : "1"), "", "").PDF_LAN_4."
".PDF_LAN_14." + ".PDF_LAN_14." ".$rs -> form_radio("pdf_show_sitename", "1", ($pdfpref['pdf_show_sitename'] ? "1" : "0"), "", "").PDF_LAN_3." ".$rs -> form_radio("pdf_show_sitename", "0", ($pdfpref['pdf_show_sitename'] ? "0" : "1"), "", "").PDF_LAN_4."
".PDF_LAN_15." + ".PDF_LAN_15." ".$rs -> form_radio("pdf_show_page_url", "1", ($pdfpref['pdf_show_page_url'] ? "1" : "0"), "", "").PDF_LAN_3." ".$rs -> form_radio("pdf_show_page_url", "0", ($pdfpref['pdf_show_page_url'] ? "0" : "1"), "", "").PDF_LAN_4."
".PDF_LAN_16." + ".PDF_LAN_16." ".$rs -> form_radio("pdf_show_page_number", "1", ($pdfpref['pdf_show_page_number'] ? "1" : "0"), "", "").PDF_LAN_3." ".$rs -> form_radio("pdf_show_page_number", "0", ($pdfpref['pdf_show_page_number'] ? "0" : "1"), "", "").PDF_LAN_4."
".PDF_LAN_20." + ".PDF_LAN_20." ".$rs -> form_radio("pdf_error_reporting", "1", ($pdfpref['pdf_error_reporting'] ? "1" : "0"), "", "").PDF_LAN_3." ".$rs -> form_radio("pdf_error_reporting", "0", ($pdfpref['pdf_error_reporting'] ? "0" : "1"), "", "").PDF_LAN_4."
".$rs -> form_button("submit", "update_pdf", PDF_LAN_17)."
+
+ ".$rs -> form_button("submit", "update_pdf", PDF_LAN_17)." +
".$rs -> form_close()." -
"; +"; $ns -> tablerender(PDF_LAN_2, $text); -$text = "
+$text = " +\n"; @@ -292,7 +290,7 @@ foreach ($fontList as $font => $info) $text .= "\n"; } -$text .= "
".PDF_LAN_21."".PDF_LAN_22."".PDF_LAN_23." ".PDF_LAN_24."".PDF_LAN_26."
{$font}{$info['info']['type']}{$variants}{$info['info']['weight']}{$info['info']['codes']}
"; +$text .= ""; $ns->tablerender(PDF_LAN_31, $text); diff --git a/e107_plugins/rss_menu/admin_prefs.php b/e107_plugins/rss_menu/admin_prefs.php index b5d69302b..cdabfed0b 100644 --- a/e107_plugins/rss_menu/admin_prefs.php +++ b/e107_plugins/rss_menu/admin_prefs.php @@ -312,7 +312,6 @@ if(!isset($RSS_ADMIN_LIST_FOOTER)) if(!isset($RSS_ADMIN_CREATE_TABLE)) { $RSS_ADMIN_CREATE_TABLE = " -
@@ -345,7 +344,7 @@ if(!isset($RSS_ADMIN_CREATE_TABLE)) - +
{RSS_ADMIN_FORM_CREATEBUTTON}{RSS_ADMIN_FORM_CREATEBUTTON}
@@ -356,49 +355,39 @@ if(!isset($RSS_ADMIN_CREATE_TABLE)) if(!isset($RSS_ADMIN_OPTIONS_TABLE)) { $RSS_ADMIN_OPTIONS_TABLE = " -
- - - - - +
".LAN_OPTIONS."".RSS_LAN_ADMIN_14."
- - -
".RSS_LAN_ADMIN_13." - +
".RSS_LAN_ADMIN_19." - +
".RSS_LAN_ADMIN_33." - +
- ".$frm->admin_button('updatesettings',LAN_SAVE,'update')." + ".$frm->admin_button('updatesettings', LAN_UPDATE, 'update')."
-
-
"; + "; } // Admin : rss import if(!isset($RSS_ADMIN_IMPORT_HEADER)) { $RSS_ADMIN_IMPORT_HEADER = " -
- +
".RSS_LAN_ADMIN_16." ".RSS_LAN_ADMIN_3." @@ -424,10 +413,10 @@ if(!isset($RSS_ADMIN_IMPORT_FOOTER)) $RSS_ADMIN_IMPORT_FOOTER = "
- ".$frm->admin_button('import_rss',RSS_LAN_ADMIN_17,'submit')." + ".$frm->admin_button('import_rss',RSS_LAN_ADMIN_17,'submit')."
-
"; + "; } // Listing diff --git a/e107_plugins/tagwords/tagwords_template.php b/e107_plugins/tagwords/tagwords_template.php index 7f5065dee..51f5bf534 100644 --- a/e107_plugins/tagwords/tagwords_template.php +++ b/e107_plugins/tagwords/tagwords_template.php @@ -120,13 +120,14 @@ $TEMPLATE_TAGWORDS['menu_cloud'] = " $TEMPLATE_TAGWORDS['admin_options'] = "
- +
- + + @@ -137,7 +138,7 @@ $TEMPLATE_TAGWORDS['admin_options'] = " - + @@ -158,7 +159,7 @@ $TEMPLATE_TAGWORDS['admin_options'] = " - + @@ -180,21 +181,21 @@ $TEMPLATE_TAGWORDS['admin_options'] = " - + - + - +
".LAN_TAG_OPT_25."".LAN_TAG_OPT_25."
".LAN_TAG_OPT_2."{TAG_OPT_CLASS}
".LAN_TAG_OPT_16."".LAN_TAG_OPT_16."
".LAN_TAG_OPT_4."
".LAN_TAG_OPT_17."".LAN_TAG_OPT_17."
".LAN_TAG_OPT_18."
".LAN_TAG_OPT_21."".LAN_TAG_OPT_21."
".LAN_TAG_OPT_22." {TAG_OPT_SEPERATOR}
".LAN_TAG_OPT_23."".LAN_TAG_OPT_23."
".LAN_TAG_OPT_24." {TAG_OPT_ACTIVEAREAS}
{TAG_OPT_BUTTON}{TAG_OPT_BUTTON}
"; diff --git a/e107_plugins/trackback/admin_config.php b/e107_plugins/trackback/admin_config.php index a3ba92cde..a3463c96f 100644 --- a/e107_plugins/trackback/admin_config.php +++ b/e107_plugins/trackback/admin_config.php @@ -24,6 +24,8 @@ if (!getperms("P") || !plugInstalled('trackback')) include_lan(e_PLUGIN."trackback/languages/".e_LANGUAGE."_admin_trackback.php"); require_once(e_ADMIN."auth.php"); + +$frm = e107::getForm(); if (isset($_POST['updatesettings'])) { @@ -53,30 +55,23 @@ if (isset($message)) $text = " -
- +
- - + + - - - - - - - + +
".TRACKBACK_L7." - ".TRACKBACK_L5."   - ".TRACKBACK_L6." -".TRACKBACK_L7." + ".TRACKBACK_L5."   + ".TRACKBACK_L6." +
".TRACKBACK_L8." - -
- -
".TRACKBACK_L8."
+
+ ".$frm->admin_button('updatesettings', LAN_UPDATE, 'update')." +
"; diff --git a/e107_plugins/trackback/languages/English_admin_trackback.php b/e107_plugins/trackback/languages/English_admin_trackback.php index 80f6ddfbd..97e707210 100644 --- a/e107_plugins/trackback/languages/English_admin_trackback.php +++ b/e107_plugins/trackback/languages/English_admin_trackback.php @@ -23,7 +23,7 @@ define("TRACKBACK_L5", "On"); define("TRACKBACK_L6", "Off"); define("TRACKBACK_L7", "Activate trackback"); define("TRACKBACK_L8", "Trackback URL text"); -define("TRACKBACK_L9", "Save Settings"); +//define("TRACKBACK_L9", "Save Settings"); define("TRACKBACK_L10", "Trackback Settings"); define("TRACKBACK_L11", "Trackback address for this post:");