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  d9311374a9b48f20bf378d9002493d754067d1ff (commit)
       via  2b29cf0c07e0b6da499c090f32b7de3fd545003a (commit)
       via  57c365023e3002d9e250120f5edc90b8ad94efa0 (commit)
       via  5d0b4879e633b547228ff9617caea0605e8a4a2c (commit)
      from  db6abd4f845b9a6d51393b28ddb53de38630cb7d (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=d9311374a9b48f20bf378d9002493d754067d1ff

commit d9311374a9b48f20bf378d9002493d754067d1ff
Merge: 5d0b487 2b29cf0
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Tue May 18 19:04:11 2021 +0200

    Merge remote-tracking branch 'rhabacker/master-ticket-934'


https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=2b29cf0c07e0b6da499c090f32b7de3fd545003a

commit 2b29cf0c07e0b6da499c090f32b7de3fd545003a
Author: Ralf Habacker <ralf.habac...@freenet.de>
Date:   Mon May 17 13:20:50 2021 +0200

    [#934] enable cross-referencing in release note and changes

diff --git a/src/common/frs/views/editrelease.php 
b/src/common/frs/views/editrelease.php
index c09b1f1..4bfd047 100644
--- a/src/common/frs/views/editrelease.php
+++ b/src/common/frs/views/editrelease.php
@@ -107,13 +107,15 @@ if (forge_check_perm('frs', $package_id, 'admin')) {
        $cells = array();
        $cells[] = array('<input type="file" name="uploaded_changes" />', 
'colspan' => 2);
        echo $HTML->multiTableRow(array(), $cells);
+
+       $title = util_gen_cross_ref_hints();
        $cells = array();
        $cells[] = array('<strong>'._('Paste The Notes 
In')._(':').'</strong><br/>'.
-                       '<textarea name="release_notes" rows="10" 
cols="60">'.$frsr->getNotes().'</textarea>', 'colspan' => 2);
+               html_e('textarea', array('name' => 'release_notes', 'rows' => 
'10', 'cols' => '60', 'title' => $title), $frsr->getNotes()), 'colspan' => 2);
        echo $HTML->multiTableRow(array(), $cells);
        $cells = array();
        $cells[] = array('<strong>'._('Paste The Change Log 
In')._(':').'</strong><br/>'.
-                       '<textarea name="release_changes" rows="10" 
cols="60">'.$frsr->getChanges().'</textarea>', 'colspan' => 2);
+               html_e('textarea', array('name' => 'release_changes', 'rows' => 
'10', 'cols' => '60', 'title' => $title), $frsr->getChanges()), 'colspan' => 2);
        echo $HTML->multiTableRow(array(), $cells);
        $cells = array();
        $cells[] = array('<input type="checkbox" name="preformatted" value="1" 
'.(($frsr->getPreformatted())?'checked="checked"':'').' />'._('Preserve my 
pre-formatted text').
diff --git a/src/common/frs/views/shownotes.php 
b/src/common/frs/views/shownotes.php
index 963b39d..9a1352a 100644
--- a/src/common/frs/views/shownotes.php
+++ b/src/common/frs/views/shownotes.php
@@ -71,7 +71,7 @@ if ($frsr->getPreformatted()) {
 
 if (strlen($frsr->getNotes())) {
        echo $HTML->boxTop(_('Release Notes'));
-       echo html_e($htmltag, array(), $frsr->getNotes());
+       echo html_e($htmltag, array(), util_gen_cross_ref($frsr->getNotes(), 
$group_id), false, false);
        echo $HTML->boxBottom();
 } else {
        echo $HTML->information(_('No release notes'));
@@ -79,7 +79,7 @@ if (strlen($frsr->getNotes())) {
 
 if (strlen($frsr->getChanges())) {
        echo $HTML->boxTop(_('Change Log'));
-       echo html_e($htmltag, array(), $frsr->getChanges());
+       echo html_e($htmltag, array(), util_gen_cross_ref($frsr->getChanges(), 
$group_id), false, false);
        echo $HTML->boxBottom();
 } else {
        echo $HTML->information(_('No change log'));

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=57c365023e3002d9e250120f5edc90b8ad94efa0

commit 57c365023e3002d9e250120f5edc90b8ad94efa0
Author: Ralf Habacker <ralf.habac...@freenet.de>
Date:   Mon May 17 13:20:15 2021 +0200

    utils_gen_cross_ref_hints(): new function to return edit hints provided by 
utils_gen_cross_ref()

diff --git a/src/common/docman/views/addfile.php 
b/src/common/docman/views/addfile.php
index fc8bf24..dd1c229 100644
--- a/src/common/docman/views/addfile.php
+++ b/src/common/docman/views/addfile.php
@@ -101,7 +101,7 @@ if ($dgf->getNested($stateidArr) == NULL) {
        echo $HTML->multiTableRow(array(), $cells);
        $cells = array();
        $cells[][] = _('Description') .utils_requiredField();
-       $cells[][] = html_e('textarea', array('minlength' => 10, 'placeholder' 
=> _('Description').' '.sprintf(_('(at least %s characters)'), 
DOCMAN__DESCRIPTION_MIN_SIZE), 'title' => _('Editing tips:http,https or ftp: 
Hyperlinks. [#NNN]: Tracker id NNN. [TNNN]: Task id NNN. 
[wiki:&lt;pagename&gt;]: Wiki page. [forum:&lt;msg_id&gt;]: Forum post. [DNNN]: 
Document id NNN.'), 'name' => 'description', 'rows' => 5, 'cols' => 50, 
'maxlength' => DOCMAN__DESCRIPTION_MAX_SIZE, 'required' => 'required'), '', 
false);
+       $cells[][] = html_e('textarea', array('minlength' => 10, 'placeholder' 
=> _('Description').' '.sprintf(_('(at least %s characters)'), 
DOCMAN__DESCRIPTION_MIN_SIZE), 'title' => util_gen_cross_ref_hints(), 'name' => 
'description', 'rows' => 5, 'cols' => 50, 'maxlength' => 
DOCMAN__DESCRIPTION_MAX_SIZE, 'required' => 'required'), '', false);
        echo $HTML->multiTableRow(array(), $cells);
        $cells = array();
        $cells[][] = _('Comment');
diff --git a/src/common/docman/views/editfile.php 
b/src/common/docman/views/editfile.php
index b0300bd..ffa048d 100644
--- a/src/common/docman/views/editfile.php
+++ b/src/common/docman/views/editfile.php
@@ -95,7 +95,7 @@ $cells[][] = html_e('input', array('pattern' => '.{5,}', 
'required' => 'required
 echo $HTML->multiTableRow(array(), $cells);
 $cells = array();
 $cells[] = array(_('Description').utils_requiredField()._(':'), 'class' => 
'docman_editfile_description');
-$cells[][] = html_e('textarea', array('pattern' => '.{10,}', 'required' => 
'required', 'title' => _('Editing tips:http,https or ftp: Hyperlinks. [#NNN]: 
Tracker id NNN. [TNNN]: Task id NNN. [wiki:&lt;pagename&gt;]: Wiki page. 
[forum:&lt;msg_id&gt;]: Forum post. [DNNN]: Document id NNN.').
+$cells[][] = html_e('textarea', array('pattern' => '.{10,}', 'required' => 
'required', 'title' => util_gen_cross_ref_hints().
                                                                                
sprintf(_('at least %s characters)'), 10), 'id' => 'description', 'name' => 
'description', 'maxlength' => '255', 'rows' => '5', 'style' => 'box-sizing: 
border-box; width: 100%'), '', false);
 echo $HTML->multiTableRow(array(), $cells);
 $cells = array();
diff --git a/src/common/include/html.php b/src/common/include/html.php
index dbb6745..bc8f7a4 100644
--- a/src/common/include/html.php
+++ b/src/common/include/html.php
@@ -453,7 +453,7 @@ function html_get_tooltip_description($element_name) {
                        return $text;
                case 'description':
                        $text = _('Enter the complete description.')
-                               ._("Editing tips:http,https or ftp: Hyperlinks. 
[#NNN]: Tracker id NNN. [TNNN]: Task id NNN. [wiki:&lt;pagename&gt;]: Wiki 
page. [forum:&lt;msg_id&gt;]: Forum post. [DNNN]: Document id NNN.");
+                               .util_gen_cross_ref_hints();
                        if (forge_get_config('tracker_parser_type') == 
'markdown') {
                                $text .= ' '._('Use Markdown Syntax');
                        }
diff --git a/src/common/include/utils_crossref.php 
b/src/common/include/utils_crossref.php
index 9af355b..9884112 100644
--- a/src/common/include/utils_crossref.php
+++ b/src/common/include/utils_crossref.php
@@ -64,6 +64,15 @@ function util_gen_cross_ref($text, $group_id = 0) {
        return $text;
 }
 
+/**
+ * Return string with cross referencing hints
+ *
+ * @return string
+ */
+function util_gen_cross_ref_hints() {
+       return _('Editing tips:http,https or ftp: Hyperlinks. [#NNN]: Tracker 
id NNN. [TNNN]: Task id NNN. [wiki:&lt;pagename&gt;]: Wiki page. 
[forum:&lt;msg_id&gt;]: Forum post. [DNNN]: Document id NNN. [RNNN]: File 
Release id NNN.');
+}
+
 function _page2url($group_id, $page) {
        $params = array();
        $params['group_id'] = $group_id;

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=5d0b4879e633b547228ff9617caea0605e8a4a2c

commit 5d0b4879e633b547228ff9617caea0605e8a4a2c
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Mon May 17 23:52:30 2021 +0200

    clean-up: remove useless double parenthesis

diff --git a/src/common/tracker/ArtifactType.class.php 
b/src/common/tracker/ArtifactType.class.php
index 4a85050..2ed784b 100644
--- a/src/common/tracker/ArtifactType.class.php
+++ b/src/common/tracker/ArtifactType.class.php
@@ -973,7 +973,7 @@ class ArtifactType extends FFError {
                        $type = $oef->getType();
                        if (in_array($type, 
unserialize(ARTIFACT_EXTRAFIELDTYPEGROUP_VALUE)) || $type == 
ARTIFACT_EXTRAFIELDTYPE_USER) {
                                $default = $oef->getDefaultValues();
-                               if (($type==ARTIFACT_EXTRAFIELDTYPE_INTEGER && 
$default != 0)) {
+                               if ($type==ARTIFACT_EXTRAFIELDTYPE_INTEGER && 
$default != 0) {
                                        $nef->setDefaultValues($default);
                                } elseif ($type==ARTIFACT_EXTRAFIELDTYPE_USER 
&& $default != 100) {
                                        $roleEls = 
$this->getExtraFieldElements($newEFId);
diff --git a/src/common/tracker/actions/tracker.php 
b/src/common/tracker/actions/tracker.php
index a0a828a..aa17164 100644
--- a/src/common/tracker/actions/tracker.php
+++ b/src/common/tracker/actions/tracker.php
@@ -304,12 +304,12 @@ switch (getStringFromRequest('func')) {
                                        if 
($ah->addMessage($details,$user_email,true)) {
                                                $feedback=_('Comment added');
                                        } else {
-                                               if ( (strlen($details)>0) ) { 
//if there was no message, then it's not an error but addMessage returns false 
and sets missing params error
+                                               if (strlen($details) > 0) { 
//if there was no message, then it's not an error but addMessage returns false 
and sets missing params error
                                                        //some kind of error in 
creation
                                                        
exit_error($ah->getErrorMessage(),'tracker');
                                                } else {
                                                        // we have to unset the 
error if the user added a file ( add a file and no comment)
-                                                       if ( 
(getStringFromRequest('add_file')) ) {
+                                                       if 
(getStringFromRequest('add_file')) {
                                                                
$ah->clearError();
                                                        }
                                                }
diff --git a/src/cronjobs/shell/homedirs.php b/src/cronjobs/shell/homedirs.php
index 1806608..061fd05 100755
--- a/src/cronjobs/shell/homedirs.php
+++ b/src/cronjobs/shell/homedirs.php
@@ -107,7 +107,7 @@ if (forge_get_config('use_ftp')) {
 
 /* read in the group home template file */
 $contents = '';
-if (($fo = fopen(dirname(__FILE__) . '/../../templates/default_page.php', 
'r'))) {
+if ($fo = fopen(dirname(__FILE__) . '/../../templates/default_page.php', 'r')) 
{
        while (!feof($fo)) {
                $contents .= fread($fo, 8192);
        }
@@ -150,7 +150,7 @@ while ($row = db_fetch_array($res)) {
                #@mkdir($ghome . '/cgi-bin');
 
                /* write substituted template to group home */
-               if (($fw = fopen($ghome . '/htdocs/index.html', 'w'))) {
+               if ($fw = fopen($ghome . '/htdocs/index.html', 'w')) {
                        fwrite($fw, str_replace('##comment##',
                            _('Default Web Page for groups that haven\'t setup 
their page yet'),
                            str_replace('##purpose##',
diff --git a/src/plugins/forumml/www/forumml_utils.php 
b/src/plugins/forumml/www/forumml_utils.php
index 65a58cc..72245ac 100644
--- a/src/plugins/forumml/www/forumml_utils.php
+++ b/src/plugins/forumml/www/forumml_utils.php
@@ -42,7 +42,6 @@ function getForumMLDao() {
 
 // Get message headers
 function plugin_forumml_get_message_headers($id_message) {
-
        return getForumMLDao()->getMessageHeaders($id_message)->getRow();
 }
 
@@ -188,7 +187,7 @@ function 
plugin_forumml_show_all_threads($p,$list_id,$list_name,$offset) {
 
                $hp =& ForumML_HTMLPurifier::instance();
                $i = 0;
-               while (($msg = $result->getRow())) {
+               while ($msg = $result->getRow()) {
                        $i++;
                        if ($i % 2 == 0) {
                                $class="boxitemalt bgcolor-white";
@@ -257,7 +256,7 @@ function plugin_forumml_nb_children($parents) {
                $result = 
getForumMLDao()->countChildrenFromParents(implode(',',$parents));
                if ($result && !$result->isError()) {
                        $p = array();
-                       while (($row = $result->getRow())) {
+                       while ($row = $result->getRow()) {
                                $p[] = $row['id_message'];
                        }
                        $num = $result->rowCount();
diff --git a/src/plugins/mailman/include/BackendMailmanList.class.php 
b/src/plugins/mailman/include/BackendMailmanList.class.php
index d78990a..b860b1a 100644
--- a/src/plugins/mailman/include/BackendMailmanList.class.php
+++ b/src/plugins/mailman/include/BackendMailmanList.class.php
@@ -99,54 +99,48 @@ class BackendMailmanList {
     }
 
 
-    /**
-     * Create new mailing list with mailman 'newlist' tool
-     * then update the list configuration according to list settings
-     * @return true on success, false otherwise
-     */
-    public function createList($group_list_id) {
-
-        $dar = 
$this->_getMailingListDao()->searchByGroupListId($group_list_id);
-
-        if ($row = $dar->getRow()) {
-            $list = new MailmanList($row['group_id'],$row['group_list_id']);
-            
$user=UserManager::instance()->getUserByID($list->getListAdminId());
-           $list_admin_email= $user->getEmail();
-            $list_dir = $GLOBALS['mailman_lib_dir']."/lists/".$list->getName();
-
-           if($list->isPublic() != 9) {
-                   if ((! is_dir($list_dir))) {
-                           // Create list
-                           system($GLOBALS['mailman_bin_dir']."/newlist -q 
".$list->getName()." ".$list_admin_email." ".$list->getPassword()." 
>/dev/null");
-                           // Then update configuraion
-                           if( is_dir($list_dir) && 
$this->updateListConfig($list) !=false ) {
-                                   $result = $this->_getMailingListDao() -> 
updateList($list->getID(),$row['group_id'], $list->getDescription(), 
$list->isPublic(),'3');
-                                   if (!$result) {
-                                           printf('Unable to update the list 
status: '.db_error());
-                                           return false;
-                                   }
-                                   else {
-                                           return true;
-                                   }
-                           }
-                           else {
-                                   return false;
-                           }
-                   }
-                   else {
-                           $result = $this->_getMailingListDao() -> 
updateList($list->getID(),$row['group_id'], $list->getDescription(), 
$list->isPublic(),'3');
-                           if (!$result) {
-                                   printf('Unable to update the list status: 
'.db_error());
-                                   return false;
-                           }
-                           else {
-                                   return true;
-                           }
-                   }
-           }
+       /**
+        * Create new mailing list with mailman 'newlist' tool
+        * then update the list configuration according to list settings
+        * @return true on success, false otherwise
+        */
+       public function createList($group_list_id) {
+               $dar = 
$this->_getMailingListDao()->searchByGroupListId($group_list_id);
+               if ($row = $dar->getRow()) {
+                       $list = new 
MailmanList($row['group_id'],$row['group_list_id']);
+                       
$user=UserManager::instance()->getUserByID($list->getListAdminId());
+                       $list_admin_email= $user->getEmail();
+                       $list_dir = 
$GLOBALS['mailman_lib_dir']."/lists/".$list->getName();
+
+                       if($list->isPublic() != 9) {
+                               if (! is_dir($list_dir)) {
+                                       // Create list
+                                       
system($GLOBALS['mailman_bin_dir']."/newlist -q ".$list->getName()." 
".$list_admin_email." ".$list->getPassword()." >/dev/null");
+                                       // Then update configuraion
+                                       if( is_dir($list_dir) && 
$this->updateListConfig($list) !=false ) {
+                                               $result = 
$this->_getMailingListDao() -> updateList($list->getID(),$row['group_id'], 
$list->getDescription(), $list->isPublic(),'3');
+                                               if (!$result) {
+                                                       printf('Unable to 
update the list status: '.db_error());
+                                                       return false;
+                                               } else {
+                                                       return true;
+                                               }
+                                       } else {
+                                               return false;
+                                       }
+                               } else {
+                                       $result = $this->_getMailingListDao() 
-> updateList($list->getID(),$row['group_id'], $list->getDescription(), 
$list->isPublic(),'3');
+                                       if (!$result) {
+                                               printf('Unable to update the 
list status: '.db_error());
+                                               return false;
+                                       } else {
+                                               return true;
+                                       }
+                               }
+                       }
+               }
+               return false;
        }
-       return false;
-    }
 
     /**
      * Delete mailing list
diff --git 
a/src/plugins/mediawiki/MonoBookFusionForge/SkinMonoBookFusionForge.php 
b/src/plugins/mediawiki/MonoBookFusionForge/SkinMonoBookFusionForge.php
index 1154996..4da384a 100644
--- a/src/plugins/mediawiki/MonoBookFusionForge/SkinMonoBookFusionForge.php
+++ b/src/plugins/mediawiki/MonoBookFusionForge/SkinMonoBookFusionForge.php
@@ -59,8 +59,7 @@ class SkinMonoBookFusionForge extends SkinTemplate {
 function setupTemplate( $classname, $repository = false, $cache_dir = false ) {
                $tc = new $classname();
                $tc->params = array();
-               if (($tc->project = $project =
-                       
group_get_object_by_name($GLOBALS['fusionforgeproject']))) {
+               if ($tc->project = $project = 
group_get_object_by_name($GLOBALS['fusionforgeproject'])) {
                        $tc->params['group'] = $GLOBALS['group_id'] =
                        $project->getID();
                        $tc->params['toptab'] = 'mediawiki';
diff --git a/src/plugins/mediawiki/mediawiki-skin/FusionForge.php 
b/src/plugins/mediawiki/mediawiki-skin/FusionForge.php
index ee1bd27..ed3e634 100644
--- a/src/plugins/mediawiki/mediawiki-skin/FusionForge.php
+++ b/src/plugins/mediawiki/mediawiki-skin/FusionForge.php
@@ -43,8 +43,8 @@ class SkinFusionForge extends SkinTemplate {
                $tc = new $classname();
 
                $tc->params = array();
-               if (($tc->project = $project =
-                       
group_get_object_by_name($GLOBALS['fusionforgeproject']))) {
+               if ($tc->project = $project =
+                       
group_get_object_by_name($GLOBALS['fusionforgeproject'])) {
                        $tc->params['group'] = $GLOBALS['group_id'] =
                        $project->getID();
                        $tc->params['toptab'] = 'mediawiki';
diff --git a/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.patch 
b/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.patch
index 74d99f0..1872f1a 100644
--- a/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.patch
+++ b/src/plugins/mediawiki/mediawiki-skin/FusionForge.php.patch
@@ -8,8 +8,8 @@
 +              $tc = new $classname();
 +
 +              $tc->params = array();
-+              if (($tc->project = $project =
-+                      
group_get_object_by_name($GLOBALS['fusionforgeproject']))) {
++              if ($tc->project = $project =
++                      
group_get_object_by_name($GLOBALS['fusionforgeproject'])) {
 +                      $tc->params['group'] = $GLOBALS['group_id'] =
 +                      $project->getID();
 +                      $tc->params['toptab'] = 'mediawiki';
diff --git a/src/plugins/oauthconsumer/include/provider_api.php 
b/src/plugins/oauthconsumer/include/provider_api.php
index 211d7ba..dfec047 100644
--- a/src/plugins/oauthconsumer/include/provider_api.php
+++ b/src/plugins/oauthconsumer/include/provider_api.php
@@ -87,10 +87,10 @@ class OAuthProvider {
        }
 
        static function convert_row_to_object($row)     {
-               if($row!=null)  {
+               if ($row!=null) {
                        $provider = new OAuthProvider($row['name'], 
$row['description'], $row['consumer_key'], $row['consumer_secret'], 
$row['request_token_url'], $row['authorize_url'], $row['access_token_url'], 
$row['id']);
                        return $provider;
-               }else {
+               } else {
                        return null;
                }
        }
@@ -109,7 +109,7 @@ class OAuthProvider {
                return $provider;
        }
 
-       static function get_all_oauthproviders()        {
+       static function get_all_oauthproviders() {
                $conn = FFOAuthDataStore::singleton();
                $rows = $conn->find_all_providers();
                $providers = array();
@@ -121,46 +121,33 @@ class OAuthProvider       {
        }
 
        static function check_provider_values($new=TRUE, $name, $description, 
$consumer_key, $consumer_secret, $request_token_url, $authorize_url, 
$access_token_url)   {
-               if ((!trim($name))) {
+               if (!trim($name)) {
                        return "The field 'Name' is empty! ";
-               }
-               elseif ((!trim($description))) {
+               } elseif (!trim($description)) {
                        return "The field 'Description' is empty! ";
-               }
-               elseif ((!trim($consumer_key))) {
+               } elseif (!trim($consumer_key)) {
                        return "The field 'Consumer Key' is empty! ";
-               }
-               elseif ((!trim($consumer_secret))) {
+               } elseif (!trim($consumer_secret)) {
                        return "The field 'Consumer Secret' is empty! ";
-               }
-               elseif(strlen($name)<5) {
+               } elseif (strlen($name)<5) {
                        return "The field 'Name' cannot be less than 5 
characters!";
-               }
-               elseif(strlen($name)>15)        {
+               } elseif (strlen($name)>15) {
                        return "The field 'Name' cannot be more than 15 
characters!";
-               }
-               elseif(is_numeric(substr($name, 0, 1))) {
+               } elseif (is_numeric(substr($name, 0, 1))) {
                        return "The field 'Name' cannot begin with a numeral!";
-               }
-               elseif((substr($name, 0, 1))=="_")      {
+               }  elseif ((substr($name, 0, 1)) == "_") {
                        return "The field 'Name' cannot begin with an 
underscore!";
-               }
-               elseif(preg_match('/^[A-z][A-z_0-9]{4,}/', $name)==0)   {
+               } elseif (preg_match('/^[A-z][A-z_0-9]{4,}/', $name) == 0) {
                        return "The field 'Name' can only contain alphabets 
(a-z,A-Z), numbers (0-9) and underscores (_). Please choose a Name 
accordingly!";
-               }
-               elseif($new && self::provider_exists($name))    {
+               } elseif ($new && self::provider_exists($name)) {
                        return "The name '".$name."' has already been taken. 
Please choose another!";
-               }
-               
elseif((trim($request_token_url))&&(!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i',
 $request_token_url)))       {
+               } elseif (trim($request_token_url) && 
(!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', 
$request_token_url))) {
                        return "The Request Token URL is not valid.";
-               }
-               
elseif((trim($authorize_url))&&(!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i',
 $authorize_url)))       {
+               } elseif (trim($authorize_url) && 
(!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', 
$authorize_url))) {
                        return "The Authorization URL is not valid.";
-               }
-               
elseif((trim($access_token_url))&&(!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i',
 $access_token_url))) {
+               } elseif (trim($access_token_url) && 
(!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', 
$access_token_url))) {
                        return "The Access Token URL is not valid.";
-               }
-               else {
+               } else {
                        return null;
                }
        }
@@ -178,7 +165,7 @@ class OAuthProvider {
 
        function write_to_db() {
                if ( strlen(trim( $this->name ))==0 || strlen(trim( 
$this->description ))==0 || strlen(trim( $this->consumer_key ))==0 || 
strlen(trim( $this->consumer_secret ))==0 ) {
-                       exit_error( "Error trying to add the oauth provider. 
Please try again.", 'oauthconsumer' );
+                       exit_error("Error trying to add the oauth provider. 
Please try again.", 'oauthconsumer' );
                }
                $conn = FFOAuthDataStore::singleton();
                $id = $conn->save_provider($this);
@@ -192,13 +179,12 @@ class OAuthProvider       {
        function delete()       {
                $conn = FFOAuthDataStore::singleton();
                $id = $this->get_id();
-               if($id!=0)      {
+               if ($id!=0) {
                        if(!($conn->delete_provider($id)))      {
                                exit_error("Error trying to delete provider 
from DB", 'oauthconsumer');
                        }
-               }else   {
+               } else  {
                        exit_error("Trying to delete non-existent provider from 
DB", 'oauthconsumer');
                }
        }
-
 }
diff --git a/src/plugins/oauthprovider/include/consumer_api.php 
b/src/plugins/oauthprovider/include/consumer_api.php
index 0f226af..13fb72a 100644
--- a/src/plugins/oauthprovider/include/consumer_api.php
+++ b/src/plugins/oauthprovider/include/consumer_api.php
@@ -87,29 +87,29 @@ class OauthAuthzConsumer extends OAuthConsumer {
        }
 
        static function check_consumer_values($p_consumer_name, 
$p_consumer_url, $p_consumer_desc, $p_consumer_email)   {
-               if ((!trim($p_consumer_name))) {
+               if (!trim($p_consumer_name)) {
                        //$missing_params[] = _('"Consumer Name"');
-                       return "The field 'Consumer Name' is empty! ";
+                       return "The field 'Consumer Name' is empty!";
                        //exit_missing_param('', 
$missing_params,'oauthprovider');
-               } elseif ((!trim($p_consumer_url))) {
-                       return "The field 'Consumer URL' is empty! ";
-               } elseif ((!trim($p_consumer_desc))) {
-                       return "The field 'Consumer Description' is empty! ";
-               } elseif ((!trim($p_consumer_email))) {
-                       return "The field 'Consumer Email' is empty! ";
-               } elseif(strlen($p_consumer_name)<5)    {
+               } elseif (!trim($p_consumer_url)) {
+                       return "The field 'Consumer URL' is empty!";
+               } elseif (!trim($p_consumer_desc)) {
+                       return "The field 'Consumer Description' is empty!";
+               } elseif (!trim($p_consumer_email)) {
+                       return "The field 'Consumer Email' is empty!";
+               } elseif (strlen($p_consumer_name)<5) {
                        return "The Consumer Name cannot be less than 5 
characters!";
-               } elseif(strlen($p_consumer_name)>15)   {
+               } elseif (strlen($p_consumer_name)>15) {
                        return "The Consumer Name cannot be more than 15 
characters!";
-               } elseif(is_numeric(substr($p_consumer_name, 0, 1)))    {
+               } elseif (is_numeric(substr($p_consumer_name, 0, 1))) {
                        return "The Consumer Name cannot begin with a numeral!";
-               } elseif((substr($p_consumer_name, 0, 1))=="_") {
+               } elseif ((substr($p_consumer_name, 0, 1)) == "_") {
                        return "The Consumer Name cannot begin with an 
underscore!";
-               } elseif(preg_match('/^[A-z][A-z_0-9]{4,}/', 
$p_consumer_name)==0)      {
+               } elseif (preg_match('/^[A-z][A-z_0-9]{4,}/', $p_consumer_name) 
== 0) {
                        return "The Consumer Name can only contain alphabets 
(a-z,A-Z), numbers (0-9) and underscores (_). Please choose a Consumer Name 
accordingly!";
-               } elseif(OauthAuthzConsumer::consumer_exists($p_consumer_name)) 
{
+               } elseif 
(OauthAuthzConsumer::consumer_exists($p_consumer_name)) {
                        return "The name '".$p_consumer_name."' has already 
been taken. Please choose another!";
-               } 
elseif(!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', 
$p_consumer_url))      {
+               } elseif 
(!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', 
$p_consumer_url)) {
                        return "The Consumer URL is not valid.";
                } else {
                        return null;

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

Summary of changes:
 src/common/docman/views/addfile.php                |  2 +-
 src/common/docman/views/editfile.php               |  2 +-
 src/common/frs/views/editrelease.php               |  6 +-
 src/common/frs/views/shownotes.php                 |  4 +-
 src/common/include/html.php                        |  2 +-
 src/common/include/utils_crossref.php              |  9 +++
 src/common/tracker/ArtifactType.class.php          |  2 +-
 src/common/tracker/actions/tracker.php             |  4 +-
 src/cronjobs/shell/homedirs.php                    |  4 +-
 src/plugins/forumml/www/forumml_utils.php          |  5 +-
 .../mailman/include/BackendMailmanList.class.php   | 88 ++++++++++------------
 .../SkinMonoBookFusionForge.php                    |  3 +-
 .../mediawiki/mediawiki-skin/FusionForge.php       |  4 +-
 .../mediawiki/mediawiki-skin/FusionForge.php.patch |  4 +-
 src/plugins/oauthconsumer/include/provider_api.php | 54 +++++--------
 src/plugins/oauthprovider/include/consumer_api.php | 30 ++++----
 16 files changed, 106 insertions(+), 117 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
Fusionforge-commits@lists.fusionforge.org
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to