summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
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 ab5e99593..e0eda0114 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1326,3 +1326,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;
+}