diff --git a/out/out.AddFile.php b/out/out.AddFile.php index 4df8cb7f3..f54c1f9f5 100644 --- a/out/out.AddFile.php +++ b/out/out.AddFile.php @@ -51,7 +51,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'strictformcheck'=>$settings->_strictFormCheck, 'enablelargefileupload'=>$settings->_enableLargeFileUpload)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.DocumentAccess.php b/out/out.DocumentAccess.php index 8b6407533..8fe5d7931 100644 --- a/out/out.DocumentAccess.php +++ b/out/out.DocumentAccess.php @@ -53,7 +53,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'allusers'=>$allUsers, 'allgroups'=>$allGroups)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.DocumentNotify.php b/out/out.DocumentNotify.php index 6038af05b..637e55d88 100644 --- a/out/out.DocumentNotify.php +++ b/out/out.DocumentNotify.php @@ -51,7 +51,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'sortusersinlist'=>$settings->_sortUsersInList)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.DropFolderChooser.php b/out/out.DropFolderChooser.php index b83b8a90d..ca0a2b84e 100644 --- a/out/out.DropFolderChooser.php +++ b/out/out.DropFolderChooser.php @@ -43,7 +43,7 @@ $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'dropfold if($view) { $view->setParam('cachedir', $settings->_cacheDir); $view->setParam('previewWidthList', $settings->_previewWidthList); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.EditDocument.php b/out/out.EditDocument.php index 3d0985e16..096a38674 100644 --- a/out/out.EditDocument.php +++ b/out/out.EditDocument.php @@ -57,7 +57,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'attrdefs'=>$attrdefs, 'strictformcheck'=>$settings->_strictFormCheck, 'orderby'=>$settings->_sortFoldersDefault)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.KeywordChooser.php b/out/out.KeywordChooser.php index 94e278545..ff3618399 100644 --- a/out/out.KeywordChooser.php +++ b/out/out.KeywordChooser.php @@ -44,7 +44,7 @@ if($_GET['target']) { $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'categories'=>$categories, 'form'=>$target)); if($view) { - $view->show(); + $view($_GET); exit; } diff --git a/out/out.MoveDocument.php b/out/out.MoveDocument.php index 65bec8a26..17508401c 100644 --- a/out/out.MoveDocument.php +++ b/out/out.MoveDocument.php @@ -70,7 +70,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'target'=>$target)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/out/out.Search.php b/out/out.Search.php index bdbc50190..cb9d59164 100644 --- a/out/out.Search.php +++ b/out/out.Search.php @@ -387,7 +387,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { $totalPages = (int) (count($entries)/$limit); if(count($entries)%$limit) $totalPages++; - if (strcasecmp($_GET["pg"], "all")) + if (!isset($_GET["pg"]) || strcasecmp($_GET["pg"], "all")) $entries = array_slice($entries, ($pageNumber-1)*$limit, $limit); // }}} } diff --git a/out/out.UpdateDocument.php b/out/out.UpdateDocument.php index af3ee1384..e1ee91a71 100644 --- a/out/out.UpdateDocument.php +++ b/out/out.UpdateDocument.php @@ -64,7 +64,7 @@ $tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME'])); $view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'folder'=>$folder, 'document'=>$document, 'strictformcheck'=>$settings->_strictFormCheck, 'enablelargefileupload'=>$settings->_enableLargeFileUpload, 'enableadminrevapp'=>$settings->_enableAdminRevApp, 'enableownerrevapp'=>$settings->_enableOwnerRevApp, 'enableselfrevapp'=>$settings->_enableSelfRevApp, 'dropfolderdir'=>$settings->_dropFolderDir, 'workflowmode'=>$settings->_workflowMode, 'presetexpiration'=>$settings->_presetExpirationDate)); if($view) { $view->setParam('accessobject', $accessop); - $view->show(); + $view($_GET); exit; } diff --git a/views/bootstrap/class.AddFile.php b/views/bootstrap/class.AddFile.php index a94eaf552..924c66474 100644 --- a/views/bootstrap/class.AddFile.php +++ b/views/bootstrap/class.AddFile.php @@ -31,30 +31,17 @@ require_once("class.Bootstrap.php"); */ class SeedDMS_View_AddFile extends SeedDMS_Bootstrap_Style { - function show() { /* {{{ */ - $dms = $this->params['dms']; - $user = $this->params['user']; - $folder = $this->params['folder']; - $document = $this->params['document']; - $strictformcheck = $this->params['strictformcheck']; - $enablelargefileupload = $this->params['enablelargefileupload']; - - $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); - $this->globalNavigation($folder); - $this->contentStart(); - $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); - + function js() { /* {{{ */ ?> - + +$(document).ready( function() { + $('body').on('submit', '#fileupload', function(ev){ + if(checkForm()) return; + event.preventDefault(); + }); +}); params['dms']; + $user = $this->params['user']; + $folder = $this->params['folder']; + $document = $this->params['document']; + $strictformcheck = $this->params['strictformcheck']; + $enablelargefileupload = $this->params['enablelargefileupload']; + + $this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName())))); + $this->globalNavigation($folder); + $this->contentStart(); + $this->pageNavigation($this->getFolderPathHTML($folder, true, $document), "view_document", $document); + $this->contentHeading(getMLText("linked_files")); ?>