aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2011-12-27 22:19:57 +0100
committerKevin Chabowski <kevin@kch42.de>2011-12-27 22:19:57 +0100
commita1e034a621780fee9398663e1966b18127dfe9fd (patch)
treea476ce733e39fd4b0026b12b926661fd343641d1 /ratatoeskr
parentedad8581bb6ec2cb0e198f1cc5e415ce526147b7 (diff)
downloadratatoeskr-cms-a1e034a621780fee9398663e1966b18127dfe9fd.tar.gz
ratatoeskr-cms-a1e034a621780fee9398663e1966b18127dfe9fd.tar.bz2
ratatoeskr-cms-a1e034a621780fee9398663e1966b18127dfe9fd.zip
Finished optimizing for now. Removed debug tools and new API.
The API version was increased because during this optimization the db models became incompatible to the old ones.
Diffstat (limited to 'ratatoeskr')
-rw-r--r--ratatoeskr/main.php7
-rw-r--r--ratatoeskr/sys/db.php3
-rw-r--r--ratatoeskr/sys/plugin_api.php6
3 files changed, 3 insertions, 13 deletions
diff --git a/ratatoeskr/main.php b/ratatoeskr/main.php
index aa36201..df1672c 100644
--- a/ratatoeskr/main.php
+++ b/ratatoeskr/main.php
@@ -23,7 +23,6 @@ $plugin_objs = array();
function ratatoeskr()
{
global $backend_subactions, $ste, $url_handlers, $ratatoeskr_settings, $plugin_objs;
- global $queries_fired;
$ts_start = microtime(True);
@@ -75,12 +74,6 @@ function ratatoeskr()
foreach($plugin_objs as $plugin_obj)
$plugin_obj->atexit();
$ratatoeskr_settings->save();
-
- echo "<!--
-Queries: $queries_fired
-Time: " . (microtime(True) - $ts_start) . "
-Peak Memory: " . memory_get_peak_usage() / 1024 . "kiB
--->";
}
?>
diff --git a/ratatoeskr/sys/db.php b/ratatoeskr/sys/db.php
index cbf2100..6add093 100644
--- a/ratatoeskr/sys/db.php
+++ b/ratatoeskr/sys/db.php
@@ -76,7 +76,6 @@ function qdb_fmt()
return qdb_vfmt(func_get_args());
}
-$queries_fired = 0;
/*
* Function: qdb
@@ -91,12 +90,10 @@ $queries_fired = 0;
*/
function qdb()
{
- global $queries_fired;
$query = qdb_vfmt(func_get_args());
$rv = mysql_query($query);
if($rv === false)
throw new MySQLException(mysql_errno() . ': ' . mysql_error() . (__DEBUG__ ? ("[[FULL QUERY: " . $query . "]]") : "" ));
- $queries_fired++;
return $rv;
}
diff --git a/ratatoeskr/sys/plugin_api.php b/ratatoeskr/sys/plugin_api.php
index a6f14d4..e8f1a2c 100644
--- a/ratatoeskr/sys/plugin_api.php
+++ b/ratatoeskr/sys/plugin_api.php
@@ -15,15 +15,15 @@ require_once(dirname(__FILE__) . "/../frontend.php");
/*
* Constant: APIVERSION
- * The current API version (2).
+ * The current API version (3).
*/
-define("APIVERSION", 2);
+define("APIVERSION", 3);
/*
* Array: $api_compat
* Array of API versions, this version is compatible to (including itself).
*/
-$api_compat = array(1, 2);
+$api_compat = array(3);
$url_handlers = array();
/*