diff --git a/e107_admin/auth.php b/e107_admin/auth.php index dc39fd06f..46613ee2b 100644 --- a/e107_admin/auth.php +++ b/e107_admin/auth.php @@ -86,7 +86,7 @@ if (ADMIN) $asuser = e107::getSystemUser(e107::getUser()->getSessionDataAs(), false); $lanVars = array ('x' => ($asuser->getId() ? $asuser->getName().' ('.$asuser->getValue('email').')' : 'unknown')) ; - e107::getMessage()->addInfo($tp->lanVars(ADLAN_164, $lanVars).' ['.LAN_LOGOUT.']'); + e107::getMessage()->addInfo(e107::getParser()->lanVars(ADLAN_164, $lanVars).' ['.LAN_LOGOUT.']'); } // NEW, legacy 3rd party code fix, header called inside the footer o.O @@ -133,7 +133,7 @@ else else { e107::coreLan('log_messages', true); - e107::getLog()->addEvent(4, __FILE__."|".__FUNCTION__."@".__LINE__, "LOGIN", LAN_ROLL_LOG_11, "U: ".$tp->toDB($_POST['authname']), FALSE, LOG_TO_ROLLING); + e107::getLog()->addEvent(4, __FILE__."|".__FUNCTION__."@".__LINE__, "LOGIN", LAN_ROLL_LOG_11, "U: ".e107::getParser()->toDB($_POST['authname']), FALSE, LOG_TO_ROLLING); e107::getRedirect()->redirect('admin.php?failed'); } diff --git a/e107_admin/boot.php b/e107_admin/boot.php index f53bfb4c9..1fb02e2f0 100644 --- a/e107_admin/boot.php +++ b/e107_admin/boot.php @@ -107,6 +107,7 @@ if(e_AJAX_REQUEST && ADMIN && varset($_GET['mode']) == 'core' && ($_GET['type'] $text = '
'; $count = 1; + $tp = e107::getParser(); foreach($rows['channel']['item'] as $row) { if($count > $limit){ break; } diff --git a/e107_admin/db.php b/e107_admin/db.php index c2c72edd3..4e1c5e5d3 100644 --- a/e107_admin/db.php +++ b/e107_admin/db.php @@ -929,6 +929,8 @@ class system_tools $mes = e107::getMessage(); $sql = e107::getDb('utf8-convert'); + + $qry = []; if($sql->gen($query)) { diff --git a/e107_admin/users_extended.php b/e107_admin/users_extended.php index c8c108d80..65ac57851 100755 --- a/e107_admin/users_extended.php +++ b/e107_admin/users_extended.php @@ -39,13 +39,13 @@ if(varset($_GET['mode']) == "ajax") { $tmp = explode(".", e_QUERY); $action = $tp->filter($tmp[0]); - $sub_action = varset($tmp[1], ''); + $sub_action = varset($tmp[1]); $sub_action = $tp->filter($sub_action); $id = varset($tmp[2], 0); unset($tmp); } - if($sql->select('user_extended_struct', '*', "user_extended_struct_id = '{$sub_action}'")) + if($sql->select('user_extended_struct', '*', "user_extended_struct_id = '$sub_action'")) { $current = $sql->fetch(); } @@ -68,7 +68,7 @@ if(varset($_GET['mode']) == "ajax") foreach($result as $row2) { $fld = $row2; - $selected = (varset($_POST['table_db'], '') == $fld || $curVals[0] == $fld) ? " selected='selected'" : ""; + $selected = (varset($_POST['table_db']) == $fld || $curVals[0] == $fld) ? " selected='selected'" : ""; $text .= "\n"; } $text .= ""; @@ -79,8 +79,8 @@ if(varset($_GET['mode']) == "ajax") $text .= "" . EXTLAN_63 . ""; $text .= ""; $text .= ""; - $table_list = ($_POST['table_db']) ? $_POST['table_db'] : $curVals[0]; + $table_list = !empty($_POST['table_db']) ? $_POST['table_db'] : $curVals[0]; if($sql->gen("DESCRIBE " . MPREFIX . "{$table_list}")) { while($row3 = $sql->fetch()) @@ -111,7 +111,7 @@ if(varset($_GET['mode']) == "ajax") $text .= LAN_ORDER . ""; $text .= "\n \n"; - $table_list = ($_POST['table_db']) ? $_POST['table_db'] : $curVals[0] ; + $table_list = !empty($_POST['table_db']) ? $_POST['table_db'] : $curVals[0] ; if($sql->gen("DESCRIBE ".MPREFIX."{$table_list}")) { @@ -1065,7 +1065,7 @@ e107::js('footer-inline', js()); // Field Value $text .= EXTLAN_64." \n"; - $table_list = ($_POST['table_db']) ? $_POST['table_db'] : $curVals[0] ; + $table_list = !empty($_POST['table_db']) ? $_POST['table_db'] : $curVals[0] ; if($sql ->gen("DESCRIBE ".MPREFIX."{$table_list}")) { diff --git a/e107_core/shortcodes/batch/bbcode_shortcodes.php b/e107_core/shortcodes/batch/bbcode_shortcodes.php index f4bde0746..602e7b68f 100644 --- a/e107_core/shortcodes/batch/bbcode_shortcodes.php +++ b/e107_core/shortcodes/batch/bbcode_shortcodes.php @@ -111,7 +111,7 @@ class bbcode_shortcodes extends e_shortcode // $data = "[list]\n[*]Item 1\n[*]Item 2\n[/list]"; // works with jquery, but not onclick. // $event = $this->getEvent($this->var['trigger'],$data,LANHELP_36); $event = $this->getEvent('addtext',$data,LANHELP_36); - $text = ""; + $text = ""; $text .= $this->button(e_IMAGE_ABS."bbcode/list.png", 'list'); // , LANHELP_36 @@ -207,7 +207,7 @@ class bbcode_shortcodes extends e_shortcode { $data = "[link=*]*[/link]"; $event = $this->getEvent('addinput',$data,LANHELP_35); - $text = "\n"; + $text = ""; // $text .=""; $text .= $this->button(e_IMAGE_ABS.'bbcode/link.png', 'link'); @@ -282,7 +282,7 @@ class bbcode_shortcodes extends e_shortcode $text .= $this->button(e_IMAGE_ABS."bbcode/prefile.png", 'file'); // $text .= ""; - $text .= "\n"; + $text .= ""; return $text; } @@ -337,7 +337,7 @@ class bbcode_shortcodes extends e_shortcode $text .= "\n"; } $text .="
- \n"; + "; return $text; } @@ -379,7 +379,7 @@ class bbcode_shortcodes extends e_shortcode ".$this->renderEmotes()." - \n\n"; + "; return $text; } @@ -400,7 +400,7 @@ class bbcode_shortcodes extends e_shortcode $value2 = substr($value, 0, strpos($value, " ")); $value = ($value2 ? $value2 : $value); $value = ($value == '&|') ? ':((' : $value; - $text .= "\n"; + $text .= ""; } @@ -529,7 +529,7 @@ class bbcode_shortcodes extends e_shortcode // e107::getMessage()->debug("Loaded BB: ".$parm); $unique = $this->var['template']."--".$parm; // works in conjunction with media-manager category - return "\n\n\n".$this->$meth($unique); + return "".$this->$meth($unique); } //XXX NOTE: everything below here could be replaced with separate 'bb_xxxx' methods if need be. (see above) @@ -626,8 +626,8 @@ class bbcode_shortcodes extends e_shortcode if(empty($iconpath[$parm])) return ''; - $pre = "\n"; - $post = "\n"; + $pre = ""; + $post = ""; $_onclick_func = (isset($bbcode[$parm][0])) ? $bbcode[$parm][0] : $bbcode_func; $_onclick_var = (isset($bbcode[$parm][1])) ? $bbcode[$parm][1] : ''; @@ -638,13 +638,13 @@ class bbcode_shortcodes extends e_shortcode if($_onclick_func == 'e-dialog') { // $tagid = "news-body"; // $pre = "\n"; - $pre = "\n"; - $post = "\n"; + $pre = ""; + $post = ""; } else { $pre = "','\\n',($_helptxt))."\" onclick=\"{$_onclick_func}('".$_onclick_var."')\" ".($bbcode_helpactive ? "onmouseout=\"{$bbcode_help}(''{$bbcode_tag})\" onmouseover=\"{$bbcode_help}('".$_helptxt."'{$bbcode_tag})\"" : "" )." >"; - $post = "\n"; // btn-small bbcode bbcode_buttons + $post = ""; // btn-small bbcode bbcode_buttons } if($bbcode[$parm]) // default - insert text. diff --git a/e107_core/shortcodes/single/imageselector.php b/e107_core/shortcodes/single/imageselector.php index 2c87ba67b..1b16d9cbf 100644 --- a/e107_core/shortcodes/single/imageselector.php +++ b/e107_core/shortcodes/single/imageselector.php @@ -55,7 +55,7 @@ function imageselector_shortcode($parm = '', $mod = '') $imagelist[$row['media_category']][] = array('path' => $row['media_url'], 'fname' => $row['media_name']. " (".$row['media_dimensions'].") "); } - asort($opts); + asort($imagelist); } } else diff --git a/e107_core/templates/bbcode_template.php b/e107_core/templates/bbcode_template.php index bbdf71e28..aeefe5154 100644 --- a/e107_core/templates/bbcode_template.php +++ b/e107_core/templates/bbcode_template.php @@ -19,8 +19,7 @@ // This is used on the front-end. ie. comments etc. $BBCODE_TEMPLATE = " - {BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=left}{BB=center}{BB=right}{BB=justify} - {BB=bq}{BB=list}{BB=emotes} + {BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=left}{BB=center}{BB=right}{BB=justify}{BB=bq}{BB=list}{BB=emotes}
"; @@ -29,8 +28,7 @@ $BBCODE_TEMPLATE_COMMENT = ""; // no buttons on comments by default. // $BBCODE_TEMPLATE .= "{BB=blank}"; $BBCODE_TEMPLATE_SIGNATURE = " - {BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=left}{BB=center}{BB=right}{BB=justify} - {BB=list} + {BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=left}{BB=center}{BB=right}{BB=justify}{BB=list}
"; @@ -73,8 +71,7 @@ $BBCODE_TEMPLATE_MAILOUT = " $BBCODE_TEMPLATE_NEWSPOST = "
- {BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=format}{BB=left}{BB=center}{BB=right}{BB=justify} - {BB=list}{BB=table}{BB=fontcol}{BB=fontsize}{BB=emotes}{BB=flash} + {BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=format}{BB=left}{BB=center}{BB=right}{BB=justify}{BB=list}{BB=table}{BB=fontcol}{BB=fontsize}{BB=emotes}{BB=flash} {BB_PREIMAGEDIR=news}
{BB=preimage}{BB=prefile}{BB=youtube}
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 819974278..4f508e682 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -590,8 +590,8 @@ class e_form - $active = ($key ==$initTab) ? ' class="nav-item active"' : ' class="nav-item"'; - $text .= ''.$tab['caption'].''; + $active = ($key ==$initTab) ? 'active"' : ''; + $text .= ''; $c++; } diff --git a/e107_handlers/library_manager.php b/e107_handlers/library_manager.php index 3456a5e5a..efdcc65df 100755 --- a/e107_handlers/library_manager.php +++ b/e107_handlers/library_manager.php @@ -378,9 +378,9 @@ class core_library 'variants' => array(), // Override library path to CDN. //https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css - 'library_path' => 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.1', + 'library_path' => 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.3', 'path' => '', - 'version' => '5.1.1', + 'version' => '5.1.3', ); @@ -410,7 +410,7 @@ class core_library 'variants' => array(), 'library_path' => '{e_WEB}lib/bootstrap', 'path' => '5', - 'version' => '5.1.1', + 'version' => '5.1.3', ); diff --git a/e107_handlers/upload_handler.php b/e107_handlers/upload_handler.php index b4878c52c..c70801221 100644 --- a/e107_handlers/upload_handler.php +++ b/e107_handlers/upload_handler.php @@ -432,7 +432,7 @@ function handle_upload_messages(&$upload_array, $errors_only = TRUE, $use_handle { // Display error messages, accumulate FMESSAGE // Write as a separate routine - returns all messages displayed. Option to only display failures. - $f_message = ''; + $f_message = []; foreach ($upload_array as $k=>$r) { if (!$errors_only || $r['error']) diff --git a/e107_plugins/download/handlers/adminDownload_class.php b/e107_plugins/download/handlers/adminDownload_class.php index a739f9314..78f0e28d4 100644 --- a/e107_plugins/download/handlers/adminDownload_class.php +++ b/e107_plugins/download/handlers/adminDownload_class.php @@ -29,7 +29,7 @@ class adminDownload extends download function __construct() { global $pref; - parent::download(); + parent::__construct(); $this->userclassOptions = 'blank,nobody,guest,public,main,admin,member,classes'; // Save basic search string diff --git a/e107_plugins/featurebox/includes/item.php b/e107_plugins/featurebox/includes/item.php index eb627b3bb..8668e47b0 100644 --- a/e107_plugins/featurebox/includes/item.php +++ b/e107_plugins/featurebox/includes/item.php @@ -62,7 +62,7 @@ class plugin_featurebox_item extends e_model $ret = $tp->toHTML($this->get('fb_title'), false, 'TITLE'); if(isset($parm['url']) && $this->get('fb_imageurl')) { - return ''.$ret.''; + return ''.$ret.''; } return $ret; @@ -98,7 +98,7 @@ class plugin_featurebox_item extends e_model - return ''.$title.''; + return ''.$title.''; } @@ -147,7 +147,7 @@ class plugin_featurebox_item extends e_model $imageSrc = ($parm != 'placeholder') ? $this->get('fb_image') : ""; - if($tp->thumbWidth > 100 || $tp->thumbHeight > 100) //Guessing it's a featurebox image. Use {SETIMAGE} inside theme.php to configure. + if($tp->thumbWidth() > 100 || $tp->thumbHeight() > 100) //Guessing it's a featurebox image. Use {SETIMAGE} inside theme.php to configure. { $src = $tp->thumbUrl($imageSrc); //XXX TODO TBD Add a pref to use without resizing? Or, detect {SETIMAGE} in template to enable? } diff --git a/e107_plugins/forum/templates/bbcode_template.php b/e107_plugins/forum/templates/bbcode_template.php index 53f9b2ac9..a43f42279 100644 --- a/e107_plugins/forum/templates/bbcode_template.php +++ b/e107_plugins/forum/templates/bbcode_template.php @@ -13,7 +13,6 @@ $BBCODE_TEMPLATE['forum'] = "
- {BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=format}{BB=left}{BB=center}{BB=right}{BB=justify} - {BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}{BB=youtube} + {BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=format}{BB=left}{BB=center}{BB=right}{BB=justify}{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}{BB=youtube}
"; diff --git a/e107_plugins/hero/templates/hero_template.php b/e107_plugins/hero/templates/hero_template.php index 55aff0d49..0ebcca822 100644 --- a/e107_plugins/hero/templates/hero_template.php +++ b/e107_plugins/hero/templates/hero_template.php @@ -14,11 +14,11 @@ $HERO_TEMPLATE['default']['header'] = '{SETIMAGE: w=4 $HERO_TEMPLATE['default']['footer'] = '