Changeset 300
- Timestamp:
- 04/21/08 22:09:04 (7 months ago)
- Files:
-
- shouts/trunk/lib.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
shouts/trunk/lib.php
r299 r300 12 12 13 13 define('SHOUTS_PER_PAGE', 10); 14 define('SHOUTS_SIDEBAR_FORM', true); 14 15 define('LIMIT_SHOUT_TEXT', 140); 15 16 … … 139 140 $title = __gettext('Shouts'); 140 141 141 if ( permissions_check('profile', page_owner())) {142 if (SHOUTS_SIDEBAR_FORM && permissions_check('profile', page_owner())) { 142 143 $quick_add = pages_html_a('javascript:void(0);', 143 144 __gettext('(add)'), 144 145 array( 145 'onclick'=> "shouts_toggle('shouts-form-sidebar');",146 'onclick'=>'shouts_toggle("shouts-form-sidebar");', 146 147 )); 147 148 } else { … … 159 160 160 161 // add form 161 $shouts_index = $CFG->wwwroot . 'mod/shouts/index.php';162 $shouts_index = get_url(page_owner(), 'shouts::'); 162 163 $body .= shouts_get_add_form($shouts_index, 'sidebar'); 163 164 … … 560 561 } 561 562 } 563 // display form 564 elseif ($owner == 'form') { 565 $result = shouts_get_add_form(get_url($_SESSION['userid'], 'shouts::')); 566 } 562 567 563 568 return $result;
