MDL-13404 merge from 1.9
authorscyrma <scyrma>
Tue, 19 Feb 2008 05:14:58 +0000 (05:14 +0000)
committerscyrma <scyrma>
Tue, 19 Feb 2008 05:14:58 +0000 (05:14 +0000)
tag/pagelib.php

index 81bb8dd99127f4f1a15e11172c749b34cfeaff79..d18908fdd9b9caf8c77af42cabd38328ba243034 100644 (file)
@@ -3,23 +3,20 @@
 require_once($CFG->libdir.'/pagelib.php');
 require_once('lib.php');
 
-define('PAGE_TAG_INDEX',   'tag-index');
+define('PAGE_TAG_INDEX', 'tag-index');
 define('TAG_FORMAT', 'tag');
 
 class page_tag extends page_base {
 
     var $tag_object = NULL;
-        
     
     function get_type() {
         return PAGE_TAG_INDEX;
     }
 
     function user_allowed_editing() {
-
-    $systemcontext   = get_context_instance(CONTEXT_SYSTEM);
-    return has_capability('moodle/tag:editblocks', $systemcontext);        
-
+        $systemcontext = get_context_instance(CONTEXT_SYSTEM);
+        return has_capability('moodle/tag:editblocks', $systemcontext);        
     }
 
     function user_is_editing() {
@@ -59,7 +56,6 @@ class page_tag extends page_base {
     }
 
     function get_format_name() {
-
         return TAG_FORMAT;
     }
     
@@ -69,36 +65,27 @@ class page_tag extends page_base {
 
         global $USER, $CFG;
 
-        $tag = $this->tag_object;
-        
-        $tagname  = tag_display_name($tag);
+        $tagname = tag_display_name($this->tag_object);
 
         $navlinks = array();
         $navlinks[] = array('name' => get_string('tags', 'tag'), 'link' => "{$CFG->wwwroot}/tag/search.php", 'type' => '');
         $navlinks[] = array('name' => $tagname, 'link' => '', 'type' => '');
 
         $navigation = build_navigation($navlinks);
-        $title      = get_string('tag', 'tag') . ' - ' . $tagname;
+        $title = get_string('tag', 'tag') .' - '. $tagname;
         
         $button = '';
         if( $this->user_allowed_editing() ) {
-            $button     = update_tag_button($this->id);
+            $button = update_tag_button($this->id);
         }
         print_header_simple($title, '', $navigation, '', '', '', $button);
-      
-
     }    
     
     function print_footer() {
-        
         print_footer();
-        
     }
-   
-    
 }
 
 page_map_class(PAGE_TAG_INDEX, 'page_tag');
 
-
 ?>