mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
PHP8 Fixes. RSS speed improvement.
This commit is contained in:
14
class2.php
14
class2.php
@@ -84,10 +84,10 @@ if(!empty($_E107['minimal']))
|
|||||||
$_E107['no_forceuserupdate'] = true;
|
$_E107['no_forceuserupdate'] = true;
|
||||||
$_E107['no_event'] = true;
|
$_E107['no_event'] = true;
|
||||||
$_E107['no_session'] = true;
|
$_E107['no_session'] = true;
|
||||||
$_E107['no_parser'] = true;
|
// $_E107['no_parser'] = true;
|
||||||
$_E107['no_override'] = true;
|
$_E107['no_override'] = true;
|
||||||
$_E107['no_log'] = 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 = e107::getLanguage(); // required for v1.0 BC.
|
||||||
$lng->detect();
|
$lng->detect();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
define('e_LAN', 'en');
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// M: Subdomain and Language Selection
|
// M: Subdomain and Language Selection
|
||||||
//
|
//
|
||||||
@@ -769,6 +773,7 @@ else
|
|||||||
{
|
{
|
||||||
define('ADMIN', false);
|
define('ADMIN', false);
|
||||||
define('USER', true);
|
define('USER', true);
|
||||||
|
define('USERCLASS_LIST', '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -777,8 +782,7 @@ else
|
|||||||
|
|
||||||
$developerMode = (vartrue($pref['developer'],false) || E107_DEBUG_LEVEL > 0);
|
$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.
|
// 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.
|
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_TWITCH', false);
|
||||||
define('XURL_VK', false);
|
define('XURL_VK', false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(!defined('MAIL_IDENTIFIER'))
|
if(!defined('MAIL_IDENTIFIER'))
|
||||||
{
|
{
|
||||||
define('MAIL_IDENTIFIER', 'X-e107-id');
|
define('MAIL_IDENTIFIER', 'X-e107-id');
|
||||||
|
@@ -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)) . "/";
|
$path = dirname(self::getRelativePath(getcwd(), $target_path)) . "/";
|
||||||
|
|
||||||
$http_path = dirname($_SERVER['SCRIPT_NAME']);
|
$http_path = dirname($_SERVER['SCRIPT_NAME']);
|
||||||
|
@@ -780,7 +780,7 @@ class e_parse extends e_parser
|
|||||||
require_once(e_HANDLER.'bbcode_handler.php');
|
require_once(e_HANDLER.'bbcode_handler.php');
|
||||||
$this->e_bb = new e_bbcode;
|
$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;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -533,7 +533,12 @@ class e_parse_shortcode
|
|||||||
{
|
{
|
||||||
global $register_sc;
|
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"))
|
if(file_exists($themePath."theme_shortcodes.php"))
|
||||||
{
|
{
|
||||||
|
@@ -21,6 +21,11 @@ Plugins should use an e_rss.php file in their plugin folder
|
|||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT'))
|
if (!defined('e107_INIT'))
|
||||||
{
|
{
|
||||||
|
if(!empty($_GET) || !empty($argv))
|
||||||
|
{
|
||||||
|
$_E107['minimal'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
require_once('../../class2.php');
|
require_once('../../class2.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +77,6 @@ else
|
|||||||
$topic_id = false;
|
$topic_id = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// List available rss feeds
|
// List available rss feeds
|
||||||
if (empty($rss_type))
|
if (empty($rss_type))
|
||||||
{
|
{
|
||||||
@@ -693,7 +697,7 @@ class rssCreate
|
|||||||
<contributor>\n
|
<contributor>\n
|
||||||
<name>e107</name>\n
|
<name>e107</name>\n
|
||||||
</contributor>\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
|
//<icon>/icon.jpg</icon>\n
|
||||||
echo "
|
echo "
|
||||||
<logo>".(strpos(SITEBUTTON, "http:") !== false ? SITEBUTTON : SITEURL.str_replace("../", "", SITEBUTTON))."</logo>\n
|
<logo>".(strpos(SITEBUTTON, "http:") !== false ? SITEBUTTON : SITEURL.str_replace("../", "", SITEBUTTON))."</logo>\n
|
||||||
|
Reference in New Issue
Block a user