function __remove_cloud_image($image_id, $noop) { $error = ''; $image = new image(); $image->get_instance_by_id($image_id); if (strlen($image->name)) { $authblocker = new authblocker(); $authblocker->get_instance_by_image_id($image->id); if ($authblocker->image_name == $image->name) { if ($noop) { $authblocker->remove($authblocker->id); } else { // error $error = "removing authblocker: " . $authblocker->id . "<br>"; } } $this->cloudimage->get_instance_by_image_id($image_id); if ($noop) { $this->cloudstorage->remove($this->cloudimage->id, $this->timeout); $image->remove($image->id); } } return $error; }