@@ -524,9 +524,11 @@ discard block |
||
| 524 | 524 | /** |
| 525 | 525 | * Register a function to define specific configuration of an entity in solr |
| 526 | 526 | * |
| 527 | - * @param type $type - the entity type |
|
| 528 | - * @param type $subtype - the entity subtype |
|
| 529 | - * @param type $function - the function to call for updating an entity in solr |
|
| 527 | + * @param string $type - the entity type |
|
| 528 | + * @param type string - the entity subtype |
|
| 529 | + * @param type string - the function to call for updating an entity in solr |
|
| 530 | + * @param string $subtype |
|
| 531 | + * @param string $function |
|
| 530 | 532 | */ |
| 531 | 533 | function elgg_solr_register_solr_entity_type($type, $subtype, $function) { |
| 532 | 534 | $solr_entities = elgg_get_config('solr_entities'); |
@@ -779,6 +781,9 @@ discard block |
||
| 779 | 781 | return true; |
| 780 | 782 | } |
| 781 | 783 | |
| 784 | +/** |
|
| 785 | + * @param string $message |
|
| 786 | + */ |
|
| 782 | 787 | function elgg_solr_debug_log($message) { |
| 783 | 788 | error_log($message); |
| 784 | 789 | } |
@@ -1020,6 +1025,10 @@ discard block |
||
| 1020 | 1025 | return $stats; |
| 1021 | 1026 | } |
| 1022 | 1027 | |
| 1028 | +/** |
|
| 1029 | + * @param integer $starttime |
|
| 1030 | + * @param integer $endtime |
|
| 1031 | + */ |
|
| 1023 | 1032 | function elgg_solr_get_system_count($options, $starttime, $endtime) { |
| 1024 | 1033 | $options['wheres'] = array( |
| 1025 | 1034 | "e.time_created >= {$starttime}", |
@@ -8,6 +8,10 @@ |
||
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | //Generic embed functions - Don�t touch here! |
| 11 | + |
|
| 12 | + /** |
|
| 13 | + * @param string $guid |
|
| 14 | + */ |
|
| 11 | 15 | function custom_videoembed_create_embed_object($url, $guid, $videowidth=0, $input) { |
| 12 | 16 | |
| 13 | 17 | if (!$input) { |
@@ -6,6 +6,10 @@ |
||
| 6 | 6 | return embed_extender_parser(' ' . $returnvalue . ' ', $view, $context); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | +/** |
|
| 10 | + * @param string $input |
|
| 11 | + * @param string|null $context |
|
| 12 | + */ |
|
| 9 | 13 | function embed_extender_parser($input, $view, $context) |
| 10 | 14 | { |
| 11 | 15 | $allowed_contexts = array('blog', 'messageboard', 'widgets', 'pages', 'bookmarks', 'file', 'event_calendar', 'photos', 'polls'); |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * |
| 162 | 162 | * @param $width |
| 163 | 163 | * @param $height |
| 164 | - * @param $toolbar_height |
|
| 164 | + * @param integer $toolbar_height |
|
| 165 | 165 | */ |
| 166 | 166 | function videoembed_calc_size(&$width, &$height, $aspect_ratio, $toolbar_height) { |
| 167 | 167 | // set video width and height |
@@ -314,6 +314,8 @@ discard block |
||
| 314 | 314 | * parse youtu.be url |
| 315 | 315 | * |
| 316 | 316 | * @param string $url |
| 317 | + * @param integer $guid |
|
| 318 | + * @param integer $videowidth |
|
| 317 | 319 | * @return string youtube.com/v/hash |
| 318 | 320 | */ |
| 319 | 321 | function videoembed_youtube_shortener_parse_url($url, $guid, $videowidth) { |
@@ -39,6 +39,9 @@ discard block |
||
| 39 | 39 | * @param string term Search term |
| 40 | 40 | * @param int limit Maximum number of results to return |
| 41 | 41 | * @param int offset Begin returning results starting from offset |
| 42 | + * @param string $term |
|
| 43 | + * @param integer $limit |
|
| 44 | + * @param integer $offset |
|
| 42 | 45 | * |
| 43 | 46 | * @return array Query result set |
| 44 | 47 | * array( |
@@ -175,6 +178,7 @@ discard block |
||
| 175 | 178 | * |
| 176 | 179 | * @param string haystack String to search in |
| 177 | 180 | * @param string term String to search for in haystack |
| 181 | + * @param string $term |
|
| 178 | 182 | * @return boolean |
| 179 | 183 | */ |
| 180 | 184 | private function isMatched($haystack, $term) { |
@@ -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; |