diff --git a/db/qq/QP.php b/db/qq/QP.php index 162af60..6a09927 100644 --- a/db/qq/QP.php +++ b/db/qq/QP.php @@ -26,6 +26,6 @@ class QP { //override this protected static function query(){ - throw new \SYSTEM\LOG\ERROR('query function of your QQ Object not overritten!');} + throw new \SYSTEM\LOG\ERROR('query function of your QP Class not overwritten!');} //return new QQuery();} } \ No newline at end of file diff --git a/db/qq/QQ.php b/db/qq/QQ.php index 824fa23..c8bf9dc 100644 --- a/db/qq/QQ.php +++ b/db/qq/QQ.php @@ -26,6 +26,6 @@ class QQ { //override this protected static function query(){ - throw new \SYSTEM\LOG\ERROR('query function of your QQ Object not overritten!');} + throw new \SYSTEM\LOG\ERROR('query function of your QQ Class not overwritten!');} //return new QQuery();} } \ No newline at end of file diff --git a/dbd/qq/SYS_LOG_INSERT.php b/dbd/qq/SYS_LOG_INSERT.php index 37b0b0d..6824fbe 100644 --- a/dbd/qq/SYS_LOG_INSERT.php +++ b/dbd/qq/SYS_LOG_INSERT.php @@ -17,14 +17,14 @@ class SYS_LOG_INSERT extends \SYSTEM\DB\QP { 'VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16);', //mys 'INSERT INTO '.\SYSTEM\DBD\system_log::NAME_MYS. - '('.\SYSTEM\DBD\system_log::FIELD_CLASS.','.\SYSTEM\DBD\system_log::FIELD_MESSAGE.','. - \SYSTEM\DBD\system_log::FIELD_CODE.','.\SYSTEM\DBD\system_log::FIELD_FILE.','. - \SYSTEM\DBD\system_log::FIELD_LINE.','.\SYSTEM\DBD\system_log::FIELD_TRACE.','. - \SYSTEM\DBD\system_log::FIELD_IP.','.\SYSTEM\DBD\system_log::FIELD_QUERYTIME.','. - \SYSTEM\DBD\system_log::FIELD_TIME.','.\SYSTEM\DBD\system_log::FIELD_SERVER_NAME.','. - \SYSTEM\DBD\system_log::FIELD_SERVER_PORT.','.\SYSTEM\DBD\system_log::FIELD_REQUEST_URI.','. - \SYSTEM\DBD\system_log::FIELD_POST.','.\SYSTEM\DBD\system_log::FIELD_HTTP_REFERER.','. - \SYSTEM\DBD\system_log::FIELD_HTTP_USER_AGENT.','.\SYSTEM\DBD\system_log::FIELD_USER.','. - \SYSTEM\DBD\system_log::FIELD_THROWN.')'. - 'VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);' +'('.\SYSTEM\DBD\system_log::FIELD_CLASS.','.\SYSTEM\DBD\system_log::FIELD_MESSAGE.','. + \SYSTEM\DBD\system_log::FIELD_CODE.','.\SYSTEM\DBD\system_log::FIELD_FILE.','. + \SYSTEM\DBD\system_log::FIELD_LINE.','.\SYSTEM\DBD\system_log::FIELD_TRACE.','. + \SYSTEM\DBD\system_log::FIELD_IP.','.\SYSTEM\DBD\system_log::FIELD_QUERYTIME.','. + \SYSTEM\DBD\system_log::FIELD_TIME.','.\SYSTEM\DBD\system_log::FIELD_SERVER_NAME.','. + \SYSTEM\DBD\system_log::FIELD_SERVER_PORT.','.\SYSTEM\DBD\system_log::FIELD_REQUEST_URI.','. + \SYSTEM\DBD\system_log::FIELD_POST.','.\SYSTEM\DBD\system_log::FIELD_HTTP_REFERER.','. + \SYSTEM\DBD\system_log::FIELD_HTTP_USER_AGENT.','.\SYSTEM\DBD\system_log::FIELD_USER.','. + \SYSTEM\DBD\system_log::FIELD_THROWN.')'. +'VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);' );}} \ No newline at end of file diff --git a/dbd/tbl/locale_string.php b/dbd/tbl/system_locale_string.php similarity index 95% rename from dbd/tbl/locale_string.php rename to dbd/tbl/system_locale_string.php index dcab86c..ff09565 100644 --- a/dbd/tbl/locale_string.php +++ b/dbd/tbl/system_locale_string.php @@ -2,7 +2,7 @@ namespace SYSTEM\DBD; -class locale_string { +class system_locale_string { const NAME_PG = 'system.locale_string'; const NAME_MYS = 'system_locale_string'; diff --git a/sai/modules/saimod_sys_locale/saimod_sys_locale.php b/sai/modules/saimod_sys_locale/saimod_sys_locale.php index dc02483..d91f1b5 100644 --- a/sai/modules/saimod_sys_locale/saimod_sys_locale.php +++ b/sai/modules/saimod_sys_locale/saimod_sys_locale.php @@ -12,9 +12,9 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule { $con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo()); if(\SYSTEM\system::isSystemDbInfoPG()){ - $res = $con->query('SELECT "category", COUNT(*) as "count" FROM system.locale_string GROUP BY "category" ORDER BY "category" ASC;'); + $res = $con->query('SELECT "category", COUNT(*) as "count" FROM '.\SYSTEM\DBD\system_locale_string::NAME_PG.' GROUP BY "category" ORDER BY "category" ASC;'); } else { - $res = $con->query('SELECT `category`, COUNT(*) as `count` FROM system_locale_string GROUP BY `category` ORDER BY `category` ASC;'); + $res = $con->query('SELECT `category`, COUNT(*) as `count` FROM '.\SYSTEM\DBD\system_locale_string::NAME_MYS.' GROUP BY `category` ORDER BY `category` ASC;'); } $vars['tabopts'] = ''; @@ -27,9 +27,9 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule { } if(\SYSTEM\system::isSystemDbInfoPG()){ - $res = $con->query('SELECT * FROM system.locale_string ORDER BY "category" ASC;'); + $res = $con->query('SELECT * FROM '.\SYSTEM\DBD\system_locale_string::NAME_PG.' ORDER BY "category" ASC;'); } else { - $res = $con->query('SELECT * FROM system_locale_string ORDER BY category ASC;'); + $res = $con->query('SELECT * FROM '.\SYSTEM\DBD\system_locale_string::NAME_MYS.' ORDER BY category ASC;'); } $langhead = ''; @@ -65,9 +65,9 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule { $con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo()); $res = null; if(\SYSTEM\system::isSystemDbInfoPG()){ - $res = $con->prepare('newText' ,'UPDATE system.locale_string SET "'.$lang.'"=$1 WHERE id=$2;', array($newtext, $id)); + $res = $con->prepare('newText' ,'UPDATE '.\SYSTEM\DBD\system_locale_string::NAME_PG.' SET "'.$lang.'"=$1 WHERE id=$2;', array($newtext, $id)); } else { - $res = $con->prepare('newText' ,'UPDATE system_locale_string SET '.$lang.'=? WHERE id=?;', array($newtext, $id)); + $res = $con->prepare('newText' ,'UPDATE '.\SYSTEM\DBD\system_locale_string::NAME_MYS.' SET '.$lang.'=? WHERE id=?;', array($newtext, $id)); } return $res->affectedRows() == 0 ? \SYSTEM\LOG\JsonResult::error(new \SYSTEM\LOG\WARNING("no rows affected")) : \SYSTEM\LOG\JsonResult::ok(); } @@ -76,9 +76,9 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule { $con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo()); $res = null; if(\SYSTEM\system::isSystemDbInfoPG()){ - $res = $con->prepare('addText' ,'INSERT INTO system.locale_string (id, category) VALUES ($1, $2);', array($id, $category)); + $res = $con->prepare('addText' ,'INSERT INTO '.\SYSTEM\DBD\system_locale_string::NAME_PG.' (id, category) VALUES ($1, $2);', array($id, $category)); } else { - $res = $con->prepare('addText' ,'INSERT INTO system_locale_string (id, category) VALUES (?, ?);', array($id, $category)); + $res = $con->prepare('addText' ,'INSERT INTO '.\SYSTEM\DBD\system_locale_string::NAME_MYS.' (id, category) VALUES (?, ?);', array($id, $category)); } return $res->affectedRows() == 0 ? \SYSTEM\LOG\JsonResult::error(new \SYSTEM\LOG\WARNING("no data added")) : \SYSTEM\LOG\JsonResult::ok(); } @@ -91,9 +91,9 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule { $con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo()); $res = null; if(\SYSTEM\system::isSystemDbInfoPG()){ - $res = $con->prepare('deleteText' ,'DELETE FROM system.locale_string WHERE id=$1;', array($id)); + $res = $con->prepare('deleteText' ,'DELETE FROM '.\SYSTEM\DBD\system_locale_string::NAME_PG.' WHERE id=$1;', array($id)); } else { - $res = $con->prepare('deleteText' ,'DELETE FROM system_locale_string WHERE id=?;', array($id)); + $res = $con->prepare('deleteText' ,'DELETE FROM '.\SYSTEM\DBD\system_locale_string::NAME_MYS.' WHERE id=?;', array($id)); } return $res->affectedRows() == 0 ? \SYSTEM\LOG\JsonResult::error(new \SYSTEM\LOG\WARNING("could not delete the permitted data")) : \SYSTEM\LOG\JsonResult::ok(); } @@ -103,11 +103,11 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule { $res = null; if(\SYSTEM\system::isSystemDbInfoPG()){ $res = $con->prepare( 'edit', - 'SELECT * FROM system.locale_string WHERE id = $1 ORDER BY "category" ASC;', + 'SELECT * FROM '.\SYSTEM\DBD\system_locale_string::NAME_PG.' WHERE id = $1 ORDER BY "category" ASC;', array($entry)); } else { $res = $con->prepare( 'edit', - 'SELECT * FROM system_locale_string WHERE id = ? ORDER BY "category" ASC;', + 'SELECT * FROM '.\SYSTEM\DBD\system_locale_string::NAME_MYS.' WHERE id = ? ORDER BY "category" ASC;', array($entry)); } if(!$r = $res->next()){ diff --git a/sai/modules/saimod_sys_login/saimod_sys_login.php b/sai/modules/saimod_sys_login/saimod_sys_login.php index 58d2a0a..514febf 100644 --- a/sai/modules/saimod_sys_login/saimod_sys_login.php +++ b/sai/modules/saimod_sys_login/saimod_sys_login.php @@ -12,8 +12,8 @@ class saimod_sys_login extends \SYSTEM\SAI\SaiModule { $vars['login_username_too_short'] = 'Username to short.'; $vars['login_password_too_short'] = 'Password to short.'; $vars['isadmin'] = \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI) ? "yes" : "no"; - $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\locale_string::VALUE_CATEGORY_SYSTEM_SAI)); - $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\locale_string::VALUE_CATEGORY_SYSTEM_SAI_ERROR)); + $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI)); + $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI_ERROR)); if(\SYSTEM\SECURITY\Security::isLoggedIn()){ return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/logout.tpl'), $vars); @@ -39,8 +39,8 @@ class saimod_sys_login extends \SYSTEM\SAI\SaiModule { } public static function sai_mod__SYSTEM_SAI_saimod_sys_login_action_registerform(){ - $vars = \SYSTEM\locale::getStrings(\SYSTEM\DBD\locale_string::VALUE_CATEGORY_SYSTEM_SAI); - $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\locale_string::VALUE_CATEGORY_SYSTEM_SAI_ERROR)); + $vars = \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI); + $vars = array_merge($vars, \SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI_ERROR)); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/register.tpl'), $vars);} public static function html_li_menu(){return '