Changeset 888
- Timestamp:
- 01/29/07 16:44:49 (2 years ago)
- Files:
-
- devel/config-dist.php (modified) (1 diff)
- devel/lib/setup.php (modified) (1 diff)
- devel/mod/community/lib.php (modified) (2 diffs)
- devel/units/communities/communities_actions.php (modified) (1 diff)
- devel/units/communities/communities_create.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/config-dist.php
r836 r888 121 121 122 122 $CFG->rsspostsmaxage = 0; 123 124 // Set this to 'admin' to only allow administrators to create new communities. 125 // You can set this to other user flags if you're told to by a plugin. 126 127 $CFG->community_create_flag = ""; 123 128 124 129 // devel/lib/setup.php
r834 r888 68 68 if (empty($CFG->disable_publiccomments)) { 69 69 $CFG->disable_publiccomments = false; 70 } 71 72 if (empty($CFG->community_create_flag)) { 73 $CFG->community_create_flag = ""; 70 74 } 71 75 devel/mod/community/lib.php
r782 r888 6 6 global $PAGE; 7 7 global $CFG; 8 global $USER; 8 9 9 10 $page_owner = $profile_id; … … 52 53 'html' => a_href("{$CFG->wwwroot}_communities/?owner=$page_owner" , 53 54 __gettext("Communities"))); 54 55 if ($CFG->community_create_flag == "" || user_flag_get($CFG->community_create_flag, $USER->ident)) { 55 56 $PAGE->menu_sub[] = array( 'name' => 'community:owned', 56 57 'html' => a_href("{$CFG->wwwroot}_communities/owned.php?owner=$page_owner" , 57 58 __gettext("Owned Communities"))); 58 59 } 59 60 } 60 61 devel/units/communities/communities_actions.php
r659 r888 16 16 $comm_name = optional_param('comm_name'); 17 17 $comm_username = optional_param('comm_username'); 18 if (logged_on && !empty($comm_name) && !empty($comm_username)) { 18 if (logged_on && !empty($comm_name) && !empty($comm_username) && 19 ($CFG->community_create_flag == "" || user_flag_get($CFG->community_create_flag, $USER->ident))) { 19 20 if (!preg_match("/^[A-Za-z0-9]{3,12}$/",$comm_username)) { 20 21 $messages[] = __gettext("Error! The community username must contain letters and numbers only, cannot be blank, and must be between 3 and 12 characters in length."); devel/units/communities/communities_create.php
r659 r888 10 10 } 11 11 12 global $page_owner ;12 global $page_owner, $CFG, $USER; 13 13 14 if (logged_on && $page_owner == $_SESSION['userid']) { 14 if (logged_on && $page_owner == $_SESSION['userid'] && 15 ($CFG->community_create_flag == "" || user_flag_get($CFG->community_create_flag, $USER->ident))) { 15 16 16 17 $header = __gettext("Create a new community"); // gettext variable
