@@ -17,7 +17,9 @@ |
||
17 | 17 | |
18 | 18 | public static function string(SimpleXMLElement $xml) { |
19 | 19 | |
20 | - if (false === ($xml = dom_import_simplexml($xml))) return ''; |
|
20 | + if (false === ($xml = dom_import_simplexml($xml))) { |
|
21 | + return ''; |
|
22 | + } |
|
21 | 23 | |
22 | 24 | $dom = $xml->ownerDocument; $dom->formatOutput = true; |
23 | 25 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | public static function create(string $data) { |
10 | 10 | |
11 | - $data = ('<?xml version="1.0" encoding="UTF-8" ?>' . $data); |
|
11 | + $data = ('<?xml version="1.0" encoding="UTF-8" ?>'.$data); |
|
12 | 12 | |
13 | 13 | return @simplexml_load_string($data); |
14 | 14 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | public static function __autoload() { |
14 | 14 | |
15 | - self::init(DIR_DATA . 'Geo/Countries.php'); |
|
15 | + self::init(DIR_DATA.'Geo/Countries.php'); |
|
16 | 16 | } |
17 | 17 | } |
18 | 18 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | public static function __autoload() { |
14 | 14 | |
15 | - self::init(DIR_DATA . 'Geo/Timezones.php'); |
|
15 | + self::init(DIR_DATA.'Geo/Timezones.php'); |
|
16 | 16 | } |
17 | 17 | } |
18 | 18 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | public static function redirect(string $url) { |
47 | 47 | |
48 | - header("Location: " . $url); exit(); |
|
48 | + header("Location: ".$url); exit(); |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | } |
@@ -12,13 +12,13 @@ |
||
12 | 12 | |
13 | 13 | # Set headers |
14 | 14 | |
15 | - $headers = ('MIME-Version: 1.0' . "\r\n"); |
|
15 | + $headers = ('MIME-Version: 1.0'."\r\n"); |
|
16 | 16 | |
17 | - $headers .= ('Content-Type: ' . ($is_html ? 'text/html' : 'text/plain') . '; charset=UTF-8' . "\r\n"); |
|
17 | + $headers .= ('Content-Type: '.($is_html ? 'text/html' : 'text/plain').'; charset=UTF-8'."\r\n"); |
|
18 | 18 | |
19 | - $headers .= ('From: ' . $sender . ' <' . $from . '>' . "\r\n" . 'Reply-To: ' . $reply_to . "\r\n"); |
|
19 | + $headers .= ('From: '.$sender.' <'.$from.'>'."\r\n".'Reply-To: '.$reply_to."\r\n"); |
|
20 | 20 | |
21 | - $headers .= ('X-Mailer: PHP/' . phpversion() . "\r\n"); |
|
21 | + $headers .= ('X-Mailer: PHP/'.phpversion()."\r\n"); |
|
22 | 22 | |
23 | 23 | # Send message |
24 | 24 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | # Build query |
20 | 20 | |
21 | - $this->query = ('DELETE FROM ' . $table . ($condition ? (' WHERE (' . $condition . ')') : '')); |
|
21 | + $this->query = ('DELETE FROM '.$table.($condition ? (' WHERE ('.$condition.')') : '')); |
|
22 | 22 | } |
23 | 23 | } |
24 | 24 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | # Build query |
22 | 22 | |
23 | - $this->query = ('UPDATE ' . $table . ' SET ' . $dataset . ($condition ? (' WHERE (' . $condition . ')') : '')); |
|
23 | + $this->query = ('UPDATE '.$table.' SET '.$dataset.($condition ? (' WHERE ('.$condition.')') : '')); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | } |
@@ -22,9 +22,9 @@ |
||
22 | 22 | |
23 | 23 | # Build query |
24 | 24 | |
25 | - $this->query = ('SELECT ' . $selection . ' FROM ' . $table . ($condition ? (' WHERE (' . $condition . ')') : '') . |
|
25 | + $this->query = ('SELECT '.$selection.' FROM '.$table.($condition ? (' WHERE ('.$condition.')') : ''). |
|
26 | 26 | |
27 | - ($order ? (' ORDER BY ' . $order) : '') . ($limit ? (' LIMIT ' . $limit) : '')); |
|
27 | + ($order ? (' ORDER BY '.$order) : '').($limit ? (' LIMIT '.$limit) : '')); |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 | } |
@@ -2,26 +2,26 @@ |
||
2 | 2 | |
3 | 3 | # Define constants |
4 | 4 | |
5 | -define('DIR_SYSTEM', (dirname(__FILE__) . '/')); |
|
5 | +define('DIR_SYSTEM', (dirname(__FILE__).'/')); |
|
6 | 6 | |
7 | -define('DIR_SYSTEM_CLASSES', (DIR_SYSTEM . 'Classes/')); |
|
8 | -define('DIR_SYSTEM_DATA', (DIR_SYSTEM . 'Data/')); |
|
9 | -define('DIR_SYSTEM_INCLUDES', (DIR_SYSTEM . 'Includes/')); |
|
10 | -define('DIR_SYSTEM_LANGUAGES', (DIR_SYSTEM . 'Languages/')); |
|
11 | -define('DIR_SYSTEM_PLUGINS', (DIR_SYSTEM . 'Plugins/')); |
|
12 | -define('DIR_SYSTEM_TEMPLATES', (DIR_SYSTEM . 'Templates/')); |
|
7 | +define('DIR_SYSTEM_CLASSES', (DIR_SYSTEM.'Classes/')); |
|
8 | +define('DIR_SYSTEM_DATA', (DIR_SYSTEM.'Data/')); |
|
9 | +define('DIR_SYSTEM_INCLUDES', (DIR_SYSTEM.'Includes/')); |
|
10 | +define('DIR_SYSTEM_LANGUAGES', (DIR_SYSTEM.'Languages/')); |
|
11 | +define('DIR_SYSTEM_PLUGINS', (DIR_SYSTEM.'Plugins/')); |
|
12 | +define('DIR_SYSTEM_TEMPLATES', (DIR_SYSTEM.'Templates/')); |
|
13 | 13 | |
14 | 14 | # Require classes |
15 | 15 | |
16 | -require_once (DIR_SYSTEM . 'System.php'); |
|
17 | -require_once (DIR_SYSTEM . 'Exception.php'); |
|
16 | +require_once (DIR_SYSTEM.'System.php'); |
|
17 | +require_once (DIR_SYSTEM.'Exception.php'); |
|
18 | 18 | |
19 | 19 | # Require configuration |
20 | 20 | |
21 | -require_once (DIR_SYSTEM_INCLUDES . 'Config.php'); |
|
22 | -require_once (DIR_SYSTEM_INCLUDES . 'Constants.php'); |
|
23 | -require_once (DIR_SYSTEM_INCLUDES . 'Regex.php'); |
|
24 | -require_once (DIR_SYSTEM_INCLUDES . 'Tables.php'); |
|
21 | +require_once (DIR_SYSTEM_INCLUDES.'Config.php'); |
|
22 | +require_once (DIR_SYSTEM_INCLUDES.'Constants.php'); |
|
23 | +require_once (DIR_SYSTEM_INCLUDES.'Regex.php'); |
|
24 | +require_once (DIR_SYSTEM_INCLUDES.'Tables.php'); |
|
25 | 25 | |
26 | 26 | # Process environment variables |
27 | 27 |