]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/schema.php
Ticket #2273: Fix bookmarklet with URls with special characters
[quix0rs-gnu-social.git] / lib / schema.php
index 27a4deda11fb7443b0adfa15de59a1eda51af257..1503c96d4fc9cb28744aa13cc8ed0580d679f6f1 100644 (file)
@@ -77,14 +77,12 @@ class Schema
     {
         $type = common_config('db', 'type');
         if (empty(self::$_single)) {
-            include "lib/schema.{$type}.php";
-            $class = $type.='Schema';
-            self::$_single = new $class();
+            $schemaClass = ucfirst($type).'Schema';
+            self::$_single = new $schemaClass();
         }
         return self::$_single;
     }
 
-
     /**
      * Gets a ColumnDef object for a single column.
      *
@@ -475,7 +473,7 @@ class Schema
         } else {
             $sql .= ($cd->nullable) ? "null " : "not null ";
         }
-        
+
         if (!empty($cd->auto_increment)) {
             $sql .= " auto_increment ";
         }
@@ -487,3 +485,9 @@ class Schema
         return $sql;
     }
 }
+
+class SchemaTableMissingException extends Exception
+{
+    // no-op
+}
+