@@ -18,10 +18,10 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | class Birthday_Notify_Background extends SMF_BackgroundTask |
| 20 | 20 | { |
| 21 | - /** |
|
| 22 | - * This executes the task. It loads up the birthdays, figures out the greeting, etc. |
|
| 23 | - * @return bool Always returns true |
|
| 24 | - */ |
|
| 21 | + /** |
|
| 22 | + * This executes the task. It loads up the birthdays, figures out the greeting, etc. |
|
| 23 | + * @return bool Always returns true |
|
| 24 | + */ |
|
| 25 | 25 | public function execute() |
| 26 | 26 | { |
| 27 | 27 | global $txt, $smcFunc, $txtBirthdayEmails, $modSettings, $sourcedir; |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | class EventNew_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 alerts as needed. |
|
| 23 | + * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed. |
|
| 24 | 24 | * @return bool Always returns true |
| 25 | 25 | */ |
| 26 | 26 | public function execute() |
@@ -81,8 +81,8 @@ discard block |
||
| 81 | 81 | 'content_action' => empty($this->_details['sender_id']) ? 'new_guest' : 'new', |
| 82 | 82 | 'is_read' => 0, |
| 83 | 83 | 'extra' => $smcFunc['json_encode']( |
| 84 | - array( |
|
| 85 | - "event_id" => $this->_details['event_id'], |
|
| 84 | + array( |
|
| 85 | + "event_id" => $this->_details['event_id'], |
|
| 86 | 86 | "event_title" => $this->_details['event_title'] |
| 87 | 87 | ) |
| 88 | 88 | ), |
@@ -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() |
@@ -285,7 +285,7 @@ |
||
| 285 | 285 | { |
| 286 | 286 | /** |
| 287 | 287 | * Constants for notfication types. |
| 288 | - */ |
|
| 288 | + */ |
|
| 289 | 289 | const RECEIVE_NOTIFY_EMAIL = 0x02; |
| 290 | 290 | const RECEIVE_NOTIFY_ALERT = 0x01; |
| 291 | 291 | |
@@ -7116,32 +7116,32 @@ discard block |
||
| 7116 | 7116 | */ |
| 7117 | 7117 | function truncate_array($array, $max_length = 1900, $deep = 3) |
| 7118 | 7118 | { |
| 7119 | - $array = (array) $array; |
|
| 7119 | + $array = (array) $array; |
|
| 7120 | 7120 | |
| 7121 | - $curr_length = array_length($array, $deep); |
|
| 7121 | + $curr_length = array_length($array, $deep); |
|
| 7122 | 7122 | |
| 7123 | - if ($curr_length <= $max_length) |
|
| 7124 | - return $array; |
|
| 7123 | + if ($curr_length <= $max_length) |
|
| 7124 | + return $array; |
|
| 7125 | 7125 | |
| 7126 | - else |
|
| 7127 | - { |
|
| 7128 | - // Truncate each element's value to a reasonable length |
|
| 7129 | - $param_max = floor($max_length / count($array)); |
|
| 7126 | + else |
|
| 7127 | + { |
|
| 7128 | + // Truncate each element's value to a reasonable length |
|
| 7129 | + $param_max = floor($max_length / count($array)); |
|
| 7130 | 7130 | |
| 7131 | - $current_deep = $deep - 1; |
|
| 7131 | + $current_deep = $deep - 1; |
|
| 7132 | 7132 | |
| 7133 | - foreach ($array as $key => &$value) |
|
| 7134 | - { |
|
| 7135 | - if (is_array($value)) |
|
| 7136 | - if ($current_deep > 0) |
|
| 7137 | - $value = truncate_array($value, $current_deep); |
|
| 7133 | + foreach ($array as $key => &$value) |
|
| 7134 | + { |
|
| 7135 | + if (is_array($value)) |
|
| 7136 | + if ($current_deep > 0) |
|
| 7137 | + $value = truncate_array($value, $current_deep); |
|
| 7138 | 7138 | |
| 7139 | - else |
|
| 7140 | - $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
| 7141 | - } |
|
| 7139 | + else |
|
| 7140 | + $value = substr($value, 0, $param_max - strlen($key) - 5); |
|
| 7141 | + } |
|
| 7142 | 7142 | |
| 7143 | - return $array; |
|
| 7144 | - } |
|
| 7143 | + return $array; |
|
| 7144 | + } |
|
| 7145 | 7145 | } |
| 7146 | 7146 | |
| 7147 | 7147 | /** |
@@ -7152,29 +7152,29 @@ discard block |
||
| 7152 | 7152 | */ |
| 7153 | 7153 | function array_length($array, $deep = 3) |
| 7154 | 7154 | { |
| 7155 | - // Work with arrays |
|
| 7156 | - $array = (array) $array; |
|
| 7157 | - $length = 0; |
|
| 7155 | + // Work with arrays |
|
| 7156 | + $array = (array) $array; |
|
| 7157 | + $length = 0; |
|
| 7158 | 7158 | |
| 7159 | - $deep_count = $deep - 1; |
|
| 7159 | + $deep_count = $deep - 1; |
|
| 7160 | 7160 | |
| 7161 | - foreach ($array as $value) |
|
| 7162 | - { |
|
| 7163 | - // Recursive? |
|
| 7164 | - if (is_array($value)) |
|
| 7165 | - { |
|
| 7166 | - // No can't do |
|
| 7167 | - if ($deep_count <= 0) |
|
| 7168 | - continue; |
|
| 7161 | + foreach ($array as $value) |
|
| 7162 | + { |
|
| 7163 | + // Recursive? |
|
| 7164 | + if (is_array($value)) |
|
| 7165 | + { |
|
| 7166 | + // No can't do |
|
| 7167 | + if ($deep_count <= 0) |
|
| 7168 | + continue; |
|
| 7169 | 7169 | |
| 7170 | - $length += array_length($value, $deep_count); |
|
| 7171 | - } |
|
| 7170 | + $length += array_length($value, $deep_count); |
|
| 7171 | + } |
|
| 7172 | 7172 | |
| 7173 | - else |
|
| 7174 | - $length += strlen($value); |
|
| 7175 | - } |
|
| 7173 | + else |
|
| 7174 | + $length += strlen($value); |
|
| 7175 | + } |
|
| 7176 | 7176 | |
| 7177 | - return $length; |
|
| 7177 | + return $length; |
|
| 7178 | 7178 | } |
| 7179 | 7179 | |
| 7180 | 7180 | ?> |
| 7181 | 7181 | \ No newline at end of file |