| |
676 |
676 |
ad_proc -public initialized { |
| |
677 |
677 |
} { |
| |
678 |
678 |
@return True if we've already initialized this instance of the portal package. |
| |
679 |
679 |
} { |
| |
680 |
680 |
return [expr {![string equal [get_master_template_id] ""]}] |
| |
681 |
681 |
} |
| |
682 |
682 |
|
| |
683 |
683 |
ad_proc -public initialize { |
| |
684 |
684 |
} { |
| |
685 |
685 |
Initialize this instance of the portal package if we've not already done so. This |
| |
686 |
686 |
consists of creating the master template, which is assigned to party 0 and will be |
| |
687 |
687 |
the portal returned to users who aren't logged in, or all users if the portal package |
| |
688 |
688 |
is configured to disallow personal portals. |
| |
689 |
689 |
|
| |
690 |
690 |
The admin portal is created with our package_id as the owner. |
| |
691 |
691 |
} { |
| |
692 |
692 |
if { ![initialized] } { |
| |
693 |
693 |
|
| |
694 |
694 |
# create the master template |
| |
695 |
695 |
|
| |
696 |
|
portal::new -name "Shared Portal" -owner_id 0 -owner_privileges {} |
| |
|
696 |
portal::new \ |
| |
|
697 |
-name "Shared Portal" \ |
| |
|
698 |
-owner_id 0 \ |
| |
|
699 |
-owner_privileges {} \ |
| |
697 |
700 |
|
| |
698 |
701 |
# create the admin template |
| |
699 |
702 |
|
| |
700 |
|
portal::new -name "Administration" -owner_id [ad_conn package_id] -owner_privileges {} |
| |
|
703 |
portal::new \ |
| |
|
704 |
-name "Administration" \ |
| |
|
705 |
-owner_id [ad_conn package_id] \ |
| |
|
706 |
-theme_name blank \ |
| |
|
707 |
-owner_privileges {} |
| |
701 |
708 |
|
| |
702 |
709 |
} |
| |
703 |
710 |
} |
| |
704 |
711 |
|
| |
705 |
712 |
} |