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

Commit

Permalink
Flatten repository-scope props differently, makes it easier to search
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jun 12, 2014
1 parent 4a1fefb commit f780220
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions core/src/core/classes/class.AJXP_XMLWriter.php
Expand Up @@ -628,7 +628,6 @@ public static function writeRepositoriesData($loggedUser)
$descTag = '<description>'.AJXP_Utils::xmlEntities($description, true).'</description>';
}
$roleString="";
$paramsString="";
if($loggedUser != null){
$merged = $loggedUser->mergedRole;
$params = array();
Expand All @@ -637,14 +636,12 @@ public static function writeRepositoriesData($loggedUser)
if($value !== null){
if($value === true || $value === false) $value = ($value?"true":"false");
$params[] = '<repository_plugin_param plugin_id="'.$exposed_prop["PLUGIN_ID"].'" name="'.$exposed_prop["NAME"].'" value="'.AJXP_Utils::xmlEntities($value).'"/>';
$roleString .= str_replace(".", "_",$exposed_prop["PLUGIN_ID"])."_".$exposed_prop["NAME"].'="'.AJXP_Utils::xmlEntities($value).'" ';
}
}
if(count($params)){
$paramsString = '<plugins_params>'.implode("", $params).'</plugins_params>';
}
$roleString.='acl="'.$merged->getAcl($repoId).'"';
}
$xmlString = "<repo access_type=\"".$repoObject->accessType."\" id=\"".$repoId."\"$rightString $streamString $slugString $isSharedString $roleString><label>".SystemTextEncoding::toUTF8(AJXP_Utils::xmlEntities($repoObject->getDisplay()))."</label>".$descTag.$paramsString.$repoObject->getClientSettings()."</repo>";
$xmlString = "<repo access_type=\"".$repoObject->accessType."\" id=\"".$repoId."\"$rightString $streamString $slugString $isSharedString $roleString><label>".SystemTextEncoding::toUTF8(AJXP_Utils::xmlEntities($repoObject->getDisplay()))."</label>".$descTag.$repoObject->getClientSettings()."</repo>";
if ($toLast) {
$lastString = $xmlString;
} else {
Expand Down

0 comments on commit f780220

Please sign in to comment.