diff --git a/core/class/class_resource.php b/core/class/class_resource.php index 32573c5801b18a375edb31dd41937467b6a61456..3597d53015b2d28ea51e93387d63f41711ee50c3 100644 --- a/core/class/class_resource.php +++ b/core/class/class_resource.php @@ -184,50 +184,6 @@ } } - /** - * Gets the resource identifier - * - * @return integer Resource identifier (res_id) - */ - public function get_id() - { - return $this->res_id; - } - /** - * Gets the resource filename - * - * @return integer Resource name (filemane) - */ - public function get_filename($id,$coll_id) - { - require_once("core/class/class_security.php"); - $sec = new security(); - $resource_table = $sec->retrieve_table_from_coll($coll_id); - if ($resource_table == '') - echo "error with coll_id"; - $db = new Database(); - $stmt = $db->query("select filename from ".$resource_table." where res_id=?", array($id)); - $result = $stmt->fetchObject(); - return $result->filename; - } - - /** - * Gets the resource path - * - * @return integer Resource path (path) - */ - public function get_path($id,$coll_id) - { - require_once("core/class/class_security.php"); - $sec = new security(); - $resource_table = $sec->retrieve_table_from_coll($coll_id); - if ($resource_table == '') - echo "error with coll_id"; - $db = new Database(); - $stmt = $db->query("select path from ".$resource_table." where res_id=?", array($id)); - $result = $stmt->fetchObject(); - return str_replace('#', DIRECTORY_SEPARATOR, $result->path); - } /** * Gets the error message of the resource object diff --git a/rest/index.php b/rest/index.php index a53d67642de6913d1194be9da24ef6e387efdc31..c17dbbcb4d2232ae50efbdd199153e3630de2bb1 100644 --- a/rest/index.php +++ b/rest/index.php @@ -124,6 +124,7 @@ $app->put('/{collId}/{resId}/unsign', \Visa\Controllers\VisaController::class . //resource $app->post('/res', \Core\Controllers\ResController::class . ':create'); - +//extresource +$app->post('/resExt', \Core\Controllers\ResExtController::class . ':create'); $app->run();