@@ -20,7 +20,7 @@ |
||
| 20 | 20 | class GroupReq_Notify_Background extends SMF_BackgroundTask |
| 21 | 21 | { |
| 22 | 22 | /** |
| 23 | - * This executes the task - loads up the information, puts the email in the queue and inserts any alerts as needed. |
|
| 23 | + * This executes the task - loads up the information, puts the email in the queue and inserts any alerts as needed. |
|
| 24 | 24 | * @return bool Always returns true. |
| 25 | 25 | */ |
| 26 | 26 | public function execute() |
@@ -293,7 +293,7 @@ |
||
| 293 | 293 | { |
| 294 | 294 | /** |
| 295 | 295 | * Constants for notfication types. |
| 296 | - */ |
|
| 296 | + */ |
|
| 297 | 297 | const RECEIVE_NOTIFY_EMAIL = 0x02; |
| 298 | 298 | const RECEIVE_NOTIFY_ALERT = 0x01; |
| 299 | 299 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | { |
| 20 | 20 | /** |
| 21 | 21 | * Constants for reply types. |
| 22 | - */ |
|
| 22 | + */ |
|
| 23 | 23 | const NOTIFY_TYPE_REPLY_AND_MODIFY = 1; |
| 24 | 24 | const NOTIFY_TYPE_REPLY_AND_TOPIC_START_FOLLOWING = 2; |
| 25 | 25 | const NOTIFY_TYPE_ONLY_REPLIES = 3; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Constants for frequencies. |
| 30 | - */ |
|
| 30 | + */ |
|
| 31 | 31 | const FREQUENCY_NOTHING = 0; |
| 32 | 32 | const FREQUENCY_EVERYTHING = 1; |
| 33 | 33 | const FREQUENCY_FIRST_UNREAD_MSG = 2; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | const FREQUENCY_WEEKLY_DIGEST = 4; |
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | - * This handles notifications when a new post is created - new topic, reply, quotes and mentions. |
|
| 38 | + * This handles notifications when a new post is created - new topic, reply, quotes and mentions. |
|
| 39 | 39 | * @return bool Always returns true |
| 40 | 40 | */ |
| 41 | 41 | public function execute() |
@@ -7161,32 +7161,32 @@ discard block |
||
| 7161 | 7161 | */ |
| 7162 | 7162 | function truncate_array($array, $max_length = 1900, $deep = 3) |
| 7163 | 7163 | { |
| 7164 | - $array = (array) $array; |
|
| 7164 | + $array = (array) $array; |
|
| 7165 | 7165 | |
| 7166 | - $curr_length = array_length($array, $deep); |
|
| 7166 | + $curr_length = array_length($array, $deep); |
|
| 7167 | 7167 | |
| 7168 | - if ($curr_length <= $max_length) |
|
| 7169 | - return $array; |
|
| 7168 | + if ($curr_length <= $max_length) |
|
| 7169 | + return $array; |
|
| 7170 | 7170 | |
| 7171 | - else |
|
| 7172 | - { |
|
| 7173 | - // Truncate each element's value to a reasonable length |
|
| 7174 | - $param_max = floor($max_length / count($array)); |
|
| 7171 | + else |
|
| 7172 | + { |
|
| 7173 | + // Truncate each element's value to a reasonable length |
|
| 7174 | + $param_max = floor($max_length / count($array)); |
|
| 7175 | 7175 | |
| 7176 | - $current_deep = $deep - 1; |
|
| 7176 | + $current_deep = $deep - 1; |
|
| 7177 | 7177 | |
| 7178 | - foreach ($array as $key => &$value) |
|
| 7179 | - { |
|
| 7180 | - if (is_array($value)) |
|
| 7181 | - if ($current_deep > 0) |
|
| 7182 | - $value = truncate_array($value, $current_deep); |
|
| 7178 | + foreach ($array as $key => &$value) |
|
| 7179 | + { |
|
| 7180 | + if (is_array($value)) |
|
| 7181 | + if ($current_deep > 0) |
|
| 7182 | + $value = truncate_array($value, $current_deep); |
|
| 7183 | 7183 | |
| 7184 | - else |
|
| 7185 | - $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
| 7186 | - } |
|
| 7184 | + else |
|
| 7185 | + $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
| 7186 | + } |
|
| 7187 | 7187 | |
| 7188 | - return $array; |
|
| 7189 | - } |
|
| 7188 | + return $array; |
|
| 7189 | + } |
|
| 7190 | 7190 | } |
| 7191 | 7191 | |
| 7192 | 7192 | /** |
@@ -7197,29 +7197,29 @@ discard block |
||
| 7197 | 7197 | */ |
| 7198 | 7198 | function array_length($array, $deep = 3) |
| 7199 | 7199 | { |
| 7200 | - // Work with arrays |
|
| 7201 | - $array = (array) $array; |
|
| 7202 | - $length = 0; |
|
| 7200 | + // Work with arrays |
|
| 7201 | + $array = (array) $array; |
|
| 7202 | + $length = 0; |
|
| 7203 | 7203 | |
| 7204 | - $deep_count = $deep - 1; |
|
| 7204 | + $deep_count = $deep - 1; |
|
| 7205 | 7205 | |
| 7206 | - foreach ($array as $value) |
|
| 7207 | - { |
|
| 7208 | - // Recursive? |
|
| 7209 | - if (is_array($value)) |
|
| 7210 | - { |
|
| 7211 | - // No can't do |
|
| 7212 | - if ($deep_count <= 0) |
|
| 7213 | - continue; |
|
| 7206 | + foreach ($array as $value) |
|
| 7207 | + { |
|
| 7208 | + // Recursive? |
|
| 7209 | + if (is_array($value)) |
|
| 7210 | + { |
|
| 7211 | + // No can't do |
|
| 7212 | + if ($deep_count <= 0) |
|
| 7213 | + continue; |
|
| 7214 | 7214 | |
| 7215 | - $length += array_length($value, $deep_count); |
|
| 7216 | - } |
|
| 7215 | + $length += array_length($value, $deep_count); |
|
| 7216 | + } |
|
| 7217 | 7217 | |
| 7218 | - else |
|
| 7219 | - $length += strlen($value); |
|
| 7220 | - } |
|
| 7218 | + else |
|
| 7219 | + $length += strlen($value); |
|
| 7220 | + } |
|
| 7221 | 7221 | |
| 7222 | - return $length; |
|
| 7222 | + return $length; |
|
| 7223 | 7223 | } |
| 7224 | 7224 | |
| 7225 | 7225 | ?> |
| 7226 | 7226 | \ No newline at end of file |