* Security: harden account name validation to detect trailing newlines (Inria)
* Plugin scmhook: fix configuration reset when switching back&forth between SCM (Inria)
* Plugin message: handle empty site message (Inria)
-* Admin User: fix unix_status [#666](TrivialDev)
+* Admin User: fix unix_status [#666] (TrivialDev)
* Tracker: fix email link in notification [#668] (TrivialDev)
* Tracker: fix 404 in roadmap ajax call [#675] (TrivialDev)
+ * Docman: fix massaction with IE8 [#642] (TrivialDev)
+ * Docman: fix empty root folder in zipfile [#640] (TrivialDev)
FusionForge-5.3:
* Widget: MyArtifacts Enhancement : add monitored artifacts (TrivialDev)
}
if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
- $tabletop = array(html_e('input', array('id' => 'checkallactive', 'type' => 'checkbox', 'title' => _('Select / Deselect all documents for massaction'), 'onchange' => 'controllerListFile.checkAll("checkeddocidactive", "active")')), '', _('File Name'), _('Title'), _('Description'), _('Author'), _('Last time'), _('Status'), _('Size'), _('View'));
- $tabletop = array('<input id="checkallactive" type="checkbox" title="'._('Select / Deselect all documents for massaction').'" class="tabtitle-w" onClick="controllerListFile.checkAll(\'checkeddocidactive\', \'active\')" />', '', _('File Name'), _('Title'), _('Description'), _('Author'), _('Last time'), _('Status'), _('Size'), _('View'));
++ $tabletop = array(html_e('input', array('id' => 'checkallactive', 'type' => 'checkbox', 'title' => _('Select / Deselect all documents for massaction'), 'onClick' => 'controllerListFile.checkAll("checkeddocidactive", "active")')), '', _('File Name'), _('Title'), _('Description'), _('Author'), _('Last time'), _('Status'), _('Size'), _('View'));
$classth = array('unsortable', 'unsortable', '', '', '', '', '', '', '', '');
if (forge_check_perm('docman', $ndg->Group->getID(), 'approve')) {
$tabletop[] = _('Actions');
$classth[] = 'unsortable';
}
- echo '<div class="docmanDiv">';
- echo $HTML->listTableTop($tabletop, false, 'sortable_docman_listfile', 'sortable', $classth);
+ echo html_ao('div', array('class' => 'docmanDiv'));
+ echo $HTML->listTableTop($tabletop, array(), 'sortable_docman_listfile', 'sortable', $classth);
$time_new = 604800;
foreach ($nested_docs[$dirid] as $d) {
- echo '<tr>';
- echo '<td>';
+ $cells = array();
+ /* should we steal the lock on file ? */
+ if ($d->getLocked()) {
+ if ($d->getLockedBy() == $u->getID()) {
+ $d->setLock(0);
+ /* if you change the 60000 value below, please update here too */
+ } elseif ((time() - $d->getLockdate()) > 600) {
+ $d->setLock(0);
+ }
+ }
if (!$d->getLocked() && !$d->getReserved()) {
- $cells[][] = html_e('input', array('type' => 'checkbox', 'value' => $d->getID(), 'class' => 'checkeddocidactive', 'title' => _('Select / Deselect this document for massaction'), 'onchange' => 'controllerListFile.checkgeneral("active")'));
- echo '<input type="checkbox" value="'.$d->getID().'" class="checkeddocidactive tabtitle-w" title="'._('Select / Deselect this document for massaction').'" onClick="controllerListFile.checkgeneral(\'active\')" />';
++ $cells[][] = html_e('input', array('type' => 'checkbox', 'value' => $d->getID(), 'class' => 'checkeddocidactive', 'title' => _('Select / Deselect this document for massaction'), 'onClick' => 'controllerListFile.checkgeneral("active")'));
} else {
if (session_loggedin() && ($d->getReservedBy() != $u->getID())) {
- echo '<input type="checkbox" name="disabled" disabled="disabled" />';
+ $cells[][] = html_e('input', array('type' => 'checkbox', 'name' => 'disabled', 'disabled' => 'disabled'));
} else {
- $cells[][] = html_e('input', array('type' => 'checkbox', 'value' => $d->getID(), 'class' => 'checkeddocidactive', 'title' => _('Select / Deselect this document for massaction'), 'onchange' => 'controllerListFile.checkgeneral("active")'));
- echo '<input type="checkbox" value="'.$d->getID().'" class="checkeddocidactive tabtitle-w" title="'._('Select / Deselect this document for massaction').'"" onClick="controllerListFile.checkgeneral(\'active\')" />';
++ $cells[][] = html_e('input', array('type' => 'checkbox', 'value' => $d->getID(), 'class' => 'checkeddocidactive', 'title' => _('Select / Deselect this document for massaction'), 'onClick' => 'controllerListFile.checkgeneral("active")'));
}
}
- echo '</td>';
switch ($d->getFileType()) {
- case "URL": {
- $docurl = $d->getFileName();
- $docurltitle = _('Visit this link');
+ case 'URL': {
+ $cells[][] = util_make_link($d->getFileName(), html_image($d->getFileTypeImage(), '22', '22', array('alt' => $d->getFileType())), array('title' => _('Visit this link')), true);
break;
}
default: {
}
if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
- $tabletop = array(html_e('input', array('id' => 'checkallactive', 'title' => _('Select / Deselect all documents for massaction'), 'type' => 'checkbox', 'onchange' => 'controllerListTrash.checkAll("checkeddocidactive", "active")')), '', _('File Name'), _('Title'), _('Description'), _('Author'), _('Last time'), _('Status'), _('Size'), _('Actions'));
- $tabletop = array('<input id="checkallactive" title="'._('Select / Deselect all documents for massaction').'" class="tabtitle-w" type="checkbox" onClick="controllerListTrash.checkAll(\'checkeddocidactive\', \'active\')" />', '', _('File Name'), _('Title'), _('Description'), _('Author'), _('Last time'), _('Status'), _('Size'), _('Actions'));
++ $tabletop = array(html_e('input', array('id' => 'checkallactive', 'title' => _('Select / Deselect all documents for massaction'), 'type' => 'checkbox', 'onClick' => 'controllerListTrash.checkAll("checkeddocidactive", "active")')), '', _('File Name'), _('Title'), _('Description'), _('Author'), _('Last time'), _('Status'), _('Size'), _('Actions'));
$classth = array('unsortable', 'unsortable', '', '', '', '', '', '', '', 'unsortable');
- echo '<div class="docmanDiv">';
- echo $HTML->listTableTop($tabletop, false, 'sortable_docman_listfile', 'sortable', $classth);
+ echo html_ao('div', array('class' => 'docmanDiv'));
+ echo $HTML->listTableTop($tabletop, array(), 'sortable_docman_listfile', 'sortable', $classth);
$time_new = 604800;
foreach ($nested_docs[$dirid] as $d) {
- echo '<tr>';
- echo '<td>';
- echo '<input title="'._('Select / Deselect this document for massaction').'" class="checkeddocidactive tabtitle-w" type="checkbox" value="'.$d->getID().'" onClick="controllerListTrash.checkgeneral(\'active\')" />';
- echo '</td>';
+ $cells = array();
- $cells[][] = html_e('input', array('type' => 'checkbox', 'class' => 'checkeddocidactive', 'value' => $d->getID(), 'title' => _('Select / Deselect this document for massaction'), 'onchange' => 'controllerListTrash.checkgeneral("active")'));
++ $cells[][] = html_e('input', array('type' => 'checkbox', 'class' => 'checkeddocidactive', 'value' => $d->getID(), 'title' => _('Select / Deselect this document for massaction'), 'onClick' => 'controllerListTrash.checkgeneral("active")'));
switch ($d->getFileType()) {
case "URL": {
- $docurl = $d->getFileName();
- $docurltitle = _('Visit this link');
+ $cells[][] = util_make_link($d->getFileName(), html_image($d->getFileTypeImage(), '22', '22', array('alt' => $d->getFileType())), array('title' => _('Visit this link')));
break;
}
default: {
divEditTitle: '<?php echo _("Edit document dialog box") ?>'
});
});
-//]]></script>
+//]]>
<?php
+ echo html_ac(html_ap() - 1);
if (isset($nested_pending_docs[$dirid]) && is_array($nested_pending_docs[$dirid])) {
- echo '<div class="docmanDiv">';
- echo '<h4>'._('Pending files').'</h4>';
- $tabletop = array('<input id="checkallpending" type="checkbox" onClick="controllerListPending.checkAll(\'checkeddocidpending\', \'pending\')" />', '', _('File Name'), _('Title'), _('Description'), _('Author'), _('Last time'), _('Status'), _('Size'), _('Actions'));
+ echo html_ao('div', array('class' => 'docmanDiv'));
+ echo html_e('h4', array('class' => 'docman_h4'), _('Pending files'), false);
- $tabletop = array(html_e('input', array('id' => 'checkallpending', 'type' => 'checkbox', 'onchange' => 'controllerListPending.checkAll("checkeddocidpending", "pending")')), '', _('File Name'), _('Title'), _('Description'), _('Author'), _('Last time'), _('Status'), _('Size'), _('Actions'));
++ $tabletop = array(html_e('input', array('id' => 'checkallpending', 'type' => 'checkbox', 'onClick' => 'controllerListPending.checkAll("checkeddocidpending", "pending")')), '', _('File Name'), _('Title'), _('Description'), _('Author'), _('Last time'), _('Status'), _('Size'), _('Actions'));
$classth = array('unsortable', 'unsortable', '', '', '', '', '', '', '', 'unsortable');
- echo $HTML->listTableTop($tabletop, false, 'sortable_docman_listfile', 'sortable', $classth);
+ echo $HTML->listTableTop($tabletop, array(), 'sortable_docman_listfile', 'sortable', $classth);
$time_new = 604800;
foreach ($nested_pending_docs[$dirid] as $d) {
- echo '<tr>';
- echo '<td>';
- echo '<input type="checkbox" value="'.$d->getID().'" class="checkeddocidpending" onClick="controllerListPending.checkgeneral(\'pending\')" />';
- echo '</td>';
+ $cells = array();
- $cells[][] = html_e('input', array('type' => 'checkbox', 'value' => $d->getID(), 'class' => 'checkeddocidpending', 'title' => _('Select / Deselect this document for massaction'), 'onchange' => 'controllerListPending.checkgeneral("pending")'));
++ $cells[][] = html_e('input', array('type' => 'checkbox', 'value' => $d->getID(), 'class' => 'checkeddocidpending', 'title' => _('Select / Deselect this document for massaction'), 'onClick' => 'controllerListPending.checkgeneral("pending")'));
switch ($d->getFileType()) {
case "URL": {
- $docurl = $d->getFileName();
- $docurltitle = _('Visit this link');
+ $cells[][] = util_make_link($d->getFileName(), html_image($d->getFileTypeImage(), '22', '22', array('alt'=>$d->getFileType())), array('title' => _('Visit this link')), true);
break;
}
default: {