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 = ' */ ?>';
$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;
}
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;
- }
}