diff --git a/out/out.Info.php b/out/out.Info.php index e4c08d939..9c891f180 100644 --- a/out/out.Info.php +++ b/out/out.Info.php @@ -48,10 +48,14 @@ if(@ini_get('allow_url_fopen') == '1') { } } +$reposurl = $settings->_repositoryUrl; +$extmgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir, $reposurl); + if($view) { $view->setParam('version', $v); $view->setParam('availversions', $versions); $view->setParam('accessobject', $accessop); + $view->setParam('extmgr', $extmgr); $view($_GET); exit; } diff --git a/restapi/index.php b/restapi/index.php index 9edf3ee95..c437dd9cd 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -1431,10 +1431,10 @@ function checkIfAdmin($request, $response) { /* {{{ */ global $dms, $userobj; if(!$userobj) { - return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 200); + return $response->withJson(array('success'=>false, 'message'=>'Not logged in', 'data'=>''), 403); } if(!$userobj->isAdmin()) { - return $response->withJson(array('success'=>false, 'message'=>'You must be logged in with an administrator account to access this resource', 'data'=>''), 200); + return $response->withJson(array('success'=>false, 'message'=>'You must be logged in with an administrator account to access this resource', 'data'=>''), 403); } return true; @@ -1698,7 +1698,7 @@ function changeGroupMembership($request, $response, $args, $operationType) { /* { $message = 'Could not remove user from group.'; } - return $response->withJson(array('success'=>false, 'message'=>'Something went wrong. ' . $message, 'data'=>''), 200); + return $response->withJson(array('success'=>false, 'message'=>'Something went wrong. ' . $message, 'data'=>''), 500); } $data = __getGroupData($group); @@ -1866,7 +1866,7 @@ function changeFolderAccess($request, $response, $args, $operationType, $userOrG { $message = 'Could not remove user/group access from this folder.'; } - return $response->withJson(array('success'=>false, 'message'=>'Something went wrong. ' . $message, 'data'=>''), 200); + return $response->withJson(array('success'=>false, 'message'=>'Something went wrong. ' . $message, 'data'=>''), 500); } $data = array(); @@ -2047,7 +2047,7 @@ function clearFolderAccessList($request, $response, $args) { /* {{{ */ return $response->withStatus(404); } if (!$folder->clearAccessList()) { - return $response->withJson(array('success'=>false, 'message'=>'Something went wrong. Could not clear access list for this folder.', 'data'=>''), 200); + return $response->withJson(array('success'=>false, 'message'=>'Something went wrong. Could not clear access list for this folder.', 'data'=>''), 500); } return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>''), 200); } /* }}} */ diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index dd35fb340..84dfb77f2 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1279,13 +1279,13 @@ $(document).ready(function() { echo self::getFileChooserHtml($varname, $multiple, $accept); } /* }}} */ - function printDateChooser($defDate = '', $varName, $lang='', $dateformat='yyyy-mm-dd') { /* {{{ */ - echo self::getDateChooser($defDate, $varName, $lang, $dateformat); + function printDateChooser($defDate = '', $varName, $lang='', $dateformat='yyyy-mm-dd', $startdate='', $enddate='') { /* {{{ */ + echo self::getDateChooser($defDate, $varName, $lang, $dateformat, $startdate, $enddate); } /* }}} */ - function getDateChooser($defDate = '', $varName, $lang='', $dateformat='yyyy-mm-dd') { /* {{{ */ + function getDateChooser($defDate = '', $varName, $lang='', $dateformat='yyyy-mm-dd', $startdate='', $enddate='') { /* {{{ */ $content = ' - + '; diff --git a/views/bootstrap/class.ErrorDlg.php b/views/bootstrap/class.ErrorDlg.php index a58366fc5..0c7a4aa57 100644 --- a/views/bootstrap/class.ErrorDlg.php +++ b/views/bootstrap/class.ErrorDlg.php @@ -33,7 +33,6 @@ class SeedDMS_View_ErrorDlg extends SeedDMS_Bootstrap_Style { function show() { /* {{{ */ $dms = $this->params['dms']; - $user = $this->params['user']; $pagetitle = $this->params['pagetitle']; $errormsg = $this->params['errormsg']; $plain = $this->params['plain']; diff --git a/views/bootstrap/class.Info.php b/views/bootstrap/class.Info.php index 1bc7d8637..66b9659ba 100644 --- a/views/bootstrap/class.Info.php +++ b/views/bootstrap/class.Info.php @@ -36,6 +36,7 @@ class SeedDMS_View_Info extends SeedDMS_Bootstrap_Style { $user = $this->params['user']; $version = $this->params['version']; $availversions = $this->params['availversions']; + $extmgr = $this->params['extmgr']; $this->htmlStartPage(getMLText("admin_tools")); $this->globalNavigation(); @@ -53,6 +54,66 @@ class SeedDMS_View_Info extends SeedDMS_Bootstrap_Style { } else { $this->warningMsg(getMLText('no_version_check')); } +?> +
+
+contentHeading(getMLText("seeddms_info")); + $seedextensions = $extmgr->getExtensionConfiguration(); + echo "\n"; + echo "\n\n"; + echo "\n"; + echo "\n\n\n"; + $dbversion = $dms->getDBVersion(); + echo "\n"; + if($user->isAdmin()) { + echo "\n"; + foreach($seedextensions as $extname=>$extconf) + echo "\n"; + } + echo "\n
".getMLText("name"); + echo "
".getMLText('seeddms_version')."".$version->version()."
".getMLText('database_schema_version')."".$dbversion['major'].".".$dbversion['minor'].".".$dbversion['subminor']."
".$extname."
".$extconf['title']."
".$extconf['version']."
\n"; +?> +
+
+isAdmin()) { + $this->contentHeading(getMLText("php_info")); + echo "\n"; + echo "\n\n"; + echo "\n"; + echo "\n\n\n"; + echo "\n"; + echo "\n"; + echo "\n
".getMLText("name"); + echo "
PHP".phpversion()."
Path to php.ini".php_ini_loaded_file()."
\n"; + + $this->contentHeading(getMLText("installed_php_extensions")); + $phpextensions = get_loaded_extensions(false); + echo "\n"; + echo "\n\n"; + echo "\n"; + echo "\n\n\n"; + foreach($phpextensions as $extname) + echo "\n"; + echo "\n
".getMLText("name"); + echo "
".$extname.""."
\n"; + + $this->contentHeading(getMLText("missing_php_extensions")); + echo "\n"; + echo "\n\n"; + echo "\n"; + echo "\n\n\n"; + $requiredext = array('zip', 'xml', 'xsl', 'json', 'intl', 'fileinfo', 'mbstring', 'curl'); + foreach(array_diff($requiredext, $phpextensions) as $extname) + echo "\n"; + echo "\n
".getMLText("name"); + echo "
".$extname.""."
\n"; + } +?> +
+
+contentContainerStart(); echo $version->banner(); $this->contentContainerEnd();