summaryrefslogtreecommitdiff
path: root/server/core/Image.php
diff options
context:
space:
mode:
Diffstat (limited to 'server/core/Image.php')
-rwxr-xr-xserver/core/Image.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/server/core/Image.php b/server/core/Image.php
index 71e19ce..c595135 100755
--- a/server/core/Image.php
+++ b/server/core/Image.php
@@ -5,7 +5,7 @@
* @version 1.0 Initialisation of this file
* @since 1.0 Core application's file
*
-* @author Yogg 'yogg at epsina . com'
+* @author Evan Pisani 'yogg at epsina . com'
*
* @todo Complete the functions with errors detection and finish the descriptions
*/
@@ -19,7 +19,7 @@ include("CoreInterface.php");
/**
* Image Class of the back-end application
*
-* ADD CLASS DESCRIPTION
+* Management of images
*
*/
class image implements Core{
@@ -76,7 +76,7 @@ class image implements Core{
// Check the image name
if(isset($opt['name'])){
- $imagesList = listImage();
+ $imagesList = $this->listImage();
if(isset($imagesList)){
foreach($imagesList as $image){
if(strcmp($image->name, $opt['name']) == 0){ // if the image name already exists -> error
@@ -84,7 +84,7 @@ class image implements Core{
}
}
}
-
+ $options['name'] = $opt['name'];
}
else{
$this->app->setOutput("Error", "Missing parameter 'name' for the new image");
@@ -118,7 +118,7 @@ class image implements Core{
if(isset($opt['protected'])){ // boolean
$options['protected'] = $opt['protected'];
}
- if(isset($opt['properties'])){ // type dict ?
+ if(isset($opt['properties'])){ // type dict
$options['properties'] = $opt['properties'];
}
@@ -187,7 +187,6 @@ class image implements Core{
$this->app->setOutput("Error", "Image doesn't exist");
}
else{
- echo 'toto';
$this->app->setOutput("Images", $image);
}
}catch(BadResponseError $e){
@@ -326,6 +325,7 @@ class image implements Core{
if($image == null){ // if the image don't exists -> error
$this->app->setOutput("Error", "Image doesn't exist");
}
+
$image->reactivate();
}catch(BadResponseError $e){
$this->app->getErrorInstance()->BadResponseHandler($e);