Changeset 296

Show
Ignore:
Timestamp:
04/21/08 17:34:33 (7 months ago)
Author:
rho
Message:

[shouts] fixed quick-add from sidebar with permissions check

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • shouts/trunk/lib.php

    r295 r296  
    139139        $title = __gettext('Shouts'); 
    140140 
    141         $quick_add = pages_html_a('javascript:void(0);', 
    142             __gettext('(add)'), 
    143             array( 
    144                 'onclick'=>'shouts_toggle("shouts-form-sidebar");', 
    145             )); 
     141        if (permissions_check('profile', page_owner())) { 
     142            $quick_add = pages_html_a('javascript:void(0);', 
     143                __gettext('(add)'), 
     144                array( 
     145                    'onclick'=>'shouts_toggle("shouts-form-sidebar");', 
     146                )); 
     147        } else { 
     148            $quick_add = ''; 
     149        } 
     150 
    146151        $links[] = pages_html_a(shouts_url($owner, 'shouts::'), __gettext('Personal Shouts')) . " $quick_add"; 
    147152