@@ -10,6 +10,9 @@ discard block |
||
10 | 10 | /* |
11 | 11 | * Packs the language variables for a single language into a single string. |
12 | 12 | */ |
13 | +/** |
|
14 | + * @param string|null $lang |
|
15 | + */ |
|
13 | 16 | function mm_pack_language($lwc, $lwe, $lop, $lang) |
14 | 17 | { |
15 | 18 | $returner = ''; |
@@ -41,6 +44,9 @@ discard block |
||
41 | 44 | /* |
42 | 45 | * Unpacks a language string into an array of its component variable. |
43 | 46 | */ |
47 | +/** |
|
48 | + * @param string|null $lang |
|
49 | + */ |
|
44 | 50 | function mm_unpack_language($data_string, $lang) |
45 | 51 | { |
46 | 52 | $returner = array(); |
@@ -71,6 +77,11 @@ discard block |
||
71 | 77 | /* |
72 | 78 | * Packs the time (hour and minute) into a single string. |
73 | 79 | */ |
80 | +/** |
|
81 | + * @param string|null $hour |
|
82 | + * @param string|null $min |
|
83 | + * @param string|null $day |
|
84 | + */ |
|
74 | 85 | function mm_pack_time($hour, $min, $day) |
75 | 86 | { |
76 | 87 | $returner = ''; |
@@ -95,6 +106,9 @@ discard block |
||
95 | 106 | /* |
96 | 107 | * Unpacks the time into an array of hour and minute. |
97 | 108 | */ |
109 | +/** |
|
110 | + * @param string|null $day |
|
111 | + */ |
|
98 | 112 | function mm_unpack_time($data_string, $day) |
99 | 113 | { |
100 | 114 | $returner = array(); |
@@ -118,6 +132,9 @@ discard block |
||
118 | 132 | /* |
119 | 133 | * Unpacks every unpackable item within a given entity. |
120 | 134 | */ |
135 | +/** |
|
136 | + * @param ElggEntity $entity |
|
137 | + */ |
|
121 | 138 | function mm_unpack_mission($entity) |
122 | 139 | { |
123 | 140 | $returner = array(); |
@@ -429,6 +446,10 @@ discard block |
||
429 | 446 | * Notify user function which uses messages_send() to send on site notifications and mail() to send e-mail. |
430 | 447 | * This is here because notify_user() is currently not working. |
431 | 448 | */ |
449 | +/** |
|
450 | + * @param string $title_en |
|
451 | + * @param string $title_fr |
|
452 | + */ |
|
432 | 453 | function mm_notify_user($recipient, $sender, $subject, $title_en,$title_fr,$body_en, $body_fr) { |
433 | 454 | //notify_user($recipient, $sender, $subject, $body, array(), 'email'); |
434 | 455 | |
@@ -622,6 +643,9 @@ discard block |
||
622 | 643 | /* |
623 | 644 | * Returns an accept button to a user who has received an offer if the mission is not full. |
624 | 645 | */ |
646 | +/** |
|
647 | + * @param ElggUser|null $applicant |
|
648 | + */ |
|
625 | 649 | function mm_finalize_button($mission, $applicant) { |
626 | 650 | $relationship_count = elgg_get_entities_from_relationship(array( |
627 | 651 | 'relationship' => 'mission_accepted', |
@@ -787,6 +811,9 @@ discard block |
||
787 | 811 | /* |
788 | 812 | * Check if the user is opted in to any of the opt-in options. |
789 | 813 | */ |
814 | +/** |
|
815 | + * @param ElggEntity|null $current_user |
|
816 | + */ |
|
790 | 817 | function check_if_opted_in($current_user) { |
791 | 818 | //Nick - adding additional checks for other opportunity types |
792 | 819 | if($current_user->opt_in_missions == 'gcconnex_profile:opt:yes') { |
@@ -864,6 +891,9 @@ discard block |
||
864 | 891 | return false; |
865 | 892 | } |
866 | 893 | |
894 | +/** |
|
895 | + * @param ElggEntity $mission |
|
896 | + */ |
|
867 | 897 | function mm_complete_mission_inprogress_reports($mission, $if_no_applicants = false) { |
868 | 898 | if ($if_no_applicants) { |
869 | 899 | // Find out how many accepted applicants are on this mission. |
@@ -46,6 +46,9 @@ discard block |
||
46 | 46 | * Function to format the dropdown menu input. |
47 | 47 | * If the input is not an entity then it returns false. |
48 | 48 | */ |
49 | +/** |
|
50 | + * @param integer $input |
|
51 | + */ |
|
49 | 52 | function mo_format_input_node($input) { |
50 | 53 | if(elgg_entity_exists($input)) { |
51 | 54 | return 'MOrg:' . $input; |
@@ -118,6 +121,9 @@ discard block |
||
118 | 121 | /* |
119 | 122 | * Function which gets all the ancestors and then creates a string out of their names. |
120 | 123 | */ |
124 | +/** |
|
125 | + * @param string|false $node_string |
|
126 | + */ |
|
121 | 127 | function mo_string_all_ancestors($node_string) { |
122 | 128 | $ancestor_guids = mo_get_all_ancestors($node_string); |
123 | 129 | $ancestor_names_english = array(); |
@@ -145,6 +151,9 @@ discard block |
||
145 | 151 | /* |
146 | 152 | * Extracts node guid from the stored data. |
147 | 153 | */ |
154 | +/** |
|
155 | + * @return integer |
|
156 | + */ |
|
148 | 157 | function mo_extract_node_guid($node_string) { |
149 | 158 | $node_array = explode(':', $node_string); |
150 | 159 | return $node_array[1]; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | * @param $type |
15 | 15 | * @param $returnvalue |
16 | 16 | * @param $params |
17 | - * @return False to stop processing the response, True will let elgg handle the response |
|
17 | + * @return null|boolean to stop processing the response, True will let elgg handle the response |
|
18 | 18 | */ |
19 | 19 | function global_url_handler($hook, $type, $returnvalue, $params) { |
20 | 20 |
@@ -126,6 +126,9 @@ |
||
126 | 126 | return $bookmarks; |
127 | 127 | }//end get_bookmark |
128 | 128 | |
129 | +/** |
|
130 | + * @param ElggUser $user_entity |
|
131 | + */ |
|
129 | 132 | function foreach_bookmark($bookmarks, $user_entity, $lang) |
130 | 133 | { |
131 | 134 | foreach ($bookmarks as $bookmark){ |
@@ -202,6 +202,9 @@ |
||
202 | 202 | return $event; |
203 | 203 | } |
204 | 204 | |
205 | +/** |
|
206 | + * @param ElggUser $user_entity |
|
207 | + */ |
|
205 | 208 | function foreach_events($params, $from, $to, $user_entity, $lang) |
206 | 209 | { |
207 | 210 | $now = time(); |
@@ -6,6 +6,7 @@ discard block |
||
6 | 6 | * @param integer $entity_guid_static |
7 | 7 | * @param integer $entity_guid |
8 | 8 | * |
9 | + * @return integer |
|
9 | 10 | */ |
10 | 11 | function get_forum_in_group($entity_guid_static, $entity_guid) { |
11 | 12 | $entity = get_entity($entity_guid); |
@@ -159,7 +160,7 @@ discard block |
||
159 | 160 | * @param ElggEntity $entity |
160 | 161 | * @param ElggUser $send_to |
161 | 162 | * @param string $entity_url (default value empty) |
162 | - * @return Success true/false |
|
163 | + * @return boolean true/false |
|
163 | 164 | */ |
164 | 165 | function create_digest($invoked_by, $subtype, $entity, $send_to, $entity_url = '') { |
165 | 166 | |
@@ -945,6 +946,7 @@ discard block |
||
945 | 946 | |
946 | 947 | /** |
947 | 948 | * Helper functions for digest processing queue |
949 | + * @param integer $user_guid |
|
948 | 950 | */ |
949 | 951 | function enqueue( $user_guid ) { |
950 | 952 | // add to queue |
@@ -971,6 +973,9 @@ discard block |
||
971 | 973 | return enqueue(0) == 0; // there is no user with guid = 0, but only one instance will successfuly insert this with user_guid being the primary key |
972 | 974 | } |
973 | 975 | |
976 | +/** |
|
977 | + * @param string $frequency |
|
978 | + */ |
|
974 | 979 | function initialize_queue( $frequency ){ |
975 | 980 | $dbprefix = elgg_get_config('dbprefix'); |
976 | 981 |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * @param mixed $value The current value of the plugin hook |
133 | 133 | * @param mixed $params Data passed from the trigger |
134 | 134 | * |
135 | - * @return mixed if not null, this will be the new value of the plugin hook |
|
135 | + * @return boolean if not null, this will be the new value of the plugin hook |
|
136 | 136 | */ |
137 | 137 | function minor_save_hook_handler($hook, $type, $value, $params) { |
138 | 138 | |
@@ -620,7 +620,6 @@ discard block |
||
620 | 620 | /** |
621 | 621 | * returns the headers for ical |
622 | 622 | * |
623 | - * @param string $type_event |
|
624 | 623 | * @param ElggObject $event |
625 | 624 | * @param string $start_date |
626 | 625 | * @param string $end_date |
@@ -1486,6 +1485,9 @@ discard block |
||
1486 | 1485 | } |
1487 | 1486 | |
1488 | 1487 | |
1488 | +/** |
|
1489 | + * @param string $error_message |
|
1490 | + */ |
|
1489 | 1491 | function notification_logging($error_message) { |
1490 | 1492 | // logging mechanism |
1491 | 1493 | if (elgg_is_active_plugin('wet4')) { |
@@ -1536,8 +1538,6 @@ discard block |
||
1536 | 1538 | * run crontab, retrieve users, send digest, reset timer (update timestamp) |
1537 | 1539 | * |
1538 | 1540 | * @param string $hook The name of the plugin hook |
1539 | - * @param string $type The type of the plugin hook |
|
1540 | - * @param mixed $value The current value of the plugin hook |
|
1541 | 1541 | * @param mixed $params Data passed from the trigger |
1542 | 1542 | */ |
1543 | 1543 | function cp_digest_weekly_cron_handler($hook, $entity_type, $return_value, $params) { |
@@ -1580,6 +1580,7 @@ discard block |
||
1580 | 1580 | * @param string $entity_type The type of the plugin hook |
1581 | 1581 | * @param mixed $return_value The current value of the plugin hook |
1582 | 1582 | * @param mixed $params Data passed from the trigger |
1583 | + * @param string $frequency |
|
1583 | 1584 | */ |
1584 | 1585 | function cp_digest_email_handler($hook, $entity_type, $return_value, $params, $frequency) { |
1585 | 1586 | elgg_load_library('elgg:gc_notification:functions'); |
@@ -1779,7 +1780,6 @@ discard block |
||
1779 | 1780 | * |
1780 | 1781 | * @param string $hook The name of the plugin hook |
1781 | 1782 | * @param string $type The type of the plugin hook |
1782 | - * @param mixed $value The current value of the plugin hook |
|
1783 | 1783 | * @param mixed $params Data passed from the trigger |
1784 | 1784 | */ |
1785 | 1785 | function cpn_email_handler_hook($hook, $type, $notification, $params) { |
@@ -1793,7 +1793,6 @@ discard block |
||
1793 | 1793 | * |
1794 | 1794 | * @param string $hook The name of the plugin hook |
1795 | 1795 | * @param string $type The type of the plugin hook |
1796 | - * @param mixed $value The current value of the plugin hook |
|
1797 | 1796 | * @param mixed $params Data passed from the trigger |
1798 | 1797 | * |
1799 | 1798 | * @return mixed if not null, this will be the new value of the plugin hook |