$wtm->update( 'glossary_comments','text','format',$sql );
}
+ if ($oldversion < 2006082600) {
+ $sql1 = "UPDATE {$CFG->prefix}glossary_entries SET definition = REPLACE(definition, '".TRUSTTEXT."', '');";
+ $sql2 = "UPDATE {$CFG->prefix}glossary_comments SET comment = REPLACE(comment, '".TRUSTTEXT."', '');";
+ $likecond = sql_ilike()." '%".TRUSTTEXT."%'";
+ while (true) {
+ if (!count_records_select('glossary_entries', "definition $likecond")) {
+ break;
+ }
+ execute_sql($sql1);
+ }
+ while (true) {
+ if (!count_records_select('glossary_comments', "comment $likecond")) {
+ break;
+ }
+ execute_sql($sql2);
+ }
+ }
+
return true;
}
table_column('glossary','allowprintview','allowprintview','smallint','4','unsigned','1');
}
+ if ($oldversion < 2006082600) {
+ $sql1 = "UPDATE {$CFG->prefix}glossary_entries SET definition = REPLACE(definition, '".TRUSTTEXT."', '');";
+ $sql2 = "UPDATE {$CFG->prefix}glossary_comments SET comment = REPLACE(comment, '".TRUSTTEXT."', '');";
+ $likecond = sql_ilike()." '%".TRUSTTEXT."%'";
+ while (true) {
+ if (!count_records_select('glossary_entries', "definition $likecond")) {
+ break;
+ }
+ execute_sql($sql1);
+ }
+ while (true) {
+ if (!count_records_select('glossary_comments', "comment $likecond")) {
+ break;
+ }
+ execute_sql($sql2);
+ }
+ }
+
+
return true;
}
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006080900;
-$module->requires = 2006080900; // Requires this Moodle version
+$module->version = 2006082600;
+$module->requires = 2006082600; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs)
?>