This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  d54b5a5ec9c1a96d1205cdabc8927307814c7d8a (commit)
      from  013706e1f7e45dfce09dd497e1453d7f4a291722 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=d54b5a5ec9c1a96d1205cdabc8927307814c7d8a

commit d54b5a5ec9c1a96d1205cdabc8927307814c7d8a
Author: Franck Villaume <[email protected]>
Date:   Sun Mar 5 11:14:42 2017 +0100

    clean up

diff --git a/src/plugins/authhttpd/common/AuthHTTPDPlugin.class.php 
b/src/plugins/authhttpd/common/AuthHTTPDPlugin.class.php
index dd0f2c4..bea45fe 100644
--- a/src/plugins/authhttpd/common/AuthHTTPDPlugin.class.php
+++ b/src/plugins/authhttpd/common/AuthHTTPDPlugin.class.php
@@ -97,7 +97,6 @@ FusionForge, for instance where Kerberos is used.");
                        if ($this->isSufficient()) {
                                $this->saved_user = $user;
                                $params['results'][$this->name] = 
FORGE_AUTH_AUTHORITATIVE_ACCEPT;
-
                        } else {
                                $params['results'][$this->name] = 
FORGE_AUTH_NOT_AUTHORITATIVE;
                        }
diff --git a/src/plugins/authopenid/include/AuthOpenIDPlugin.class.php 
b/src/plugins/authopenid/include/AuthOpenIDPlugin.class.php
index 3065d25..0e00107 100644
--- a/src/plugins/authopenid/include/AuthOpenIDPlugin.class.php
+++ b/src/plugins/authopenid/include/AuthOpenIDPlugin.class.php
@@ -117,7 +117,6 @@ class AuthOpenIDPlugin extends ForgeAuthPlugin {
                        if ($this->isSufficient()) {
                                $this->saved_user = $user;
                                $params['results'][$this->name] = 
FORGE_AUTH_AUTHORITATIVE_ACCEPT;
-
                        } else {
                                $params['results'][$this->name] = 
FORGE_AUTH_NOT_AUTHORITATIVE;
                        }
diff --git a/src/plugins/authwebid/include/AuthWebIDPlugin.class.php 
b/src/plugins/authwebid/include/AuthWebIDPlugin.class.php
index 299825d..5d53738 100644
--- a/src/plugins/authwebid/include/AuthWebIDPlugin.class.php
+++ b/src/plugins/authwebid/include/AuthWebIDPlugin.class.php
@@ -95,11 +95,7 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
                }
                $return_to = $params['return_to'];
 
-               $result = '';
-
-               $result .= '<p>';
-               $result .= _('Cookies must be enabled past this point.');
-               $result .= '</p>';
+               $result = html_e('p', array(), _('Cookies must be enabled past 
this point.'));
 
                // TODO Use a trusted IdP that was configured previously by the 
forge admin, and which is trusted by the libAuthentication checks
                //$result .= '<a 
href="https://foafssl.org/srv/idp?authreqissuer='. 
util_make_url('/plugins/authwebid/post-login.php') .'">Click here to Login via 
foafssl.org</a>';
@@ -113,7 +109,7 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
 
     /**
         * Is there a valid session?
-        * @param unknown_type $params
+        * @param       array   $params
         */
        function checkAuthSession(&$params) {
                $this->saved_user = NULL;
@@ -139,7 +135,6 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
                        if ($this->isSufficient()) {
                                $this->saved_user = $user;
                                $params['results'][$this->name] = 
FORGE_AUTH_AUTHORITATIVE_ACCEPT;
-
                        } else {
                                $params['results'][$this->name] = 
FORGE_AUTH_NOT_AUTHORITATIVE;
                        }
@@ -154,8 +149,8 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
 
        /**
         * Retrieve the user_name for a WebID URI stored in DB as a known ID
-        * @param string $webid_identity
-        * @return string
+        * @param       string  $webid_identity
+        * @return      string
         */
        public function getUserNameFromWebIDIdentity($webid_identity) {
                $user_name = FALSE;
@@ -172,8 +167,8 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
 
        /**
         * Check if a WebID is already used and bound to an account
-        * @param string $webid_identity
-        * @return boolean
+        * @param       string  $webid_identity
+        * @return      boolean
         */
        public function existStoredWebID($webid_identity) {
                $res = db_query_params('SELECT webid_identity FROM 
plugin_authwebid_user_identities WHERE webid_identity =$1',
@@ -188,8 +183,8 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
 
        /**
         * Load WebIDs already bound to an account (not the pending ones)
-        * @param string $user_id
-        * @return array
+        * @param       string  $user_id
+        * @return      array
         */
        public function getStoredBoundWebIDs($user_id) {
                $boundwebids = array();
@@ -211,9 +206,9 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
 
        /**
         * Check if a WebID is pending confirmation of binding for a user
-        * @param string $user_id
-        * @param string $webid_identity
-        * @return boolean
+        * @param       string  $user_id
+        * @param       string  $webid_identity
+        * @return      boolean
         */
        public function isStoredPendingWebID($user_id, $webid_identity) {
                // the pending WebIDs will be prefixed in the DB by 'pending:'
@@ -227,16 +222,15 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
                        } else {
                                return FALSE;
                        }
-               }
-               else {
+               } else {
                        return FALSE;
                }
        }
 
        /**
         * Load WebIDs already stored, but pending confirmation by a user
-        * @param string $user_id
-        * @return array
+        * @param       string  $user_id
+        * @return      array
         */
        public function getStoredPendingWebIDs($user_id) {
                $pendingwebids = array();
@@ -258,9 +252,9 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
 
        /**
         * Convert a WebID pending binding to a bound one
-        * @param string $user_id
-        * @param string $webid_identity
-        * @return string
+        * @param       string  $user_id
+        * @param       string  $webid_identity
+        * @return      string
         */
        public function bindStoredWebID($user_id, $webid_identity) {
                $error_msg = NULL;
@@ -275,17 +269,16 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
 
        /**
         * Store a WebID as pending binding to an account
-        * @param string $user_id
-        * @param string $webid_identity
-        * @return string
+        * @param       string  $user_id
+        * @param       string  $webid_identity
+        * @return      string
         */
        public function addStoredPendingWebID($user_id, $webid_identity) {
                $error_msg = NULL;
                // make sure not to add as pending to one account an already 
bound WebID for another
                if ($this->existStoredWebID($webid_identity)) {
                        $error_msg = _('WebID already used');
-               }
-               else {
+               } else {
                        // prefix it with the 'pending:' prefix
                        $webid_identity = 'pending:' . $webid_identity;
                        // make sure to not add the same pending WebID for two 
different accounts
@@ -303,9 +296,9 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
 
        /**
         * Remove a WebID (possibly pending) from the table
-        * @param string $user_id
-        * @param string $webid_identity
-        * @return string
+        * @param       string  $user_id
+        * @param       string  $webid_identity
+        * @return      string
         */
        public function removeStoredWebID($user_id, $webid_identity) {
                $error_msg = NULL;
@@ -351,7 +344,7 @@ class AuthWebIDPlugin extends ForgeAuthPlugin {
 
        /**
         * Return current WebID if the delegated Auth has proceeded
-        * @return string
+        * @return      string
         */
        public function getCurrentWebID() {
                $webid = FALSE;
diff --git a/src/plugins/authwebid/www/index.php 
b/src/plugins/authwebid/www/index.php
index f5c4a5b..f66ce2a 100644
--- a/src/plugins/authwebid/www/index.php
+++ b/src/plugins/authwebid/www/index.php
@@ -60,8 +60,7 @@ if (getStringFromRequest('sig') != '') {
                        } else {
                                $feedback = _('The IdP has confirmed that you 
own this WebID. It is now bound to your account.');
                        }
-               }
-               else {
+               } else {
                        // or it's the first time we went to the IdP, and we 
wait until the confirmation of the binding to really use it
                        $error_msg = 
$plugin->addStoredPendingWebID($u->getID(), $webid_identity);
                        if ($error_msg) {
@@ -90,79 +89,75 @@ $title = sprintf(_('Manage WebID identities for user %s'), 
$u->getUnixName());
 site_user_header(array('title'=>$title));
 
 echo $HTML->boxTop(_('My WebID identities'));
+echo html_e('h2', array(), _('Bind a new WebID'));
+?>
+<p><?php
+
+       echo _('You can add your own WebID identities in the form below.') . 
'<br />';
+       echo _('Once you have confirmed their binding to your fusionforge 
account, you may use them to login.') ?></p>
 
+<?php
+// display a table of WebIDs pending binding
+$pendingwebids = $plugin->getStoredPendingWebIDs($u->getID());
+if( count($pendingwebids) ) {
+       echo $HTML->listTableTop(array(_('Already pending WebIDs you could bind 
to your account'), ''));
+
+       $i = 0;
+       foreach($pendingwebids as $webid_identity) {
+               echo '<tr '.$HTML->boxGetAltRowStyle($i).'>';
+               echo '<td><i>'. $webid_identity .'</i></td>';
+               echo '<td><b>'. 
$plugin->displayAuthentifyViaIdPLink(util_make_uri('/plugins/authwebid/index.php'),
 _('Confirm binding')) . '</b></td>';
+               echo 
'<td>'.util_make_link('/plugins/authwebid/?webid_identity='.urlencode('pending:'.$webid_identity).'&delete=1',
 _('remove')).'</td>';
+               echo '</tr>';
+               $i++;
+       }
+       echo $HTML->listTableBottom();
+}
+//This form isn't one any more actually, but decorations is nice like this
+echo $HTML->openForm(array('name' => 'new_identity', 'action' => 
'/plugins/authwebid/', 'method' => 'post'))
 ?>
-       <h2><?php echo _('Bind a new WebID'); ?></h2>
-
-               <p><?php
-
-                       echo _('You can add your own WebID identities in the 
form below.') . '<br />';
-                       echo _('Once you have confirmed their binding to your 
fusionforge account, you may use them to login.') ?></p>
-
-               <?php
-               // display a table of WebIDs pending binding
-               $pendingwebids = $plugin->getStoredPendingWebIDs($u->getID());
-               if( count($pendingwebids) ) {
-                       echo $HTML->listTableTop(array(_('Already pending 
WebIDs you could bind to your account'), ''));
-
-                       $i = 0;
-                       foreach($pendingwebids as $webid_identity) {
-                               echo '<tr '.$HTML->boxGetAltRowStyle($i).'>';
-                               echo '<td><i>'. $webid_identity .'</i></td>';
-                               echo '<td><b>'. 
$plugin->displayAuthentifyViaIdPLink(util_make_uri('/plugins/authwebid/index.php'),
 _('Confirm binding')) . '</b></td>';
-                               echo 
'<td>'.util_make_link('/plugins/authwebid/?webid_identity='.urlencode('pending:'.$webid_identity).'&delete=1',
 _('remove')).'</td>';
-                               echo '</tr>';
-                               $i++;
-                       }
-                       echo $HTML->listTableBottom();
-               }
-               //This form isn't one any more actually, but decorations is 
nice like this
-               echo $HTML->openForm(array('name' => 'new_identity', 'action' 
=> '/plugins/authwebid/', 'method' => 'post'))
-               ?>
-                       <fieldset>
-                               <legend><?php echo _('Bind a new WebID'); 
?></legend>
-                               <p>
-                                       <?php
-                                               echo '</p><p>';
-                                               // redirect link to the IdP
-                                               // This might as well confirm 
binding just as if using the Confirm link, if user has only one WebID 
recognized by the IdP
-                                               echo '<b>'. 
$plugin->displayAuthentifyViaIdPLink(util_make_uri('/plugins/authwebid/index.php'),
-                                                                               
                                                                sprintf( 
_('Click here to initiate the addition of a new WebID validated via %s'),
-                                                                               
                                                                                
 $plugin->delegate_webid_auth_to)) . '</b>';
-                               ?>
-                               </p>
-                       </fieldset>
-               <?php
-               echo $HTML->closeForm();
+       <fieldset>
+               <legend><?php echo _('Bind a new WebID'); ?></legend>
+               <p>
+                       <?php
+                               echo '</p><p>';
+                               // redirect link to the IdP
+                               // This might as well confirm binding just as 
if using the Confirm link, if user has only one WebID recognized by the IdP
+                               echo '<b>'. 
$plugin->displayAuthentifyViaIdPLink(util_make_uri('/plugins/authwebid/index.php'),
+                                                                               
                sprintf( _('Click here to initiate the addition of a new WebID 
validated via %s'),
+                                                                               
                        $plugin->delegate_webid_auth_to)) . '</b>';
                ?>
-               <h2><?php echo _('My WebIDs'); ?></h2>
-               <?php
-
-               // now display existing bound identities
+               </p>
+       </fieldset>
+<?php
+echo $HTML->closeForm();
+?>
+<h2><?php echo _('My WebIDs'); ?></h2>
+<?php
 
+// now display existing bound identities
 
-               $boundwebids = $plugin->getStoredBoundWebIDs($u->getID());
 
-               if(count($boundwebids)) {
-                       echo $HTML->listTableTop(array(_('WebIDs already bound 
to your account, which you can use to login'), ''));
-                       $i = 0;
+$boundwebids = $plugin->getStoredBoundWebIDs($u->getID());
 
-                       foreach($boundwebids as $webid_identity) {
-                               echo '<tr '.$HTML->boxGetAltRowStyle($i).'>';
-                               echo '<td>'. $webid_identity .'</td>';
-                               echo 
'<td>'.util_make_link('/plugins/authwebid/?webid_identity='.urlencode($webid_identity).'&delete=1',
 _('remove')).'</td>';
-                               echo '</tr>';
-                               $i++;
-                       }
+if(count($boundwebids)) {
+       echo $HTML->listTableTop(array(_('WebIDs already bound to your account, 
which you can use to login'), ''));
+       $i = 0;
 
-                       echo $HTML->listTableBottom();
-               }
-               else {
-                       echo '<p>'. _("You haven't yet bound any WebID to your 
account") . '</p>';
-               }
+       foreach($boundwebids as $webid_identity) {
+               echo '<tr '.$HTML->boxGetAltRowStyle($i).'>';
+               echo '<td>'. $webid_identity .'</td>';
+               echo 
'<td>'.util_make_link('/plugins/authwebid/?webid_identity='.urlencode($webid_identity).'&delete=1',
 _('remove')).'</td>';
+               echo '</tr>';
+               $i++;
+       }
 
+       echo $HTML->listTableBottom();
+} else {
+       echo html_e('p', array(), _("You haven't yet bound any WebID to your 
account"));
+}
 
-               echo $HTML->boxBottom();
+echo $HTML->boxBottom();
 
 site_user_footer();
 

-----------------------------------------------------------------------

Summary of changes:
 .../authhttpd/common/AuthHTTPDPlugin.class.php     |   1 -
 .../authopenid/include/AuthOpenIDPlugin.class.php  |   1 -
 .../authwebid/include/AuthWebIDPlugin.class.php    |  57 +++++-----
 src/plugins/authwebid/www/index.php                | 125 ++++++++++-----------
 4 files changed, 85 insertions(+), 99 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to