Changeset 1549

Show
Ignore:
Timestamp:
02/07/08 21:01:14 (7 months ago)
Author:
renato
Message:

Fixes #276. Removes commentwall title when user doesn't have access to commentwall.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/mod/commentwall/lib.php

    r1539 r1549  
    287287        function commentwall_displaywall_html($wall,$showalltxt = false, $owner) 
    288288        { 
    289                 global $CFG; 
    290                  
    291                 // $owner = page_owner(); 
    292                 $html = "<div id=\"commentwall_title\"><h2>" . sprintf(__gettext("%s's comment wall"), user_info("name", page_owner())) . "</h2></div>"; 
    293                          
    294                 if (($showalltxt) && ($wall)) 
    295                 { 
    296                         $html .= "<div id=\"commentwall_more\"><a href=\"{$CFG->wwwroot}mod/commentwall/index.php?owner=$owner\">" . __gettext("See all...") . "</a></div>"; 
    297                 } 
     289        global $CFG; 
     290 
     291        $html = ""; 
    298292                 
    299293                // Get access permissions 
     
    309303                ) 
    310304                { 
    311                  
    312                 $html .= commentwall_post_form(page_owner()); 
     305            // $owner = page_owner(); 
     306            $html = "<div id=\"commentwall_title\"><h2>" . sprintf(__gettext("%s's comment wall"), user_info("name", page_owner())) . "</h2></div>"; 
     307 
     308            if (($showalltxt) && ($wall)) 
     309            { 
     310                $html .= "<div id=\"commentwall_more\"><a href=\"{$CFG->wwwroot}mod/commentwall/index.php?owner=$owner\">" . __gettext("See all...") . "</a></div>"; 
     311            } 
     312 
     313 
     314            $html .= commentwall_post_form(page_owner()); 
    313315                 
    314316                if (!$wall) {