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  efe0f9d670db106be8b86fe8c11b03dbe2512d4b (commit)
       via  b8e7d2b5ded82e1344402f91d97f64cfa5e8632b (commit)
      from  b1eebdf3305a20c470049268094e3f40953904f0 (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=efe0f9d670db106be8b86fe8c11b03dbe2512d4b

commit efe0f9d670db106be8b86fe8c11b03dbe2512d4b
Author: Franck Villaume <[email protected]>
Date:   Sat Sep 10 20:01:23 2016 +0200

    use HTML helpers: openForm, closeForm, util_make_link

diff --git a/src/plugins/mailman/www/admin/deletelist.php 
b/src/plugins/mailman/www/admin/deletelist.php
index 06154cf..0e5c029 100644
--- a/src/plugins/mailman/www/admin/deletelist.php
+++ b/src/plugins/mailman/www/admin/deletelist.php
@@ -1,12 +1,11 @@
 <?php
-
 /**
  * FusionForge Mailing Lists Facility
  *
  * Portions Copyright 1999-2001 (c) VA Linux Systems
  * The rest Copyright 2003-2004 (c) Guillaume Smet - Open Wide
- *
  * Portions Copyright 2010 (c) Mélanie Le Bail
+ * Copyright 2016, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge.
  *
@@ -34,7 +33,7 @@ require_once '../mailman_utils.php';
 $request =& HTTPRequest::instance();
 $group_id = $request->get('group_id');
 
-global $feedback;
+global $HTML, $feedback;
 
 if (!$group_id) {
        exit_no_group();
@@ -69,7 +68,7 @@ mailman_header(array(
 
 ?>
 <h3><?php echo $ml->getName(); ?></h3>
-<form method="post" action="<?php echo $request->get('PHP_SELF'); 
?>?group_id=<?php echo $group_id; ?>&amp;id=<?php echo $ml->getID(); ?>">
+<?php echo $HTML->openForm(array('method' => 'post', 'action' => 
getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&id='.$ml->getID())); ?>
 <p>
 <input id="sure" type="checkbox" name="sure" value="1">
 <label for="sure">
@@ -81,7 +80,6 @@ mailman_header(array(
 </label>
 <input type="submit" name="submit" value="<?php echo _('Permanently Delete'); 
?>">
 </p>
-</form>
 <?php
-
+echo $HTML->closeForm();
 mail_footer();
diff --git a/src/plugins/mailman/www/admin/index.php 
b/src/plugins/mailman/www/admin/index.php
index 7a893f2..06483b2 100644
--- a/src/plugins/mailman/www/admin/index.php
+++ b/src/plugins/mailman/www/admin/index.php
@@ -1,12 +1,11 @@
 <?php
-
 /**
  * Fusionforge Mailing Lists Facility
  *
  * Portions Copyright 1999-2001 (c) VA Linux Systems
  * The rest Copyright 2003-2004 (c) Guillaume Smet - Open Wide
- *
  * Portions Copyright 2010 (c) Mélanie Le Bail
+ * Copyright 2016, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge.
  *
@@ -31,6 +30,8 @@ require_once 'preplugins.php';
 require_once 'plugins_utils.php';
 require_once '../mailman_utils.php';
 
+global $HTML, $feedback;
+
 $request =& HTTPRequest::instance();
 $group_id=$request->get('group_id');
 $group_list_id=$request->get('group_list_id');
@@ -43,12 +44,10 @@ $change_status=$request->get('change_status');
 $list_name=$request->get('list_name');
 $is_public=$request->get('is_public');
 $description=$request->get('description');
-$PHP_SELF = $request->get('PHP_SELF');
-$feedback = '';
+
 
 if ($group_id) {
        if (!$Group || !is_object($Group) || $Group->isError()) {
-
                exit_no_group();
        }
 
@@ -155,8 +154,8 @@ if ($group_id) {
                //
                //      Form to add list
                //
+               echo $HTML->openForm(array('method' => 'post', 'action' => 
getStringFromServer('PHP_SELF').'?group_id='.$group_id));
                ?>
-                       <form method="post" action="<?php echo $PHP_SELF; 
?>?group_id=<?php echo $group_id ?>">
                        <input type="hidden" name="post_changes" value="y" />
                        <input type="hidden" name="add_list" value="y" />
                        <p><strong><?php echo _('Mailing List Name')._(':'); 
?></strong><br />
@@ -169,9 +168,9 @@ if ($group_id) {
                        <input type="text" name="description" value="" 
size="40" maxlength="80" /><br /></p>
                        <p>
                        <input type="submit" name="submit" value="<?php echo 
_('Add This List'); ?>" /></p>
-                       </form>
-                       <?php
-                       mail_footer();
+               <?php
+               echo $HTML->closeForm();
+               mail_footer();
 
                //
                //      Form to modify list
@@ -188,9 +187,8 @@ if ($group_id) {
                                        
'help'=>'CommunicationServices.html#MailingLists',
                                        'admin' => 1));
                ?>
-
                        <h3><?php echo $mailingList->getName(); ?></h3>
-                       <form method="post" action="<?php echo $PHP_SELF; 
?>?group_id=<?php echo $group_id; ?>&amp;group_list_id=<?php echo 
$mailingList->getID(); ?>">
+               <?php echo $HTML->openForm(array('method' => 'post', 'action' 
=> 
getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&group_list_id='.$mailingList->getID()));
 ?>
                        <input type="hidden" name="post_changes" value="y" />
                        <input type="hidden" name="change_status" value="y" />
                        <p>
@@ -202,9 +200,9 @@ if ($group_id) {
                        <input type="text" name="description" value="<?php echo 
$mailingList->getDescription(); ?>" size="40" maxlength="80" /><br /></p>
                        <p>
                        <input type="submit" name="submit" value="<?php echo 
_('Update'); ?>" /></p>
-                       </form>
                        <?php
-                       mail_footer();
+               echo $HTML->closeForm();
+               mail_footer();
        } else {
                //
                //      Show lists
diff --git a/src/plugins/projectimport/www/index.php 
b/src/plugins/projectimport/www/index.php
index 52fe6db..c50df99 100644
--- a/src/plugins/projectimport/www/index.php
+++ b/src/plugins/projectimport/www/index.php
@@ -1,9 +1,9 @@
 <?php
-
 /**
  * Project data importing script for project admin
  *
  * Copyright (c) 2011 Olivier Berger & Institut Telecom
+ * Copyright 2016, Franck Villaume - TrivialDev
  *
  * This program was developped in the frame of the COCLICO project
  * (http://www.coclico-project.org/) with financial support of the Paris
@@ -496,16 +496,13 @@ class ProjectImportPage extends FileManagerPage {
                                        $html .= $message;
                                }
                                else {
-                                       $this->feedback("Couldn't proceed!");
+                                       $this->feedback(_("Couldn't proceed!"));
                                }
-                               $html .= "All (mapped) imported users added to 
the group.";
+                               $html .= _("All (mapped) imported users added 
to the group.");
                                // }
                        }
-
                }
-
                return $html;
-
        }
 
        /**
@@ -513,16 +510,16 @@ class ProjectImportPage extends FileManagerPage {
         * @return html string
         */
        function do_work() {
-               global $group_id, $feedback;
+               global $group_id, $feedback, $HTML;
 
-               $html = '';
+               $htmlcontent = '';
 
                // If the posted JSON file indeed contains a project dump, an 
importer was created,
                // and if it has data we can work
                if($this->importer) {
                        // If it indeed has valid data
                        if ($this->importer->has_project_dump()) {
-                               $this->message .= "Here are the results from 
your upload:";
+                               $this->message .= _("Here are the results from 
your upload")._(':');
 
                                $imported_users = $this->importer->get_users();
 
@@ -533,13 +530,13 @@ class ProjectImportPage extends FileManagerPage {
                                // start HTML output
                                if (! $this->form_header_already_displayed) {
                                        $this->form_header_already_displayed = 
true;
-                                       $html .= '<form 
enctype="multipart/form-data" action="'.getStringFromServer('PHP_SELF').'" 
method="post">';
+                                       $htmlcontent .= 
$HTML->openForm(array('enctype' => 'multipart/form-data', 'action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
                                }
 
                                // Handle missing users, taking into account 
the user mapping form elements
                                // that may have been provided
                                $apply = TRUE;
-                               $html .= $this->match_users($imported_users, 
$apply);
+                               $htmlcontent .= 
$this->match_users($imported_users, $apply);
 
                                // Then handle project(s)
 
@@ -558,14 +555,14 @@ class ProjectImportPage extends FileManagerPage {
                                        foreach($projects as $project) {
 
                                                // Display project's general 
description
-                                               $html .= '<table 
id="project-summary-and-devs" class="my-layout-table">
-                                      <tr>
-                                            <td>
-                                                   <h2>'._('Details of 
imported project: ').
-                                                    
'<pre>'.$project->getUnixName().'</pre>
-                                                   </h2>
-                                                   <h3>'._('Project 
Summary').'</h3>';
-                                               $html .= 
'<p><pre>'.$project->getDescription().'</pre></p>';
+                                               $htmlcontent .= '<table 
id="project-summary-and-devs" class="my-layout-table">
+                                                                       <tr>
+                                                                       <td>
+                                                                       
<h2>'._('Details of imported project: ').
+                                                                       
'<pre>'.$project->getUnixName().'</pre>
+                                                                       </h2>
+                                                                       
<h3>'._('Project Summary').'</h3>';
+                                               $htmlcontent .= 
'<p><pre>'.$project->getDescription().'</pre></p>';
 
                                                $spaces = $project->getSpaces();
 
@@ -575,41 +572,38 @@ class ProjectImportPage extends FileManagerPage {
 
                                                        // spaces header first
                                                        if(count($spaces)) {
-                                                               $html .= 
$this->html_generator->boxTop(_("Project's spaces found"));
+                                                               $htmlcontent .= 
$this->html_generator->boxTop(_("Project's spaces found"));
                                                                if (! 
$this->form_header_already_displayed) {
-                                                                       $html 
.= '<form enctype="multipart/form-data" 
action="'.getStringFromServer('PHP_SELF').'" method="post">';
+                                                                       
$htmlcontent .= $HTML->openForm(array('enctype' => 'multipart/form-data', 
'action' => getStringFromServer('PHP_SELF'), 'method' => 'post'));
                                                                        
$this->form_header_already_displayed = true;
                                                                }
-                                                               $html .= 
'<table width="100%"><thead><tr>';
-                                                               $html .= 
'<th>'._('uri').'</th>';
-                                                               $html .= 
'<th>'._('type').'</th>';
-                                                               $html .= 
'<th>'._('Import space ?').'</th>';
-                                                               $html .= 
'</tr></thead><tbody>';
+                                                               $htmlcontent .= 
'<table width="100%"><thead><tr>';
+                                                               $htmlcontent .= 
'<th>'._('uri').'</th>';
+                                                               $htmlcontent .= 
'<th>'._('type').'</th>';
+                                                               $htmlcontent .= 
'<th>'._('Import space ?').'</th>';
+                                                               $htmlcontent .= 
'</tr></thead><tbody>';
                                                        }
                                                        foreach($spaces as 
$space => $spaceres) {
                                                                $uri = $space;
                                                                $sha_uri = 
sha1($uri);
                                                                $type = 
$spaceres->getPropValue('rdf:type');
 
-                                                               $html .= '<tr>';
-                                                               $html .= '<td 
style="white-space: nowrap;">'. $uri .'</td>';
-                                                               $html .= '<td 
style="white-space: nowrap;">'. $type .'</td>';
+                                                               $htmlcontent .= 
'<tr>';
+                                                               $htmlcontent .= 
'<td style="white-space: nowrap;">'. $uri .'</td>';
+                                                               $htmlcontent .= 
'<td style="white-space: nowrap;">'. $type .'</td>';
                                                                
if(array_key_exists($sha_uri, $this->posted_spaces_imported)) {
-                                                                       $html 
.= '<td><input type="checkbox" name="import_'.$sha_uri.'" value="'.$sha_uri.'" 
selected="selected" /></td>';
+                                                                       
$htmlcontent .= '<td><input type="checkbox" name="import_'.$sha_uri.'" 
value="'.$sha_uri.'" selected="selected" /></td>';
+                                                               } else {
+                                                                       
$htmlcontent .= '<td><input type="checkbox" name="import_'.$sha_uri.'" 
value="'.$sha_uri.'" /></td>';
                                                                }
-                                                               else {
-                                                                       $html 
.= '<td><input type="checkbox" name="import_'.$sha_uri.'" value="'.$sha_uri.'" 
/></td>';
-                                                               }
-                                                               $html .= 
'</tr>';
+                                                               $htmlcontent .= 
'</tr>';
                                                        }
                                                        if(count($spaces)) {
-                                                               $html .= 
'<input type="hidden" name="submit_spaces" value="y" />';
-                                                               $html .= 
'</tbody></table>';
-                                                               $html .= 
$this->html_generator->boxBottom();
+                                                               $htmlcontent .= 
'<input type="hidden" name="submit_spaces" value="y" />';
+                                                               $htmlcontent .= 
'</tbody></table>';
+                                                               $htmlcontent .= 
$this->html_generator->boxBottom();
                                                        }
-                                               }
-                                               // else, user tells us we have 
to import the spaces
-                                               else {
+                                               } else { // else, user tells us 
we have to import the spaces
                                                        //                      
                $html .= 'to be imported:';
                                                        //                      
                print_r($this->posted_spaces_imported);
                                                        //                      
                $html .= '<br />';
@@ -617,45 +611,43 @@ class ProjectImportPage extends FileManagerPage {
                                                                $sha_uri = 
sha1($uri);
                                                                //              
                                $html .= 'sha1 :'.$sha_uri.'<br />';
                                                                if 
(in_array($sha_uri, $this->posted_spaces_imported)) {
-                                                                       $html 
.= 'Importing:'.$uri.'<br />';
+                                                                       
$htmlcontent .= _('Importing')._(': ').$uri.'<br />';
                                                                        
$this->importer->decode_space($uri, $spaceres);
                                                                }
                                                        }
                                                }
                                        }
-                               }
-                               else { // count($projects)
+                               } else { // count($projects)
                                        $this->feedback(_('No project found.'));
                                }
-                       }
-                       else { // not $this->importer->has_project_dump()
+                       } else { // not $this->importer->has_project_dump()
                                $this->feedback(_('parsing problem'));
                        }
                }
-               return $html;
+               return $htmlcontent;
        }
 
        /**
         * Display the page
         */
        function display_main() {
-               global $feedback, $group_id;
+               global $feedback, $group_id, $HTML;
 
                // Do the work, first !
-               $html = $this->do_work();
+               $htmlcontent = $this->do_work();
 
                if($this->message) {
                        echo $this->message . '<br />';
                }
                html_feedback_top($feedback);
 
-               echo $html;
+               echo $htmlcontent;
 
                // If invoked initially (not on callback) or if more details 
needed
                // display the last part of the form for JSON file upload
                if (! $this->form_header_already_displayed) {
-                       echo '<form enctype="multipart/form-data" 
action="'.getStringFromServer('PHP_SELF').'" method="post">';
-                       $this->form_header_already_displayed = True;
+                       echo $HTML->openForm(array('enctype' => 
'multipart/form-data', 'action' => getStringFromServer('PHP_SELF'), 'method' => 
'post'));
+                       $this->form_header_already_displayed = true;
                }
 
                // If user mapping has been provided, then display it
@@ -683,8 +675,7 @@ class ProjectImportPage extends FileManagerPage {
                if($selectiondialog) { // there are some selectable files 
already
                        if ($preselected) {
                                $legend = _('Confirm selected file or upload a 
new one');
-                       }
-                       else {
+                       } else {
                                $legend = _('Select a file or upload a new 
one');
                        }
                } else { // there are yet no files
@@ -693,25 +684,24 @@ class ProjectImportPage extends FileManagerPage {
 
                // finally, display the file upload form
                echo '<fieldset><legend>'. $legend .'</legend>
-                      <p><center>
-                          <input type="file" id="uploaded_file" 
name="uploaded_file" tabindex="2" />
-                  </center></p>
-               </fieldset>';
+                       <p><center>
+                               <input type="file" id="uploaded_file" 
name="uploaded_file" tabindex="2" />
+                       </center></p>
+               </fieldset>';
 
                echo '<input type="hidden" name="group_id" value="' . $group_id 
. '" />';
                echo '<div style="text-align:center;">
-                      <input type="submit" name="submit" value="Submit" />
-                    </div>';
-               echo '</form>';
-
+                       <input type="submit" name="submit" value="Submit" />
+                       </div>';
+               if ($this->form_header_already_displayed) {
+                       echo $HTML->closeForm();
+               }
                site_project_footer();
-
        }
 }
 
 // OK, we need a session
 if (session_loggedin()) {
-
        // The user should be project admin
        if ( ! forge_check_perm('project_admin', $group_id) ) {
                exit_permission_denied(_('You cannot import project unless you 
are an admin on that project'));
@@ -727,22 +717,16 @@ if (session_loggedin()) {
 
        // when called back by post form we can initialize some elements 
provided by the user
        if (getStringFromRequest('submit')) {
-
                $this_page->initialize_from_submitted_data();
-
-       }
-       else {
-               $message .= "You can import a project from a JSON RDF document 
compatible with ForgePlucker's dump format.<br />";
+       } else {
+               $message .= _("You can import a project from a JSON RDF 
document compatible with ForgePlucker's dump format.").'<br />';
        }
 
        $this_page->display_headers($message);
-
        $this_page->display_main();
 
 } else {
-
        exit_not_logged_in();
-
 }
 
 
diff --git a/src/plugins/projectimport/www/projectsimport.php 
b/src/plugins/projectimport/www/projectsimport.php
index 994c949..03ba414 100644
--- a/src/plugins/projectimport/www/projectsimport.php
+++ b/src/plugins/projectimport/www/projectsimport.php
@@ -1,10 +1,9 @@
 <?php
-
 /**
  * Project importing script for site admin
  *
  * Copyright (c) 2011 Olivier Berger & Institut Telecom
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013,2016, Franck Villaume - TrivialDev
  *
  * This program was developped in the frame of the COCLICO project
  * (http://www.coclico-project.org/) with financial support of the Paris
@@ -110,7 +109,7 @@ class ProjectsImportPage extends FileManagerPage {
                // If invoked initially (not on callback) or if more details 
needed
                // display the last part of the form for JSON file upload
                if (! $this->form_header_already_displayed) {
-                       echo '<form enctype="multipart/form-data" 
action="'.getStringFromServer('PHP_SELF').'" method="post">';
+                       echo $HTML->openForm(array('enctype' => 
'multipart/form-data', 'action' => getStringFromServer('PHP_SELF'), 'method' => 
'post'));
                        $this->form_header_already_displayed = True;
                }
 
@@ -119,8 +118,7 @@ class ProjectsImportPage extends FileManagerPage {
                if (!$feedback) {
                        if ($this->posted_selecteddumpfile) {
                                $preselected = 
basename($this->posted_selecteddumpfile);
-                       }
-                       elseif ($this->posted_uploadedfile) {
+                       } elseif ($this->posted_uploadedfile) {
                                $preselected = $this->posted_uploadedfile;
                        }
                }
@@ -131,15 +129,16 @@ class ProjectsImportPage extends FileManagerPage {
 
                // finally, display the file upload form
                echo '<fieldset><legend>Please upload a file :</legend>
-                      <p><center>
-                          <input type="file" id="uploaded_file" 
name="uploaded_file" tabindex="2" />
-                       </center></p>
-                    </fieldset>
-                    <div style="text-align:center;">
-                      <input type="submit" name="submit" value="Submit" />
-                    </div>
-              </form>';
-
+                       <p><center>
+                               <input type="file" id="uploaded_file" 
name="uploaded_file" tabindex="2" />
+                       </center></p>
+                       </fieldset>
+                       <div style="text-align:center;">
+                       <input type="submit" name="submit" value="Submit" />
+                       </div>';
+               if ($this->form_header_already_displayed) {
+                       echo $HTML->closeForm();
+               }
                site_footer();
        }
 
@@ -172,8 +171,7 @@ class ProjectsImportPage extends FileManagerPage {
 
                        if(! $json) {
                                $feedback = "Error : missing data";
-                       }
-                       else {
+                       } else {
 
                                //                      print_r($imported_file);
                                $this->importer->parse_OSLCCoreRDFJSON($json);
@@ -204,9 +202,9 @@ class ProjectsImportPage extends FileManagerPage {
         * @return html string
         */
        function do_work() {
-               global $feedback;
+               global $feedback, $HTML;
 
-               $html = '';
+               $htmlcontent = '';
 
                // If the posted JSON file indeed contains a project dump, an 
importer was created,
                // and if it has data we can work
@@ -219,14 +217,14 @@ class ProjectsImportPage extends FileManagerPage {
                        // start HTML output
                        if (! $this->form_header_already_displayed) {
                                $this->form_header_already_displayed = true;
-                               $html .= '<form enctype="multipart/form-data" 
action="'.getStringFromServer('PHP_SELF').'" method="post">';
+                               $htmlcontent .= $HTML->openForm(array('enctype' 
=> 'multipart/form-data', 'action' => getStringFromServer('PHP_SELF'), 'method' 
=> 'post'));
                        }
                        // Then handle project(s)
 
                        if(count($projects)) {
 
                                // Display project's general description
-                               $html .= '<table id="project-summary-and-devs" 
class="my-layout-table">';
+                               $htmlcontent .= '<table 
id="project-summary-and-devs" class="my-layout-table">';
 
                                // Display project attributes
                                foreach($projects as $project) {
@@ -259,37 +257,33 @@ class ProjectsImportPage extends FileManagerPage {
                                                if ($feedback) $feedback .= 
'<br />';
                                                $feedback .= 'Import of "'. 
$unix_name . '": '. $error_msg;
 
-                                               $html .= '<tr>
-                                            <td>
-                                                   <h2>'._('Failed to create 
project'). ': <pre>'. $unix_name .'</pre>
-                                                   </h2>';
-                                       }
-                                       else {
-                                               $html .= '<tr>
-                                            <td>
-                                                   <h2>'._('Created project'). 
': <pre>'. $unix_name .'</pre>
-                                                   </h2>';
+                                               $htmlcontent .= '<tr>
+                                               <td>
+                                                       <h2>'._('Failed to 
create project'). ': <pre>'. $unix_name .'</pre>
+                                                       </h2>';
+                                       } else {
+                                               $htmlcontent .= '<tr>
+                                               <td>
+                                                       <h2>'._('Created 
project'). ': <pre>'. $unix_name .'</pre>
+                                                       </h2>';
 
                                        }
-                                       $html .= '<h3>'._('Project 
Summary').'</h3>';
-                                       $html .= '<p><pre>'. $description 
.'</pre></p>';
+                                       $htmlcontent .= '<h3>'._('Project 
Summary').'</h3>';
+                                       $htmlcontent .= '<p><pre>'. 
$description .'</pre></p>';
 
-                                       $html .= '<p>full_name : '. $full_name 
.'</p>';
+                                       $htmlcontent .= '<p>full_name : '. 
$full_name .'</p>';
                                        //$html .= '<p>purpose : '. 
$project->getPurpose() .'</p>';
-                                       $html .= '<p>is_public : '. $is_public 
.'</p>';
-                                       $html .= '</td></tr>';
+                                       $htmlcontent .= '<p>is_public : '. 
$is_public .'</p>';
+                                       $htmlcontent .= '</td></tr>';
 
                                }
-                               $html .= '</table>';
-                       }
-                       else {
+                               $htmlcontent .= '</table>';
+                       } else {
                                $feedback .= 'Found no projects <br />';
                        }
                }
-               return $html;
+               return $htmlcontent;
        }
-
-
 }
 
 global $group_id, $feedback;
@@ -305,8 +299,7 @@ if (getStringFromRequest('submit')) {
 
        $this_page->initialize_from_submitted_data();
 
-}
-else {
+} else {
        $message .= "You can import a list of projects from a JSON RDF document 
compatible with ForgePlucker's dump format.<br />";
 }
 
diff --git a/src/plugins/projectimport/www/usersimport.php 
b/src/plugins/projectimport/www/usersimport.php
index 2f103ac..ac35109 100644
--- a/src/plugins/projectimport/www/usersimport.php
+++ b/src/plugins/projectimport/www/usersimport.php
@@ -1,9 +1,9 @@
 <?php
-
 /**
  * User importing script for site admin
  *
  * Copyright (c) 2011 Olivier Berger & Institut Telecom
+ * Copyright 2016, Franck Villaume - TrivialDev
  *
  * This program was developped in the frame of the COCLICO project
  * (http://www.coclico-project.org/) with financial support of the Paris
@@ -81,23 +81,22 @@ class UsersImportPage extends FileManagerPage {
         * Display the page
         */
        function display_main() {
-
-               global $feedback;
+               global $feedback, $HTML;
 
                // Do the work, first !
-               $html = $this->do_work();
+               $htmlcontent = $this->do_work();
 
                if($this->message) {
                        echo $this->message . '<br />';
                }
                html_feedback_top($feedback);
 
-               echo $html;
+               echo $htmlcontent;
 
                // If invoked initially (not on callback) or if more details 
needed
                // display the last part of the form for JSON file upload
                if (! $this->form_header_already_displayed) {
-                       echo '<form enctype="multipart/form-data" 
action="'.getStringFromServer('PHP_SELF').'" method="post">';
+                       echo $HTML->openForm(array('enctype' => 
'multipart/form-data', 'action' => getStringFromServer('PHP_SELF'), 'method' => 
'post'));
                        $this->form_header_already_displayed = True;
                }
 
@@ -124,9 +123,10 @@ class UsersImportPage extends FileManagerPage {
                     </fieldset>
                     <div style="text-align:center;">
                       <input type="submit" name="submit" value="Submit" />
-                    </div>
-              </form>';
-
+                    </div>';
+               if ($this->form_header_already_displayed) {
+                       echo $HTML->closeForm();
+               }
                site_footer();
        }
 
@@ -142,8 +142,7 @@ class UsersImportPage extends FileManagerPage {
                        $json = fread(fopen($this->posted_selecteddumpfile, 
'r'),filesize($this->posted_selecteddumpfile));
                                if(! $json) {
                                $feedback = "Error : missing data";
-                       }
-                       else {
+                       } else {
 
                                //                      print_r($imported_file);
                                $this->importer->parse_OSLCCoreRDFJSON($json);
@@ -172,9 +171,9 @@ class UsersImportPage extends FileManagerPage {
         * @return html string
         */
        function do_work() {
-               global $feedback;
+               global $feedback, $HTML;
 
-               $html = '';
+               $htmlcode = '';
 
                // If the posted JSON file indeed contains a project dump, an 
importer was created,
                // and if it has data we can work
@@ -186,13 +185,13 @@ class UsersImportPage extends FileManagerPage {
                        // start HTML output
                        if (! $this->form_header_already_displayed) {
                                $this->form_header_already_displayed = true;
-                               $html .= '<form enctype="multipart/form-data" 
action="'.getStringFromServer('PHP_SELF').'" method="post">';
+                               $htmlcode .= $HTML->openForm(array('enctype' => 
'multipart/form-data', 'action' => getStringFromServer('PHP_SELF'), 'method' => 
'post'));
                        }
 
                        $imported_users = $this->importer->get_user_objs();
 
                        if (count($imported_users)) {
-                               $html .= $this->html_generator->boxTop(_("Users 
found in imported file"));
+                               $htmlcode .= 
$this->html_generator->boxTop(_("Users found in imported file"));
 
                                foreach($imported_users as $user => $user_obj) {
 
@@ -217,29 +216,26 @@ class UsersImportPage extends FileManagerPage {
                                                if ($feedback) $feedback .= 
'<br />';
                                                $feedback .= 'Import of "'. 
$unix_name . '": '. $error_msg;
 
-                                               $html .= _('Failed to create 
user'). ': <pre>'. $unix_name .'</pre>';
-                                       }
-                                       else {
-                                               $html .= _('Created user'). ': 
<pre>'. $unix_name .'</pre>';
+                                               $htmlcode .= _('Failed to 
create user'). ': <pre>'. $unix_name .'</pre>';
+                                       } else {
+                                               $htmlcode .= _('Created user'). 
': <pre>'. $unix_name .'</pre>';
                                        }
 
-                                       $html .= 'User :<br />';
-                                       $html .= ' account name : '. $unix_name 
.'<br />';
-                                       $html .= ' email : '. $email .'<br />';
-                                       $html .= ' firstname : '. $firstname 
.'<br />';
-                                       $html .= ' lastname : '. $lastname 
.'<br />';
-                                       $html .= '<br/>';
+                                       $htmlcode .= 'User :<br />';
+                                       $htmlcode .= ' account name : '. 
$unix_name .'<br />';
+                                       $htmlcode .= ' email : '. $email .'<br 
/>';
+                                       $htmlcode .= ' firstname : '. 
$firstname .'<br />';
+                                       $htmlcode .= ' lastname : '. $lastname 
.'<br />';
+                                       $htmlcode .= '<br/>';
                                }
 
-                               $html .= $this->html_generator->boxBottom();
-
-                       }
+                               $htmlcode .= $this->html_generator->boxBottom();
 
-                       else {
+                       } else {
                                $feedback .= 'Found no users<br />';
                        }
                }
-               return $html;
+               return $htmlcode;
        }
 
 }
@@ -257,11 +253,8 @@ $message = '';
 
 // when called back by post form we can initialize some elements provided by 
the user
 if (getStringFromRequest('submit')) {
-
        $this_page->initialize_from_submitted_data();
-
-}
-else {
+} else {
        $message .= "You can import a list of users from a JSON RDF document 
compatible with ForgePlucker's dump format.<br />";
 }
 
diff --git a/src/www/forum/admin/index.php b/src/www/forum/admin/index.php
index 875b626..4bd5940 100644
--- a/src/www/forum/admin/index.php
+++ b/src/www/forum/admin/index.php
@@ -7,7 +7,7 @@
  * Copyright 2010 (c) Franck Villaume - Capgemini
  * Copyright (C) 2011-2012 Alain Peyrat - Alcatel-Lucent
  * Copyright 2013, French Ministry of National Education
- * Copyright 2013-2014, Franck Villaume - TrivialDev
+ * Copyright 2013-2014,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -58,7 +58,7 @@ if (!$g->usesForum() and !$g->usesNews()) {
        exit_error(sprintf(_('%s does not use the Forum tool.'), 
$g->getPublicName()), 'forums');
 }
 
-session_require_perm ('forum_admin', $group_id) ;
+session_require_perm('forum_admin', $group_id);
 
 if (getStringFromRequest('post_changes')) {
        /*
@@ -102,9 +102,8 @@ if (getStringFromRequest('add_forum')) {
        */
        forum_header(array('title'=>_('Add Forum')));
 
-       echo '
-                       <form method="post" 
action="'.getStringFromServer('PHP_SELF').'">
-                       <p>
+       echo $HTML->openForm(array('method' => 'post', 'action' => 
getStringFromServer('PHP_SELF')));
+       echo '          <p>
                        <input type="hidden" name="post_changes" value="y" />
                        <input type="hidden" name="add_forum" value="y" />
                        <input type="hidden" name="group_id" 
value="'.$group_id.'" />
@@ -122,8 +121,8 @@ if (getStringFromRequest('add_forum')) {
                        </p>
                        <p>
                        <input type="submit" name="submit" value="'._('Add This 
Forum').'" />
-                       </p>
-                       </form>';
+                       </p>';
+       echo $HTML->closeForm();
        echo '<span>'.sprintf(_('%s Mandatory fields'), 
utils_requiredField()).'</span>';
        forum_footer();
 
@@ -140,9 +139,8 @@ if (getStringFromRequest('add_forum')) {
        $fa = new ForumAdmin($f->Group->getID());
        $fa->PrintAdminPendingOption($group_forum_id);
 
-       echo '
-                       <form action="'.getStringFromServer('PHP_SELF').'" 
method="post">
-                               <p>
+       echo $HTML->openForm(array('method' => 'post', 'action' => 
getStringFromServer('PHP_SELF')));
+       echo '          <p>
                                <input type="hidden" name="post_changes" 
value="y" />
                                <input type="hidden" name="change_status" 
value="y" />
                                <input type="hidden" name="group_forum_id" 
value="'. $f->getID() .'" />
@@ -160,11 +158,9 @@ if (getStringFromRequest('add_forum')) {
                                </p>
                                <p>
                                <input type="submit" name="submit" 
value="'._('Update').'" />
-                               </p>
-                       </form>
-                       <p>';
-       //echo '<a 
href="'.getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&amp;group_forum_id='.$group_forum_id.'&amp;delete=1">'._('Delete
 Message').'</a><br />';
-       echo '<a 
href="'.getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&amp;group_forum_id='.$group_forum_id.'&amp;deleteforum=1">'._('Delete
 entire forum and all content').'</a></p>';
+                               </p>';
+       echo $HTML->closeForm();
+       echo 
'<p>'.util_make_link(getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&group_forum_id='.$group_forum_id.'&deleteforum=1',
 _('Delete entire forum and all content')).'</p>';
        echo '<span>'.sprintf(_('%s Mandatory fields'), 
utils_requiredField()).'</span>';
        forum_footer();
 
@@ -175,16 +171,16 @@ if (getStringFromRequest('add_forum')) {
        forum_header(array('title'=>_('Permanently Delete Forum'), 'modal' => 
1));
        echo '<p>
                        <strong>'._('You are about to permanently and 
irretrievably delete this entire forum and all its contents!').'</strong><br />
-                       </p>
-                       <form method="post" 
action="'.getStringFromServer('PHP_SELF').'">
-                       <input type="hidden" name="post_changes" value="y" />
+                       </p>';
+       echo $HTML->openForm(array('method' => 'post', 'action' => 
getStringFromServer('PHP_SELF')));
+       echo '          <input type="hidden" name="post_changes" value="y" />
                        <input type="hidden" name="deleteforum" value="y" />
                        <input type="hidden" name="group_id" 
value="'.$group_id.'" />
                        <input type="hidden" name="group_forum_id" 
value="'.$group_forum_id.'" />
                        <input type="checkbox" name="sure" value="1" />'._('I 
am Sure').'<br />
                        <input type="checkbox" name="really_sure" value="1" 
/>'._('I am Really Sure').'<br />
-                       <input type="submit" name="submit" 
value="'._('Delete').'" />
-                       </form>';
+                       <input type="submit" name="submit" 
value="'._('Delete').'" />';
+       echo $HTML->closeForm();
        forum_footer();
 
 } elseif ( getStringFromRequest("deletemsg") ) {
@@ -216,9 +212,9 @@ if (getStringFromRequest('add_forum')) {
        } else {
                //print the delete message confirmation
                forum_header(array('title'=>_('Delete a Message')));
-               echo '<center>
-                                                       <form 
action="'.getStringFromServer('PHP_SELF').'" method="post">
-                                                       <h3>' . _('WARNING! You 
are about to permanently delete a message and all of its comments!!') . '</h3>
+               echo '<center>';
+               echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
+               echo '                                  <h3>' . _('WARNING! You 
are about to permanently delete a message and all of its comments!!') . '</h3>
                                                        <p>
                                                        <input type="submit" 
name="ok" value="' . _('Yes') . '" />
                                                        <input type="submit" 
name="cancel" value="' . _('No') . '" />
@@ -226,9 +222,9 @@ if (getStringFromRequest('add_forum')) {
                                                        <input type="hidden" 
name="group_id" value="'.$group_id.'" />
                                                        <input type="hidden" 
name="forum_id" value="'.$forum_id.'" />
                                                        <input type="hidden" 
name="thread_id" value="'.$thread_id.'" />
-                                                       </p>
-                                                       </form>
-                                                       </center>';
+                                                       </p>';
+               echo $HTML->closeForm();
+               echo '</center>';
                forum_footer();
        }
 } elseif (getStringFromRequest("editmsg")) {
@@ -399,9 +395,9 @@ if (getStringFromRequest('add_forum')) {
                        exit_error($f_from->getErrorMessage(),'forums');
                }
 
-               echo '<center>
-                                                       <form 
action="'.getStringFromServer('PHP_SELF').'" method="post">
-                                                       <p><strong>' . 
sprintf(_('Move thread from %s forum to the following forum:'), 
$f_from->getName()) . '</strong></p>
+               echo '<center>';
+               echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
+               echo '                                  <p><strong>' . 
sprintf(_('Move thread from %s forum to the following forum:'), 
$f_from->getName()) . '</strong></p>
                                                        <p>
                                                        <input type="hidden" 
name="movethread" value="'.$thread_id.'" />
                                                        <input type="hidden" 
name="group_id" value="'.$group_id.'" />
@@ -412,10 +408,9 @@ if (getStringFromRequest('add_forum')) {
                        '<br />
                                                        <input type="submit" 
name="ok" value="' . _("Submit") . '" />
                                                        <input type="submit" 
name="cancel" value="' . _("Cancel") . '" />
-                                                       </p>
-                                                       </form>
-                                                       </center>';
-
+                                                       </p>';
+               echo $HTML->closeForm();
+               echo '</center>';
                forum_footer();
        }
 
diff --git a/src/www/mail/admin/deletelist.php 
b/src/www/mail/admin/deletelist.php
index aa9bddf..6d73640 100644
--- a/src/www/mail/admin/deletelist.php
+++ b/src/www/mail/admin/deletelist.php
@@ -4,7 +4,8 @@
  *
  * Copyright 1999-2001, VA Linux Systems, Inc.
  * Copyright 2003-2004 (c) Guillaume Smet - Open Wide
- * Copyright 2010 (c) Franck Villaume
+ * Copyright 2010, Franck Villaume - Capgemini
+ * Copyright 2016, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -28,9 +29,9 @@ require_once $gfwww.'mail/admin/../mail_utils.php';
 
 require_once $gfcommon.'mail/MailingList.class.php';
 
-$group_id = getIntFromRequest('group_id');
+global $HTML, $feedback;
 
-$feedback = '';
+$group_id = getIntFromRequest('group_id');
 
 if (!$group_id) {
        exit_no_group();
@@ -65,7 +66,7 @@ mail_header(array('title' => _('Permanently Delete Mailing 
List ') . $ml->getNam
 ?>
 <fieldset>
 <legend><?php echo _('Confirm Delete'); ?></legend>
-<form method="post" action="<?php echo getStringFromServer('PHP_SELF'); 
?>?group_id=<?php echo $group_id; ?>&amp;group_list_id=<?php echo $ml->getID(); 
?>">
+<?php echo $HTML->openForm(array('method' => 'post', 'action' => 
getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&group_list_id='.$ml->getID()));
 ?>
 <p><?php printf(_("Do you really want to delete mailing list %s?"), 
$ml->getName()); ?></p>
 <p>
        <input id="sure" type="checkbox" name="sure" value="1" />
@@ -76,8 +77,7 @@ mail_header(array('title' => _('Permanently Delete Mailing 
List ') . $ml->getNam
 <p>
        <input type="submit" name="submit" value="<?php echo _('Permanently 
Delete'); ?>" />
 </p>
-</form>
+<?php echo $HTML->closeForm(); ?>
 </fieldset>
 <?php
-
 mail_footer();
diff --git a/src/www/mail/admin/index.php b/src/www/mail/admin/index.php
index 2500604..4371e4e 100644
--- a/src/www/mail/admin/index.php
+++ b/src/www/mail/admin/index.php
@@ -6,7 +6,7 @@
  * Copyright 2003-2004 (c) Guillaume Smet - Open Wide
  * Copyright 2010 (c) Franck Villaume - Capgemini
  * Copyright (C) 2011-2012 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * Copyright 2012-2014,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -176,8 +176,7 @@ if ($group_id) {
 //
 //     Form to add list
 //
-               ?>
-               <form method="post" action="<?php echo 
getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id ?>">
+               echo $HTML->openForm(array('method' => 'post', 'action' => 
getStringFromServer('PHP_SELF').'?group_id='.$group_id)); ?>
                        <input type="hidden" name="post_changes" value="y" />
                        <input type="hidden" name="add_list" value="y" />
                        <input type="hidden" name="form_key" value="<?php echo 
form_generate_key();?>" />
@@ -200,8 +199,8 @@ if ($group_id) {
                        <input type="text" name="description" value="" 
size="40" maxlength="80" /></p>
                        <p>
                        <input type="submit" name="submit" value="<?php echo 
_('Add This List'); ?>" /></p>
-               </form>
                <?php
+               echo $HTML->closeForm();
                mail_footer();
 
 //
@@ -220,7 +219,7 @@ if ($group_id) {
                        'title' => sprintf(_('Update Mailing List %s'), 
$mailingList->getName())));
                ?>
                <h3><?php echo $mailingList->getName(); ?></h3>
-               <form method="post" action="<?php echo 
getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; 
?>&amp;group_list_id=<?php echo $mailingList->getID(); ?>">
+               <?php echo $HTML->openForm(array('method' => 'post', 'action' 
=> 
getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&group_list_id='.$mailingList->getID()));
 ?>
                        <input type="hidden" name="post_changes" value="y" />
                        <input type="hidden" name="change_status" value="y" />
                        <p>
@@ -233,9 +232,9 @@ if ($group_id) {
                        <input type="text" name="description" value="<?php echo 
inputSpecialChars($mailingList->getDescription()); ?>" size="40" maxlength="80" 
/></p>
                        <p>
                        <input type="submit" name="submit" value="<?php echo 
_('Update'); ?>" /></p>
-               </form>
-               <a href="deletelist.php?group_id=<?php echo $group_id; 
?>&amp;group_list_id=<?php echo $mailingList->getID(); ?>">[<?php echo 
_('Permanently Delete List'); ?>]</a>
-       <?php
+               <?php
+               echo $HTML->closeForm();
+               echo 
util_make_link('/mail/admin/deletelist.php?group_id='.$group_id.'&group_list_id='.$mailingList->getID(),
 '['._('Permanently Delete List').']');
                mail_footer();
        } else {
 //
@@ -259,11 +258,9 @@ if ($group_id) {
                        exit;
                }
                echo '<p>'.sprintf(_('You can administrate lists from here. 
Please note that private lists can still be viewed by members of your project, 
but are not listed on %s.'), forge_get_config ('forge_name')).'</p>';
-               echo '<ul>
-                       <li>
-                               <a 
href="'.getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&amp;add_list=1">'._('Add
 Mailing List').'</a>
-                       </li>
-               </ul>';
+               echo '<ul><li>'
+               echo 
util_make_link(getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&add_list=1',
 _('Add Mailing List'));
+               echo '</li></ul>';
                $mlCount = count($mlArray);
                if($mlCount > 0) {
                        $tableHeaders = array(
@@ -285,7 +282,7 @@ if ($group_id) {
                                        
htmlspecialchars($currentList->getDescription()).'</td>';
                                        echo '<td class="align-center">';
                                        if ($currentList->getStatus() != 
MAIL__MAILING_LIST_PW_RESET_REQUESTED) {
-                                               echo '<a 
href="'.getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&amp;group_list_id='.$currentList->getID().'&amp;change_status=1">'._('Update').'</a>';
+                                               echo 
util_make_link(getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&group_list_id='.$currentList->getID().'&change_status=1',
 _('Update'));
                                        }
                                        echo '</td>';
                                        echo '<td class="align-center">';
@@ -297,10 +294,11 @@ if ($group_id) {
                                        echo '</td>';
                                        echo '<td class="align-center">';
                                        if($currentList->getStatus() == 
MAIL__MAILING_LIST_IS_CONFIGURED) {
-                                               echo '<a 
href="'.getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&amp;group_list_id='.$currentList->getID().'&amp;reset_pw=1">'._('Reset
 admin password').'</a></td>' ;
-
+                                               echo 
util_make_link(getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&group_list_id='.$currentList->getID().'&reset_pw=1',
 _('Reset admin password'));
+                                       } else {
+                                               echo '';
                                        }
-                                       echo '</tr>';
+                                       echo '</td></tr>';
                                }
                        }
                        echo $HTML->listTableBottom();
diff --git a/src/www/people/admin/index.php b/src/www/people/admin/index.php
index 62d5392..8ea44de 100644
--- a/src/www/people/admin/index.php
+++ b/src/www/people/admin/index.php
@@ -5,7 +5,7 @@
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2002-2004 (c) GForge Team
  * Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -38,7 +38,6 @@ $group_id = getIntFromRequest('group_id');
 $job_id = getIntFromRequest('job_id');
 
 if (forge_check_global_perm('forge_admin')) {
-
        if (getStringFromRequest('post_changes')) {
                /*
                        Update the database
@@ -95,8 +94,9 @@ if (forge_check_global_perm('forge_admin')) {
                } else {
                        echo $HTML->error_msg(_('No job 
categories').db_error());
                }
+
+               echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
                ?>
-               <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" 
method="post">
                <p>
                <input type="hidden" name="people_cat" value="y" />
                <input type="hidden" name="post_changes" value="y" />
@@ -111,9 +111,8 @@ if (forge_check_global_perm('forge_admin')) {
                ?>
                <p>
                <input type="submit" name="submit" value="<?php echo 
_('Submit'); ?>"></p>
-               </form>
                <?php
-
+               echo $HTML->closeForm();
                people_footer();
 
        } elseif (getStringFromRequest('people_skills')) {
@@ -133,8 +132,9 @@ if (forge_check_global_perm('forge_admin')) {
                        echo db_error();
                        echo "\n<h2>"._('No Skills Found').'</h2>';
                }
+
+               echo $HMTL->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
                ?>
-               <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" 
method="post">
                <p>
                <input type="hidden" name="people_skills" value="y" />
                <input type="hidden" name="post_changes" value="y" />
@@ -149,29 +149,22 @@ if (forge_check_global_perm('forge_admin')) {
                ?>
                <p>
                <input type="submit" name="submit" value="<?php echo 
_('Submit'); ?>"></p>
-               </form>
                <?php
-
+               echo $HTML->closeForm();
                people_footer();
-
        } else {
                /*
                        Show main page
                */
-
                people_header(array('title' => _('People Administration')));
-
                echo '<p>
                        '.util_make_link('/people/admin/?people_cat=1', _('Add 
Job Categories')).'<br />';
        //      echo "\nAdd categories of bugs like, 'mail module','gant chart 
module','interface', etc<p>";
-
                echo "\n".util_make_link('/people/admin/?people_skills=1', 
_('Add Job Skills')).'<br />';
        //      echo "\nAdd Groups of bugs like 'future 
requests','unreproducible', etc<p>";
                echo '</p>';
-
                people_footer();
        }
-
 } else {
        exit_permission_denied('home');
 }
diff --git a/src/www/people/editjob.php b/src/www/people/editjob.php
index a786d9d..238b180 100644
--- a/src/www/people/editjob.php
+++ b/src/www/people/editjob.php
@@ -157,11 +157,11 @@ if ($group_id && (forge_check_perm('project_admin', 
$group_id))) {
        } else {
 
                echo '<p>'
-        . _('Now you can edit/change the list of skills attached to this 
posting. Developers will be able to match their skills with your requirements.')
-        .'</p><p>'
-        . _('All postings are automatically closed after two weeks.').'
-               <form action="'.getStringFromServer('PHP_SELF').'" 
method="post">
-               <input type="hidden" name="group_id" value="'.$group_id.'" />
+                       . _('Now you can edit/change the list of skills 
attached to this posting. Developers will be able to match their skills with 
your requirements.')
+                       .'</p><p>'
+                       . _('All postings are automatically closed after two 
weeks.');
+               echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
+               echo '<input type="hidden" name="group_id" 
value="'.$group_id.'" />
                <input type="hidden" name="job_id" value="'.$job_id.'" />
                <strong>'._('Category').'</strong>'.utils_requiredField().'<br 
/>
                '. 
people_job_category_box('category_id',db_result($result,0,'category_id')) .'
@@ -175,9 +175,8 @@ if ($group_id && (forge_check_perm('project_admin', 
$group_id))) {
                <strong>'._('Long 
Description').utils_requiredField()._(':').'</strong><br />
                <textarea name="description" rows="10" cols="60" 
required="required" >'. db_result($result,0,'description') .'</textarea></p>
                <p>
-               <input type="submit" name="update_job" value="'._('Update 
Descriptions').'" /></p>
-               </form>';
-
+               <input type="submit" name="update_job" value="'._('Update 
Descriptions').'" /></p>';
+               echo $HTML->closeForm();
                //now show the list of desired skills
                echo '<p>'.people_edit_job_inventory($job_id,$group_id).'</p>';
                echo $HTML->openForm(array('action' => '/people/', 'method' => 
'post'));
diff --git a/src/www/people/editprofile.php b/src/www/people/editprofile.php
index 2d78eaf..cffdbef 100644
--- a/src/www/people/editprofile.php
+++ b/src/www/people/editprofile.php
@@ -4,7 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2002 (c) Silicon and Software Systems (S3)
- * Copyright 2010-2014, Franck Villaume - TrivialDev
+ * Copyright 2010-2014,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -32,6 +32,8 @@ if (!forge_get_config('use_people')) {
        exit_disabled('home');
 }
 
+global $HTML;
+
 $group_id = getIntFromRequest('group_id');
 $job_id = getIntFromRequest('job_id');
 
@@ -149,13 +151,13 @@ if (session_loggedin()) {
                        } else  /* not confirmed multiedit */ {
                                people_header(array('title'=>_('Edit Skills')));
                                echo _('Change the required fields, and press 
“Done” at the bottom of the page');
-                               echo '<form 
action="'.getStringFromServer('PHP_SELF').'" method="post">';
+                               echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
                                echo '<input type="hidden" name="form_key" 
value="'.form_generate_key().'">';
                                handle_multi_edit($skill_edit);
                                echo '<input type="hidden" 
name="confirmMultiEdit" value="1" />';
                                echo '<input type="submit" name="MultiEdit" 
value="'._('Done').'" />';
                                echo '<input type="submit" 
name="cancelMultiEdit" value="'._('Cancel').'" />';
-                               echo '</form>';
+                               echo $HTML->closeForm();
                                people_footer();
                                return;
                        }
@@ -205,7 +207,7 @@ if (session_loggedin()) {
                                        echo "<br />"._('This action cannot be 
undone.')."<br />";
                                        echo _('Are you <strong>sure</strong> 
you wish to continue?');
 
-                                       echo '<form 
action="'.getStringFromServer('PHP_SELF').'" method="post">';
+                                       echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
                                        echo '<input type="hidden" 
name="form_key" value="'.form_generate_key().'">';
                                        for($i = 0; $i < $rows; $i ++) {
                                                echo '<input type="hidden" 
name="skill_delete[]" value="'.$skill_delete[$i].'">';
@@ -213,7 +215,7 @@ if (session_loggedin()) {
                                        echo '<input type="hidden" 
name="confirmMultiDelete" value="1" />';
                                        echo '<input type="submit" 
name="MultiDelete" value="'._('Confirm').'" />';
                                        echo '<input type="submit" 
name="MultiDeleteCancel" value="'._('Cancel').'" />';
-                                       echo '</form>';
+                                       echo $HTML->closeForm();
                                        people_footer();
                                }
                                return;
@@ -233,18 +235,17 @@ if (session_loggedin()) {
                $error_msg .= _('No Such User')._(': ').db_error();
        } else {
 
-               echo '
-               <h2>'._('Edit Public Permissions').'</h2>
-               <form action="'.getStringFromServer('PHP_SELF').'" 
method="post">
-               '._('The following option determines if others can see your 
skills. If they cannot, you can still enter your skills.').'
+               echo '<h2>'._('Edit Public Permissions').'</h2>';
+               echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
+               echo _('The following option determines if others can see your 
skills. If they cannot, you can still enter your skills.').'
                <p>
                <strong>'._('Publicly Viewable')._(':').'</strong><br />
                <input type="hidden" name="form_key" 
value="'.form_generate_key().'">
                <input type="radio" name="people_view_skills" value="0" '. 
((db_result($result,0,'people_view_skills')==0)?'checked="checked"':'') .' /> 
<strong>'._('No').'</strong><br />
                <input type="radio" name="people_view_skills" value="1" '. 
((db_result($result,0,'people_view_skills')==1)?'checked="checked"':'') .' /> 
<strong>'._('Yes').'</strong></p>
                <p>
-               <input type="submit" name="update_profile" value="'._('Update 
Permissions').'"></p>
-               </form>';
+               <input type="submit" name="update_profile" value="'._('Update 
Permissions').'"></p>';
+               echo $HTML->closeForm();
 
                //now show the list of desired skills
                //echo '<p>'.people_edit_skill_inventory( user_getid() );
@@ -271,8 +272,8 @@ if (session_loggedin()) {
                echo '<h2>'._('Add a new skill').'</h2>';
                echo _('You can enter new skills you have acquired here. Please 
enter the start and finish dates as accurately as possible.').'<br />'.
                         '<span class="required-field">'._('All fields are 
required!').'</span>';
-               echo '<form action="'.getStringFromServer('PHP_SELF').'" 
method="post">';
-               echo' <input type="hidden" name="form_key" 
value="'.form_generate_key().'">';
+               echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
+               echo '<input type="hidden" name="form_key" 
value="'.form_generate_key().'">';
                $cell_data = array();
                $cell_data[] = array(_('Type'));
                $cell_data[] = array(_('Start Date'));
@@ -309,19 +310,16 @@ if (session_loggedin()) {
                        </tr>
                        </table>';
 
-               echo '</form>';
+               echo $HTML->closeForm();
 
-               echo '<h2>'._('Edit/Delete Your Skills').'</h2>
-               <table class="fullwidth">';
-               echo '<form action="'.getStringFromServer('PHP_SELF').'" 
method="post">';
+               echo '<h2>'._('Edit/Delete Your Skills').'</h2>';
+               echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
+               echo '<table class="fullwidth">';
                displayUserSkills(user_getid(), 1);
-               echo '</form>';
                echo '</table>';
-
+               echo $HTML->closeForm();
        }
-
        people_footer();
-
 } else {
        /*
                Not logged in
diff --git a/src/www/people/people_utils.php b/src/www/people/people_utils.php
index dcbfcab..536ddb8 100644
--- a/src/www/people/people_utils.php
+++ b/src/www/people/people_utils.php
@@ -6,7 +6,7 @@
  * Copyright 2002-2004 (c) GForge Team
  * Copyright 2010 (c) Franck Villaume
  * Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
- * Copyright 2013-2015, Franck Villaume - TrivialDev
+ * Copyright 2013-2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -171,8 +171,8 @@ function people_edit_skill_inventory($user_id) {
                echo db_error();
        } else {
                for ($i=0; $i < $rows; $i++) {
+                       echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
                        echo '
-                       <form action="'.getStringFromServer('PHP_SELF').'" 
method="post">
                        <input type="hidden" name="skill_inventory_id" 
value="'.db_result($result,$i,'skill_inventory_id').'" />
                        <tr '. $HTML->boxGetAltRowStyle($i) .'>
                                <td>'. 
people_get_skill_name(db_result($result,$i,'skill_id')) .'</td>
@@ -180,23 +180,23 @@ function people_edit_skill_inventory($user_id) {
                                <td>'. 
people_skill_year_box('skill_year_id',db_result($result,$i,'skill_year_id')). 
'</td>
                                <td style="white-space:nowrap"><input 
type="submit" name="update_skill_inventory" value="'._('Update').'" /> &nbsp;
                                        <input type="submit" 
name="delete_from_skill_inventory" value="'._('Delete').'" /></td>
-                               </tr></form>';
+                               </tr>';
+                       echo $HTML->closeForm();
                }
 
        }
        //add a new skill
        $i++; //for row coloring
 
-       echo '
-       <tr class="tableheading"><td colspan="4">'._('Add a new 
skill').'/td></tr>
-       <form action="'.getStringFromServer('PHP_SELF').'" method="post">
-       <tr '. $HTML->boxGetAltRowStyle($i) .'>
+       echo '<tr class="tableheading"><td colspan="4">'._('Add a new 
skill').'/td></tr>';
+       echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 
'method' => 'post'));
+       echo '<tr '. $HTML->boxGetAltRowStyle($i) .'>
                <td>'. people_skill_box('skill_id'). '</td>
                <td>'. people_skill_level_box('skill_level_id'). '</td>
                <td>'. people_skill_year_box('skill_year_id'). '</td>
                <td nowrap="nowrap"><input type="submit" 
name="add_to_skill_inventory" value="'._('Add Skill').'" /></td>
-       </tr></form>';
-
+       </tr>';
+       echo $HTML->closeForm();
        echo $HTML->listTableBottom();
 
 }
@@ -213,7 +213,7 @@ function 
people_add_to_job_inventory($job_id,$skill_id,$skill_level_id,$skill_ye
                                                        VALUES ($1, $2, $3, 
$4)',
                                                        array($job_id, 
$skill_id, $skill_level_id, $skill_year_id));
                        if (!$result || db_affected_rows($result) < 1) {
-                               $error_msg .= _('Error inserting into job 
inventory: ');
+                               $error_msg .= _('Error inserting into job 
inventory')._(': ');
                                $error_msg .= db_error();
                                return false;
                        } else {
@@ -221,7 +221,7 @@ function 
people_add_to_job_inventory($job_id,$skill_id,$skill_level_id,$skill_ye
                                return true;
                        }
                } else {
-                       $error_msg .= _('Error: skill already in your 
inventory');
+                       $error_msg .= _('Error')._(': ')._('skill already in 
your inventory');
                        return false;
                }
 
@@ -319,36 +319,33 @@ function people_edit_job_inventory($job_id,$group_id) {
                }
        } else {
                for ($i=0; $i < $rows; $i++) {
-                       echo '
-                       <tr '. $HTML->boxGetAltRowStyle($i) . '>
-                       <form action="'.getStringFromServer('PHP_SELF').'" 
method="post">
-                       <input type="hidden" name="job_inventory_id" value="'. 
db_result($result,$i,'job_inventory_id') .'" />
+                       echo '<tr '. $HTML->boxGetAltRowStyle($i) . '>';
+                       echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
+                       echo '<input type="hidden" name="job_inventory_id" 
value="'. db_result($result,$i,'job_inventory_id') .'" />
                        <input type="hidden" name="job_id" value="'. 
db_result($result,$i,'job_id') .'" />
                        <input type="hidden" name="group_id" 
value="'.$group_id.'" />
                                <td style="width: 25%">'. 
people_get_skill_name(db_result($result,$i,'skill_id')) . '</td>
                                <td style="width: 25%">'. 
people_skill_level_box('skill_level_id',db_result($result,$i,'skill_level_id')).
 '</td>
                                <td style="width: 25%">'. 
people_skill_year_box('skill_year_id',db_result($result,$i,'skill_year_id')). 
'</td>
                                <td style="width: 25%" nowrap="nowrap"><input 
type="submit" name="update_job_inventory" value="'._('Update').'" /> &nbsp;
-                                       <input type="submit" 
name="delete_from_job_inventory" value="'._('Delete').'" /></td>
-                               </form></tr>';
+                                       <input type="submit" 
name="delete_from_job_inventory" value="'._('Delete').'" /></td>'.
+                       $HTML->closeForm().'</tr>';
                }
 
        }
        //add a new skill
        (isset($i)) ? $i++ : $i = 0; //for row coloring
 
-       echo '
-       <tr><td colspan="4"><h3>'._('Add a new skill').'</h3></td></tr>
-       <tr '. $HTML->boxGetAltRowStyle($i) . '>
-       <form action="'.getStringFromServer('PHP_SELF').'" method="post">
-       <input type="hidden" name="job_id" value="'. $job_id .'" />
+       echo '<tr><td colspan="4"><h3>'._('Add a new skill').'</h3></td></tr>
+       <tr '. $HTML->boxGetAltRowStyle($i) . '>';
+       echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 
'method' => 'post'));
+       echo '<input type="hidden" name="job_id" value="'. $job_id .'" />
        <input type="hidden" name="group_id" value="'.$group_id.'" />
                <td style="width: 25%">'. people_skill_box('skill_id'). '</td>
                <td style="width: 25%">'. 
people_skill_level_box('skill_level_id'). '</td>
                <td style="width: 25%">'. 
people_skill_year_box('skill_year_id'). '</td>
-               <td style="width: 25%" nowrap="nowrap"><input type="submit" 
name="add_to_job_inventory" value="'._('Add Skill').'" /></td>
-       </form></tr>';
-
+               <td style="width: 25%" nowrap="nowrap"><input type="submit" 
name="add_to_job_inventory" value="'._('Add Skill').'" /></td>'.
+       $HTML->closeForm().'</tr>';
        echo $HTML->listTableBottom();
 }
 
diff --git a/src/www/register/index.php b/src/www/register/index.php
index d5968b6..8d881d0 100644
--- a/src/www/register/index.php
+++ b/src/www/register/index.php
@@ -1,6 +1,5 @@
 <?php
 /**
- *
  * Project Registration: Project Information.
  *
  * This page is used to request data required for project registration:
@@ -19,7 +18,7 @@
  * Portions Copyright 2002-2009 (c) Roland Mas
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
  * Copyright 2012, Jean-Christophe Masson - French National Education 
Department
- * Copyright 2013-2014, Franck Villaume - TrivialDev
+ * Copyright 2013-2014,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -181,8 +180,8 @@ site_user_header(array('title'=>_('Register Project')));
 <p>
 <?php echo _('To apply for project registration, you should fill in basic 
information about it. Please read descriptions below carefully and provide 
complete and comprehensive data. All fields below are mandatory.') ?>
 </p>
-
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
+<?php
+echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 
'method' => 'post')); ?>
 <input type="hidden" name="form_key" value="<?php echo form_generate_key(); 
?>"/>
 <h2><?php echo $index++.'. '._('Project Full Name') ?></h2>
 <p>
@@ -336,10 +335,8 @@ if (count ($template_projects) > 1) {
 <input type="submit" name="i_disagree" formnovalidate="formnovalidate" 
value="<?php echo _('Cancel') ?>" />
 </p>
 
-</form>
-
 <?php
-
+echo $HTML->closeForm();
 site_footer();
 
 // Local Variables:
diff --git a/src/www/reporting/customstatus.php 
b/src/www/reporting/customstatus.php
index a4ad336..044b157 100644
--- a/src/www/reporting/customstatus.php
+++ b/src/www/reporting/customstatus.php
@@ -5,6 +5,7 @@
  * Copyright 2003-2004 (c) GForge LLC
  * Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
  * Copyright 2015, nitendra tripathi
+ * Copyright 2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -71,14 +72,14 @@ $arr[]=_('Status Id');
 $arr[]=_('Status Name');
 
 if ($status_id) {
-       echo '[ <a href="customstatus.php">Add</a> ]';
+       echo '[ '.util_make_link('/reporting/customstatus.php', _('Add')). ' ]';
 }
 
 echo $HTML->listTableTop($arr);
 
 for ($i=0; $i<db_numrows($res); $i++) {
        echo '<tr 
'.$HTML->boxGetAltRowStyle($i).'><td>'.db_result($res,$i,'status_id').'</td>
-               <td><a 
href="customstatus.php?status_id='.db_result($res,$i,'status_id').'">'.db_result($res,$i,'status_name').'</a></td></tr>';
+               
<td>'.util_make_link('/reporting/customstatus.php?status_id='.db_result($res,$i,'status_id'),
 db_result($res,$i,'status_name')).'</td></tr>';
 }
 
 echo $HTML->listTableBottom();
@@ -87,7 +88,7 @@ echo $HTML->listTableBottom();
 <p>
 <?php echo _('You can create statuses to classify a particular task&apos;s 
status. Examples of statuses include &quot;Open&quot;, &quot;Close&quot;, 
&quot;Deleted&quot;.'); ?>
 </p>
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post">
+<?php echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 
'method' => 'post')); ?>
 <p>
 <input type="hidden" name="submit" value="1" />
 <input type="hidden" name="status_id" value="<?php echo $status_id; ?>" />
@@ -108,10 +109,8 @@ if ($status_id) {
 
 ?>
 </p>
-</form>
-
 <?php
-
+echo $HTML->closeForm();
 report_footer();
 
 // Local Variables:
diff --git a/src/www/reporting/projectact.php b/src/www/reporting/projectact.php
index 891dce4..96d228d 100644
--- a/src/www/reporting/projectact.php
+++ b/src/www/reporting/projectact.php
@@ -3,7 +3,7 @@
  * Reporting System
  *
  * Copyright 2003-2004 (c) GForge LLC
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -28,6 +28,8 @@ require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/Report.class.php';
 require_once $gfcommon.'reporting/ReportProjectAct.class.php';
 
+global $HTML, $error_msg;
+
 session_require_global_perm ('forge_stats', 'read') ;
 
 $report=new Report();
@@ -61,10 +63,8 @@ html_use_jqueryjqplotplugindateAxisRenderer();
 html_use_jqueryjqplotpluginBar();
 
 report_header(_('Project Activity'));
-
+echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 
'method' => 'get')); ?>
 ?>
-
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="get">
 <table><tr>
 <td><strong><?php echo _('Project')._(':'); ?></strong><br /><?php echo 
report_group_box('g_id',$g_id); ?></td>
 <td><strong><?php echo _('Area')._(':'); ?></strong><br /><?php echo 
report_area_box('area',$area); ?></td>
@@ -73,8 +73,8 @@ report_header(_('Project Activity'));
 <td><strong><?php echo _('End Date')._(':'); ?></strong><br /><?php echo 
report_months_box($report, 'end', $end); ?></td>
 <td><input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" 
/></td>
 </tr></table>
-</form>
 <?php
+echo $HTML->closeForm();
 if ($g_id && $start != $end) {
        report_actgraph('project', $SPAN, $start, $end, $g_id, $area);
 }
diff --git a/src/www/reporting/siteact.php b/src/www/reporting/siteact.php
index bef2dd5..f2ffd2f 100644
--- a/src/www/reporting/siteact.php
+++ b/src/www/reporting/siteact.php
@@ -3,7 +3,7 @@
  * Reporting System
  *
  * Copyright 2003-2004 (c) GForge LLC
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -62,10 +62,8 @@ html_use_jqueryjqplotplugindateAxisRenderer();
 html_use_jqueryjqplotpluginBar();
 
 report_header(_('Site-Wide Activity'));
-
+echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 
'method' =>'get'));
 ?>
-
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="get">
 <table><tr>
 <td><strong><?php echo _('Area')._(':'); ?></strong><br /><?php echo 
report_area_box('area',$area); ?></td>
 <td><strong><?php echo _('Type')._(':'); ?></strong><br /><?php echo 
report_span_box('SPAN',$SPAN); ?></td>
@@ -73,8 +71,8 @@ report_header(_('Site-Wide Activity'));
 <td><strong><?php echo _('End Date')._(':'); ?></strong><br /><?php echo 
report_months_box($report, 'end', $end); ?></td>
 <td><input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" 
/></td>
 </tr></table>
-</form>
 <?php
+echo $HTML->closeForm();
 if ($area && $start != $end) {
        report_actgraph('sitewide', $SPAN, $start, $end, 0, $area);
 }
diff --git a/src/www/reporting/timeadd.php b/src/www/reporting/timeadd.php
index 06541fa..7827f35 100644
--- a/src/www/reporting/timeadd.php
+++ b/src/www/reporting/timeadd.php
@@ -4,6 +4,7 @@
  *
  * Copyright 2004 (c) GForge LLC - Tim Perdue
  * Copyright (C) 2011-2012 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -27,6 +28,8 @@ require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/Report.class.php';
 
+global $HTML;
+
 if (!session_loggedin()) {
        exit_not_logged_in();
 }
@@ -154,14 +157,14 @@ if ($week) {
                                <td class="align-center">'. date( 'D, M d, 
Y',$r['report_date']) .'</td>
                                <td class="align-center"><!-- <input 
type="text" name="hours" value="'. $r['hours'] .'" size="3" maxlength="3" /> 
-->'.$r['hours'].'</td>
                                <td class="align-center"><!-- 
'.report_time_category_box('time_code',$r['time_code']).' 
-->'.$r['category_name'].'</td>
-                               <td class="align-center"><!-- <input 
type="submit" name="update" value="Update" /> -->
-                               <form 
action="'.getStringFromServer('PHP_SELF').'?week='.$week.'&amp;project_task_id='.$r['project_task_id'].'"
 method="post">
-                               <input type="hidden" name="submit" value="1" />
+                               <td class="align-center"><!-- <input 
type="submit" name="update" value="Update" /> -->';
+                       echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF').'?week='.$week.'&project_task_id='.$r['project_task_id'],
 'method' => 'post')).
+                               '<input type="hidden" name="submit" value="1" />
                                <input type="hidden" name="report_date" 
value="'.$r['report_date'] .'" />
                                <input type="hidden" name="old_time_code" 
value="'.$r['time_code'] .'" />
                                <input type="hidden" name="hours" 
value="'.$r['hours'].'" />
-                               <input type="submit" name="delete" value="'. 
_('Delete').'" />
-                               </form>
+                               <input type="submit" name="delete" value="'. 
_('Delete').'" />';
+                       echo $HTML->closeForm().'
                                </td>
                        </tr>';
                        $total_hours += $r['hours'];
@@ -171,8 +174,8 @@ if ($week) {
                        $respt=db_query_params ('SELECT project_task_id,summary 
FROM project_task WHERE group_project_id=$1',
                        array($group_project_id));
 
-                       echo '<form 
action="'.getStringFromServer('PHP_SELF').'?week='.$week.'" method="post">
-                       <input type="hidden" name="submit" value="1" />
+                       echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF').'?week='.$week, 'method' => 'post'));
+                       echo '<input type="hidden" name="submit" value="1" />
                        <input type="hidden" name="week" value="'.$week.'" />
                        <tr '.$HTML->boxGetAltRowStyle($xi++).'>
                                <td class="align-center">'. 
html_build_select_box ($respt,'project_task_id',false,false) .'</td>
@@ -180,8 +183,9 @@ if ($week) {
                                <td class="align-center"><input type="text" 
name="hours" value="" size="3" maxlength="3" /></td>
                                <td 
class="align-center">'.report_time_category_box('time_code',false).'</td>
                                <td class="align-center"><input type="submit" 
name="add" value="'.
-               _('Add').'" /><input type="submit" name="cancel" 
value="'._('Cancel').'" /></td>
-                       </tr></form>';
+                                       _('Add').'" /><input type="submit" 
name="cancel" value="'._('Cancel').'" /></td>
+                       </tr>';
+                       echo $HTML->closeForm();
                }
                if (!isset($total_hours)) $total_hours = '';
                echo '<tr '.$HTML->boxGetAltRowStyle($xi++).'><td 
colspan="2"><strong>'._('Total Hours')._(':').'</strong></td>';
@@ -192,7 +196,7 @@ if ($week) {
                ?>
 <h2><?php echo _('Add Entry'); ?></h2>
 <p><?php echo _('Choose a Project/Subproject in the Tasks. You will then have 
to choose a Task and category to record your time in.'); ?></p>
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="get">
+<?php echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 
'method' => 'get')); ?>
 <input type="hidden" name="week" value="<?php echo $week; ?>" />
 <table>
        <tr>
@@ -202,15 +206,15 @@ if ($week) {
                        value="<?php echo _('Next'); ?>" /></td>
        </tr>
 </table>
-</form>
+<?php echo $HTML->closeForm(); ?>
 
 <h2><?php echo _('Change Week') ?></h2>
 
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>"
+<?php echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'))); ?>
        method="get"><?php echo report_weeks_box($report,'week'); ?><input
        type="submit" name="submit" value="<?php echo _('Change Week'); ?>" />
-</form>
                <?php
+               echo $HTML->closeForm();
        }
        //
        //      First Choose A Week to add/update/delete time sheet info
@@ -223,14 +227,12 @@ if ($week) {
 <h2><?php echo _('Choose A Week to Record Or Edit Your Time.'); ?></h2>
 
 <p><?php echo _("After you choose a week, you will be prompted to choose a 
Project/Subproject in the Tasks."); ?></p>
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>"
-       method="get">
+<?php echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 
'method' => 'get')); ?>
 <p><strong><?php echo _('Week Starting')._(':'); ?></strong></p>
        <?php echo report_weeks_box($report,'week'); ?>
 <p><input type="submit" name="submit" value="<?php echo _('Next'); ?>" /></p>
-</form>
        <?php
-
+       echo $HTML->closeForm();
 }
 
 report_footer();
diff --git a/src/www/reporting/usercum.php b/src/www/reporting/usercum.php
index 1168657..52074f1 100644
--- a/src/www/reporting/usercum.php
+++ b/src/www/reporting/usercum.php
@@ -3,7 +3,7 @@
  * Reporting System
  *
  * Copyright 2003-2004 (c) GForge LLC
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -28,6 +28,8 @@ require_once $gfcommon.'reporting/report_utils.php';
 require_once $gfcommon.'reporting/Report.class.php';
 require_once $gfcommon.'reporting/ReportUserCum.class.php';
 
+global $HTML, $error_msg;
+
 session_require_global_perm ('forge_stats', 'read') ;
 
 $report=new Report();
@@ -57,17 +59,15 @@ html_use_jqueryjqplotpluginCanvas();
 html_use_jqueryjqplotpluginhighlighter();
 
 report_header(_('Cumulative Users'));
-?>
-
-<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="get">
+echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 
'method' => 'get')); ?>
 <table><tr>
 <td><strong><?php echo _('Type')._(':'); ?></strong><br /><?php echo 
report_span_box('SPAN',$SPAN); ?></td>
 <td><strong><?php echo _('Start Date')._(':'); ?></strong><br /><?php echo 
report_months_box($report, 'start', $start); ?></td>
 <td><strong><?php echo _('End Date')._(':'); ?></strong><br /><?php echo 
report_months_box($report, 'end', $end); ?></td>
 <td><input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" 
/></td>
 </tr></table>
-</form>
 <?php
+echo $HMTL->closeForm();
 if ($start != $end) {
        report_graph('usercumul', $SPAN, $start, $end);
 }
diff --git a/src/www/reporting/usersummary.php 
b/src/www/reporting/usersummary.php
index c30b785..a103a0e 100644
--- a/src/www/reporting/usersummary.php
+++ b/src/www/reporting/usersummary.php
@@ -4,7 +4,7 @@
  *
  * Copyright 2003-2004 (c) GForge LLC, Tim Perdue
  * Copyright 2010 (c), FusionForge Team
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -67,7 +67,7 @@ report_header(_('User Summary Report'));
        <p>
        <?php echo _('Choose the range from the pop-up boxes below. The report 
will list all tasks with an open date in that range.'); ?>
        </p>
-       <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" 
method="get">
+<?php echo $HTML->openForm(array('action' => getStringFromServer('PHP_SELF'), 
'method' => 'get')); ?>
        <table>
                <tr>
                        <td><strong><?php echo _('Start Date')._(':'); 
?></strong><br /><?php echo report_weeks_box($report, 'start', $start); ?></td>
@@ -76,10 +76,9 @@ report_header(_('User Summary Report'));
                        <td><input type="submit" name="submit" value="<?php 
echo _('Refresh'); ?>" /></td>
                </tr>
        </table>
-       </form>
-
        <?php
-       $res = db_query_params ('SELECT 
users.realname,users.user_id,users.user_name, ps.status_name, pgl.group_id, 
pt.group_project_id, pt.summary, pt.hours, pt.end_date, pt.project_task_id, 
pt.hours, sum(rtt.hours) AS remaining_hrs,
+echo $HTML->closeForm();
+$res = db_query_params ('SELECT users.realname,users.user_id,users.user_name, 
ps.status_name, pgl.group_id, pt.group_project_id, pt.summary, pt.hours, 
pt.end_date, pt.project_task_id, pt.hours, sum(rtt.hours) AS remaining_hrs,
                                (select sum(hours) from rep_time_tracking
                                        WHERE user_id=users.user_id
                                        AND project_task_id=pt.project_task_id
diff --git a/src/www/snippet/add_snippet_to_package.php 
b/src/www/snippet/add_snippet_to_package.php
index 1c63389..6fd610a 100644
--- a/src/www/snippet/add_snippet_to_package.php
+++ b/src/www/snippet/add_snippet_to_package.php
@@ -4,7 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright (C) 2010 Alain Peyrat - Alcatel-Lucent
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -54,7 +54,7 @@ if (session_loggedin()) {
 
        if (!$snippet_package_version_id) {
                //make sure the package id was passed in
-               echo $HTML->error_msg(_('Error: snippet_package_version_id 
missing'));
+               echo $HTML->error_msg(_('Error')._(': 
')._('snippet_package_version_id missing'));
                handle_add_exit();
        }
 
@@ -112,7 +112,7 @@ if (session_loggedin()) {
                                $feedback .= _('Snippet Version Added 
Successfully.');
                        }
                } else {
-                       echo $HTML->error_msg(_('Error: Go back and fill in all 
the information'));
+                       echo $HTML->error_msg(_('Error')._(': ')._('Go back and 
fill in all the information'));
                        echo 
util_make_link('/snippet/add_snippet_to_package.php?snippet_package_version_id='.$snippet_package_version_id,_('Back
 To Add Page'));
                        handle_add_exit();
                }
@@ -131,14 +131,14 @@ if (session_loggedin()) {
        <p><?php echo _('You can use this form repeatedly to keep adding 
snippets to your package.'); ?></p>
        <p><?php echo _('The “Snippet Version ID” is the unique ID number that 
is shown next to a specific version of a snippet on the browse pages.'); ?></p>
        <p>
-       <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" 
method="post">
+       <?php echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post')); ?>
        <input type="hidden" name="post_changes" value="y" />
        <input type="hidden" name="snippet_package_version_id" value="<?php 
echo $snippet_package_version_id; ?>" />
        <input type="hidden" name="suppress_nav" value="<?php echo 
$suppress_nav; ?>" />
 
        <table>
        <tr><td colspan="2" class="align-center">
-               <strong><?php echo _('Add This Snippet Version ID:'); 
?></strong><br />
+               <strong><?php echo _('Add This Snippet Version ID')._(':'); 
?></strong><br />
                <select name="snippet_version_id">
 <?php
 
@@ -166,7 +166,9 @@ for ($i=0; $i<$combolistrows; $i++)
                <br />
                <input type="submit" name="submit" value="<?php echo 
_('Submit'); ?>" />
        </td></tr>
-       </table></form></p>
+       </table>
+       <?php echo $HTML->closeForm(); ?>
+       </p>
        <?php
        /*
                Show the snippets in this package
diff --git a/src/www/snippet/addversion.php b/src/www/snippet/addversion.php
index aaa8dd0..d983c57 100644
--- a/src/www/snippet/addversion.php
+++ b/src/www/snippet/addversion.php
@@ -3,7 +3,7 @@
  * Code Snippets Repository
  *
  * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -26,6 +26,8 @@ require_once '../env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'snippet/snippet_utils.php';
 
+global $HTML;
+
 if (session_loggedin()) {
        $type = getStringFromRequest('type');
        $id = getIntFromRequest('id');
@@ -83,7 +85,7 @@ if (session_loggedin()) {
 
                ?>
                <p><?php echo _('If you have modified a version of a snippet 
and you feel it is significant enough to share with others, please do so.'); 
?></p>
-               <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" 
method="post">
+               <?php echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post')); ?>
                <input type="hidden" name="form_key" value="<?php echo 
form_generate_key(); ?>">
                <input type="hidden" name="post_changes" value="y" />
                <input type="hidden" name="type" value="snippet" />
@@ -108,9 +110,9 @@ if (session_loggedin()) {
                        <br />
                        <input type="submit" name="submit" value="<?php echo 
_('Submit'); ?>" />
                </td></tr>
-               </table></form>
+               </table>
                <?php
-
+               echo $HTML->closeForm();
                snippet_footer();
 
        } elseif ($type=='package') {
@@ -206,7 +208,7 @@ function show_add_snippet_box() {
                <p>
                <?php echo _('If you have modified a version of a package and 
you feel it is significant enough to share with others, please do so.'); ?></p>
                <p>
-               <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" 
method="post">
+               <?php echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post')); ?>
                <input type="hidden" name="form_key" value="<?php echo 
form_generate_key(); ?>">
                <input type="hidden" name="post_changes" value="y" />
                <input type="hidden" name="type" value="package" />
@@ -227,9 +229,9 @@ function show_add_snippet_box() {
                        <br />
                        <input type="submit" name="submit" value="<?php echo 
_('Submit'); ?>" />
                </td></tr>
-               </table></form></p>
+               </table></p>
                <?php
-
+               echo $HTML->closeForm();
                snippet_footer();
 
        } else {
diff --git a/src/www/snippet/package.php b/src/www/snippet/package.php
index d48419d..818b527 100644
--- a/src/www/snippet/package.php
+++ b/src/www/snippet/package.php
@@ -3,6 +3,7 @@
  * Code Snippets Repository
  *
  * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -25,8 +26,9 @@ require_once '../env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'snippet/snippet_utils.php';
 
-if (session_loggedin()) {
+global $HTML, $feedback, $error_msg;
 
+if (session_loggedin()) {
        if (getStringFromRequest('post_changes')) {
                if (!form_key_is_valid(getStringFromRequest('form_key'))) {
                        exit_form_double_submit();
@@ -128,16 +130,16 @@ function show_add_snippet_box() {
 
        ?>
        </p>
-    <p>
-    <?php echo _('You can group together existing snippets into a package 
using this interface. Before creating your package, make sure all your snippets 
are in place and you have made a note of the snippet ID\'s.'); ?>
-    </p>
+       <p>
+       <?php echo _('You can group together existing snippets into a package 
using this interface. Before creating your package, make sure all your snippets 
are in place and you have made a note of the snippet ID\'s.'); ?>
+       </p>
        <ol>
-      <li><?php echo _('Create the package using this form.'); ?></li>
-         <li><?php echo _('<strong>Then</strong> use the “Add Snippets to 
Package” link to add files to your package.'); ?></li>
+               <li><?php echo _('Create the package using this form.'); ?></li>
+               <li><?php echo _('<strong>Then</strong> use the “Add Snippets 
to Package” link to add files to your package.'); ?></li>
        </ol>
        <p><?php echo _('<span class="important">Note:</span> You can submit a 
new version of an existing package by browsing the library and using the link 
on the existing package. You should only use this page if you are submitting an 
entirely new package.'); ?>
-    </p>
-       <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" 
method="post">
+       </p>
+       <?php echo $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post')); ?>
        <input type="hidden" name="form_key" value="<?php echo 
form_generate_key(); ?>"/>
        <input type="hidden" name="post_changes" value="y" />
        <input type="hidden" name="changes" value="<?php echo _('First Posted 
Version') ?>" />
@@ -176,14 +178,12 @@ function show_add_snippet_box() {
                <input type="submit" name="submit" value="<?php echo 
_('Submit'); ?>" />
        </td></tr>
 
-       </table></form>
+       </table>
        <?php
+       echo $HTML->closeForm();
        snippet_footer();
-
 } else {
-
        exit_not_logged_in();
-
 }
 
 // Local Variables:
diff --git a/src/www/snippet/submit.php b/src/www/snippet/submit.php
index 5a14621..d463251 100644
--- a/src/www/snippet/submit.php
+++ b/src/www/snippet/submit.php
@@ -3,7 +3,7 @@
  * Code Snippets Repository
  *
  * Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014,2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -26,8 +26,9 @@ require_once '../env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'snippet/snippet_utils.php';
 
-if (session_loggedin()) {
+global $HTML, $feedback, $error_msg;
 
+if (session_loggedin()) {
        if (getStringFromRequest('post_changes')) {
                if (!form_key_is_valid(getStringFromRequest('form_key'))) {
                        exit_form_double_submit();
@@ -92,8 +93,8 @@ if (session_loggedin()) {
        <p>
        <?php echo _('<span class="important">Note:</span> You can submit a new 
version of an existing snippet by browsing the library. You should only use 
this page if you are submitting an entirely new script or function.'); ?>
        </p>
-       <form action="<?php echo getStringFromServer('PHP_SELF'); ?>" 
method="post" id="snippet_submit">
        <?php
+       echo $HTML->openForm(arrray('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post', 'id' => 'snippet_submit'));
        echo $HTML->html_input('form_key', '', '', 'hidden', 
form_generate_key());
        echo $HTML->html_input('post_changes', '', '', 'hidden', 'y');
        echo $HTML->html_input('changes', '', '', 'hidden', 'First Posted 
Version');
@@ -128,7 +129,7 @@ if (session_loggedin()) {
 
        <td>
                <?php echo $HTML->html_select($SCRIPT_CATEGORY, 'category', 
_('Category').utils_requiredField()._(': ')); ?>
-                <br />
+               <br />
                 <!-- FIXME: Where should this link go to? <?php echo 
util_make_link ('/support/?func=addsupport&group_id=1',_('Suggest a 
Category')); ?> -->
        </td>
        </tr>
@@ -144,15 +145,12 @@ if (session_loggedin()) {
        <tr><td colspan="2" class="align-center">
         <?php echo $HTML->html_input('submit', '', _('Make sure all info is 
complete and accurate'), 'submit', _('Submit')); ?>
        </td></tr>
-       </table></form>
-
+       </table>
        <?php
+       echo $HTML->closeForm();
        snippet_footer();
-
 } else {
-
        exit_not_logged_in();
-
 }
 
 // Local Variables:
diff --git a/src/www/survey/include/SurveyHTML.class.php 
b/src/www/survey/include/SurveyHTML.class.php
index 72a86df..3a4a635 100644
--- a/src/www/survey/include/SurveyHTML.class.php
+++ b/src/www/survey/include/SurveyHTML.class.php
@@ -33,9 +33,6 @@ require_once $gfwww.'include/note.php';
  */
 class SurveyHTML extends FFError {
 
-       function __construct() {
-       }
-
        /**
         * Show survey header
         */
@@ -124,7 +121,7 @@ class SurveyHTML extends FFError {
                }
 
                $ret = $warning_msg;
-               $ret.='<form action="'.getStringFromServer('PHP_SELF').'" 
method="post">' . "\n";
+               $ret.= $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
                $ret.='<p><input type="hidden" name="post" value="Y" />';
                $ret.='<input type="hidden" name="group_id" 
value="'.$group_id.'" />';
                $ret.='<input type="hidden" name="question_id" 
value="'.$question_id.'" />';
@@ -137,7 +134,7 @@ class SurveyHTML extends FFError {
                $ret.= 
html_build_select_box($result,'question_type',$question_type,false);
 
                $ret.='</p><p><input type="submit" name="submit" 
value="'.$question_button.'" /></p>' . "\n";
-               $ret.='</form>' . "\n";
+               $ret.= $HTML->closeForm();
 
                return $ret;
        }
@@ -184,7 +181,7 @@ class SurveyHTML extends FFError {
                }
 
                $ret = $warning_msg;
-               $ret.='<form action="'.getStringFromServer('PHP_SELF').'" 
method="post">';
+               $ret.= $HTML->openForm(array('action' => 
getStringFromServer('PHP_SELF'), 'method' => 'post'));
                $ret.='<p><input type="hidden" name="post" value="Y" />';
                $ret.='<input type="hidden" name="group_id" 
value="'.$group_id.'" />';
                $ret.='<input type="hidden" name="survey_id" 
value="'.$survey_id.'" />';
@@ -278,8 +275,7 @@ class SurveyHTML extends FFError {
                */
 
                $ret.='<p><input type="submit" name="submit" 
value="'.$survey_button.'" /></p>';
-               $ret.='</form>';
-
+               $ret.= $HTML->closeForm();
                return $ret;
        }
 
@@ -439,7 +435,7 @@ class SurveyHTML extends FFError {
                        }
                        if ($show_result_csv) {
                                /* Csv Link */
-                               $ret.= 
'<td>['.util_make_link('/survey/admin/show_csv.php?group_id=$group_id&survey_id='.$surveys[$i]->getID(),
 _('CSV')).']</td>';
+                               $ret.= 
'<td>['.util_make_link('/survey/admin/show_csv.php?group_id='.$group_id.'&survey_id='.$surveys[$i]->getID(),
 _('CSV')).']</td>';
                        }
                        $ret.= "</tr>\n";
                }

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

commit b8e7d2b5ded82e1344402f91d97f64cfa5e8632b
Author: Franck Villaume <[email protected]>
Date:   Sat Sep 10 17:55:50 2016 +0200

    remove useless code with REQUEST_URI factorization & url_prefix support

diff --git a/src/www/users b/src/www/users
index 57c7b37..9fc7cda 100644
--- a/src/www/users
+++ b/src/www/users
@@ -27,9 +27,7 @@ require_once 'env.inc.php';
 require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'include/User.class.php';
 
-$normalized_urlprefix = normalized_urlprefix();
-$pathinfo = substr_replace(getStringFromServer('REQUEST_URI'), '', 0, 
strlen($normalized_urlprefix)-1);
-$expl_pathinfo = explode('/', $pathinfo);
+$expl_pathinfo = explode('/', getStringFromServer('REQUEST_URI'));
 
 if (!$expl_pathinfo[2]) {
        exit_error(_('No User Name Provided'));
@@ -40,6 +38,8 @@ $script='user_home';
 $content_type = util_negociate_alternate_content_types($script, 
$default_content_type);
 
 $username = urldecode($expl_pathinfo[2]);
+//get the user object based on the user_name in the URL
+$user = user_get_object_by_name($username);
 
 // If restricted mode, display only people who are sharing a project with the 
current user.
 if (forge_get_config('restrict_users_visibility')) {
@@ -47,19 +47,15 @@ if (forge_get_config('restrict_users_visibility')) {
                exit_permission_denied();
        }
 
-       $s  = session_get_user();
-       $u1 = $s->getID();
-
-       $user = user_get_object_by_name($username);
        if (!$user || !is_object($user) || $user->isError() || 
!$user->isActive()) {
                exit_permission_denied();
        }
        $u2 = $user->getID();
 
-       $u2gl = $user->getGroups();
+       $u2gl = $user->getGroupIds();
        $seen = false;
        foreach ($u2gl as $u2g) {
-               if (forge_check_perm('project_read', $u2g->getID())) {
+               if (forge_check_perm('project_read', $u2g)) {
                        $seen = true;
                        break;
                }
@@ -69,13 +65,8 @@ if (forge_get_config('restrict_users_visibility')) {
        }
 }
 
-//get the user object based on the user_name in the URL
-$user = user_get_object_by_name($username);
-
 if (!$user || !is_object($user) || $user->isError() || !$user->isActive()) {
-
        exit_error(_('That user does not exist.'));
-
 } else {
        // if a custom content-type is selected, then redirect to plugin's 
rendering
        if($content_type != $default_content_type) {

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

Summary of changes:
 src/plugins/mailman/www/admin/deletelist.php     |  10 +-
 src/plugins/mailman/www/admin/index.php          |  24 ++---
 src/plugins/projectimport/www/index.php          | 126 ++++++++++-------------
 src/plugins/projectimport/www/projectsimport.php |  79 +++++++-------
 src/plugins/projectimport/www/usersimport.php    |  61 +++++------
 src/www/forum/admin/index.php                    |  61 +++++------
 src/www/mail/admin/deletelist.php                |  12 +--
 src/www/mail/admin/index.php                     |  32 +++---
 src/www/people/admin/index.php                   |  21 ++--
 src/www/people/editjob.php                       |  15 ++-
 src/www/people/editprofile.php                   |  40 ++++---
 src/www/people/people_utils.php                  |  47 ++++-----
 src/www/register/index.php                       |  11 +-
 src/www/reporting/customstatus.php               |  11 +-
 src/www/reporting/projectact.php                 |  10 +-
 src/www/reporting/siteact.php                    |   8 +-
 src/www/reporting/timeadd.php                    |  36 ++++---
 src/www/reporting/usercum.php                    |  10 +-
 src/www/reporting/usersummary.php                |   9 +-
 src/www/snippet/add_snippet_to_package.php       |  14 +--
 src/www/snippet/addversion.php                   |  16 +--
 src/www/snippet/package.php                      |  24 ++---
 src/www/snippet/submit.php                       |  16 ++-
 src/www/survey/include/SurveyHTML.class.php      |  14 +--
 src/www/users                                    |  19 +---
 25 files changed, 328 insertions(+), 398 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