Changeset 1436
- Timestamp:
- 12/09/07 09:52:59 (8 months ago)
- Files:
-
- devel/mod/friend/lib.php (modified) (1 diff)
- devel/mod/invite/forgotten_password.php (modified) (1 diff)
- devel/mod/invite/lib.php (modified) (2 diffs)
- devel/mod/invite/lib/invite_actions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/mod/friend/lib.php
r1248 r1436 44 44 'html' => a_href( "{$CFG->wwwroot}{$friends_username}/friends/requests", 45 45 __gettext("Friendship requests"))); 46 47 if ($CFG->publicinvite == true && ($CFG->maxusers == 0 || (count_users('person') < $CFG->maxusers))) {48 $PAGE->menu_sub[] = array( 'name' => 'friend:invite',49 'html' => a_href( "{$CFG->wwwroot}invite/",50 __gettext("Invite a friend")));51 }52 46 53 47 } devel/mod/invite/forgotten_password.php
r1369 r1436 16 16 $body = run("invite:password:request"); 17 17 18 templates_page_output($title, $body , null, ' ');18 templates_page_output($title, $body); 19 19 20 20 ?> devel/mod/invite/lib.php
r1251 r1436 8 8 */ 9 9 10 function invite_pagesetup(){11 require_once (dirname(__FILE__)."/lib/invite_config.php");12 }13 14 10 function invite_init(){ 15 11 global $CFG, $function; 16 12 // Actions 13 $function['invite:init'][] = $CFG->dirroot . "mod/invite/lib/invite_config.php"; 17 14 $function['invite:init'][] = $CFG->dirroot . "mod/invite/lib/invite_actions.php"; 18 15 19 16 // Introductory text 20 $function['content:invite:invite'][] = $CFG->dirroot . " content/invite/invite.php";17 $function['content:invite:invite'][] = $CFG->dirroot . "mod/invite/lib/content_invite.php"; 21 18 22 19 // Allow user to invite a friend … … 39 36 40 37 } 38 39 function invite_pagesetup() { 40 global $PAGE; 41 42 if (defined('context') && context == 'network') { 43 if (!maxusers_limit()) { 44 $PAGE->menu_sub[] = array( 'name' => 'invite:friend', 45 'html' => a_href(get_url(null, 'invite::invite'), 46 __gettext("Invite a friend"))); 47 } 48 } 49 } 50 51 function invite_url($object_id, $object_type) { 52 $url = null; 53 54 switch ($object_type) { 55 case 'invite::': 56 case 'invite::invite': 57 global $CFG; 58 $url = $CFG->wwwroot . 'mod/invite/'; 59 break; 60 } 61 62 return $url; 63 } 41 64 ?> devel/mod/invite/lib/invite_actions.php
r1431 r1436 2 2 global $USER; 3 3 global $CFG; 4 5 // Ensure that config options are available6 require_once $CFG->dirroot . "mod/invite/lib/invite_config.php";7 4 8 5 // Kill all old invitations … … 89 86 break; 90 87 } 88 if (empty($name)) { 89 $messages[] = __gettext('Error! You must provide a name.'); 90 break; 91 } 91 92 if (empty($over13)) { 92 93 $messages[] = __gettext("You must indicate that you are at least 13 years old to join.");
