Server Correction
This commit is contained in:
parent
105166c160
commit
80460f5447
8 changed files with 14 additions and 15 deletions
server/core/LibOverride
|
@ -35,6 +35,8 @@ class genTokenOptions
|
|||
private $backup = [];
|
||||
/** @var GuzzleHttp\Client $httpClient private, contains a default Client to construct some OpenStack library object */
|
||||
private $httpClient;
|
||||
|
||||
private $directory = __DIR__;
|
||||
|
||||
/**
|
||||
* genTokenOptions constructor
|
||||
|
@ -385,7 +387,7 @@ class genTokenOptions
|
|||
*/
|
||||
private function saveBackup($name, $data){
|
||||
$token = $this->serializeToken($data["token"]);
|
||||
$ret = file_put_contents("core/LibOverride/projectTokenData/".$token['saved']["project"]["name"], serialize($token['saved']));
|
||||
$ret = file_put_contents($this->directory."/projectTokenData/".$token['saved']["project"]["name"], serialize($token['saved']));
|
||||
if($ret === FALSE)
|
||||
die("Internal Server Error : File Rights");
|
||||
$this->backup['time'] = $token['time'];
|
||||
|
@ -505,7 +507,7 @@ class genTokenOptions
|
|||
* @return OpenCloud\Common\Auth\Token the token unserialized
|
||||
*/
|
||||
private function unserializeToken($tokenSerialized){
|
||||
$Saved = file_get_contents("core/LibOverride/projectTokenData/".$this->backup["project"]);
|
||||
$Saved = file_get_contents($this->directory."/projectTokenData/".$this->backup["project"]);
|
||||
if($Saved === FALSE)
|
||||
die("Internal Server Error : File Access");
|
||||
$Saved = unserialize($Saved);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue