]> git.mjollnir.org Git - moodle.git/commitdiff
moodle16cleanup: mod/dialog we need to drop some more dialog module tables
authormartinlanghoff <martinlanghoff>
Wed, 17 May 2006 06:34:19 +0000 (06:34 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 17 May 2006 06:34:19 +0000 (06:34 +0000)
lib/db/postgres7.php
version.php

index 0a859399265201d91b8f49d5f6c600af34471e6f..969228e1ff7f81f1a6c5bb6fa4d3e6be6c167b3c 100644 (file)
@@ -1533,6 +1533,18 @@ function main_upgrade($oldversion=0) {
     if ($oldversion < 2006050500) {
         table_column('log', 'action', 'action', 'varchar', '40', '', '', 'not null');
     }
+
+    if ($oldversion < 2006050502) {  // Close down the Dialogue module, we are removing it from CVS.
+        if (!file_exists($CFG->dirroot.'/mod/dialogue/lib.php')) {
+            if (!count_records('dialogue_conversations')) {   // no data, drop the extra tables
+                execute_sql('DROP TABLE '.$CFG->prefix.'dialogue_conversations', false);
+                execute_sql('DROP TABLE '.$CFG->prefix.'dialogue_entries', false);
+                notify("The Dialogue module has been discontinued and removed from your site.  
+                        You weren't using it anyway.  ;-)");
+            }
+        }
+    }
+
     
     return $result;
 }
index 7ab65dee220ec618c491640e0be0d380b661c7ff..fb75f4ac88bd4085d13e3fed1c6c9565db20bd81 100644 (file)
@@ -6,7 +6,7 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-   $version = 2006050501;  // YYYYMMDD = date
+   $version = 2006050502;  // YYYYMMDD = date
                            //       XY = increments within a single day
 
    $release = '1.7 dev';    // Human-friendly version name