aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-08 10:27:56 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-08 10:27:56 +0000
commit64c695a0fbd9b358a30e3aad3922399cc630dcd8 (patch)
tree5476c907a224713559986d33a7ad7f40ff5b06e5
parent2c70709ddeb70f3c12e8ad03e79122a986d741c0 (diff)
downloadelgg-64c695a0fbd9b358a30e3aad3922399cc630dcd8.tar.gz
elgg-64c695a0fbd9b358a30e3aad3922399cc630dcd8.tar.bz2
Added callback support to get_data_row()
git-svn-id: https://code.elgg.org/elgg/trunk@3192 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/database.php6
-rw-r--r--version.php4
2 files changed, 7 insertions, 3 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php
index 01767be39..5989f55c3 100644
--- a/engine/lib/database.php
+++ b/engine/lib/database.php
@@ -303,7 +303,7 @@
* @return object A single database result object
*/
- function get_data_row($query) {
+ function get_data_row($query, $callback = "") {
global $CONFIG, $DB_QUERY_CACHE;
@@ -329,6 +329,10 @@
if ((isset($CONFIG->debug)) && ($CONFIG->debug==true))
error_log("$query results cached");
$DB_QUERY_CACHE[$query] = $row;
+
+ if (!empty($callback) && is_callable($callback)) {
+ $row = $callback($row);
+ }
if ($row) return $row;
}
diff --git a/version.php b/version.php
index b2e58bb2a..e8974c0ad 100644
--- a/version.php
+++ b/version.php
@@ -12,8 +12,8 @@
* @copyright Curverider Ltd 2008-2009
* @link http://elgg.org/
*/
-
- $version = 2009040701; // YYYYMMDD = Elgg Date
+
+ $version = 2009040801; // YYYYMMDD = Elgg Date
// XX = Interim incrementer
$release = '1.5'; // Human-friendly version name