Changeset 1604

Show
Ignore:
Timestamp:
06/09/08 08:04:42 (6 months ago)
Author:
misja
Message:

#360, Commentwall: Wall-to-wall should be aware of current user - thanks justinr

Files:

Legend:

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

    r1594 r1604  
    1212 
    1313$owner = optional_param('owner', page_owner()); 
    14      
     14 
    1515$other = required_param('other'); 
     16 
     17// swap user id's if 'other' is the current session 
     18// this way, a logged-in user won't be prompted to write on their own wall in a wall-to-wall view 
     19if ($other == $_SESSION['userid']) { 
     20  $other = $owner; 
     21  $owner = $_SESSION['userid']; 
     22} 
    1623 
    1724$offset = optional_param('offset', 0);