minor improvements in /setup root

This commit is contained in:
Exodus4D
2015-12-30 17:05:24 +01:00
parent c5f0af8e43
commit 602d8fee28
7 changed files with 28 additions and 23 deletions

View File

@@ -7,14 +7,15 @@
SERVER = DEVELOP
[ENVIRONMENT.DEVELOP]
;BASE = /pathfinder <= default: "auto-detect"
; base dir (Default: "auto-detect"
BASE =
; deployment URL e.g. http://localhost
URL = http://pathfinder.local
; Verbosity level of the stack trace
DEBUG = 3
; main db
DB_DNS = mysql:host=localhost;port=3306;dbname=
DB_NAME = pathfinder_empty
DB_NAME = pathfinder
DB_USER = root
DB_PASS =
; EVE-Online CCP Database export
@@ -32,9 +33,9 @@ SMTP_FROM = pathfinder@localhost.com
SMTP_ERROR = pathfinder@localhost.com
[ENVIRONMENT.PRODUCTION]
BASE = /www/htdocs/w0128162/www.pathfinder.exodus4d.de
BASE = /www/htdocs/www.pathfinder-w.space
; deployment URL
URL = https://www.pathfinder.exodus4d.de
URL = https://www.pathfinder-w.space
; Verbosity level of the stack trace
DEBUG = 0
; main db

View File

@@ -635,13 +635,14 @@ class Setup extends Controller {
protected function checkDBConfig($f3, $db){
// some db like "Maria DB" have some strange version strings....
$dbVersion = $db->version();
if(strpos('maria', $dbVersion) !== 1){
$dbTempVersion = explode('-', $dbVersion);
if(count($dbTempVersion) > 2){
$dbVersion = $dbTempVersion[1];
}else{
$dbVersion = $dbTempVersion[0];
$dbVersionString = $db->version();
$dbVersionParts = explode('-', $dbVersionString);
$dbVersion = '???';
foreach($dbVersionParts as $dbVersionPart){
// check if this is a valid version number
// hint: MariaDB´s version is always the last valid version number...
if( version_compare( $dbVersionPart, '0.0.1', '>=' ) > 0 ){
$dbVersion = $dbVersionPart;
}
}

View File

@@ -145,6 +145,7 @@ class CcpSystemsUpdate {
$sql = "UPDATE
" . $tableName . "
SET
updated = now(),
value24 = value23,
value23 = value22,
value22 = value21,

View File

@@ -19,6 +19,10 @@ MAX_SHARED_USER = 10
MAX_SHARED_CORPORATION = 3
MAX_SHARED_ALLIANCE = 2
; show warning on "login" form if /setup route is active
; DO NOT disable this warning unless /setup route is protected by e.g. WebAuth
SHOW_SETUP_WARNING = 1
; REGISTRATION ====================================================================================
[PATHFINDER.REGISTRATION]
; registration status (for new users) (0=disabled, 1=enabled)
@@ -30,9 +34,9 @@ INVITE = 0
; the limit of registration keys. Increase it to hand out more keys
INVITE_LIMIT = 50
; View ============================================================================================
[PATHFINDER.VIEW]
; Server side template
; Main
; static page temaplates
INDEX = templates/view/index.html
SETUP = templates/view/setup.html
LANDINGPAGE = templates/view/landingpage.html
@@ -47,13 +51,6 @@ LIFETIME = 99999
[PATHFINDER.MAP.ALLIANCE]
LIFETIME = 99999
; CACHE ===========================================================================================
[PATHFINDER.CACHE]
; cache character log informations in seconds. This is ignored if ship/system switch was detected
CHARACTER_LOG = 300
; cache time for all system data within a constellation (this will never change) 30d
CONSTELLATION_SYSTEMS = 2592000
; TIMER ===========================================================================================
[PATHFINDER.TIMER]
; login time (minutes)
@@ -81,6 +78,13 @@ EXECUTION_LIMIT = 200
[PATHFINDER.TIMER.UPDATE_CLIENT_USER_DATA]
EXECUTION_LIMIT = 50
; CACHE ===========================================================================================
[PATHFINDER.CACHE]
; cache character log informations in seconds. This is ignored if ship/system switch was detected
CHARACTER_LOG = 300
; cache time for all system data within a constellation (this will never change) 30d
CONSTELLATION_SYSTEMS = 2592000
; LOGGING =========================================================================================
[PATHFINDER.LOGFILES]
; just for manuel debug during development

View File

@@ -25,7 +25,6 @@ VERSION = 5.6
[REQUIREMENTS.MYSQL.OPTIONS]
STORAGE_ENGINE = InnoDB
CHARACTER_SET_SERVER = utf8
LOWER_CASE_TABLE_NAMES = 2
FOREIGN_KEY_CHECKS = 1

View File

@@ -1,5 +1,4 @@
<?php
$f3 = require('app/lib/base.php');
// load main config

View File

@@ -106,7 +106,7 @@
</div>
{* check for setup mode *}
<check if="{{ array_key_exists('/setup', @ROUTES) }}">
<check if="{{ array_key_exists('/setup', @ROUTES) && @PATHFINDER.SHOW_SETUP_WARNING }}">
<div class="container-fluid">
<div class="row">
<div class="col-sm-8 col-sm-offset-2">