Commit f1f56125 authored by Guillaume Rousse's avatar Guillaume Rousse

let CLI caller handle reporting

parent 6b42af3f
...@@ -201,15 +201,12 @@ function parseMetadata($metadataFile, $defaultLanguage){ ...@@ -201,15 +201,12 @@ function parseMetadata($metadataFile, $defaultLanguage){
} }
} }
// Output result // log result when called by the web application
$infoMsg = "Successfully parsed metadata file ".$metadataFile. " "; if (!isRunViaCLI()){
$infoMsg .= "(".count($metadataIDProviders)." IdPs, "; $infoMsg = "Successfully parsed metadata file ".$metadataFile. " ";
$infoMsg .= " ".count($metadataSProviders)." SPs, "; $infoMsg .= "(".count($metadataIDProviders)." IdPs, ";
$infoMsg .= ($hiddenIdPs > 0) ? $hiddenIdPs." IdPs are hidden)" : "no hidden IdPs)" ; $infoMsg .= " ".count($metadataSProviders)." SPs, ";
$infoMsg .= ($hiddenIdPs > 0) ? $hiddenIdPs." IdPs are hidden)" : "no hidden IdPs)" ;
if (isRunViaCLI() && isset($verbose) && $verbose){
echo $infoMsg."\n";
} else {
logInfo($infoMsg); logInfo($infoMsg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment