@@ -3926,5 +3926,34 @@ function xmldb_core_upgrade($oldversion=0) {
}
}
if($oldversion<2015012700){
// Seen as we moved the view/artefact.php file to artefact/artefact.php
// we need to fix upa a few places where users could have hardcoded the url into their data.
// $replacements is key = table, value = column
$replacements=array('view'=>'description',
'artefact'=>'description',
'group'=>'description',
'interaction_forum_post'=>'body',
'notification_internal_activity'=>'message',
'notification_internal_activity'=>'url');
foreach($replacementsas$key=>$value){
execute_sql("UPDATE {".$key."} SET ".$value." = REPLACE(".$value.", 'view/artefact.php', 'artefact/artefact.php') WHERE ".$value." LIKE '%view/artefact.php%'");
}
// we need to handle block_instance configdata in a special way
if($results=get_records_sql_array("SELECT id FROM {block_instance} WHERE configdata LIKE '%view/artefact.php%'",array())){