diff --git a/bin/importPdoMetadata.php b/bin/importPdoMetadata.php index 74663784635ee187e5f04f498e8ca85805fc7a2e..d09dd708a9c166d98985ec1800ee66ba49afc5da 100755 --- a/bin/importPdoMetadata.php +++ b/bin/importPdoMetadata.php @@ -8,14 +8,16 @@ require_once $baseDir . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . ' # that a PDO source exists. foreach ($config['metadata.sources'] as $s) { # If pdo is configured, create the new handler and add in the metadata sets. - if ("pdo" === $s['type']) { + if ($s['type'] === "pdo") { $mdshp = new SimpleSAML_Metadata_MetaDataStorageHandlerPdo($s); $mdshp->initDatabase(); + foreach (glob("metadata/*.php") as $filename) { $metadata = array(); require_once $filename; $set = basename($filename, ".php"); echo "importing set '$set'..." . PHP_EOL; + foreach ($metadata as $k => $v) { echo "\t$k" . PHP_EOL; $mdshp->addEntry($k, $set, $v); diff --git a/config-templates/config.php b/config-templates/config.php index c5433ce4d6e2abbbd5b09d8463b6645722de5f2d..6f2a4f885d03b7ffdc75c17707076afd8dfb7388 100644 --- a/config-templates/config.php +++ b/config-templates/config.php @@ -232,7 +232,7 @@ $config = array( /* * Database slave configuration is optional as well. If you are only * running a single database server, leave this blank. If you have - * a master/slave conifguration, you can define as many slave servers + * a master/slave configuration, you can define as many slave servers * as you want here. Slaves will be picked at random to be queried from. * * Configuration options in the slave array are exactly the same as the