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 eff15d56a7c8cfe77c91b1dd198a4ad706159458 (commit)
via 67e6b38b0954f2778f070d3d0d9295d959a61a3a (commit)
via cb88cba76c50d5c916ecf8da3884a54bd2cde2db (commit)
from af6e96af1c69adf5e169f62e2af0718fd73737d2 (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=eff15d56a7c8cfe77c91b1dd198a4ad706159458
commit eff15d56a7c8cfe77c91b1dd198a4ad706159458
Author: Franck Villaume <[email protected]>
Date: Fri Nov 11 12:16:16 2016 +0100
remove unused code
diff --git a/src/common/widget/WidgetLayoutManager.class.php
b/src/common/widget/WidgetLayoutManager.class.php
index 9a637c7..cacd9ba 100644
--- a/src/common/widget/WidgetLayoutManager.class.php
+++ b/src/common/widget/WidgetLayoutManager.class.php
@@ -2,7 +2,7 @@
/**
* Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights
reserved
* Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2013-2015, Franck Villaume - TrivialDev
+ * Copyright 2013-2016, Franck Villaume - TrivialDev
*
* This file is a part of Fusionforge.
*
@@ -506,7 +506,7 @@ class WidgetLayoutManager {
}
}
}
- $this->feedback($owner_id, $owner_type);
+ $this->feedback();
}
function _retrieveStructureOfLayout($layout_id) {
@@ -686,23 +686,11 @@ class WidgetLayoutManager {
db_query_params($sql,array($name,$content_id,$owner_type,$owner_id,$layout_id,$column_id));
echo db_error();
}
- $this->feedback($owner_id, $owner_type);
+ $this->feedback();
}
- protected function feedback($owner_id, $owner_type) {
+ protected function feedback() {
global $feedback;
- $link = util_make_uri('/');
- if ($owner_type == self::OWNER_TYPE_GROUP) {
- //retrieve the short name of the project
- if ($project =
ProjectManager::instance()->getProject($owner_id)) {
- $hp = Codendi_HTMLPurifier::instance();
- $link = util_make_uri('/projects/'.
$hp->purify($project->getUnixName(), CODENDI_PURIFIER_CONVERT_HTML));
- }
- } elseif ($owner_type == self::OWNER_TYPE_USER) {
- $link = util_make_uri('/my/');
- } elseif ($owner_type == self::OWNER_TYPE_HOME) {
- $link = util_make_uri('/');
- }
$feedback .= _('Your dashboard has been updated.');
}
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=67e6b38b0954f2778f070d3d0d9295d959a61a3a
commit 67e6b38b0954f2778f070d3d0d9295d959a61a3a
Author: Franck Villaume <[email protected]>
Date: Fri Nov 11 11:58:57 2016 +0100
comment
diff --git a/src/common/include/FFObject.class.php
b/src/common/include/FFObject.class.php
index f7deaab..885f671 100644
--- a/src/common/include/FFObject.class.php
+++ b/src/common/include/FFObject.class.php
@@ -36,7 +36,8 @@ class FFObject extends FFError {
/**
* store id & objectType of association.
- * array[objectType] = array(id, id, ...)
+ * array[objectType][refId] = array(id, id, ...)
+ * where objectType is the object class, refId is the reference of the
section for permission check, id is the object id itself
*
* @var array $associatedToArray
*/
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=cb88cba76c50d5c916ecf8da3884a54bd2cde2db
commit cb88cba76c50d5c916ecf8da3884a54bd2cde2db
Author: Franck Villaume <[email protected]>
Date: Thu Nov 10 20:32:54 2016 +0100
fix permission check to avoid display private information
diff --git a/src/common/include/FFObject.class.php
b/src/common/include/FFObject.class.php
index 83ad6fe..f7deaab 100644
--- a/src/common/include/FFObject.class.php
+++ b/src/common/include/FFObject.class.php
@@ -61,16 +61,20 @@ class FFObject extends FFError {
array($id, $objectType));
if ($res && db_numrows($res)) {
while ($arr = db_fetch_array($res)) {
-
$this->associatedToArray[$arr[0]][$arr[1]][] = $arr[2];
- $this->associationCounter++;
+ if ($this->checkPermWrapper($arr[0],
$arr[1])) {
+
$this->associatedToArray[$arr[0]][$arr[1]][] = $arr[2];
+ $this->associationCounter++;
+ }
}
}
$res = db_query_params('SELECT from_object_type,
from_ref_id, from_id FROM fusionforge_object_assiociation WHERE to_id = $1 AND
to_object_type = $2',
array($id, $objectType));
if ($res && db_numrows($res)) {
while ($arr = db_fetch_array($res)) {
-
$this->associatedFromArray[$arr[0]][$arr[1]][] = $arr[2];
- $this->associationCounter++;
+ if ($this->checkPermWrapper($arr[0],
$arr[1])) {
+
$this->associatedFromArray[$arr[0]][$arr[1]][] = $arr[2];
+ $this->associationCounter++;
+ }
}
}
}
@@ -290,28 +294,26 @@ class FFObject extends FFError {
if (count($this->getAssociatedTo()) > 0) {
foreach ($this->getAssociatedTo() as $objectType =>
$objectRefIds) {
foreach ($objectRefIds as $objectRefId =>
$objectIds) {
- if
($this->checkPermWrapper($objectType, $objectRefId)) {
- if (!$displayHeader) {
- $tabletop = array('',
_('Associated Object'), _('Associated Object ID'));
- $classth = array('',
'', '');
- if ($url !== false) {
- $content .=
html_e('p', array(), _('Remove all associations')._(':
').util_make_link($url.'&link=any', $HTML->getDeletePic(_('Drop all associated
from and to objects.'))));
- $tabletop[] =
_('Actions');
- $classth[] =
'unsortable';
- }
- $content .=
$HTML->listTableTop($tabletop, array(), 'sortable', 'sortable_association',
$classth);
- $displayHeader = true;
+ if (!$displayHeader) {
+ $tabletop = array('',
_('Associated Object'), _('Associated Object ID'));
+ $classth = array('', '', '');
+ if ($url !== false) {
+ $content .= html_e('p',
array(), _('Remove all associations')._(': ').util_make_link($url.'&link=any',
$HTML->getDeletePic(_('Drop all associated from and to objects.'))));
+ $tabletop[] =
_('Actions');
+ $classth[] =
'unsortable';
}
- foreach ($objectIds as
$objectId) {
- $cells = array();
- $cells[][] = _('To');
- $cells[][] =
$objectType;
- $cells[][] =
$this->getLinkObject($objectId, $objectRefId, $objectType);
- if ($url !== false) {
- $cells[][] =
util_make_link($url.'&link=to&objecttype='.$objectType.'&objectrefid='.$objectRefId.'&objectid='.$objectId,
$HTML->getDeletePic(_('Remove this association'), _('Remove this
association')));
- }
- $content .=
$HTML->multiTableRow(array(), $cells);
+ $content .=
$HTML->listTableTop($tabletop, array(), 'sortable', 'sortable_association',
$classth);
+ $displayHeader = true;
+ }
+ foreach ($objectIds as $objectId) {
+ $cells = array();
+ $cells[][] = _('To');
+ $cells[][] = $objectType;
+ $cells[][] =
$this->getLinkObject($objectId, $objectRefId, $objectType);
+ if ($url !== false) {
+ $cells[][] =
util_make_link($url.'&link=to&objecttype='.$objectType.'&objectrefid='.$objectRefId.'&objectid='.$objectId,
$HTML->getDeletePic(_('Remove this association'), _('Remove this
association')));
}
+ $content .=
$HTML->multiTableRow(array(), $cells);
}
}
}
@@ -319,28 +321,26 @@ class FFObject extends FFError {
if (count($this->getAssociatedFrom()) > 0) {
foreach ($this->getAssociatedFrom() as $objectType =>
$objectRefIds) {
foreach ($objectRefIds as $objectRefId =>
$objectIds) {
- if
($this->checkPermWrapper($objectType, $objectRefId)) {
- if (!$displayHeader) {
- $tabletop = array('',
_('Associated Object'), _('Associated Object ID'));
- $classth = array('',
'', '');
- if ($url !== false) {
- $content .=
html_e('p', array(), _('Remove all associations')._(':
').util_make_link($url.'&link=any', $HTML->getDeletePic(_('Remove all
associations'), _('Remove all associations'))));
- $tabletop[] =
_('Actions');
- $classth[] =
'unsortable';
- }
- $content .=
$HTML->listTableTop($tabletop, array(), 'sortable', 'sortable_association',
$classth);
- $displayHeader = true;
+ if (!$displayHeader) {
+ $tabletop = array('',
_('Associated Object'), _('Associated Object ID'));
+ $classth = array('', '', '');
+ if ($url !== false) {
+ $content .= html_e('p',
array(), _('Remove all associations')._(': ').util_make_link($url.'&link=any',
$HTML->getDeletePic(_('Remove all associations'), _('Remove all
associations'))));
+ $tabletop[] =
_('Actions');
+ $classth[] =
'unsortable';
}
- foreach ($objectIds as
$objectId) {
- $cells = array();
- $cells[][] = _('From');
- $cells[][] =
$objectType;
- $cells[][] =
$this->getLinkObject($objectId, $objectRefId, $objectType);
- if ($url !== false) {
- $cells[][] =
util_make_link($url.'&link=from&objecttype='.$objectType.'&objectrefid='.$objectRefId.'&objectid='.$objectId,
$HTML->getDeletePic(_('Remove this association'), _('Remove this
association')));
- }
- $content .=
$HTML->multiTableRow(array(), $cells);
+ $content .=
$HTML->listTableTop($tabletop, array(), 'sortable', 'sortable_association',
$classth);
+ $displayHeader = true;
+ }
+ foreach ($objectIds as $objectId) {
+ $cells = array();
+ $cells[][] = _('From');
+ $cells[][] = $objectType;
+ $cells[][] =
$this->getLinkObject($objectId, $objectRefId, $objectType);
+ if ($url !== false) {
+ $cells[][] =
util_make_link($url.'&link=from&objecttype='.$objectType.'&objectrefid='.$objectRefId.'&objectid='.$objectId,
$HTML->getDeletePic(_('Remove this association'), _('Remove this
association')));
}
+ $content .=
$HTML->multiTableRow(array(), $cells);
}
}
}
-----------------------------------------------------------------------
Summary of changes:
src/common/include/FFObject.class.php | 91 +++++++++++++------------
src/common/widget/WidgetLayoutManager.class.php | 20 ++----
2 files changed, 50 insertions(+), 61 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits