Merge branch 'seeddms-4.3.8' into develop

This commit is contained in:
Uwe Steinmann 2014-03-26 07:29:28 +01:00
commit 1d011feaf6
9 changed files with 48 additions and 20 deletions

View File

@ -1,3 +1,12 @@
--------------------------------------------------------------------------------
Changes in version 4.3.8
--------------------------------------------------------------------------------
- fix error in xml dump (Bug #114)
- all folders with documenst/subfolders in document chooser can be
opened (Bug #136)
- fix error in command line indexer, now uses converters in settings.xml (Bug #137)
- more condensed output of full text info page
--------------------------------------------------------------------------------
Changes in version 4.3.7
--------------------------------------------------------------------------------

View File

@ -395,6 +395,7 @@ URL: [url]',
'include_documents' => 'Dokumente miteinbeziehen',
'include_subdirectories' => 'Unterverzeichnisse miteinbeziehen',
'index_converters' => 'Index Dokumentenumwandlung',
'index_folder' => 'Indiziere Ordner',
'individuals' => 'Einzelpersonen',
'inherited' => 'geerbt',
'inherits_access_copy_msg' => 'Berechtigungen kopieren',

View File

@ -134,7 +134,8 @@ switch($command) {
$subfolders = SeedDMS_Core_DMS::filterAccess($subfolders, $user, M_READ);
$tree = array();
foreach($subfolders as $subfolder) {
$level = array('label'=>$subfolder->getName(), 'id'=>$subfolder->getID(), 'load_on_demand'=>$subfolder->hasSubFolders() ? true : false, 'is_folder'=>true);
$loadondemand = $subfolder->hasSubFolders() || ($subfolder->hasDocuments() && $showdocs);
$level = array('label'=>$subfolder->getName(), 'id'=>$subfolder->getID(), 'load_on_demand'=>$loadondemand, 'is_folder'=>true);
if(!$subfolder->hasSubFolders())
$level['children'] = array();
$tree[] = $level;

View File

@ -56,7 +56,13 @@ if(isset($_GET['create']) && $_GET['create'] == 1) {
SeedDMS_Lucene_Indexer::init($settings->_stopWordsFile);
}
$folder = $dms->getFolder($settings->_rootFolderID);
if (!isset($_GET["folderid"]) || !is_numeric($_GET["folderid"]) || intval($_GET["folderid"])<1) {
$folderid = $settings->_rootFolderID;
}
else {
$folderid = intval($_GET["folderid"]);
}
$folder = $dms->getFolder($folderid);
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'index'=>$index, 'recreate'=>(isset($_GET['create']) && $_GET['create']==1), 'folder'=>$folder, 'converters'=>$settings->_converters));

View File

@ -48,7 +48,7 @@ require_once("SeedDMS/Core.php");
require_once("SeedDMS/Lucene.php");
function tree($folder, $indent='') {
global $index, $dms;
global $index, $dms, $settings;
echo $indent."D ".$folder->getName()."\n";
$subfolders = $folder->getSubFolders();
foreach($subfolders as $subfolder) {
@ -58,7 +58,7 @@ function tree($folder, $indent='') {
foreach($documents as $document) {
echo $indent." ".$document->getId().":".$document->getName()."\n";
if(!($hits = $index->find('document_id:'.$document->getId()))) {
$index->addDocument(new SeedDMS_Lucene_IndexedDocument($dms, $document));
$index->addDocument(new SeedDMS_Lucene_IndexedDocument($dms, $document, $settings->_converters ? $settings->_converters : null));
} else {
$hit = $hits[0];
$created = (int) $hit->getDocument()->getFieldValue('created');
@ -66,7 +66,7 @@ function tree($folder, $indent='') {
echo $indent." Document unchanged\n";
} else {
if($index->delete($hit->id)) {
$index->addDocument(new SeedDMS_Lucene_IndexedDocument($dms, $document));
$index->addDocument(new SeedDMS_Lucene_IndexedDocument($dms, $document, $settings->_converters ? $settings->_converters : null));
}
}
}

View File

@ -353,8 +353,8 @@ if($groups) {
echo "<groups>\n";
foreach ($groups as $group) {
echo " <group id=\"".$group->getId()."\">\n";
echo " <attr name=\"name\">".wrapWithCData($user->getFullName())."</attr>\n";
echo " <attr name=\"comment\">".wrapWithCData($user->getComment())."</attr>\n";
echo " <attr name=\"name\">".wrapWithCData($group->getName())."</attr>\n";
echo " <attr name=\"comment\">".wrapWithCData($group->getComment())."</attr>\n";
$users = $group->getUsers();
if($users) {
echo " <users>\n";

View File

@ -348,6 +348,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
}
echo "<li><a href=\"../out/out.FolderNotify.php?folderid=". $folderID ."&showtree=".showtree()."\">".getMLText("edit_existing_notify")."</a></li>\n";
}
if ($this->params['user']->isAdmin()) {
echo "<li><a href=\"../out/out.Indexer.php?folderid=". $folderID ."\">".getMLText("index_folder")."</a></li>\n";
}
echo "</ul>\n";
echo "</div>\n";
return;
@ -995,11 +998,11 @@ function clearFilename<?php print $formName ?>() {
*
* The tree can contain folders only or include documents.
*
* @params integer $folderid current folderid. If set the tree will be
* @param integer $folderid current folderid. If set the tree will be
* folded out and the all folders in the path will be visible
* @params integer $accessmode use this access mode when retrieving folders
* @param integer $accessmode use this access mode when retrieving folders
* and documents shown in the tree
* @params boolean $showdocs set to true if tree shall contain documents
* @param boolean $showdocs set to true if tree shall contain documents
* as well.
*/
function printNewTreeNavigation($folderid=0, $accessmode=M_READ, $showdocs=0, $formid='form1', $expandtree=0, $orderby='') { /* {{{ */

View File

@ -43,27 +43,35 @@ class SeedDMS_View_IndexInfo extends SeedDMS_Bootstrap_Style {
$this->contentStart();
$this->pageNavigation(getMLText("admin_tools"), "admin_tools");
$this->contentHeading(getMLText("fulltext_info"));
$this->contentContainerStart();
$numDocs = $index->count();
echo "<pre>";
echo "<legend>".$numDocs." ".getMLText('documents')."</legend>";
$this->contentContainerStart();
for ($id = 0; $id < $numDocs; $id++) {
if (!$index->isDeleted($id)) {
$hit = $index->getDocument($id);
echo $hit->document_id.": ".htmlspecialchars($hit->title)."\n";
echo "<span title=\"".$hit->document_id."\">".htmlspecialchars($hit->title)."</span>\n";
}
}
echo "</pre>";
$this->contentContainerEnd();
$terms = $index->terms();
echo "<p>".count($terms)." Terms</p>";
echo "<pre>";
echo "<legend>".count($terms)." Terms</legend>";
// echo "<pre>";
$field = '';
foreach($terms as $term) {
echo htmlspecialchars($term->field).":".htmlspecialchars($term->text)."\n";
if($field != $term->field) {
if($field)
$this->contentContainerEnd();
echo "<h5>".htmlspecialchars($term->field)."</h5>";
$this->contentContainerStart();
$field = $term->field;
}
echo htmlspecialchars($term->text)."\n";
}
echo "</pre>";
$this->contentContainerEnd();
// echo "</pre>";
$this->htmlEndPage();
} /* }}} */
}

View File

@ -46,7 +46,7 @@ class SeedDMS_View_Info extends SeedDMS_Bootstrap_Style {
// $this->contentContainerStart();
// phpinfo();
// $this->contentContainerEnd();
$this->contentEnd();
// $this->contentEnd();
$this->htmlEndPage();
} /* }}} */
}