several minor correcttions

This commit is contained in:
Ulf Gebhardt 2019-08-02 17:50:36 +02:00
parent 7e243d9afa
commit b72674f4dd
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
6 changed files with 14 additions and 8 deletions

2
cache/cache_css.php vendored
View File

@ -47,6 +47,8 @@ class cache_css {
public static function ident($files){
$ident = '';
foreach($files as $f){
if(!file_exists($f->SERVERPATH())){
throw new \SYSTEM\LOG\ERROR('Could not find file: '.$f->SERVERPATH());}
$ident .= $f->SERVERPATH().';'.filemtime($f->SERVERPATH()).';';}
return sha1($ident);
}

2
cache/cache_js.php vendored
View File

@ -47,6 +47,8 @@ class cache_js {
public static function ident($files){
$ident = '';
foreach($files as $f){
if(!file_exists($f->SERVERPATH())){
throw new \SYSTEM\LOG\ERROR('Could not find file: '.$f->SERVERPATH());}
$ident .= $f->SERVERPATH().';'.filemtime($f->SERVERPATH()).';';}
return sha1($ident);
}

View File

@ -44,6 +44,8 @@ class cache_scss {
* @return sha1 Returns the requested Ident
*/
public static function ident($file){
if(!file_exists($file)){
throw new \SYSTEM\LOG\ERROR('Could not find file: '.$file);}
return sha1($file.';'.filemtime($file));}
/**

View File

@ -26,11 +26,11 @@ class ConnectionMYS extends ConnectionAbstr {
* @param int $client_flag Client Flag transmitted on connection
*/
public function __construct(DBInfo $dbinfo, $new_link = false, $client_flag = 0){
$this->connection = @mysqli_connect($dbinfo->m_host, $dbinfo->m_user, $dbinfo->m_password, $new_link, $client_flag);
$this->connection = @\mysqli_connect($dbinfo->m_host, $dbinfo->m_user, $dbinfo->m_password, $new_link, $client_flag);
if(!$this->connection){
die('Could not connect to Database. Check ur Database Settings.');}
if(!mysqli_select_db($this->connection, $dbinfo->m_database)){
if(!\mysqli_select_db($this->connection, $dbinfo->m_database)){
die('Could not select Database. Check ur Database Settings.');}
\mysqli_set_charset($this->connection, 'utf8');
@ -48,7 +48,7 @@ class ConnectionMYS extends ConnectionAbstr {
* @return bool Returns true or false depending on success
*/
public function close(){
return mysqli_close($this->connection);}
return \mysqli_close($this->connection);}
/**
* Query the Connection using Prepare Statement
@ -72,7 +72,7 @@ class ConnectionMYS extends ConnectionAbstr {
$binds[1] = $types ? $types : $types_;
\call_user_func_array('mysqli_stmt_bind_param', $binds); //you need 2 append the parameters - thats the right way to do that.
if(!mysqli_stmt_execute($prepStmt)){
if(!\mysqli_stmt_execute($prepStmt)){
throw new \SYSTEM\LOG\ERROR("Could not execute prepare statement: ". \mysqli_stmt_error($prepStmt));}
return new \SYSTEM\DB\ResultMysqliPrepare($prepStmt,$this);

View File

@ -14,9 +14,9 @@ CREATE TABLE `system_todo` (
`server_port` INT(10) UNSIGNED NOT NULL,
`request_uri` CHAR(255) NOT NULL,
`post` TEXT NOT NULL,
`http_referer` CHAR(255) NOT NULL,
`http_user_agent` TEXT NOT NULL,
`user` INT(10) UNSIGNED NOT NULL,
`http_referer` CHAR(255) DEFAULT NULL,
`http_user_agent` TEXT DEFAULT NULL,
`user` INT(10) UNSIGNED DEFAULT NULL,
`thrown` BIT(1) NOT NULL,
`type` INT(11) NOT NULL DEFAULT '0',
`count` INT(11) NOT NULL DEFAULT '1',

View File

@ -40,7 +40,7 @@ class autoload {
*/
private static function getClassNamespaceFromClass($class){
$path_info = \pathinfo($class);
$lastslash = \strrpos($class, 92);
$lastslash = \strrpos($class, '\\');
//No Namespace found
if(!$lastslash){
return array($class, '');}