- added requirement check for "PDO", "PDO_MYSQL" to "/setup" route

- imrpved DB PDO connection (added "TIMEOUT", forced "ERRMODE")
- fixed broken "system alias" renaming dialog
This commit is contained in:
Exodus4D
2016-07-26 19:16:04 +02:00
parent c157d07567
commit 0a14b8fdae
8 changed files with 30 additions and 7 deletions

View File

@@ -419,6 +419,18 @@ class Setup extends Controller {
'version' => strstr(PCRE_VERSION, ' ', true),
'check' => version_compare( strstr(PCRE_VERSION, ' ', true), $f3->get('REQUIREMENTS.PHP.PCRE_VERSION'), '>=')
],
'pdo' => [
'label' => 'PDO',
'required' => 'installed',
'version' => extension_loaded('pdo') ? 'installed' : 'not installed',
'check' => extension_loaded('pdo')
],
'pdoMysql' => [
'label' => 'PDO_MYSQL',
'required' => 'installed',
'version' => extension_loaded('pdo_mysql') ? 'installed' : 'not installed',
'check' => extension_loaded('pdo_mysql')
],
'gd' => [
'label' => 'GD Library (for Image plugin)',
'required' => 'installed',

View File

@@ -110,7 +110,9 @@ class Database extends \Prefab {
$user,
$password,
[
\PDO::MYSQL_ATTR_COMPRESS => TRUE
\PDO::MYSQL_ATTR_COMPRESS => true,
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
\PDO::ATTR_TIMEOUT => \Base::instance()->get('REQUIREMENTS.MYSQL.PDO_TIMEOUT'),
]
);
}catch(\PDOException $e){

View File

@@ -197,6 +197,7 @@ class SystemModel extends BasicModel {
/**
* get map data as object
* @return object
* @throws \Exception
*/
public function getData(){

View File

@@ -30,6 +30,8 @@ MAX_INPUT_VARS = 3000
; min MySQL Version
; newer "deviation" of MySQL like "MariaDB" > 10.1 are recommended
VERSION = 5.6
; DB timeout (seconds)
PDO_TIMEOUT = 2
[REQUIREMENTS.MYSQL.VARS]
; MySql variables. Values are auto. set as 'SESSION' vars

View File

@@ -1989,9 +1989,6 @@ define([
moduleElement = getModule(parentElement, systemData);
showModule(moduleElement);
}
return;
};
});

View File

@@ -739,6 +739,12 @@ define([
$.fn.singleDoubleClick = function(singleClickCallback, doubleClickCallback, timeout) {
return this.each(function(){
var clicks = 0, self = this;
// prevent default behaviour (e.g. open <a>-tag link)
$(this).on('click', function(e){
e.preventDefault();
});
$(this).on('mouseup', function(e){
clicks++;
if (clicks === 1) {

View File

@@ -1989,9 +1989,6 @@ define([
moduleElement = getModule(parentElement, systemData);
showModule(moduleElement);
}
return;
};
});

View File

@@ -739,6 +739,12 @@ define([
$.fn.singleDoubleClick = function(singleClickCallback, doubleClickCallback, timeout) {
return this.each(function(){
var clicks = 0, self = this;
// prevent default behaviour (e.g. open <a>-tag link)
$(this).on('click', function(e){
e.preventDefault();
});
$(this).on('mouseup', function(e){
clicks++;
if (clicks === 1) {