@@ -180,7 +180,7 @@ |
||
180 | 180 | * |
181 | 181 | * @access public |
182 | 182 | * @param string $dir A valid path |
183 | - * @return boolean If this was successful or not. |
|
183 | + * @return boolean|null If this was successful or not. |
|
184 | 184 | */ |
185 | 185 | public function setCachedir($dir = null) |
186 | 186 | { |
@@ -44,6 +44,10 @@ discard block |
||
44 | 44 | $this->Buf = range(0, 279); |
45 | 45 | } |
46 | 46 | |
47 | + /** |
|
48 | + * @param string $data |
|
49 | + * @param integer $datLen |
|
50 | + */ |
|
47 | 51 | public function decompress($data, &$datLen) |
48 | 52 | { |
49 | 53 | $stLen = strlen($data); |
@@ -63,6 +67,11 @@ discard block |
||
63 | 67 | return $ret; |
64 | 68 | } |
65 | 69 | |
70 | + /** |
|
71 | + * @param boolean $bInit |
|
72 | + * |
|
73 | + * @return integer |
|
74 | + */ |
|
66 | 75 | public function LZWCommand(&$data, $bInit) |
67 | 76 | { |
68 | 77 | if ($bInit) |
@@ -253,6 +262,10 @@ discard block |
||
253 | 262 | unset($this->m_nColors, $this->m_arColors); |
254 | 263 | } |
255 | 264 | |
265 | + /** |
|
266 | + * @param string $lpData |
|
267 | + * @param integer $num |
|
268 | + */ |
|
256 | 269 | public function load($lpData, $num) |
257 | 270 | { |
258 | 271 | $this->m_nColors = 0; |
@@ -324,6 +337,9 @@ discard block |
||
324 | 337 | unset($this->m_bSorted, $this->m_nTableSize, $this->m_nBgColor, $this->m_nPixelRatio, $this->m_colorTable); |
325 | 338 | } |
326 | 339 | |
340 | + /** |
|
341 | + * @param integer $hdrLen |
|
342 | + */ |
|
327 | 343 | public function load($lpData, &$hdrLen) |
328 | 344 | { |
329 | 345 | $hdrLen = 0; |
@@ -370,6 +386,10 @@ discard block |
||
370 | 386 | unset($this->m_bInterlace, $this->m_bSorted, $this->m_nTableSize, $this->m_colorTable); |
371 | 387 | } |
372 | 388 | |
389 | + /** |
|
390 | + * @param string $lpData |
|
391 | + * @param integer $hdrLen |
|
392 | + */ |
|
373 | 393 | public function load($lpData, &$hdrLen) |
374 | 394 | { |
375 | 395 | $hdrLen = 0; |
@@ -412,6 +432,10 @@ discard block |
||
412 | 432 | $this->m_lzw = new gif_lzw_compression(); |
413 | 433 | } |
414 | 434 | |
435 | + /** |
|
436 | + * @param string $data |
|
437 | + * @param integer $datLen |
|
438 | + */ |
|
415 | 439 | public function load($data, &$datLen) |
416 | 440 | { |
417 | 441 | $datLen = 0; |
@@ -464,6 +488,10 @@ discard block |
||
464 | 488 | return false; |
465 | 489 | } |
466 | 490 | |
491 | + /** |
|
492 | + * @param string $data |
|
493 | + * @param integer $extLen |
|
494 | + */ |
|
467 | 495 | public function skipExt(&$data, &$extLen) |
468 | 496 | { |
469 | 497 | $extLen = 0; |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | $this->MAX_LZW_BITS = 12; |
39 | 39 | unset($this->Next, $this->Vals, $this->Stack, $this->Buf); |
40 | 40 | |
41 | - $this->Next = range(0, (1 << $this->MAX_LZW_BITS) - 1); |
|
42 | - $this->Vals = range(0, (1 << $this->MAX_LZW_BITS) - 1); |
|
41 | + $this->Next = range(0, (1 << $this->MAX_LZW_BITS) - 1); |
|
42 | + $this->Vals = range(0, (1 << $this->MAX_LZW_BITS) - 1); |
|
43 | 43 | $this->Stack = range(0, (1 << ($this->MAX_LZW_BITS + 1)) - 1); |
44 | 44 | $this->Buf = range(0, 279); |
45 | 45 | } |
@@ -278,9 +278,9 @@ discard block |
||
278 | 278 | for ($i = 0; $i < $this->m_nColors; $i++) |
279 | 279 | { |
280 | 280 | $ret .= |
281 | - chr(($this->m_arColors[$i] & 0x000000FF)) . // R |
|
282 | - chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G |
|
283 | - chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B |
|
281 | + chr(($this->m_arColors[$i] & 0x000000FF)) . // R |
|
282 | + chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G |
|
283 | + chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | return $ret; |
@@ -290,14 +290,14 @@ discard block |
||
290 | 290 | { |
291 | 291 | $rgb = intval($rgb) & 0xFFFFFF; |
292 | 292 | $r1 = ($rgb & 0x0000FF); |
293 | - $g1 = ($rgb & 0x00FF00) >> 8; |
|
293 | + $g1 = ($rgb & 0x00FF00) >> 8; |
|
294 | 294 | $b1 = ($rgb & 0xFF0000) >> 16; |
295 | 295 | $idx = -1; |
296 | 296 | |
297 | 297 | for ($i = 0; $i < $this->m_nColors; $i++) |
298 | 298 | { |
299 | 299 | $r2 = ($this->m_arColors[$i] & 0x000000FF); |
300 | - $g2 = ($this->m_arColors[$i] & 0x0000FF00) >> 8; |
|
300 | + $g2 = ($this->m_arColors[$i] & 0x0000FF00) >> 8; |
|
301 | 301 | $b2 = ($this->m_arColors[$i] & 0x00FF0000) >> 16; |
302 | 302 | $d = abs($r2 - $r1) + abs($g2 - $g1) + abs($b2 - $b1); |
303 | 303 |
@@ -56,6 +56,7 @@ discard block |
||
56 | 56 | * @param array $wordsSearch Search words |
57 | 57 | * @param array $wordsExclude Words to exclude |
58 | 58 | * @param bool $isExcluded Whether the specfied word should be excluded |
59 | + * @return void |
|
59 | 60 | */ |
60 | 61 | public function prepareIndexes($word, array &$wordsSearch, array &$wordsExclude, $isExcluded); |
61 | 62 | |
@@ -130,7 +131,7 @@ discard block |
||
130 | 131 | * @param array $excludedIndexWords Indexed words that should be excluded |
131 | 132 | * @param array $participants |
132 | 133 | * @param array $searchArray |
133 | - * @return mixed |
|
134 | + * @return integer |
|
134 | 135 | */ |
135 | 136 | public function searchQuery(array $query_params, array $searchWords, array $excludedIndexWords, array &$participants, array &$searchArray); |
136 | 137 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | global $smcFunc; |
225 | 225 | |
226 | - $result = $smcFunc['db_query']('',' |
|
226 | + $result = $smcFunc['db_query']('', ' |
|
227 | 227 | SELECT DISTINCT id_search |
228 | 228 | FROM {db_prefix}log_search_results |
229 | 229 | WHERE id_msg = {int:id_msg}', |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | if (count($id_searchs) < 1) |
240 | 240 | return; |
241 | 241 | |
242 | - $smcFunc['db_query']('',' |
|
242 | + $smcFunc['db_query']('', ' |
|
243 | 243 | DELETE FROM {db_prefix}log_search_results |
244 | 244 | WHERE id_search in ({array_int:id_searchs})', |
245 | 245 | array( |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | ) |
248 | 248 | ); |
249 | 249 | |
250 | - $smcFunc['db_query']('',' |
|
250 | + $smcFunc['db_query']('', ' |
|
251 | 251 | DELETE FROM {db_prefix}log_search_topics |
252 | 252 | WHERE id_search in ({array_int:id_searchs})', |
253 | 253 | array( |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | ) |
256 | 256 | ); |
257 | 257 | |
258 | - $smcFunc['db_query']('',' |
|
258 | + $smcFunc['db_query']('', ' |
|
259 | 259 | DELETE FROM {db_prefix}log_search_messages |
260 | 260 | WHERE id_search in ({array_int:id_searchs})', |
261 | 261 | array( |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | /** |
280 | 280 | * Generate the timestamp for the calculation |
281 | 281 | * |
282 | - * @return integer Timestamp |
|
282 | + * @return double Timestamp |
|
283 | 283 | */ |
284 | 284 | public function generateTimestamp() |
285 | 285 | { |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | * Truncate the given hash down to just what we need |
291 | 291 | * |
292 | 292 | * @param string $hash Hash to truncate |
293 | - * @return string Truncated hash value |
|
293 | + * @return integer Truncated hash value |
|
294 | 294 | */ |
295 | 295 | public function truncateHash($hash) |
296 | 296 | { |
@@ -382,7 +382,7 @@ |
||
382 | 382 | * @param array $parameters Not used? |
383 | 383 | * @param string $if_exists What to do if the index exists. If 'update', the definition will be updated. |
384 | 384 | * @param string $error |
385 | - * @return boolean Whether or not the operation was successful |
|
385 | + * @return false|null Whether or not the operation was successful |
|
386 | 386 | */ |
387 | 387 | function smf_db_add_index($table_name, $index_info, $parameters = array(), $if_exists = 'update', $error = 'fatal') |
388 | 388 | { |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | { |
127 | 127 | $smcFunc['db_transaction']('begin'); |
128 | 128 | $db_trans = true; |
129 | - $smcFunc['db_drop_table']($table_name.'_old'); |
|
130 | - $smcFunc['db_query']('',' |
|
131 | - RENAME TABLE '. $table_name .' TO ' . $table_name . '_old', |
|
129 | + $smcFunc['db_drop_table']($table_name . '_old'); |
|
130 | + $smcFunc['db_query']('', ' |
|
131 | + RENAME TABLE '. $table_name . ' TO ' . $table_name . '_old', |
|
132 | 132 | array( |
133 | 133 | 'security_override' => true, |
134 | 134 | ) |
@@ -202,15 +202,15 @@ discard block |
||
202 | 202 | { |
203 | 203 | $same_col = array(); |
204 | 204 | |
205 | - $request = $smcFunc['db_query']('',' |
|
205 | + $request = $smcFunc['db_query']('', ' |
|
206 | 206 | SELECT count(*), column_name |
207 | 207 | FROM information_schema.columns |
208 | 208 | WHERE table_name in ({string:table1},{string:table2}) AND table_schema = {string:schema} |
209 | 209 | GROUP BY column_name |
210 | 210 | HAVING count(*) > 1', |
211 | - array ( |
|
211 | + array( |
|
212 | 212 | 'table1' => $table_name, |
213 | - 'table2' => $table_name.'_old', |
|
213 | + 'table2' => $table_name . '_old', |
|
214 | 214 | 'schema' => $db_name, |
215 | 215 | ) |
216 | 216 | ); |
@@ -220,8 +220,8 @@ discard block |
||
220 | 220 | $same_col[] = $row['column_name']; |
221 | 221 | } |
222 | 222 | |
223 | - $smcFunc['db_query']('',' |
|
224 | - INSERT INTO ' . $table_name .'(' |
|
223 | + $smcFunc['db_query']('', ' |
|
224 | + INSERT INTO ' . $table_name . '(' |
|
225 | 225 | . implode($same_col, ',') . |
226 | 226 | ') |
227 | 227 | SELECT '. implode($same_col, ',') . ' |
@@ -475,7 +475,7 @@ |
||
475 | 475 | * Used by fatal_error(), fatal_lang_error() |
476 | 476 | * |
477 | 477 | * @param string $error The error |
478 | - * @param array $sprintf An array of data to be sprintf()'d into the specified message |
|
478 | + * @param boolean $sprintf An array of data to be sprintf()'d into the specified message |
|
479 | 479 | */ |
480 | 480 | function log_error_online($error, $sprintf = array()) |
481 | 481 | { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $backtrace = debug_backtrace(); |
46 | 46 | |
47 | 47 | // are we in a loop? |
48 | - if($error_call > 2) |
|
48 | + if ($error_call > 2) |
|
49 | 49 | { |
50 | 50 | var_dump($backtrace); |
51 | 51 | die('Error loop.'); |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | $url['error'] = $error; |
550 | 550 | // Url field got a max length of 1024 in db |
551 | 551 | if (strlen($url['error']) > 500) |
552 | - $url['error'] = substr($url['error'],0,500); |
|
552 | + $url['error'] = substr($url['error'], 0, 500); |
|
553 | 553 | |
554 | 554 | if (!empty($sprintf)) |
555 | 555 | $url['error_params'] = $sprintf; |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | * Doesn't clean the inputs |
930 | 930 | * |
931 | 931 | * @param array $items_ids The items to remove |
932 | - * @param bool|int $group_id The ID of the group these triggers are associated with or false if deleting them from all groups |
|
932 | + * @param integer $group_id The ID of the group these triggers are associated with or false if deleting them from all groups |
|
933 | 933 | * @return bool Always returns true |
934 | 934 | */ |
935 | 935 | function removeBanTriggers($items_ids = array(), $group_id = false) |
@@ -1123,7 +1123,7 @@ discard block |
||
1123 | 1123 | * Errors in $context['ban_errors'] |
1124 | 1124 | * |
1125 | 1125 | * @param array $triggers The triggers to validate |
1126 | - * @return array An array of riggers and log info ready to be used |
|
1126 | + * @return integer An array of riggers and log info ready to be used |
|
1127 | 1127 | */ |
1128 | 1128 | function validateTriggers(&$triggers) |
1129 | 1129 | { |
@@ -283,11 +283,11 @@ discard block |
||
283 | 283 | if (removeItems == 0) |
284 | 284 | { |
285 | 285 | e.preventDefault(); |
286 | - return alert("'. $txt['select_item_check'] .'"); |
|
286 | + return alert("'. $txt['select_item_check'] . '"); |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | |
290 | - return confirm("'. $txt['ban_remove_selected_confirm'] .'"); |
|
290 | + return confirm("'. $txt['ban_remove_selected_confirm'] . '"); |
|
291 | 291 | });', |
292 | 292 | ); |
293 | 293 | |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | array( |
487 | 487 | 'position' => 'below_table_data', |
488 | 488 | 'value' => ' |
489 | - <input type="submit" name="remove_selection" value="' . $txt['ban_remove_selected_triggers'] . '" class="button"> <a class="button" href="' . $scripturl . '?action=admin;area=ban;sa=edittrigger;bg=' . $ban_group_id . '">' . $txt['ban_add_trigger'] . '</a>', |
|
489 | + <input type="submit" name="remove_selection" value="' . $txt['ban_remove_selected_triggers'] . '" class="button"> <a class="button" href="' . $scripturl . '?action=admin;area=ban;sa=edittrigger;bg=' . $ban_group_id . '">' . $txt['ban_add_trigger'] . '</a>', |
|
490 | 490 | 'style' => 'text-align: right;', |
491 | 491 | ), |
492 | 492 | array( |
@@ -506,11 +506,11 @@ discard block |
||
506 | 506 | if (removeItems == 0) |
507 | 507 | { |
508 | 508 | e.preventDefault(); |
509 | - return alert("'. $txt['select_item_check'] .'"); |
|
509 | + return alert("'. $txt['select_item_check'] . '"); |
|
510 | 510 | } |
511 | 511 | |
512 | 512 | |
513 | - return confirm("'. $txt['ban_remove_selected_confirm'] .'"); |
|
513 | + return confirm("'. $txt['ban_remove_selected_confirm'] . '"); |
|
514 | 514 | });', |
515 | 515 | ); |
516 | 516 | createList($listOptions); |
@@ -1452,7 +1452,7 @@ |
||
1452 | 1452 | * |
1453 | 1453 | * @param int $id_subscribe The subscription ID |
1454 | 1454 | * @param int $id_member The ID of the member |
1455 | - * @param int|string $renewal 0 if we're forcing start/end time, otherwise a string indicating how long to renew the subscription for ('D', 'W', 'M' or 'Y') |
|
1455 | + * @param integer $renewal 0 if we're forcing start/end time, otherwise a string indicating how long to renew the subscription for ('D', 'W', 'M' or 'Y') |
|
1456 | 1456 | * @param int $forceStartTime If set, forces the subscription to start at the specified time |
1457 | 1457 | * @param int $forceEndTime If set, forces the subscription to end at the specified time |
1458 | 1458 | */ |
@@ -1129,7 +1129,7 @@ |
||
1129 | 1129 | '{db_prefix}log_subscribed', |
1130 | 1130 | array( |
1131 | 1131 | 'id_subscribe' => 'int', 'id_member' => 'int', 'old_id_group' => 'int', 'start_time' => 'int', |
1132 | - 'end_time' => 'int', 'status' => 'int','pending_details' => 'string-65534' |
|
1132 | + 'end_time' => 'int', 'status' => 'int', 'pending_details' => 'string-65534' |
|
1133 | 1133 | ), |
1134 | 1134 | array( |
1135 | 1135 | $context['sub_id'], $id_member, $id_group, $starttime, |
@@ -4070,7 +4070,7 @@ |
||
4070 | 4070 | * |
4071 | 4071 | * @param int $pmID The ID of the PM |
4072 | 4072 | * @param string $validFor Which folders this is valud for - can be 'inbox', 'outbox' or 'in_or_outbox' |
4073 | - * @return boolean Whether the PM is accessible in that folder for the current user |
|
4073 | + * @return boolean|null Whether the PM is accessible in that folder for the current user |
|
4074 | 4074 | */ |
4075 | 4075 | function isAccessiblePM($pmID, $validFor = 'in_or_outbox') |
4076 | 4076 | { |