]> git.mjollnir.org Git - moodle.git/commitdiff
Fixing some potential problems with prefixes and object names.
authorstronk7 <stronk7>
Wed, 16 Aug 2006 23:01:46 +0000 (23:01 +0000)
committerstronk7 <stronk7>
Wed, 16 Aug 2006 23:01:46 +0000 (23:01 +0000)
lib/xmldb/classes/generators/XMLDBGenerator.class.php
lib/xmldb/classes/generators/mssql/mssql.class.php
lib/xmldb/classes/generators/mysql/mysql.class.php
lib/xmldb/classes/generators/postgres7/postgres7.class.php

index ceab6a5732cccc2549e042ac962fccb862fc3b20..bc90e79ca614b5fdee432deb3b21cee063c87125 100644 (file)
@@ -233,7 +233,7 @@ class XMLDBgenerator {
 
         $index = 'CREATE' . $unique . ' INDEX ';
         $index .= $this->getNameForObject($xmldb_table->getName(), implode(', ', $xmldb_index->getFields()), $suffix);
-        $index .= ' ON ' . $this->prefix . $this->getEncQuoted($xmldb_table->getName());
+        $index .= ' ON ' . $this->getEncQuoted($this->prefix . $xmldb_table->getName());
         $index .= ' (' . implode(', ', $this->getEncQuoted($xmldb_index->getFields())) . ');';
 
         return $index;
index cf55554641ba03530016ba5a4f3bbd085d97d1e0..c34526051991edfa0f83334312049008c3c49945 100644 (file)
@@ -60,13 +60,6 @@ class XMLDBmssql extends XMLDBgenerator {
         $this->reserved_words = $this->getReservedWords();
     }
 
-    /**
-     * Set the prefix
-     */
-    function setPrefix($prefix) {
-        $this->prefix = $prefix;
-    }
-
     /**
      * Given one XMLDB Type, lenght and decimals, returns the DB proper SQL type
      */
index 4493e3dc6f5b50b4620a876f081f8132f5eb09a9..af2da9a2c615b997130e97c6e123933bbcc7a29b 100644 (file)
@@ -58,13 +58,6 @@ class XMLDBmysql extends XMLDBGenerator {
         $this->reserved_words = $this->getReservedWords();
     }
 
-    /**
-     * Set the prefix
-     */
-    function setPrefix($prefix) {
-        $this->prefix = $prefix;
-    }
-
     /**
      * Given one XMLDB Type, lenght and decimals, returns the DB proper SQL type
      */
index 9f9d76260ab0d8ad0e9b0b4933b56f3842b0ae0a..b0db03e0c63172b6eb97c252b2f219867ded0f5c 100644 (file)
@@ -58,13 +58,6 @@ class XMLDBpostgres7 extends XMLDBgenerator {
         $this->reserved_words = $this->getReservedWords();
     }
 
-    /**
-     * Set the prefix
-     */
-    function setPrefix($prefix) {
-        $this->prefix = $prefix;
-    }
-
     /**
      * Given one XMLDB Type, lenght and decimals, returns the DB proper SQL type
      */
@@ -139,7 +132,7 @@ class XMLDBpostgres7 extends XMLDBgenerator {
       */
      function getCommentSQL ($xmldb_table) {
 
-         $comment = ";\n\nCOMMENT ON TABLE " . $this->prefix . $this->getEncQuoted($xmldb_table->getName());
+         $comment = ";\n\nCOMMENT ON TABLE " . $this->getEncQuoted($this->prefix . $xmldb_table->getName());
          $comment.= " IS '" . substr($xmldb_table->getComment(), 0, 250) . "'";
 
          return $comment;