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 = "
"; $text .= $buts; $text .= render_clean(); $text .= "
"; - $ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text); + e107::getRender()->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text); } + $text = "
"; @@ -39,6 +40,6 @@ $text .= render_clean(); $text .= "
"; -$ns->tablerender(ADLAN_CL_7, $text,'infopanel'); +e107::getRender()->tablerender(ADLAN_CL_7, $text,'infopanel'); + -?> diff --git a/e107_admin/includes/combo.php b/e107_admin/includes/combo.php index 781fb2396..0bb212cd5 100644 --- a/e107_admin/includes/combo.php +++ b/e107_admin/includes/combo.php @@ -19,7 +19,8 @@ $newarray = e107::getNav()->adminLinks('core'); $text = "
"; $buts = ""; -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; @@ -29,8 +30,9 @@ while ($td <= 5) { } $td = 1; $text .= "
"; -if($buts != ""){ - $ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text); +if(!empty($buts)) +{ + e107::getRender()->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text); } $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 = "
    @@ -101,5 +102,5 @@ $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, "
    ".LAN_FILE_NOT_FOUND."\n

    \n".LAN_BACK."
    "); + e107::getRender()->tablerender(LAN_ERROR, "
    ".LAN_FILE_NOT_FOUND."\n

    \n".LAN_BACK."
    "); require_once(FOOTERF); exit(); } @@ -146,7 +148,7 @@ if ($type == "file") $search = array("[","]"); $replace = array("", ""); - $ns->tablerender(LAN_ERROR, "
    ".str_replace($search, $replace, LAN_dl_78).'
    '); + e107::getRender()->tablerender(LAN_ERROR, "
    ".str_replace($search, $replace, LAN_dl_78).'
    '); require_once(FOOTERF); exit(); } @@ -156,9 +158,9 @@ if ($type == "file") check_download_limits(); } extract($row); - if($download_mirror) + if($row['download_mirror']) { - $array = explode(chr(1), $download_mirror); + $array = explode(chr(1), $row['download_mirror']); $c = (count($array)-1); for ($i=1; $i < $c; $i++) { @@ -199,46 +201,46 @@ if ($type == "file") $ip = e107::getIPHandler()->getIP(FALSE); $request_data = "'0', '{$user_id}', '{$ip}', '{$id}', '".time()."'"; //add request info to db - $sql->db_Insert("download_requests", $request_data, FALSE); - if (preg_match("/Binary\s(.*?)\/.*/", $download_url, $result)) + $sql->insert("download_requests", $request_data, FALSE); + // if (preg_match("/Binary\s(.*?)\/.*/", $download_url, $result)) + // { + // $bid = $result[1]; + /// $result = @mysql_query("SELECT * FROM ".MPREFIX."rbinary WHERE binary_id = '{$bid}'"); + // $binary_data = @mysql_result($result, 0, "binary_data"); + // $binary_filetype = @mysql_result($result, 0, "binary_filetype"); + // $binary_name = @mysql_result($result, 0, "binary_name"); + // header("Content-type: {$binary_filetype}"); + // header("Content-length: {$download_filesize}"); + // header("Content-Disposition: attachment; filename={$binary_name}"); + // header("Content-Description: PHP Generated Data"); + // echo $binary_data; + // exit(); + // } + if (strstr($row['download_url'], "http://") || strstr($row['download_url'], "ftp://") || strstr($row['download_url'], "https://")) { - $bid = $result[1]; - $result = @mysql_query("SELECT * FROM ".MPREFIX."rbinary WHERE binary_id = '{$bid}'"); - $binary_data = @mysql_result($result, 0, "binary_data"); - $binary_filetype = @mysql_result($result, 0, "binary_filetype"); - $binary_name = @mysql_result($result, 0, "binary_name"); - header("Content-type: {$binary_filetype}"); - header("Content-length: {$download_filesize}"); - header("Content-Disposition: attachment; filename={$binary_name}"); - header("Content-Description: PHP Generated Data"); - echo $binary_data; - exit(); - } - if (strstr($download_url, "http://") || strstr($download_url, "ftp://") || strstr($download_url, "https://")) - { - $download_url = e107::getParser()->parseTemplate($download_url,true); // support for shortcode-driven dynamic URLS. + $download_url = e107::getParser()->parseTemplate($row['download_url'],true); // support for shortcode-driven dynamic URLS. e107::redirect(decorate_download_location($download_url)); // header("Location: {$download_url}"); exit(); } else { - if (file_exists(e_DOWNLOAD.$download_url)) + if (file_exists(e_DOWNLOAD.$row['download_url'])) { - e107::getFile()->send(e_DOWNLOAD.$download_url); + e107::getFile()->send(e_DOWNLOAD.$row['download_url']); exit(); } - elseif(file_exists($download_url)) + elseif(file_exists($row['download_url'])) { - e107::getFile()->send($download_url); + e107::getFile()->send($row['download_url']); exit(); } - elseif(file_exists(e_UPLOAD.$download_url)) + elseif(file_exists(e_UPLOAD.$row['download_url'])) { - e107::getFile()->send(e_UPLOAD.$download_url); + e107::getFile()->send(e_UPLOAD.$row['download_url']); exit(); } - $log->addError("Couldn't find ".e_DOWNLOAD.$download_url." or ".$download_url." or ".e_UPLOAD.$download_ur); + $log->addError("Couldn't find ".e_DOWNLOAD.$row['download_url']." or ".$row['download_url']." or ".e_UPLOAD.$row['download_url']); $log->toFile('download_requests','Download Requests', true); // Create a log file and add the log messages } } @@ -266,7 +268,7 @@ if ($type == "file") else if(strstr(e_QUERY, "pub_")) { /* check to see if public upload and not in download table ... */ - $bid = str_replace("pub_", "", e_QUERY); + /*$bid = str_replace("pub_", "", e_QUERY); if($result = @mysql_query("SELECT * FROM ".MPREFIX."rbinary WHERE binary_id = '$bid' ")) { $binary_data = @mysql_result($result, 0, "binary_data"); @@ -278,14 +280,14 @@ if ($type == "file") header("Content-Description: PHP Generated Data"); echo $binary_data; exit(); - } + }*/ } $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, "
    ".LAN_FILE_NOT_FOUND."

    ".LAN_BACK."
    "); + e107::getRender()->tablerender(LAN_ERROR, "
    ".LAN_FILE_NOT_FOUND."

    ".LAN_BACK."
    "); require_once(FOOTERF); exit(); } @@ -293,10 +295,10 @@ if ($type == "file") $sql->select($table, "*", "{$table}_id = '{$id}'"); $row = $sql->fetch(); extract($row); -$image = ($table == "upload" ? $upload_ss : $download_image); -if (preg_match("/Binary\s(.*?)\/.*/", $image, $result)) -{ - $bid = $result[1]; +$image = ($table == "upload" ? $row['upload_ss'] : $row['download_image']); +//if (preg_match("/Binary\s(.*?)\/.*/", $image, $result)) +//{ +/* $bid = $result[1]; $result = @mysql_query("SELECT * FROM ".MPREFIX."rbinary WHERE binary_id = '{$bid}'"); $binary_data = @mysql_result($result, 0, "binary_data"); $binary_filetype = @mysql_result($result, 0, "binary_filetype"); @@ -304,11 +306,12 @@ if (preg_match("/Binary\s(.*?)\/.*/", $image, $result)) header("Content-type: {$binary_filetype}"); header("Content-Disposition: inline; filename={$binary_name}"); echo $binary_data; - exit(); -} + exit();*/ + +//} -$image = ($table == "upload" ? $upload_ss : $download_image); +// $image = ($table == "upload" ? $upload_ss : $download_image); if (strpos($image, "http") !== FALSE) { @@ -338,7 +341,7 @@ else $disp .= "
    ".LAN_BACK."
    "; - $ns->tablerender($imagecaption, $disp); + e107::getRender()->tablerender($imagecaption, $disp); require_once(FOOTERF); } else @@ -354,7 +357,7 @@ else else { require_once(HEADERF); - $ns->tablerender(LAN_ERROR, "
    ".LAN_FILE_NOT_FOUND."

    ".LAN_BACK."
    "); + e107::getRender()->tablerender(LAN_ERROR, "
    ".LAN_FILE_NOT_FOUND."

    ".LAN_BACK."
    "); require_once(FOOTERF); exit; } @@ -366,7 +369,7 @@ else function check_download_limits() { - global $pref, $sql, $ns, $HEADER, $e107, $tp; + global $pref, $sql, $HEADER; // Check download count limits $qry = "SELECT gen_intdata, gen_chardata, (gen_intdata/gen_chardata) as count_perday FROM #generic WHERE gen_type = 'download_limit' AND gen_datestamp IN (".USERCLASS_LIST.") AND (gen_chardata >= 0 AND gen_intdata >= 0) ORDER BY count_perday DESC"; if($sql->gen($qry)) diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index 912710583..b65852186 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -245,7 +245,7 @@ function parse_forum($f, $restricted_string = '') -function parse_subs($forumList, $id ='', $lastpost_datestamp) +function parse_subs($forumList, $id, $lastpost_datestamp) { $tp = e107::getParser(); diff --git a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php index 0f42ff82b..a3f91acf1 100644 --- a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php @@ -17,7 +17,7 @@ protected $e107; protected $defaultImgAttachSize = false; - protected $pref; + public $pref; // $param is sent from nfp menu. function __construct() @@ -1264,13 +1264,6 @@ return $text; } - if(E107_DEBUG_LEVEL > 0) - { - // echo "
    Thread id: ".$threadId."
    "; - // print_a($this); - } - - // Preview should be reserved for the full 'Post reply' page.   } //---- else diff --git a/e107_plugins/import/providers/html_import_class.php b/e107_plugins/import/providers/html_import_class.php index 74a950f55..c201c1526 100644 --- a/e107_plugins/import/providers/html_import_class.php +++ b/e107_plugins/import/providers/html_import_class.php @@ -384,8 +384,13 @@ class html_import extends base_import_class } - function process($type='description',$source) + function process($type, $source) { + if(empty($type)) + { + $type = 'description'; + } + switch ($type) { case 'category': diff --git a/e107_plugins/list_new/list_class.php b/e107_plugins/list_new/list_class.php index 922e7c2de..1c038812d 100644 --- a/e107_plugins/list_new/list_class.php +++ b/e107_plugins/list_new/list_class.php @@ -183,7 +183,10 @@ class listclass } } //sort array on order values set in preferences - usort($arr, create_function('$e,$f','return $e["order"]==$f["order"]?0:($e["order"]>$f["order"]?1:-1);')); + usort($arr, function($e, $f) + { + return $e["order"]==$f["order"] ? 0 : ($e["order"] > $f["order"] ? 1 : -1); + }); return $arr; } diff --git a/e107_plugins/log/loginfo.php b/e107_plugins/log/loginfo.php index 30157c601..aecba6a22 100644 --- a/e107_plugins/log/loginfo.php +++ b/e107_plugins/log/loginfo.php @@ -174,7 +174,7 @@ function getBrowser($agent) "konqueror" => array('name' => 'Konqueror', 'rule' => 'konqueror/([0-9.]{1,10})'), "avantbrowser" => array('name' => 'Avant Browser', 'rule' => 'Avant[ ]?Browser'), "avantgo" => array('name' => 'AvantGo', 'rule' => 'AvantGo[ /]([0-9.]{1,10})'), - "proxomitron" => array('name' => 'Proxomitron', 'rule' => 'Space[ ]?Bison/[0-9.]{1,10}'), + // "proxomitron" => array('name' => 'Proxomitron', 'rule' => 'Space[ ]?Bison/[0-9.]{1,10}'), "lynx" => array('name' => 'Lynx', 'rule' => 'lynx/([0-9a-z.]{1,10})'), "links" => array('name' => 'Links', 'rule' => 'Links[ /]\(([0-9.]{1,10})'), "galeon" => array('name' => 'Galeon', 'rule' => 'galeon/([0-9.]{1,10})'), diff --git a/e107_plugins/log/stats.php b/e107_plugins/log/stats.php index c5f15290d..56daacfba 100644 --- a/e107_plugins/log/stats.php +++ b/e107_plugins/log/stats.php @@ -364,7 +364,7 @@ class siteStats 'Konqueror' => "konqueror", 'Avant Browser' => "avantbrowser", 'AvantGo' => "avantgo", - 'Proxomitron' => "proxomitron", + // 'Proxomitron' => "proxomitron", 'Safari' => "safari", 'Lynx' => "lynx", 'Links' => "links", @@ -1989,7 +1989,8 @@ class siteStats function getWidthRatio ($array, $column) { $tmpArray = $this -> arraySort($array, $column); - $data = each($tmpArray); + // $data = each($tmpArray); + $data = key($tmpArray); $maxValue = $data[1]['totalv']; echo "maxValue ".$maxValue."
    "; $ratio = 0; diff --git a/e107_plugins/login_menu/login_menu_class.php b/e107_plugins/login_menu/login_menu_class.php index 221b01fc9..49f57626c 100644 --- a/e107_plugins/login_menu/login_menu_class.php +++ b/e107_plugins/login_menu/login_menu_class.php @@ -114,7 +114,7 @@ class login_menu_class } - function parse_external_list($active=false, $order=true) + function parse_external_list($active=false, $order=true) { //prevent more than 1 call if(($tmp = getcachedvars('loginbox_elist')) !== FALSE) return $tmp; @@ -377,7 +377,10 @@ class login_menu_class function clean_links($link_items) { - if(empty($link_items)) return; + if(empty($link_items)) + { + return array(); + } foreach($link_items as $key => $value) { diff --git a/e107_plugins/login_menu/login_menu_shortcodes.php b/e107_plugins/login_menu/login_menu_shortcodes.php index 717d6fde4..70c3f8da5 100755 --- a/e107_plugins/login_menu/login_menu_shortcodes.php +++ b/e107_plugins/login_menu/login_menu_shortcodes.php @@ -317,24 +317,42 @@ e107::getLanguage()->bcDefs($bcDefs); function sc_lm_external_links($parm='') { + global $menu_pref, $login_menu_shortcodes, $LOGIN_MENU_EXTERNAL_LINK; $tp = e107::getParser(); + $lmc = new login_menu_class; - if(!vartrue($menu_pref['login_menu']['external_links'])) return ''; - $lbox_infos = login_menu_class::parse_external_list(true, false); - $lbox_active = $menu_pref['login_menu']['external_links'] ? explode(',', $menu_pref['login_menu']['external_links']) : array(); - if(!vartrue($lbox_infos['links'])) return ''; - $ret = ''; - foreach ($lbox_active as $stackid) { - $lbox_items = login_menu_class::clean_links(varset($lbox_infos['links'][$stackid])); - if(!$lbox_items) continue; - foreach ($lbox_items as $num=>$lbox_item) { - $lbox_item['link_id'] = $stackid.'_'.$num; - cachevars('login_menu_linkdata', $lbox_item); - $ret .= $tp -> parseTemplate($LOGIN_MENU_EXTERNAL_LINK, false, $login_menu_shortcodes); - } + if(!vartrue($menu_pref['login_menu']['external_links'])) + { + return ''; } + + $lbox_infos = $lmc->parse_external_list(true, false); + $lbox_active = $menu_pref['login_menu']['external_links'] ? explode(',', $menu_pref['login_menu']['external_links']) : array(); + + if(!vartrue($lbox_infos['links'])) + { + return ''; + } + + $ret = ''; + + foreach($lbox_active as $stackid) + { + $lbox_items = $lmc->clean_links(varset($lbox_infos['links'][$stackid])); + if(!$lbox_items) + { + continue; + } + foreach($lbox_items as $num => $lbox_item) + { + $lbox_item['link_id'] = $stackid . '_' . $num; + cachevars('login_menu_linkdata', $lbox_item); + $ret .= $tp->parseTemplate($LOGIN_MENU_EXTERNAL_LINK, false, $login_menu_shortcodes); + } + } + return $ret; } @@ -420,7 +438,9 @@ e107::getLanguage()->bcDefs($bcDefs); if(!vartrue($menu_pref['login_menu']['external_stats'])) return ''; - $lbox_infos = login_menu_class::parse_external_list(true, false); + $lm = new login_menu_class; + + $lbox_infos = $lm->parse_external_list(true, false); if(!vartrue($lbox_infos['stats'])) return ''; diff --git a/e107_plugins/newsletter/admin_config.php b/e107_plugins/newsletter/admin_config.php index 03363c679..acf3c2624 100644 --- a/e107_plugins/newsletter/admin_config.php +++ b/e107_plugins/newsletter/admin_config.php @@ -548,14 +548,14 @@ class newsletter /** * Delete a newsletter * - * @return none + * @return null */ function deleteNewsletter() { $sql = e107::getDb(); $mes = e107::getMessage(); - $tmp = each($_POST['delete']); + $tmp = key($_POST['delete']); if(strpos($tmp['key'], 'newsletter') === 0) { $id = intval(str_replace('newsletter_', '', $tmp['key'])); diff --git a/e107_plugins/online/config.php b/e107_plugins/online/config.php index 99a65826f..6253f0fb3 100644 --- a/e107_plugins/online/config.php +++ b/e107_plugins/online/config.php @@ -27,14 +27,17 @@ $frm = e107::getForm(); if (isset($_POST['update_menu'])) { $temp = array(); - while (list($key, $value) = each($_POST)) + foreach($_POST as $key=>$value) { if ($value != LAN_UPDATE) { $temp[$key] = $value; } } - if ($admin_log->logArrayDiffs($temp,$menu_pref,'MISC_02')) + + $menu_pref = e107::getConfig('menu')->getPref(); + + if (e107::getLog()->logArrayDiffs($temp,$menu_pref,'MISC_02')) { $menuPref = e107::getConfig('menu'); //e107::getConfig('menu')->setPref('', $menu_pref); @@ -47,12 +50,12 @@ if (isset($_POST['update_menu'])) $mes->addSuccess(LAN_SAVED); } //$ns->tablerender('', "
    ".LAN_UPDATED.'
    '); - $ns->tablerender($caption, $mes->render() . $text); + //e107::getRender()->tablerender(null, $mes->render() ); echo $mes->render(); } -$menu_pref = e107::getConfig('menu')->getPref(''); +$menu_pref = e107::getConfig('menu')->getPref(); if (!isset($menu_pref['online_ls_caption'])) { // Assume that if one isn't set, none are set @@ -80,7 +83,7 @@ $text = " ".LAN_ONLINE_ADMIN_1." ".LAN_ONLINE_ADMIN_2.": - + ".LAN_ONLINE_ADMIN_3.": @@ -102,7 +105,7 @@ $text = " ".LAN_ONLINE_ADMIN_5.": - + ".LAN_ONLINE_ADMIN_10." @@ -124,5 +127,5 @@ $text = " "; -$ns->tablerender(LAN_ONLINE_ADMIN_4." - ".LAN_ONLINE_ADMIN_1, $mes->render() . $text); +e107::getRender()->tablerender(LAN_ONLINE_ADMIN_4." - ".LAN_ONLINE_ADMIN_1, $mes->render() . $text); require_once(e_ADMIN."footer.php"); diff --git a/e107_plugins/tinymce4/admin_config.php b/e107_plugins/tinymce4/admin_config.php index 0f9d865a2..468e0bb73 100644 --- a/e107_plugins/tinymce4/admin_config.php +++ b/e107_plugins/tinymce4/admin_config.php @@ -257,7 +257,7 @@ class tinymce /** * Render Field value (listing page) * - * @param array $key + * @param string $key * @param array $row * @return string */ diff --git a/e107_plugins/tinymce4/wysiwyg.php b/e107_plugins/tinymce4/wysiwyg.php index 0afad4c5b..daca4eed9 100644 --- a/e107_plugins/tinymce4/wysiwyg.php +++ b/e107_plugins/tinymce4/wysiwyg.php @@ -119,8 +119,10 @@ $config = varset($_GET['config'],false); // e_QUERY; $gen = $wy->renderConfig($config); define('USE_GZIP', true); +$compression_browser_support = false; +$compression_server_support = false; -if(strstr(varset($_SERVER['HTTP_ACCEPT_ENCODING'], ''), 'gzip')) +if(strstr(varset($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip')) { $compression_browser_support = true; } @@ -143,16 +145,19 @@ if(ADMIN && e_QUERY == 'debug' || !empty($_GET['debug'])) "; - echo "
    Browser gZip support: ".$compression_browser_support; - echo "
    Server gZip support: ". $compression_server_support; +// echo "
    Browser gZip support: ".$compression_browser_support; +// echo "
    Server gZip support: ". $compression_server_support; require_once(FOOTERF); } elseif((USE_GZIP === true) && $compression_browser_support && $compression_server_support) { - while (@ob_end_clean()); // clear out anything that may have been echoed from class2.php or theme - header('Content-type: text/javascript;charset=UTF-8', true); + while (ob_get_length() !== false) // clear out anything that may have been echoed from class2.php or theme + { + ob_end_clean(); + } + header('Content-type: text/javascript;charset=UTF-8'); header('Content-Encoding: gzip'); $minified = e107::minify($gen); @@ -163,7 +168,10 @@ elseif((USE_GZIP === true) && $compression_browser_support && $compression_serve } else { - while (@ob_end_clean()); // clear out anything that may have been echoed from class2.php or theme. + while (ob_get_length() !== false) // clear out anything that may have been echoed from class2.php or theme + { + ob_end_clean(); + } ob_start(); ob_implicit_flush(0); header('Content-type: text/javascript', TRUE); @@ -180,9 +188,9 @@ exit; class wysiwyg { - var $js; - var $config = array(); - var $configName; + public $js; + public $config = array(); + public $configName; function renderConfig($config='') { @@ -199,7 +207,7 @@ class wysiwyg },\n"; */ - $text .= $this->config; // Moc: temporary fix for BC with PHP 5.3: https://github.com/e107inc/e107/issues/614 + // $text .= $this->config; // Moc: temporary fix for BC with PHP 5.3: https://github.com/e107inc/e107/issues/614 $text .= "\n});"; @@ -329,7 +337,7 @@ class wysiwyg { if(empty($data)) { - return; + return null; } $tmp = explode(" ",$data); @@ -396,7 +404,7 @@ class wysiwyg function getConfig($config=false) { $tp = e107::getParser(); - $fl = e107::getFile(); + // $fl = e107::getFile(); if($config !== false) { diff --git a/e107_plugins/trackback/modtrackback.php b/e107_plugins/trackback/modtrackback.php index f64b66f0a..1ac1bc81c 100644 --- a/e107_plugins/trackback/modtrackback.php +++ b/e107_plugins/trackback/modtrackback.php @@ -16,7 +16,7 @@ */ $eplug_admin = true; require_once("../../class2.php"); - +$pref = e107::pref(); if (!getperms("P") || !e107::isInstalled('trackback') || !$pref['trackbackEnabled']) { e107::redirect(); @@ -27,37 +27,40 @@ require_once(e_ADMIN."auth.php"); if (isset($_POST['moderate'])) { $temp = array(); + $sql = e107::getDb(); + if (is_array($_POST['trackback_delete'])) { - while (list ($key, $cid) = each ($_POST['trackback_delete'])) + foreach($_POST['trackback_delete'] as $key=>$cid) { $cid = intval($cid); if ($cid > 0) { - $sql->db_Delete("trackback", "trackback_id=".$cid); + $sql->delete("trackback", "trackback_id=".$cid); $temp[] = $cid; } } if (count($temp)) { - e107::getLog()->add('TRACK_02',implode(', ',$temp), E_LOG_INFORMATIVE,''); + e107::getLog()->add('TRACK_02',implode(', ',$temp)); } } - $ns->tablerender("", "
    ".TRACKBACK_L15."
    "); - $e107cache->clear("news.php"); + e107::getRender()->tablerender(null, "
    ".LAN_DELETED."
    "); + e107::getCache()->clear("news.php"); } - + +$sql = e107::getDb(); $text = "
    "; if (e_QUERY=='all') { - $res=$sql->db_Select("trackback", "*"); + $res=$sql->select("trackback"); } else { - $res=$sql->db_Select("trackback", "*", "trackback_pid=".intval(e_QUERY)); + $res=$sql->select("trackback", "*", "trackback_pid=".intval(e_QUERY)); } if (!$res) @@ -67,20 +70,20 @@ if (!$res) else { $tbArray = $sql -> db_getList(); - foreach($tbArray as $trackback) + foreach($tbArray as $row) { - extract($trackback); + $text .= " - - - - + + + + \n"; } $text .= "
    $trackback_title$trackback_excerpt$trackback_blogname ".TRACKBACK_L14."".$row['trackback_title']."".$row['trackback_excerpt']."".$row['trackback_blogname']." ".LAN_DELETE."
    "; } -$ns->tablerender(TRACKBACK_L13, $text); +e107::getRender()->tablerender(TRACKBACK_L13, $text); require_once(e_ADMIN."footer.php"); diff --git a/e107_plugins/trackback/trackback.php b/e107_plugins/trackback/trackback.php index b1fe32a32..d31586744 100644 --- a/e107_plugins/trackback/trackback.php +++ b/e107_plugins/trackback/trackback.php @@ -21,5 +21,5 @@ if (!e107::isInstalled('trackback')) } header('Content-Type: text/xml'); include(e_PLUGIN."trackback/trackbackClass.php"); -$trackback = trackbackClass :: respondTrackback(); +$trackback = trackbackClass::respondTrackback(); diff --git a/e107_plugins/trackback/trackbackClass.php b/e107_plugins/trackback/trackbackClass.php index d06dbc1ca..8b2b3f5c0 100644 --- a/e107_plugins/trackback/trackbackClass.php +++ b/e107_plugins/trackback/trackbackClass.php @@ -20,7 +20,7 @@ if (!defined('e107_INIT')) { exit; } class trackbackClass { - function sendTrackback ($permLink, $pingUrl, $title, $excerpt) + static function sendTrackback ($permLink, $pingUrl, $title, $excerpt) { global $e107; @@ -98,7 +98,7 @@ class trackbackClass } - function respondTrackback () + static function respondTrackback () { global $sql, $pref, $tp, $e107cache; $errorMessage = ""; @@ -151,7 +151,7 @@ class trackbackClass if(!$errorMessage) { - if(!$sql -> db_Insert("trackback", "0, {$pid}, '{$title}', '{$excerpt}', '{$permLink}', '{$blog_name}' ")) + if(!$sql->insert("trackback", "0, {$pid}, '{$title}', '{$excerpt}', '{$permLink}', '{$blog_name}' ")) { $errorMessage = "Unable to enter your trackback information into the database -> 0, {$pid}, '{$title}', '{$excerpt}', '{$permLink}', '{$blog_name}'"; } diff --git a/e107_tests/tests/unit/e_fileTest.php b/e107_tests/tests/unit/e_fileTest.php index 8e852c050..801429ca4 100644 --- a/e107_tests/tests/unit/e_fileTest.php +++ b/e107_tests/tests/unit/e_fileTest.php @@ -25,7 +25,7 @@ class e_fileTest extends \Codeception\Test\Unit } catch (Exception $e) { - $this->fail("Couldn't load e_file object"); + $this->fail($e->getMessage()); } $this->exploitFile = e_TEMP."test_exploit_file.jpg"; diff --git a/e107_themes/_blank/theme.php b/e107_themes/_blank/theme.php index a7ec81e4f..bfba9d116 100644 --- a/e107_themes/_blank/theme.php +++ b/e107_themes/_blank/theme.php @@ -9,8 +9,6 @@ e107::meta('viewport', 'width=device-width, initial-scale=1.0'); //e107::library('load', 'bootstrap'); -define('BOOTSTRAP', 3); - //e107::js('theme', 'js/theme.js'); // e107::css('theme','assets/css/style.css'); @@ -59,6 +57,8 @@ function tablestyle($caption, $text, $mode='') // IMPORTANT: make sure there are no characters after << \ No newline at end of file diff --git a/e107_themes/_blank/theme.xml b/e107_themes/_blank/theme.xml index e2b8572bc..d3c3a04a2 100644 --- a/e107_themes/_blank/theme.xml +++ b/e107_themes/_blank/theme.xml @@ -5,6 +5,10 @@ Blank e107 Theme generic + + + + diff --git a/e107_web/utilities/resetcore.php b/e107_web/utilities/resetcore.php index bca493efb..c9736bfdb 100644 --- a/e107_web/utilities/resetcore.php +++ b/e107_web/utilities/resetcore.php @@ -59,14 +59,14 @@ if(function_exists('ini_get')) } if($register_globals == true) { - while (list($global) = each($GLOBALS)) + foreach($GLOBALS as $global=>$tmp); { if (!preg_match('/^(_POST|_GET|_COOKIE|_SERVER|_FILES|GLOBALS|HTTP.*|_REQUEST|eTimingStart)$/', $global)) { unset($$global); } } - unset($global); + unset($global,$tmp); } @@ -79,8 +79,8 @@ if (!isset($mySQLprefix)) return FALSE; $hash = substr(md5($mySQLdefaultdb.".".$mySQLprefix),0,10); -mysql_connect($mySQLserver, $mySQLuser, $mySQLpassword); -mysql_select_db($mySQLdefaultdb); +//mysql_connect($mySQLserver, $mySQLuser, $mySQLpassword); +//mysql_select_db($mySQLdefaultdb); define("MAGIC_QUOTES_GPC", (ini_get('magic_quotes_gpc') ? TRUE : FALSE)); define('e_CACHE', $siteRoot.$SYSTEM_DIRECTORY.$hash.'/cache/');