Passed
Pull Request — patch_1-1-9 (#3687)
by Spuds
06:23
created
sources/admin/Maintenance.controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1329,7 +1329,7 @@  discard block
 block discarded – undo
1329 1329
 						'value' => $txt['hooks_field_function_name'],
1330 1330
 					),
1331 1331
 					'data' => array(
1332
-						'function' => function ($data) {
1332
+						'function' => function($data) {
1333 1333
 							global $txt;
1334 1334
 
1335 1335
 							if (!empty($data['included_file']))
@@ -1361,7 +1361,7 @@  discard block
 block discarded – undo
1361 1361
 						'class' => 'nowrap',
1362 1362
 					),
1363 1363
 					'data' => array(
1364
-						'function' => function ($data) {
1364
+						'function' => function($data) {
1365 1365
 							return '<i class="icon i-post_moderation_' . $data['status'] . '" title="' . $data['img_text'] . '"></i>';
1366 1366
 						},
1367 1367
 						'class' => 'centertext',
Please login to merge, or discard this patch.
sources/admin/ManageSmileys.controller.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 						'class' => 'centertext',
256 256
 					),
257 257
 					'data' => array(
258
-						'function' => function ($rowData) {
258
+						'function' => function($rowData) {
259 259
 							return $rowData['selected'] ? '<i class="icon i-check"></i>' : '';
260 260
 						},
261 261
 						'class' => 'centertext',
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 						'class' => 'centertext',
313 313
 					),
314 314
 					'data' => array(
315
-						'function' => function ($rowData) {
315
+						'function' => function($rowData) {
316 316
 							return $rowData['id'] == 0 ? '' : sprintf('<input type="checkbox" name="smiley_set[%1$d]" class="input_check" />', $rowData['id']);
317 317
 						},
318 318
 						'class' => 'centertext',
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
 							'value' => $txt['smileys_location'],
929 929
 						),
930 930
 						'data' => array(
931
-							'function' => function ($rowData) {
931
+							'function' => function($rowData) {
932 932
 								global $txt;
933 933
 
934 934
 								if (empty($rowData['hidden']))
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
 							'value' => $txt['smileys_description'],
950 950
 						),
951 951
 						'data' => array(
952
-							'function' => function ($rowData) {
952
+							'function' => function($rowData) {
953 953
 								global $context, $txt, $modSettings;
954 954
 
955 955
 								if (empty($modSettings['smileys_dir']) || !is_dir($modSettings['smileys_dir']))
Please login to merge, or discard this patch.
sources/admin/ManageAttachments.controller.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 						'class' => 'grid50',
431 431
 					),
432 432
 					'data' => array(
433
-						'function' => function ($rowData) {
433
+						'function' => function($rowData) {
434 434
 							global $modSettings, $context, $scripturl;
435 435
 
436 436
 							$link = '<a href="';
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 						'class' => 'nowrap',
474 474
 					),
475 475
 					'data' => array(
476
-						'function' => function ($rowData) {
476
+						'function' => function($rowData) {
477 477
 							return byte_format($rowData['size']);
478 478
 						},
479 479
 					),
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 						'class' => 'nowrap',
489 489
 					),
490 490
 					'data' => array(
491
-						'function' => function ($rowData) {
491
+						'function' => function($rowData) {
492 492
 							global $scripturl;
493 493
 
494 494
 							// In case of an attachment, return the poster of the attachment.
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 						'class' => 'nowrap',
512 512
 					),
513 513
 					'data' => array(
514
-						'function' => function ($rowData) {
514
+						'function' => function($rowData) {
515 515
 							global $txt, $context, $scripturl;
516 516
 
517 517
 							// The date the message containing the attachment was posted or the owner of the avatar was active.
@@ -1404,7 +1404,7 @@  discard block
 block discarded – undo
1404 1404
 						'class' => 'centertext',
1405 1405
 					),
1406 1406
 					'data' => array(
1407
-						'function' => function ($rowData) {
1407
+						'function' => function($rowData) {
1408 1408
 							return '<input type="radio" name="current_dir" value="' . $rowData['id'] . '" ' . ($rowData['current'] ? ' checked="checked"' : '') . (!empty($rowData['disable_current']) ? ' disabled="disabled"' : '') . ' class="input_radio" />';
1409 1409
 						},
1410 1410
 						'style' => 'width: 10%;',
@@ -1416,7 +1416,7 @@  discard block
 block discarded – undo
1416 1416
 						'value' => $txt['attach_path'],
1417 1417
 					),
1418 1418
 					'data' => array(
1419
-						'function' => function ($rowData) {
1419
+						'function' => function($rowData) {
1420 1420
 							return '<input type="hidden" name="dirs[' . $rowData['id'] . ']" value="' . $rowData['path'] . '" /><input type="text" size="40" name="dirs[' . $rowData['id'] . ']" value="' . $rowData['path'] . '"' . (!empty($rowData['disable_base_dir']) ? ' disabled="disabled"' : '') . ' class="input_text"/>';
1421 1421
 						},
1422 1422
 						'style' => 'width: 40%;',
@@ -1493,7 +1493,7 @@  discard block
 block discarded – undo
1493 1493
 							'class' => 'centertext',
1494 1494
 						),
1495 1495
 						'data' => array(
1496
-							'function' => function ($rowData) {
1496
+							'function' => function($rowData) {
1497 1497
 								return '<input type="radio" name="current_base_dir" value="' . $rowData['id'] . '" ' . ($rowData['current'] ? ' checked="checked"' : '') . ' class="input_radio" />';
1498 1498
 							},
1499 1499
 							'style' => 'width: 10%;',
Please login to merge, or discard this patch.
sources/admin/ManagePermissions.controller.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 						'value' => $txt['membergroups_name'],
214 214
 					),
215 215
 					'data' => array(
216
-						'function' => function ($rowData) {
216
+						'function' => function($rowData) {
217 217
 							global $scripturl, $txt;
218 218
 
219 219
 							// Since the moderator group has no explicit members, no link is needed.
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 						'class' => 'grid17',
249 249
 					),
250 250
 					'data' => array(
251
-						'function' => function ($rowData) {
251
+						'function' => function($rowData) {
252 252
 							global $txt, $scripturl;
253 253
 
254 254
 							// No explicit members for guests and the moderator group.
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 						'class' => 'grid17',
272 272
 					),
273 273
 					'data' => array(
274
-						'function' => function ($rowData) {
274
+						'function' => function($rowData) {
275 275
 							return $rowData['num_permissions']['allowed'];
276 276
 						},
277 277
 					),
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 						'class' => 'grid17',
284 284
 					),
285 285
 					'data' => array(
286
-						'function' => function ($rowData) {
286
+						'function' => function($rowData) {
287 287
 							return $rowData['num_permissions']['denied'];
288 288
 						},
289 289
 					),
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 						'class' => 'grid17',
295 295
 					),
296 296
 					'data' => array(
297
-						'function' => function ($rowData) use ($_pid) {
297
+						'function' => function($rowData) use ($_pid) {
298 298
 							global $scripturl, $txt;
299 299
 
300 300
 							if ($rowData['id_group'] != 1)
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 						'style' => 'width:4%;',
312 312
 					),
313 313
 					'data' => array(
314
-						'function' => function ($rowData) {
314
+						'function' => function($rowData) {
315 315
 							if ($rowData['id_group'] != 1)
316 316
 								return '<input type="checkbox" name="group[]" value="' . $rowData['id_group'] . '" class="input_check" />';
317 317
 
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 							'class' => 'grid25',
358 358
 						),
359 359
 						'data' => array(
360
-							'function' => function ($rowData) {
360
+							'function' => function($rowData) {
361 361
 								global $scripturl;
362 362
 
363 363
 								return sprintf('<a href="%1$s?action=admin;area=permissions;sa=members;group=%2$d">%3$s</a>', $scripturl, $rowData['id_group'], $rowData['group_name_color']);
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 							'class' => 'grid10',
388 388
 						),
389 389
 						'data' => array(
390
-							'function' => function ($rowData) {
390
+							'function' => function($rowData) {
391 391
 								global $scripturl;
392 392
 
393 393
 								if ($rowData['can_search'])
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 							'class' => 'grid8',
408 408
 						),
409 409
 						'data' => array(
410
-							'function' => function ($rowData) {
410
+							'function' => function($rowData) {
411 411
 								return $rowData['num_permissions']['allowed'];
412 412
 							},
413 413
 						),
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 							'class' => 'grid8',
420 420
 						),
421 421
 						'data' => array(
422
-							'function' => function ($rowData) {
422
+							'function' => function($rowData) {
423 423
 								return $rowData['num_permissions']['denied'];
424 424
 							},
425 425
 						),
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 							'class' => 'grid17',
431 431
 						),
432 432
 						'data' => array(
433
-							'function' => function ($rowData) use ($_pid) {
433
+							'function' => function($rowData) use ($_pid) {
434 434
 								global $scripturl, $txt;
435 435
 
436 436
 								if ($rowData['id_parent'] == -2)
Please login to merge, or discard this patch.
sources/admin/ManageDraftsModule.controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 				'drafts_autosave_enabled' => 2,
35 35
 				'drafts_show_saved_enabled' => 2,
36 36
 			),
37
-			'setting_callback' => function ($value) {
37
+			'setting_callback' => function($value) {
38 38
 				require_once(SUBSDIR . '/ScheduledTasks.subs.php');
39 39
 				toggleTaskStatusByName('remove_old_drafts', $value);
40 40
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	public static function integrate_sa_manage_maintenance(&$subActions)
138 138
 	{
139
-		$subActions['topics']['activities']['olddrafts'] = function () {
139
+		$subActions['topics']['activities']['olddrafts'] = function() {
140 140
 			$controller = new ManageDraftsModule_Controller(new Event_manager());
141 141
 			$controller->pre_dispatch();
142 142
 			$controller->action_olddrafts_display();
Please login to merge, or discard this patch.
sources/admin/ManageScheduledTasks.controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 						'value' => $txt['scheduled_log_time_run'],
375 375
 					),
376 376
 					'data' => array(
377
-						'function' => function ($rowData) {
377
+						'function' => function($rowData) {
378 378
 							return standardTime($rowData['time_run'], true);
379 379
 						},
380 380
 					),
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 						'value' => $txt['scheduled_log_completed'],
406 406
 					),
407 407
 					'data' => array(
408
-						'function' => function ($rowData) {
408
+						'function' => function($rowData) {
409 409
 							global $txt;
410 410
 
411 411
 							return '<i class="icon ' . ($rowData['task_completed'] ? 'i-check' : 'i-fail') . '" title="' . sprintf($txt[$rowData['task_completed'] ? 'maintain_done' : 'maintain_fail'], $rowData['name']) . '" />';
Please login to merge, or discard this patch.
sources/admin/CoreFeatures.controller.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 			'cp' => array(
136 136
 				'url' => 'action=admin;area=featuresettings;sa=profile',
137 137
 				'save_callback' => 'custom_profiles_toggle_callback',
138
-				'setting_callback' => function ($value) {
138
+				'setting_callback' => function($value) {
139 139
 					if (!$value)
140 140
 						return array(
141 141
 							'disabled_profile_fields' => '',
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 				'settings' => array(
160 160
 					'likes_enabled' => 1,
161 161
 				),
162
-				'setting_callback' => function ($value) {
162
+				'setting_callback' => function($value) {
163 163
 					global $modSettings;
164 164
 
165 165
 					require_once(SUBSDIR . '/Mentions.subs.php');
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 			// pm = post moderation.
197 197
 			'pm' => array(
198 198
 				'url' => 'action=admin;area=permissions;sa=postmod',
199
-				'setting_callback' => function ($value) {
199
+				'setting_callback' => function($value) {
200 200
 					// Cannot use warning post moderation if disabled!
201 201
 					if (!$value)
202 202
 					{
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 			// w = warning.
225 225
 			'w' => array(
226 226
 				'url' => 'action=admin;area=securitysettings;sa=moderation',
227
-				'setting_callback' => function ($value) {
227
+				'setting_callback' => function($value) {
228 228
 					global $modSettings;
229 229
 
230 230
 					list ($modSettings['warning_enable'], $modSettings['user_limit'], $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']);
@@ -258,12 +258,12 @@  discard block
 block discarded – undo
258 258
 				'settings' => array(
259 259
 					'spider_mode' => 1,
260 260
 				),
261
-				'setting_callback' => function ($value) {
261
+				'setting_callback' => function($value) {
262 262
 					// Turn off the spider group if disabling.
263 263
 					if (!$value)
264 264
 						return array('spider_group' => 0, 'show_spider_online' => 0);
265 265
 				},
266
-				'on_save' => function () {
266
+				'on_save' => function() {
267 267
 					require_once(SUBSDIR . '/SearchEngines.subs.php');
268 268
 				},
269 269
 			),
@@ -308,14 +308,14 @@  discard block
 block discarded – undo
308 308
 
309 309
 			if (method_exists($integration['class'], 'setting_callback'))
310 310
 			{
311
-				$core_features[$integration['id']]['setting_callback'] = function ($value) use ($integration) {
311
+				$core_features[$integration['id']]['setting_callback'] = function($value) use ($integration) {
312 312
 					$integration['class']::setting_callback($value);
313 313
 				};
314 314
 			}
315 315
 
316 316
 			if (method_exists($integration['class'], 'on_save'))
317 317
 			{
318
-				$core_features[$integration['id']]['on_save'] = function () use ($integration) {
318
+				$core_features[$integration['id']]['on_save'] = function() use ($integration) {
319 319
 					$integration['class']::on_save();
320 320
 				};
321 321
 			}
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 		}
467 467
 
468 468
 		// Sort by title attribute
469
-		uasort($features, function ($a, $b) {
469
+		uasort($features, function($a, $b) {
470 470
 			return strcmp(strtolower($a['title']), strtolower($b['title']));
471 471
 		});
472 472
 
Please login to merge, or discard this patch.
sources/admin/ManagePaid.controller.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -270,13 +270,13 @@  discard block
 block discarded – undo
270 270
 			'items_per_page' => 20,
271 271
 			'base_href' => $scripturl . '?action=admin;area=paidsubscribe;sa=view',
272 272
 			'get_items' => array(
273
-				'function' => function () {
273
+				'function' => function() {
274 274
 					global $context;
275 275
 					return $context['subscriptions'];
276 276
 				},
277 277
 			),
278 278
 			'get_count' => array(
279
-				'function' => function () {
279
+				'function' => function() {
280 280
 					global $context;
281 281
 					return count($context['subscriptions']);
282 282
 				},
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 						'style' => 'width: 30%;',
290 290
 					),
291 291
 					'data' => array(
292
-						'function' => function ($rowData) {
292
+						'function' => function($rowData) {
293 293
 							global $scripturl;
294 294
 
295 295
 							return sprintf('<a href="%1$s?action=admin;area=paidsubscribe;sa=viewsub;sid=%2$s">%3$s</a>', $scripturl, $rowData['id'], $rowData['name']);
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 						'value' => $txt['paid_cost'],
302 302
 					),
303 303
 					'data' => array(
304
-						'function' => function ($rowData) {
304
+						'function' => function($rowData) {
305 305
 							global $txt;
306 306
 
307 307
 							return $rowData['flexible'] ? '<em>' . $txt['flexible'] . '</em>' : $rowData['cost'] . ' / ' . $rowData['length'];
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 						'value' => $txt['paid_is_active'],
339 339
 					),
340 340
 					'data' => array(
341
-						'function' => function ($rowData) {
341
+						'function' => function($rowData) {
342 342
 							global $txt;
343 343
 
344 344
 							return '<span class="' . ($rowData['active'] ? 'success' : 'alert') . '">' . ($rowData['active'] ? $txt['yes'] : $txt['no']) . '</span>';
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 						'value' => $txt['subscribers'],
351 351
 					),
352 352
 					'data' => array(
353
-						'function' => function ($rowData) {
353
+						'function' => function($rowData) {
354 354
 							global $scripturl, $txt;
355 355
 
356 356
 							return '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=viewsub;sid=' . $rowData['id'] . '"><i class="icon i-view" title="' . $txt['view'] . '"></i></a>';
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 						'value' => $txt['modify'],
364 364
 					),
365 365
 					'data' => array(
366
-						'function' => function ($rowData) {
366
+						'function' => function($rowData) {
367 367
 							global $txt, $scripturl;
368 368
 
369 369
 							return '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modify;sid=' . $rowData['id'] . '"><i class="icon i-modify" title="' . $txt['modify'] . '"></i></a>';
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 						'value' => $txt['remove']
377 377
 					),
378 378
 					'data' => array(
379
-						'function' => function ($rowData) {
379
+						'function' => function($rowData) {
380 380
 							global $txt, $scripturl;
381 381
 
382 382
 							return '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modify;delete;sid=' . $rowData['id'] . '"><i class="icon i-delete" title="' . $txt['delete'] . '"></i></a>';
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 						'style' => 'width: 20%;',
637 637
 					),
638 638
 					'data' => array(
639
-						'function' => function ($rowData) {
639
+						'function' => function($rowData) {
640 640
 							global $txt, $scripturl;
641 641
 
642 642
 							return $rowData['id_member'] == 0 ? $txt['guest'] : '<a href="' . $scripturl . '?action=profile;u=' . $rowData['id_member'] . '">' . $rowData['name'] . '</a>';
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 						'value' => $txt['edit_subscriber'],
709 709
 					),
710 710
 					'data' => array(
711
-						'function' => function ($rowData) {
711
+						'function' => function($rowData) {
712 712
 							global $txt, $scripturl;
713 713
 
714 714
 							return '<a href="' . $scripturl . '?action=admin;area=paidsubscribe;sa=modifyuser;lid=' . $rowData['id'] . '">' . $txt['modify'] . '</a>';
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
 						'class' => 'centertext',
723 723
 					),
724 724
 					'data' => array(
725
-						'function' => function ($rowData) {
725
+						'function' => function($rowData) {
726 726
 							return '<input type="checkbox" name="delsub[' . $rowData['id'] . ']" class="input_check" />';
727 727
 						},
728 728
 						'class' => 'centertext',
Please login to merge, or discard this patch.
sources/subs/Drafts.subs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -404,7 +404,7 @@
 block discarded – undo
404 404
 		array(
405 405
 			'poster_time_old' => time() - (86400 * $days),
406 406
 		),
407
-		function ($row)
407
+		function($row)
408 408
 		{
409 409
 			return (int) $row['id_draft'];
410 410
 		}
Please login to merge, or discard this patch.