mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
b5dbadfb66
13
CHANGELOG
13
CHANGELOG
|
@ -1,3 +1,8 @@
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
Changes in version 6.0.26
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
- merge changes up to 5.1.33
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 6.0.25
|
Changes in version 6.0.25
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@ -264,6 +269,14 @@
|
||||||
- add document list which can be exported as an archive
|
- add document list which can be exported as an archive
|
||||||
- search results can be exported
|
- search results can be exported
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
Changes in version 5.1.33
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
- use SeedDMS_Core_File::mimetype() to determine mime type when uploading a
|
||||||
|
file with drag&drop
|
||||||
|
- user images may be 300px height, do not scale them up
|
||||||
|
>>>>>>> seeddms-5.1.x
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.32
|
Changes in version 5.1.32
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
|
@ -197,7 +197,7 @@ class UI extends UI_Default {
|
||||||
$view = UI::factory($theme, 'ErrorDlg');
|
$view = UI::factory($theme, 'ErrorDlg');
|
||||||
$request = $view->getParam('request');
|
$request = $view->getParam('request');
|
||||||
if($request) {
|
if($request) {
|
||||||
$request->query->set('action', 'show');
|
$request->request->set('action', 'show');
|
||||||
}
|
}
|
||||||
$view->setParam('dms', $dms);
|
$view->setParam('dms', $dms);
|
||||||
$view->setParam('user', $user);
|
$view->setParam('user', $user);
|
||||||
|
|
|
@ -755,8 +755,7 @@ switch($command) {
|
||||||
$fileType = ".".pathinfo($userfilename, PATHINFO_EXTENSION);
|
$fileType = ".".pathinfo($userfilename, PATHINFO_EXTENSION);
|
||||||
|
|
||||||
if($settings->_overrideMimeType) {
|
if($settings->_overrideMimeType) {
|
||||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
$userfiletype = SeedDMS_Core_File::mimetype($userfiletmp);
|
||||||
$userfiletype = finfo_file($finfo, $userfiletmp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST["name"]))
|
if (!empty($_POST["name"]))
|
||||||
|
@ -1006,8 +1005,7 @@ switch($command) {
|
||||||
$fileType = ".".pathinfo($userfilename, PATHINFO_EXTENSION);
|
$fileType = ".".pathinfo($userfilename, PATHINFO_EXTENSION);
|
||||||
|
|
||||||
if($settings->_overrideMimeType) {
|
if($settings->_overrideMimeType) {
|
||||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
$userfiletype = SeedDMS_Core_File::mimetype($userfiletmp);
|
||||||
$userfiletype = finfo_file($finfo, $userfiletmp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST["name"]))
|
if (!empty($_POST["name"]))
|
||||||
|
|
|
@ -382,6 +382,7 @@ default:
|
||||||
$controller->setParam('attributes', $attributes);
|
$controller->setParam('attributes', $attributes);
|
||||||
$controller->setParam('workflow', $workflow);
|
$controller->setParam('workflow', $workflow);
|
||||||
$controller->setParam('initialdocumentstatus', $settings->_initialDocumentStatus);
|
$controller->setParam('initialdocumentstatus', $settings->_initialDocumentStatus);
|
||||||
|
$controller->setParam('maxsizeforfulltext', $settings->_maxSizeForFullText);
|
||||||
|
|
||||||
if(!$content = $controller()) {
|
if(!$content = $controller()) {
|
||||||
$err = $controller->getErrorMsg();
|
$err = $controller->getErrorMsg();
|
||||||
|
|
|
@ -517,30 +517,27 @@ else UI::exitError(getMLText("admin_tools"),getMLText("unknown_command"));
|
||||||
|
|
||||||
|
|
||||||
function resizeImage($imageFile) {
|
function resizeImage($imageFile) {
|
||||||
|
|
||||||
// Not perfect. Creates a new image even if the old one is acceptable,
|
|
||||||
// and the output quality is low. Now uses the function imagecreatetruecolor(),
|
|
||||||
// though, so at least the pictures are in colour.
|
|
||||||
|
|
||||||
// read original image
|
// read original image
|
||||||
$origImg = imagecreatefromjpeg($imageFile);
|
$origImg = imagecreatefromjpeg($imageFile);
|
||||||
$width = imagesx($origImg);
|
$width = imagesx($origImg);
|
||||||
$height = imagesy($origImg);
|
$height = imagesy($origImg);
|
||||||
// Create thumbnail in memory
|
// Create thumbnail in memory
|
||||||
$newHeight = 150;
|
$newHeight = 300;
|
||||||
$newWidth = ($width/$height) * $newHeight;
|
$newWidth = ($width/$height) * $newHeight;
|
||||||
|
/* Do not scale images which are already small enough */
|
||||||
|
if($newWidth < $width || $newHeight < $height) {
|
||||||
$newImg = imagecreatetruecolor($newWidth, $newHeight);
|
$newImg = imagecreatetruecolor($newWidth, $newHeight);
|
||||||
// resize
|
// resize
|
||||||
imagecopyresized($newImg, $origImg, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);
|
imagecopyresized($newImg, $origImg, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);
|
||||||
// save to file
|
// save to file
|
||||||
imagejpeg($newImg, $imageFile);
|
imagejpeg($newImg, $imageFile);
|
||||||
// Clean up
|
// Clean up
|
||||||
imagedestroy($origImg);
|
|
||||||
imagedestroy($newImg);
|
imagedestroy($newImg);
|
||||||
|
}
|
||||||
|
imagedestroy($origImg);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
header("Location:../out/out.UsrMgr.php?userid=".$userid);
|
header("Location:../out/out.UsrMgr.php?userid=".$userid);
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
|
||||||
$class = 'input-medium';
|
$class = 'input-medium';
|
||||||
else
|
else
|
||||||
$class = 'input-small';
|
$class = 'input-small';
|
||||||
$html .= '<input '.($type=='password' ? 'type="password"' : ($type=='number' ? 'type="number"' : 'type="text"')).' class="form-control '.$class.'" name="'.$name.'" value="'.$value.'" placeholder="'.$placeholder.'"/>';
|
$html .= '<input '.($type=='password' ? 'type="password"' : ($type=='number' ? 'type="number"' : ($type=='color' ? 'type="color"' : 'type="text"'))).' class="form-control '.$class.'" name="'.$name.'" value="'.$value.'" placeholder="'.$placeholder.'"/>';
|
||||||
}
|
}
|
||||||
return $html;
|
return $html;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
@ -718,6 +718,12 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
|
||||||
case 'hook':
|
case 'hook':
|
||||||
echo $this->callHook('showConfig', $confkey, $extname, $extconf);
|
echo $this->callHook('showConfig', $confkey, $extname, $extconf);
|
||||||
break;
|
break;
|
||||||
|
case "date":
|
||||||
|
$this->formField(
|
||||||
|
null,
|
||||||
|
$this->getDateChooser((isset($settings->_extensions[$extname][$confkey]) ? getReadableDate($settings->_extensions[$extname][$confkey]) : ''), "extensions[".$extname."][".$confkey."]", $this->params['session']->getLanguage())
|
||||||
|
);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$this->showTextField("extensions[".$extname."][".$confkey."]", isset($settings->_extensions[$extname][$confkey]) ? $settings->_extensions[$extname][$confkey] : '', isset($conf['type']) ? $conf['type'] : '', isset($conf['placeholder']) ? $conf['placeholder'] : '');
|
$this->showTextField("extensions[".$extname."][".$confkey."]", isset($settings->_extensions[$extname][$confkey]) ? $settings->_extensions[$extname][$confkey] : '', isset($conf['type']) ? $conf['type'] : '', isset($conf['placeholder']) ? $conf['placeholder'] : '');
|
||||||
}
|
}
|
||||||
|
|
|
@ -431,7 +431,7 @@ $(document).ready( function() {
|
||||||
if ($currUser) {
|
if ($currUser) {
|
||||||
$this->formField(
|
$this->formField(
|
||||||
getMLText("user_image"),
|
getMLText("user_image"),
|
||||||
($currUser->hasImage() ? "<img src=\"".$httproot."out/out.UserImage.php?userid=".$currUser->getId()."\">" : getMLText('no_user_image'))
|
($currUser->hasImage() ? "<img src=\"".$httproot."out/out.UserImage.php?userid=".$currUser->getId()."\" style=\"max-height: 150px;\">" : getMLText('no_user_image'))
|
||||||
);
|
);
|
||||||
$this->formField(
|
$this->formField(
|
||||||
getMLText("new_user_image"),
|
getMLText("new_user_image"),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user