bug in upgrade script causing it not to ask for new user;
makefile: execute lint check on target folder instead of source; redirect user to install if no installation is foundpull/100/head
parent
3ee8b9406b
commit
bf0a2a34de
|
@ -1,3 +1,4 @@
|
|||
.idea/*
|
||||
/nbproject
|
||||
/config.php
|
||||
/build
|
||||
|
|
7
Makefile
7
Makefile
|
@ -6,11 +6,10 @@ help:
|
|||
|
||||
export:
|
||||
@echo 'Building release for tag $(tag) '
|
||||
@echo 'Testing on syntax errors (thats all the automated testing your are going to get for now..) '
|
||||
find . -name "*.php" | xargs -I file php -l file
|
||||
rm -rf ./build
|
||||
mkdir ./build ./build/phpservermon
|
||||
mkdir -p ./build ./build/phpservermon
|
||||
git archive $(tag) | tar -xf - -C ./build/phpservermon/
|
||||
@echo 'Testing on syntax errors (thats all the automated testing your are going to get for now..) '
|
||||
find ./build/phpservermon -name "*.php" | xargs -I file php -l file
|
||||
find ./build/phpservermon -name "*.php" -exec sed -i "" "s/@package_version@/$(tag)/" {} \;
|
||||
find ./build/phpservermon -type f | xargs chmod 0644
|
||||
find ./build/phpservermon -type d | xargs chmod 0755
|
||||
|
|
|
@ -109,7 +109,8 @@ if(defined('PSM_INSTALL') && PSM_INSTALL) {
|
|||
// attempt to load configuration from database
|
||||
if(!psm_load_conf()) {
|
||||
// unable to load from config table
|
||||
die('We were unable to find an existing installation. <a href="install.php">Please click here to install PHP Server Monitor</a>.');
|
||||
header('Location: install.php');
|
||||
die();
|
||||
}
|
||||
// config load OK, make sure database version is up to date
|
||||
$version_db = psm_get_conf('version');
|
||||
|
|
|
@ -182,7 +182,7 @@ class InstallController extends AbstractController {
|
|||
if($this->db->status()) {
|
||||
if($this->isUpgrade()) {
|
||||
// upgrade
|
||||
if(version_compare(PSM_VERSION, '3.0.0', '<')) {
|
||||
if(version_compare($this->getPreviousVersion(), '3.0.0', '<')) {
|
||||
// upgrade from before 3.0, does not have passwords yet.. create new user first
|
||||
$this->addMessage('Your current version does not have an authentication system, but since v3.0 access to the monitor is restricted by user accounts. Please set up a new account to be able to login after the upgrade, and which you can use to change the passwords for your other accounts.', 'info');
|
||||
$this->setTemplateId('install_config_new_user', 'install/install.tpl.html');
|
||||
|
|
Loading…
Reference in New Issue