Skip to content
Snippets Groups Projects
Commit 416234ba authored by Tim van Dijen's avatar Tim van Dijen
Browse files
parent e42fc7d3
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
<?php
$baseDir = dirname(dirname(__FILE__));
require_once $baseDir.DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . '_autoload.php';
require_once $baseDir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . '_autoload.php';
require_once \SimpleSAML\Utils\Config::getConfigDir() . DIRECTORY_SEPARATOR . 'config.php';
# Iterate through configured metadata sources and ensure
......
......@@ -8,7 +8,7 @@ $baseDir = dirname(dirname(__FILE__));
require_once $baseDir . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . '_autoload.php';
require_once \SimpleSAML\Utils\Config::getConfigDir() . DIRECTORY_SEPARATOR . 'config.php';
echo "Initializing Metadata Database...".PHP_EOL;
echo "Initializing Metadata Database..." . PHP_EOL;
# Iterate through configured metadata sources and ensure
# that a PDO source exists.
......
......@@ -21,7 +21,7 @@ if (!class_exists('Memcache') && !class_exists('Memcached')) {
$baseDir = dirname(dirname(__FILE__));
// Add library autoloader
require_once($baseDir.'/lib/_autoload.php');
require_once($baseDir . '/lib/_autoload.php');
// Initialize the configuration
$configdir = SimpleSAML\Utils\Config::getConfigDir();
......@@ -52,7 +52,7 @@ foreach ($stats as $group) {
echo "Total number of keys: " . count($keys) . "\n";
$keys = array_unique($keys);
echo "Total number of unique keys: ".count($keys) . "\n";
echo "Total number of unique keys: " . count($keys) . "\n";
echo "Starting synchronization.\n" ;
......@@ -150,7 +150,7 @@ function getServerKeys($server)
}
}
if ($resultSize > 1900000 || count($keys) >= 1000000) {
echo "WARNING: Slab ".$slab." on server " . $host . ":" . $port .
echo "WARNING: Slab " . $slab . " on server " . $host . ":" . $port .
" may have contained more keys than we were told about.\n";
$GLOBALS['warnBigSlab'] += 1;
}
......
......@@ -38,11 +38,11 @@ unset($languages['no']);
// build the list of attributes with their corresponding aliases
foreach ($names as $name => $urn) {
$lower = str_replace([':', '-'], '_', strtolower($name));
if (!array_key_exists('attribute_' . $lower, $defs)) {
$defs['attribute_'.$lower] = [];
if (!array_key_exists('attribute_' . $lower, $defs)) {
$defs['attribute_' . $lower] = [];
}
if (!array_key_exists('attribute_' . $lower, $trans)) {
$trans['attribute_'.$lower] = [];
$trans['attribute_' . $lower] = [];
}
if (array_key_exists('no', $trans['attribute_' . $lower])) {
// fix the locale code
......@@ -87,8 +87,9 @@ foreach (array_keys($languages) as $language) {
continue;
}
$translation = new Gettext\Translation('', $name);
if (array_key_exists($language, $attribute['translations']) &&
!is_null($attribute['translations'][$language])
if (
array_key_exists($language, $attribute['translations'])
&& !is_null($attribute['translations'][$language])
) {
$t = $strings->find($translation);
if ($t) {
......
......@@ -29,6 +29,7 @@
<exclude-pattern>modules/saml/lib/IdP/SAML1.php</exclude-pattern>
<exclude-pattern>modules/saml/www/sp/saml1-acs.php</exclude-pattern>
<exclude-pattern>tests/lib/SimpleSAML/Auth/TimeLimitedTokenTest.php</exclude-pattern>
<exclude-pattern>www/shib13</exclude-pattern>
<!-- Exclude old PHP templates; they are removed in SSP 2.0 -->
<exclude-pattern>modules/*/templates/*.tpl.php</exclude-pattern>
......
......@@ -147,7 +147,9 @@ try {
);
if (!$idpmeta->hasValue('OrganizationURL')) {
throw new \SimpleSAML\Error\Exception('If OrganizationName is set, OrganizationURL must also be set.');
throw new \SimpleSAML\Error\Exception(
'If OrganizationName is set, OrganizationURL must also be set.'
);
}
$metaArray['OrganizationURL'] = $idpmeta->getLocalizedString('OrganizationURL');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment