Server Correction

This commit is contained in:
root 2016-05-05 19:16:10 +02:00
parent 105166c160
commit 80460f5447
8 changed files with 14 additions and 15 deletions

View file

@ -1,5 +1,4 @@
<?php
include_once("../core/Plugin_Api.php");
include_once("../core/LibOverride/genTokenOptions.php");
include_once("../core/ErrorManagement.php");
@ -11,7 +10,6 @@ use OpenCloud\Common\Error\UserInputError;
class AppTest{
protected $openstack;
protected $pluginsApi;
protected $postParams;
protected $tokenClass;
protected $tokenPost;
@ -23,7 +21,6 @@ class AppTest{
$this->tokenPost = NULL;
$this->tokenClass = new genTokenOptions($args);
$this->openstack = new OpenStack\OpenStack(['authUrl' => $args["authUrl"]]);
$this->pluginsApi = plugin_api::getInstance();
$this->errorClass = new errorManagement($this);
$this->output = array();

View file

@ -9,11 +9,11 @@
*
*/
include("Image.php");
include("Network.php");
include("Compute.php");
include("NetworkLayer3.php");
include("CoreInterface.php");
require_once("Image.php");
require_once("Network.php");
require_once("Compute.php");
require_once("NetworkLayer3.php");
require_once("CoreInterface.php");
/**
* automating Class of the back-end application

View file

@ -11,7 +11,7 @@
use OpenCloud\Common\Error;
include("CoreInterface.php");
require_once("CoreInterface.php");
/**
* Compute Class of the back-end application
*

View file

@ -9,7 +9,7 @@
*/
use OpenCloud\Common\Error;
include("CoreInterface.php");
require_once("CoreInterface.php");
/**
* Identity Class of the back-end application
*

View file

@ -14,7 +14,7 @@ use OpenCloud\Common\Error\BaseError;
use OpenCloud\Common\Error\NotImplementedError;
use OpenCloud\Common\Error\UserInputError;
include("CoreInterface.php");
require_once("CoreInterface.php");
/**
* Image Class of the back-end application

View file

@ -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);

View file

@ -13,7 +13,7 @@ use OpenCloud\Common\Error\BaseError;
use OpenCloud\Common\Error\NotImplementedError;
use OpenCloud\Common\Error\UserInputError;
include("CoreInterface.php");
require_once("CoreInterface.php");
/**
* Network Class of the back-end application

View file

@ -14,7 +14,7 @@ use OpenCloud\Common\Error\BaseError;
use OpenCloud\Common\Error\NotImplementedError;
use OpenCloud\Common\Error\UserInputError;
include("CoreInterface.php");
require_once("CoreInterface.php");
/**
* networkLayer3 Class of the back-end application