mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-16 14:41:39 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
6d817b333c
|
@ -89,7 +89,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
||||||
* @param string $target optional name of preview image (without extension)
|
* @param string $target optional name of preview image (without extension)
|
||||||
* @return boolean true on success, false on failure
|
* @return boolean true on success, false on failure
|
||||||
*/
|
*/
|
||||||
public function createRawPreview($infile, $dir, $mimetype, $width=0, $target='') { /* {{{ */
|
public function createRawPreview($infile, $dir, $mimetype, $width=0, $target='', &$new=false) { /* {{{ */
|
||||||
if($width == 0)
|
if($width == 0)
|
||||||
$width = $this->width;
|
$width = $this->width;
|
||||||
else
|
else
|
||||||
|
@ -120,6 +120,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
||||||
if($cmd) {
|
if($cmd) {
|
||||||
try {
|
try {
|
||||||
self::execWithTimeout($cmd, $this->timeout);
|
self::execWithTimeout($cmd, $this->timeout);
|
||||||
|
$new = true;
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
$this->lastpreviewfile = '';
|
$this->lastpreviewfile = '';
|
||||||
return false;
|
return false;
|
||||||
|
@ -144,7 +145,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
||||||
* @param integer $width desired width of preview image
|
* @param integer $width desired width of preview image
|
||||||
* @return boolean true on success, false on failure
|
* @return boolean true on success, false on failure
|
||||||
*/
|
*/
|
||||||
public function createPreview($object, $width=0) { /* {{{ */
|
public function createPreview($object, $width=0, &$new=false) { /* {{{ */
|
||||||
if(!$object)
|
if(!$object)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -155,7 +156,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
||||||
$document = $object->getDocument();
|
$document = $object->getDocument();
|
||||||
$file = $document->_dms->contentDir.$object->getPath();
|
$file = $document->_dms->contentDir.$object->getPath();
|
||||||
$target = $this->getFileName($object, $width);
|
$target = $this->getFileName($object, $width);
|
||||||
return $this->createRawPreview($file, $document->getDir(), $object->getMimeType(), $width, $target);
|
return $this->createRawPreview($file, $document->getDir(), $object->getMimeType(), $width, $target, $new);
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1373,7 +1373,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
||||||
';
|
';
|
||||||
if($config['buttons']) {
|
if($config['buttons']) {
|
||||||
foreach($config['buttons'] as $button)
|
foreach($config['buttons'] as $button)
|
||||||
$content .= '<button class="btn'.(!empty($button['id']) ? ' btn-primary" id="'.$button['id'].'"': ' btn-secondary" ').'data-dismiss="modal" aria-hidden="true">'.$button['title'].'</button>';
|
$content .= '<button class="btn'.(!empty($button['id']) ? ' btn-primary" id="'.$button['id'].'"': ' btn-secondary" ').' data-dismiss="modal" aria-hidden="true">'.$button['title'].'</button>';
|
||||||
}
|
}
|
||||||
$content .= '
|
$content .= '
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user