diff --git a/class2.php b/class2.php
index 3034da42a..112d69bab 100755
--- a/class2.php
+++ b/class2.php
@@ -64,7 +64,10 @@ if(function_exists('utf8_encode') === false)
if(!isset($_E107['cli']))
{
- while (@ob_end_clean()); // destroy all ouput buffering
+ while (ob_get_length() !== false) // destroy all ouput buffering
+ {
+ ob_end_clean();
+ }
ob_start(); // start our own.
$oblev_at_start = ob_get_level(); // preserve when destroying globals in step C
}
@@ -328,7 +331,6 @@ if(!defined('e_SECURITY_LEVEL'))
//$e107->url = e107::getUrl(); - caught by __get()
//TODO - find & replace $e107->url
//DEPRECATED, BC, $e107->tp caught by __get()
-/** @var e_parse $tp */
$tp = e107::getParser(); //TODO - find & replace $tp, $e107->tp
//define("e_QUERY", $matches[2]);
@@ -1960,6 +1962,7 @@ function save_prefs($table = 'core', $uid = USERID, $row_val = '')
break;
}
+
}
@@ -2747,10 +2750,6 @@ class e_http_header
{
$this->compress_output = (bool) e107::getPref('compress_output', false);
}
- else
- {
- $this->compress_output = false;
- }
}
diff --git a/e107_admin/auth.php b/e107_admin/auth.php
index 8ac8d8241..2ff7dc995 100644
--- a/e107_admin/auth.php
+++ b/e107_admin/auth.php
@@ -117,7 +117,7 @@ else
if (e_AJAX_REQUEST)
{
require_once (e_HANDLER.'js_helper.php');
- e_jshelper::sendAjaxError(403, ADLAN_86, ADLAN_87, true);
+ e_jshelper::sendAjaxError(403, ADLAN_86, ADLAN_87);
}
require_once(e_ADMIN.'boot.php');
diff --git a/e107_admin/banlist_export.php b/e107_admin/banlist_export.php
index c6259d0f6..68fcd71ed 100644
--- a/e107_admin/banlist_export.php
+++ b/e107_admin/banlist_export.php
@@ -72,7 +72,7 @@ if ($error_string = do_export($filename, $type_list, $format_array, $use_separat
banlist_adminlog('06','File: '.$filename.'
'.$error_string);
-function do_export($filename, $type_list='',$format_array, $sep = ',', $quot = '"')
+function do_export($filename, $type_list='',$format_array=array(), $sep = ',', $quot = '"')
{
$sql = e107::getDb();
$export_text = '';
diff --git a/e107_admin/image.php b/e107_admin/image.php
index e35fc679a..b6a211571 100644
--- a/e107_admin/image.php
+++ b/e107_admin/image.php
@@ -2760,7 +2760,7 @@ class media_admin_ui extends e_admin_ui
$count = 0;
$prevType = '';
- while (list($key, $image_name) = each($dirlist))
+ foreach($dirlist as $key=>$image_name)
{
//$users = IMALAN_21." | ";
$row = array('user_id' => '');
diff --git a/e107_admin/includes/classis.php b/e107_admin/includes/classis.php
index d0993b014..adc3d1156 100644
--- a/e107_admin/includes/classis.php
+++ b/e107_admin/includes/classis.php
@@ -15,21 +15,22 @@ if (!defined('e107_INIT')) { exit; }
$mes = e107::getMessage();
$buts = "";
- $newarray = e107::getNav()->adminLinks('core');
-
-while (list($key, $funcinfo) = each($newarray))
+$newarray = e107::getNav()->adminLinks('core');
+foreach($newarray as $key=>$funcinfo)
{
$buts .= e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[6], "classis");
}
-if($buts != "")
+
+if(!empty($buts))
{
$text = "
diff --git a/e107_admin/includes/compact.php b/e107_admin/includes/compact.php
index 18012277e..7b193e46e 100644
--- a/e107_admin/includes/compact.php
+++ b/e107_admin/includes/compact.php
@@ -21,26 +21,28 @@ $newarray = e107::getNav()->adminLinks('core');
$buts = "";
$text = "
";
-
-while (list($key, $funcinfo) = each($newarray))
+foreach($newarray as $key=>$funcinfo)
{
$buts .= e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[5], 'default');
}
+
$text .= $buts;
$text_cat = '';
+$td = 0;
while ($td <= 5)
{
$text_cat .= " | ";
$td++;
}
+
$td = 1;
$text .= "
";
-if($buts !="")
+if(!empty($buts))
{
- $ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
+ e107::getRender()->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
}
$text = "
@@ -53,8 +55,7 @@ $text .= e107::getNav()->pluginLinks( E_16_PLUGMANAGER, 'default');
$text .= "
";
-$ns->tablerender(ADLAN_CL_7, $text);
+e107::getRender()->tablerender(ADLAN_CL_7, $text);
echo admin_info();
-?>
\ No newline at end of file
diff --git a/e107_admin/users.php b/e107_admin/users.php
index 49a5e4ae1..4c5c049fe 100644
--- a/e107_admin/users.php
+++ b/e107_admin/users.php
@@ -466,7 +466,7 @@ class users_admin_ui extends e_admin_ui
}
- public function afterDelete($deletedData, $id=null, $deleted_check)
+ public function afterDelete($deletedData, $id, $deleted_check)
{
if(!empty($id))
{
diff --git a/e107_admin/users_extended.php b/e107_admin/users_extended.php
index 76cce070a..a6d76f1f0 100755
--- a/e107_admin/users_extended.php
+++ b/e107_admin/users_extended.php
@@ -2455,21 +2455,3 @@ class users_ext
}
}// end class
-
-
- function users_extended_adminmenu() {
- global $user, $action, $ns, $curtype, $action;
- // $user->show_options($action);
- $ac = e_QUERY;
- $action = vartrue($ac,'main');
-
- users_ext::show_options($action);
- if($action == 'editext' || $action == 'continue')
- {
- $ns->tablerender(EXTLAN_46." -
", "
");
- echo "";
- }
- }
-
-
-?>
diff --git a/e107_core/bbcodes/bb_youtube.php b/e107_core/bbcodes/bb_youtube.php
index dcb888e0a..e48499ffd 100644
--- a/e107_core/bbcodes/bb_youtube.php
+++ b/e107_core/bbcodes/bb_youtube.php
@@ -174,9 +174,9 @@ class bb_youtube extends e_bb_base
$yID = preg_replace('/[^0-9a-z]/i', '', $picRef);
- if (($yID != $picRef) || (strlen($yID) > 20))
- { // Possible hack attempt
- }
+ //if (($yID != $picRef) || (strlen($yID) > 20))
+ // { // Possible hack attempt
+ // }
// $params = array_merge($params, $bbpars); // Any parameters set in bbcode override those in HTML
// Could check for valid array indices here
$paramString = implode('&', $params);
diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php
index 58f1c0b42..af95d5c13 100644
--- a/e107_core/shortcodes/batch/admin_shortcodes.php
+++ b/e107_core/shortcodes/batch/admin_shortcodes.php
@@ -1297,10 +1297,10 @@ class admin_shortcodes
}
$text .= "";
- if($parm == 'list')
- {
+ // if($parm == 'list')
+ // {
// $text = str_replace("
","
",$text);;
- }
+ // }
// $text .= "\n\t\t\t\t\t";
@@ -1764,10 +1764,10 @@ Inverse 10
10
{
$plug_vars = $plug->plug_vars;
- if($row['plugin_path']=='calendar_menu')
- {
+ // if($row['plugin_path']=='calendar_menu')
+ // {
// print_a($plug_vars);
- }
+ // }
// moved to boot.php
// e107::loadLanFiles($row['plugin_path'], 'admin');
@@ -1891,10 +1891,10 @@ Inverse 10
10
// ------------------------------------------------------------------
//added option to disable leave/logout (ll) - more flexibility for theme developers
- if(!vartrue($parms['disable_ll']))
- {
+ // if(!vartrue($parms['disable_ll']))
+ // {
// $menu_vars += $this->getOtherNav('home');
- }
+ // }
// print_a($menu_vars);
diff --git a/e107_core/shortcodes/batch/usersettings_shortcodes.php b/e107_core/shortcodes/batch/usersettings_shortcodes.php
index d8d34fb6a..25d6d7095 100755
--- a/e107_core/shortcodes/batch/usersettings_shortcodes.php
+++ b/e107_core/shortcodes/batch/usersettings_shortcodes.php
@@ -239,10 +239,10 @@ class usersettings_shortcodes extends e_shortcode
foreach ($ucList as $cid)
{
if (check_class($cid, $this->var['user_class'])) $is_checked[$cid] = $cid;
- if(isset($_POST['class']))
- {
+ // if(isset($_POST['class']))
+ // {
// $is_checked[$cid] = in_array($cid, $_POST['class']);
- }
+ // }
}
$inclass = implode(',',$is_checked);
diff --git a/e107_core/shortcodes/single/sitelinks_alt.php b/e107_core/shortcodes/single/sitelinks_alt.php
index 7b82ca379..9b93fe7e8 100644
--- a/e107_core/shortcodes/single/sitelinks_alt.php
+++ b/e107_core/shortcodes/single/sitelinks_alt.php
@@ -128,7 +128,7 @@ class sitelinks_alt
return $text;
}
- static function adnav_main($cat_title, $cat_link, $cat_img, $cat_id = FALSE, $params, $cat_open = FALSE)
+ static function adnav_main($cat_title, $cat_link, $cat_img, $cat_id = FALSE, $params=array(), $cat_open = FALSE)
{
$tp = e107::getParser();
diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php
index 5a98d2177..fca3c3a23 100755
--- a/e107_handlers/admin_ui.php
+++ b/e107_handlers/admin_ui.php
@@ -214,7 +214,7 @@ class e_admin_request
* If $key is array, $value is not used.
* If $value is null, (string) $key is unset
*
- * @param object $key
+ * @param string $key
* @param object $value [optional]
* @return e_admin_request
*/
@@ -1721,7 +1721,7 @@ class e_admin_controller
/**
* Constructor
- * @param e_admin_request $request [optional]
+ * @param e_admin_request $request
*/
public function __construct($request, $response, $params = array())
{
@@ -6466,9 +6466,9 @@ class e_admin_ui extends e_admin_controller_ui
/**
* Set read and write parms with drop-down-list array data (ie. type='dropdown')
- * @param str $field
+ * @param string $field
* @param array $array [optional]
- * @return none
+ * @return null
*/
public function setDropDown($field,$array) //TODO Have Miro check this.
{
diff --git a/e107_handlers/iphandler_class.php b/e107_handlers/iphandler_class.php
index 9b0482987..1ed2eac2b 100644
--- a/e107_handlers/iphandler_class.php
+++ b/e107_handlers/iphandler_class.php
@@ -1297,7 +1297,7 @@ class banlistManager
/**
* Return an array of valid ban types (for use as indices into array, generally)
*/
- public function getValidReasonList()
+ public static function getValidReasonList()
{
return array(
eIPHandler::BAN_TYPE_LEGACY,
diff --git a/e107_handlers/js_helper.php b/e107_handlers/js_helper.php
index 8fcc9cf78..641fa5497 100644
--- a/e107_handlers/js_helper.php
+++ b/e107_handlers/js_helper.php
@@ -328,7 +328,7 @@ class e_jshelper
* @param string $errextended
* @access public
*/
- function sendAjaxError($errcode, $errmessage, $errextended = '')
+ static function sendAjaxError($errcode, $errmessage, $errextended = '')
{
header('Content-type: text/html; charset='.CHARSET, true);
header("HTTP/1.0 {$errcode} {$errmessage}", true);
@@ -337,7 +337,10 @@ class e_jshelper
//Safari expects some kind of output, even empty
echo ($errextended ? $errextended : ' ');
- while (@ob_end_flush());
+ while (ob_get_length() !== false)
+ {
+ ob_end_clean();
+ }
exit;
}
diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php
index e13eeb019..ca7105fa5 100644
--- a/e107_handlers/plugin_class.php
+++ b/e107_handlers/plugin_class.php
@@ -3921,7 +3921,7 @@ class e107plugin
case 'install':
case 'upgrade':
$ret = $config->add($key, $value);
- if($ret->data_has_changed == TRUE)
+ if($ret->isModified())
{
$mes->addSuccess(EPL_ADLAN_241, $key);
}
diff --git a/e107_handlers/pop3_class.php b/e107_handlers/pop3_class.php
index 5dfc0efd0..3dd067ece 100644
--- a/e107_handlers/pop3_class.php
+++ b/e107_handlers/pop3_class.php
@@ -158,7 +158,7 @@ class receiveMail
if ($enc == 4)
$message = quoted_printable_decode($message);
if ($enc == 5)
- $message = $message;
+ // $message = $message;
$fp=fopen($path.$name,"w");
fwrite($fp,$message);
fclose($fp);
diff --git a/e107_handlers/traffic_class.php b/e107_handlers/traffic_class.php
index f7356e001..04d66d719 100644
--- a/e107_handlers/traffic_class.php
+++ b/e107_handlers/traffic_class.php
@@ -176,7 +176,7 @@ class e107_traffic
{
return;
}
- if ($tObject != $this)
+ if ($tObject !== $this)
{
message_handler("CRITICAL_ERROR", "Bad traffic object", __LINE__ - 2, __FILE__);
}
@@ -225,8 +225,10 @@ if (!isset($qTimeOn))
{
$GLOBALS['qTimeOn'] = explode(' ', microtime());
}
+
function eQTimeOff()
{
+ global $qTimeOn;
$e = explode(' ', microtime());
$diff = ((float) $e[0] + (float) $e[1]) - ((float) $qTimeOn[0] + (float) $qTimeOn[1]);
$GLOBALS['qTimeTotal'] += $diff;
diff --git a/e107_handlers/xml_class.php b/e107_handlers/xml_class.php
index 0edf5e9e8..a552ed31c 100644
--- a/e107_handlers/xml_class.php
+++ b/e107_handlers/xml_class.php
@@ -40,7 +40,7 @@ class parseXml extends xmlClass // BC with v1.x
{
// $data = $this->getRemoteFile($address, $timeout);
$fl = e107::getFile();
- $data = $fl->getRemoteContent($address);
+ $data = $fl->getRemoteContent($address, ['timeout' => $timeout]);
$this->xmlLegacyContents = $data;
@@ -227,9 +227,9 @@ class xmlClass
public $errors;
- private $arrayTags = false;
+ private $arrayTags;
- private $stringTags = false;
+ private $stringTags;
private $urlPrefix = false;
diff --git a/e107_plugins/_blank/_blank_setup.php b/e107_plugins/_blank/_blank_setup.php
index a8b9d80a3..fa5841b8c 100644
--- a/e107_plugins/_blank/_blank_setup.php
+++ b/e107_plugins/_blank/_blank_setup.php
@@ -177,10 +177,10 @@ if(!class_exists("_blank_setup"))
$legacyMenuPref = e107::getConfig('menu')->getPref();
- if(isset($legacyMenuPref['newforumposts_caption']))
+ /* if(isset($legacyMenuPref['newforumposts_caption']))
{
- }
+ }*/
return false;
}
diff --git a/e107_plugins/_blank/e_admin.php b/e107_plugins/_blank/e_admin.php
index fb71ff962..89a37f3c3 100644
--- a/e107_plugins/_blank/e_admin.php
+++ b/e107_plugins/_blank/e_admin.php
@@ -96,12 +96,12 @@ class _blank_admin implements e_admin_addon_interface
if(!empty($id) )
{
- if(!empty($data['x__blank_url']))
- {
+ // if(!empty($data['x__blank_url']))
+ // {
// eg. Save the data in 'blank' plugin table. .
- }
+ // }
}
diff --git a/e107_plugins/_blank/e_related.php b/e107_plugins/_blank/e_related.php
index 8b1902173..5537af8e9 100644
--- a/e107_plugins/_blank/e_related.php
+++ b/e107_plugins/_blank/e_related.php
@@ -43,10 +43,10 @@ class _blank_related // include plugin-folder in the name.
return $items;
}
- elseif(ADMIN)
- {
+ // elseif(ADMIN)
+ // {
// return array(array('title'=>$query,'url'=>''));
- }
+ // }
}
}
diff --git a/e107_plugins/alt_auth/extended_password_handler.php b/e107_plugins/alt_auth/extended_password_handler.php
index a8c9953c2..a7980dd77 100644
--- a/e107_plugins/alt_auth/extended_password_handler.php
+++ b/e107_plugins/alt_auth/extended_password_handler.php
@@ -315,10 +315,10 @@ class ExtendedPasswordHandler extends UserHandler
{
$hash = $stored_hash;
}
- if(strlen($hash) !== 32)
- {
+ // if(strlen($hash) !== 32)
+ // {
//return PASSWORD_INVALID;
- }
+ // }
$pwHash = $salt ? md5($salt.$pword) : md5($pword);
$stored_hash = $hash;
diff --git a/e107_plugins/alt_auth/ldap_auth.php b/e107_plugins/alt_auth/ldap_auth.php
index 82feea2b8..40a500364 100755
--- a/e107_plugins/alt_auth/ldap_auth.php
+++ b/e107_plugins/alt_auth/ldap_auth.php
@@ -274,10 +274,10 @@ class auth_login extends alt_auth_base
return AUTH_NOUSER; // Bit debateable what to return if this happens
}
}
- else // Probably a bit strange if we don't get any info back - but possible
- {
+ //else // Probably a bit strange if we don't get any info back - but possible
+ // {
// echo "No results!
";
- }
+ // }
return AUTH_SUCCESS;
}
diff --git a/e107_plugins/chatbox_menu/chat.php b/e107_plugins/chatbox_menu/chat.php
index e744c6a56..d5123986d 100755
--- a/e107_plugins/chatbox_menu/chat.php
+++ b/e107_plugins/chatbox_menu/chat.php
@@ -93,9 +93,9 @@ if (strstr(e_QUERY, "fs")) {
}
// end search
-if (e_QUERY ? $from = intval(e_QUERY) : $from = 0) {
- ;
-}
+//if (e_QUERY ? $from = intval(e_QUERY) : $from = 0) {
+
+//}
$chat_total = $sql->count('chatbox');
diff --git a/e107_plugins/chatbox_menu/chatbox_menu.php b/e107_plugins/chatbox_menu/chatbox_menu.php
index 66587fdf3..b545bf147 100755
--- a/e107_plugins/chatbox_menu/chatbox_menu.php
+++ b/e107_plugins/chatbox_menu/chatbox_menu.php
@@ -36,9 +36,12 @@ $emessage = '';
if ((isset($_POST['chat_submit']) || e_AJAX_REQUEST) && $_POST['cmessage'] !== '') {
- if ( ! USER && ! $pref['anon_post']) {
+ if ( ! USER && ! $pref['anon_post'])
+ {
// disallow post
- } else {
+ }
+ else
+ {
$nick = trim(preg_replace("#\[.*\]#si", "", $tp->toDB($_POST['nick'])));
$cmessage = $_POST['cmessage'];
diff --git a/e107_plugins/clock_menu/config.php b/e107_plugins/clock_menu/config.php
index fb76c4f35..2e7f0d9a8 100644
--- a/e107_plugins/clock_menu/config.php
+++ b/e107_plugins/clock_menu/config.php
@@ -23,12 +23,13 @@ e107::includeLan(e_PLUGIN.'clock_menu/languages/admin/'.e_LANGUAGE.'.php');
$frm = e107::getForm();
$mes = e107::getMessage();
-$menu_pref = e107::getConfig('menu')->getPref('');
+$menu_pref = e107::getConfig('menu')->getPref();
if (isset($_POST['update_menu']))
{
$temp = array();
- while (list($key, $value) = each($_POST))
+
+ foreach($_POST as $key=>$value)
{
if ($key != 'update_menu')
{
@@ -39,7 +40,7 @@ if (isset($_POST['update_menu']))
{
$temp['clock_format'] = 0;
}
- if ($admin_log->logArrayDiffs($temp,$menu_pref,'MISC_05'))
+ if (e107::getLog()->logArrayDiffs($temp,$menu_pref,'MISC_05'))
{
$menuPref = e107::getConfig('menu');
foreach ($temp as $k => $v)
@@ -50,7 +51,7 @@ if (isset($_POST['update_menu']))
}
}
-$ns->tablerender($caption, $mes->render(). $text);
+e107::getRender()->tablerender(null, $mes->render());
$text = "
";
-$ns->tablerender(CLOCK_AD_L4, $text);
+e107::getRender()->tablerender(CLOCK_AD_L4, $text);
require_once(e_ADMIN."footer.php");
diff --git a/e107_plugins/comment_menu/config.php b/e107_plugins/comment_menu/config.php
index 11437bd50..92334bf52 100644
--- a/e107_plugins/comment_menu/config.php
+++ b/e107_plugins/comment_menu/config.php
@@ -37,7 +37,7 @@ if (isset($_POST['update_menu']))
$tp = e107::getParser();
- while (list($key, $value) = each($_POST))
+ foreach($_POST as $key=>$value)
{
if($key == "comment_caption")
{
@@ -61,7 +61,7 @@ if (isset($_POST['update_menu']))
if($menu_config->save(false))
{
- $mes->addSuccess();
+ $mes->addSuccess(LAN_SAVED);
}
/*if ($admin_log->logArrayDiffs($old, $menu_config->getPref(), 'MISC_04'))
{
@@ -117,6 +117,6 @@ $text = "
";
-$ns->tablerender(CM_L8, $mes->render() . $text);
+e107::getRender()->tablerender(CM_L8, $mes->render() . $text);
require_once(e_ADMIN."footer.php");
diff --git a/e107_plugins/download/request.php b/e107_plugins/download/request.php
index afe4de188..42de8ab05 100644
--- a/e107_plugins/download/request.php
+++ b/e107_plugins/download/request.php
@@ -11,7 +11,9 @@ e107::lan('download','download');
$log = e107::getAdminLog();
$id = FALSE;
-
+$sql = e107::getDb();
+$tp = e107::getRender();
+$pref = e107::pref('core');
if (!is_numeric(e_QUERY) && empty($_GET['id']))
{
@@ -46,13 +48,13 @@ if(strstr(e_QUERY, "mirror"))
{
$row = $sql->fetch();
extract($row);
- if (check_class($download_category_class) && check_class($download_class))
+ if (check_class($row['download_category_class']) && check_class($row['download_class']))
{
- if($pref['download_limits'] && $download_active == 1)
+ if($pref['download_limits'] && $row['download_active'] == 1)
{
check_download_limits();
}
- $mirrorList = explode(chr(1), $download_mirror);
+ $mirrorList = explode(chr(1), $row['download_mirror']);
$mstr = "";
foreach($mirrorList as $mirror)
{
@@ -124,7 +126,7 @@ if (preg_match("#.*\.[a-z,A-Z]{3,4}#", e_QUERY))
$log->addError("Line".__LINE__.": Couldn't find ".e_DOWNLOAD.e_QUERY);
$log->toFile('download_requests','Download Requests', true); // Create a log file and add the log messages
require_once(HEADERF);
- $ns->tablerender(LAN_ERROR, "