summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-11-16 15:34:08 +1100
committerSavetheinternet <savetheinternet@tinyboard.org>2011-11-16 15:34:08 +1100
commitf71389333ecfa74145c06a79c1ef320af7d9c47f (patch)
treefe63a8b68f8409f5e103d0d63ed05af1ca6985f0
parent86bbe132a9ce73efedebe5ac4d6414bc40ad1f09 (diff)
Don't load version file twice'
-rw-r--r--mod.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/mod.php b/mod.php
index 26869aa0..5b376f27 100644
--- a/mod.php
+++ b/mod.php
@@ -168,7 +168,7 @@
}
if($mod['type'] >= ADMIN && $config['check_updates']) {
- if(!$version = @file_get_contents('.installed'))
+ if(!$config['version'])
error('Could not find current version! (Check .installed)');
if(isset($_SESSION['update']) && time() - $_SESSION['update']['time'] < $config['check_updates_time']) {
$latest = unserialize($_SESSION['update']['latest']);
@@ -182,7 +182,7 @@
if($code = @file_get_contents('http://tinyboard.org/version.txt', 0, $ctx)) {
eval($code);
- if(preg_match('/v(\d+)\.(\d)\.(\d+)(-dev.+)?$/', $version, $m)) {
+ if(preg_match('/v(\d+)\.(\d)\.(\d+)(-dev.+)?$/', $config['version'], $m)) {
$current = Array(
'massive' => (int)$m[1],
'major' => (int)$m[2],