Changeset 585

Show
Ignore:
Timestamp:
09/20/06 12:12:11 (2 years ago)
Author:
ben
Message:

Updated profile initialisation to use modern Elgg parameter checking.

Files:

Legend:

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

    r573 r585  
    66 
    77        global $profile_id; 
     8         
     9        $profile_id = optional_param("profile_id",optional_param("profileid",$_SESSION['userid'],PARAM_INIT),PARAM_INT); 
     10 
     11        /* 
    812         
    913        if (isset($_REQUEST['profile_name'])) { 
     
    1822            $profile_id = -1; 
    1923        } 
     24        */ 
    2025 
    2126        global $page_owner; 
    2227         
    23         $page_owner = $profile_id; 
     28        if (!isset($page_owner) || optional_param("profile_id",-9000,PARAM_INT) != -9000) { 
     29            $page_owner = $profile_id; 
     30        } 
    2431         
    2532        if (!defined('profileinit')) { 
  • devel/units/profile/main.php

    r583 r585  
    44 
    55    // Profile initialisation 
    6         // $function['profile:init'][] = path . "units/profile/function_init.php"; 
     6        $function['profile:init'][] = path . "units/profile/function_init.php"; 
    77        // $function['profile:init'][] = path . "units/profile/function_editfield_defaults.php"; 
    88        $function['profile:init'][] = path . "units/profile/function_actions.php";