]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/ApplicationUtils.php
Use 'dev' version on the master branch
[github/shaarli/Shaarli.git] / application / ApplicationUtils.php
index cc009a1d25807fe4167750edf4110f6d3a704705..94c490409742e053e4dc53116390362bae011f34 100644 (file)
@@ -5,7 +5,7 @@
 class ApplicationUtils
 {
     private static $GIT_URL = 'https://raw.githubusercontent.com/shaarli/Shaarli';
-    private static $GIT_BRANCHES = array('master', 'stable');
+    private static $GIT_BRANCHES = array('latest', 'stable');
     private static $VERSION_FILE = 'shaarli_version.php';
     private static $VERSION_START_TAG = '<?php /* ';
     private static $VERSION_END_TAG = ' */ ?>';
@@ -65,13 +65,10 @@ class ApplicationUtils
                                        $isLoggedIn,
                                        $branch='stable')
     {
-        if (! $isLoggedIn) {
-            // Do not check versions for visitors
-            return false;
-        }
-
-        if (empty($enableCheck)) {
-            // Do not check if the user doesn't want to
+        // Do not check versions for visitors
+        // Do not check if the user doesn't want to
+        // Do not check with dev version
+        if (! $isLoggedIn || empty($enableCheck) || $currentVersion === 'dev') {
             return false;
         }
 
@@ -195,24 +192,4 @@ class ApplicationUtils
 
         return $errors;
     }
-
-    /**
-     * Get a list of available themes.
-     *
-     * It will return the name of any directory present in the template folder.
-     *
-     * @param string $tplDir Templates main directory.
-     *
-     * @return array List of theme names.
-     */
-    public static function getThemes($tplDir)
-    {
-        $allTheme = glob($tplDir.'/*', GLOB_ONLYDIR);
-        $themes = [];
-        foreach ($allTheme as $value) {
-            $themes[] = str_replace($tplDir.'/', '', $value);
-        }
-
-        return $themes;
-    }
 }