Merge branch 'w13_MDL-26951_21_archetypes' of git://github.com/skodak/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 28 Mar 2011 17:38:48 +0000 (19:38 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 28 Mar 2011 17:38:48 +0000 (19:38 +0200)
admin/roles/lib.php

index e211340..fc6e7d8 100644 (file)
@@ -628,7 +628,7 @@ class define_role_table_advanced extends capability_table_with_risks {
 
         // Legacy type.
         $archetype = optional_param('archetype', null, PARAM_RAW);
-        if ($archetype) {
+        if (isset($archetype)) {
             $archetypes = get_role_archetypes();
             if (isset($archetypes[$archetype])){
                 $this->role->archetype = $archetype;
@@ -716,7 +716,6 @@ class define_role_table_advanced extends capability_table_with_risks {
     }
 
     protected function get_archetype_field($id) {
-        global $OUTPUT;
         $options = array();
         $options[''] = get_string('none');
         foreach(get_role_archetypes() as $type) {