aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/database.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-24 20:23:18 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-24 20:23:18 +0000
commitfcfe1a24590f4909506fd06b5c92186433ddb906 (patch)
treefcc1d770175c43db0ae7839dc893675106aebfd1 /engine/lib/database.php
parentfe5cee34c946f0d99f64f5a14955306d8d5f2527 (diff)
downloadelgg-fcfe1a24590f4909506fd06b5c92186433ddb906.tar.gz
elgg-fcfe1a24590f4909506fd06b5c92186433ddb906.tar.bz2
Caching the show_db_tables function
git-svn-id: https://code.elgg.org/elgg/trunk@1114 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/database.php')
-rw-r--r--engine/lib/database.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/engine/lib/database.php b/engine/lib/database.php
index 74d6d2d77..d908bf725 100644
--- a/engine/lib/database.php
+++ b/engine/lib/database.php
@@ -305,6 +305,12 @@
*/
function get_db_tables() {
global $CONFIG;
+ static $tables, $count;
+
+ if (isset($tables)) {
+ return $tables;
+ }
+
$result = get_data("show tables");
$tables = array();