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 ea6da9dfff371b1b1999632f47c9f8912de1585d (commit)
from dd622df56ab89effedbbcd523154bc43771797f6 (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=ea6da9dfff371b1b1999632f47c9f8912de1585d
commit ea6da9dfff371b1b1999632f47c9f8912de1585d
Author: Franck Villaume <[email protected]>
Date: Tue Nov 6 19:25:07 2018 +0100
display configuration widget submenu when loggedin only
diff --git a/src/www/users b/src/www/users
index 4f1590a..04760eb 100644
--- a/src/www/users
+++ b/src/www/users
@@ -91,26 +91,28 @@ if (!$user || !is_object($user) || $user->isError() ||
!$user->isActive()) {
if (!forge_get_config('user_home_widget')) {
include $gfwww.'include/user_home.php';
} else {
- $sql = "SELECT l.*
- FROM layouts AS l INNER JOIN
owner_layouts AS o ON(l.id = o.layout_id)
- WHERE o.owner_type = $1
- AND o.owner_id = $2
- AND o.is_default = 1
- ";
- $res =
db_query_params($sql,array(WidgetLayoutManager::OWNER_TYPE_USERHOME,
$user->getID()));
- $layout_id = db_result($res, 0 , 'id');
- if (!$layout_id) {
- $layout_id = 1;
+ if (session_loggedin()) {
+ $sql = "SELECT l.*
+ FROM layouts AS l INNER JOIN
owner_layouts AS o ON(l.id = o.layout_id)
+ WHERE o.owner_type = $1
+ AND o.owner_id = $2
+ AND o.is_default = 1
+ ";
+ $res =
db_query_params($sql,array(WidgetLayoutManager::OWNER_TYPE_USERHOME,
$user->getID()));
+ $layout_id = db_result($res, 0 , 'id');
+ if (!$layout_id) {
+ $layout_id = 1;
+ }
+ $ap = html_ap();
+ echo html_ao('ul', array('class' =>
'widget_toolbar'));
+ $url =
'/widgets/widgets.php?owner='.WidgetLayoutManager::OWNER_TYPE_USERHOME.$user->getID().'&layout_id='.$layout_id;
+ $labels = array(_('Add widgets'), _('Customize
Layout'));
+ $urls = array($url, $url.'&update=layout');
+ for ($i = 0; $i < count($urls); $i++) {
+ echo html_e('li', array(),
util_make_link($urls[$i], $labels[$i]));
+ }
+ echo html_ac($ap);
}
- $ap = html_ap();
- echo html_ao('ul', array('class' => 'widget_toolbar'));
- $url =
'/widgets/widgets.php?owner='.WidgetLayoutManager::OWNER_TYPE_USERHOME.$user->getID().'&layout_id='.$layout_id;
- $labels = array(_('Add widgets'), _('Customize
Layout'));
- $urls = array($url, $url.'&update=layout');
- for ($i = 0; $i < count($urls); $i++) {
- echo html_e('li', array(),
util_make_link($urls[$i], $labels[$i]));
- }
- echo html_ac($ap);
$lm = new WidgetLayoutManager();
$lm->displayLayout($user->getID(),
WidgetLayoutManager::OWNER_TYPE_USERHOME);
}
-----------------------------------------------------------------------
Summary of changes:
src/www/users | 40 +++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits