1
0
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:
Cameron
2017-04-27 15:21:20 -07:00
parent 2724127ba2
commit 4650aa8d91
9 changed files with 43 additions and 18 deletions

View File

@@ -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