diff --git a/comment.php b/comment.php index 670935946..ed007fd06 100644 --- a/comment.php +++ b/comment.php @@ -24,7 +24,7 @@ require_once('class2.php'); e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE); - if (vartrue(e107::getPref('comments_disabled'))) + if (!empty(e107::getPref('comments_disabled'))) { exit; } @@ -107,7 +107,8 @@ if(e_AJAX_REQUEST) // TODO improve security { $pid = intval(varset($_POST['pid'], 0)); // ID of the specific comment being edited (nested comments - replies) $row = array(); - $clean_authorname = vartrue(filter_var($_POST['author_name'],FILTER_SANITIZE_STRING),USERNAME); + $authName = filter_var($_POST['author_name'],FILTER_SANITIZE_STRING); + $clean_authorname = vartrue($authName,USERNAME); $clean_comment = e107::getParser()->toText($_POST['comment']); $clean_subject = e107::getParser()->filter($_POST['subject'],'str'); $clean_table = e107::getParser()->filter($_POST['table'],'str'); diff --git a/e107_admin/admin_log.php b/e107_admin/admin_log.php index c044dc1e3..386d4461c 100644 --- a/e107_admin/admin_log.php +++ b/e107_admin/admin_log.php @@ -32,9 +32,11 @@ if(! getperms('S')) e107::coreLan('admin_log', true); e107::coreLan('log_messages', true); -if(is_array($pref['lan_log_list'])) //... and for any plugins which support it +$logList = e107::pref('core', 'lan_log_list'); + +if(is_array($logList)) //... and for any plugins which support it { - foreach($pref['lan_log_list'] as $path => $file) + foreach($logList as $path => $file) { // $file = str_replace('--LAN--', e_LANGUAGE, $file); @@ -504,7 +506,7 @@ class admin_log_form_ui extends e_admin_form_ui case 'filter': case 'batch': - return $array; + // return $array; break; } } @@ -659,7 +661,7 @@ class admin_log_form_ui extends e_admin_form_ui case 'filter': case 'batch': - return $array; + // return $array; break; } } @@ -684,7 +686,7 @@ class admin_log_form_ui extends e_admin_form_ui case 'filter': case 'batch': - return $array; + // return $array; break; } } diff --git a/e107_core/bbcodes/bb_img.php b/e107_core/bbcodes/bb_img.php index 8a5aeb383..d78ba50dd 100644 --- a/e107_core/bbcodes/bb_img.php +++ b/e107_core/bbcodes/bb_img.php @@ -23,7 +23,7 @@ class bb_img extends e_bb_base if(!empty($parms['class'])) $safe['class'] = eHelper::secureClassAttr($parms['class']); if(!empty($parms['id'])) $safe['id'] = eHelper::secureIdAttr($parms['id']); if(!empty($parms['style'])) $safe['style'] = eHelper::secureStyleAttr($parms['style']); - if(!empty($parms['alt'])) $safe['alt'] = e107::getParser()->filter($parms['alt'],'str'); + if(!empty($parms['alt'])) $safe['alt'] = e107::getParser()->filter($parms['alt']); if(isset($parms['width'])) $safe['width'] = (int) $parms['width']; if(!empty($safe)) @@ -33,11 +33,13 @@ class bb_img extends e_bb_base return '[img]'.$code_text.'[/img]'; } - - /** - * Media Manager bbcode. eg. using {e_MEDIA_IMAGE} and auto-resizing. - * @return tag with resized image. - */ + + /** + * Media Manager bbcode. eg. using {e_MEDIA_IMAGE} and auto-resizing. + * @param $code_text + * @param $parm + * @return string tag with resized image. + */ private function mediaImage($code_text,$parm) { $tp = e107::getParser(); @@ -66,7 +68,8 @@ class bb_img extends e_bb_base } } - $w = vartrue($imgParms['width']) ? intval($imgParms['width']) : vartrue(e107::getBB()->resizeWidth(),0); + $resizeWidth = e107::getBB()->resizeWidth(); + $w = vartrue($imgParms['width']) ? intval($imgParms['width']) : vartrue($resizeWidth,0); // $h = vartrue($imgParms['height']) ? intval($imgParms['height']) : e107::getBB()->resizeHeight(); // $resize = "&w=".$w; // Always resize - otherwise the thumbnailer returns nothing. @@ -83,7 +86,7 @@ class bb_img extends e_bb_base $html = "
\n"; // $html .= ""; $html .= $tp->toImage($code_text, $imgParms); - $html .= "
".e107::getParser()->filter($figcaption,'str')."
\n"; + $html .= "
".e107::getParser()->filter($figcaption)."
\n"; $html .= "
"; return $html; @@ -96,10 +99,13 @@ class bb_img extends e_bb_base } - - /** - * Process the [img] bbcode parm. ie. [img parms]something[/img] - */ + /** + * Process the [img] bbcode parm. ie. [img parms]something[/img] + * @param $code_text + * @param $parm + * @param string $mode + * @return array|string + */ private function processParm($code_text, $parm, $mode='') { @@ -278,4 +284,3 @@ class bb_img extends e_bb_base } -?> \ No newline at end of file diff --git a/e107_core/shortcodes/single/nextprev.php b/e107_core/shortcodes/single/nextprev.php index 6aee1c844..613ba773a 100644 --- a/e107_core/shortcodes/single/nextprev.php +++ b/e107_core/shortcodes/single/nextprev.php @@ -440,7 +440,8 @@ function nextprev_shortcode($parm = '') else // new - page support in format 'p:1' { $perpage = 1; - $current_start = intval(array_pop(explode(':', $p[2], 2))); + $exp = explode(':', $p[2], 2); + $current_start = intval(array_pop($exp)); $current_page = $current_start; $total_pages = $total_items; $index_add = 1; diff --git a/e107_handlers/application.php b/e107_handlers/application.php index d7a2aae44..1ec9b5d27 100644 --- a/e107_handlers/application.php +++ b/e107_handlers/application.php @@ -3023,7 +3023,7 @@ class eController * Add document title * @param string $title * @param boolean $meta auto-add it as meta-title - * @return eResponse + * @return eController */ public function addTitle($title, $meta = true) { diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index f9c610c9d..cfbab8451 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -1323,15 +1323,15 @@ class e_parse extends e_parser break; } } - else + + $pos++; + if(!$intag) { - $pos++; - if(!$intag) - { - $curlen++; - } - break; + $curlen++; } + + break; + default: $pos++; if(!$intag) diff --git a/e107_handlers/model_class.php b/e107_handlers/model_class.php index 17eac644e..e8d936ce2 100755 --- a/e107_handlers/model_class.php +++ b/e107_handlers/model_class.php @@ -2309,7 +2309,7 @@ class e_front_model extends e_model // get values form validated array when possible // we need it because of advanced validation methods e.g. 'compare' // FIX - security issue, toDb required - if(isset($valid_data[$field])) $dt = $tp->toDb($valid_data[$field]); + if(isset($valid_data[$field])) $dt = $tp->toDB($valid_data[$field]); $this->setData($field, $dt, $strict) ->removePostedData($field); @@ -2925,8 +2925,8 @@ class e_front_model extends e_model if($undo) { $this->setData($ret['model_base_data']) - ->isModified($ret['model_base_ismodfied']) - ->setPostedData($ret['posted_data']); + ->isModified($ret['model_base_ismodfied']); + $this->setPostedData($ret['posted_data']); } if($return) return $ret; diff --git a/e107_handlers/news_class.php b/e107_handlers/news_class.php index ad3c1b082..d8525cccf 100644 --- a/e107_handlers/news_class.php +++ b/e107_handlers/news_class.php @@ -582,7 +582,7 @@ class e_news_item extends e_front_model * @param mixed $default * @return string field value */ - public function sc_news_field($parm = '') + public function sc_news_field($parm = null) { $tmp = explode('|', $parm, 2); $field = $tmp[0]; @@ -594,7 +594,7 @@ class e_news_item extends e_front_model $val = $this->field($field, ''); //do more with $parm array, just an example here - if(vartrue($parm['format'])) + if(!empty($parm['format'])) { switch ($parm['format']) { diff --git a/e107_handlers/upload_handler.php b/e107_handlers/upload_handler.php index 8ba1cba4c..5b9860128 100644 --- a/e107_handlers/upload_handler.php +++ b/e107_handlers/upload_handler.php @@ -721,7 +721,7 @@ function get_image_mime($filename, $extended = false) case 'mpa': case 'wma': case 'wmv': - case 'flv': //Flash stream + // case 'flv': //Flash stream case 'f4v': //Flash stream case 'mov': //media case 'avi': //media diff --git a/e107_plugins/alt_auth/alt_auth_adminmenu.php b/e107_plugins/alt_auth/alt_auth_adminmenu.php index 4fc302d0d..cf456f313 100755 --- a/e107_plugins/alt_auth/alt_auth_adminmenu.php +++ b/e107_plugins/alt_auth/alt_auth_adminmenu.php @@ -131,7 +131,7 @@ class alt_auth_admin extends alt_auth_base * Returns a block of table rows with user DB fields and either checkboxes or entry boxes * * @param string $tableType is the prefix used, without the following underscore - * @param $frm is the form object to use to create the text + * @param object $frm is the form object to use to create the text * @param array $parm is the array of options for the current auth type as read from the DB */ public function alt_auth_get_field_list($tableType, $frm, $parm, $asCheckboxes = FALSE) @@ -141,11 +141,11 @@ class alt_auth_admin extends alt_auth_base { if (vartrue($v['showAll']) || vartrue($v[$tableType])) { - $ret .= ""; + $ret .= ""; if ($v['optional'] == FALSE) $ret .= '* '; $ret .= $v['prompt'].':'; - $ret .= ""; + $ret .= ""; // $fieldname = $tableType.'_'.$v['optname']; $fieldname = $tableType.'_xf_'.$f; // Name of the input box $value = varset($v['default'],''); @@ -266,7 +266,7 @@ class alt_auth_admin extends alt_auth_base * Each is a row of a table having two columns (no ...
etc added, so can be embedded in a larger table * * @param string $prefix is the prefix used, without the following underscore - * @param $frm is the form object to use + * @param object $frm is the form object to use * @param array $parm is an array of the current values of each item * @param string $fields is a list of the fields to display, separated by '|'. The names are the key values from $common_fields table * @@ -279,9 +279,9 @@ class alt_auth_admin extends alt_auth_base { if (in_array($fn,$opts)) { - $ret .= "".$cf['prompt']; + $ret .= "".$cf['prompt']; - $ret .= ""; + $ret .= ""; if ($cf['fieldname'] == 'password') { @@ -352,7 +352,8 @@ class alt_auth_admin extends alt_auth_base */ public function altAuthGetPasswordSelector($name, $frm, $currentSelection = '', $getExtended = FALSE) { - $password_methods = ExtendedPasswordHandler::GetPasswordTypes($getExtended); + $ext = new ExtendedPasswordHandler; + $password_methods = $ext->getPasswordTypes($getExtended); $text = ""; $text .= $frm->form_select_open($name); foreach($password_methods as $k => $v) @@ -477,12 +478,12 @@ class alt_auth_admin extends alt_auth_base ".LAN_ALT_42.""; - $text .= "".LAN_ALT_33.""; + $text .= "".LAN_ALT_33.""; // $text .= $frm->form_text('nametovalidate', 35, '', 120); $text .= e107::getForm()->text('nametovalidate','',35); $text .= ""; - $text .= "".LAN_ALT_34.""; + $text .= "".LAN_ALT_34.""; $text .= $frm->form_password('passtovalidate', 35, '', 120); $text .= ""; @@ -550,10 +551,10 @@ class alt_auth_admin extends alt_auth_base function alt_auth_adminmenu() { echo ' '; - if(!is_array($authlist)) + /*if(!is_array($authlist)) { $authlist = alt_auth_admin::alt_auth_get_authlist(); - } + }*/ define('ALT_AUTH_ACTION', 'main'); $var['main']['text'] = LAN_ALT_31; @@ -567,6 +568,7 @@ function alt_auth_adminmenu() $var = array(); + /* foreach($authlist as $a) { if($a != 'e107') @@ -574,10 +576,10 @@ function alt_auth_adminmenu() $var[$a]['text'] = LAN_ALT_30.$a; $var[$a]['link'] = e_PLUGIN."alt_auth/{$a}_conf.php"; } - } + }*/ - show_admin_menu(LAN_ALT_29, ALT_AUTH_ACTION, $var); + // show_admin_menu(LAN_ALT_29, ALT_AUTH_ACTION, $var); } diff --git a/e107_plugins/alt_auth/alt_auth_login_class.php b/e107_plugins/alt_auth/alt_auth_login_class.php index 3d11eb829..59d7cb994 100755 --- a/e107_plugins/alt_auth/alt_auth_login_class.php +++ b/e107_plugins/alt_auth/alt_auth_login_class.php @@ -242,7 +242,8 @@ class alt_login switch($login_result) { case AUTH_NOCONNECT: - if(varset(e107::getPref('auth_noconn'), TRUE)) + $noconn = e107::getPref('auth_noconn'); + if(varset($noconn, TRUE)) { $this->loginResult = LOGIN_TRY_OTHER; return; @@ -252,7 +253,8 @@ class alt_login return; case AUTH_BADPASSWORD: case AUTH_NOUSER: - if(varset(e107::getPref('auth_badpassword'), TRUE)) + $badpass = e107::getPref('auth_badpassword'); + if(varset($badpass, TRUE)) { $this->loginResult = LOGIN_TRY_OTHER; return; diff --git a/e107_plugins/banner/admin_banner.php b/e107_plugins/banner/admin_banner.php index cb39759fe..63c732992 100644 --- a/e107_plugins/banner/admin_banner.php +++ b/e107_plugins/banner/admin_banner.php @@ -155,7 +155,7 @@ class banner_ui extends e_admin_ui // ------- Customize Create -------- - + public function beforeCreate($new_data, $old_data) { // e107::getMessage()->addDebug(print_a($new_data,true)); @@ -439,7 +439,7 @@ class banner_form_ui extends e_admin_form_ui function banner_image($curVal,$mode) { - $frm = e107::getForm(); + switch($mode) { @@ -486,6 +486,8 @@ class banner_form_ui extends e_admin_form_ui return $this->clients; break; } + + return null; } @@ -523,6 +525,8 @@ class banner_form_ui extends e_admin_form_ui return $this->clients; break; } + + return null; } @@ -546,6 +550,8 @@ class banner_form_ui extends e_admin_form_ui return null; break; } + + return null; } // Custom Method/Function @@ -616,15 +622,14 @@ class banner_form_ui extends e_admin_form_ui { return null; } - - $frm = e107::getForm(); - + + unset($curVal); // keep inspector happy. + $banner_row = $this->getController()->getListModel()->getData(); // return print_a($banner_row,true); - $clickpercentage = ($banner_row['banner_clicks'] && $banner_row['banner_impressions'] ? round(($banner_row['banner_clicks'] / $banner_row['banner_impressions']) * 100,1)."%" : "-"); - - return $clickpercentage; + return ($banner_row['banner_clicks'] && $banner_row['banner_impressions'] ? round(($banner_row['banner_clicks'] / $banner_row['banner_impressions']) * 100,1)."%" : "-"); + //$impressions_left = ($banner_row['banner_impurchased'] ? $banner_row['banner_impurchased'] - $banner_row['banner_impressions'] : BANNERLAN_30); // $impressions_purchased = ($banner_row['banner_impurchased'] ? $banner_row['banner_impurchased'] : BANNERLAN_30); } @@ -633,7 +638,7 @@ class banner_form_ui extends e_admin_form_ui } -new banner_admin(); +new banner_admin; require_once(e_ADMIN."auth.php"); e107::getAdminUI()->runPage(); diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index b08749a96..2512fb3f8 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -127,7 +127,8 @@ class download { if (is_numeric($tmp[0])) //legacy // $tmp[0] at least must be valid { - $this->qry['action'] = varset(preg_replace("#\W#", "", $tp->toDB($tmp[1])),'list'); + $parsed = preg_replace("#\W#", "", $tp->toDB($tmp[1])); + $this->qry['action'] = varset($parsed,'list'); $this->qry['id'] = intval($tmp[2]); $this->qry['view'] = intval($tmp[3]); $this->qry['order'] = preg_replace("#\W#", "", $tp->toDB($tmp[4])); diff --git a/e107_plugins/faqs/faqs.php b/e107_plugins/faqs/faqs.php index b1821b63b..6624ae8d3 100644 --- a/e107_plugins/faqs/faqs.php +++ b/e107_plugins/faqs/faqs.php @@ -177,16 +177,19 @@ if (isset($_POST['commentsubmit'])) require_once (HEADERF); - $ns->tablerender($ftmp['caption'], $ftmp['text']); + e107::getRender()->tablerender($ftmp['caption'], $ftmp['text']); } if($action == "cat" && $idx) { $ftmp = $faq->view_faq($idx) ; - define("e_PAGETITLE",LAN_FAQS_011." - ". $ftmp['title']); + if(!defined("e_PAGETITLE")) + { + define("e_PAGETITLE", LAN_FAQS_011." - ". $ftmp['title']); + } require_once(HEADERF); - $ns->tablerender($ftmp['caption'], $ftmp['text']); + e107::getRender()->tablerender($ftmp['caption'], $ftmp['text']); } if ($action == "cat") @@ -195,7 +198,7 @@ if (isset($_POST['commentsubmit'])) define("e_PAGETITLE", strip_tags($ftmp['title'].$ftmp['caption'])); require_once (HEADERF); - $ns->tablerender($ftmp['caption'], $ftmp['text']); + e107::getRender()->tablerender($ftmp['caption'], $ftmp['text']); } diff --git a/e107_plugins/featurebox/e_shortcode.php b/e107_plugins/featurebox/e_shortcode.php index af15872a9..066088df2 100644 --- a/e107_plugins/featurebox/e_shortcode.php +++ b/e107_plugins/featurebox/e_shortcode.php @@ -32,7 +32,8 @@ class featurebox_shortcodes// must match the plugin's folder name. ie. [PLUGIN_F if($parm == null && $mod == '') // ie {FEATUREBOX} { - $type = vartrue(e107::getPlugPref('featurebox','menu_category'),'bootstrap_carousel'); + $menCat = e107::getPlugPref('featurebox','menu_category'); + $type = vartrue($menCat,'bootstrap_carousel'); $text = e107::getParser()->parseTemplate("{FEATUREBOX|".$type."}"); return $text; diff --git a/e107_plugins/featurebox/featurebox_menu.php b/e107_plugins/featurebox/featurebox_menu.php index 3e53f8be5..0aa240ec3 100644 --- a/e107_plugins/featurebox/featurebox_menu.php +++ b/e107_plugins/featurebox/featurebox_menu.php @@ -9,8 +9,8 @@ if (!defined('e107_INIT')) { exit; } // e107::Lan('featurebox', 'front'); e107::includeLan(e_PLUGIN.'featurebox/languages/'.e_LANGUAGE.'_admin_featurebox.php'); // This line added to admin warning - -$type = vartrue(e107::getPlugPref('featurebox','menu_category'),'bootstrap_carousel'); +$cat = e107::getPlugPref('featurebox','menu_category'); +$type = vartrue($cat,'bootstrap_carousel'); $text = e107::getParser()->parseTemplate("{FEATUREBOX|".$type."}"); if(empty($text)) diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index 6fb155a47..912710583 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -219,8 +219,8 @@ function parse_forum($f, $restricted_string = '') if(!empty($forumList['subs']) && is_array($forumList['subs'][$f['forum_id']])) { - - $lastpost_datestamp = reset(explode('.', $f['forum_lastpost_info'])); + $lastPost = explode('.', $f['forum_lastpost_info']); + $lastpost_datestamp = reset($lastPost); $ret = parse_subs($forumList, $f['forum_id'], $lastpost_datestamp); $f['forum_threads'] += $ret['threads']; diff --git a/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php b/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php index c347a6020..048952df5 100644 --- a/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php @@ -291,7 +291,7 @@ class forum_shortcodes extends e_shortcode $forum = new e107forum; //$trackPref = $forum->prefs->get('track'); //if (USER && vartrue($trackPref) && e_QUERY != 'track') - if (USER && vartrue($forum->prefs->get('track')) && e_QUERY != 'track') + if (USER && !empty($forum->prefs->get('track')) && e_QUERY != 'track') { $text .= "
".LAN_FORUM_0030.''; } diff --git a/e107_plugins/gallery/controllers/index.php b/e107_plugins/gallery/controllers/index.php index 7706bfdc7..2108f90e8 100644 --- a/e107_plugins/gallery/controllers/index.php +++ b/e107_plugins/gallery/controllers/index.php @@ -120,7 +120,7 @@ class plugin_gallery_index_controller extends eControllerFront $sc = e107::getScBatch('gallery', true); $sc->breadcrumb(); - $text = ""; + // $text = ""; if(defset('BOOTSTRAP') === true || defset('BOOTSTRAP') === 2) // Convert bootsrap3 to bootstrap2 compat. { @@ -132,7 +132,7 @@ class plugin_gallery_index_controller extends eControllerFront foreach($this->catList as $val) { $sc->setVars($val); - $text .= e107::getParser()->parseTemplate($template['cat']['item'], true); + $text .= e107::getParser()->parseTemplate($template['cat']['item']); } $text .= e107::getParser()->parseTemplate($template['cat']['end'], true, $sc); diff --git a/e107_plugins/gallery/e_shortcode.php b/e107_plugins/gallery/e_shortcode.php index 8d6ff2092..63bfc1f75 100644 --- a/e107_plugins/gallery/e_shortcode.php +++ b/e107_plugins/gallery/e_shortcode.php @@ -223,7 +223,8 @@ class gallery_shortcodes extends e_shortcode function sc_gallery_slideshow($parm = '') { - $this->sliderCat = ($parm) ? $parm : vartrue(e107::getPlugPref('gallery', 'slideshow_category'), 1); + $slideCat = e107::getPlugPref('gallery', 'slideshow_category'); + $this->sliderCat = ($parm) ? $parm : vartrue($slideCat, 1); $tmpl = e107::getTemplate('gallery', 'gallery'); $template = array_change_key_case($tmpl); @@ -241,7 +242,8 @@ class gallery_shortcodes extends e_shortcode $ns = e107::getRender(); $tp = e107::getParser(); // $parm = eHelper::scParams($parms); - $cat = (!empty($parm['category'])) ? $parm['category'] : vartrue(e107::getPlugPref('gallery', 'slideshow_category'), false); //TODO Separate pref? + $slideCat = e107::getPlugPref('gallery', 'slideshow_category'); + $cat = (!empty($parm['category'])) ? $parm['category'] : vartrue($slideCat, false); //TODO Separate pref? $tmpl = e107::getTemplate('gallery', 'gallery'); $limit = vartrue($parm['limit'], 6); diff --git a/e107_plugins/gsitemap/admin_config.php b/e107_plugins/gsitemap/admin_config.php index 1a3fa10a9..a9a3200f3 100644 --- a/e107_plugins/gsitemap/admin_config.php +++ b/e107_plugins/gsitemap/admin_config.php @@ -1,4 +1,4 @@ -forum_attachment_path = vartrue(trim($_POST['forum_attachment_path'],"/" ), false); + $formattach = trim($_POST['forum_attachment_path'],"/" ); + $this->forum_attachment_path = vartrue($formattach, false); if($data = e107::getDb('phpbb')->retrieve('userclass_classes','userclass_id',"userclass_name='FORUM_MODERATOR' ")) { diff --git a/e107_plugins/import/providers/rss_import_class.php b/e107_plugins/import/providers/rss_import_class.php index c2b84da0e..329d8497e 100644 --- a/e107_plugins/import/providers/rss_import_class.php +++ b/e107_plugins/import/providers/rss_import_class.php @@ -198,7 +198,7 @@ class rss_import extends base_import_class } - function process($type='description',$source) + function process($type,$source) { switch ($type) { diff --git a/e107_plugins/login_menu/login_menu_class.php b/e107_plugins/login_menu/login_menu_class.php index 5d46ede81..221b01fc9 100644 --- a/e107_plugins/login_menu/login_menu_class.php +++ b/e107_plugins/login_menu/login_menu_class.php @@ -86,7 +86,8 @@ class login_menu_class { foreach ($list_arr as $item) { - $tmp = end(explode('/', trim($item['path'], '/.'))); + $path = explode('/', trim($item['path'], '/.')); + $tmp = end($path); if(e107::isInstalled($tmp)) { diff --git a/e107_plugins/newsfeed/admin_config.php b/e107_plugins/newsfeed/admin_config.php index 8ab56a77f..7a6aa9ba6 100644 --- a/e107_plugins/newsfeed/admin_config.php +++ b/e107_plugins/newsfeed/admin_config.php @@ -118,7 +118,7 @@ class newsfeed_ui extends e_admin_ui // ------- Customize Create -------- - public function beforeCreate($new_data) + public function beforeCreate($new_data, $old_data) { if(isset($new_data['newsfeed_showmenu'])) { diff --git a/e107_plugins/newsletter/nl_archive.php b/e107_plugins/newsletter/nl_archive.php index 1c4b7e12c..ff139c38a 100644 --- a/e107_plugins/newsletter/nl_archive.php +++ b/e107_plugins/newsletter/nl_archive.php @@ -27,13 +27,15 @@ if(e_QUERY) { $tmp = explode('.', e_QUERY); $action = $tmp[0]; - $action_parent_id = varset(intval($tmp[1], 0)); - $action_nl_id = varset(intval($tmp[2], 0)); + $parID = intval($tmp[1], 0); + $nlID = intval($tmp[2], 0); + $action_parent_id = varset($parID); + $action_nl_id = varset($nlID); unset($tmp); } $page_size = 10; // Might become a preference setting later on -$text .= "
"; +$text = "
"; if (($action <> 'show' && $action <> 'showp') || ($action_parent_id == 0)) { // Action 'show' displays initial page, 'showp' displays following pages diff --git a/e107_plugins/pm/admin_config.php b/e107_plugins/pm/admin_config.php index d3348b213..26da81680 100644 --- a/e107_plugins/pm/admin_config.php +++ b/e107_plugins/pm/admin_config.php @@ -881,7 +881,7 @@ class private_msg_ui extends e_admin_ui } - public function beforeCreate($new_data) + public function beforeCreate($new_data, $old_data) { if(empty($new_data['pm_to'])) diff --git a/e107_plugins/pm/pm_class.php b/e107_plugins/pm/pm_class.php index 58abbd090..b6eaf1b6b 100755 --- a/e107_plugins/pm/pm_class.php +++ b/e107_plugins/pm/pm_class.php @@ -386,8 +386,15 @@ class private_message $template = $PM_NOTIFY; */ - if(THEME_LEGACY){include_once(THEME.'pm_template.php');} - if (!$PM_NOTIFY){$PM_NOTIFY = e107::getTemplate('pm', 'pm', 'notify');} + if(THEME_LEGACY) + { + include_once(THEME.'pm_template.php'); + } + + if(empty($PM_NOTIFY)) + { + $PM_NOTIFY = e107::getTemplate('pm', 'pm', 'notify'); + } if(empty($PM_NOTIFY)) // BC Fallback. { @@ -858,7 +865,7 @@ class private_message ignore_user_abort(true); $data_len = filesize($filename); if ($seek > ($data_len - 1)) $seek = 0; - $res =& fopen($filename, 'rb'); + $res = fopen($filename, 'rb'); if ($seek) { fseek($res , $seek); diff --git a/e107_plugins/social/admin_config.php b/e107_plugins/social/admin_config.php index b13b7949f..b37a80aa6 100644 --- a/e107_plugins/social/admin_config.php +++ b/e107_plugins/social/admin_config.php @@ -637,7 +637,7 @@ class social_ui extends e_admin_ui $frm = e107::getForm(); $textKeys = ''; $textScope = ''; - $label = varset(self::getApiDocumentationUrlFor($provider_name)) ? "" . $pretty_provider_name . "" : $pretty_provider_name; + $label = !empty(self::getApiDocumentationUrlFor($provider_name)) ? "" . $pretty_provider_name . "" : $pretty_provider_name; $radio_label = strtolower($provider_name); $text = " @@ -696,7 +696,7 @@ class social_ui extends e_admin_ui $frm = e107::getForm(); $textKeys = ''; $textScope = ''; - $label = varset(self::getApiDocumentationUrlFor($provider_name)) ? "" . $pretty_provider_name . "" : $pretty_provider_name; + $label = !empty(self::getApiDocumentationUrlFor($provider_name)) ? "" . $pretty_provider_name . "" : $pretty_provider_name; $radio_label = strtolower($provider_name); $text = "