diff --git a/.gitignore b/.gitignore index 68903a28..592e08b5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ openml_OS/third_party/OpenML/Java/old-evaluate.jar docs/site/ *.icloud *.DS_store +openml_OS/vendor/ +openapi/vendor/ diff --git a/openml_OS/models/api/v1/Api_data.php b/openml_OS/models/api/v1/Api_data.php index f4f24f3f..294d1300 100644 --- a/openml_OS/models/api/v1/Api_data.php +++ b/openml_OS/models/api/v1/Api_data.php @@ -581,6 +581,7 @@ private function data_fork() { $latest_version = $this->Dataset-> getWhereSingle('`name` = "' . $dataset->name . '"', 'CAST(`version` AS DECIMAL) DESC'); $dataset->version = $latest_version->version + 1; unset($dataset->did); + $new_data_id = $this->Dataset->insert($dataset); if (!$new_data_id) { $this->returnError(1072, $this->version); @@ -934,7 +935,6 @@ private function data_reset($data_id) { * ), *) */ - private function data_add_topic($id, $topic) { # Data id and topic are required if ($id == false || $topic == false) { @@ -1281,6 +1281,7 @@ private function data_upload() { $this->returnError(134, $this->version); return; } + $desc['did'] = $id; $desc_id = $this->Dataset_description->insert($desc); if (!$desc_id) { @@ -1735,7 +1736,7 @@ private function data_features_upload() { } else { $nominal_values = false; } - + //actual insert of the feature if (array_key_exists('ontology', $feature)) { $ontologies = $feature['ontology']; diff --git a/openml_OS/views/pages/api_new/v1/xml/pre.php b/openml_OS/views/pages/api_new/v1/xml/pre.php index 98846dad..75b4a8f8 100644 --- a/openml_OS/views/pages/api_new/v1/xml/pre.php +++ b/openml_OS/views/pages/api_new/v1/xml/pre.php @@ -529,7 +529,6 @@ $this->apiErrors[1071] = 'Unknown dataset'; $this->apiErrors[1072] = 'Failed to insert record in database'; - //openml.data.topic $this->apiErrors[1080] = 'Please provide a dataset id and a topic.'; $this->apiErrors[1081] = 'Unknown dataset.'; @@ -551,5 +550,4 @@ $this->apiErrors[1104] = 'Failure to write to the database'; $this->apiErrors[1105] = 'Feature description too long'; $this->apiErrors[1106] = 'Feature description meant as ontology, but is not a valid URL'; - ?>