mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
d9143ff271
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1415,10 +1415,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;
|
||||
|
@ -1682,7 +1682,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);
|
||||
|
@ -1850,7 +1850,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();
|
||||
|
@ -2031,7 +2031,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);
|
||||
} /* }}} */
|
||||
|
|
|
@ -1273,13 +1273,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 = '
|
||||
<span class="input-append date span12 datepicker" id="'.$varName.'date" data-date="'.$defDate.'" data-selectmenu="presetexpdate" data-date-format="'.$dateformat.'"'.($lang ? 'data-date-language="'.str_replace('_', '-', $lang).'"' : '').'>
|
||||
<span class="input-append date span12 datepicker" id="'.$varName.'date" data-date="'.$defDate.'" data-selectmenu="presetexpdate" data-date-format="'.$dateformat.'"'.($lang ? ' data-date-language="'.str_replace('_', '-', $lang).'"' : '').($startdate ? ' data-date-start-date="'.$startdate.'"' : '').($enddate ? ' data-date-end-date="'.$enddate.'"' : '').'>
|
||||
<input class="span6" size="16" name="'.$varName.'" id="'.$varName.'" type="text" value="'.$defDate.'" autocomplete="off">
|
||||
<span class="add-on"><i class="icon-calendar"></i></span>
|
||||
</span>';
|
||||
|
|
|
@ -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'];
|
||||
|
|
|
@ -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'));
|
||||
}
|
||||
?>
|
||||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<?php
|
||||
$this->contentHeading(getMLText("seeddms_info"));
|
||||
$seedextensions = $extmgr->getExtensionConfiguration();
|
||||
echo "<table class=\"table table-condensed\">\n";
|
||||
echo "<thead>\n<tr>\n";
|
||||
echo "<th>".getMLText("name");
|
||||
echo "</th>\n";
|
||||
echo "</tr>\n</thead>\n<tbody>\n";
|
||||
$dbversion = $dms->getDBVersion();
|
||||
echo "<tr><td>".getMLText('seeddms_version')."</td><td>".$version->version()."</td></tr>\n";
|
||||
if($user->isAdmin()) {
|
||||
echo "<tr><td>".getMLText('database_schema_version')."</td><td>".$dbversion['major'].".".$dbversion['minor'].".".$dbversion['subminor']."</td></tr>\n";
|
||||
foreach($seedextensions as $extname=>$extconf)
|
||||
echo "<tr><td>".$extname."<br />".$extconf['title']."</td><td>".$extconf['version']."</td></tr>\n";
|
||||
}
|
||||
echo "</tbody>\n</table>\n";
|
||||
?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php
|
||||
if($user->isAdmin()) {
|
||||
$this->contentHeading(getMLText("php_info"));
|
||||
echo "<table class=\"table table-condensed\">\n";
|
||||
echo "<thead>\n<tr>\n";
|
||||
echo "<th>".getMLText("name");
|
||||
echo "</th>\n";
|
||||
echo "</tr>\n</thead>\n<tbody>\n";
|
||||
echo "<tr><td>PHP</td><td>".phpversion()."</td></tr>\n";
|
||||
echo "<tr><td>Path to php.ini</td><td>".php_ini_loaded_file()."</td></tr>\n";
|
||||
echo "</tbody>\n</table>\n";
|
||||
|
||||
$this->contentHeading(getMLText("installed_php_extensions"));
|
||||
$phpextensions = get_loaded_extensions(false);
|
||||
echo "<table class=\"table table-condensed\">\n";
|
||||
echo "<thead>\n<tr>\n";
|
||||
echo "<th>".getMLText("name");
|
||||
echo "</th>\n";
|
||||
echo "</tr>\n</thead>\n<tbody>\n";
|
||||
foreach($phpextensions as $extname)
|
||||
echo "<tr><td>".$extname."</td><td>"."</td></tr>\n";
|
||||
echo "</tbody>\n</table>\n";
|
||||
|
||||
$this->contentHeading(getMLText("missing_php_extensions"));
|
||||
echo "<table class=\"table table-condensed\">\n";
|
||||
echo "<thead>\n<tr>\n";
|
||||
echo "<th>".getMLText("name");
|
||||
echo "</th>\n";
|
||||
echo "</tr>\n</thead>\n<tbody>\n";
|
||||
$requiredext = array('zip', 'xml', 'xsl', 'json', 'intl', 'fileinfo', 'mbstring', 'curl');
|
||||
foreach(array_diff($requiredext, $phpextensions) as $extname)
|
||||
echo "<tr><td>".$extname."</td><td>"."</td></tr>\n";
|
||||
echo "</tbody>\n</table>\n";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$this->contentContainerStart();
|
||||
echo $version->banner();
|
||||
$this->contentContainerEnd();
|
||||
|
|
Loading…
Reference in New Issue
Block a user