diff --git a/bin/build-release.sh b/bin/build-release.sh index f00066bcf21b40cc8ded382abd16807cb7f8652a..e486a4c19de967ea0e2feae8a7c65d1f21ce60d6 100755 --- a/bin/build-release.sh +++ b/bin/build-release.sh @@ -57,6 +57,7 @@ php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp- php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-cdc php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-consent php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-consentadmin +php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-discopower php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-ldap php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-memcookie php "$TARGET/composer.phar" require --update-no-dev simplesamlphp/simplesamlphp-module-memcachemonitor diff --git a/composer.json b/composer.json index 06386d2de37f8ba864b237b71de21e38b97005c3..29cc06ca885e6c8d2120001e4aa70e2975b0d9c5 100644 --- a/composer.json +++ b/composer.json @@ -57,6 +57,7 @@ "simplesamlphp/simplesamlphp-module-cdc": "^1.0", "simplesamlphp/simplesamlphp-module-consent": "^1.0", "simplesamlphp/simplesamlphp-module-consentadmin": "^1.0", + "simplesamlphp/simplesamlphp-module-discopower": "^1.0", "simplesamlphp/simplesamlphp-module-ldap": "^1.0", "simplesamlphp/simplesamlphp-module-memcookie": "^1.2", "simplesamlphp/simplesamlphp-module-memcachemonitor": "^1.0", diff --git a/modules/discopower/config-templates/module_discopower.php b/modules/discopower/config-templates/module_discopower.php deleted file mode 100644 index 498cadad83962445faa726abed4e8da675561189..0000000000000000000000000000000000000000 --- a/modules/discopower/config-templates/module_discopower.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/* - * Configuration for the DiscoPower module. - */ - -$config = [ - // Which tab should be set as default. 0 is the first tab - 'defaulttab' => 0, - - /* - * List a set of tags (Tabs) that should be listed in a specific order. - * All other available tabs will be listed after the ones specified below. - */ - 'taborder' => ['norway'], - - /* - * the 'tab' parameter allows you to limit the tabs to a specific list. (excluding unlisted tags) - * - * 'tabs' => array('norway', 'finland'), - */ - - /* - * If you want to change the scoring algorithm to a more google suggest like one - * (filters by start of words) uncomment this ... - * - * 'score' => 'suggest', - */ - - /* - * The domain to use for common domain cookie support. - * This must be a parent domain of the domain hosting the discovery service. - * - * If this is NULL (the default), common domain cookie support will be disabled. - */ - 'cdc.domain' => null, - - /* - * The lifetime of the common domain cookie, in seconds. - * - * If this is NULL (the default), the common domain cookie will be deleted when the browser closes. - * - * Example: 'cdc.lifetime' => 180*24*60*60, // 180 days - */ - 'cdc.lifetime' => null, -]; diff --git a/modules/discopower/default-disable b/modules/discopower/default-disable deleted file mode 100644 index fa0bd82e2df7bd79d57593d35bc53c1f9d3ef71f..0000000000000000000000000000000000000000 --- a/modules/discopower/default-disable +++ /dev/null @@ -1,3 +0,0 @@ -This file indicates that the default state of this module -is disabled. To enable, create a file named enable in the -same directory as this file. diff --git a/modules/discopower/dictionaries/tabs.definition.json b/modules/discopower/dictionaries/tabs.definition.json deleted file mode 100644 index 323a7165c87796ababfc6a6b33b34be6142c504d..0000000000000000000000000000000000000000 --- a/modules/discopower/dictionaries/tabs.definition.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "norway": { - "en": "Norway" - }, - "kalmar": { - "en": "Kalmar" - }, - "finland": { - "en": "Finland" - }, - "sweden": { - "en": "Sweden" - }, - "iceland": { - "en": "Iceland" - }, - "denmark": { - "en": "Denmark" - }, - "switzerland": { - "en": "Switzerland" - }, - "greece": { - "en": "Greece" - }, - "southafrica": { - "en": "South Africa" - }, - "edugain": { - "en": "Europe (eduGAIN)" - }, - "misc": { - "en": "Miscellaneous" - }, - "incommon": { - "en": "InCommon" - }, - "ukacessfederation": { - "en": "UK Access Federation" - }, - "incremental_search": { - "en": "Incremental search..." - } -} diff --git a/modules/discopower/dictionaries/tabs.translation.json b/modules/discopower/dictionaries/tabs.translation.json deleted file mode 100644 index 8668700a0029851d8c14cf8b3ca14e2cabf6369e..0000000000000000000000000000000000000000 --- a/modules/discopower/dictionaries/tabs.translation.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "norway": { - "es": "Noruega", - "ru": "\u041d\u043e\u0440\u0432\u0435\u0433\u0438\u044f", - "zh-tw": "\u632a\u5a01", - "nl": "Noorwegen", - "gl": "Noruega", - "da": "Norge", - "af": "Noorwe\u00eb", - "el": "\u039d\u03bf\u03c1\u03b2\u03b7\u03b3\u03af\u03b1", - "xh": "Norowe", - "zu": "ENorway", - "ca": "Noruega" - }, - "kalmar": { - "es": "Kalmar", - "ru": "\u041a\u0430\u043b\u044c\u043c\u0430\u0440", - "zh-tw": "\u5361\u723e\u99ac", - "nl": "Kalmar", - "da": "Kalmar", - "af": "Kalmar", - "el": "Kalmar", - "ca": "Kalmar" - }, - "finland": { - "es": "Finlandia", - "ru": "\u0424\u0438\u043d\u043b\u044f\u043d\u0434\u0438\u044f", - "zh-tw": "\u82ac\u862d", - "nl": "Finland", - "gl": "Finlandia", - "da": "Finland", - "af": "Finland", - "el": "\u03a6\u03b9\u03bd\u03bb\u03b1\u03bd\u03b4\u03af\u03b1", - "xh": "Finlend", - "ca": "FinlĂ ndia" - }, - "sweden": { - "es": "Suecia", - "ru": "\u0428\u0432\u0435\u0446\u0438\u044f", - "zh-tw": "\u745e\u5178", - "nl": "Zweden", - "gl": "Suecia", - "da": "Sverige", - "af": "Swede", - "el": "\u03a3\u03bf\u03c5\u03b7\u03b4\u03af\u03b1", - "xh": "Swiden", - "zu": "Sweden", - "ca": "Suècia" - }, - "iceland": { - "es": "Islandia", - "ru": "\u0418\u0441\u043b\u0430\u043d\u0434\u0438\u044f", - "zh-tw": "\u51b0\u5cf6", - "nl": "IJsland", - "gl": "Islandia", - "da": "Island", - "af": "Ysland", - "el": "\u0399\u03c3\u03bb\u03b1\u03bd\u03b4\u03af\u03b1", - "xh": "Ayisilend", - "zu": "I-Iceland", - "ca": "IslĂ ndia" - }, - "denmark": { - "es": "Dinamarca", - "ru": "\u0414\u0430\u043d\u0438\u044f", - "zh-tw": "\u4e39\u9ea5", - "nl": "Denemarken", - "gl": "Dinamarca", - "da": "Danmark", - "af": "Denmark", - "el": "\u0394\u03b1\u03bd\u03af\u03b1", - "xh": "Dominikha", - "ca": "Dinamarca" - }, - "switzerland": { - "es": "Suiza", - "ru": "\u0428\u0432\u0435\u0439\u0446\u0430\u0440\u0438\u044f", - "zh-tw": "\u745e\u58eb", - "nl": "Zwitserland", - "gl": "Suiza", - "da": "Schweiz", - "af": "Switserland", - "el": "\u0395\u03bb\u03b2\u03b5\u03c4\u03af\u03b1", - "xh": "Swizalend", - "zu": "ESwitzerland", - "ca": "SuĂŻssa" - }, - "greece": { - "es": "Grecia", - "nl": "Griekenland", - "gl": "Grecia", - "ru": "\u0413\u0440\u0435\u0446\u0438\u044f", - "da": "Gr\u00e6kenland", - "af": "Griekeland", - "el": "\u0395\u03bb\u03bb\u03ac\u03b4\u03b1", - "xh": "Grisi", - "ca": "Grècia" - }, - "southafrica": { - "es": "Sud\u00e1frica", - "ru": "\u042e\u0436\u043d\u0430\u044f \u0410\u0444\u0440\u0438\u043a\u0430", - "zh-tw": "\u5357\u975e", - "nl": "Zuid-Afrika", - "gl": "Sur\u00e1frica", - "da": "Sydafrika", - "af": "Suid-Afrika", - "el": "\u039d\u03cc\u03c4\u03b9\u03b1 \u0391\u03c6\u03c1\u03b9\u03ba\u03ae", - "xh": "uMzantsi Afrika", - "zu": "iNingizimu Afrika", - "ca": "Sud-Ă€frica" - }, - "edugain": { - "es": "Europa (eduGAIN)", - "ru": "\u0415\u0432\u0440\u043e\u043f\u0430 (eduGAIN)", - "zh-tw": "\u6b50\u6d32 (eduGAIN)", - "nl": "Europa (eduGAIN)", - "gl": "Europa (eduGAIN)", - "da": "Europa (eduGAIN)", - "af": "Europa (eduGAIN)", - "el": "\u0395\u03c5\u03c1\u03ce\u03c0\u03b7 (eduGAIN)", - "xh": "Yurophu (eduGAIN)", - "zu": "IYurophu (eduGAIN)", - "ca": "Europa (eduGAIN)" - }, - "misc": { - "es": "Otros", - "ru": "\u0420\u0430\u0437\u043d\u043e\u0435", - "zh-tw": "\u96dc\u9805", - "nl": "Overige", - "gl": "Miscelanea", - "da": "Forskellige", - "af": "Verskeie", - "el": "\u0386\u03bb\u03bb\u03bf\u03b9 \u03c6\u03bf\u03c1\u03b5\u03af\u03c2", - "xh": "Ezahlukahlukeneyo", - "zu": "Ezihlukahlukene", - "ca": "Altres" - }, - "incommon": { - "es": "InCommon", - "zh-tw": "InCommon", - "nl": "InCommon", - "da": "InCommon", - "af": "InCommon", - "el": "InCommon", - "ca": "InCommon" - }, - "ukacessfederation": { - "es": "Federación de Acceso de Reino Unido", - "zh-tw": "\u82f1\u570b Access Management Federation for Education and Research.", - "nl": "UK Access Federation", - "da": "Storbritanniens adgangsf\u00f8deration", - "af": "UK Toegangs Federasie", - "el": "\u039f\u03bc\u03bf\u03c3\u03c0\u03bf\u03bd\u03b4\u03af\u03b1 UK Access", - "ca": "FedereaciĂł d'accès del Regne Unit" - }, - "incremental_search": { - "af": "Inkrementele soektog...", - "zu": "Ukucinga okukhulayo...", - "xh": "Ukhangelo oluqhubekayo...", - "ca": "Cerca incremental..." - } -} diff --git a/modules/discopower/lib/PowerIdPDisco.php b/modules/discopower/lib/PowerIdPDisco.php deleted file mode 100644 index 34fb68afc9fe211f8c343a08f1e2117fd4256019..0000000000000000000000000000000000000000 --- a/modules/discopower/lib/PowerIdPDisco.php +++ /dev/null @@ -1,458 +0,0 @@ -<?php - -namespace SimpleSAML\Module\discopower; - -/** - * This class implements a generic IdP discovery service, for use in various IdP discovery service pages. This should - * reduce code duplication. - * - * This module extends the basic IdP disco handler, and add features like filtering and tabs. - * - * @author Andreas Ă…kre Solberg <andreas@uninett.no>, UNINETT AS. - * @package SimpleSAMLphp - */ -class PowerIdPDisco extends \SimpleSAML\XHTML\IdPDisco -{ - /** - * The configuration for this instance. - * - * @var \SimpleSAML\Configuration - */ - private $discoconfig; - - - /** - * The domain to use when saving common domain cookies. This is null if support for common domain cookies is - * disabled. - * - * @var string|null - */ - private $cdcDomain; - - - /** - * The lifetime of the CDC cookie, in seconds. If set to null, it will only be valid until the browser is closed. - * - * @var int|null - */ - private $cdcLifetime; - - - /** - * Initializes this discovery service. - * - * The constructor does the parsing of the request. If this is an invalid request, it will throw an exception. - * - * @param array $metadataSets Array with metadata sets we find remote entities in. - * @param string $instance The name of this instance of the discovery service. - */ - public function __construct(array $metadataSets, $instance) - { - parent::__construct($metadataSets, $instance); - - $this->discoconfig = \SimpleSAML\Configuration::getConfig('module_discopower.php'); - - $this->cdcDomain = $this->discoconfig->getString('cdc.domain', null); - if ($this->cdcDomain !== null && $this->cdcDomain[0] !== '.') { - // ensure that the CDC domain starts with a dot ('.') as required by the spec - $this->cdcDomain = '.'.$this->cdcDomain; - } - - $this->cdcLifetime = $this->discoconfig->getInteger('cdc.lifetime', null); - } - - - /** - * Log a message. - * - * This is an helper function for logging messages. It will prefix the messages with our discovery service type. - * - * @param string $message The message which should be logged. - * @return void - */ - protected function log($message) - { - \SimpleSAML\Logger::info('PowerIdPDisco.'.$this->instance.': '.$message); - } - - - /** - * Compare two entities. - * - * This function is used to sort the entity list. It sorts based on english name, and will always put IdP's with - * names configured before those with only an entityID. - * - * @param array $a The metadata of the first entity. - * @param array $b The metadata of the second entity. - * - * @return int How $a compares to $b. - */ - public static function mcmp(array $a, array $b) - { - if (isset($a['name']['en']) && isset($b['name']['en'])) { - return strcasecmp($a['name']['en'], $b['name']['en']); - } elseif (isset($a['name']['en'])) { - return -1; // place name before entity ID - } elseif (isset($b['name']['en'])) { - return 1; // Place entity ID after name - } else { - return strcasecmp($a['entityid'], $b['entityid']); - } - } - - - /** - * Structure the list of IdPs in a hierarchy based upon the tags. - * - * @param array $list A list of IdPs. - * - * @return array The list of IdPs structured accordingly. - */ - protected function idplistStructured($list) - { - $slist = []; - - $order = $this->discoconfig->getValue('taborder'); - if (is_array($order)) { - foreach ($order as $oe) { - $slist[$oe] = []; - } - } - - $enableTabs = $this->discoconfig->getValue('tabs', null); - - foreach ($list as $key => $val) { - $tags = ['misc']; - if (array_key_exists('tags', $val)) { - $tags = $val['tags']; - } - foreach ($tags as $tag) { - if (!empty($enableTabs) && !in_array($tag, $enableTabs)) { - continue; - } - $slist[$tag][$key] = $val; - } - } - - foreach ($slist as $tab => $tbslist) { - uasort($slist[$tab], ['\SimpleSAML\Module\discopower\PowerIdPDisco', 'mcmp']); - } - - return $slist; - } - - - /** - * Do the actual filtering according the rules defined. - * - * @param array $filter A set of rules regarding filtering. - * @param array $entry An entry to be evaluated by the filters. - * @param boolean $default What to do in case the entity does not match any rules. Defaults to true. - * - * @return boolean True if the entity should be kept, false if it should be discarded according to the filters. - */ - private function processFilter($filter, $entry, $default = true) - { - if (in_array($entry['entityid'], $filter['entities.include'])) { - return true; - } - if (in_array($entry['entityid'], $filter['entities.exclude'])) { - return false; - } - - if (array_key_exists('tags', $entry)) { - foreach ($filter['tags.include'] as $fe) { - if (in_array($fe, $entry['tags'])) { - return true; - } - } - foreach ($filter['tags.exclude'] as $fe) { - if (in_array($fe, $entry['tags'])) { - return false; - } - } - } - return $default; - } - - - /** - * Filter a list of entities according to any filters defined in the parent class, plus discopower configuration - * options regarding filtering. - * - * @param array $list A list of entities to filter. - * - * @return array The list in $list after filtering entities. - */ - protected function filterList($list) - { - $list = parent::filterList($list); - - try { - $spmd = $this->metadata->getMetaData($this->spEntityId, 'saml20-sp-remote'); - } catch (\Exception $e) { - return $list; - } - - if (!isset($spmd)) { - return $list; - } - if (!array_key_exists('discopower.filter', $spmd)) { - return $list; - } - $filter = $spmd['discopower.filter']; - - if (!array_key_exists('entities.include', $filter)) { - $filter['entities.include'] = []; - } - if (!array_key_exists('entities.exclude', $filter)) { - $filter['entities.exclude'] = []; - } - if (!array_key_exists('tags.include', $filter)) { - $filter['tags.include'] = []; - } - if (!array_key_exists('tags.exclude', $filter)) { - $filter['tags.exclude'] = []; - } - - $defaultrule = true; - if (array_key_exists('entities.include', $spmd['discopower.filter']) || - array_key_exists('tags.include', $spmd['discopower.filter']) - ) { - $defaultrule = false; - } - - $returnlist = []; - foreach ($list as $key => $entry) { - if ($this->processFilter($filter, $entry, $defaultrule)) { - $returnlist[$key] = $entry; - } - } - return $returnlist; - } - - - /** - * Handles a request to this discovery service. - * - * The IdP disco parameters should be set before calling this function. - * @return void - */ - public function handleRequest() - { - $this->start(); - - // no choice made. Show discovery service page - $idpList = $this->getIdPList(); - $idpList = $this->idplistStructured($this->filterList($idpList)); - $preferredIdP = $this->getRecommendedIdP(); - - $t = new \SimpleSAML\XHTML\Template($this->config, 'discopower:disco.tpl.php', 'disco'); - - $t->data['return'] = $this->returnURL; - $t->data['returnIDParam'] = $this->returnIdParam; - $t->data['entityID'] = $this->spEntityId; - $t->data['defaulttab'] = $this->discoconfig->getValue('defaulttab', 0); - - $idpList = $this->processMetadata($t, $idpList, $preferredIdP); - - $t->data['idplist'] = $idpList; - foreach ($idpList as $tab => $slist) { - if (!empty($preferredIdP) && array_key_exists($preferredIdP, $slist)) { - $t->data['faventry'] = $slist[$preferredIdP]; - break; - } - } - - if (!empty($t->data['faventry'])) { - $t->data['autofocus'] = 'favouritesubmit'; - } - - /* store the tab list in the session */ - $session = \SimpleSAML\Session::getSessionFromRequest(); - $session->setData('discopower:tabList', 'faventry', $this->data['faventry']); - $session->setData('discopower:tabList', 'tabs', array_keys($idpList)); - $session->setData('discopower:tabList', 'defaulttab', $t->data['defaulttab']); - - $t->data['score'] = $this->discoconfig->getValue('score', 'quicksilver'); - $t->data['preferredidp'] = $preferredIdP; - $t->data['urlpattern'] = htmlspecialchars(\SimpleSAML\Utils\HTTP::getSelfURLNoQuery()); - $t->data['rememberenabled'] = $this->config->getBoolean('idpdisco.enableremember', false); - $t->data['rememberchecked'] = $this->config->getBoolean('idpdisco.rememberchecked', false); - $t->data['jquery'] = ['core' => true, 'ui' => true]; - foreach(array_keys($idpList) as $tab) { - if ($t->getTag('{discopower:tabs:' . $tab . '}') === null) { - $t->includeInlineTranslation('{discopower:tabs:'. $tab. '}', $tab); - } - $t->data['tabNames'][$tab] = \SimpleSAML\Locale\Translate::noop('{discopower:tabs:' . $tab . '}'); - } - $t->show(); - } - - - /** - * @param \SimpleSAML\XHTML\Template $t - * @param array $metadata - * @param string $favourite - * @return array - */ - private function processMetadata($t, $metadata, $favourite) - { - $basequerystring = '?'. - 'entityID='.urlencode($t->data['entityID']).'&'. - 'return='.urlencode($t->data['return']).'&'. - 'returnIDParam='.urlencode($t->data['returnIDParam']).'&idpentityid='; - - foreach ($metadata as $tab => $idps) { - foreach ($idps as $entityid => $entity) { - $translation = false; - - // Translate name - if (isset($entity['UIInfo']['DisplayName'])) { - $displayName = $entity['UIInfo']['DisplayName']; - - // Should always be an array of language code -> translation - assert(is_array($displayName)); - - if (!empty($displayName)) { - $translation = $t->getTranslator()->getPreferredTranslation($displayName); - } - } - - if (($translation === false) && array_key_exists('name', $entity)) { - if (is_array($entity['name'])) { - $translation = $t->getTranslator()->getPreferredTranslation($entity['name']); - } else { - $translation = $entity['name']; - } - } - - if ($translation === false) { - $translation = $entity['entityid']; - } - $entity['translated'] = $translation; - - // HTML output - if ($entity['entityid'] === $favourite) { - $html = '<a class="metaentry favourite" href="'. - $basequerystring.urlencode($entity['entityid']).'">'; - } else { - $html = '<a class="metaentry" href="'. - $basequerystring.urlencode($entity['entityid']).'">'; - } - $html .= $entity['translated']; - if (array_key_exists('icon', $entity) && $entity['icon'] !== null) { - $iconUrl = \SimpleSAML\Utils\HTTP::resolveURL($entity['icon']); - $html .= '<img alt="Icon for identity provider" class="entryicon" src="'. - htmlspecialchars($iconUrl).'" />'; - } - $html .= '</a>'; - $entity['html'] = $html; - - // Save processed data - $metadata[$tab][$entityid] = $entity; - } - } - return $metadata; - } - - /** - * Get the IdP entities saved in the common domain cookie. - * - * @return array List of IdP entities. - */ - private function getCDC() - { - if (!isset($_COOKIE['_saml_idp'])) { - return []; - } - - $ret = (string) $_COOKIE['_saml_idp']; - $ret = explode(' ', $ret); - foreach ($ret as &$idp) { - $idp = base64_decode($idp); - if ($idp === false) { - // not properly base64 encoded - return []; - } - } - - return $ret; - } - - - /** - * Save the current IdP choice to a cookie. - * - * This function overrides the corresponding function in the parent class, to add support for common domain cookie. - * - * @param string $idp The entityID of the IdP. - * @return void - */ - protected function setPreviousIdP($idp) - { - assert(is_string($idp)); - - if ($this->cdcDomain === null) { - parent::setPreviousIdP($idp); - return; - } - - $list = $this->getCDC(); - - $prevIndex = array_search($idp, $list, true); - if ($prevIndex !== false) { - unset($list[$prevIndex]); - } - $list[] = $idp; - - foreach ($list as &$value) { - $value = base64_encode($value); - } - $newCookie = implode(' ', $list); - - while (strlen($newCookie) > 4000) { - // the cookie is too long. Remove the oldest elements until it is short enough - $tmp = explode(' ', $newCookie, 2); - if (count($tmp) === 1) { - // we are left with a single entityID whose base64 representation is too long to fit in a cookie - break; - } - $newCookie = $tmp[1]; - } - - $params = [ - 'lifetime' => $this->cdcLifetime, - 'domain' => $this->cdcDomain, - 'secure' => true, - 'httponly' => false, - ]; - \SimpleSAML\Utils\HTTP::setCookie('_saml_idp', $newCookie, $params, false); - } - - - /** - * Retrieve the previous IdP the user used. - * - * This function overrides the corresponding function in the parent class, to add support for common domain cookie. - * - * @return string|null The entity id of the previous IdP the user used, or null if this is the first time. - */ - protected function getPreviousIdP() - { - if ($this->cdcDomain === null) { - return parent::getPreviousIdP(); - } - - $prevIdPs = $this->getCDC(); - while (count($prevIdPs) > 0) { - $idp = array_pop($prevIdPs); - $idp = $this->validateIdP($idp); - if ($idp !== null) { - return $idp; - } - } - - return null; - } -} diff --git a/modules/discopower/locales/af/LC_MESSAGES/discopower.po b/modules/discopower/locales/af/LC_MESSAGES/discopower.po deleted file mode 100644 index e8349c6886a2af3ff319a233a35a6e2a2a030e07..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/af/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,97 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2016-10-12 09:23+0200\n" -"PO-Revision-Date: 2018-11-15 15:02+0200\n" -"Last-Translator: \n" -"Language-Team: \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" - -msgid "{discopower:tabs:ukacessfederation}" -msgstr "UK Toegangs Federasie" - -msgid "{discopower:tabs:switzerland}" -msgstr "Switserland" - -msgid "{discopower:tabs:greece}" -msgstr "Griekeland" - -msgid "{discopower:tabs:southafrica}" -msgstr "Suid-Afrika" - -msgid "{discopower:tabs:kalmar}" -msgstr "Kalmar" - -msgid "{discopower:tabs:denmark}" -msgstr "Denmark" - -msgid "{discopower:tabs:sweden}" -msgstr "Swede" - -msgid "{discopower:tabs:edugain}" -msgstr "Europa (eduGAIN)" - -msgid "{discopower:tabs:iceland}" -msgstr "Ysland" - -msgid "{discopower:tabs:finland}" -msgstr "Finland" - -msgid "{discopower:tabs:incommon}" -msgstr "InCommon" - -msgid "{discopower:tabs:norway}" -msgstr "NoorweĂ«" - -msgid "{discopower:tabs:misc}" -msgstr "Verskeie" - -msgid "Sweden" -msgstr "Swede" - -msgid "Denmark" -msgstr "Denmark" - -msgid "Iceland" -msgstr "Ysland" - -msgid "UK Access Federation" -msgstr "UK Toegangs Federasie" - -msgid "Kalmar" -msgstr "Kalmar" - -msgid "Switzerland" -msgstr "Switserland" - -msgid "Norway" -msgstr "NoorweĂ«" - -msgid "Greece" -msgstr "Griekeland" - -msgid "South Africa" -msgstr "Suid-Afrika" - -msgid "Miscellaneous" -msgstr "Verskeie" - -msgid "Finland" -msgstr "Finland" - -msgid "Europe (eduGAIN)" -msgstr "Europa (eduGAIN)" - -msgid "InCommon" -msgstr "InCommon" - -msgid "{discopower:tabs:incremental_search}" -msgstr "Inkrementele soektog..." - diff --git a/modules/discopower/locales/da/LC_MESSAGES/discopower.po b/modules/discopower/locales/da/LC_MESSAGES/discopower.po deleted file mode 100644 index 361533e1dffab1d41d0393eb96addbc78789e388..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/da/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,95 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2016-10-12 09:23+0200\n" -"PO-Revision-Date: 2016-10-14 12:14+0200\n" -"Last-Translator: \n" -"Language: da\n" -"Language-Team: \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.3.4\n" - -msgid "{discopower:tabs:ukacessfederation}" -msgstr "Storbritanniens adgangsføderation" - -msgid "{discopower:tabs:switzerland}" -msgstr "Schweiz" - -msgid "{discopower:tabs:greece}" -msgstr "Grækenland" - -msgid "{discopower:tabs:southafrica}" -msgstr "Sydafrika" - -msgid "{discopower:tabs:kalmar}" -msgstr "Kalmar" - -msgid "{discopower:tabs:denmark}" -msgstr "Danmark" - -msgid "{discopower:tabs:sweden}" -msgstr "Sverige" - -msgid "{discopower:tabs:edugain}" -msgstr "Europa (eduGAIN)" - -msgid "{discopower:tabs:iceland}" -msgstr "Island" - -msgid "{discopower:tabs:finland}" -msgstr "Finland" - -msgid "{discopower:tabs:incommon}" -msgstr "InCommon" - -msgid "{discopower:tabs:norway}" -msgstr "Norge" - -msgid "{discopower:tabs:misc}" -msgstr "Forskellige" - -msgid "Sweden" -msgstr "Sverige" - -msgid "Denmark" -msgstr "Danmark" - -msgid "Iceland" -msgstr "Island" - -msgid "UK Access Federation" -msgstr "Storbritanniens adgangsføderation" - -msgid "Kalmar" -msgstr "Kalmar" - -msgid "Switzerland" -msgstr "Schweiz" - -msgid "Norway" -msgstr "Norge" - -msgid "Greece" -msgstr "Grækenland" - -msgid "South Africa" -msgstr "Sydafrika" - -msgid "Miscellaneous" -msgstr "Forskellige" - -msgid "Finland" -msgstr "Finland" - -msgid "Europe (eduGAIN)" -msgstr "Europa (eduGAIN)" - -msgid "InCommon" -msgstr "InCommon" - diff --git a/modules/discopower/locales/el/LC_MESSAGES/discopower.po b/modules/discopower/locales/el/LC_MESSAGES/discopower.po deleted file mode 100644 index b0c4c9b5143715b1147f6ca6788a52bf1f95b5b5..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/el/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,95 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2016-10-12 09:23+0200\n" -"PO-Revision-Date: 2016-10-14 12:14+0200\n" -"Last-Translator: \n" -"Language: el\n" -"Language-Team: \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.3.4\n" - -msgid "{discopower:tabs:ukacessfederation}" -msgstr "ΟμοĎπονδία UK Access" - -msgid "{discopower:tabs:switzerland}" -msgstr "Ελβετία" - -msgid "{discopower:tabs:greece}" -msgstr "Ελλάδα" - -msgid "{discopower:tabs:southafrica}" -msgstr "Νότια ΑφĎική" - -msgid "{discopower:tabs:kalmar}" -msgstr "Kalmar" - -msgid "{discopower:tabs:denmark}" -msgstr "Δανία" - -msgid "{discopower:tabs:sweden}" -msgstr "Σουηδία" - -msgid "{discopower:tabs:edugain}" -msgstr "ΕυĎώπη (eduGAIN)" - -msgid "{discopower:tabs:iceland}" -msgstr "ΙĎλανδία" - -msgid "{discopower:tabs:finland}" -msgstr "Φινλανδία" - -msgid "{discopower:tabs:incommon}" -msgstr "InCommon" - -msgid "{discopower:tabs:norway}" -msgstr "ΝοĎβηγία" - -msgid "{discopower:tabs:misc}" -msgstr "Άλλοι φοĎείς" - -msgid "Sweden" -msgstr "Σουηδία" - -msgid "Denmark" -msgstr "Δανία" - -msgid "Iceland" -msgstr "ΙĎλανδία" - -msgid "UK Access Federation" -msgstr "ΟμοĎπονδία UK Access" - -msgid "Kalmar" -msgstr "Kalmar" - -msgid "Switzerland" -msgstr "Ελβετία" - -msgid "Norway" -msgstr "ΝοĎβηγία" - -msgid "Greece" -msgstr "Ελλάδα" - -msgid "South Africa" -msgstr "Νότια ΑφĎική" - -msgid "Miscellaneous" -msgstr "Άλλοι φοĎείς" - -msgid "Finland" -msgstr "Φινλανδία" - -msgid "Europe (eduGAIN)" -msgstr "ΕυĎώπη (eduGAIN)" - -msgid "InCommon" -msgstr "InCommon" - diff --git a/modules/discopower/locales/en/LC_MESSAGES/discopower.po b/modules/discopower/locales/en/LC_MESSAGES/discopower.po deleted file mode 100644 index b8bed3770ddce941f70e52a8c815bc60e14009b4..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/en/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,98 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2016-10-12 09:23+0200\n" -"PO-Revision-Date: 2019-03-20 15:27+0200\n" -"Last-Translator: \n" -"Language: en\n" -"Language-Team: \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.3.4\n" - -msgid "{discopower:tabs:ukacessfederation}" -msgstr "UK Access Federation" - -msgid "{discopower:tabs:switzerland}" -msgstr "Switzerland" - -msgid "{discopower:tabs:greece}" -msgstr "Greece" - -msgid "{discopower:tabs:southafrica}" -msgstr "South Africa" - -msgid "{discopower:tabs:kalmar}" -msgstr "Kalmar" - -msgid "{discopower:tabs:denmark}" -msgstr "Denmark" - -msgid "{discopower:tabs:sweden}" -msgstr "Sweden" - -msgid "{discopower:tabs:edugain}" -msgstr "Europe (eduGAIN)" - -msgid "{discopower:tabs:iceland}" -msgstr "Iceland" - -msgid "{discopower:tabs:finland}" -msgstr "Finland" - -msgid "{discopower:tabs:incommon}" -msgstr "InCommon" - -msgid "{discopower:tabs:norway}" -msgstr "Norway" - -msgid "{discopower:tabs:misc}" -msgstr "Miscellaneous" - -msgid "Sweden" -msgstr "Sweden" - -msgid "Denmark" -msgstr "Denmark" - -msgid "Iceland" -msgstr "Iceland" - -msgid "UK Access Federation" -msgstr "UK Access Federation" - -msgid "Kalmar" -msgstr "Kalmar" - -msgid "Switzerland" -msgstr "Switzerland" - -msgid "Norway" -msgstr "Norway" - -msgid "Greece" -msgstr "Greece" - -msgid "South Africa" -msgstr "South Africa" - -msgid "Miscellaneous" -msgstr "Miscellaneous" - -msgid "Finland" -msgstr "Finland" - -msgid "Europe (eduGAIN)" -msgstr "Europe (eduGAIN)" - -msgid "InCommon" -msgstr "InCommon" - -msgid "{discopower:tabs:incremental_search}" -msgstr "Incremental search..." - diff --git a/modules/discopower/locales/es/LC_MESSAGES/discopower.po b/modules/discopower/locales/es/LC_MESSAGES/discopower.po deleted file mode 100644 index 0d2bcb4759369bced674dd723cd0b3e4c3a20df5..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/es/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,95 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2016-10-12 09:23+0200\n" -"PO-Revision-Date: 2016-10-14 12:14+0200\n" -"Last-Translator: \n" -"Language: es\n" -"Language-Team: \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.3.4\n" - -msgid "{discopower:tabs:ukacessfederation}" -msgstr "Federación de Acceso de Reino Unido" - -msgid "{discopower:tabs:switzerland}" -msgstr "Suiza" - -msgid "{discopower:tabs:greece}" -msgstr "Grecia" - -msgid "{discopower:tabs:southafrica}" -msgstr "Sudáfrica" - -msgid "{discopower:tabs:kalmar}" -msgstr "Kalmar" - -msgid "{discopower:tabs:denmark}" -msgstr "Dinamarca" - -msgid "{discopower:tabs:sweden}" -msgstr "Suecia" - -msgid "{discopower:tabs:edugain}" -msgstr "Europa (eduGAIN)" - -msgid "{discopower:tabs:iceland}" -msgstr "Islandia" - -msgid "{discopower:tabs:finland}" -msgstr "Finlandia" - -msgid "{discopower:tabs:incommon}" -msgstr "InCommon" - -msgid "{discopower:tabs:norway}" -msgstr "Noruega" - -msgid "{discopower:tabs:misc}" -msgstr "Otros" - -msgid "Sweden" -msgstr "Suecia" - -msgid "Denmark" -msgstr "Dinamarca" - -msgid "Iceland" -msgstr "Islandia" - -msgid "UK Access Federation" -msgstr "Federación de Acceso de Reino Unido" - -msgid "Kalmar" -msgstr "Kalmar" - -msgid "Switzerland" -msgstr "Suiza" - -msgid "Norway" -msgstr "Noruega" - -msgid "Greece" -msgstr "Grecia" - -msgid "South Africa" -msgstr "Sudáfrica" - -msgid "Miscellaneous" -msgstr "Otros" - -msgid "Finland" -msgstr "Finlandia" - -msgid "Europe (eduGAIN)" -msgstr "Europa (eduGAIN)" - -msgid "InCommon" -msgstr "InCommon" - diff --git a/modules/discopower/locales/gl/LC_MESSAGES/discopower.po b/modules/discopower/locales/gl/LC_MESSAGES/discopower.po deleted file mode 100644 index 1a5a63008a6a953b63c08878a65b1156d99d02e0..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/gl/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,77 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2016-10-12 09:23+0200\n" -"PO-Revision-Date: 2016-10-14 12:14+0200\n" -"Last-Translator: \n" -"Language: gl\n" -"Language-Team: \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.3.4\n" - -msgid "{discopower:tabs:switzerland}" -msgstr "Suiza" - -msgid "{discopower:tabs:greece}" -msgstr "Grecia" - -msgid "{discopower:tabs:southafrica}" -msgstr "Suráfrica" - -msgid "{discopower:tabs:denmark}" -msgstr "Dinamarca" - -msgid "{discopower:tabs:sweden}" -msgstr "Suecia" - -msgid "{discopower:tabs:edugain}" -msgstr "Europa (eduGAIN)" - -msgid "{discopower:tabs:iceland}" -msgstr "Islandia" - -msgid "{discopower:tabs:finland}" -msgstr "Finlandia" - -msgid "{discopower:tabs:norway}" -msgstr "Noruega" - -msgid "{discopower:tabs:misc}" -msgstr "Miscelanea" - -msgid "Sweden" -msgstr "Suecia" - -msgid "Denmark" -msgstr "Dinamarca" - -msgid "Iceland" -msgstr "Islandia" - -msgid "Switzerland" -msgstr "Suiza" - -msgid "Norway" -msgstr "Noruega" - -msgid "Greece" -msgstr "Grecia" - -msgid "South Africa" -msgstr "Suráfrica" - -msgid "Miscellaneous" -msgstr "Miscelanea" - -msgid "Finland" -msgstr "Finlandia" - -msgid "Europe (eduGAIN)" -msgstr "Europa (eduGAIN)" - diff --git a/modules/discopower/locales/nl/LC_MESSAGES/discopower.po b/modules/discopower/locales/nl/LC_MESSAGES/discopower.po deleted file mode 100644 index a1922cf526d41e487f628e3f309c2e23d33d837e..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/nl/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,95 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2016-10-12 09:23+0200\n" -"PO-Revision-Date: 2016-10-14 12:14+0200\n" -"Last-Translator: \n" -"Language: nl\n" -"Language-Team: \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.3.4\n" - -msgid "{discopower:tabs:ukacessfederation}" -msgstr "UK Access Federation" - -msgid "{discopower:tabs:switzerland}" -msgstr "Zwitserland" - -msgid "{discopower:tabs:greece}" -msgstr "Griekenland" - -msgid "{discopower:tabs:southafrica}" -msgstr "Zuid-Afrika" - -msgid "{discopower:tabs:kalmar}" -msgstr "Kalmar" - -msgid "{discopower:tabs:denmark}" -msgstr "Denemarken" - -msgid "{discopower:tabs:sweden}" -msgstr "Zweden" - -msgid "{discopower:tabs:edugain}" -msgstr "Europa (eduGAIN)" - -msgid "{discopower:tabs:iceland}" -msgstr "IJsland" - -msgid "{discopower:tabs:finland}" -msgstr "Finland" - -msgid "{discopower:tabs:incommon}" -msgstr "InCommon" - -msgid "{discopower:tabs:norway}" -msgstr "Noorwegen" - -msgid "{discopower:tabs:misc}" -msgstr "Overige" - -msgid "Sweden" -msgstr "Zweden" - -msgid "Denmark" -msgstr "Denemarken" - -msgid "Iceland" -msgstr "IJsland" - -msgid "UK Access Federation" -msgstr "UK Access Federation" - -msgid "Kalmar" -msgstr "Kalmar" - -msgid "Switzerland" -msgstr "Zwitserland" - -msgid "Norway" -msgstr "Noorwegen" - -msgid "Greece" -msgstr "Griekenland" - -msgid "South Africa" -msgstr "Zuid-Afrika" - -msgid "Miscellaneous" -msgstr "Overige" - -msgid "Finland" -msgstr "Finland" - -msgid "Europe (eduGAIN)" -msgstr "Europa (eduGAIN)" - -msgid "InCommon" -msgstr "InCommon" - diff --git a/modules/discopower/locales/ru/LC_MESSAGES/discopower.po b/modules/discopower/locales/ru/LC_MESSAGES/discopower.po deleted file mode 100644 index 75a10f200b1a17bd50e800fd298ab2347166f966..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/ru/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,84 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2016-10-12 09:23+0200\n" -"PO-Revision-Date: 2016-10-14 12:14+0200\n" -"Last-Translator: \n" -"Language: ru\n" -"Language-Team: \n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.3.4\n" - -msgid "{discopower:tabs:switzerland}" -msgstr "Швейцария" - -msgid "{discopower:tabs:greece}" -msgstr "Греция" - -msgid "{discopower:tabs:kalmar}" -msgstr "Кальмар" - -msgid "{discopower:tabs:denmark}" -msgstr "Дания" - -msgid "{discopower:tabs:sweden}" -msgstr "Швеция" - -msgid "{discopower:tabs:southafrica}" -msgstr "Южная Đфрика" - -msgid "{discopower:tabs:edugain}" -msgstr "Европа (eduGAIN)" - -msgid "{discopower:tabs:iceland}" -msgstr "ĐŃландия" - -msgid "{discopower:tabs:finland}" -msgstr "Финляндия" - -msgid "{discopower:tabs:norway}" -msgstr "Норвегия" - -msgid "{discopower:tabs:misc}" -msgstr "Разное" - -msgid "Sweden" -msgstr "Швеция" - -msgid "South Africa" -msgstr "Южная Đфрика" - -msgid "Denmark" -msgstr "Дания" - -msgid "Iceland" -msgstr "ĐŃландия" - -msgid "Kalmar" -msgstr "Кальмар" - -msgid "Switzerland" -msgstr "Швейцария" - -msgid "Norway" -msgstr "Норвегия" - -msgid "Greece" -msgstr "Греция" - -msgid "Miscellaneous" -msgstr "Разное" - -msgid "Finland" -msgstr "Финляндия" - -msgid "Europe (eduGAIN)" -msgstr "Европа (eduGAIN)" - diff --git a/modules/discopower/locales/xh/LC_MESSAGES/discopower.po b/modules/discopower/locales/xh/LC_MESSAGES/discopower.po deleted file mode 100644 index 6d224162b99d3466231e8dcb9e25e35dfdbe17f8..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/xh/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,49 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2018-11-15 14:48+0200\n" -"PO-Revision-Date: 2018-11-15 15:02+0200\n" -"Last-Translator: \n" -"Language-Team: \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" - -msgid "{discopower:tabs:misc}" -msgstr "Ezahlukahlukeneyo" - -msgid "{discopower:tabs:finland}" -msgstr "Finlend" - -msgid "{discopower:tabs:sweden}" -msgstr "Swiden" - -msgid "{discopower:tabs:southafrica}" -msgstr "uMzantsi Afrika" - -msgid "{discopower:tabs:switzerland}" -msgstr "Swizalend" - -msgid "{discopower:tabs:iceland}" -msgstr "Ayisilend" - -msgid "{discopower:tabs:denmark}" -msgstr "Dominikha" - -msgid "{discopower:tabs:greece}" -msgstr "Grisi" - -msgid "{discopower:tabs:edugain}" -msgstr "Yurophu (eduGAIN)" - -msgid "{discopower:tabs:norway}" -msgstr "Norowe" - -msgid "{discopower:tabs:incremental_search}" -msgstr "Ukhangelo oluqhubekayo..." - diff --git a/modules/discopower/locales/zh-tw/LC_MESSAGES/discopower.po b/modules/discopower/locales/zh-tw/LC_MESSAGES/discopower.po deleted file mode 100644 index c573ee198bb05fad8b24058ac2232098051ebb1f..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/zh-tw/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,89 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2016-10-12 09:23+0200\n" -"PO-Revision-Date: 2016-10-14 12:14+0200\n" -"Last-Translator: \n" -"Language: zh_Hant_TW\n" -"Language-Team: \n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.3.4\n" - -msgid "{discopower:tabs:ukacessfederation}" -msgstr "英國 Access Management Federation for Education and Research." - -msgid "{discopower:tabs:switzerland}" -msgstr "瑞士" - -msgid "{discopower:tabs:kalmar}" -msgstr "卡çľé¦¬" - -msgid "{discopower:tabs:denmark}" -msgstr "丹麥" - -msgid "{discopower:tabs:sweden}" -msgstr "ç‘žĺ…¸" - -msgid "{discopower:tabs:southafrica}" -msgstr "南非" - -msgid "{discopower:tabs:edugain}" -msgstr "ćć´˛ (eduGAIN)" - -msgid "{discopower:tabs:iceland}" -msgstr "冰島" - -msgid "{discopower:tabs:finland}" -msgstr "芬č" - -msgid "{discopower:tabs:incommon}" -msgstr "InCommon" - -msgid "{discopower:tabs:norway}" -msgstr "挪ĺ¨" - -msgid "{discopower:tabs:misc}" -msgstr "é›śé …" - -msgid "Sweden" -msgstr "ç‘žĺ…¸" - -msgid "South Africa" -msgstr "南非" - -msgid "Denmark" -msgstr "丹麥" - -msgid "Iceland" -msgstr "冰島" - -msgid "UK Access Federation" -msgstr "英國 Access Management Federation for Education and Research." - -msgid "Kalmar" -msgstr "卡çľé¦¬" - -msgid "Switzerland" -msgstr "瑞士" - -msgid "Norway" -msgstr "挪ĺ¨" - -msgid "Miscellaneous" -msgstr "é›śé …" - -msgid "Finland" -msgstr "芬č" - -msgid "Europe (eduGAIN)" -msgstr "ćć´˛ (eduGAIN)" - -msgid "InCommon" -msgstr "InCommon" - diff --git a/modules/discopower/locales/zu/LC_MESSAGES/discopower.po b/modules/discopower/locales/zu/LC_MESSAGES/discopower.po deleted file mode 100644 index 800d5dc2a5ef7e2268d09171c6e80bd0529c3c0e..0000000000000000000000000000000000000000 --- a/modules/discopower/locales/zu/LC_MESSAGES/discopower.po +++ /dev/null @@ -1,40 +0,0 @@ - -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: SimpleSAMLphp 1.15\n" -"Report-Msgid-Bugs-To: simplesamlphp-translation@googlegroups.com\n" -"POT-Creation-Date: 2018-11-15 14:48+0200\n" -"PO-Revision-Date: 2018-11-15 14:48+0200\n" -"Last-Translator: \n" -"Language-Team: \n" -"Plural-Forms: nplurals=2; plural=(n != 1)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" - -msgid "{discopower:tabs:misc}" -msgstr "Ezihlukahlukene" - -msgid "{discopower:tabs:sweden}" -msgstr "Sweden" - -msgid "{discopower:tabs:incremental_search}" -msgstr "Ukucinga okukhulayo..." - -msgid "{discopower:tabs:southafrica}" -msgstr "iNingizimu Afrika" - -msgid "{discopower:tabs:switzerland}" -msgstr "ESwitzerland" - -msgid "{discopower:tabs:iceland}" -msgstr "I-Iceland" - -msgid "{discopower:tabs:edugain}" -msgstr "IYurophu (eduGAIN)" - -msgid "{discopower:tabs:norway}" -msgstr "ENorway" - diff --git a/modules/discopower/templates/disco.tpl.php b/modules/discopower/templates/disco.tpl.php deleted file mode 100644 index 581b819276e11646c7260142c3e4c0cdc97416e3..0000000000000000000000000000000000000000 --- a/modules/discopower/templates/disco.tpl.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php - -$this->data['header'] = $this->t('selectidp'); -$this->data['jquery'] = ['core' => true, 'ui' => true, 'css' => true]; - -$this->data['head'] = '<link rel="stylesheet" media="screen" type="text/css" href="'. - SimpleSAML\Module::getModuleURL('discopower/assets/css/disco.css').'" />'; - -$this->data['head'] .= '<script type="text/javascript" src="'. - SimpleSAML\Module::getModuleURL('discopower/assets/js/jquery.livesearch.js').'"></script>'."\n"; -$this->data['head'] .= '<script type="text/javascript" src="'. - SimpleSAML\Module::getModuleURL('discopower/assets/js/'.$this->data['score'].'.js').'"></script>'."\n"; -$this->data['head'] .= '<script type="text/javascript" src="'. - SimpleSAML\Module::getModuleURL('discopower/assets/js/tablist.js').'"></script>'."\n"; - -if (!empty($this->data['faventry'])) { - $this->data['autofocus'] = 'favouritesubmit'; -} - -$this->includeAtTemplateBase('includes/header.php'); - -function showEntry($t, $metadata, $favourite = false) -{ - $basequerystring = '?'. - 'entityID='.urlencode($t->data['entityID']).'&'. - 'return='.urlencode($t->data['return']).'&'. - 'returnIDParam='.urlencode($t->data['returnIDParam']).'&idpentityid='; - - $extra = ($favourite ? ' favourite' : ''); - $html = '<a class="metaentry'.$extra.'" href="'.$basequerystring.urlencode($metadata['entityid']).'">'; - - $html .= htmlspecialchars(getTranslatedName($t, $metadata)).''; - - if (array_key_exists('icon', $metadata) && $metadata['icon'] !== null) { - $iconUrl = \SimpleSAML\Utils\HTTP::resolveURL($metadata['icon']); - $html .= '<img alt="Icon for identity provider" class="entryicon" src="'.htmlspecialchars($iconUrl).'" />'; - } - - $html .= '</a>'; - return $html; -} - -function getTranslatedName($t, $metadata) -{ - if (isset($metadata['UIInfo']['DisplayName'])) { - $displayName = $metadata['UIInfo']['DisplayName']; - assert(is_array($displayName)); // Should always be an array of language code -> translation - if (!empty($displayName)) { - return $t->getTranslator()->getPreferredTranslation($displayName); - } - } - - if (array_key_exists('name', $metadata)) { - if (is_array($metadata['name'])) { - return $t->getTranslator()->getPreferredTranslation($metadata['name']); - } else { - return $metadata['name']; - } - } - return $metadata['entityid']; -} - -if (!empty($this->data['faventry'])) { - echo '<div class="favourite">' ; - echo $this->t('previous_auth'); - echo ' <strong>'.htmlspecialchars(getTranslatedName($this, $this->data['faventry'])).'</strong>'; - echo '<form id="idpselectform" method="get" action="'.$this->data['urlpattern']. - '"><input type="hidden" name="entityID" value="'.htmlspecialchars($this->data['entityID']). - '" /><input type="hidden" name="return" value="'.htmlspecialchars($this->data['return']). - '" /><input type="hidden" name="returnIDParam" value="'.htmlspecialchars($this->data['returnIDParam']). - '" /><input type="hidden" name="idpentityid" value="'.htmlspecialchars($this->data['faventry']['entityid']). - '" /><input type="submit" name="formsubmit" id="favouritesubmit" value="'.$this->t('login_at').' '. - htmlspecialchars(getTranslatedName($this, $this->data['faventry'])).'" /></form>'; - echo '</div>'; -} -?> - -<div id="tabdiv"> - <ul class="tabset_tabs"> - <?php - $tabs = array_keys($this->data['idplist']); - $i = 1; - foreach ($tabs as $tab) { - if (!empty($this->data['idplist'][$tab])) { - if ($i === 1) { - echo '<li class="tab-link current" data-tab="'.$tab.'"><a href="#'.$tab. - '"><span>'.$this->t($this->data['tabNames'][$tab]).'</span></a></li>'; - } else { - echo '<li class="tab-link" data-tab="'.$tab.'"><a href="#'.$tab. - '"><span>'.$this->t($this->data['tabNames'][$tab]).'</span></a></li> '; - } - $i++; - } - } - ?> - </ul> - -<?php - -foreach ($this->data['idplist'] as $tab => $slist) { - $first = array_keys($this->data['idplist']); - if ($first[0] === $tab) { - echo '<div id="'.$tab.'" class="tabset_content current">'; - } else { - echo '<div id="'.$tab.'" class="tabset_content">'; - } - if (!empty($slist)) { - echo '<div class="inlinesearch">'; - echo '<p>'.htmlspecialchars($this->t('{discopower:tabs:incremental_search}')).'</p>'; - echo '<form id="idpselectform" action="?" method="get">'; - echo '<input class="inlinesearch" type="text" value="" name="query_'.$tab.'" id="query_'.$tab.'" /></form>'; - echo '</div>'; - - echo '<div class="metalist" id="list_'.$tab .'">'; - if (!empty($this->data['preferredidp']) && array_key_exists($this->data['preferredidp'], $slist)) { - $idpentry = $slist[$this->data['preferredidp']]; - echo showEntry($this, $idpentry, true); - } - - foreach ($slist as $idpentry) { - if ($idpentry['entityid'] != $this->data['preferredidp']) { - echo showEntry($this, $idpentry); - } - } - echo '</div>'; - } - echo '</div>'; -} - -?> - -</div> - -<?php -$this->includeAtTemplateBase('includes/footer.php'); diff --git a/modules/discopower/templates/disco.twig b/modules/discopower/templates/disco.twig deleted file mode 100644 index 0326990450f3a3553e293c282f109e69b6a4bf08..0000000000000000000000000000000000000000 --- a/modules/discopower/templates/disco.twig +++ /dev/null @@ -1,57 +0,0 @@ -{% set pagetitle = 'selectidp'|trans %} -{% extends "base.twig" %} - -{% block preload %} - <link rel="stylesheet" media="screen" href="/{{ baseurlpath }}resources/uitheme1.8/jquery-ui.css"> - <link rel="stylesheet" media="screen" href="/{{ baseurlpath }}module.php/discopower/assets/css/disco.css"> -{% endblock %} -{% block postload %} - <script src="/{{ baseurlpath }}resources/jquery-1.8.js"></script> - <script src="/{{ baseurlpath }}resources/jquery-ui-1.8.js"></script> - <script src="/{{ baseurlpath }}module.php/discopower/assets/js/jquery.livesearch.js"></script> - <script src="/{{ baseurlpath }}module.php/discopower/assets/js/{{ score }}.js"></script> - <script src="/{{ baseurlpath }}module.php/discopower/assets/js/tablist.js"></script> -{% endblock %} - -{% block content %} - {% if faventry is not empty %} - <div class="favourite">{{ '{disco:previous_auth}'|trans }} - <strong>{{ faventry.translated|escape('html') }}</strong> - <form id="idpselectform" method="get" action="{{ urlpattern }}"> - <input type="hidden" name="entityID" value="{{ entityID|escape('html') }}" /> - <input type="hidden" name="return" value="{{ return|escape('html') }}" /> - <input type="hidden" name="returnIDParam" value="{{ returnIDParam|escape('html') }}" /> - <input type="hidden" name="idpentityid" value="{{ faventry.entityid|escape('html') }}" /> - <input type="submit" name="formsubmit" id="favouritesubmit" value="{{ '{disco:login_at}'|trans }} {{ faventry.translated|escape('html') }}" /> - </form> - </div> - {% endif %} - - <div id="tabdiv"> - <ul class="tabset_tabs"> - {% for tab, idps in idplist %} - {% if idps is not empty %} - <li class="tab-link{% if loop.first %}current{% endif %}" data-tab="{{ tab }}"><a href="#{{ tab }}"><span>{{ tabNames[tab]|trans }}</span></a></li> - {% endif %} - {% endfor %} - </ul> - - {% for tab, idps in idplist %} - {% if idps is not empty %} - <div id="{{ tab }}" class="tabset_content{% if loop.first %} current{% endif %}"> - <div class="inlinesearch"> - <p>{{ '{discopower:tabs:incremental_search}'|trans }}</p> - <form id="idpselectform" method="get"> - <input class="inlinesearch" type="text" value="" name="query_{{ tab }}" id="query_{{ tab }}" /> - </form> - </div> - <div class="metalist" id="list_{{ tab }}"> - {% for entityid, entity in idps %} - {{ entity.html|raw }} - {% endfor %} - </div> - </div> - {% endif %} - {% endfor %} - </div> -{% endblock %} diff --git a/modules/discopower/www/assets/css/disco.css b/modules/discopower/www/assets/css/disco.css deleted file mode 100644 index 7610c52ae6f2378d4efab643f39f5f2366484794..0000000000000000000000000000000000000000 --- a/modules/discopower/www/assets/css/disco.css +++ /dev/null @@ -1,107 +0,0 @@ -.inlinesearch { - float: right; - margin: 0em 3px .5em 1em; -} -.inlinesearch p { - font-size: 94%; - color: #aaa; -} -.inlinesearch input { - background-image:url('../../../../resources/icons/silk/magnifier.png'); - background-repeat:no-repeat; - background-position:center left; - border: 1px solid #ccc; - padding: 2px 2px 2px 20px; - margin: 0px 2px 0px 0px; -} -.inlinesearch * { - margin: 0px; - padding: 0px; -} -div.metalist { - clear: both; - list-style: none; - margin: 1em 2px .5em 2px; - padding: 0px; -} -a.metaentry { - display: block; - border: 1px solid #ccc; - margin: 0px 0px -1px 0px; - padding: .2em 1em .2em 20px; - cursor: pointer; - cursor: hand; -} -a.metaentry.favourite { - background-image:url('../../../../resources/icons/silk/heart.png'); - background-repeat:no-repeat; - background-position:center left; -} -a.metaentry:hover { - border: 1px solid #ccc; - background: #eee; - background-image:url('../../../../resources/icons/silk/star.png'); - background-repeat:no-repeat; - background-position:center left; -} -a.metaentry img.entryicon { - display: none; -} -a.metaentry:hover img.entryicon { - display: inline; - top: 0px; - bottom: 0px; - clear: both; - float: right; - margin: 1em; - padding: 3px; - border: 1px solid #999; -} - -div.favourite { - margin: 1em 0px; - padding: 1em; - border: 1px solid #ccc; - background-color: #eee; -} - -div#content { - margin: .4em ! important; -} - -form { - display: inline; -} - -table#statmeta { - width: 100%; -} - -ul.tabset_tabs { - margin: 0px; - padding: 0px; - list-style: none; -} - -ul.tabset_tabs li { - background: none; - color: #222; - display: inline-block; - padding: 10px 15px; - cursor: pointer; -} - -ul.tabset_tabs li.current { - background: #ededed; - color: #222; -} - -.tabset_content { - display: none; - background: #ededed; - padding: 15px; -} - -.tabset_content.current { - display: inherit; -} diff --git a/modules/discopower/www/assets/js/jquery.livesearch.js b/modules/discopower/www/assets/js/jquery.livesearch.js deleted file mode 100644 index 2b125ff951350ae8c49fd0de49442da48a7bc3f2..0000000000000000000000000000000000000000 --- a/modules/discopower/www/assets/js/jquery.livesearch.js +++ /dev/null @@ -1,43 +0,0 @@ -jQuery.fn.liveUpdate = function (list) { - list = jQuery(list); - - if (list.length) { - var rows = list.children('a'), - cache = rows.map(function () { - return jQuery(this).text().toLowerCase(); - }); - - this.keyup(filter).keyup().parents('form').submit(function () { - return false; - }); - } - - return this; - - function filter() - { - var term = jQuery.trim(jQuery(this).val().toLowerCase()), scores = []; - - if (!term) { - rows.show(); - } else { - rows.hide(); - - cache.each(function (i) { - var score = this.score(term); - if (score > 0) { - scores.push([score, i]); - } - }); - - jQuery.each( - scores.sort(function (a, b) { - return b[0] - a[0]; - }), - function () { - jQuery(rows[ this[1] ]).show(); - } - ); - } - } -}; diff --git a/modules/discopower/www/assets/js/quicksilver.js b/modules/discopower/www/assets/js/quicksilver.js deleted file mode 100644 index 079ea87d5c2c03ec140396014394dbed08ad4dad..0000000000000000000000000000000000000000 --- a/modules/discopower/www/assets/js/quicksilver.js +++ /dev/null @@ -1,102 +0,0 @@ -// qs_score - Quicksilver Score -// -// A port of the Quicksilver string ranking algorithm -// -// "hello world".score("axl") //=> 0.0 -// "hello world".score("ow") //=> 0.6 -// "hello world".score("hello world") //=> 1.0 -// -// Tested in Firefox 2 and Safari 3 -// -// The Quicksilver code is available here -// http://code.google.com/p/blacktree-alchemy/ -// http://blacktree-alchemy.googlecode.com/svn/trunk/Crucible/Code/NSString+BLTRRanking.m -// -// The MIT License -// -// Copyright (c) 2008 Lachie Cox -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - -String.prototype.score = function (abbreviation,offset) { - offset = offset || 0 // TODO: I think this is unused... remove - - if (abbreviation.length == 0) { - return 0.9 - } - if (abbreviation.length > this.length) { - return 0.0 - } - - for (var i = abbreviation.length; i > 0; i--) { - var sub_abbreviation = abbreviation.substring(0,i) - var index = this.indexOf(sub_abbreviation) - - - if (index < 0) { - continue; - } - if (index + abbreviation.length > this.length + offset) { - continue; - } - - var next_string = this.substring(index+sub_abbreviation.length) - var next_abbreviation = null - - if (i >= abbreviation.length) { - next_abbreviation = '' - } else { - next_abbreviation = abbreviation.substring(i) - } - - var remaining_score = next_string.score(next_abbreviation,offset + index) - - if (remaining_score > 0) { - var score = this.length - next_string.length; - - if (index != 0) { - var j = 0; - var c = this.charCodeAt(index - 1) - if ( c==32 || c == 9) { - for (var j=(index-2); j >= 0; j--) { - c = this.charCodeAt(j) - score -= ((c == 32 || c == 9) ? 1 : 0.15) - } - // XXX maybe not port this heuristic - // - // } else if ([[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember:[self characterAtIndex:matchedRange.location]]) { - // for (j = matchedRange.location-1; j >= (int) searchRange.location; j--) { - // if ([[NSCharacterSet uppercaseLetterCharacterSet] characterIsMember:[self characterAtIndex:j]]) - // score--; - // else - // score -= 0.15; - // } - } else { - score -= index - } - } - - score += remaining_score * next_string.length - score /= this.length; - return score - } - } - return 0.0 -} diff --git a/modules/discopower/www/assets/js/suggest.js b/modules/discopower/www/assets/js/suggest.js deleted file mode 100644 index b404edd0a0509dad13cab4d2d6fab86feaa0c85b..0000000000000000000000000000000000000000 --- a/modules/discopower/www/assets/js/suggest.js +++ /dev/null @@ -1,25 +0,0 @@ -var suggest_cache = new Array; - -String.prototype.score = function (abbreviation,offset) { - if (suggest_cache['abv'] != abbreviation) { - suggest_cache['abv'] = abbreviation; - var words = abbreviation.split(/\s/); - suggest_cache['len'] = words.length; - suggest_cache.re = new Array; - - //words.each(); - for (var i = 0; i < suggest_cache['len']; ++i) { - suggest_cache['re'][i] = new Array(); - // /\b<x>/ doesn't work when <x> i a non-ascii - oddly enough \s does ... - suggest_cache['re'][i]['initialword'] = new RegExp("^"+words[i], "i"); - suggest_cache['re'][i]['word'] = new RegExp("[\\s-()_]"+words[i], "i"); - } - } - - for (var i = 0; i < suggest_cache['len']; ++i) { - if (!(this.match(suggest_cache['re'][i]['initialword']) || this.match(suggest_cache['re'][i]['word']))) { - return 0; - } - } - return 1; -} diff --git a/modules/discopower/www/assets/js/tablist.js b/modules/discopower/www/assets/js/tablist.js deleted file mode 100644 index 789fb5b28f173480a287bc31bd8c62bed3da463b..0000000000000000000000000000000000000000 --- a/modules/discopower/www/assets/js/tablist.js +++ /dev/null @@ -1,13 +0,0 @@ -$(document).ready(function() { - $("#tabdiv").tabs(); - $.getJSON("tablist.php", function(data) { - $("#tabdiv").select(data["default"]); - for (var i = 0; i < data["tabs"].length; i++) { - var tab = data["tabs"][i]; - $("#query_"+tab).liveUpdate("#list_"+tab); - if (data["faventry"] == null && i == 0) { - $("#query_"+tab).focus(); - } - } - }); -}); diff --git a/modules/discopower/www/disco.php b/modules/discopower/www/disco.php deleted file mode 100644 index 6a074787153d2076ba1dc7d872f2ad0cfadc50a5..0000000000000000000000000000000000000000 --- a/modules/discopower/www/disco.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -try { - $discoHandler = new \SimpleSAML\Module\discopower\PowerIdPDisco( - ['saml20-idp-remote', 'shib13-idp-remote'], - 'poweridpdisco' - ); -} catch (\Exception $exception) { - // An error here should be caused by invalid query parameters - throw new \SimpleSAML\Error\Error('DISCOPARAMS', $exception); -} - -try { - $discoHandler->handleRequest(); -} catch (\Exception $exception) { - // An error here should be caused by metadata - throw new \SimpleSAML\Error\Error('METADATA', $exception); -} diff --git a/modules/discopower/www/tablist.php b/modules/discopower/www/tablist.php deleted file mode 100644 index 9b6319bbd59022967d95c16455f360e88098593f..0000000000000000000000000000000000000000 --- a/modules/discopower/www/tablist.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** - * An AJAX handler to retrieve a list of disco tabs from the session. - * This allows us to dynamically update the tab list without inline javascript. - * - * @author Guy Halse, http://orcid.org/0000-0002-9388-8592 - * @package SimpleSAMLphp - */ -$session = \SimpleSAML\Session::getSessionFromRequest(); -$tabs = $session->getData('discopower:tabList', 'tabs'); -$faventry = $session->getData('discopower:tabList', 'faventry'); -$defaulttab = $session->getData('discopower:tabList', 'defaulttab'); - -if (!is_array($tabs)) { - throw new \SimpleSAML\Error\Exception('Could not get tab list from session'); -} - -// handle JSON vs JSONP requests -if (isset($_REQUEST['callback'])) { - if (!preg_match('/^[a-z0-9_]+$/i', $_REQUEST['callback'], $matches)) { - throw new \SimpleSAML\Error\Exception('Unsafe JSONP callback function name "'.$matches[0].'"'); - } - $jsonp = true; - header('Content-Type: application/javascript'); - echo addslashes($matches[0]).'('; -} else { - $jsonp = false; - header('Content-Type: application/json'); -} - -echo json_encode( - [ - 'faventry' => $faventry, - 'default' => $defaulttab, - 'tabs' => $tabs, - ] -); - -if ($jsonp) { - echo ');'; -}