+FusionForge 6.X:
+* Accounts: minimum password length is now 8
+* Spellcheck (Anders Jonsson)
+* Site Admin: add paging system in userlist page [#799] (TrivialDev)
+* Projects Page: add paging system in full_list and tag_cloud subpages (TrivialDev)
+* SearchEngine: support only FTI queries (TrivialDev)
+* Docman: limit number of returned documents on search query. Use paging system [#794] (TrivialDev)
+* Docman: limit search using from & to dates [#798] (TrivialDev)
+* Docman: use standard search engine: unify results between 'search in project' & search in the docs tab (TrivialDev)
+* Docman: searchengine: DocsAll & Docs unified. (TrivialDev)
+* Docman: searchengine: add edit file action on result. (TrivialDev)
+* Docman: notify users on document. (TrivialDev)
+* Docman: support private directory. (TrivialDev)
+* Plugin AuthBuiltin: add captcha after 3 attempts with the same login [#795] (TrivialDev)
+
FusionForge 6.0.4:
* Account Management System: fix sysCreateUser for UNIX: unix_gid dropped (TrivialDev)
* Accounts: do not accept digits-only user and group names, to avoid confusion with UID/GID in system commands (Inria)
* Accounts: passwords hashes: increase md5crypt salt length to 8; fix invalid Blowfish salt (Inria)
* Accounts: passwords hashes: add support for SHA256/SHA512 (Inria)
* Accounts: fix supported ssh keys types - again (Inria)
+ * Docman: fix folder tree to support Chrome correctly. open/closing folders [#810] (TrivialDev)
* FRS: fix shownotes.php link. Use new url form. view=shownotes (TrivialDev)
* FRS: frs latest zip migration script hardening (TrivialDev)
* MTA-Exim4: restart exim4 on install
/**
* FusionForge document manager
*
- * Copyright 2011-2016, Franck Villaume - TrivialDev
+ * Copyright 2011-2014,2016, Franck Villaume - TrivialDev
* Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
* Copyright 2013, French Ministry of National Education
* http://fusionforge.org
* @return boolean success or not
*/
function isTrashEmpty() {
- $res = db_query_params('select ( select count(*) from doc_groups where group_id = $1 and stateid = 2 and groupname !=$2 )
- + ( select count(*) from docdata_vw where group_id = $3 and stateid = 2 ) as c',
- array($this->Group->getID(), '.trash', $this->Group->getID()));
+ if ($this->Group->usesPlugin('projects-hierarchy')) {
+ $projectsHierarchy = plugin_get_object('projects-hierarchy');
+ $projectIDsArray = $projectsHierarchy->getFamily($this->Group->getID(), 'child', true, 'validated');
+ }
+
+
+ if (isset($projectIDsArray) && is_array($projectIDsArray)) {
+ foreach ($projectIDsArray as $projectID) {
+ $groupObject = group_get_object($projectID);
+ if ($groupObject->usesDocman() && $projectsHierarchy->getDocmanStatus($groupObject->getID())
+ && forge_check_perm('docman', $groupObject->getID(), 'approve')) {
+ $groupIdArr[] = $projectID;
+ }
+ }
+ }
+ $groupIdArr[] = $this->Group->getID();
+
+ $res = db_query_params('select ( select count(*) from doc_groups where group_id = ANY ($1) and stateid = 2 and groupname !=$2 )
+ + ( select count(*) from docdata_vw where group_id = ANY ($3) and stateid = 2 ) as c',
+ array(db_int_array_to_any_clause($groupIdArr), '.trash', db_int_array_to_any_clause($groupIdArr)));
+
if (!$res) {
return false;
}
* @param int $docGroupId the doc_group to start: default 0
*/
function getTree($selecteddir, $linkmenu, $docGroupId = 0) {
- global $g; // the master group of all the groups .... anyway.
+ global $g; // the master group of all the groups .... anyway. Needed to support projects-hierarchy plugin
$dg = new DocumentGroup($this->Group);
switch ($linkmenu) {
case 'listtrashfile': {
$stateId = 2;
+ $doc_group_stateid = array(2);
break;
}
default: {
$stateId = 1;
+ $doc_group_stateid = array(1);
+ if (forge_check_perm('docman', $this->Group->getID(), 'approve')) {
+ $doc_group_stateid = array(1, 3, 4, 5);
+ }
break;
}
}
- $subGroupIdArr = $dg->getSubgroup($docGroupId, $stateId);
+ $subGroupIdArr = $dg->getSubgroup($docGroupId, $doc_group_stateid);
if (sizeof($subGroupIdArr)) {
foreach ($subGroupIdArr as $subGroupIdValue) {
- $localDg = documentgroup_get_object($subGroupIdValue);
+ $localDg = documentgroup_get_object($subGroupIdValue, $this->Group->getID());
$liclass = 'docman_li_treecontent';
if ($selecteddir == $localDg->getID()) {
$liclass = 'docman_li_treecontent_selected';
}
+ // support projects-hierarchy plugin
if ($this->Group->getID() != $g->getID()) {
$link = '/docman/?group_id='.$g->getID().'&view='.$linkmenu.'&dirid='.$localDg->getID().'&childgroup_id='.$this->Group->getID();
} else {
}
$lititle .= _('Last Modified')._(': ').relative_date($localDg->getLastModifyDate());
}
- echo html_ao('li', array('id' => 'leaf-'.$subGroupIdValue, 'class' => $liclass)).util_make_link($link, $linkname, array('title'=>$lititle)).$nbDocsLabel;
+ $linkname = $localDg->getName();
+ if ($localDg->getState() == 5) {
+ $linkname .= ' '._('(private)');
+ }
+ //use   + inline to support Chrome browser correctly
+ echo html_ao('li', array('id' => 'leaf-'.$subGroupIdValue, 'class' => $liclass)).' '.util_make_link($link, $localDg->getName(), array('title'=>$lititle, 'style' => 'display: inline')).$nbDocsLabel;
} else {
- echo html_ao('li', array('id' => 'leaf-'.$subGroupIdValue, 'class' => $liclass)).util_make_link($link, $localDg->getName()).$nbDocsLabel;
+ echo html_ao('li', array('id' => 'leaf-'.$subGroupIdValue, 'class' => $liclass)).' '.util_make_link($link, $localDg->getName(), array('style' => 'display: inline')).$nbDocsLabel;
}
- if ($dg->getSubgroup($subGroupIdValue, $stateId)) {
+ if ($dg->getSubgroup($subGroupIdValue, $doc_group_stateid)) {
echo html_ao('ul', array('class' => 'simpleTreeMenu'));
$this->getTree($selecteddir, $linkmenu, $subGroupIdValue);
echo html_ac(html_ap() - 1);
}
$returnString .= '}';
return $returnString;
- break;
}
default: {
return $stateQuery;
switch ($format) {
case 'json': {
$returnString = '[';
- for ($i=0; $i<$rows; $i++) {
- $returnString .= '['.$id_array[$i].',\''.util_html_secure(addslashes($text_array[$i])).'\'],';
+ for ($i = 0; $i < $rows; $i++) {
+ $returnString .= '['.$id_array[$i].',\''.util_html_secure(addslashes($text_array[$i])).'\'],';
}
$returnString .= ']';
break;
} else {
$df = new DocumentFactory($doc_group->getGroup());
$df->setDocGroupID($doc_group->getID());
+ $stateidArr = array(1);
+ if (forge_check_perm('docman', $this->getGroup()->getID(), 'approve')) {
+ $stateIdDg = 5;
+ }
+ $df->setStateID(array(1, 4, 5));
+ $df->setDocGroupState($stateIdDg);
$docs = $df->getDocuments();
if (is_array($docs)) {
foreach ($docs as $doc) {
* @return array number per section of activities found between begin and end values
*/
function getActivity($sections, $begin, $end) {
- $qpa = db_construct_qpa();
for ($i = 0; $i < count($sections); $i++) {
$union = 0;
if (count($sections) >= 1 && $i != count($sections) -1) {
$union = 1;
}
- $qpa = db_construct_qpa($qpa, 'SELECT count(*) FROM activity_vw WHERE activity_date BETWEEN $1 AND $2
+ $qpa = db_construct_qpa(false, 'SELECT count(*) FROM activity_vw WHERE activity_date BETWEEN $1 AND $2
AND group_id = $3 AND section = $4 ',
array($begin,
$end,
* Copyright 2003-2010, Roland Mas, Franck Villaume
* Copyright 2004, GForge, LLC
* Copyright 2010, Alain Peyrat <aljeux@free.fr>
- * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * Copyright 2012-2014,2016, Franck Villaume - TrivialDev
* Copyright 2013, French Ministry of National Education
*
* This file is part of FusionForge.
require_once $gfcommon.'include/plugins_utils.php';
forge_define_config_item('default_server', 'scmsvn', forge_get_config ('scm_host'));
-forge_define_config_item('repos_path', 'scmsvn', forge_get_config('data_path').'/scmrepos/svn');
+forge_define_config_item('repos_path', 'scmsvn', forge_get_config('chroot').'/scmrepos/svn');
forge_define_config_item('serve_path', 'scmsvn', forge_get_config('repos_path'));
forge_define_config_item('use_ssh', 'scmsvn', false);
forge_set_config_item_bool('use_ssh', 'scmsvn');
_("This plugin contains the Subversion subsystem of FusionForge. It allows
each FusionForge project to have its own Subversion repository, and gives
some control over it to the project's administrator.");
- $this->svn_root_fs = '/scmrepos/svn';
- if (!file_exists($this->svn_root_fs.'/.')) {
- $this->svn_root_fs = forge_get_config('repos_path',
- $this->name);
- }
+ $this->svn_root_fs = forge_get_config('repos_path',
+ $this->name);
$this->svn_root_dav = '/svn';
$this->_addHook('scm_browser_page');
$this->_addHook('scm_update_repolist');
if (in_array('scmsvn', $params['show']) || (count($params['show']) < 1)) {
$start_time = $params['begin'];
$end_time = $params['end'];
-
+
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "SVNPluginStartElement", "SVNPluginEndElement");
xml_set_character_data_handler($xml_parser, "SVNPluginCharData");