mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
incorrect context used in rss_client block upgrade code MDL-6707 - part of the upgrade code is now rerun in existing installations - new upgrades should be ok, the cleanup of stale contexts and overrides will be done later as part on normal maintenance from cron
This commit is contained in:
parent
3832682229
commit
a3627bb77d
@ -19,7 +19,7 @@
|
||||
|
||||
function init() {
|
||||
$this->title = get_string('feedstitle', 'block_rss_client');
|
||||
$this->version = 2006091100;
|
||||
$this->version = 2006100101;
|
||||
}
|
||||
|
||||
function preferred_width() {
|
||||
|
@ -42,6 +42,11 @@ function rss_client_upgrade($oldversion) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// see MDL-6707 for more info about problem that was here
|
||||
|
||||
if ($oldversion < 2006100101) {
|
||||
|
||||
// Upgrade block to use the Roles System.
|
||||
$block = get_record('block', 'name', 'rss_client');
|
||||
@ -65,7 +70,7 @@ function rss_client_upgrade($oldversion) {
|
||||
}
|
||||
|
||||
foreach ($blockinstances as $bi) {
|
||||
$context = get_context_instance(CONTEXT_MODULE, $bi->id);
|
||||
$context = get_context_instance(CONTEXT_BLOCK, $bi->id);
|
||||
|
||||
if ($bi->pagetype == 'course-view' && $bi->pageid == SITEID) {
|
||||
|
||||
|
@ -44,6 +44,11 @@ function rss_client_upgrade($oldversion) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// see MDL-6707 for more info about problem that was here
|
||||
|
||||
if ($oldversion < 2006100101) {
|
||||
|
||||
// Upgrade block to use the Roles System.
|
||||
$block = get_record('block', 'name', 'rss_client');
|
||||
@ -67,7 +72,7 @@ function rss_client_upgrade($oldversion) {
|
||||
}
|
||||
|
||||
foreach ($blockinstances as $bi) {
|
||||
$context = get_context_instance(CONTEXT_MODULE, $bi->id);
|
||||
$context = get_context_instance(CONTEXT_BLOCK, $bi->id);
|
||||
|
||||
if ($bi->pagetype == 'course-view' && $bi->pageid == SITEID) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user