Error correction

This commit is contained in:
root 2016-04-27 15:51:38 +02:00
parent 1d42345e07
commit c9202d9113
5 changed files with 10 additions and 1 deletions
server/core/LibOverride

View file

@ -385,7 +385,9 @@ class genTokenOptions
*/
private function saveBackup($name, $data){
$token = $this->serializeToken($data["token"]);
file_put_contents("core/LibOverride/projectTokenData/".$token['saved']["project"]["name"], serialize($token['saved']));
$ret = file_put_contents("core/LibOverride/projectTokenData/".$token['saved']["project"]["name"], serialize($token['saved']));
if($ret === FALSE)
die("Internal Server Error : File Rights");
$this->backup['time'] = $token['time'];
$this->backup["roles"] = $token["roles"];
$this->backup["project"] = $token['saved']["project"]["name"];
@ -504,6 +506,8 @@ class genTokenOptions
*/
private function unserializeToken($tokenSerialized){
$Saved = file_get_contents("core/LibOverride/projectTokenData/".$this->backup["project"]);
if($Saved === FALSE)
die("Internal Server Error : File Access");
$Saved = unserialize($Saved);
$api = new Api();