@@ -15,12 +15,12 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function open($savePath, $sessionName) |
| 17 | 17 | { |
| 18 | - $this->dataTable = \Flipside\DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName); |
|
| 19 | - if($this->dataTable) |
|
| 20 | - { |
|
| 21 | - return true; |
|
| 22 | - } |
|
| 23 | - return false; |
|
| 18 | + $this->dataTable = \Flipside\DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName); |
|
| 19 | + if($this->dataTable) |
|
| 20 | + { |
|
| 21 | + return true; |
|
| 22 | + } |
|
| 23 | + return false; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function close() |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $odata = $request->getAttribute('odata', new \Flipside\ODataParams(array())); |
| 109 | 109 | $params = $this->manipulateParameters($request, $odata); |
| 110 | 110 | $areas = $dataTable->read($odata->filter, $odata->select, $odata->top, |
| 111 | - $odata->skip, $odata->orderby, $params); |
|
| 111 | + $odata->skip, $odata->orderby, $params); |
|
| 112 | 112 | if($areas === false) |
| 113 | 113 | { |
| 114 | 114 | $areas = array(); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $odata = $request->getAttribute('odata', new \Flipside\ODataParams(array())); |
| 160 | 160 | $filter = $this->getFilterForPrimaryKey($args['name']); |
| 161 | 161 | $areas = $dataTable->read($filter, $odata->select, $odata->top, |
| 162 | - $odata->skip, $odata->orderby); |
|
| 162 | + $odata->skip, $odata->orderby); |
|
| 163 | 163 | if(empty($areas)) |
| 164 | 164 | { |
| 165 | 165 | return $response->withStatus(404); |
@@ -140,9 +140,9 @@ discard block |
||
| 140 | 140 | $case = true; |
| 141 | 141 | } |
| 142 | 142 | if($case) |
| 143 | - { |
|
| 143 | + { |
|
| 144 | 144 | if(class_exists('MongoRegex')) |
| 145 | - { |
|
| 145 | + { |
|
| 146 | 146 | return array($field=>array('$regex'=>new \MongoRegex('/'.$this->var2.'/i'))); |
| 147 | 147 | } |
| 148 | 148 | else |
@@ -236,15 +236,15 @@ discard block |
||
| 236 | 236 | { |
| 237 | 237 | case '=': |
| 238 | 238 | return array($this->var1=>$this->var2); |
| 239 | - case 'substringof': |
|
| 240 | - if(class_exists('MongoRegex')) |
|
| 241 | - { |
|
| 242 | - return array($this->var1=>array('$regex'=>new \MongoRegex('/'.$this->var2.'/i'))); |
|
| 243 | - } |
|
| 244 | - else |
|
| 245 | - { |
|
| 239 | + case 'substringof': |
|
| 240 | + if(class_exists('MongoRegex')) |
|
| 241 | + { |
|
| 242 | + return array($this->var1=>array('$regex'=>new \MongoRegex('/'.$this->var2.'/i'))); |
|
| 243 | + } |
|
| 244 | + else |
|
| 245 | + { |
|
| 246 | 246 | return array($this->var1=>array('$regex'=>new \MongoDB\BSON\Regex($this->var2, 'i'))); |
| 247 | - } |
|
| 247 | + } |
|
| 248 | 248 | case 'indexof': |
| 249 | 249 | return $this->getMongoIndexOfOperator(); |
| 250 | 250 | default: |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | //The underlying API call gave us back a different content type. Just pass that on... |
| 84 | 84 | return $response; |
| 85 | 85 | } |
| 86 | - $overrides = $request->getAttribute('serializeOverrides'); |
|
| 86 | + $overrides = $request->getAttribute('serializeOverrides'); |
|
| 87 | 87 | if($overrides->has($this->format)) |
| 88 | 88 | { |
| 89 | 89 | return $this->reserializeBody($response, $overrides->get($this->format)); |
@@ -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]; |
@@ -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); |