]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
Merge branch '0.7.x' of git://gitorious.org/laconica/bAvatar-clone without the uninte...
[quix0rs-gnu-social.git] / lib / util.php
index ab5e99593ee75a151562125827993b120b23364b..e0eda0114b7101e046c55df94a3cb95919550bd4 100644 (file)
@@ -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;
+}