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 ec4be93cfb3aee7484300b04a8ab939805396e22 (commit)
via 8ad4f4cb98c127c76a4fc0e909cc0af782c22860 (commit)
from 8d06b13bc058b2f1969991a5a20ab35e5815e7ff (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=ec4be93cfb3aee7484300b04a8ab939805396e22
commit ec4be93cfb3aee7484300b04a8ab939805396e22
Author: Franck Villaume <[email protected]>
Date: Sun Mar 20 21:53:47 2016 +0100
use HTML helpers, fix wrong HTML, add support for getAdminOptionLink
function
diff --git a/src/plugins/globalsearch/common/GlobalsearchPlugin.class.php
b/src/plugins/globalsearch/common/GlobalsearchPlugin.class.php
index db34261..8381bc8 100644
--- a/src/plugins/globalsearch/common/GlobalsearchPlugin.class.php
+++ b/src/plugins/globalsearch/common/GlobalsearchPlugin.class.php
@@ -5,6 +5,7 @@
* Copyright 2003-2004, GForge, LLC
* Copyright 2007-2009, Roland Mas
* Copyright 2011, Franck Villaume - Capgemini
+ * Copyright 2016, Franck Villaume - TrivialDev
*
* This file is part of FusionForge.
*
@@ -38,16 +39,20 @@ hosted on these forges from your own.");
function CallHook($hookname, &$params) {
global $HTML;
-
if ($hookname == "site_admin_option_hook") {
- print '<li><a
href="/plugins/globalsearch/edit_assoc_sites.php">'._("Admin Associated
Forges"). ' [' . _('Global Search plugin') . ']</a></li>';
+ echo html_e('li', array(), $this->getAdminOptionLink());
} elseif ($hookname == "features_boxes_top") {
(isset($params['returned_text'])) ?
$params['returned_text'] .= $HTML->boxTop(_('Associated Forges'),
'Associated_Forges') : $params['returned_text'] = $HTML->boxTop(_('Associated
Forges'), 'Associated_Forges');
$params['returned_text'] .=
$this->show_top_n_assocsites(5);
$params['returned_text'] .= $this->search_box();
+ $params['returned_text'] .= $HTML->boxBottom();
}
}
+ function getAdminOptionLink() {
+ return
util_make_link('/plugins/globalsearch/edit_assoc_sites.php', _("Admin
Associated Forges"). ' [' . _('Global Search plugin') . ']');
+ }
+
/**
* @return string html code to display
*/
@@ -59,7 +64,7 @@ hosted on these forges from your own.");
$return .= globalsearch_box();
$return .= $HTML->boxMiddle(_("Top associated forges"));
$return .= show_top_n_assocsites(5);
- $return .= "<div align=\"center\">".sprintf(_("Total projects
in associated forges: <b>%1$d</b>"),stats_get_total_projects_assoc_sites()).
"</div>";
+ $return .= '<div align="center">'.sprintf(_("Total projects in
associated forges: <b>%1$d</b>"),stats_get_total_projects_assoc_sites()).
"</div>";
$return .= $HTML->boxBottom();
return $return;
}
@@ -70,12 +75,11 @@ hosted on these forges from your own.");
function search_box() {
global $HTML, $gwords, $gexact, $otherfreeknowledge;
- $return = '<form method="post"
action="/plugins/globalsearch/">';
+ $return = $HTML->openForm(array('action' =>
'/plugins/globalsearch/', 'method' => 'post'));
$return .= $HTML->html_text_input_img_submit('gwords',
'magnifier.png', 'search_associated_forges', '', $gwords, _('Search associated
forges'));
$return .= $HTML->html_checkbox('otherfreeknowledge', '1',
'search_associated_forges_otherfreeknowledge', _('Extend search to include
non-software projects'), $otherfreeknowledge);
$return .= $HTML->html_checkbox('gexact', '1',
'search_associated_forges_exact', _('Require all words'), $gexact);
- $return .= '
- </form>';
+ $return .= $HTML->closeForm();
return $return;
}
@@ -86,6 +90,7 @@ hosted on these forges from your own.");
* @return string html code to display
*/
function show_top_n_assocsites($num_assocsites) {
+ global $HTML;
$res_top_n_assoc = db_query_params('
SELECT a.title, a.link,
count(*) AS numprojects
FROM
plugin_globalsearch_assoc_site_project p, plugin_globalsearch_assoc_site a
@@ -96,7 +101,7 @@ hosted on these forges from your own.");
array('t',
$num_assocsites));
if (db_numrows($res_top_n_assoc) == 0) {
- return _('No stats available')." ".db_error();
+ return $HTML->information(_('No stats available')."
".db_error());
}
$return = '<table class="underline-link">';
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=8ad4f4cb98c127c76a4fc0e909cc0af782c22860
commit 8ad4f4cb98c127c76a4fc0e909cc0af782c22860
Author: Franck Villaume <[email protected]>
Date: Sun Mar 20 21:38:26 2016 +0100
use HTML helpers
diff --git a/src/www/include/features_boxes.php
b/src/www/include/features_boxes.php
index de72971..39fb20c 100644
--- a/src/www/include/features_boxes.php
+++ b/src/www/include/features_boxes.php
@@ -68,6 +68,7 @@ function show_features_boxes() {
}
function show_top_downloads() {
+ global $HTML;
// TODO yesterday is now defined as two days ago. Quick fix
// to allow download list to be cached before nightly
// aggregation is done. jbyers 2001.03.19
@@ -104,7 +105,7 @@ function show_top_downloads() {
}
}
if ( $return == "" ) {
- return _('No stats available');
+ return $HTML->information(_('No stats available'));
} else {
$return = '<table>' . $return . "</table>\n";
}
@@ -196,6 +197,7 @@ function show_newest_projects() {
}
function show_highest_ranked_users() {
+ global $HTML;
//select out the users information to show the top users on the site
$res = db_query_params('SELECT
users.user_name,users.user_id,users.realname,user_metric.metric FROM
user_metric,users WHERE users.user_id=user_metric.user_id AND
user_metric.ranking < 11 AND users.status != $1 ORDER BY ranking ASC',
array ('D'));
@@ -204,7 +206,7 @@ function show_highest_ranked_users() {
} else {
$rows = db_numrows($res);
if ($rows < 1) {
- return _('No stats available');
+ return $HTML->information(_('No stats available'));
} else {
$return = '';
for ($i=0; $i < $rows; $i++) {
@@ -219,6 +221,7 @@ function show_highest_ranked_users() {
}
function show_highest_ranked_projects() {
+ global $HTML;
$stats = new Stats();
$result = $stats->getMostActiveStats ('week', 0) ;
$return = '' ;
@@ -239,7 +242,7 @@ function show_highest_ranked_projects() {
$count++ ;
}
if ( $return == "" ) {
- return _('No stats available');
+ return $HTML->information(_('No stats available'));
} else {
$return = '<table>' . $return . "</table>\n";
}
-----------------------------------------------------------------------
Summary of changes:
.../globalsearch/common/GlobalsearchPlugin.class.php | 19 ++++++++++++-------
src/www/include/features_boxes.php | 9 ++++++---
2 files changed, 18 insertions(+), 10 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits