Make variable names more consistent
This commit is contained in:
parent
b8a97e00b5
commit
7e23280a1d
|
@ -662,9 +662,9 @@ abstract class Document
|
|||
$this->_getPhysicalStructure();
|
||||
// ... and extension configuration.
|
||||
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]);
|
||||
$fileGrpFulltexts = GeneralUtility::trimExplode(',', $extConf['fileGrpFulltext']);
|
||||
$fileGrpsFulltext = GeneralUtility::trimExplode(',', $extConf['fileGrpFulltext']);
|
||||
if (!empty($this->physicalStructureInfo[$id])) {
|
||||
while ($fileGrpFulltext = array_shift($fileGrpFulltexts)) {
|
||||
while ($fileGrpFulltext = array_shift($fileGrpsFulltext)) {
|
||||
if (!empty($this->physicalStructureInfo[$id]['files'][$fileGrpFulltext])) {
|
||||
// Get fulltext file.
|
||||
$file = GeneralUtility::getUrl($this->getFileLocation($this->physicalStructureInfo[$id]['files'][$fileGrpFulltext]));
|
||||
|
|
|
@ -311,8 +311,8 @@ final class MetsDocument extends Document
|
|||
) {
|
||||
// Link logical structure to the first corresponding physical page/track.
|
||||
$details['points'] = max(intval(array_search($this->smLinks['l2p'][$details['id']][0], $this->physicalStructure, true)), 1);
|
||||
$fileGrpThumbs = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']);
|
||||
while ($fileGrpThumb = array_shift($fileGrpThumbs)) {
|
||||
$fileGrpsThumb = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']);
|
||||
while ($fileGrpThumb = array_shift($fileGrpsThumb)) {
|
||||
if (!empty($this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['files'][$fileGrpThumb])) {
|
||||
$details['thumbnailId'] = $this->physicalStructureInfo[$this->smLinks['l2p'][$details['id']][0]]['files'][$fileGrpThumb];
|
||||
break;
|
||||
|
@ -323,8 +323,8 @@ final class MetsDocument extends Document
|
|||
} elseif ($details['id'] == $this->_getToplevelId()) {
|
||||
// Point to self if this is the toplevel structure.
|
||||
$details['points'] = 1;
|
||||
$fileGrpThumbs = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']);
|
||||
while ($fileGrpThumb = array_shift($fileGrpThumbs)) {
|
||||
$fileGrpsThumb = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']);
|
||||
while ($fileGrpThumb = array_shift($fileGrpsThumb)) {
|
||||
if (
|
||||
!empty($this->physicalStructure)
|
||||
&& !empty($this->physicalStructureInfo[$this->physicalStructure[1]]['files'][$fileGrpThumb])
|
||||
|
@ -1049,8 +1049,8 @@ final class MetsDocument extends Document
|
|||
// Load smLinks.
|
||||
$this->_getSmLinks();
|
||||
// Get thumbnail location.
|
||||
$fileGrpThumbs = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']);
|
||||
while ($fileGrpThumb = array_shift($fileGrpThumbs)) {
|
||||
$fileGrpsThumb = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']);
|
||||
while ($fileGrpThumb = array_shift($fileGrpsThumb)) {
|
||||
if (
|
||||
$this->_getPhysicalStructure()
|
||||
&& !empty($this->smLinks['l2p'][$strctId])
|
||||
|
|
|
@ -136,8 +136,8 @@ class AudioPlayer extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
$this->piVars['double'] = MathUtility::forceIntegerInRange($this->piVars['double'], 0, 1, 0);
|
||||
}
|
||||
// Check if there are any audio files available.
|
||||
$fileGrpAudios = GeneralUtility::trimExplode(',', $this->conf['fileGrpAudio']);
|
||||
while ($fileGrpAudio = array_shift($fileGrpAudios)) {
|
||||
$fileGrpsAudio = GeneralUtility::trimExplode(',', $this->conf['fileGrpAudio']);
|
||||
while ($fileGrpAudio = array_shift($fileGrpsAudio)) {
|
||||
if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['files'][$fileGrpAudio])) {
|
||||
// Get audio data.
|
||||
$this->audio['url'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['files'][$fileGrpAudio]);
|
||||
|
|
|
@ -226,11 +226,11 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
{
|
||||
$image = [];
|
||||
// Get @USE value of METS fileGrp.
|
||||
$fileGrps = GeneralUtility::trimExplode(',', $this->conf['fileGrpImages']);
|
||||
while ($fileGrp = @array_pop($fileGrps)) {
|
||||
$fileGrpsImages = GeneralUtility::trimExplode(',', $this->conf['fileGrpImages']);
|
||||
while ($fileGrpImages = array_pop($fileGrpsImages)) {
|
||||
// Get image link.
|
||||
if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp])) {
|
||||
$image['url'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp]);
|
||||
if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrpImages])) {
|
||||
$image['url'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrpImages]);
|
||||
if ($this->conf['useInternalProxy']) {
|
||||
// Configure @action URL for form.
|
||||
$linkConf = [
|
||||
|
@ -241,10 +241,10 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
];
|
||||
$image['url'] = $this->cObj->typoLink_URL($linkConf);
|
||||
}
|
||||
$image['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrp]);
|
||||
$image['mimetype'] = $this->doc->getFileMimeType($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrpImages]);
|
||||
break;
|
||||
} else {
|
||||
Helper::devLog('File not found in fileGrp "' . $fileGrp . '"', DEVLOG_SEVERITY_WARNING);
|
||||
Helper::devLog('File not found in fileGrp "' . $fileGrpImages . '"', DEVLOG_SEVERITY_WARNING);
|
||||
}
|
||||
}
|
||||
return $image;
|
||||
|
@ -263,8 +263,8 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
{
|
||||
$fulltext = [];
|
||||
// Get fulltext link.
|
||||
$fileGrpFulltexts = GeneralUtility::trimExplode(',', $this->conf['fileGrpFulltext']);
|
||||
while ($fileGrpFulltext = array_shift($fileGrpFulltexts)) {
|
||||
$fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->conf['fileGrpFulltext']);
|
||||
while ($fileGrpFulltext = array_shift($fileGrpsFulltext)) {
|
||||
if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrpFulltext])) {
|
||||
$fulltext['url'] = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$page]]['files'][$fileGrpFulltext]);
|
||||
if ($this->conf['useInternalProxy']) {
|
||||
|
|
|
@ -75,8 +75,8 @@ class FulltextDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
// Load template file.
|
||||
$this->getTemplate();
|
||||
// Get text download.
|
||||
$fileGrpFulltexts = GeneralUtility::trimExplode(',', $this->conf['fileGrpFulltext']);
|
||||
while ($fileGrpFulltext = array_shift($fileGrpFulltexts)) {
|
||||
$fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->conf['fileGrpFulltext']);
|
||||
while ($fileGrpFulltext = array_shift($fileGrpsFulltext)) {
|
||||
if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['files'][$fileGrpFulltext])) {
|
||||
$fullTextFile = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['files'][$fileGrpFulltext];
|
||||
break;
|
||||
|
|
|
@ -75,8 +75,8 @@ class FulltextTool extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
}
|
||||
// Load template file.
|
||||
$this->getTemplate();
|
||||
$fileGrpFulltexts = GeneralUtility::trimExplode(',', $this->conf['fileGrpFulltext']);
|
||||
while ($fileGrpFulltext = array_shift($fileGrpFulltexts)) {
|
||||
$fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->conf['fileGrpFulltext']);
|
||||
while ($fileGrpFulltext = array_shift($fileGrpsFulltext)) {
|
||||
if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['files'][$fileGrpFulltext])) {
|
||||
$fullTextFile = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['files'][$fileGrpFulltext];
|
||||
break;
|
||||
|
|
|
@ -95,9 +95,9 @@ class PdfDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
$page1Link = '';
|
||||
$page2Link = '';
|
||||
$pageNumber = $this->piVars['page'];
|
||||
$fileGrpDownloads = GeneralUtility::trimExplode(',', $this->conf['fileGrpDownload']);
|
||||
$fileGrpsDownload = GeneralUtility::trimExplode(',', $this->conf['fileGrpDownload']);
|
||||
// Get image link.
|
||||
while ($fileGrpDownload = array_shift($fileGrpDownloads)) {
|
||||
while ($fileGrpDownload = array_shift($fileGrpsDownload)) {
|
||||
if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$pageNumber]]['files'][$fileGrpDownload])) {
|
||||
$page1Link = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$pageNumber]]['files'][$fileGrpDownload]);
|
||||
// Get second page, too, if double page view is activated.
|
||||
|
@ -150,9 +150,9 @@ class PdfDownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
protected function getWorkLink()
|
||||
{
|
||||
$workLink = '';
|
||||
$fileGrpDownloads = GeneralUtility::trimExplode(',', $this->conf['fileGrpDownload']);
|
||||
$fileGrpsDownload = GeneralUtility::trimExplode(',', $this->conf['fileGrpDownload']);
|
||||
// Get work link.
|
||||
while ($fileGrpDownload = array_shift($fileGrpDownloads)) {
|
||||
while ($fileGrpDownload = array_shift($fileGrpsDownload)) {
|
||||
if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[0]]['files'][$fileGrpDownload])) {
|
||||
$workLink = $this->doc->getFileLocation($this->doc->physicalStructureInfo[$this->doc->physicalStructure[0]]['files'][$fileGrpDownload]);
|
||||
break;
|
||||
|
|
|
@ -83,8 +83,8 @@ class SearchInDocumentTool extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
}
|
||||
|
||||
// Quit if no fulltext file is present
|
||||
$fileGrpFulltexts = GeneralUtility::trimExplode(',', $this->conf['fileGrpFulltext']);
|
||||
while ($fileGrpFulltext = array_shift($fileGrpFulltexts)) {
|
||||
$fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->conf['fileGrpFulltext']);
|
||||
while ($fileGrpFulltext = array_shift($fileGrpsFulltext)) {
|
||||
if (!empty($this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['files'][$fileGrpFulltext])) {
|
||||
$fullTextFile = $this->doc->physicalStructureInfo[$this->doc->physicalStructure[$this->piVars['page']]]['files'][$fileGrpFulltext];
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue