]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Rename shaarli_version constant to uppercase 979/head
authorArthurHoaro <arthur@hoa.ro>
Sun, 1 Oct 2017 09:09:12 +0000 (11:09 +0200)
committerArthurHoaro <arthur@hoa.ro>
Sun, 1 Oct 2017 09:11:16 +0000 (11:11 +0200)
application/PageBuilder.php
application/Updater.php
index.php

index c91b662cd3619ad22ae398ac175b3584987617c9..291860adeb61912af4f8671c8544849224804713 100644 (file)
@@ -49,7 +49,7 @@ class PageBuilder
 
         try {
             $version = ApplicationUtils::checkUpdate(
-                shaarli_version,
+                SHAARLI_VERSION,
                 $this->conf->get('resource.update_check'),
                 $this->conf->get('updates.check_updates_interval'),
                 $this->conf->get('updates.check_updates'),
@@ -75,7 +75,7 @@ class PageBuilder
         }
         $this->tpl->assign('searchcrits', $searchcrits);
         $this->tpl->assign('source', index_url($_SERVER));
-        $this->tpl->assign('version', shaarli_version);
+        $this->tpl->assign('version', SHAARLI_VERSION);
         $this->tpl->assign(
             'version_hash',
             ApplicationUtils::getVersionHash(SHAARLI_VERSION, $this->conf->get('credentials.salt'))
index 40a15906b6bac9b53fb54faff0232b6514dd76ec..72b2def019dea484d28b6de040097d614dc6e867 100644 (file)
@@ -398,7 +398,7 @@ class Updater
      */
     public function updateMethodCheckUpdateRemoteBranch()
     {
-        if (shaarli_version === 'dev' || $this->conf->get('updates.check_updates_branch') === 'latest') {
+        if (SHAARLI_VERSION === 'dev' || $this->conf->get('updates.check_updates_branch') === 'latest') {
             return true;
         }
 
@@ -413,7 +413,7 @@ class Updater
         $latestMajor = $matches[1];
 
         // Get current major version digit
-        preg_match('/(\d+)\.\d+$/', shaarli_version, $matches);
+        preg_match('/(\d+)\.\d+$/', SHAARLI_VERSION, $matches);
         $currentMajor = $matches[1];
 
         if ($currentMajor === $latestMajor) {
index fb00a9fa3adb8d302f712fcbe7d7fc2a694409f4..12ccceafe652a5bf3c2a119d1258b65485ca97f2 100644 (file)
--- a/index.php
+++ b/index.php
@@ -88,7 +88,7 @@ try {
     exit;
 }
 
-define('shaarli_version', ApplicationUtils::getVersion(__DIR__ .'/'. ApplicationUtils::$VERSION_FILE));
+define('SHAARLI_VERSION', ApplicationUtils::getVersion(__DIR__ .'/'. ApplicationUtils::$VERSION_FILE));
 
 // Force cookie path (but do not change lifetime)
 $cookie = session_get_cookie_params();