Merge branch 'seeddms-4.3.9' into develop

Conflicts:
	SeedDMS_Core/Core/inc.ClassDMS.php
This commit is contained in:
Uwe Steinmann 2014-07-24 07:58:32 +02:00
commit 31da6d4f5f
5 changed files with 21 additions and 8 deletions

View File

@ -716,6 +716,7 @@ class SeedDMS_Core_DMS {
/*--------- Do it all over again for documents -------------*/ /*--------- Do it all over again for documents -------------*/
$totalDocs = 0;
if($mode & 0x1) { if($mode & 0x1) {
$searchKey = ""; $searchKey = "";
$searchFields = array(); $searchFields = array();

View File

@ -55,9 +55,12 @@ if (!isset($login) || strlen($login)==0) {
exit; exit;
} }
$pwd = (string) $_POST["pwd"]; $pwd = '';
if (get_magic_quotes_gpc()) { if(isset($_POST['pwd'])) {
$pwd = stripslashes($pwd); $pwd = (string) $_POST["pwd"];
if (get_magic_quotes_gpc()) {
$pwd = stripslashes($pwd);
}
} }
$guestUser = $dms->getUser($settings->_guestID); $guestUser = $dms->getUser($settings->_guestID);

View File

@ -67,7 +67,10 @@ if (!is_object($object)) {
exit; exit;
} }
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $_GET["width"]); if(!empty($_GET["width"]))
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $_GET["width"]);
else
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir);
if(!$previewer->hasPreview($object)) if(!$previewer->hasPreview($object))
$previewer->createPreview($object); $previewer->createPreview($object);
header('Content-Type: image/png'); header('Content-Type: image/png');

View File

@ -341,8 +341,8 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) {
* also all folders of that user because the status doesn't apply * also all folders of that user because the status doesn't apply
* to folders. * to folders.
*/ */
if($status) // if($status)
$resultmode = 0x01; // $resultmode = 0x01;
// category // category
$categories = array(); $categories = array();
@ -354,8 +354,8 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) {
} }
/* Do not search for folders if result shall be filtered by categories. */ /* Do not search for folders if result shall be filtered by categories. */
if($categories) // if($categories)
$resultmode = 0x01; // $resultmode = 0x01;
if (isset($_GET["attributes"])) if (isset($_GET["attributes"]))
$attributes = $_GET["attributes"]; $attributes = $_GET["attributes"];

View File

@ -23,6 +23,7 @@ include("../inc/inc.Utils.php");
include("../inc/inc.DBInit.php"); include("../inc/inc.DBInit.php");
include("../inc/inc.Language.php"); include("../inc/inc.Language.php");
include("../inc/inc.ClassUI.php"); include("../inc/inc.ClassUI.php");
include("../inc/inc.ClassAccessOperation.php");
include("../inc/inc.Authentication.php"); include("../inc/inc.Authentication.php");
if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) { if (!isset($_GET["documentid"]) || !is_numeric($_GET["documentid"]) || intval($_GET["documentid"])<1) {
@ -41,11 +42,16 @@ if (!is_object($version)) {
} }
$folder = $document->getFolder(); $folder = $document->getFolder();
/* Create object for checking access to certain operations */
$accessop = new SeedDMS_AccessOperation($document, $user, $settings);
$attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all)); $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all));
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version, 'attrdefs'=>$attrdefs)); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'version'=>$version, 'attrdefs'=>$attrdefs));
if($view) { if($view) {
$view->setParam('accessobject', $accessop);
$view->show(); $view->show();
exit; exit;
} }