mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
New constant: e_VERSION for the currently installed version of e107. Prevents the need for further loading of ver.php and useful to detect when an upgrade of core files has been performed.
This commit is contained in:
@@ -144,11 +144,11 @@ class admin_start
|
||||
e_PLUGIN."pm/sendpm.sc",
|
||||
e_PLUGIN."pm/shortcodes/",
|
||||
e_PLUGIN."social/e_header.php",
|
||||
e_PLUGIN."download/url/url.php",
|
||||
e_PLUGIN."download/url/sef_url.php",
|
||||
// e_PLUGIN."download/url/url.php",
|
||||
// e_PLUGIN."download/url/sef_url.php",
|
||||
);
|
||||
|
||||
|
||||
$this->checkCoreVersion();
|
||||
|
||||
if(!empty($_POST['delete-deprecated']))
|
||||
{
|
||||
@@ -253,6 +253,28 @@ class admin_start
|
||||
}
|
||||
|
||||
|
||||
private function checkCoreVersion()
|
||||
{
|
||||
|
||||
$e107info = array();
|
||||
|
||||
require(e_ADMIN."ver.php");
|
||||
|
||||
if(!empty($e107info['e107_version']) && (e_VERSION !== $e107info['e107_version']))
|
||||
{
|
||||
e107::getConfig()->set('version', $e107info['e107_version'])->save(false,true,false);
|
||||
|
||||
// When version has changed, clear plugin/theme version cache.
|
||||
e107::getPlug()->clearCache();
|
||||
e107::getTheme()->clearCache();
|
||||
|
||||
e107::getDebug()->log("Updating core version pref");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function checkCoreUpdate()
|
||||
{
|
||||
// auto db update
|
||||
|
Reference in New Issue
Block a user