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, 6.1 has been updated
       via  a3237f1a2b9fb61ace9e7ec087949561e852e481 (commit)
      from  63a0e797634548de3cfdefa20ba8afa104151130 (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=a3237f1a2b9fb61ace9e7ec087949561e852e481

commit a3237f1a2b9fb61ace9e7ec087949561e852e481
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Mon Apr 2 11:32:51 2018 +0200

    remove useless code & strings

diff --git a/src/common/frs/views/shownotes.php 
b/src/common/frs/views/shownotes.php
index df74210..963b39d 100644
--- a/src/common/frs/views/shownotes.php
+++ b/src/common/frs/views/shownotes.php
@@ -41,7 +41,7 @@ if (!$frsr || !is_object($frsr)) {
 //  Members of projects can see all packages
 //  Non-members can only see public packages
 if(!$frsr->getFRSPackage()->isPublic()) {
-       if (!session_loggedin() || (!user_ismember($group_id) &&
+       if (!session_loggedin() || (!session_get_user()->isMember($group_id) &&
                !forge_check_global_perm('forge_admin'))) {
                exit_permission_denied();
        }
diff --git a/src/common/include/User.class.php 
b/src/common/include/User.class.php
index 4e36c43..4e1a434 100644
--- a/src/common/include/User.class.php
+++ b/src/common/include/User.class.php
@@ -926,7 +926,7 @@ class FFUser extends FFError {
                                        array($email, $this->getID()));
 
                if (!$res) {
-                       $this->setError('Error: Cannot Update User Email: 
'.db_error());
+                       $this->setError(_('Error')._(': ')._('Cannot Update 
User Email')._(': ').db_error());
                        db_rollback();
                        return false;
                } else {
@@ -975,7 +975,7 @@ class FFUser extends FFError {
                $res = db_query_params('UPDATE users SET confirm_hash=$1, 
email_new=$2 WHERE user_id=$3',
                                        array($hash, $email, $this->getID()));
                if (!$res) {
-                       $this->setError('Error: Cannot Update User Email And 
Hash: '.db_error());
+                       $this->setError(_('Error')._(': ')._('Cannot Update 
User Email And Hash')._(': ').db_error());
                        return false;
                } else {
                        $this->data_array['email_new'] = $email;
@@ -1003,7 +1003,7 @@ class FFUser extends FFError {
                $res = db_query_params('UPDATE users SET realname=$1 WHERE 
user_id=$2',
                        array($realname, $this->getID()));
                if (!$res || db_affected_rows($res) < 1) {
-                       $this->setError('Error: Cannot Update real name of user 
: '.db_error());
+                       $this->setError(_('Error')._(': ')._('Cannot Update 
real name of user')._(': ').db_error());
                        return false;
                }
                $this->data_array['realname'] = $realname;
@@ -1084,7 +1084,7 @@ class FFUser extends FFError {
                $res = db_query_params('UPDATE users SET shell=$1 WHERE 
user_id=$2',
                                        array($shell, $this->getID()));
                if (!$res) {
-                       $this->setError(_('Error: Cannot Update User Unix 
Shell:').' '.db_error());
+                       $this->setError(_('Error')._(': ')._('Cannot Update 
User Unix Shell')._(': ').db_error());
                        db_rollback();
                        return false;
                } else {
@@ -1268,7 +1268,7 @@ class FFUser extends FFError {
                $res = db_query_params('DELETE FROM sshkeys WHERE id_sshkeys = 
$1 and userid = $2',
                                        array($keyid, $this->getID()));
                if (!$res) {
-                       $this->setError(_('Error: Cannot delete user SSH key'));
+                       $this->setError(_('Error')._(': ')._('Cannot delete 
user SSH key'));
                        return false;
                } else {
                        unset($this->data_array['authorized_keys'][$keyid]);
@@ -1412,7 +1412,7 @@ class FFUser extends FFError {
                                               $this->getID()));
 
                if (!$res || db_affected_rows($res) < 1) {
-                       $this->setError(_('Error: Cannot Change User 
Password:').' '.db_error());
+                       $this->setError(_('Error')._(': ')._('Cannot Change 
User Password').(': ').db_error());
                        db_rollback();
                        return false;
                } else {
@@ -1436,15 +1436,6 @@ class FFUser extends FFError {
        }
 
        /**
-        * setMD5Passwd - Changes user's MD5 password.
-        *
-        * @param       string  $md5    The MD5-hashed password.
-        */
-       function setMD5Passwd($md5) {
-               exit(_('Error: Cannot Change User Password:').' '._('MD5 
obsoleted'));
-       }
-
-       /**
         * setUnixPasswd - Changes user's Unix-hashed password.
         *
         * @param       string  $unix   The Unix-hashed password.
@@ -1459,7 +1450,7 @@ class FFUser extends FFError {
                                array($unix, $this->getID()));
 
                        if (!$res || db_affected_rows($res) < 1) {
-                               $this->setError(_('Error: Cannot Change User 
Password:').' '.db_error());
+                               $this->setError(_('Error')._(': ')._('Cannot 
Change User Password')._(': ').db_error());
                                db_rollback();
                                return false;
                        }
@@ -1777,7 +1768,7 @@ Email: %3$s
         */
        function setUneditable($data) {
                if (!is_array($data)) {
-                       $this->setError(_('Error')._(': ')._('Cannot Update 
list of uneditable fields: not an array'));
+                       $this->setError(_('Error')._(': ')._('Cannot Update 
list of uneditable fields')._(': ')._('not an array'));
                        return false;
                }
 
@@ -1800,7 +1791,7 @@ Email: %3$s
         */
        function setHidden($data) {
                if (!is_array($data)) {
-                       $this->setError(_('Error')._(': ')._('Cannot Update 
list of hidden fields: not an array'));
+                       $this->setError(_('Error')._(': ')._('Cannot Update 
list of hidden fields')._(': ')._('not an array'));
                        return false;
                }
 
@@ -1894,26 +1885,6 @@ function sortUserList(&$list, $criterion = 'name') {
 */
 
 /**
- * user_ismember() - DEPRECATED; DO NOT USE! (TODO: document what should be 
used instead)
- *  Replace user_ismember(1[, 'A']) with forge_check_global_perm('forge_admin')
- *  Replace user_ismember($group_id, 'A') with 
forge_check_perm('project_admin', $group_id)
- *  For now, keep user_ismember($group_id) alone
- *
- * @param        int        $group_id The Group ID
- * @param        int        $type     The Type
- * @return bool
- * @deprecated
- *
- */
-function user_ismember($group_id, $type = 0) {
-       if (!session_loggedin()) {
-               return false;
-       }
-
-       return session_get_user()->isMember($group_id, $type) ;
-}
-
-/**
  * user_getname() - DEPRECATED; DO NOT USE! (TODO: document what should be 
used instead)
  *
  * @param bool|int $user_id The User ID
diff --git a/src/www/include/html.php b/src/www/include/html.php
index 74fab25..949b4ff 100644
--- a/src/www/include/html.php
+++ b/src/www/include/html.php
@@ -1146,7 +1146,7 @@ function site_footer($params = array()) {
 function site_project_header($params) {
        /*
                Check to see if active
-               Check to see if private (if private check if user_ismember)
+               Check to see if private (if private check if 
session_require_perm)
        */
        $group_id = $params['group'];
 
diff --git a/src/www/survey/admin/show_csv.php 
b/src/www/survey/admin/show_csv.php
index 0fdfa02..7ded894 100644
--- a/src/www/survey/admin/show_csv.php
+++ b/src/www/survey/admin/show_csv.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * GForge Survey Facility
+ * Survey Facility
  *
  * Portions Copyright 1999-2001 (c) VA Linux Systems
  * The rest Copyright 2002-2004 (c) GForge Team
@@ -45,20 +45,17 @@ $html = getStringFromRequest('html');
 
 /* We need a group_id */
 if (!$group_id) {
-    exit_no_group();
+       exit_no_group();
 }
 
 $g = group_get_object($group_id);
 if (!$g || !is_object($g) || $g->isError()) {
-    exit_no_group();
+       exit_no_group();
 }
 
-$is_admin_page='y';
 $sh = new SurveyHtml();
 
-$is_admin_page='y';
-
-if (!session_loggedin() || !user_ismember($group_id,'A')) {
+if (!session_loggedin() || !forge_check_perm('project_admin', $group_id)) {
        echo $HTML->error_msg(_('Permission denied.'));
        $sh->footer();
        exit;

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

Summary of changes:
 src/common/frs/views/shownotes.php |  2 +-
 src/common/include/User.class.php  | 47 ++++++++------------------------------
 src/www/include/html.php           |  2 +-
 src/www/survey/admin/show_csv.php  | 11 ++++-----
 4 files changed, 15 insertions(+), 47 deletions(-)


hooks/post-receive
-- 
FusionForge

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

Reply via email to