X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fdba.php;h=c66723033c1965c6251cd837fdba3c0f5f43276b;hb=602821279a504752f15829afbe7eca848352d0c8;hp=7409ec3a8ce69e278e9ac0c205dc7890b5e9657e;hpb=dfa52185cac97b86225f20b2e73839de03a54e22;p=friendica.git diff --git a/include/dba.php b/include/dba.php index 7409ec3a8c..c66723033c 100644 --- a/include/dba.php +++ b/include/dba.php @@ -1,10 +1,15 @@ db) + if ($this->db) if($this->mysqli) $this->db->close(); else @@ -245,14 +250,14 @@ function printable($s) { }} // Procedural functions -if(! function_exists('dbg')) { +if(! function_exists('dbg')) { function dbg($state) { global $db; if($db) $db->dbg($state); }} -if(! function_exists('dbesc')) { +if(! function_exists('dbesc')) { function dbesc($str) { global $db; if($db && $db->connected) @@ -268,7 +273,7 @@ function dbesc($str) { // Example: $r = q("SELECT * FROM `%s` WHERE `uid` = %d", // 'user', 1); -if(! function_exists('q')) { +if(! function_exists('q')) { function q($sql) { global $db; @@ -285,12 +290,12 @@ function q($sql) { /** * - * This will happen occasionally trying to store the - * session data after abnormal program termination + * This will happen occasionally trying to store the + * session data after abnormal program termination * */ logger('dba: no database: ' . print_r($args,true)); - return false; + return false; }} @@ -300,7 +305,7 @@ function q($sql) { * */ -if(! function_exists('dbq')) { +if(! function_exists('dbq')) { function dbq($sql) { global $db; @@ -312,10 +317,10 @@ function dbq($sql) { }} -// Caller is responsible for ensuring that any integer arguments to +// Caller is responsible for ensuring that any integer arguments to // dbesc_array are actually integers and not malformed strings containing -// SQL injection vectors. All integer array elements should be specifically -// cast to int to avoid trouble. +// SQL injection vectors. All integer array elements should be specifically +// cast to int to avoid trouble. if(! function_exists('dbesc_array_cb')) {