[evolvis-commits] r12980: Diplay complete trove When we display the trove, we lose the information classification. But, the goal of the trove, is sort, and classify.
mirabilos at evolvis.org
mirabilos at evolvis.org
Mon Feb 28 02:12:43 CET 2011
Author: mirabilos
Date: 2011-02-28 02:12:43 +0100 (Mon, 28 Feb 2011)
New Revision: 12980
Modified:
trunk/gforge_base/evolvisforge-5.1/gforge/www/include/project_home.php
trunk/gforge_base/evolvisforge-5.1/gforge/www/include/trove.php
Log:
Diplay complete trove When we display the trove, we lose the information classification. But, the goal of the trove, is sort, and classify.
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/include/project_home.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/include/project_home.php 2011-02-28 01:12:38 UTC (rev 12979)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/include/project_home.php 2011-02-28 01:12:43 UTC (rev 12980)
@@ -53,7 +53,7 @@
if($GLOBALS['sys_use_trove']) {
print "<br />\n";
- print stripslashes(trove_getcatlisting($group_id,0,1));
+ print stripslashes(trove_getcatcompletelisting($group_id));
}
// registration date
Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/include/trove.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/include/trove.php 2011-02-28 01:12:38 UTC (rev 12979)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/include/trove.php 2011-02-28 01:12:43 UTC (rev 12980)
@@ -307,6 +307,59 @@
}
/**
+ * trove_getcatcompletelisting() - Gets complete discriminator listing for a group
+ *
+ * @param int The group ID
+ */
+function trove_getcatcompletelisting($group_id) {
+ global $discrim_url;
+ global $form_cat;
+ global $Language;
+
+ $res_trovecat = db_query("
+ SELECT trove_cat.fullpath AS fullpath,
+ trove_cat.fullpath_ids AS fullpath_ids,
+ trove_cat.trove_cat_id AS trove_cat_id
+ FROM trove_cat,trove_group_link
+ WHERE trove_cat.trove_cat_id=trove_group_link.trove_cat_id
+ AND trove_group_link.group_id='$group_id'
+ ORDER BY trove_cat.fullpath");
+
+ $return = '';
+ if (db_numrows($res_trovecat) < 1) {
+ $return .= $Language->getText('trove','not_categorized')
+ .' <a href="/softwaremap/trove_list.php">'
+ . $Language->getText('trove','title')
+ .'</a>.<p />';
+ } else {
+ $return .= '<ul>';
+ $need_close_ul_tag = 1;
+ }
+
+ while ($row_trovecat = db_fetch_array($res_trovecat)) {
+ $return .= '<li>';
+ $folders = explode(" :: ",$row_trovecat['fullpath']);
+ $folders_ids = explode(" :: ",$row_trovecat['fullpath_ids']);
+ $folders_len = count($folders);
+ // if first in discrim print root category
+ for ($i=0;$i<$folders_len;$i++)
+ {
+ $return .= '<a href="/softwaremap/trove_list.php?form_cat='.$folders_ids[$i].$discrim_url.'">'.$folders[$i].'</a>';
+ if ($i != $folders_len-1)
+ {
+ $return .= " : ";
+ }
+ }
+ $return .= '</li>';
+ }
+ if ($need_close_ul_tag)
+ {
+ $return .= '</ul>';
+ }
+ return $return;
+}
+
+/**
* trove_getfullname() - Returns cat fullname
*
* @param int The node
More information about the evolvis-commits
mailing list