Skip to content
Browse files

MDL-25942 upgrade - fix use of reserved word in binding

  • Loading branch information...
1 parent 8cdc85a commit 62d3738246836fc5107ddf37c545206731868f16 @stronk7 stronk7 committed Jan 30, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/db/upgrade.php
View
6 lib/db/upgrade.php
@@ -2825,10 +2825,10 @@ function xmldb_main_upgrade($oldversion) {
if ($oldversion < 2010033102.00) {
// rename course view capability to participate
- $params = array('view'=>'moodle/course:view', 'participate'=>'moodle/course:participate');
- $sql = "UPDATE {role_capabilities} SET capability = :participate WHERE capability = :view";
+ $params = array('viewcap'=>'moodle/course:view', 'participatecap'=>'moodle/course:participate');
+ $sql = "UPDATE {role_capabilities} SET capability = :participatecap WHERE capability = :viewcap";
$DB->execute($sql, $params);
- $sql = "UPDATE {capabilities} SET name = :participate WHERE name = :view";
+ $sql = "UPDATE {capabilities} SET name = :participatecap WHERE name = :viewcap";
$DB->execute($sql, $params);
// note: the view capability is readded again at the end of upgrade, but with different meaning
upgrade_main_savepoint(true, 2010033102.00);

0 comments on commit 62d3738

Please sign in to comment.
Something went wrong with that request. Please try again.