1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

PHP8 Fixes. RSS speed improvement.

This commit is contained in:
Cameron
2021-01-05 16:40:01 -08:00
parent 53866fd6b9
commit f0ce3ac4a9
5 changed files with 82 additions and 65 deletions

View File

@@ -84,10 +84,10 @@ if(!empty($_E107['minimal']))
$_E107['no_forceuserupdate'] = true;
$_E107['no_event'] = true;
$_E107['no_session'] = true;
$_E107['no_parser'] = true;
// $_E107['no_parser'] = true;
$_E107['no_override'] = true;
$_E107['no_log'] = true;
$_E107['no_autoload'] = true;
// $_E107['no_autoload'] = true;
}
@@ -553,6 +553,10 @@ if(!isset($_E107['no_lan']))
$lng = e107::getLanguage(); // required for v1.0 BC.
$lng->detect();
}
else
{
define('e_LAN', 'en');
}
//
// M: Subdomain and Language Selection
//
@@ -769,6 +773,7 @@ else
{
define('ADMIN', false);
define('USER', true);
define('USERCLASS_LIST', '0');
}
@@ -777,8 +782,7 @@ else
$developerMode = (vartrue($pref['developer'],false) || E107_DEBUG_LEVEL > 0);
if(!isset($_E107['no_theme']))
{
// for multi-language these definitions needs to come after the language loaded.
if(!defined('SITENAME')) // Allow override by English_custom.php or English_global.php plugin files.
{
@@ -835,7 +839,7 @@ if(!isset($_E107['no_theme']))
define('XURL_TWITCH', false);
define('XURL_VK', false);
}
}
if(!defined('MAIL_IDENTIFIER'))
{
define('MAIL_IDENTIFIER', 'X-e107-id');

View File

@@ -4535,7 +4535,11 @@ class e107
}
}
if (e107::isCli()) chdir(e_ROOT); // Maintain relative path consistency in CLI mode
if(self::isCli()) // Maintain relative path consistency in CLI mode
{
chdir(e_ROOT);
}
$path = dirname(self::getRelativePath(getcwd(), $target_path)) . "/";
$http_path = dirname($_SERVER['SCRIPT_NAME']);

View File

@@ -780,7 +780,7 @@ class e_parse extends e_parser
require_once(e_HANDLER.'bbcode_handler.php');
$this->e_bb = new e_bbcode;
}
$ret = $this->e_bb->parseBBCodes($data, USERID, 'default', 'PRE'); // $postID = logged in user here
$ret = $this->e_bb->parseBBCodes($data, defset('USERID'), 'default', 'PRE'); // $postID = logged in user here
return $ret;
}

View File

@@ -533,7 +533,12 @@ class e_parse_shortcode
{
global $register_sc;
$themePath = ($theme === null) ? THEME : e_THEME.$theme.'/';
$themePath = ($theme === null) ? defset('THEME') : e_THEME.$theme.'/';
if(empty($themePath))
{
return null;
}
if(file_exists($themePath."theme_shortcodes.php"))
{

View File

@@ -21,6 +21,11 @@ Plugins should use an e_rss.php file in their plugin folder
*/
if (!defined('e107_INIT'))
{
if(!empty($_GET) || !empty($argv))
{
$_E107['minimal'] = true;
}
require_once('../../class2.php');
}
@@ -72,7 +77,6 @@ else
$topic_id = false;
}
// List available rss feeds
if (empty($rss_type))
{
@@ -693,7 +697,7 @@ class rssCreate
<contributor>\n
<name>e107</name>\n
</contributor>\n
<generator uri='http://e107.org/' version='".e_VERSION."'>e107</generator>\n";
<generator uri='http://e107.org/' version='".defset('e_VERSION')."'>e107</generator>\n";
//<icon>/icon.jpg</icon>\n
echo "
<logo>".(strpos(SITEBUTTON, "http:") !== false ? SITEBUTTON : SITEURL.str_replace("../", "", SITEBUTTON))."</logo>\n