aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--application/ApplicationUtils.php13
-rw-r--r--index.php4
-rw-r--r--shaarli_version.php2
-rw-r--r--tests/ApplicationUtilsTest.php11
4 files changed, 19 insertions, 11 deletions
diff --git a/application/ApplicationUtils.php b/application/ApplicationUtils.php
index a0f482b0..94c49040 100644
--- a/application/ApplicationUtils.php
+++ b/application/ApplicationUtils.php
@@ -5,7 +5,7 @@
5class ApplicationUtils 5class ApplicationUtils
6{ 6{
7 private static $GIT_URL = 'https://raw.githubusercontent.com/shaarli/Shaarli'; 7 private static $GIT_URL = 'https://raw.githubusercontent.com/shaarli/Shaarli';
8 private static $GIT_BRANCHES = array('master', 'stable'); 8 private static $GIT_BRANCHES = array('latest', 'stable');
9 private static $VERSION_FILE = 'shaarli_version.php'; 9 private static $VERSION_FILE = 'shaarli_version.php';
10 private static $VERSION_START_TAG = '<?php /* '; 10 private static $VERSION_START_TAG = '<?php /* ';
11 private static $VERSION_END_TAG = ' */ ?>'; 11 private static $VERSION_END_TAG = ' */ ?>';
@@ -65,13 +65,10 @@ class ApplicationUtils
65 $isLoggedIn, 65 $isLoggedIn,
66 $branch='stable') 66 $branch='stable')
67 { 67 {
68 if (! $isLoggedIn) { 68 // Do not check versions for visitors
69 // Do not check versions for visitors 69 // Do not check if the user doesn't want to
70 return false; 70 // Do not check with dev version
71 } 71 if (! $isLoggedIn || empty($enableCheck) || $currentVersion === 'dev') {
72
73 if (empty($enableCheck)) {
74 // Do not check if the user doesn't want to
75 return false; 72 return false;
76 } 73 }
77 74
diff --git a/index.php b/index.php
index cc7f3ca3..bf35f1d4 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
1<?php 1<?php
2/** 2/**
3 * Shaarli v0.8.3 - Shaare your links... 3 * Shaarli dev - Shaare your links...
4 * 4 *
5 * The personal, minimalist, super-fast, database free, bookmarking service. 5 * The personal, minimalist, super-fast, database free, bookmarking service.
6 * 6 *
@@ -25,7 +25,7 @@ if (date_default_timezone_get() == '') {
25/* 25/*
26 * PHP configuration 26 * PHP configuration
27 */ 27 */
28define('shaarli_version', '0.8.2'); 28define('shaarli_version', 'dev');
29 29
30// http://server.com/x/shaarli --> /shaarli/ 30// http://server.com/x/shaarli --> /shaarli/
31define('WEB_PATH', substr($_SERVER['REQUEST_URI'], 0, 1+strrpos($_SERVER['REQUEST_URI'], '/', 0))); 31define('WEB_PATH', substr($_SERVER['REQUEST_URI'], 0, 1+strrpos($_SERVER['REQUEST_URI'], '/', 0)));
diff --git a/shaarli_version.php b/shaarli_version.php
index 3f79a4c6..9167b43e 100644
--- a/shaarli_version.php
+++ b/shaarli_version.php
@@ -1 +1 @@
<?php /* 0.8.3 */ ?> <?php /* dev */ ?>
diff --git a/tests/ApplicationUtilsTest.php b/tests/ApplicationUtilsTest.php
index ad86e21c..ef4f46a8 100644
--- a/tests/ApplicationUtilsTest.php
+++ b/tests/ApplicationUtilsTest.php
@@ -332,4 +332,15 @@ class ApplicationUtilsTest extends PHPUnit_Framework_TestCase
332 ApplicationUtils::checkResourcePermissions($conf) 332 ApplicationUtils::checkResourcePermissions($conf)
333 ); 333 );
334 } 334 }
335
336 /**
337 * Check update with 'dev' as curent version (master branch).
338 * It should always return false.
339 */
340 public function testCheckUpdateDev()
341 {
342 $this->assertFalse(
343 ApplicationUtils::checkUpdate('dev', self::$testUpdateFile, 100, true, true)
344 );
345 }
335} 346}