@@ -276,6 +276,10 @@ discard block |
||
| 276 | 276 | return $event; |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | +/** |
|
| 280 | + * @param integer $start_date |
|
| 281 | + * @param integer $end_date |
|
| 282 | + */ |
|
| 279 | 283 | function event_calendar_get_events_between($start_date, $end_date, $is_count=false, $limit=10, $offset=0, $container_guid=0, $region='-') { |
| 280 | 284 | $polls_supported = elgg_is_active_plugin('event_poll'); |
| 281 | 285 | if ($is_count) { |
@@ -324,6 +328,10 @@ discard block |
||
| 324 | 328 | return $non_repeating_events; |
| 325 | 329 | } |
| 326 | 330 | |
| 331 | +/** |
|
| 332 | + * @param integer $container_guid |
|
| 333 | + * @param string $region |
|
| 334 | + */ |
|
| 327 | 335 | function event_calendar_get_repeating_events_between($start_date, $end_date, $container_guid, $region) { |
| 328 | 336 | // game plan: get all repeating events with start date <= $end_date and then generate all possible events |
| 329 | 337 | // sanity check |
@@ -428,6 +436,10 @@ discard block |
||
| 428 | 436 | return $repeating_events; |
| 429 | 437 | } |
| 430 | 438 | |
| 439 | +/** |
|
| 440 | + * @param integer $start_date |
|
| 441 | + * @param integer $end_date |
|
| 442 | + */ |
|
| 431 | 443 | function event_calendar_get_open_events_between($start_date, $end_date, $is_count=false, $limit=10, $offset=0, $container_guid=0, $region='-', $meta_max = 'spots', $relationship_name = 'personal_event') { |
| 432 | 444 | if ($is_count) { |
| 433 | 445 | $count = event_calendar_get_entities_from_metadata_between('start_date', 'end_date', $start_date, $end_date, "object", "event_calendar", 0, $container_guid, $limit, $offset, "", 0, false, true, $region, $meta_max, $relationship_name); |
@@ -441,6 +453,10 @@ discard block |
||
| 441 | 453 | } |
| 442 | 454 | } |
| 443 | 455 | |
| 456 | +/** |
|
| 457 | + * @param integer $container_guid |
|
| 458 | + * @param string $region |
|
| 459 | + */ |
|
| 444 | 460 | function event_calendar_get_open_repeating_events_between($start_date, $end_date, $container_guid, $region) { |
| 445 | 461 | $db_prefix = elgg_get_config('dbprefix'); |
| 446 | 462 | $meta_max = 'spots'; |
@@ -505,6 +521,9 @@ discard block |
||
| 505 | 521 | |
| 506 | 522 | |
| 507 | 523 | //For list event |
| 524 | +/** |
|
| 525 | + * @param boolean $is_count |
|
| 526 | + */ |
|
| 508 | 527 | function event_calendar_get_events_for_user_between($start_date, $end_date, $is_count, $limit=10, $offset=0, $user_guid, $container_guid=0, $region='-') { |
| 509 | 528 | $options = array( |
| 510 | 529 | 'type' => 'object', |
@@ -549,6 +568,12 @@ discard block |
||
| 549 | 568 | |
| 550 | 569 | |
| 551 | 570 | //For calendar event |
| 571 | +/** |
|
| 572 | + * @param integer $start_date |
|
| 573 | + * @param integer $end_date |
|
| 574 | + * @param boolean $is_count |
|
| 575 | + * @param integer $user_guid |
|
| 576 | + */ |
|
| 552 | 577 | function event_calendar_get_events_for_user_between2($start_date, $end_date, $is_count, $limit=10, $offset=0, $user_guid, $container_guid=0, $region='-') { |
| 553 | 578 | $options = array( |
| 554 | 579 | 'type' => 'object', |
@@ -590,6 +615,10 @@ discard block |
||
| 590 | 615 | } |
| 591 | 616 | } |
| 592 | 617 | |
| 618 | +/** |
|
| 619 | + * @param integer $container_guid |
|
| 620 | + * @param string $region |
|
| 621 | + */ |
|
| 593 | 622 | function event_calendar_get_repeating_events_for_user_between($user_guid, $start_date, $end_date, $container_guid, $region) { |
| 594 | 623 | $options = array( |
| 595 | 624 | 'type' => 'object', |
@@ -628,6 +657,9 @@ discard block |
||
| 628 | 657 | return event_calendar_get_repeating_event_structure($events, $start_date, $end_date); |
| 629 | 658 | } |
| 630 | 659 | |
| 660 | +/** |
|
| 661 | + * @param string $friend_list |
|
| 662 | + */ |
|
| 631 | 663 | function event_calendar_get_repeating_events_for_friends_between($user_guid, $friend_list, $start_date, $end_date, $container_guid=0, $region='-') { |
| 632 | 664 | |
| 633 | 665 | $db_prefix = elgg_get_config('dbprefix'); |
@@ -664,6 +696,11 @@ discard block |
||
| 664 | 696 | return event_calendar_get_repeating_event_structure($events, $start_date, $end_date); |
| 665 | 697 | } |
| 666 | 698 | |
| 699 | +/** |
|
| 700 | + * @param integer $start_date |
|
| 701 | + * @param integer $end_date |
|
| 702 | + * @param boolean $is_count |
|
| 703 | + */ |
|
| 667 | 704 | function event_calendar_get_events_for_friends_between($start_date, $end_date, $is_count, $limit=10, $offset=0, $user_guid, $container_guid=0, $region='-') { |
| 668 | 705 | if ($user_guid) { |
| 669 | 706 | $user = get_user($user_guid); |
@@ -792,14 +829,14 @@ discard block |
||
| 792 | 829 | * @param mixed $meta_end_value - end of metadata range, must be numerical value |
| 793 | 830 | * @param string $entity_type The type of entity to look for, eg 'site' or 'object' |
| 794 | 831 | * @param string $entity_subtype The subtype of the entity. |
| 795 | - * @param mixed $owner_guid Either one integer user guid or an array of user guids |
|
| 832 | + * @param integer $owner_guid Either one integer user guid or an array of user guids |
|
| 796 | 833 | * @param int $container_guid If supplied, the result is restricted to events associated with a specific container |
| 797 | 834 | * @param int $limit |
| 798 | 835 | * @param int $offset |
| 799 | 836 | * @param string $order_by Optional ordering. |
| 800 | 837 | * @param int $site_guid The site to get entities for. Leave as 0 (default) for the current site; -1 for all sites. |
| 801 | 838 | * @param boolean $filter Filter by events in personal calendar if true |
| 802 | - * @param true|false $count If set to true, returns the total number of entities rather than a list. (Default: false) |
|
| 839 | + * @param boolean $count If set to true, returns the total number of entities rather than a list. (Default: false) |
|
| 803 | 840 | * @param string $meta_max metadata name containing maximum relationship count |
| 804 | 841 | * @param string $relationship_name relationship name to count |
| 805 | 842 | * |
@@ -979,6 +1016,9 @@ discard block |
||
| 979 | 1016 | return false; |
| 980 | 1017 | } |
| 981 | 1018 | |
| 1019 | +/** |
|
| 1020 | + * @param integer $event_guid |
|
| 1021 | + */ |
|
| 982 | 1022 | function event_calendar_add_personal_events_from_group($event_guid, $group_guid) { |
| 983 | 1023 | $group = get_entity($group_guid); |
| 984 | 1024 | |
@@ -993,6 +1033,9 @@ discard block |
||
| 993 | 1033 | remove_entity_relationship($user_guid, 'personal_event', $event_guid); |
| 994 | 1034 | } |
| 995 | 1035 | |
| 1036 | +/** |
|
| 1037 | + * @param integer $limit |
|
| 1038 | + */ |
|
| 996 | 1039 | function event_calendar_get_personal_events_for_user($user_guid, $limit) { |
| 997 | 1040 | $events = elgg_get_entities_from_relationship(array( |
| 998 | 1041 | 'type' => 'object', |
@@ -1018,6 +1061,9 @@ discard block |
||
| 1018 | 1061 | return array_slice($sorted, 0, $limit); |
| 1019 | 1062 | } |
| 1020 | 1063 | |
| 1064 | +/** |
|
| 1065 | + * @param integer $limit |
|
| 1066 | + */ |
|
| 1021 | 1067 | function event_calendar_get_users_for_event($event_guid, $limit, $offset=0, $is_count=false) { |
| 1022 | 1068 | $options = array( |
| 1023 | 1069 | 'type' => 'user', |
@@ -1355,6 +1401,9 @@ discard block |
||
| 1355 | 1401 | } |
| 1356 | 1402 | |
| 1357 | 1403 | // returns open, closed or private for the given event and user |
| 1404 | +/** |
|
| 1405 | + * @param integer $user_id |
|
| 1406 | + */ |
|
| 1358 | 1407 | function event_calendar_personal_can_manage($event, $user_id) { |
| 1359 | 1408 | $status = 'private'; |
| 1360 | 1409 | $event_calendar_personal_manage = elgg_get_plugin_setting('personal_manage', 'event_calendar'); |
@@ -2285,6 +2334,10 @@ discard block |
||
| 2285 | 2334 | } |
| 2286 | 2335 | } |
| 2287 | 2336 | |
| 2337 | +/** |
|
| 2338 | + * @param string $month |
|
| 2339 | + * @param string $year |
|
| 2340 | + */ |
|
| 2288 | 2341 | function getLastDayOfMonth($month, $year) { |
| 2289 | 2342 | return idate('d', mktime(0, 0, 0, ($month + 1), 0, $year)); |
| 2290 | 2343 | } |
@@ -2493,6 +2546,9 @@ discard block |
||
| 2493 | 2546 | } |
| 2494 | 2547 | |
| 2495 | 2548 | // utility function for BBB api calls |
| 2549 | +/** |
|
| 2550 | + * @param string $api_function |
|
| 2551 | + */ |
|
| 2496 | 2552 | function event_calendar_bbb_api($api_function, $params=null) { |
| 2497 | 2553 | |
| 2498 | 2554 | $bbb_security_salt = elgg_get_plugin_setting('bbb_security_salt', 'event_calendar'); |
@@ -2533,6 +2589,9 @@ discard block |
||
| 2533 | 2589 | } |
| 2534 | 2590 | } |
| 2535 | 2591 | |
| 2592 | +/** |
|
| 2593 | + * @param ElggEntity $event |
|
| 2594 | + */ |
|
| 2536 | 2595 | function event_calendar_create_bbb_conf($event) { |
| 2537 | 2596 | $day_in_minutes = 60*24; |
| 2538 | 2597 | $now = time(); |
@@ -178,7 +178,7 @@ |
||
| 178 | 178 | * Title is ignored |
| 179 | 179 | * |
| 180 | 180 | * @param array $page |
| 181 | - * @return null |
|
| 181 | + * @return boolean |
|
| 182 | 182 | */ |
| 183 | 183 | function event_calendar_page_handler($page) { |
| 184 | 184 | |
@@ -298,6 +298,9 @@ |
||
| 298 | 298 | return elgg_view('file/typecloud', $params); |
| 299 | 299 | } |
| 300 | 300 | |
| 301 | +/** |
|
| 302 | + * @param boolean $friends |
|
| 303 | + */ |
|
| 301 | 304 | function file_type_cloud_get_url($type, $friends) { |
| 302 | 305 | $url = elgg_get_site_url() . 'file/search?subtype=file'; |
| 303 | 306 | |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @param array $page page elements |
| 10 | 10 | * |
| 11 | - * @return bool |
|
| 11 | + * @return null|boolean |
|
| 12 | 12 | */ |
| 13 | 13 | function file_tools_page_handler($page) { |
| 14 | 14 | $include_file = false; |
@@ -68,6 +68,10 @@ |
||
| 68 | 68 | * @return [ARRAY] [<ARRAY of user entities>] |
| 69 | 69 | * |
| 70 | 70 | */ |
| 71 | +/** |
|
| 72 | + * @param string $query_operand |
|
| 73 | + * @param integer $limit |
|
| 74 | + */ |
|
| 71 | 75 | function skill_search($query_array, $query_operand, $limit) |
| 72 | 76 | { |
| 73 | 77 | $options = array(); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | * Checks for invalid / external domains |
| 142 | 142 | * |
| 143 | 143 | * @param $domain <string> domain part of the user's email address |
| 144 | - * @return true if domain is invalid, false otherwise |
|
| 144 | + * @return boolean if domain is invalid, false otherwise |
|
| 145 | 145 | * |
| 146 | 146 | **/ |
| 147 | 147 | function checkInvalidDomain($dom) |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | * Array key is the character to remove and the associated item is what will replace it. |
| 196 | 196 | * |
| 197 | 197 | * @param $emailInput <string> users email address |
| 198 | - * @return always returns "" because we use the response text directly |
|
| 198 | + * @return string returns "" because we use the response text directly |
|
| 199 | 199 | * @author Matthew April <[email protected]> |
| 200 | 200 | */ |
| 201 | 201 | |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | * |
| 195 | 195 | * @param $domain <string> domain part of the user's email address |
| 196 | 196 | * @param $email <string> the user's full email address |
| 197 | - * @return true if domain is invalid, false otherwise |
|
| 197 | + * @return boolean if domain is invalid, false otherwise |
|
| 198 | 198 | * |
| 199 | 199 | **/ |
| 200 | 200 | function checkInvalidDomain($dom, $email){ |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | * Array key is the character to remove and the associated item is what will replace it. |
| 252 | 252 | * |
| 253 | 253 | * @param $emailInput <string> users email address |
| 254 | - * @return always returns "" because we use the response text directly |
|
| 254 | + * @return string returns "" because we use the response text directly |
|
| 255 | 255 | * @author Matthew April <[email protected]> |
| 256 | 256 | */ |
| 257 | 257 | |
@@ -446,7 +446,7 @@ |
||
| 446 | 446 | * @param int $group_guid the group GUID |
| 447 | 447 | * @param string $email the email address |
| 448 | 448 | * |
| 449 | - * @return boolean|string the invite code, or false on failure |
|
| 449 | + * @return string|false the invite code, or false on failure |
|
| 450 | 450 | */ |
| 451 | 451 | function group_tools_generate_email_invite_code($group_guid, $email) { |
| 452 | 452 | $result = false; |
@@ -685,7 +685,7 @@ |
||
| 685 | 685 | * @param bool $return_value true, return false to stop the action |
| 686 | 686 | * @param null $params passed on params |
| 687 | 687 | * |
| 688 | - * @return bool |
|
| 688 | + * @return boolean|null |
|
| 689 | 689 | */ |
| 690 | 690 | function group_tools_join_group_action_handler($hook, $type, $return_value, $params) { |
| 691 | 691 | // hacky way around a short comming of Elgg core to allow users to join a group |