@@ -44,7 +44,10 @@ |
||
| 44 | 44 | { |
| 45 | 45 | $dn = explode(',', $array[$i]); |
| 46 | 46 | $res = $this->isInGroupNamed(substr($dn[0], 3)); |
| 47 | - if($res) return $res; |
|
| 47 | + if($res) |
|
| 48 | + { |
|
| 49 | + return $res; |
|
| 50 | + } |
|
| 48 | 51 | } |
| 49 | 52 | } |
| 50 | 53 | return $res; |
@@ -46,11 +46,15 @@ discard block |
||
| 46 | 46 | public function jsonSerialize() |
| 47 | 47 | { |
| 48 | 48 | $group = array(); |
| 49 | - try{ |
|
| 49 | + try |
|
| 50 | + { |
|
| 50 | 51 | $group['cn'] = $this->getGroupName(); |
| 51 | 52 | $group['description'] = $this->getDescription(); |
| 52 | 53 | $group['member'] = $this->getMemberUids(); |
| 53 | - } catch(\Exception $e) {echo $e->getMessage(); die();} |
|
| 54 | + } |
|
| 55 | + catch(\Exception $e) |
|
| 56 | + { |
|
| 57 | +echo $e->getMessage(); die();} |
|
| 54 | 58 | return $group; |
| 55 | 59 | } |
| 56 | 60 | |
@@ -86,7 +90,10 @@ discard block |
||
| 86 | 90 | { |
| 87 | 91 | $isLast = true; |
| 88 | 92 | } |
| 89 | - if(!isset($group->member[$i]->type)) continue; |
|
| 93 | + if(!isset($group->member[$i]->type)) |
|
| 94 | + { |
|
| 95 | + continue; |
|
| 96 | + } |
|
| 90 | 97 | if($group->member[$i]->type === 'Group') |
| 91 | 98 | { |
| 92 | 99 | $this->addMember($group->member[$i]->cn, true, $isLast); |
@@ -423,7 +423,10 @@ |
||
| 423 | 423 | */ |
| 424 | 424 | private function setupVars() |
| 425 | 425 | { |
| 426 | - if($this->minified !== null && $this->cdn !== null) return; |
|
| 426 | + if($this->minified !== null && $this->cdn !== null) |
|
| 427 | + { |
|
| 428 | + return; |
|
| 429 | + } |
|
| 427 | 430 | $this->minified = 'min'; |
| 428 | 431 | $this->cdn = 'cdn'; |
| 429 | 432 | if(isset(FlipsideSettings::$global)) |
@@ -16,8 +16,14 @@ |
||
| 16 | 16 | $ret = array(); |
| 17 | 17 | foreach ($this as $key => $value) |
| 18 | 18 | { |
| 19 | - if($key === 'server' || $key === 'count') continue; |
|
| 20 | - if(is_numeric($key)) continue; |
|
| 19 | + if($key === 'server' || $key === 'count') |
|
| 20 | + { |
|
| 21 | + continue; |
|
| 22 | + } |
|
| 23 | + if(is_numeric($key)) |
|
| 24 | + { |
|
| 25 | + continue; |
|
| 26 | + } |
|
| 21 | 27 | if($key === 'jpegphoto') |
| 22 | 28 | { |
| 23 | 29 | $ret[$key] = base64_encode($value[0]); |
@@ -1,6 +1,8 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | require_once('Autoload.php'); |
| 3 | -if(!isset($_SESSION) && php_sapi_name() !== 'cli') { session_start(); } |
|
| 3 | +if(!isset($_SESSION) && php_sapi_name() !== 'cli') |
|
| 4 | +{ |
|
| 5 | +session_start(); } |
|
| 4 | 6 | if(!isset($_SESSION['ip_address']) && isset($_SERVER['REMOTE_ADDR'])) |
| 5 | 7 | { |
| 6 | 8 | $_SESSION['ip_address'] = $_SERVER['REMOTE_ADDR']; |
@@ -156,7 +158,10 @@ discard block |
||
| 156 | 158 | $pos = strpos($sessionData, "|", $offset); |
| 157 | 159 | $len = $pos - $offset; |
| 158 | 160 | $name = substr($sessionData, $offset, $len); |
| 159 | - if($name === false) break; |
|
| 161 | + if($name === false) |
|
| 162 | + { |
|
| 163 | + break; |
|
| 164 | + } |
|
| 160 | 165 | $offset += $len+1; |
| 161 | 166 | $data = @unserialize(substr($sessionData, $offset)); |
| 162 | 167 | $res[$name] = $data; |
@@ -22,7 +22,8 @@ |
||
| 22 | 22 | * @license http://www.opensource.org/licenses/bsd-license New BSD License |
| 23 | 23 | * @link http://www.php.net/manual/en/class.jsonserializable.php |
| 24 | 24 | */ |
| 25 | -interface JsonSerializable { |
|
| 25 | +interface JsonSerializable |
|
| 26 | +{ |
|
| 26 | 27 | /** The jsonSerizlize function as defined by PHP 5.4 and greater */ |
| 27 | 28 | public function jsonSerialize(); |
| 28 | 29 | } |