From cb172742c78517baf6a79b52f980b0b9dcb81274 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Tue, 27 Dec 2011 00:05:49 +0100 Subject: Rewritten Settings class and added atexit() to plugin API. Settings now does not load/save values automatically any more (to save SQL queries). Settings will be loaded at startup and saved at the end. There is also only one instance possible now (singleton). --- ratatoeskr/main.php | 5 ++ ratatoeskr/sys/models.php | 154 +++++++++++++++++++++++------------------- ratatoeskr/sys/plugin_api.php | 14 ++-- 3 files changed, 98 insertions(+), 75 deletions(-) (limited to 'ratatoeskr') diff --git a/ratatoeskr/main.php b/ratatoeskr/main.php index 9d963ac..aa36201 100644 --- a/ratatoeskr/main.php +++ b/ratatoeskr/main.php @@ -71,6 +71,11 @@ function ratatoeskr() $ste->vars["rel_path_to_root"] = $rel_path_to_root; url_process($urlpath, $url_handlers, $data); + + foreach($plugin_objs as $plugin_obj) + $plugin_obj->atexit(); + $ratatoeskr_settings->save(); + echo "