@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $stmt = $this->pdo->query($sql); |
255 | 255 | if($stmt === false) |
256 | 256 | { |
257 | - if (php_sapi_name() !== "cli") { |
|
257 | + if(php_sapi_name() !== "cli") { |
|
258 | 258 | error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); |
259 | 259 | } |
260 | 260 | return false; |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | $sql = "INSERT INTO `$tablename` ($cols) VALUES ($set);"; |
305 | 305 | if($this->pdo->exec($sql) === false) |
306 | 306 | { |
307 | - if (php_sapi_name() !== "cli") { |
|
307 | + if(php_sapi_name() !== "cli") { |
|
308 | 308 | error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); |
309 | 309 | } |
310 | 310 | return false; |
@@ -131,7 +131,7 @@ |
||
131 | 131 | private function hashLDAPPassword($password, $salt) |
132 | 132 | { |
133 | 133 | $shaHashed = sha1($password.$salt); |
134 | - $packed = pack("H*",$shaHashed); |
|
134 | + $packed = pack("H*", $shaHashed); |
|
135 | 135 | $encoded = base64_encode($packed.$salt); |
136 | 136 | return "{SSHA}".$encoded; |
137 | 137 | } |
@@ -8,22 +8,22 @@ discard block |
||
8 | 8 | * @copyright Copyright (c) 2015, Austin Artistic Reconstruction |
9 | 9 | * @license http://www.apache.org/licenses/ Apache 2.0 License |
10 | 10 | */ |
11 | -if(file_exists(__DIR__ . '/vendor/autoload.php')) |
|
11 | +if(file_exists(__DIR__.'/vendor/autoload.php')) |
|
12 | 12 | { |
13 | - require(__DIR__ . '/vendor/autoload.php'); |
|
13 | + require(__DIR__.'/vendor/autoload.php'); |
|
14 | 14 | } |
15 | -set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__); |
|
16 | -spl_autoload_register(function ($class) { |
|
15 | +set_include_path(get_include_path().PATH_SEPARATOR.__DIR__); |
|
16 | +spl_autoload_register(function($class) { |
|
17 | 17 | |
18 | 18 | // project-specific namespace prefix |
19 | 19 | $prefix = 'Flipside\\'; |
20 | 20 | |
21 | 21 | // base directory for the namespace prefix |
22 | - $base_dir = __DIR__ . '/'; |
|
22 | + $base_dir = __DIR__.'/'; |
|
23 | 23 | |
24 | 24 | // does the class use the namespace prefix? |
25 | 25 | $len = strlen($prefix); |
26 | - if (strncmp($prefix, $class, $len) !== 0) { |
|
26 | + if(strncmp($prefix, $class, $len) !== 0) { |
|
27 | 27 | // no, move to the next registered autoloader |
28 | 28 | return; |
29 | 29 | } |
@@ -34,10 +34,10 @@ discard block |
||
34 | 34 | // replace the namespace prefix with the base directory, replace namespace |
35 | 35 | // separators with directory separators in the relative class name, append |
36 | 36 | // with .php |
37 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
37 | + $file = $base_dir.str_replace('\\', '/', $relative_class).'.php'; |
|
38 | 38 | |
39 | 39 | // if the file exists, require it |
40 | - if (file_exists($file)) { |
|
40 | + if(file_exists($file)) { |
|
41 | 41 | require $file; |
42 | 42 | } |
43 | 43 | }); |