@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | require $GLOBALS['FLIPSIDE_SETTINGS_LOC'].'/class.FlipsideSettings.php'; |
| 32 | 32 | return; |
| 33 | - } |
|
| 33 | + } |
|
| 34 | 34 | if(file_exists('/var/www/secure_settings/class.FlipsideSettings.php')) |
| 35 | 35 | { |
| 36 | 36 | require '/var/www/secure_settings/class.FlipsideSettings.php'; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | public function getDataSetData($dataSetName) |
| 73 | 73 | { |
| 74 | 74 | if(!isset(\FlipsideSettings::$dataset) || !isset(\FlipsideSettings::$dataset[$dataSetName])) |
| 75 | - { |
|
| 75 | + { |
|
| 76 | 76 | return false; |
| 77 | 77 | } |
| 78 | 78 | return \FlipsideSettings::$dataset[$dataSetName]; |
@@ -254,7 +254,8 @@ 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 | 259 | error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); |
| 259 | 260 | } |
| 260 | 261 | return false; |
@@ -304,7 +305,8 @@ discard block |
||
| 304 | 305 | $sql = "INSERT INTO `$tablename` ($cols) VALUES ($set);"; |
| 305 | 306 | if($this->pdo->exec($sql) === false) |
| 306 | 307 | { |
| 307 | - if (php_sapi_name() !== "cli") { |
|
| 308 | + if (php_sapi_name() !== "cli") |
|
| 309 | + { |
|
| 308 | 310 | error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); |
| 309 | 311 | } |
| 310 | 312 | return false; |
@@ -137,16 +137,16 @@ |
||
| 137 | 137 | { |
| 138 | 138 | if($isGroup) |
| 139 | 139 | { |
| 140 | - array_push($this->tmpMembers, array('gid' => $name)); |
|
| 140 | + array_push($this->tmpMembers, array('gid' => $name)); |
|
| 141 | 141 | } |
| 142 | 142 | else |
| 143 | 143 | { |
| 144 | - array_push($this->tmpMembers, array('uid' => $name)); |
|
| 144 | + array_push($this->tmpMembers, array('uid' => $name)); |
|
| 145 | 145 | } |
| 146 | 146 | if($flush) |
| 147 | 147 | { |
| 148 | 148 | $gid = $this->getGroupName(); |
| 149 | - $memberDT = $this->auth->getDataTable('groupUserMap'); |
|
| 149 | + $memberDT = $this->auth->getDataTable('groupUserMap'); |
|
| 150 | 150 | //Get all cu rrent direct members |
| 151 | 151 | $existing = $memberDT->read(new \Flipside\Data\Filter('groupCN eq "'.$gid.'"')); |
| 152 | 152 | $exCount = count($existing); |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | $data = $userDT->read($filter); |
| 81 | 81 | if(strlen($data[0]['userPassword']) === 0) |
| 82 | 82 | { |
| 83 | - $data[0]['userPassword'] = openssl_random_pseudo_bytes(10); |
|
| 83 | + $data[0]['userPassword'] = openssl_random_pseudo_bytes(10); |
|
| 84 | 84 | } |
| 85 | 85 | $hash = hash('sha512', $data[0]['uid'].';'.$data[0]['userPassword'].';'.$data[0]['mail']); |
| 86 | 86 | $update = array('resetHash' => $hash); |
@@ -219,7 +219,8 @@ |
||
| 219 | 219 | public function getGroupByName($name) |
| 220 | 220 | { |
| 221 | 221 | $group = $this->getEntityByFilter('group', "cn eq '$name'", '\Flipside\Auth\SQLGroup'); |
| 222 | - if($group === null) { |
|
| 222 | + if($group === null) |
|
| 223 | + { |
|
| 223 | 224 | return $this->getEntityByFilter('group', "gid eq '$name'", '\Flipside\Auth\SQLGroup'); |
| 224 | 225 | } |
| 225 | 226 | return $group; |
@@ -13,7 +13,8 @@ discard block |
||
| 13 | 13 | require(__DIR__ . '/vendor/autoload.php'); |
| 14 | 14 | } |
| 15 | 15 | set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__); |
| 16 | -spl_autoload_register(function ($class) { |
|
| 16 | +spl_autoload_register(function ($class) |
|
| 17 | +{ |
|
| 17 | 18 | |
| 18 | 19 | // project-specific namespace prefix |
| 19 | 20 | $prefix = 'Flipside\\'; |
@@ -23,7 +24,8 @@ discard block |
||
| 23 | 24 | |
| 24 | 25 | // does the class use the namespace prefix? |
| 25 | 26 | $len = strlen($prefix); |
| 26 | - if (strncmp($prefix, $class, $len) !== 0) { |
|
| 27 | + if (strncmp($prefix, $class, $len) !== 0) |
|
| 28 | + { |
|
| 27 | 29 | // no, move to the next registered autoloader |
| 28 | 30 | return; |
| 29 | 31 | } |
@@ -37,7 +39,8 @@ discard block |
||
| 37 | 39 | $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
| 38 | 40 | |
| 39 | 41 | // if the file exists, require it |
| 40 | - if (file_exists($file)) { |
|
| 42 | + if (file_exists($file)) |
|
| 43 | + { |
|
| 41 | 44 | require $file; |
| 42 | 45 | } |
| 43 | 46 | }); |