summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorCiaranG <ciaran@ciarang.com>2009-04-08 22:11:58 +0100
committerCiaranG <ciaran@ciarang.com>2009-04-08 22:11:58 +0100
commit85873b1f2b5b6a3e065cf5d227df31380b6f239e (patch)
tree98026e5fdd03e33fa872204a227b102dcca3cf7a /lib/util.php
parent070cd3533c3474dc065c6681befb92dac51f4bf7 (diff)
parent18c8a55ba61e507f08162149273a9a33b9b73ca0 (diff)
Merge branch 'master' of git://gitorious.org/laconica/br3nda into review/master
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index b17a44bd8..675ff51f0 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1321,3 +1321,16 @@ function common_compatible_license($from, $to)
// XXX: better compatibility check needed here!
return ($from == $to);
}
+
+/**
+ * returns a quoted table name, if required according to config
+ */
+function common_database_tablename($tablename)
+{
+
+ if(common_config('db','quote_identifiers')) {
+ $tablename = '"'. $tablename .'"';
+ }
+ //table prefixes could be added here later
+ return $tablename;
+} \ No newline at end of file