Merge pull request #472 from laf/issue-laf-119

Added support for api demo account
This commit is contained in:
Paul Gear
2015-02-17 10:46:44 +10:00
2 changed files with 5 additions and 1 deletions

View File

@@ -265,9 +265,12 @@ function del_device()
// Default status to error and change it if we need to.
$status = "error";
$code = 500;
if(empty($hostname))
if(empty($hostname) || $config['api_demo'] == 1)
{
$message = "No hostname has been provided to delete";
if ($config['api_demo'] == 1) {
$message = "This feature isn\'t available in the demo";
}
$output = array("status" => $status, "message" => $message);
}
else