]> git.mjollnir.org Git - moodle.git/commitdiff
Avoid one minor error when tables hasn't comments to be defined.
authorstronk7 <stronk7>
Sun, 10 Sep 2006 21:05:55 +0000 (21:05 +0000)
committerstronk7 <stronk7>
Sun, 10 Sep 2006 21:05:55 +0000 (21:05 +0000)
lib/xmldb/classes/generators/XMLDBGenerator.class.php

index e89e998bd67f749993ab44f01fc8fdc82979672b..9fa7d1f475f0b41687a09a97d1e0be35e936cafe 100644 (file)
@@ -171,8 +171,8 @@ class XMLDBgenerator {
     /// Add the CREATE TABLE to results
         $results[] = $table;
 
-    /// Add comments if specified
-        if ($this->add_table_comments) {
+    /// Add comments if specified and it exists
+        if ($this->add_table_comments && $xmldb_table->getComment()) {
             $comment = $this->getCommentSQL ($xmldb_table);
         /// Add the COMMENT to results
             $results = array_merge($results, $comment);