mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Issue #6, Fix for duplicate LAN_IP, PHP 7.1 fixes. Fix for CLI failing when SSL is enabled, but command is using 'http'. Allow cURL to follow redirects, preventing broken feeds under certain circumstances.
This commit is contained in:
parent
851106707f
commit
67e0b43734
@ -518,7 +518,7 @@ $pref = e107::getPref();
|
||||
$menu_pref = e107::getConfig('menu')->getPref(); //extract menu prefs
|
||||
|
||||
// NEW - force ssl
|
||||
if(e107::getPref('ssl_enabled') && !deftrue('e_SSL_DISABLE'))
|
||||
if(e107::getPref('ssl_enabled') && !deftrue('e_SSL_DISABLE') && empty($_E107['cli']))
|
||||
{
|
||||
// NOTE: e_SSL_DISABLE check is here to help webmasters fix 'ssl_enabled'
|
||||
// if set by accident on site with no SSL support - just define it in e107_config.php
|
||||
|
@ -768,7 +768,7 @@ class e_admin_log
|
||||
{
|
||||
$mes = e107::getMessage();
|
||||
|
||||
$resultTypes = array(E_MESSAGE_SUCCESS - 'Success', E_MESSAGE_ERROR => 'Fail'); // Add LANS here. Could add other codes
|
||||
$resultTypes = array(E_MESSAGE_SUCCESS => 'Success', E_MESSAGE_ERROR => 'Fail'); // Add LANS here. Could add other codes
|
||||
$separator = '';
|
||||
$logString = '';
|
||||
foreach ($this->_messages as $m)
|
||||
|
@ -485,8 +485,8 @@ class e_file
|
||||
curl_setopt($cu, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($cu, CURLOPT_HEADER, 0);
|
||||
curl_setopt($cu, CURLOPT_REFERER, $referer);
|
||||
curl_setopt($cu, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($cu, CURLOPT_FOLLOWLOCATION, 0);
|
||||
curl_setopt($cu, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($cu, CURLOPT_FOLLOWLOCATION, true);
|
||||
curl_setopt($cu, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
|
||||
curl_setopt($cu, CURLOPT_COOKIEFILE, e_SYSTEM.'cookies.txt');
|
||||
curl_setopt($cu, CURLOPT_COOKIEJAR, e_SYSTEM.'cookies.txt');
|
||||
|
@ -3311,6 +3311,7 @@ class e107plugin
|
||||
function parse_plugin_php($plugName)
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$sql = e107::getDb(); // in case it is used inside plugin.php
|
||||
|
||||
$PLUGINS_FOLDER = '{e_PLUGIN}'; // Could be used in plugin.php file.
|
||||
|
||||
@ -3325,11 +3326,12 @@ class e107plugin
|
||||
$eplug_icon_small = null;
|
||||
|
||||
|
||||
ob_start();
|
||||
if (include(e_PLUGIN.$plugName.'/plugin.php'))
|
||||
{
|
||||
//$mes->add("Loading ".e_PLUGIN.$plugName.'/plugin.php', E_MESSAGE_DEBUG);
|
||||
}
|
||||
|
||||
}
|
||||
ob_clean();
|
||||
$ret = array();
|
||||
|
||||
// $ret['installRequired'] = ($eplug_conffile || is_array($eplug_table_names) || is_array($eplug_prefs) || is_array($eplug_sc) || is_array($eplug_bb) || $eplug_module || $eplug_userclass || $eplug_status || $eplug_latest);
|
||||
|
@ -1027,7 +1027,7 @@ class xmlClass
|
||||
/**
|
||||
* Import an e107 XML file into site preferences and DB tables
|
||||
*
|
||||
* @param path $file - e107 XML file path
|
||||
* @param string $file - e107 XML file path
|
||||
* @param string $mode[optional] - add|replace
|
||||
* @param boolean $noLogs [optional] tells pref handler to disable admin logs when true (install issues)
|
||||
* @param boolean $debug [optional]
|
||||
@ -1114,6 +1114,12 @@ class xmlClass
|
||||
{
|
||||
$error = $sql->getLastErrorText();
|
||||
$lastQry = $sql->getLastQuery();
|
||||
|
||||
if(is_array($lastQry))
|
||||
{
|
||||
$lastQry = $lastQry['PREPARE'];
|
||||
}
|
||||
|
||||
$ret['failed'][] = $table. "\n[".$error."]\n".$lastQry."\n\n";
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,8 @@ define("LAN_CANCEL","Cancel");
|
||||
define("LAN_DATE","Date");
|
||||
define("LAN_DATE_POSTED", "Date posted");
|
||||
define("LAN_JSCONFIRM","Are you sure?");
|
||||
define("LAN_IP", "IP Address");
|
||||
define("LAN_IP","IP");
|
||||
define("LAN_IP_ADDRESS","IP Address");
|
||||
define("LAN_AUTHOR","Author");
|
||||
define("LAN_CATEGORY", "Category");
|
||||
define("LAN_GUEST", "Guest");
|
||||
|
@ -291,8 +291,7 @@ define("LAN_DISPLAYOPT", "Edit Display Options");
|
||||
// define("LAN_GOPAGE", "Go to page:");
|
||||
define("LAN_DATESTAMP","Date stamp");
|
||||
define("LAN_TIMESTAMP","Timestamp");
|
||||
define("LAN_IP","IP");
|
||||
define("LAN_IP_ADDRESS","IP Address");
|
||||
|
||||
define("LAN_PAGE","PAGE");
|
||||
define("LAN_AGENT","AGENT");
|
||||
define("LAN_LANG","Lang.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user