Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix #701
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Nov 12, 2014
1 parent 0668c98 commit e698287
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -1440,6 +1440,8 @@ public function switchAction($action, $httpVars, $fileVars)
uksort($repoOptions, array($this,"metaSourceOrderingFunction"));
$repo->addOption("META_SOURCES", $repoOptions);
ConfService::replaceRepository($repId, $repo);
}else{
throw new Exception("Cannot find meta source ".$metaSourceId);
}
AJXP_XMLWriter::header();
AJXP_XMLWriter::sendMessage($mess["ajxp_conf.57"],null);
Expand Down Expand Up @@ -1498,7 +1500,12 @@ public function switchAction($action, $httpVars, $fileVars)
}
if (isSet($httpVars["repository_id"])) {
$repId = $httpVars["repository_id"];
$res = ConfService::deleteRepository($repId);
$repo = ConfService::getRepositoryById($repId);
if(!is_object($repo)){
$res = -1;
}else{
$res = ConfService::deleteRepository($repId);
}
AJXP_XMLWriter::header();
if ($res == -1) {
AJXP_XMLWriter::sendMessage(null, $mess["ajxp_conf.51"]);
Expand Down

0 comments on commit e698287

Please sign in to comment.