@@ -15,12 +15,12 @@  | 
                                                    ||
| 15 | 15 | |
| 16 | 16 | public function open($savePath, $sessionName)  | 
                                                        
| 17 | 17 |      { | 
                                                        
| 18 | - $this->dataTable = \DataSetFactory::getDataTableByNames($this->dataSetName, $this->dataTableName);  | 
                                                        |
| 19 | - if($this->dataTable)  | 
                                                        |
| 20 | -       { | 
                                                        |
| 21 | - return true;  | 
                                                        |
| 22 | - }  | 
                                                        |
| 23 | - return false;  | 
                                                        |
| 18 | + $this->dataTable = \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()  | 
                                                        
@@ -62,7 +62,7 @@  | 
                                                    ||
| 62 | 62 | |
| 63 | 63 | public function gc($maxlifetime)  | 
                                                        
| 64 | 64 |      { | 
                                                        
| 65 | -        $date = date("Y-m-d H:i:s", time()-$maxlifetime); | 
                                                        |
| 65 | +        $date = date("Y-m-d H:i:s", time() - $maxlifetime); | 
                                                        |
| 66 | 66 |          $filter = new \Data\Filter("sessionLastAccess lt $date"); | 
                                                        
| 67 | 67 | return $this->dataTable->delete($filter);  | 
                                                        
| 68 | 68 | }  | 
                                                        
@@ -248,7 +248,7 @@  | 
                                                    ||
| 248 | 248 | if($stmt === false)  | 
                                                        
| 249 | 249 |          { | 
                                                        
| 250 | 250 |              if (php_sapi_name() !== "cli") { | 
                                                        
| 251 | -              error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); | 
                                                        |
| 251 | +                error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); | 
                                                        |
| 252 | 252 | }  | 
                                                        
| 253 | 253 | return false;  | 
                                                        
| 254 | 254 | }  | 
                                                        
@@ -247,7 +247,7 @@ discard block  | 
                                                    ||
| 247 | 247 | $stmt = $this->pdo->query($sql);  | 
                                                        
| 248 | 248 | if($stmt === false)  | 
                                                        
