mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
Merge branch '2.1'
This commit is contained in:
commit
ab9d361f98
@ -190,14 +190,14 @@ class DMSDocumentAddController extends LeftAndMain
|
|||||||
return Controller::join_links(
|
return Controller::join_links(
|
||||||
$modelAdmin->Link('DMSDocumentSet'),
|
$modelAdmin->Link('DMSDocumentSet'),
|
||||||
'EditForm/field/DMSDocumentSet/item',
|
'EditForm/field/DMSDocumentSet/item',
|
||||||
$this->getRequest()->getVar('dsid'),
|
(int) $this->getRequest()->getVar('dsid'),
|
||||||
'edit'
|
'edit'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return $modelAdmin->Link();
|
return $modelAdmin->Link();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->getPageEditLink($this->currentPageID(), $this->getRequest()->getVar('dsid'));
|
return $this->getPageEditLink($this->currentPageID(), (int) $this->getRequest()->getVar('dsid'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -212,7 +212,7 @@ class DMSDocumentAddController extends LeftAndMain
|
|||||||
return Controller::join_links(
|
return Controller::join_links(
|
||||||
CMSPageEditController::singleton()->getEditForm($pageId)->FormAction(),
|
CMSPageEditController::singleton()->getEditForm($pageId)->FormAction(),
|
||||||
'field/Document Sets/item',
|
'field/Document Sets/item',
|
||||||
$documentSetId
|
(int) $documentSetId
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1322,6 +1322,9 @@ class DMSDocument extends DataObject implements DMSDocumentInterface
|
|||||||
. '<ul>';
|
. '<ul>';
|
||||||
|
|
||||||
foreach ($this->actionTasks as $panelKey => $title) {
|
foreach ($this->actionTasks as $panelKey => $title) {
|
||||||
|
$panelKey = Convert::raw2xml($panelKey);
|
||||||
|
$title = Convert::raw2xml($title);
|
||||||
|
|
||||||
$html .= '<li class="ss-ui-button dmsdocument-action" data-panel="' . $panelKey . '">'
|
$html .= '<li class="ss-ui-button dmsdocument-action" data-panel="' . $panelKey . '">'
|
||||||
. _t('DMSDocument.ACTION_' . strtoupper($panelKey), $title)
|
. _t('DMSDocument.ACTION_' . strtoupper($panelKey), $title)
|
||||||
. '</li>';
|
. '</li>';
|
||||||
|
@ -82,6 +82,7 @@ class DMSDocument_Controller extends Controller
|
|||||||
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
$finfo = finfo_open(FILEINFO_MIME_TYPE);
|
||||||
$mime = finfo_file($finfo, $path);
|
$mime = finfo_file($finfo, $path);
|
||||||
} elseif (is_executable($fileBin)) {
|
} elseif (is_executable($fileBin)) {
|
||||||
|
$path = escapeshellarg($path);
|
||||||
// try to use the system tool
|
// try to use the system tool
|
||||||
$mime = `$fileBin -i -b $path`;
|
$mime = `$fileBin -i -b $path`;
|
||||||
$mime = explode(';', $mime);
|
$mime = explode(';', $mime);
|
||||||
|
Loading…
Reference in New Issue
Block a user