Permalink
Browse files

[API]update the create and edit repository for the new JSON structure

  • Loading branch information...
1 parent 538c46b commit b3364b0fbdea26efd1d755b75e79c48745342d03 @isma91 isma91 committed Sep 7, 2016
Showing with 8 additions and 8 deletions.
  1. +8 −8 core/src/plugins/access.ajxp_conf/src/RepositoriesManager.php
@@ -271,16 +271,16 @@ public function repositoriesActions(ServerRequestInterface $requestInterface, Re
$metaSourceOptions[$metaID] = $defaultParams;
}
}
- if(isSet($jsonDataCreateWorkspace["features"]["META_SOURCES"])) {
+ if(isSet($jsonDataCreateWorkspace["features"])) {
foreach($arrayDefaultMetasources as $defaultPluginName) {
- foreach($jsonDataCreateWorkspace["features"]["META_SOURCES"] as $pluginName => $arrayPluginValue) {
+ foreach($jsonDataCreateWorkspace["features"] as $pluginName => $arrayPluginValue) {
if ($defaultPluginName === $pluginName) {
$arrayPluginToOverWrite[$pluginName] = $arrayPluginValue;
- unset($jsonDataCreateWorkspace["features"]["META_SOURCES"][$pluginName]);
+ unset($jsonDataCreateWorkspace["features"][$pluginName]);
}
}
}
- $arrayPluginToAdd = $jsonDataCreateWorkspace["features"]["META_SOURCES"];
+ $arrayPluginToAdd = $jsonDataCreateWorkspace["features"];
foreach($arrayPluginToOverWrite as $pluginName => $arrayPlugin) {
if(!empty($arrayPlugin)) {
foreach($arrayPlugin as $name => $value) {
@@ -348,16 +348,16 @@ public function repositoriesActions(ServerRequestInterface $requestInterface, Re
$arrayPluginToOverWrite = array();
$arrayPluginToAdd = array();
$arrayWorkspaceMetasources = $repo->getSafeOption("META_SOURCES");
- if(isSet($jsonDataEditWorkspace["features"]["META_SOURCES"])) {
+ if(isSet($jsonDataEditWorkspace["features"])) {
foreach($arrayWorkspaceMetasources as $metaSourcePluginName => $metaSourcePluginArray) {
- foreach($jsonDataEditWorkspace["features"]["META_SOURCES"] as $pluginName => $arrayPluginValue) {
+ foreach($jsonDataEditWorkspace["features"] as $pluginName => $arrayPluginValue) {
if ($metaSourcePluginName === $pluginName) {
$arrayPluginToOverWrite[$pluginName] = $arrayPluginValue;
- unset($jsonDataEditWorkspace["features"]["META_SOURCES"][$pluginName]);
+ unset($jsonDataEditWorkspace["features"][$pluginName]);
}
}
}
- $arrayPluginToAdd = $jsonDataEditWorkspace["features"]["META_SOURCES"];
+ $arrayPluginToAdd = $jsonDataEditWorkspace["features"];
foreach($arrayPluginToOverWrite as $pluginName => $arrayPlugin) {
if(!empty($arrayPlugin)) {
foreach($arrayPlugin as $name => $value) {

0 comments on commit b3364b0

Please sign in to comment.