| 249 | 249 |          { | 
                                                        
| 250 | -            if (php_sapi_name() !== "cli") { | 
                                                        |
| 250 | +            if(php_sapi_name() !== "cli") { | 
                                                        |
| 251 | 251 |                error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); | 
                                                        
| 252 | 252 | }  | 
                                                        
| 253 | 253 | return false;  | 
                                                        
@@ -296,7 +296,7 @@ discard block  | 
                                                    ||
| 296 | 296 | $sql = "INSERT INTO $tablename ($cols) VALUES ($set);";  | 
                                                        
| 297 | 297 | if($this->pdo->exec($sql) === false)  | 
                                                        
| 298 | 298 |          { | 
                                                        
| 299 | -            if (php_sapi_name() !== "cli") { | 
                                                        |
| 299 | +            if(php_sapi_name() !== "cli") { | 
                                                        |
| 300 | 300 |                  error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); | 
                                                        
| 301 | 301 | }  | 
                                                        
| 302 | 302 | return false;  | 
                                                        
@@ -247,7 +247,8 @@ discard block  | 
                                                    ||
| 247 | 247 | $stmt = $this->pdo->query($sql);  | 
                                                        
| 248 | 248 | if($stmt === false)  | 
                                                        
| 249 | 249 |          { | 
                                                        
| 250 | -            if (php_sapi_name() !== "cli") { | 
                                                        |
| 250 | + if (php_sapi_name() !== "cli")  | 
                                                        |
| 251 | +            { | 
                                                        |
| 251 | 252 |                error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); | 
                                                        
| 252 | 253 | }  | 
                                                        
| 253 | 254 | return false;  | 
                                                        
@@ -296,7 +297,8 @@ discard block  | 
                                                    ||
| 296 | 297 | $sql = "INSERT INTO $tablename ($cols) VALUES ($set);";  | 
                                                        
| 297 | 298 | if($this->pdo->exec($sql) === false)  | 
                                                        
| 298 | 299 |          { | 
                                                        
| 299 | -            if (php_sapi_name() !== "cli") { | 
                                                        |
| 300 | + if (php_sapi_name() !== "cli")  | 
                                                        |
| 301 | +            { | 
                                                        |
| 300 | 302 |                  error_log('DB query failed. '.print_r($this->pdo->errorInfo(), true)); | 
                                                        
| 301 | 303 | }  | 
                                                        
| 302 | 304 | return false;  | 
                                                        
@@ -311,7 +311,7 @@  | 
                                                    ||
| 311 | 311 | *  | 
                                                        
| 312 | 312 | * @param stdClass $data The user's new data  | 
                                                        
| 313 | 313 | *  | 
                                                        
| 314 | - * @return boolean true if the user's data was changed, false otherwise  | 
                                                        |
| 314 | + * @return boolean|null true if the user's data was changed, false otherwise  | 
                                                        |
| 315 | 315 | */  | 
                                                        
| 316 | 316 | public function editUser($data)  | 
                                                        
| 317 | 317 |      { | 
                                                        
@@ -35,20 +35,20 @@  | 
                                                    ||
| 35 | 35 |      { | 
                                                        
| 36 | 36 | if(isset($this->labeleduri))  | 
                                                        
| 37 | 37 |          { | 
                                                        
| 38 | - //Have multiple emails  | 
                                                        |
| 39 | - if($propName === 'mail')  | 
                                                        |
| 40 | -             { | 
                                                        |
| 41 | -                 return $this->getFieldSingleValue('labeleduri'); | 
                                                        |
| 42 | - }  | 
                                                        |
| 43 | - if($propName === 'allMail')  | 
                                                        |
| 44 | -             { | 
                                                        |
| 45 | -                 $tmp = $this->getField('mail'); | 
                                                        |
| 46 | - if(isset($tmp['count']))  | 
                                                        |
| 47 | -                 { | 
                                                        |
| 48 | - unset($tmp['count']);  | 
                                                        |
| 49 | - }  | 
                                                        |
| 50 | - return $tmp;  | 
                                                        |
| 51 | - }  | 
                                                        |
| 38 | + //Have multiple emails  | 
                                                        |
| 39 | + if($propName === 'mail')  | 
                                                        |
| 40 | +                { | 
                                                        |
| 41 | +                    return $this->getFieldSingleValue('labeleduri'); | 
                                                        |
| 42 | + }  | 
                                                        |
| 43 | + if($propName === 'allMail')  | 
                                                        |
| 44 | +                { | 
                                                        |
| 45 | +                    $tmp = $this->getField('mail'); | 
                                                        |
| 46 | + if(isset($tmp['count']))  | 
                                                        |
| 47 | +                    { | 
                                                        |
| 48 | + unset($tmp['count']);  | 
                                                        |
| 49 | + }  | 
                                                        |
| 50 | + return $tmp;  | 
                                                        |
| 51 | + }  | 
                                                        |
| 52 | 52 | }  | 
                                                        
| 53 | 53 | $tmp = $this->getValueWithDefault($propName);  | 
                                                        
| 54 | 54 | if($tmp !== false)  | 
                                                        
@@ -49,7 +49,7 @@ discard block  | 
                                                    ||
| 49 | 49 |          $this->addLink('Home', '..'); | 
                                                        
| 50 | 50 | if($this->user === false || $this->user === null)  | 
                                                        
| 51 | 51 |          { | 
                                                        
| 52 | - $this->content['body'] = '  | 
                                                        |
| 52 | + $this->content['body'] = '  | 
                                                        |
| 53 | 53 | <div id="content">  | 
                                                        
| 54 | 54 | <div class="row">  | 
                                                        
| 55 | 55 | <div class="col-lg-12">  | 
                                                        
@@ -61,7 +61,7 @@ discard block  | 
                                                    ||
| 61 | 61 | }  | 
                                                        
| 62 | 62 | else if($this->isAdmin() === false)  | 
                                                        
| 63 | 63 |          { | 
                                                        
| 64 | - $this->content['body'] = '  | 
                                                        |
| 64 | + $this->content['body'] = '  | 
                                                        |
| 65 | 65 | <div id="content">  | 
                                                        
| 66 | 66 | <div class="row">  | 
                                                        
| 67 | 67 | <div class="col-lg-12">  | 
                                                        
@@ -70,8 +70,8 @@ discard block  | 
                                                    ||
| 70 | 70 | </div>  | 
                                                        
| 71 | 71 | </div>  | 
                                                        
| 72 | 72 | ';  | 
                                                        
| 73 | - $this->content['header'] = array();  | 
                                                        |
| 74 | - $this->content['cards'] = array();  | 
                                                        |
| 73 | + $this->content['header'] = array();  | 
                                                        |
| 74 | + $this->content['cards'] = array();  | 
                                                        |
| 75 | 75 | }  | 
                                                        
| 76 | 76 | return parent::getContent();  | 
                                                        
| 77 | 77 | }  |