Permalink
Browse files

(Fixing upgrade script) Only try to disable lams if it is installed

Author: Andrew Walbran <andrew.walbran@catalyst.net.nz>
  • Loading branch information...
1 parent 6488b3b commit e05e5d132e1b387f33869b1d765def93802ba3b1 martinlanghoff committed Feb 28, 2007
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/db/upgrade.php
View
@@ -50,8 +50,8 @@ function xmldb_main_upgrade($oldversion=0) {
}
}
- if ($oldversion < 2006101001) { /// Disable the LAMS module by default
- if (!count_records('lams')) {
+ if ($oldversion < 2006101001) { /// Disable the LAMS module by default (if it is installed)
+ if (count_records('modules', 'name', 'lams') && !count_records('lams')) {
set_field('modules', 'visible', 0, 'name', 'lams'); // Disable it by default
}
}

0 comments on commit e05e5d1

Please sign in to comment.