Changeset 332

Show
Ignore:
Timestamp:
05/11/06 06:48:46 (3 years ago)
Author:
carmartin
Message:

profile: fix edit link reinstating page ownership

Page ownership was indirectly being asserted in
profile_pagesetup(). This is now moved to the main
index.php .

Setup of stuff in the global space should happen from
within the global space, early in the game, and be
very visible. Function calls and code called from
run() should stick to reading from parameters, and
from certain declared globals ($CFG, $USER, etc).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/profile/index.php

    r302 r332  
    1515    $profile_id = optional_param('profile_id', -1, PARAM_INT); 
    1616} 
     17// and the page_owner naturally 
     18$page_owner = $profile_id; 
    1719 
    1820define("context", "profile"); 
    1921templates_page_setup(); 
     22 
    2023// init library 
    2124$profile = new ElggProfile($profile_id);  
    2225         
    23 // $title = $profile->display_name(); 
    24 $title = run("profile:display:name"); 
    25  
    26 $body  = run("content:profile:view"); 
    27 $body .= $profile->view();  
    28          
     26$title = $profile->display_name(); 
     27$body .= $profile->view(); 
    2928$body  = templates_draw( array( 
    3029                               'context' => 'contentholder',