"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/class/dbal.php" between
wacko.6.1.16.zip and wacko.6.1.17.zip

About: WackoWiki is a multilingual Wiki-engine that supports WYTIWYG-editing, page rights (ACLs), design themes (skins), file upload, email notification and much more.

dbal.php  (wacko.6.1.16):dbal.php  (wacko.6.1.17)
skipping to change at line 83 skipping to change at line 83
function sql_query($query, $debug = 0) function sql_query($query, $debug = 0)
{ {
if ($debug) if ($debug)
{ {
echo "(QUERY: $query)"; echo "(QUERY: $query)";
} }
if ($this->debug >= 2) if ($this->debug >= 2)
{ {
$start = microtime(1); $start = microtime(true);
} }
$result = $this->db->query($query); $result = $this->db->query($query);
$this->affected_rows = ($result !== false)? $this->db->affected_r ows($result) : -1; $this->affected_rows = ($result !== false)? $this->db->affected_r ows($result) : -1;
if ($this->debug >= 2) if ($this->debug >= 2)
{ {
$time = microtime(1) - $start; $time = microtime(true) - $start;
$this->query_time += $time; $this->query_time += $time;
if ($this->debug >= 3) if ($this->debug >= 3)
{ {
$this->query_log[] = [ $this->query_log[] = [
$query, $query,
$time, $time,
$this->affected_rows, $this->affected_rows,
Ut::backtrace(), Ut::backtrace(),
]; ];
skipping to change at line 216 skipping to change at line 216
$query = preg_replace_callback('/(\s+)|(^[\s;]+|[\s;]+$)|\'(\\\\\ '|\\\\\\\\|[^\'])*\'|"(\\\\"|\\\\\\\\|[^"])*"/', $query = preg_replace_callback('/(\s+)|(^[\s;]+|[\s;]+$)|\'(\\\\\ '|\\\\\\\\|[^\'])*\'|"(\\\\"|\\\\\\\\|[^"])*"/',
function ($x) function ($x)
{ {
if (!empty($x[1])) if (!empty($x[1]))
return ' '; return ' ';
if (!empty($x[2])) if (!empty($x[2]))
return ''; return '';
return $x[0]; return $x[0];
}, $query); }, $query);
return Ut::join_path(CACHE_SQL_DIR, Ut::http64_encode(hash('sha1' , $query, 1))); return Ut::join_path(CACHE_SQL_DIR, Ut::http64_encode(hash('sha1' , $query, true)));
} }
// low level stuff: // low level stuff:
// used (exclusively, as of 20160705) by lib/bad_behaviour/bad-behaviour- wackowiki.php // used (exclusively, as of 20160705) by lib/bad_behaviour/bad-behaviour- wackowiki.php
function ll_query($query) function ll_query($query)
{ {
return $this->db->query($query); return $this->db->query($query);
} }
function free_result($results) function free_result($results)
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)