Completed
Push — release-2.1 ( 64d581...84b0cc )
by Rick
06:44 queued 10s
created

Update_TLD_Regex::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file initiates updates of $modSettings['tld_regex']
5
 *
6
 * Simple Machines Forum (SMF)
7
 *
8
 * @package SMF
9
 * @author Simple Machines http://www.simplemachines.org
10
 * @copyright 2016 Simple Machines and individual contributors
11
 * @license http://www.simplemachines.org/about/smf/license.php BSD
12
 *
13
 * @version 2.1 Beta 3
14
 */
15
16
/**
17
 * Class Update_TLD_Regex
18
 */
19
class Update_TLD_Regex extends SMF_BackgroundTask
20
{
21
    /**
22
     * This executes the task. It just calls set_tld_regex() in Subs.php
23
     * @return bool Always returns true
24
     */
25
	public function execute()
26
 	{
27
		global $sourcedir;
28
29
		require_once($sourcedir . '/Subs.php');
30
		set_tld_regex(true);
31
32
		return true;
33
	}
34
}
35
36
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...