Changeset 1299

Show
Ignore:
Timestamp:
11/20/07 14:00:29 (1 year ago)
Author:
ewout
Message:

Profile widgets now get their default access from the sites ($CFG->default_access) access. Closes #150.

Files:

Legend:

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

    r1030 r1299  
    4040                $widget->owner = $page_owner; 
    4141                $widget->type = $widget_type; 
    42                 $widget->access = "user" . $_SESSION['userid']
     42                $widget->access = $CFG->default_access
    4343                $widget->location = "profile"; 
    4444                $widget->location_id = 0;                
  • devel/mod/widget/ajax_add_widget.php

    r1270 r1299  
    44        @require_once("../../includes.php"); 
    55         
     6global $CFG; 
     7 
    68$display_id = optional_param('display_id',0,PARAM_INT);  
    79$widget_type = optional_param('type',''); 
     
    2022} 
    2123 
    22 $widget_id = widget_create("profile",0,$column,$widget_type,$owner,"user" . $_SESSION['userid'],$display_order); 
     24$widget_id = widget_create("profile",0,$column,$widget_type,$owner,$CFG->default_access,$display_order); 
    2325$widget = get_record('widgets','ident',$widget_id); 
    2426$result = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>'; 
  • devel/mod/widget/edit.php

    r1061 r1299  
    6363             
    6464            // Save access 
    65             $widget->access = optional_param('_widget_access',"user".$_SESSION['userid']); 
     65            $widget->access = optional_param('_widget_access',$CFG->default_access); 
    6666            update_record('widgets',$widget); 
    6767