From a5ca5003f29571a0485e47de092664afb488a472 Mon Sep 17 00:00:00 2001
From: skodak <skodak>
Date: Fri, 2 May 2008 09:47:20 +0000
Subject: [PATCH] MDL-14605 removing roles upgrade links, only installation
 needed in HEAD

---
 admin/cliupgrade.php | 6 +-----
 admin/index.php      | 8 +-------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/admin/cliupgrade.php b/admin/cliupgrade.php
index df8dac17d7..e3ddd7f03c 100644
--- a/admin/cliupgrade.php
+++ b/admin/cliupgrade.php
@@ -1022,11 +1022,7 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) {
 
             /// If successful, continue upgrading roles and setting everything properly
             if ($status) {
-                if (empty($CFG->rolesactive)) {
-                    // Upgrade to the roles system.
-                    moodle_install_roles();
-                    set_config('rolesactive', 1);
-                } else if (!update_capabilities()) {
+                if (!update_capabilities()) {
                     console_write(STDERR,'Had trouble upgrading the core capabilities for the Roles System','',false);
                 }
                 if (set_config("version", $version)) {
diff --git a/admin/index.php b/admin/index.php
index 60cb459538..09f39f5b16 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -348,13 +348,7 @@
                 $db->debug=false;
             /// If successful, continue upgrading roles and setting everything properly
                 if ($status) {
-                    if (empty($CFG->rolesactive)) {
-                        // Groups upgrade is now in core above.
-
-                        // Upgrade to the roles system.
-                        moodle_install_roles();
-                        set_config('rolesactive', 1);
-                    } else if (!update_capabilities()) {
+                    if (!update_capabilities()) {
                         print_error('cannotupgradecapabilities', 'debug');
                     }
 
-- 
2.39.5