Permalink
Browse files

Changes to suit new upgrading procedure (admin/index.html)

  • Loading branch information...
martin
martin committed Jul 27, 2002
1 parent ec5472d commit 12b820c2275251f279cf711114fc5562f13f1566
Showing with 65 additions and 17 deletions.
  1. +12 −0 mod/assignment/module.php
  2. +12 −4 mod/choice/module.php
  3. +12 −4 mod/forum/module.php
  4. +17 −5 mod/journal/module.php
  5. +12 −4 mod/survey/module.php
View
@@ -5,6 +5,18 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
+$module->fullname = "Assignment";
+$module->version = 20020801;
+$module->cron = 60;
+$module->search = "";
+
+function assignment_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
+
+ return true;
+}
+
?>
View
@@ -5,10 +5,18 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
- $module->fullname = "Choice";
- $module->version = "20011110";
- $module->cron = 0;
- $module->search = "";
+$module->fullname = "Choice";
+$module->version = 20011110;
+$module->cron = 0;
+$module->search = "";
+
+function choice_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
+
+ return true;
+}
+
?>
View
@@ -5,10 +5,18 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
- $module->fullname = "Forum";
- $module->version = "20020801";
- $module->cron = 0;
- $module->search = "";
+$module->fullname = "Forum";
+$module->version = 20020801;
+$module->cron = 0;
+$module->search = "";
+
+function forum_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
+
+ return true;
+}
+
?>
View
@@ -5,10 +5,22 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
- $module->fullname = "Journal";
- $module->version = "20011110";
- $module->cron = 0;
- $module->search = "";
+$module->fullname = "Journal";
+$module->version = 200208010;
+$module->cron = 60;
+$module->search = "";
-?>
+function journal_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
+ $result = true;
+
+ if ($oldversion < 20020810) {
+ if (! execute_sql("ALTER TABLE `journal_entries` ADD `mailed` TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL")) {
+ $result = false;
+ }
+ }
+
+ return $result;
+}
View
@@ -5,10 +5,18 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
- $module->fullname = "Survey";
- $module->version = "20011110";
- $module->cron = 0;
- $module->search = "";
+$module->fullname = "Survey";
+$module->version = 20020727;
+$module->cron = 0;
+$module->search = "";
+
+function survey_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
+
+ return true;
+}
+
?>

0 comments on commit 12b820c

Please sign in to comment.