summaryrefslogtreecommitdiffstats
path: root/modules/discopower
diff options
context:
space:
mode:
Diffstat (limited to 'modules/discopower')
-rw-r--r--modules/discopower/lib/PowerIdPDisco.php11
-rw-r--r--modules/discopower/templates/disco-tpl.php30
2 files changed, 7 insertions, 34 deletions
diff --git a/modules/discopower/lib/PowerIdPDisco.php b/modules/discopower/lib/PowerIdPDisco.php
index 0702141..44f4813 100644
--- a/modules/discopower/lib/PowerIdPDisco.php
+++ b/modules/discopower/lib/PowerIdPDisco.php
@@ -99,7 +99,6 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco {
* This function will structure the idp list in a hierarchy based upon the tags.
*/
protected function idplistStructured($list) {
- # echo '<pre>'; print_r($list); exit;
$slist = array();
$order = $this->discoconfig->getValue('taborder');
@@ -192,7 +191,7 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco {
$extDiscoveryStorage = $this->config->getString('idpdisco.extDiscoveryStorage',NULL);
if ($extDiscoveryStorage !== NULL) {
$this->log('Choice made [' . $idp . '] (Forwarding to external discovery storage)');
- SimpleSAML_Utilities::redirectTrustedURL($extDiscoveryStorage, array(
+ \SimpleSAML\Utils\HTTP::redirectTrustedURL($extDiscoveryStorage, array(
'entityID' => $this->spEntityId,
'IdPentityID' => $idp,
'returnIDParam' => $this->returnIdParam,
@@ -202,7 +201,7 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco {
} else {
$this->log('Choice made [' . $idp . '] (Redirecting the user back. returnIDParam=' . $this->returnIdParam . ')');
- SimpleSAML_Utilities::redirectTrustedURL($this->returnURL, array($this->returnIdParam => $idp));
+ \SimpleSAML\Utils\HTTP::redirectTrustedURL($this->returnURL, array($this->returnIdParam => $idp));
}
return;
@@ -210,7 +209,7 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco {
if ($this->isPassive) {
$this->log('Choice not made. (Redirecting the user back without answer)');
- SimpleSAML_Utilities::redirectTrustedURL($this->returnURL);
+ \SimpleSAML\Utils\HTTP::redirectTrustedURL($this->returnURL);
return;
}
@@ -225,7 +224,7 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco {
$t->data['return'] = $this->returnURL;
$t->data['returnIDParam'] = $this->returnIdParam;
$t->data['entityID'] = $this->spEntityId;
- $t->data['urlpattern'] = htmlspecialchars(SimpleSAML_Utilities::selfURLNoQuery());
+ $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['defaulttab'] = $this->discoconfig->getValue('defaulttab', 0);
@@ -307,7 +306,7 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco {
'secure' => TRUE,
'httponly' => FALSE,
);
- SimpleSAML_Utilities::setCookie('_saml_idp', $newCookie, $params, FALSE);
+ \SimpleSAML\Utils\HTTP::setCookie('_saml_idp', $newCookie, $params, FALSE);
}
diff --git a/modules/discopower/templates/disco-tpl.php b/modules/discopower/templates/disco-tpl.php
index f3c9814..ef1ec7d 100644
--- a/modules/discopower/templates/disco-tpl.php
+++ b/modules/discopower/templates/disco-tpl.php
@@ -50,17 +50,6 @@ if (!empty($faventry)) $this->data['autofocus'] = 'favouritesubmit';
$this->includeAtTemplateBase('includes/header.php');
-// foreach ($this->data['idplist'] AS $slist) {
-// foreach ($slist AS $idpentry) {
-// if (isset($idpentry['name']))
-// $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['name']);
-// if (isset($idpentry['description']))
-// $this->includeInlineTranslation('idpdesc_' . $idpentry['entityid'], $idpentry['description']);
-// }
-// }
-//
-
-
function showEntry($t, $metadata, $favourite = FALSE) {
$basequerystring = '?' .
@@ -73,21 +62,11 @@ function showEntry($t, $metadata, $favourite = FALSE) {
$html .= '' . htmlspecialchars(getTranslatedName($t, $metadata)) . '';
- #print_r($metadata['scopes']);
-
- // if (!empty($idpentry['description'])) {
- // $html .= ' <p>' . htmlspecialchars($t->t('idpdesc_' . $metadata['entityid'])) . '<br />';
- // }
-
if(array_key_exists('icon', $metadata) && $metadata['icon'] !== NULL) {
- $iconUrl = SimpleSAML_Utilities::resolveURL($metadata['icon']);
+ $iconUrl = \SimpleSAML\Utils\HTTP::resolveURL($metadata['icon']);
$html .= '<img alt="Icon for identity provider" class="entryicon" src="' . htmlspecialchars($iconUrl) . '" />';
}
-
- // $html .= '<input id="preferredidp" type="submit" name="idp_' .
- // htmlspecialchars($metadata['entityid']) . '" value="' .
- // $t->t('select') . '" /></p>';
-
+
$html .= '</a>';
return $html;
@@ -101,7 +80,6 @@ function showEntry($t, $metadata, $favourite = FALSE) {
<?php
function getTranslatedName($t, $metadata) {
-# if (is_null($metadata)) throw new Exception();
if (isset($metadata['UIInfo']['DisplayName'])) {
$displayName = $metadata['UIInfo']['DisplayName'];
assert('is_array($displayName)'); // Should always be an array of language code -> translation.
@@ -176,10 +154,6 @@ foreach( $this->data['idplist'] AS $tab => $slist) {
echo '<div id="' . $tab . '">';
if (!empty($slist)) {
-
- // echo 'Favourite :: ' . $this->data['preferredidp'];
- // echo '<pre>';
- // print_r($slist); exit;
echo(' <div class="inlinesearch">');
echo(' <p>Incremental search...</p>');