We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| @@ -46,7 +46,7 @@ discard block | ||
| 46 | 46 | * @var array | 
| 47 | 47 | * @access protected | 
| 48 | 48 | */ | 
| 49 | - protected $buttonArray = array (); | |
| 49 | + protected $buttonArray = array(); | |
| 50 | 50 | |
| 51 | 51 | /** | 
| 52 | 52 | * Holds the module's marker array | 
| @@ -54,7 +54,7 @@ discard block | ||
| 54 | 54 | * @var array | 
| 55 | 55 | * @access protected | 
| 56 | 56 | */ | 
| 57 | - protected $markerArray = array (); | |
| 57 | + protected $markerArray = array(); | |
| 58 | 58 | |
| 59 | 59 | /** | 
| 60 | 60 | * Holds the module's subpart array | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | * @var array | 
| 63 | 63 | * @access protected | 
| 64 | 64 | */ | 
| 65 | - protected $subpartArray = array (); | |
| 65 | + protected $subpartArray = array(); | |
| 66 | 66 | |
| 67 | 67 | /** | 
| 68 | 68 | * Holds the TYPO3_CONF_VARS array of this extension | 
| @@ -70,7 +70,7 @@ discard block | ||
| 70 | 70 | * @var array | 
| 71 | 71 | * @access protected | 
| 72 | 72 | */ | 
| 73 | - protected $conf = array (); | |
| 73 | + protected $conf = array(); | |
| 74 | 74 | |
| 75 | 75 | /** | 
| 76 | 76 | * Holds the submitted form's data | 
| @@ -91,7 +91,7 @@ discard block | ||
| 91 | 91 | |
| 92 | 92 | $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], 1); | 
| 93 | 93 | |
| 94 | -        $GLOBALS['LANG']->includeLLFile('EXT:'.$this->extKey.'/modules/'.$this->modPath.'locallang.xml'); | |
| 94 | +        $GLOBALS['LANG']->includeLLFile('EXT:' . $this->extKey . '/modules/' . $this->modPath . 'locallang.xml'); | |
| 95 | 95 | |
| 96 | 96 | $this->setMOD_MENU(); | 
| 97 | 97 | |
| @@ -103,13 +103,13 @@ discard block | ||
| 103 | 103 | |
| 104 | 104 |          $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate'); | 
| 105 | 105 | |
| 106 | -        $this->doc->setModuleTemplate('EXT:'.$this->extKey.'/modules/'.$this->modPath.'template.tmpl'); | |
| 106 | +        $this->doc->setModuleTemplate('EXT:' . $this->extKey . '/modules/' . $this->modPath . 'template.tmpl'); | |
| 107 | 107 | |
| 108 | - $this->doc->getPageRenderer()->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($this->extKey).'res/backend.css'); | |
| 108 | + $this->doc->getPageRenderer()->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($this->extKey) . 'res/backend.css'); | |
| 109 | 109 | |
| 110 | 110 | $this->doc->backPath = $GLOBALS['BACK_PATH']; | 
| 111 | 111 | |
| 112 | - $this->doc->bodyTagAdditions = 'class="ext-'.$this->extKey.'-modules"'; | |
| 112 | + $this->doc->bodyTagAdditions = 'class="ext-' . $this->extKey . '-modules"'; | |
| 113 | 113 | |
| 114 | 114 | $this->doc->form = '<form action="" method="post" enctype="multipart/form-data">'; | 
| 115 | 115 | |
| @@ -180,7 +180,7 @@ discard block | ||
| 180 | 180 | // Set defaults for buttons and menu. | 
| 181 | 181 |          if (empty($this->buttonArray['RELOAD'])) { | 
| 182 | 182 | |
| 183 | -            $this->buttonArray['RELOAD'] = '<a href="'.$GLOBALS['MCONF']['_'].'" title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload', TRUE).'">'.\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-refresh').'</a>'; | |
| 183 | +            $this->buttonArray['RELOAD'] = '<a href="' . $GLOBALS['MCONF']['_'] . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.reload', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-system-refresh') . '</a>'; | |
| 184 | 184 | |
| 185 | 185 | } | 
| 186 | 186 | |
| @@ -192,7 +192,7 @@ discard block | ||
| 192 | 192 | |
| 193 | 193 |          if (empty($this->markerArray['CSH'])) { | 
| 194 | 194 | |
| 195 | -            $this->markerArray['CSH'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_'.$GLOBALS['MCONF']['name'], 'csh', $GLOBALS['BACK_PATH'], '', TRUE); | |
| 195 | +            $this->markerArray['CSH'] = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem('_MOD_' . $GLOBALS['MCONF']['name'], 'csh', $GLOBALS['BACK_PATH'], '', TRUE); | |
| 196 | 196 | |
| 197 | 197 | } | 
| 198 | 198 | |
| @@ -60,7 +60,7 @@ discard block | ||
| 60 | 60 |      protected function init(array $conf) { | 
| 61 | 61 | |
| 62 | 62 | // Read FlexForm configuration. | 
| 63 | - $flexFormConf = array (); | |
| 63 | + $flexFormConf = array(); | |
| 64 | 64 | |
| 65 | 65 | $this->cObj->readFlexformIntoConf($this->cObj->data['pi_flexform'], $flexFormConf); | 
| 66 | 66 | |
| @@ -71,7 +71,7 @@ discard block | ||
| 71 | 71 | } | 
| 72 | 72 | |
| 73 | 73 | // Read plugin TS configuration. | 
| 74 | - $pluginConf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][get_class($this).'.']; | |
| 74 | + $pluginConf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][get_class($this) . '.']; | |
| 75 | 75 | |
| 76 | 76 |          if (is_array($pluginConf)) { | 
| 77 | 77 | |
| @@ -80,7 +80,7 @@ discard block | ||
| 80 | 80 | } | 
| 81 | 81 | |
| 82 | 82 | // Read general TS configuration. | 
| 83 | - $generalConf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->prefixId.'.']; | |
| 83 | + $generalConf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->prefixId . '.']; | |
| 84 | 84 | |
| 85 | 85 |          if (is_array($generalConf)) { | 
| 86 | 86 | |
| @@ -141,7 +141,7 @@ discard block | ||
| 141 | 141 | |
| 142 | 142 |                  if (TYPO3_DLOG) { | 
| 143 | 143 | |
| 144 | -                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Failed to load document with UID "'.$this->piVars['id'].'"', $this->extKey, SYSLOG_SEVERITY_ERROR); | |
| 144 | +                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Failed to load document with UID "' . $this->piVars['id'] . '"', $this->extKey, SYSLOG_SEVERITY_ERROR); | |
| 145 | 145 | |
| 146 | 146 | } | 
| 147 | 147 | |
| @@ -158,7 +158,7 @@ discard block | ||
| 158 | 158 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 159 | 159 | 'tx_dlf_documents.uid', | 
| 160 | 160 | 'tx_dlf_documents', | 
| 161 | -                'tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['recordId'], 'tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_documents'), | |
| 161 | +                'tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->piVars['recordId'], 'tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_documents'), | |
| 162 | 162 | '', | 
| 163 | 163 | '', | 
| 164 | 164 | '1' | 
| @@ -181,7 +181,7 @@ discard block | ||
| 181 | 181 | |
| 182 | 182 |                  if (TYPO3_DLOG) { | 
| 183 | 183 | |
| 184 | -                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Failed to load document with record ID "'.$this->piVars['recordId'].'"', $this->extKey, SYSLOG_SEVERITY_ERROR); | |
| 184 | +                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Failed to load document with record ID "' . $this->piVars['recordId'] . '"', $this->extKey, SYSLOG_SEVERITY_ERROR); | |
| 185 | 185 | |
| 186 | 186 | } | 
| 187 | 187 | |
| @@ -191,7 +191,7 @@ discard block | ||
| 191 | 191 | |
| 192 | 192 |              if (TYPO3_DLOG) { | 
| 193 | 193 | |
| 194 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Invalid UID "'.$this->piVars['id'].'" or PID "'.$this->conf['pages'].'" for document loading', $this->extKey, SYSLOG_SEVERITY_ERROR); | |
| 194 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_plugin->loadDocument()] Invalid UID "' . $this->piVars['id'] . '" or PID "' . $this->conf['pages'] . '" for document loading', $this->extKey, SYSLOG_SEVERITY_ERROR); | |
| 195 | 195 | |
| 196 | 196 | } | 
| 197 | 197 | |
| @@ -234,19 +234,19 @@ discard block | ||
| 234 | 234 | |
| 235 | 235 | } | 
| 236 | 236 | |
| 237 | -                if (is_array($this->conf['_DEFAULT_PI_VARS.'][$GPkey.'.']['stdWrap.'])) { | |
| 237 | +                if (is_array($this->conf['_DEFAULT_PI_VARS.'][$GPkey . '.']['stdWrap.'])) { | |
| 238 | 238 | |
| 239 | 239 | $GPval = $GPval ? $GPval : ''; | 
| 240 | 240 | |
| 241 | - $this->conf['_DEFAULT_PI_VARS.'][$GPkey] = $this->cObj->stdWrap($GPval, $this->conf['_DEFAULT_PI_VARS.'][$GPkey.'.']['stdWrap.']); | |
| 241 | + $this->conf['_DEFAULT_PI_VARS.'][$GPkey] = $this->cObj->stdWrap($GPval, $this->conf['_DEFAULT_PI_VARS.'][$GPkey . '.']['stdWrap.']); | |
| 242 | 242 | |
| 243 | - unset ($this->conf['_DEFAULT_PI_VARS.'][$GPkey.'.']['stdWrap.']); | |
| 243 | + unset ($this->conf['_DEFAULT_PI_VARS.'][$GPkey . '.']['stdWrap.']); | |
| 244 | 244 | |
| 245 | 245 | } | 
| 246 | 246 | |
| 247 | 247 | } | 
| 248 | 248 | |
| 249 | - $this->piVars = tx_dlf_helper::array_merge_recursive_overrule($this->conf['_DEFAULT_PI_VARS.'], is_array($this->piVars) ? $this->piVars : array ()); | |
| 249 | + $this->piVars = tx_dlf_helper::array_merge_recursive_overrule($this->conf['_DEFAULT_PI_VARS.'], is_array($this->piVars) ? $this->piVars : array()); | |
| 250 | 250 | |
| 251 | 251 | } | 
| 252 | 252 | |
| @@ -265,11 +265,11 @@ discard block | ||
| 265 | 265 | |
| 266 | 266 |          if (!$GLOBALS['TSFE']->config['config']['disableWrapInBaseClass']) { | 
| 267 | 267 | // Use get_class($this) instead of $this->prefixId for content wrapping because $this->prefixId is the same for all plugins. | 
| 268 | -            $content = '<div class="'.str_replace('_', '-', get_class($this)).'">'.$content.'</div>'; | |
| 268 | +            $content = '<div class="' . str_replace('_', '-', get_class($this)) . '">' . $content . '</div>'; | |
| 269 | 269 | |
| 270 | 270 |              if (!$GLOBALS['TSFE']->config['config']['disablePrefixComment']) { | 
| 271 | 271 | |
| 272 | - $content = "\n\n<!-- BEGIN: Content of extension '".$this->extKey."', plugin '".get_class($this)."' -->\n\n".$content."\n\n<!-- END: Content of extension '".$this->extKey."', plugin '".get_class($this)."' -->\n\n"; | |
| 272 | + $content = "\n\n<!-- BEGIN: Content of extension '" . $this->extKey . "', plugin '" . get_class($this) . "' -->\n\n" . $content . "\n\n<!-- END: Content of extension '" . $this->extKey . "', plugin '" . get_class($this) . "' -->\n\n"; | |
| 273 | 273 | |
| 274 | 274 | } | 
| 275 | 275 | } | 
| @@ -66,7 +66,7 @@ discard block | ||
| 66 | 66 | * @var array | 
| 67 | 67 | * @access protected | 
| 68 | 68 | */ | 
| 69 | - protected $params = array (); | |
| 69 | + protected $params = array(); | |
| 70 | 70 | |
| 71 | 71 | /** | 
| 72 | 72 | * Is the search instantiated successfully? | 
| @@ -82,7 +82,7 @@ discard block | ||
| 82 | 82 | * @var array(tx_dlf_solr) | 
| 83 | 83 | * @access protected | 
| 84 | 84 | */ | 
| 85 | - protected static $registry = array (); | |
| 85 | + protected static $registry = array(); | |
| 86 | 86 | |
| 87 | 87 | /** | 
| 88 | 88 | * This holds the Solr service object | 
| @@ -134,12 +134,12 @@ discard block | ||
| 134 | 134 |          if (preg_match('/^[[:alnum:]]+_[tu][su]i:\(?.*\)?$/', $query)) { | 
| 135 | 135 | |
| 136 | 136 | // Get all indexed fields. | 
| 137 | - $fields = array (); | |
| 137 | + $fields = array(); | |
| 138 | 138 | |
| 139 | 139 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 140 | 140 | 'tx_dlf_metadata.index_name,tx_dlf_metadata.index_tokenized,tx_dlf_metadata.index_stored', | 
| 141 | 141 | 'tx_dlf_metadata', | 
| 142 | -                'tx_dlf_metadata.index_indexed=1 AND tx_dlf_metadata.pid='.intval($pid).' AND (tx_dlf_metadata.sys_language_uid IN (-1,0) OR tx_dlf_metadata.l18n_parent=0)'.tx_dlf_helper::whereClause('tx_dlf_metadata'), | |
| 142 | +                'tx_dlf_metadata.index_indexed=1 AND tx_dlf_metadata.pid=' . intval($pid) . ' AND (tx_dlf_metadata.sys_language_uid IN (-1,0) OR tx_dlf_metadata.l18n_parent=0)' . tx_dlf_helper::whereClause('tx_dlf_metadata'), | |
| 143 | 143 | '', | 
| 144 | 144 | '', | 
| 145 | 145 | '' | 
| @@ -149,7 +149,7 @@ discard block | ||
| 149 | 149 | |
| 150 | 150 |                  while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_row($result)) { | 
| 151 | 151 | |
| 152 | - $fields[] = $resArray[0].'_'.($resArray[1] ? 't' : 'u').($resArray[2] ? 's' : 'u').'i'; | |
| 152 | + $fields[] = $resArray[0] . '_' . ($resArray[1] ? 't' : 'u') . ($resArray[2] ? 's' : 'u') . 'i'; | |
| 153 | 153 | |
| 154 | 154 | } | 
| 155 | 155 | |
| @@ -160,7 +160,7 @@ discard block | ||
| 160 | 160 | |
| 161 | 161 |              if (in_array($splitQuery[0], $fields)) { | 
| 162 | 162 | |
| 163 | -                $query = $splitQuery[0].':('.self::escapeQuery(trim($splitQuery[1], '()')).')'; | |
| 163 | +                $query = $splitQuery[0] . ':(' . self::escapeQuery(trim($splitQuery[1], '()')) . ')'; | |
| 164 | 164 | |
| 165 | 165 |              } else { | 
| 166 | 166 | |
| @@ -205,7 +205,7 @@ discard block | ||
| 205 | 205 | |
| 206 | 206 |              if (TYPO3_DLOG) { | 
| 207 | 207 | |
| 208 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->getInstance('.$_core.')] Invalid core name "'.$core.'" for Apache Solr', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 208 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->getInstance(' . $_core . ')] Invalid core name "' . $core . '" for Apache Solr', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 209 | 209 | |
| 210 | 210 | } | 
| 211 | 211 | |
| @@ -236,7 +236,7 @@ discard block | ||
| 236 | 236 | |
| 237 | 237 |              if (TYPO3_DLOG) { | 
| 238 | 238 | |
| 239 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->getInstance('.$_core.')] Could not connect to Apache Solr server', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 239 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->getInstance(' . $_core . ')] Could not connect to Apache Solr server', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 240 | 240 | |
| 241 | 241 | } | 
| 242 | 242 | |
| @@ -255,7 +255,7 @@ discard block | ||
| 255 | 255 | */ | 
| 256 | 256 |      public static function getSolrConnectionInfo() { | 
| 257 | 257 | |
| 258 | - $solrInfo = array (); | |
| 258 | + $solrInfo = array(); | |
| 259 | 259 | |
| 260 | 260 | // Extract extension configuration. | 
| 261 | 261 | $conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]); | 
| @@ -299,7 +299,7 @@ discard block | ||
| 299 | 299 | |
| 300 | 300 |          if ($solrInfo['username'] && $solrInfo['password']) { | 
| 301 | 301 | |
| 302 | - $host = $solrInfo['username'].':'.$solrInfo['password'].'@'.$solrInfo['host']; | |
| 302 | + $host = $solrInfo['username'] . ':' . $solrInfo['password'] . '@' . $solrInfo['host']; | |
| 303 | 303 | |
| 304 | 304 |          } else { | 
| 305 | 305 | |
| @@ -308,7 +308,7 @@ discard block | ||
| 308 | 308 | } | 
| 309 | 309 | |
| 310 | 310 | // Return entire request URL. | 
| 311 | - return $solrInfo['scheme'].'://'.$host.':'.$solrInfo['port'].'/'.$solrInfo['path'].'/'.$core; | |
| 311 | + return $solrInfo['scheme'] . '://' . $host . ':' . $solrInfo['port'] . '/' . $solrInfo['path'] . '/' . $core; | |
| 312 | 312 | |
| 313 | 313 | } | 
| 314 | 314 | |
| @@ -326,7 +326,7 @@ discard block | ||
| 326 | 326 | $start = max(intval($start), 0); | 
| 327 | 327 | |
| 328 | 328 | // Check if core already exists. | 
| 329 | -        if (self::getInstance('dlfCore'.$start) === NULL) { | |
| 329 | +        if (self::getInstance('dlfCore' . $start) === NULL) { | |
| 330 | 330 | |
| 331 | 331 | return $start; | 
| 332 | 332 | |
| @@ -347,12 +347,12 @@ discard block | ||
| 347 | 347 | */ | 
| 348 | 348 |      public function search() { | 
| 349 | 349 | |
| 350 | - $toplevel = array (); | |
| 350 | + $toplevel = array(); | |
| 351 | 351 | |
| 352 | 352 | // Take over query parameters. | 
| 353 | 353 | $params = $this->params; | 
| 354 | 354 | |
| 355 | - $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : array (); | |
| 355 | + $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : array(); | |
| 356 | 356 | |
| 357 | 357 | // Set some query parameters. | 
| 358 | 358 | $params['start'] = 0; | 
| @@ -367,7 +367,7 @@ discard block | ||
| 367 | 367 | // Restore query parameters | 
| 368 | 368 | $params = $this->params; | 
| 369 | 369 | |
| 370 | - $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : array (); | |
| 370 | + $params['filterquery'] = isset($params['filterquery']) ? $params['filterquery'] : array(); | |
| 371 | 371 | |
| 372 | 372 | // Restrict the fields to the required ones. | 
| 373 | 373 | $params['fields'] = 'uid,id'; | 
| @@ -377,17 +377,17 @@ discard block | ||
| 377 | 377 | |
| 378 | 378 |              if (isset($value['query'])) { | 
| 379 | 379 | |
| 380 | -                $params['filterquery'][$key]['query'] = '{!join from=uid to=uid}'.$value['query']; | |
| 380 | +                $params['filterquery'][$key]['query'] = '{!join from=uid to=uid}' . $value['query']; | |
| 381 | 381 | |
| 382 | 382 | } | 
| 383 | 383 | |
| 384 | 384 | } | 
| 385 | 385 | |
| 386 | 386 | // Set filter query to just get toplevel documents. | 
| 387 | -        $params['filterquery'][] = array ('query' => 'toplevel:true'); | |
| 387 | +        $params['filterquery'][] = array('query' => 'toplevel:true'); | |
| 388 | 388 | |
| 389 | 389 | // Set join query to get all documents with the same uids. | 
| 390 | -        $params['query'] = '{!join from=uid to=uid}'.$params['query']; | |
| 390 | +        $params['query'] = '{!join from=uid to=uid}' . $params['query']; | |
| 391 | 391 | |
| 392 | 392 | // Perform search to determine the total number of toplevel hits and fetch the required rows. | 
| 393 | 393 | $selectQuery = $this->service->createSelect($params); | 
| @@ -398,11 +398,11 @@ discard block | ||
| 398 | 398 | // Process results. | 
| 399 | 399 |          foreach ($results as $doc) { | 
| 400 | 400 | |
| 401 | - $toplevel[$doc->id] = array ( | |
| 401 | + $toplevel[$doc->id] = array( | |
| 402 | 402 | 'u' => $doc->uid, | 
| 403 | 403 | 'h' => '', | 
| 404 | 404 | 's' => '', | 
| 405 | - 'p' => array () | |
| 405 | + 'p' => array() | |
| 406 | 406 | ); | 
| 407 | 407 | |
| 408 | 408 | } | 
| @@ -415,10 +415,10 @@ discard block | ||
| 415 | 415 | $list->add(array_values($toplevel)); | 
| 416 | 416 | |
| 417 | 417 | // Set metadata for search. | 
| 418 | - $list->metadata = array ( | |
| 418 | + $list->metadata = array( | |
| 419 | 419 | 'label' => '', | 
| 420 | 420 | 'description' => '', | 
| 421 | - 'options' => array ( | |
| 421 | + 'options' => array( | |
| 422 | 422 | 'source' => 'search', | 
| 423 | 423 | 'engine' => 'solr', | 
| 424 | 424 | 'select' => $this->params['query'], | 
| @@ -447,7 +447,7 @@ discard block | ||
| 447 | 447 | * | 
| 448 | 448 | * @return array The Apache Solr Documents that were fetched | 
| 449 | 449 | */ | 
| 450 | -    public function search_raw($query = '', $parameters = array ()) { | |
| 450 | +    public function search_raw($query = '', $parameters = array()) { | |
| 451 | 451 | |
| 452 | 452 | // Set additional query parameters. | 
| 453 | 453 | $parameters['start'] = 0; | 
| @@ -595,13 +595,13 @@ discard block | ||
| 595 | 595 | */ | 
| 596 | 596 |      public function __get($var) { | 
| 597 | 597 | |
| 598 | - $method = '_get'.ucfirst($var); | |
| 598 | + $method = '_get' . ucfirst($var); | |
| 599 | 599 | |
| 600 | 600 |          if (!property_exists($this, $var) || !method_exists($this, $method)) { | 
| 601 | 601 | |
| 602 | 602 |              if (TYPO3_DLOG) { | 
| 603 | 603 | |
| 604 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->__get('.$var.')] There is no getter function for property "'.$var.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 604 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->__get(' . $var . ')] There is no getter function for property "' . $var . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 605 | 605 | |
| 606 | 606 | } | 
| 607 | 607 | |
| @@ -627,13 +627,13 @@ discard block | ||
| 627 | 627 | */ | 
| 628 | 628 |      public function __set($var, $value) { | 
| 629 | 629 | |
| 630 | - $method = '_set'.ucfirst($var); | |
| 630 | + $method = '_set' . ucfirst($var); | |
| 631 | 631 | |
| 632 | 632 |          if (!property_exists($this, $var) || !method_exists($this, $method)) { | 
| 633 | 633 | |
| 634 | 634 |              if (TYPO3_DLOG) { | 
| 635 | 635 | |
| 636 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->__set('.$var.', [data])] There is no setter function for property "'.$var.'"', self::$extKey, SYSLOG_SEVERITY_WARNING, $value); | |
| 636 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_solr->__set(' . $var . ', [data])] There is no setter function for property "' . $var . '"', self::$extKey, SYSLOG_SEVERITY_WARNING, $value); | |
| 637 | 637 | |
| 638 | 638 | } | 
| 639 | 639 | |
| @@ -658,13 +658,13 @@ discard block | ||
| 658 | 658 | |
| 659 | 659 | $solrInfo = self::getSolrConnectionInfo(); | 
| 660 | 660 | |
| 661 | - $config = array ( | |
| 662 | - 'endpoint' => array ( | |
| 663 | - 'dlf' => array ( | |
| 661 | + $config = array( | |
| 662 | + 'endpoint' => array( | |
| 663 | + 'dlf' => array( | |
| 664 | 664 | 'scheme' => $solrInfo['scheme'], | 
| 665 | 665 | 'host' => $solrInfo['host'], | 
| 666 | 666 | 'port' => $solrInfo['port'], | 
| 667 | - 'path' => '/'.$solrInfo['path'].'/', | |
| 667 | + 'path' => '/' . $solrInfo['path'] . '/', | |
| 668 | 668 | 'core' => $core, | 
| 669 | 669 | 'username' => $solrInfo['username'], | 
| 670 | 670 | 'password' => $solrInfo['password'], | 
| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 | * @var array() | 
| 37 | 37 | * @access protected | 
| 38 | 38 | */ | 
| 39 | - protected $elements = array (); | |
| 39 | + protected $elements = array(); | |
| 40 | 40 | |
| 41 | 41 | /** | 
| 42 | 42 | * This holds the list's metadata | 
| @@ -44,7 +44,7 @@ discard block | ||
| 44 | 44 | * @var array | 
| 45 | 45 | * @access protected | 
| 46 | 46 | */ | 
| 47 | - protected $metadata = array (); | |
| 47 | + protected $metadata = array(); | |
| 48 | 48 | |
| 49 | 49 | /** | 
| 50 | 50 | * This holds the current list position | 
| @@ -61,7 +61,7 @@ discard block | ||
| 61 | 61 | * @var array() | 
| 62 | 62 | * @access protected | 
| 63 | 63 | */ | 
| 64 | - protected $records = array (); | |
| 64 | + protected $records = array(); | |
| 65 | 65 | |
| 66 | 66 | /** | 
| 67 | 67 | * Instance of tx_dlf_solr class | 
| @@ -77,7 +77,7 @@ discard block | ||
| 77 | 77 | * @var array | 
| 78 | 78 | * @access protected | 
| 79 | 79 | */ | 
| 80 | - protected $solrConfig = array (); | |
| 80 | + protected $solrConfig = array(); | |
| 81 | 81 | |
| 82 | 82 | /** | 
| 83 | 83 | * This adds an array of elements at the given position to the list | 
| @@ -135,7 +135,7 @@ discard block | ||
| 135 | 135 | |
| 136 | 136 |              if (TYPO3_DLOG) { | 
| 137 | 137 | |
| 138 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->current()] Invalid position "'.$this->position.'" for list element', $this->extKey, SYSLOG_SEVERITY_NOTICE); | |
| 138 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->current()] Invalid position "' . $this->position . '" for list element', $this->extKey, SYSLOG_SEVERITY_NOTICE); | |
| 139 | 139 | |
| 140 | 140 | } | 
| 141 | 141 | |
| @@ -156,7 +156,7 @@ discard block | ||
| 156 | 156 | */ | 
| 157 | 157 |      protected function getRecord($element) { | 
| 158 | 158 | |
| 159 | -        if (is_array($element) && array_keys($element) == array ('u', 'h', 's', 'p')) { | |
| 159 | +        if (is_array($element) && array_keys($element) == array('u', 'h', 's', 'p')) { | |
| 160 | 160 | |
| 161 | 161 | // Return already processed record if possible. | 
| 162 | 162 |              if (!empty($this->records[$element['u']])) { | 
| @@ -165,7 +165,7 @@ discard block | ||
| 165 | 165 | |
| 166 | 166 | } | 
| 167 | 167 | |
| 168 | - $record = array ( | |
| 168 | + $record = array( | |
| 169 | 169 | 'uid' => $element['u'], | 
| 170 | 170 | 'page' => 1, | 
| 171 | 171 | 'preview' => '', | 
| @@ -179,7 +179,7 @@ discard block | ||
| 179 | 179 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 180 | 180 | 'tx_dlf_documents.uid AS uid,tx_dlf_documents.thumbnail AS thumbnail,tx_dlf_documents.metadata AS metadata', | 
| 181 | 181 | 'tx_dlf_documents', | 
| 182 | -                    '(tx_dlf_documents.uid='.intval($record['uid']).' OR tx_dlf_documents.partof='.intval($record['uid']).')'.tx_dlf_helper::whereClause('tx_dlf_documents'), | |
| 182 | +                    '(tx_dlf_documents.uid=' . intval($record['uid']) . ' OR tx_dlf_documents.partof=' . intval($record['uid']) . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'), | |
| 183 | 183 | '', | 
| 184 | 184 | '', | 
| 185 | 185 | '' | 
| @@ -224,9 +224,9 @@ discard block | ||
| 224 | 224 | |
| 225 | 225 | $record['metadata'] = $metadata; | 
| 226 | 226 | |
| 227 | -                    } elseif (($key = array_search(array ('u' => $resArray['uid']), $record['subparts'], TRUE)) !== FALSE) { | |
| 227 | +                    } elseif (($key = array_search(array('u' => $resArray['uid']), $record['subparts'], TRUE)) !== FALSE) { | |
| 228 | 228 | |
| 229 | - $record['subparts'][$key] = array ( | |
| 229 | + $record['subparts'][$key] = array( | |
| 230 | 230 | 'uid' => $resArray['uid'], | 
| 231 | 231 | 'page' => 1, | 
| 232 | 232 | 'preview' => (!empty($record['subparts'][$key]['h']) ? $record['subparts'][$key]['h'] : ''), | 
| @@ -242,22 +242,22 @@ discard block | ||
| 242 | 242 | |
| 243 | 243 |                  if ($this->solrConnect()) { | 
| 244 | 244 | |
| 245 | - $params = array (); | |
| 245 | + $params = array(); | |
| 246 | 246 | |
| 247 | 247 | // Restrict the fields to the required ones | 
| 248 | 248 | $params['fields'] = 'uid,id,toplevel,thumbnail,page'; | 
| 249 | 249 | |
| 250 | 250 |                      foreach ($this->solrConfig as $solr_name) { | 
| 251 | 251 | |
| 252 | - $params['fields'] .= ','.$solr_name; | |
| 252 | + $params['fields'] .= ',' . $solr_name; | |
| 253 | 253 | |
| 254 | 254 | } | 
| 255 | 255 | |
| 256 | 256 | // If it is a fulltext search, enable highlighting. | 
| 257 | 257 |                      if ($this->metadata['fulltextSearch']) { | 
| 258 | 258 | |
| 259 | - $params['component'] = array ( | |
| 260 | - 'highlighting' => array ( | |
| 259 | + $params['component'] = array( | |
| 260 | + 'highlighting' => array( | |
| 261 | 261 | 'query' => tx_dlf_solr::escapeQuery($this->metadata['searchString']), | 
| 262 | 262 | 'field' => 'fulltext', | 
| 263 | 263 | 'usefastvectorhighlighter' => TRUE | 
| @@ -274,27 +274,27 @@ discard block | ||
| 274 | 274 | $params['rows'] = 10000; | 
| 275 | 275 | |
| 276 | 276 | // Take over existing filter queries. | 
| 277 | - $params['filterquery'] = isset($this->metadata['options']['params']['filterquery']) ? $this->metadata['options']['params']['filterquery'] : array (); | |
| 277 | + $params['filterquery'] = isset($this->metadata['options']['params']['filterquery']) ? $this->metadata['options']['params']['filterquery'] : array(); | |
| 278 | 278 | |
| 279 | 279 | // Extend filter query to get all documents with the same uid. | 
| 280 | 280 |                      foreach ($params['filterquery'] as $key => $value) { | 
| 281 | 281 | |
| 282 | 282 |                          if (isset($value['query'])) { | 
| 283 | 283 | |
| 284 | - $params['filterquery'][$key]['query'] = $value['query'].' OR toplevel:true'; | |
| 284 | + $params['filterquery'][$key]['query'] = $value['query'] . ' OR toplevel:true'; | |
| 285 | 285 | |
| 286 | 286 | } | 
| 287 | 287 | |
| 288 | 288 | } | 
| 289 | 289 | |
| 290 | 290 | // Add filter query to get all documents with the required uid. | 
| 291 | -                    $params['filterquery'][] = array ('query' => 'uid:'.tx_dlf_solr::escapeQuery($record['uid'])); | |
| 291 | +                    $params['filterquery'][] = array('query' => 'uid:' . tx_dlf_solr::escapeQuery($record['uid'])); | |
| 292 | 292 | |
| 293 | 293 | // Add sorting | 
| 294 | 294 | $params['sort'] = $this->metadata['options']['params']['sort']; | 
| 295 | 295 | |
| 296 | 296 | // Set query | 
| 297 | - $params['query'] = $this->metadata['options']['select'].' OR toplevel:true'; | |
| 297 | + $params['query'] = $this->metadata['options']['select'] . ' OR toplevel:true'; | |
| 298 | 298 | |
| 299 | 299 | // Perform search for all documents with the same uid that either fit to the search or marked as toplevel. | 
| 300 | 300 | $selectQuery = $this->solr->service->createSelect($params); | 
| @@ -311,13 +311,13 @@ discard block | ||
| 311 | 311 |                      foreach ($result as $resArray) { | 
| 312 | 312 | |
| 313 | 313 | // Prepare document's metadata. | 
| 314 | - $metadata = array (); | |
| 314 | + $metadata = array(); | |
| 315 | 315 | |
| 316 | 316 |                          foreach ($this->solrConfig as $index_name => $solr_name) { | 
| 317 | 317 | |
| 318 | 318 |                              if (!empty($resArray->$solr_name)) { | 
| 319 | 319 | |
| 320 | - $metadata[$index_name] = (is_array($resArray->$solr_name) ? $resArray->$solr_name : array ($resArray->$solr_name)); | |
| 320 | + $metadata[$index_name] = (is_array($resArray->$solr_name) ? $resArray->$solr_name : array($resArray->$solr_name)); | |
| 321 | 321 | |
| 322 | 322 | } | 
| 323 | 323 | |
| @@ -335,7 +335,7 @@ discard block | ||
| 335 | 335 | $highlightedDoc = !empty($highlighting) ? $highlighting->getResult($resArray->id) : NULL; | 
| 336 | 336 |                              $highlight = !empty($highlightedDoc) ? $highlightedDoc->getField('fulltext')[0] : ''; | 
| 337 | 337 | |
| 338 | - $record['subparts'][$resArray->id] = array ( | |
| 338 | + $record['subparts'][$resArray->id] = array( | |
| 339 | 339 | 'uid' => $resArray->uid, | 
| 340 | 340 | 'page' => $resArray->page, | 
| 341 | 341 | 'preview' => $highlight, | 
| @@ -410,7 +410,7 @@ discard block | ||
| 410 | 410 | |
| 411 | 411 |              if (TYPO3_DLOG) { | 
| 412 | 412 | |
| 413 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->move('.$_position.', '.$_steps.')] Invalid position "'.$position.'" for element moving', $this->extKey, SYSLOG_SEVERITY_WARNING); | |
| 413 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->move(' . $_position . ', ' . $_steps . ')] Invalid position "' . $position . '" for element moving', $this->extKey, SYSLOG_SEVERITY_WARNING); | |
| 414 | 414 | |
| 415 | 415 | } | 
| 416 | 416 | |
| @@ -425,7 +425,7 @@ discard block | ||
| 425 | 425 | |
| 426 | 426 |              if (TYPO3_DLOG) { | 
| 427 | 427 | |
| 428 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->move('.$_position.', '.$_steps.')] Invalid steps "'.$steps.'" for moving element at position "'.$position.'"', $this->extKey, SYSLOG_SEVERITY_WARNING); | |
| 428 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->move(' . $_position . ', ' . $_steps . ')] Invalid steps "' . $steps . '" for moving element at position "' . $position . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); | |
| 429 | 429 | |
| 430 | 430 | } | 
| 431 | 431 | |
| @@ -435,7 +435,7 @@ discard block | ||
| 435 | 435 | |
| 436 | 436 | $element = $this->remove($position); | 
| 437 | 437 | |
| 438 | - $this->add(array ($element), $position + $steps); | |
| 438 | + $this->add(array($element), $position + $steps); | |
| 439 | 439 | |
| 440 | 440 | } | 
| 441 | 441 | |
| @@ -519,7 +519,7 @@ discard block | ||
| 519 | 519 | |
| 520 | 520 |              if (TYPO3_DLOG) { | 
| 521 | 521 | |
| 522 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->offsetGet('.$offset.')] Invalid offset "'.$offset.'" for list element', $this->extKey, SYSLOG_SEVERITY_NOTICE); | |
| 522 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->offsetGet(' . $offset . ')] Invalid offset "' . $offset . '" for list element', $this->extKey, SYSLOG_SEVERITY_NOTICE); | |
| 523 | 523 | |
| 524 | 524 | } | 
| 525 | 525 | |
| @@ -579,7 +579,7 @@ discard block | ||
| 579 | 579 | |
| 580 | 580 |              if (TYPO3_DLOG) { | 
| 581 | 581 | |
| 582 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->remove('.$_position.')] Invalid position "'.$position.'" for element removing', $this->extKey, SYSLOG_SEVERITY_WARNING); | |
| 582 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->remove(' . $_position . ')] Invalid position "' . $position . '" for element removing', $this->extKey, SYSLOG_SEVERITY_WARNING); | |
| 583 | 583 | |
| 584 | 584 | } | 
| 585 | 585 | |
| @@ -617,7 +617,7 @@ discard block | ||
| 617 | 617 | |
| 618 | 618 |              if (TYPO3_DLOG) { | 
| 619 | 619 | |
| 620 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->remove('.$_position.')] Invalid position "'.$position.'" for element removing', $this->extKey, SYSLOG_SEVERITY_WARNING); | |
| 620 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->remove(' . $_position . ')] Invalid position "' . $position . '" for element removing', $this->extKey, SYSLOG_SEVERITY_WARNING); | |
| 621 | 621 | } | 
| 622 | 622 | |
| 623 | 623 | return; | 
| @@ -639,11 +639,11 @@ discard block | ||
| 639 | 639 | */ | 
| 640 | 640 |      public function reset() { | 
| 641 | 641 | |
| 642 | - $this->elements = array (); | |
| 642 | + $this->elements = array(); | |
| 643 | 643 | |
| 644 | - $this->records = array (); | |
| 644 | + $this->records = array(); | |
| 645 | 645 | |
| 646 | - $this->metadata = array (); | |
| 646 | + $this->metadata = array(); | |
| 647 | 647 | |
| 648 | 648 | $this->count = 0; | 
| 649 | 649 | |
| @@ -685,7 +685,7 @@ discard block | ||
| 685 | 685 | |
| 686 | 686 |          } else { | 
| 687 | 687 | |
| 688 | - tx_dlf_helper::saveToSession(array ($this->elements, $this->metadata), get_class($this)); | |
| 688 | + tx_dlf_helper::saveToSession(array($this->elements, $this->metadata), get_class($this)); | |
| 689 | 689 | |
| 690 | 690 | } | 
| 691 | 691 | |
| @@ -710,7 +710,7 @@ discard block | ||
| 710 | 710 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 711 | 711 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.index_tokenized AS index_tokenized,tx_dlf_metadata.index_indexed AS index_indexed', | 
| 712 | 712 | 'tx_dlf_metadata', | 
| 713 | -                        'tx_dlf_metadata.is_listed=1 AND tx_dlf_metadata.pid='.intval($this->metadata['options']['pid']).tx_dlf_helper::whereClause('tx_dlf_metadata'), | |
| 713 | +                        'tx_dlf_metadata.is_listed=1 AND tx_dlf_metadata.pid=' . intval($this->metadata['options']['pid']) . tx_dlf_helper::whereClause('tx_dlf_metadata'), | |
| 714 | 714 | '', | 
| 715 | 715 | 'tx_dlf_metadata.sorting ASC', | 
| 716 | 716 | '' | 
| @@ -718,7 +718,7 @@ discard block | ||
| 718 | 718 | |
| 719 | 719 |                  while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { | 
| 720 | 720 | |
| 721 | - $this->solrConfig[$resArray['index_name']] = $resArray['index_name'].'_'.($resArray['index_tokenized'] ? 't' : 'u').'s'.($resArray['index_indexed'] ? 'i' : 'u'); | |
| 721 | + $this->solrConfig[$resArray['index_name']] = $resArray['index_name'] . '_' . ($resArray['index_tokenized'] ? 't' : 'u') . 's' . ($resArray['index_indexed'] ? 'i' : 'u'); | |
| 722 | 722 | |
| 723 | 723 | } | 
| 724 | 724 | |
| @@ -749,16 +749,16 @@ discard block | ||
| 749 | 749 | */ | 
| 750 | 750 |      public function sort($by, $asc = TRUE) { | 
| 751 | 751 | |
| 752 | - $newOrder = array (); | |
| 752 | + $newOrder = array(); | |
| 753 | 753 | |
| 754 | - $nonSortable = array (); | |
| 754 | + $nonSortable = array(); | |
| 755 | 755 | |
| 756 | 756 |          foreach ($this->elements as $num => $element) { | 
| 757 | 757 | |
| 758 | 758 | // Is this element sortable? | 
| 759 | 759 |              if (!empty($element['s'][$by])) { | 
| 760 | 760 | |
| 761 | - $newOrder[$element['s'][$by].str_pad($num, 6, '0', STR_PAD_LEFT)] = $element; | |
| 761 | + $newOrder[$element['s'][$by] . str_pad($num, 6, '0', STR_PAD_LEFT)] = $element; | |
| 762 | 762 | |
| 763 | 763 |              } else { | 
| 764 | 764 | |
| @@ -791,7 +791,7 @@ discard block | ||
| 791 | 791 | |
| 792 | 792 |              if (TYPO3_DLOG) { | 
| 793 | 793 | |
| 794 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->sort('.$by.', ['.($asc ? 'TRUE' : 'FALSE').'])] Sorted list elements do not match unsorted elements', $this->extKey, SYSLOG_SEVERITY_ERROR); | |
| 794 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->sort(' . $by . ', [' . ($asc ? 'TRUE' : 'FALSE') . '])] Sorted list elements do not match unsorted elements', $this->extKey, SYSLOG_SEVERITY_ERROR); | |
| 795 | 795 | |
| 796 | 796 | } | 
| 797 | 797 | |
| @@ -856,7 +856,7 @@ discard block | ||
| 856 | 856 | * | 
| 857 | 857 | * @return void | 
| 858 | 858 | */ | 
| 859 | -    protected function _setMetadata(array $metadata = array ()) { | |
| 859 | +    protected function _setMetadata(array $metadata = array()) { | |
| 860 | 860 | |
| 861 | 861 | $this->metadata = $metadata; | 
| 862 | 862 | |
| @@ -872,7 +872,7 @@ discard block | ||
| 872 | 872 | * | 
| 873 | 873 | * @return void | 
| 874 | 874 | */ | 
| 875 | -    public function __construct(array $elements = array (), array $metadata = array ()) { | |
| 875 | +    public function __construct(array $elements = array(), array $metadata = array()) { | |
| 876 | 876 | |
| 877 | 877 |          if (empty($elements) && empty($metadata)) { | 
| 878 | 878 | |
| @@ -931,13 +931,13 @@ discard block | ||
| 931 | 931 | */ | 
| 932 | 932 |      public function __get($var) { | 
| 933 | 933 | |
| 934 | - $method = '_get'.ucfirst($var); | |
| 934 | + $method = '_get' . ucfirst($var); | |
| 935 | 935 | |
| 936 | 936 |          if (!property_exists($this, $var) || !method_exists($this, $method)) { | 
| 937 | 937 | |
| 938 | 938 |              if (TYPO3_DLOG) { | 
| 939 | 939 | |
| 940 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->__get('.$var.')] There is no getter function for property "'.$var.'"', $this->extKey, SYSLOG_SEVERITY_WARNING); | |
| 940 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->__get(' . $var . ')] There is no getter function for property "' . $var . '"', $this->extKey, SYSLOG_SEVERITY_WARNING); | |
| 941 | 941 | |
| 942 | 942 | } | 
| 943 | 943 | |
| @@ -963,13 +963,13 @@ discard block | ||
| 963 | 963 | */ | 
| 964 | 964 |      public function __set($var, $value) { | 
| 965 | 965 | |
| 966 | - $method = '_set'.ucfirst($var); | |
| 966 | + $method = '_set' . ucfirst($var); | |
| 967 | 967 | |
| 968 | 968 |          if (!property_exists($this, $var) || !method_exists($this, $method)) { | 
| 969 | 969 | |
| 970 | 970 |              if (TYPO3_DLOG) { | 
| 971 | 971 | |
| 972 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->__set('.$var.', [data])] There is no setter function for property "'.$var.'"', $this->extKey, SYSLOG_SEVERITY_WARNING, $value); | |
| 972 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_list->__set(' . $var . ', [data])] There is no setter function for property "' . $var . '"', $this->extKey, SYSLOG_SEVERITY_WARNING, $value); | |
| 973 | 973 | |
| 974 | 974 | } | 
| 975 | 975 | |
| @@ -991,7 +991,7 @@ discard block | ||
| 991 | 991 | */ | 
| 992 | 992 |      public function __sleep() { | 
| 993 | 993 | |
| 994 | -        return array ('elements', 'metadata'); | |
| 994 | +        return array('elements', 'metadata'); | |
| 995 | 995 | |
| 996 | 996 | } | 
| 997 | 997 | |
| @@ -57,7 +57,7 @@ discard block | ||
| 57 | 57 | |
| 58 | 58 |                  } elseif (($nameParts = $authors[$i]->xpath('./mods:namePart'))) { | 
| 59 | 59 | |
| 60 | - $name = array (); | |
| 60 | + $name = array(); | |
| 61 | 61 | |
| 62 | 62 | $k = 4; | 
| 63 | 63 | |
| @@ -97,7 +97,7 @@ discard block | ||
| 97 | 97 | |
| 98 | 98 | // Append "valueURI" to name using Unicode unit separator. | 
| 99 | 99 |                  if (isset($authors[$i]['valueURI'])) { | 
| 100 | - $metadata['author'][$i] .= chr(31).(string) $authors[$i]['valueURI']; | |
| 100 | + $metadata['author'][$i] .= chr(31) . (string) $authors[$i]['valueURI']; | |
| 101 | 101 | } | 
| 102 | 102 | |
| 103 | 103 | } | 
| @@ -43,7 +43,7 @@ discard block | ||
| 43 | 43 | * @var array | 
| 44 | 44 | * @access protected | 
| 45 | 45 | */ | 
| 46 | - protected $dmdSec = array (); | |
| 46 | + protected $dmdSec = array(); | |
| 47 | 47 | |
| 48 | 48 | /** | 
| 49 | 49 | * Are the METS file's dmdSecs loaded? | 
| @@ -69,7 +69,7 @@ discard block | ||
| 69 | 69 | * @var array | 
| 70 | 70 | * @access protected | 
| 71 | 71 | */ | 
| 72 | - protected $fileGrps = array (); | |
| 72 | + protected $fileGrps = array(); | |
| 73 | 73 | |
| 74 | 74 | /** | 
| 75 | 75 | * Are the file groups loaded? | 
| @@ -87,16 +87,16 @@ discard block | ||
| 87 | 87 | * @var array | 
| 88 | 88 | * @access protected | 
| 89 | 89 | */ | 
| 90 | - protected $formats = array ( | |
| 91 | - 'OAI' => array ( | |
| 90 | + protected $formats = array( | |
| 91 | + 'OAI' => array( | |
| 92 | 92 | 'rootElement' => 'OAI-PMH', | 
| 93 | 93 | 'namespaceURI' => 'http://www.openarchives.org/OAI/2.0/', | 
| 94 | 94 | ), | 
| 95 | - 'METS' => array ( | |
| 95 | + 'METS' => array( | |
| 96 | 96 | 'rootElement' => 'mets', | 
| 97 | 97 | 'namespaceURI' => 'http://www.loc.gov/METS/', | 
| 98 | 98 | ), | 
| 99 | - 'XLINK' => array ( | |
| 99 | + 'XLINK' => array( | |
| 100 | 100 | 'rootElement' => 'xlink', | 
| 101 | 101 | 'namespaceURI' => 'http://www.w3.org/1999/xlink', | 
| 102 | 102 | ) | 
| @@ -125,7 +125,7 @@ discard block | ||
| 125 | 125 | * @var array | 
| 126 | 126 | * @access protected | 
| 127 | 127 | */ | 
| 128 | -    protected $lastSearchedPhysicalPage = array ('logicalPage' => NULL, 'physicalPage' => NULL); | |
| 128 | +    protected $lastSearchedPhysicalPage = array('logicalPage' => NULL, 'physicalPage' => NULL); | |
| 129 | 129 | |
| 130 | 130 | /** | 
| 131 | 131 | * This holds the documents location | 
| @@ -141,7 +141,7 @@ discard block | ||
| 141 | 141 | * @var array | 
| 142 | 142 | * @access protected | 
| 143 | 143 | */ | 
| 144 | - protected $logicalUnits = array (); | |
| 144 | + protected $logicalUnits = array(); | |
| 145 | 145 | |
| 146 | 146 | /** | 
| 147 | 147 | * This holds the documents' parsed metadata array with their corresponding structMap//div's ID as array key | 
| @@ -149,7 +149,7 @@ discard block | ||
| 149 | 149 | * @var array | 
| 150 | 150 | * @access protected | 
| 151 | 151 | */ | 
| 152 | - protected $metadataArray = array (); | |
| 152 | + protected $metadataArray = array(); | |
| 153 | 153 | |
| 154 | 154 | /** | 
| 155 | 155 | * Is the metadata array loaded? | 
| @@ -190,7 +190,7 @@ discard block | ||
| 190 | 190 | * @var array | 
| 191 | 191 | * @access protected | 
| 192 | 192 | */ | 
| 193 | - protected $physicalStructure = array (); | |
| 193 | + protected $physicalStructure = array(); | |
| 194 | 194 | |
| 195 | 195 | /** | 
| 196 | 196 | * This holds the physical structure metadata | 
| @@ -198,7 +198,7 @@ discard block | ||
| 198 | 198 | * @var array | 
| 199 | 199 | * @access protected | 
| 200 | 200 | */ | 
| 201 | - protected $physicalStructureInfo = array (); | |
| 201 | + protected $physicalStructureInfo = array(); | |
| 202 | 202 | |
| 203 | 203 | /** | 
| 204 | 204 | * Is the physical structure loaded? | 
| @@ -223,7 +223,7 @@ discard block | ||
| 223 | 223 | * @var array | 
| 224 | 224 | * @access protected | 
| 225 | 225 | */ | 
| 226 | - protected $rawTextArray = array (); | |
| 226 | + protected $rawTextArray = array(); | |
| 227 | 227 | |
| 228 | 228 | /** | 
| 229 | 229 | * Is the document instantiated successfully? | 
| @@ -247,7 +247,7 @@ discard block | ||
| 247 | 247 | * @var array (tx_dlf_document) | 
| 248 | 248 | * @access protected | 
| 249 | 249 | */ | 
| 250 | - protected static $registry = array (); | |
| 250 | + protected static $registry = array(); | |
| 251 | 251 | |
| 252 | 252 | /** | 
| 253 | 253 | * This holds the UID of the root document or zero if not multi-volumed | 
| @@ -272,7 +272,7 @@ discard block | ||
| 272 | 272 | * @var array | 
| 273 | 273 | * @access protected | 
| 274 | 274 | */ | 
| 275 | -    protected $smLinks = array ('l2p' => array (), 'p2l' => array ()); | |
| 275 | +    protected $smLinks = array('l2p' => array(), 'p2l' => array()); | |
| 276 | 276 | |
| 277 | 277 | /** | 
| 278 | 278 | * Are the smLinks loaded? | 
| @@ -289,7 +289,7 @@ discard block | ||
| 289 | 289 | * @var array | 
| 290 | 290 | * @access protected | 
| 291 | 291 | */ | 
| 292 | - protected $tableOfContents = array (); | |
| 292 | + protected $tableOfContents = array(); | |
| 293 | 293 | |
| 294 | 294 | /** | 
| 295 | 295 | * Is the table of contents loaded? | 
| @@ -373,7 +373,7 @@ discard block | ||
| 373 | 373 |      public static function clearRegistry() { | 
| 374 | 374 | |
| 375 | 375 | // Reset registry array. | 
| 376 | - self::$registry = array (); | |
| 376 | + self::$registry = array(); | |
| 377 | 377 | |
| 378 | 378 | } | 
| 379 | 379 | |
| @@ -388,7 +388,7 @@ discard block | ||
| 388 | 388 | */ | 
| 389 | 389 |      public function getFileLocation($id) { | 
| 390 | 390 | |
| 391 | -        if (!empty($id) && ($location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/mets:FLocat[@LOCTYPE="URL"]'))) { | |
| 391 | +        if (!empty($id) && ($location = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/mets:FLocat[@LOCTYPE="URL"]'))) { | |
| 392 | 392 | |
| 393 | 393 |              return (string) $location[0]->attributes('http://www.w3.org/1999/xlink')->href; | 
| 394 | 394 | |
| @@ -396,7 +396,7 @@ discard block | ||
| 396 | 396 | |
| 397 | 397 |              if (TYPO3_DLOG) { | 
| 398 | 398 | |
| 399 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getFileLocation('.$id.')] There is no file node with @ID "'.$id.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 399 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getFileLocation(' . $id . ')] There is no file node with @ID "' . $id . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 400 | 400 | |
| 401 | 401 | } | 
| 402 | 402 | |
| @@ -417,7 +417,7 @@ discard block | ||
| 417 | 417 | */ | 
| 418 | 418 |      public function getFileMimeType($id) { | 
| 419 | 419 | |
| 420 | -        if (!empty($id) && ($mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="'.$id.'"]/@MIMETYPE'))) { | |
| 420 | +        if (!empty($id) && ($mimetype = $this->mets->xpath('./mets:fileSec/mets:fileGrp/mets:file[@ID="' . $id . '"]/@MIMETYPE'))) { | |
| 421 | 421 | |
| 422 | 422 | return (string) $mimetype[0]; | 
| 423 | 423 | |
| @@ -425,7 +425,7 @@ discard block | ||
| 425 | 425 | |
| 426 | 426 |              if (TYPO3_DLOG) { | 
| 427 | 427 | |
| 428 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getFileMimeType('.$id.')] There is no file node with @ID "'.$id.'" or no MIME type specified', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 428 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getFileMimeType(' . $id . ')] There is no file node with @ID "' . $id . '" or no MIME type specified', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 429 | 429 | |
| 430 | 430 | } | 
| 431 | 431 | |
| @@ -531,7 +531,7 @@ discard block | ||
| 531 | 531 | */ | 
| 532 | 532 |      public function getLogicalStructure($id, $recursive = FALSE) { | 
| 533 | 533 | |
| 534 | - $details = array (); | |
| 534 | + $details = array(); | |
| 535 | 535 | |
| 536 | 536 | // Is the requested logical unit already loaded? | 
| 537 | 537 |          if (!$recursive && !empty($this->logicalUnits[$id])) { | 
| @@ -542,7 +542,7 @@ discard block | ||
| 542 | 542 |          } elseif (!empty($id)) { | 
| 543 | 543 | |
| 544 | 544 | // Get specified logical unit. | 
| 545 | -            $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]'); | |
| 545 | +            $divs = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]'); | |
| 546 | 546 | |
| 547 | 547 |          } else { | 
| 548 | 548 | |
| @@ -598,7 +598,7 @@ discard block | ||
| 598 | 598 | $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][self::$extKey]); | 
| 599 | 599 | |
| 600 | 600 | // Extract identity information. | 
| 601 | - $details = array (); | |
| 601 | + $details = array(); | |
| 602 | 602 | |
| 603 | 603 | $details['id'] = $attributes['ID']; | 
| 604 | 604 | |
| @@ -677,7 +677,7 @@ discard block | ||
| 677 | 677 | } | 
| 678 | 678 | |
| 679 | 679 | // Get the files this structure element is pointing at. | 
| 680 | - $details['files'] = array (); | |
| 680 | + $details['files'] = array(); | |
| 681 | 681 | |
| 682 | 682 | $fileUse = $this->_getFileGrps(); | 
| 683 | 683 | |
| @@ -699,7 +699,7 @@ discard block | ||
| 699 | 699 | // Walk the structure recursively? And are there any children of the current element? | 
| 700 | 700 |          if ($recursive && count($structure->children('http://www.loc.gov/METS/')->div)) { | 
| 701 | 701 | |
| 702 | - $details['children'] = array (); | |
| 702 | + $details['children'] = array(); | |
| 703 | 703 | |
| 704 | 704 |              foreach ($structure->children('http://www.loc.gov/METS/')->div as $child) { | 
| 705 | 705 | |
| @@ -743,11 +743,11 @@ discard block | ||
| 743 | 743 | |
| 744 | 744 |              if (TYPO3_DLOG) { | 
| 745 | 745 | |
| 746 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata('.$id.', '.$_cPid.')] Invalid PID "'.$cPid.'" for metadata definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 746 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata(' . $id . ', ' . $_cPid . ')] Invalid PID "' . $cPid . '" for metadata definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 747 | 747 | |
| 748 | 748 | } | 
| 749 | 749 | |
| 750 | - return array (); | |
| 750 | + return array(); | |
| 751 | 751 | |
| 752 | 752 | } | 
| 753 | 753 | |
| @@ -759,25 +759,25 @@ discard block | ||
| 759 | 759 | } | 
| 760 | 760 | |
| 761 | 761 | // Initialize metadata array with empty values. | 
| 762 | - $metadata = array ( | |
| 763 | - 'title' => array (), | |
| 764 | - 'title_sorting' => array (), | |
| 765 | - 'author' => array (), | |
| 766 | - 'place' => array (), | |
| 767 | - 'year' => array (), | |
| 768 | - 'prod_id' => array (), | |
| 769 | - 'record_id' => array (), | |
| 770 | - 'opac_id' => array (), | |
| 771 | - 'union_id' => array (), | |
| 772 | - 'urn' => array (), | |
| 773 | - 'purl' => array (), | |
| 774 | - 'type' => array (), | |
| 775 | - 'volume' => array (), | |
| 776 | - 'volume_sorting' => array (), | |
| 777 | - 'collection' => array (), | |
| 778 | - 'owner' => array (), | |
| 779 | - 'mets_label' => array (), | |
| 780 | - 'mets_orderlabel' => array (), | |
| 762 | + $metadata = array( | |
| 763 | + 'title' => array(), | |
| 764 | + 'title_sorting' => array(), | |
| 765 | + 'author' => array(), | |
| 766 | + 'place' => array(), | |
| 767 | + 'year' => array(), | |
| 768 | + 'prod_id' => array(), | |
| 769 | + 'record_id' => array(), | |
| 770 | + 'opac_id' => array(), | |
| 771 | + 'union_id' => array(), | |
| 772 | + 'urn' => array(), | |
| 773 | + 'purl' => array(), | |
| 774 | + 'type' => array(), | |
| 775 | + 'volume' => array(), | |
| 776 | + 'volume_sorting' => array(), | |
| 777 | + 'collection' => array(), | |
| 778 | + 'owner' => array(), | |
| 779 | + 'mets_label' => array(), | |
| 780 | + 'mets_orderlabel' => array(), | |
| 781 | 781 | ); | 
| 782 | 782 | |
| 783 | 783 | // Get the logical structure node's DMDID. | 
| @@ -787,7 +787,7 @@ discard block | ||
| 787 | 787 | |
| 788 | 788 |          } else { | 
| 789 | 789 | |
| 790 | -            $dmdId = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@DMDID'); | |
| 790 | +            $dmdId = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@DMDID'); | |
| 791 | 791 | |
| 792 | 792 | $dmdId = (string) $dmdId[0]; | 
| 793 | 793 | |
| @@ -816,7 +816,7 @@ discard block | ||
| 816 | 816 | |
| 817 | 817 |                          if (TYPO3_DLOG) { | 
| 818 | 818 | |
| 819 | -                            \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata('.$id.', '.$_cPid.')] Invalid class/method "'.$class.'->extractMetadata()" for metadata format "'.$this->dmdSec[$dmdId]['type'].'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 819 | +                            \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata(' . $id . ', ' . $_cPid . ')] Invalid class/method "' . $class . '->extractMetadata()" for metadata format "' . $this->dmdSec[$dmdId]['type'] . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 820 | 820 | |
| 821 | 821 | } | 
| 822 | 822 | |
| @@ -828,24 +828,24 @@ discard block | ||
| 828 | 828 | |
| 829 | 829 |                  if (TYPO3_DLOG) { | 
| 830 | 830 | |
| 831 | -                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata('.$id.', '.$_cPid.')] Unsupported metadata format "'.$this->dmdSec[$dmdId]['type'].'" in dmdSec with @ID "'.$dmdId.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 831 | +                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadata(' . $id . ', ' . $_cPid . ')] Unsupported metadata format "' . $this->dmdSec[$dmdId]['type'] . '" in dmdSec with @ID "' . $dmdId . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 832 | 832 | |
| 833 | 833 | } | 
| 834 | 834 | |
| 835 | - return array (); | |
| 835 | + return array(); | |
| 836 | 836 | |
| 837 | 837 | } | 
| 838 | 838 | |
| 839 | 839 | // Get the structure's type. | 
| 840 | 840 |              if (!empty($this->logicalUnits[$id])) { | 
| 841 | 841 | |
| 842 | - $metadata['type'] = array ($this->logicalUnits[$id]['type']); | |
| 842 | + $metadata['type'] = array($this->logicalUnits[$id]['type']); | |
| 843 | 843 | |
| 844 | 844 |              } else { | 
| 845 | 845 | |
| 846 | -                $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$id.'"]/@TYPE'); | |
| 846 | +                $struct = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $id . '"]/@TYPE'); | |
| 847 | 847 | |
| 848 | - $metadata['type'] = array ((string) $struct[0]); | |
| 848 | + $metadata['type'] = array((string) $struct[0]); | |
| 849 | 849 | |
| 850 | 850 | } | 
| 851 | 851 | |
| @@ -853,7 +853,7 @@ discard block | ||
| 853 | 853 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 854 | 854 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadataformat.xpath AS xpath,tx_dlf_metadataformat.xpath_sorting AS xpath_sorting,tx_dlf_metadata.is_sortable AS is_sortable,tx_dlf_metadata.default_value AS default_value,tx_dlf_metadata.format AS format', | 
| 855 | 855 | 'tx_dlf_metadata,tx_dlf_metadataformat,tx_dlf_formats', | 
| 856 | -                'tx_dlf_metadata.pid='.$cPid.' AND tx_dlf_metadataformat.pid='.$cPid.' AND ((tx_dlf_metadata.uid=tx_dlf_metadataformat.parent_id AND tx_dlf_metadataformat.encoded=tx_dlf_formats.uid AND tx_dlf_formats.type='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->dmdSec[$dmdId]['type'], 'tx_dlf_formats').') OR tx_dlf_metadata.format=0)'.tx_dlf_helper::whereClause('tx_dlf_metadata', TRUE).tx_dlf_helper::whereClause('tx_dlf_metadataformat').tx_dlf_helper::whereClause('tx_dlf_formats'), | |
| 856 | +                'tx_dlf_metadata.pid=' . $cPid . ' AND tx_dlf_metadataformat.pid=' . $cPid . ' AND ((tx_dlf_metadata.uid=tx_dlf_metadataformat.parent_id AND tx_dlf_metadataformat.encoded=tx_dlf_formats.uid AND tx_dlf_formats.type=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->dmdSec[$dmdId]['type'], 'tx_dlf_formats') . ') OR tx_dlf_metadata.format=0)' . tx_dlf_helper::whereClause('tx_dlf_metadata', TRUE) . tx_dlf_helper::whereClause('tx_dlf_metadataformat') . tx_dlf_helper::whereClause('tx_dlf_formats'), | |
| 857 | 857 | '', | 
| 858 | 858 | '', | 
| 859 | 859 | '' | 
| @@ -874,7 +874,7 @@ discard block | ||
| 874 | 874 | |
| 875 | 875 |                      if ($values instanceof DOMNodeList && $values->length > 0) { | 
| 876 | 876 | |
| 877 | - $metadata[$resArray['index_name']] = array (); | |
| 877 | + $metadata[$resArray['index_name']] = array(); | |
| 878 | 878 | |
| 879 | 879 |                          foreach ($values as $value) { | 
| 880 | 880 | |
| @@ -884,7 +884,7 @@ discard block | ||
| 884 | 884 | |
| 885 | 885 |                      } elseif (!($values instanceof DOMNodeList)) { | 
| 886 | 886 | |
| 887 | - $metadata[$resArray['index_name']] = array (trim((string) $values)); | |
| 887 | + $metadata[$resArray['index_name']] = array(trim((string) $values)); | |
| 888 | 888 | |
| 889 | 889 | } | 
| 890 | 890 | |
| @@ -896,7 +896,7 @@ discard block | ||
| 896 | 896 | // These empty fields are then shown within the search facets as 'empty'. | 
| 897 | 897 |                  if (empty($metadata[$resArray['index_name']][0]) && strlen($resArray['default_value']) > 0) { | 
| 898 | 898 | |
| 899 | - $metadata[$resArray['index_name']] = array ($resArray['default_value']); | |
| 899 | + $metadata[$resArray['index_name']] = array($resArray['default_value']); | |
| 900 | 900 | |
| 901 | 901 | } | 
| 902 | 902 | |
| @@ -907,19 +907,19 @@ discard block | ||
| 907 | 907 | |
| 908 | 908 |                          if ($values instanceof DOMNodeList && $values->length > 0) { | 
| 909 | 909 | |
| 910 | - $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values->item(0)->nodeValue); | |
| 910 | + $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values->item(0)->nodeValue); | |
| 911 | 911 | |
| 912 | 912 |                          } elseif (!($values instanceof DOMNodeList)) { | 
| 913 | 913 | |
| 914 | - $metadata[$resArray['index_name'].'_sorting'][0] = trim((string) $values); | |
| 914 | + $metadata[$resArray['index_name'] . '_sorting'][0] = trim((string) $values); | |
| 915 | 915 | |
| 916 | 916 | } | 
| 917 | 917 | |
| 918 | 918 | } | 
| 919 | 919 | |
| 920 | -                    if (empty($metadata[$resArray['index_name'].'_sorting'][0])) { | |
| 920 | +                    if (empty($metadata[$resArray['index_name'] . '_sorting'][0])) { | |
| 921 | 921 | |
| 922 | - $metadata[$resArray['index_name'].'_sorting'][0] = $metadata[$resArray['index_name']][0]; | |
| 922 | + $metadata[$resArray['index_name'] . '_sorting'][0] = $metadata[$resArray['index_name']][0]; | |
| 923 | 923 | |
| 924 | 924 | } | 
| 925 | 925 | |
| @@ -944,7 +944,7 @@ discard block | ||
| 944 | 944 | 'tx_dlf_documents', | 
| 945 | 945 | 'tx_dlf_relations', | 
| 946 | 946 | 'tx_dlf_collections', | 
| 947 | -                    'AND tx_dlf_collections.pid='.intval($cPid).' AND tx_dlf_documents.uid='.intval($this->uid).' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations').' AND tx_dlf_collections.sys_language_uid IN (-1,0)'.tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'), | |
| 947 | +                    'AND tx_dlf_collections.pid=' . intval($cPid) . ' AND tx_dlf_documents.uid=' . intval($this->uid) . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . ' AND tx_dlf_collections.sys_language_uid IN (-1,0)' . tx_dlf_helper::whereClause('tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_collections'), | |
| 948 | 948 | 'tx_dlf_collections.index_name', | 
| 949 | 949 | '', | 
| 950 | 950 | '' | 
| @@ -965,7 +965,7 @@ discard block | ||
| 965 | 965 |          } else { | 
| 966 | 966 | |
| 967 | 967 | // There is no dmdSec for this structure node. | 
| 968 | - return array (); | |
| 968 | + return array(); | |
| 969 | 969 | |
| 970 | 970 | } | 
| 971 | 971 | |
| @@ -1074,7 +1074,7 @@ discard block | ||
| 1074 | 1074 | |
| 1075 | 1075 |                  if (TYPO3_DLOG) { | 
| 1076 | 1076 | |
| 1077 | -                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText('.$id.')] Invalid structure node @ID "'.$id.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1077 | +                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText(' . $id . ')] Invalid structure node @ID "' . $id . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1078 | 1078 | |
| 1079 | 1079 | } | 
| 1080 | 1080 | |
| @@ -1100,7 +1100,7 @@ discard block | ||
| 1100 | 1100 | |
| 1101 | 1101 |                          if (TYPO3_DLOG) { | 
| 1102 | 1102 | |
| 1103 | -                            \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText('.$id.')] Invalid class/method "'.$class.'->getRawText()" for text format "'.$textFormat.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1103 | +                            \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText(' . $id . ')] Invalid class/method "' . $class . '->getRawText()" for text format "' . $textFormat . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1104 | 1104 | |
| 1105 | 1105 | } | 
| 1106 | 1106 | |
| @@ -1112,7 +1112,7 @@ discard block | ||
| 1112 | 1112 | |
| 1113 | 1113 |                  if (TYPO3_DLOG) { | 
| 1114 | 1114 | |
| 1115 | -                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText('.$id.')] Unsupported text format "'.$textFormat.'" in physical node with @ID "'.$id.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1115 | +                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getRawText(' . $id . ')] Unsupported text format "' . $textFormat . '" in physical node with @ID "' . $id . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1116 | 1116 | |
| 1117 | 1117 | } | 
| 1118 | 1118 | |
| @@ -1149,7 +1149,7 @@ discard block | ||
| 1149 | 1149 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 1150 | 1150 | 'tx_dlf_documents.title,tx_dlf_documents.partof', | 
| 1151 | 1151 | 'tx_dlf_documents', | 
| 1152 | -                'tx_dlf_documents.uid='.$uid.tx_dlf_helper::whereClause('tx_dlf_documents'), | |
| 1152 | +                'tx_dlf_documents.uid=' . $uid . tx_dlf_helper::whereClause('tx_dlf_documents'), | |
| 1153 | 1153 | '', | 
| 1154 | 1154 | '', | 
| 1155 | 1155 | '1' | 
| @@ -1171,7 +1171,7 @@ discard block | ||
| 1171 | 1171 | |
| 1172 | 1172 |                  if (TYPO3_DLOG) { | 
| 1173 | 1173 | |
| 1174 | -                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getTitle('.$_uid.', ['.($recursive ? 'TRUE' : 'FALSE').'])] No document with UID "'.$uid.'" found or document not accessible', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1174 | +                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getTitle(' . $_uid . ', [' . ($recursive ? 'TRUE' : 'FALSE') . '])] No document with UID "' . $uid . '" found or document not accessible', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1175 | 1175 | |
| 1176 | 1176 | } | 
| 1177 | 1177 | |
| @@ -1181,7 +1181,7 @@ discard block | ||
| 1181 | 1181 | |
| 1182 | 1182 |              if (TYPO3_DLOG) { | 
| 1183 | 1183 | |
| 1184 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getTitle('.$_uid.', ['.($recursive ? 'TRUE' : 'FALSE').'])] Invalid UID "'.$uid.'" for document', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1184 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getTitle(' . $_uid . ', [' . ($recursive ? 'TRUE' : 'FALSE') . '])] Invalid UID "' . $uid . '" for document', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1185 | 1185 | |
| 1186 | 1186 | } | 
| 1187 | 1187 | |
| @@ -1247,7 +1247,7 @@ discard block | ||
| 1247 | 1247 | |
| 1248 | 1248 |              if (TYPO3_DLOG) { | 
| 1249 | 1249 | |
| 1250 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->init()] No METS part found in document with UID "'.$this->uid.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1250 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->init()] No METS part found in document with UID "' . $this->uid . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1251 | 1251 | |
| 1252 | 1252 | } | 
| 1253 | 1253 | |
| @@ -1305,7 +1305,7 @@ discard block | ||
| 1305 | 1305 | |
| 1306 | 1306 |                  if (TYPO3_DLOG) { | 
| 1307 | 1307 | |
| 1308 | -                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->load('.$location.')] Could not load XML file from "'.$location.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1308 | +                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->load(' . $location . ')] Could not load XML file from "' . $location . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1309 | 1309 | |
| 1310 | 1310 | } | 
| 1311 | 1311 | |
| @@ -1315,7 +1315,7 @@ discard block | ||
| 1315 | 1315 | |
| 1316 | 1316 |              if (TYPO3_DLOG) { | 
| 1317 | 1317 | |
| 1318 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->load('.$location.')] Invalid file location "'.$location.'" for document loading', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1318 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->load(' . $location . ')] Invalid file location "' . $location . '" for document loading', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1319 | 1319 | |
| 1320 | 1320 | } | 
| 1321 | 1321 | |
| @@ -1340,7 +1340,7 @@ discard block | ||
| 1340 | 1340 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 1341 | 1341 | 'tx_dlf_formats.type AS type,tx_dlf_formats.root AS root,tx_dlf_formats.namespace AS namespace,tx_dlf_formats.class AS class', | 
| 1342 | 1342 | 'tx_dlf_formats', | 
| 1343 | -                'tx_dlf_formats.pid=0'.tx_dlf_helper::whereClause('tx_dlf_formats'), | |
| 1343 | +                'tx_dlf_formats.pid=0' . tx_dlf_helper::whereClause('tx_dlf_formats'), | |
| 1344 | 1344 | '', | 
| 1345 | 1345 | '', | 
| 1346 | 1346 | '' | 
| @@ -1349,7 +1349,7 @@ discard block | ||
| 1349 | 1349 |              while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) { | 
| 1350 | 1350 | |
| 1351 | 1351 | // Update format registry. | 
| 1352 | - $this->formats[$resArray['type']] = array ( | |
| 1352 | + $this->formats[$resArray['type']] = array( | |
| 1353 | 1353 | 'rootElement' => $resArray['root'], | 
| 1354 | 1354 | 'namespaceURI' => $resArray['namespace'], | 
| 1355 | 1355 | 'class' => $resArray['class'] | 
| @@ -1389,7 +1389,7 @@ discard block | ||
| 1389 | 1389 | |
| 1390 | 1390 |              if (TYPO3_DLOG) { | 
| 1391 | 1391 | |
| 1392 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->registerNamespaces(['.get_class($obj).'])] Given object is neither a SimpleXMLElement nor a DOMXPath instance', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1392 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->registerNamespaces([' . get_class($obj) . '])] Given object is neither a SimpleXMLElement nor a DOMXPath instance', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1393 | 1393 | |
| 1394 | 1394 | } | 
| 1395 | 1395 | |
| @@ -1427,7 +1427,7 @@ discard block | ||
| 1427 | 1427 | |
| 1428 | 1428 |              if (TYPO3_DLOG) { | 
| 1429 | 1429 | |
| 1430 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Saving a document is only allowed in the backend', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1430 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] Saving a document is only allowed in the backend', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1431 | 1431 | |
| 1432 | 1432 | } | 
| 1433 | 1433 | |
| @@ -1451,7 +1451,7 @@ discard block | ||
| 1451 | 1451 | |
| 1452 | 1452 |              if (TYPO3_DLOG) { | 
| 1453 | 1453 | |
| 1454 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Invalid PID "'.$pid.'" for document saving', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1454 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] Invalid PID "' . $pid . '" for document saving', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1455 | 1455 | |
| 1456 | 1456 | } | 
| 1457 | 1457 | |
| @@ -1477,7 +1477,7 @@ discard block | ||
| 1477 | 1477 | |
| 1478 | 1478 |              if (TYPO3_DLOG) { | 
| 1479 | 1479 | |
| 1480 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] No record identifier found to avoid duplication', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1480 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] No record identifier found to avoid duplication', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1481 | 1481 | |
| 1482 | 1482 | } | 
| 1483 | 1483 | |
| @@ -1492,7 +1492,7 @@ discard block | ||
| 1492 | 1492 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 1493 | 1493 | 'be_users.uid AS uid', | 
| 1494 | 1494 | 'be_users', | 
| 1495 | -            'username='.$GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_users').\TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('be_users').\TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_users'), | |
| 1495 | +            'username=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('_cli_dlf', 'be_users') . \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields('be_users') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('be_users'), | |
| 1496 | 1496 | '', | 
| 1497 | 1497 | '', | 
| 1498 | 1498 | '1' | 
| @@ -1502,7 +1502,7 @@ discard block | ||
| 1502 | 1502 | |
| 1503 | 1503 |              if (TYPO3_DLOG) { | 
| 1504 | 1504 | |
| 1505 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Backend user "_cli_dlf" not found or disabled', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1505 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] Backend user "_cli_dlf" not found or disabled', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1506 | 1506 | |
| 1507 | 1507 | } | 
| 1508 | 1508 | |
| @@ -1514,7 +1514,7 @@ discard block | ||
| 1514 | 1514 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 1515 | 1515 | 'tx_dlf_structures.uid AS uid', | 
| 1516 | 1516 | 'tx_dlf_structures', | 
| 1517 | -            'tx_dlf_structures.pid='.intval($pid).' AND tx_dlf_structures.index_name='.$GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures').tx_dlf_helper::whereClause('tx_dlf_structures'), | |
| 1517 | +            'tx_dlf_structures.pid=' . intval($pid) . ' AND tx_dlf_structures.index_name=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures') . tx_dlf_helper::whereClause('tx_dlf_structures'), | |
| 1518 | 1518 | '', | 
| 1519 | 1519 | '', | 
| 1520 | 1520 | '1' | 
| @@ -1528,7 +1528,7 @@ discard block | ||
| 1528 | 1528 | |
| 1529 | 1529 |              if (TYPO3_DLOG) { | 
| 1530 | 1530 | |
| 1531 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Could not identify document/structure type '.$GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures'), self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1531 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] Could not identify document/structure type ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures'), self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1532 | 1532 | |
| 1533 | 1533 | } | 
| 1534 | 1534 | |
| @@ -1545,12 +1545,12 @@ discard block | ||
| 1545 | 1545 | } | 
| 1546 | 1546 | |
| 1547 | 1547 | // Get UIDs for collections. | 
| 1548 | - $collections = array (); | |
| 1548 | + $collections = array(); | |
| 1549 | 1549 | |
| 1550 | 1550 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 1551 | 1551 | 'tx_dlf_collections.index_name AS index_name,tx_dlf_collections.uid AS uid', | 
| 1552 | 1552 | 'tx_dlf_collections', | 
| 1553 | -            'tx_dlf_collections.pid='.intval($pid).' AND tx_dlf_collections.sys_language_uid IN (-1,0)'.tx_dlf_helper::whereClause('tx_dlf_collections'), | |
| 1553 | +            'tx_dlf_collections.pid=' . intval($pid) . ' AND tx_dlf_collections.sys_language_uid IN (-1,0)' . tx_dlf_helper::whereClause('tx_dlf_collections'), | |
| 1554 | 1554 | '', | 
| 1555 | 1555 | '', | 
| 1556 | 1556 | '' | 
| @@ -1574,7 +1574,7 @@ discard block | ||
| 1574 | 1574 | // Insert new collection. | 
| 1575 | 1575 |                  $collNewUid = uniqid('NEW'); | 
| 1576 | 1576 | |
| 1577 | - $collData['tx_dlf_collections'][$collNewUid] = array ( | |
| 1577 | + $collData['tx_dlf_collections'][$collNewUid] = array( | |
| 1578 | 1578 | 'pid' => $pid, | 
| 1579 | 1579 | 'label' => $collection, | 
| 1580 | 1580 | 'index_name' => $collection, | 
| @@ -1619,7 +1619,7 @@ discard block | ||
| 1619 | 1619 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 1620 | 1620 | 'tx_dlf_libraries.uid AS uid', | 
| 1621 | 1621 | 'tx_dlf_libraries', | 
| 1622 | -            'tx_dlf_libraries.pid='.intval($pid).' AND tx_dlf_libraries.index_name='.$GLOBALS['TYPO3_DB']->fullQuoteStr($owner, 'tx_dlf_libraries').tx_dlf_helper::whereClause('tx_dlf_libraries'), | |
| 1622 | +            'tx_dlf_libraries.pid=' . intval($pid) . ' AND tx_dlf_libraries.index_name=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($owner, 'tx_dlf_libraries') . tx_dlf_helper::whereClause('tx_dlf_libraries'), | |
| 1623 | 1623 | '', | 
| 1624 | 1624 | '', | 
| 1625 | 1625 | '1' | 
| @@ -1634,7 +1634,7 @@ discard block | ||
| 1634 | 1634 | // Insert new library. | 
| 1635 | 1635 |              $libNewUid = uniqid('NEW'); | 
| 1636 | 1636 | |
| 1637 | - $libData['tx_dlf_libraries'][$libNewUid] = array ( | |
| 1637 | + $libData['tx_dlf_libraries'][$libNewUid] = array( | |
| 1638 | 1638 | 'pid' => $pid, | 
| 1639 | 1639 | 'label' => $owner, | 
| 1640 | 1640 | 'index_name' => $owner, | 
| @@ -1676,7 +1676,7 @@ discard block | ||
| 1676 | 1676 | $partof = 0; | 
| 1677 | 1677 | |
| 1678 | 1678 | // Get the closest ancestor of the current document which has a MPTR child. | 
| 1679 | -        $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="'.$this->_getToplevelId().'"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); | |
| 1679 | +        $parentMptr = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $this->_getToplevelId() . '"]/ancestor::mets:div[./mets:mptr][1]/mets:mptr'); | |
| 1680 | 1680 | |
| 1681 | 1681 |          if (!empty($parentMptr[0])) { | 
| 1682 | 1682 | |
| @@ -1738,14 +1738,14 @@ discard block | ||
| 1738 | 1738 | } | 
| 1739 | 1739 | |
| 1740 | 1740 | // Get metadata for lists and sorting. | 
| 1741 | - $listed = array (); | |
| 1741 | + $listed = array(); | |
| 1742 | 1742 | |
| 1743 | - $sortable = array (); | |
| 1743 | + $sortable = array(); | |
| 1744 | 1744 | |
| 1745 | 1745 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 1746 | 1746 | 'tx_dlf_metadata.index_name AS index_name,tx_dlf_metadata.is_listed AS is_listed,tx_dlf_metadata.is_sortable AS is_sortable', | 
| 1747 | 1747 | 'tx_dlf_metadata', | 
| 1748 | -            '(tx_dlf_metadata.is_listed=1 OR tx_dlf_metadata.is_sortable=1) AND tx_dlf_metadata.pid='.intval($pid).tx_dlf_helper::whereClause('tx_dlf_metadata'), | |
| 1748 | +            '(tx_dlf_metadata.is_listed=1 OR tx_dlf_metadata.is_sortable=1) AND tx_dlf_metadata.pid=' . intval($pid) . tx_dlf_helper::whereClause('tx_dlf_metadata'), | |
| 1749 | 1749 | '', | 
| 1750 | 1750 | '', | 
| 1751 | 1751 | '' | 
| @@ -1772,7 +1772,7 @@ discard block | ||
| 1772 | 1772 | } | 
| 1773 | 1773 | |
| 1774 | 1774 | // Fill data array. | 
| 1775 | - $data['tx_dlf_documents'][$this->uid] = array ( | |
| 1775 | + $data['tx_dlf_documents'][$this->uid] = array( | |
| 1776 | 1776 | 'pid' => $pid, | 
| 1777 | 1777 | $GLOBALS['TCA']['tx_dlf_documents']['ctrl']['enablecolumns']['starttime'] => 0, | 
| 1778 | 1778 | $GLOBALS['TCA']['tx_dlf_documents']['ctrl']['enablecolumns']['endtime'] => 0, | 
| @@ -1847,7 +1847,7 @@ discard block | ||
| 1847 | 1847 | |
| 1848 | 1848 |              if (TYPO3_DLOG) { | 
| 1849 | 1849 | |
| 1850 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save('.$_pid.', '.$_core.')] Invalid UID "'.$core.'" for Solr core', self::$extKey, SYSLOG_SEVERITY_NOTICE); | |
| 1850 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->save(' . $_pid . ', ' . $_core . ')] Invalid UID "' . $core . '" for Solr core', self::$extKey, SYSLOG_SEVERITY_NOTICE); | |
| 1851 | 1851 | |
| 1852 | 1852 | } | 
| 1853 | 1853 | |
| @@ -1889,23 +1889,23 @@ discard block | ||
| 1889 | 1889 | |
| 1890 | 1890 |              foreach ($dmdIds as $dmdId) { | 
| 1891 | 1891 | |
| 1892 | -                if ($type = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[not(@MDTYPE="OTHER")]/@MDTYPE')) { | |
| 1892 | +                if ($type = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[not(@MDTYPE="OTHER")]/@MDTYPE')) { | |
| 1893 | 1893 | |
| 1894 | 1894 |                      if (!empty($this->formats[(string) $type[0]])) { | 
| 1895 | 1895 | |
| 1896 | 1896 | $type = (string) $type[0]; | 
| 1897 | 1897 | |
| 1898 | -                        $xml = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']); | |
| 1898 | +                        $xml = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']); | |
| 1899 | 1899 | |
| 1900 | 1900 | } | 
| 1901 | 1901 | |
| 1902 | -                } elseif ($type = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="OTHER"]/@OTHERMDTYPE')) { | |
| 1902 | +                } elseif ($type = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="OTHER"]/@OTHERMDTYPE')) { | |
| 1903 | 1903 | |
| 1904 | 1904 |                      if (!empty($this->formats[(string) $type[0]])) { | 
| 1905 | 1905 | |
| 1906 | 1906 | $type = (string) $type[0]; | 
| 1907 | 1907 | |
| 1908 | -                        $xml = $this->mets->xpath('./mets:dmdSec[@ID="'.(string) $dmdId.'"]/mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="'.$type.'"]/mets:xmlData/'.strtolower($type).':'.$this->formats[$type]['rootElement']); | |
| 1908 | +                        $xml = $this->mets->xpath('./mets:dmdSec[@ID="' . (string) $dmdId . '"]/mets:mdWrap[@MDTYPE="OTHER"][@OTHERMDTYPE="' . $type . '"]/mets:xmlData/' . strtolower($type) . ':' . $this->formats[$type]['rootElement']); | |
| 1909 | 1909 | |
| 1910 | 1910 | } | 
| 1911 | 1911 | |
| @@ -2053,11 +2053,11 @@ discard block | ||
| 2053 | 2053 | |
| 2054 | 2054 |              if (TYPO3_DLOG) { | 
| 2055 | 2055 | |
| 2056 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadataArray()] Invalid PID "'.$cPid.'" for metadata definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 2056 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->getMetadataArray()] Invalid PID "' . $cPid . '" for metadata definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 2057 | 2057 | |
| 2058 | 2058 | } | 
| 2059 | 2059 | |
| 2060 | - return array (); | |
| 2060 | + return array(); | |
| 2061 | 2061 | |
| 2062 | 2062 | } | 
| 2063 | 2063 | |
| @@ -2390,7 +2390,7 @@ discard block | ||
| 2390 | 2390 | |
| 2391 | 2391 |                  if (TYPO3_DLOG) { | 
| 2392 | 2392 | |
| 2393 | -                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->_getThumbnail()] Invalid PID "'.$cPid.'" for structure definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 2393 | +                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->_getThumbnail()] Invalid PID "' . $cPid . '" for structure definitions', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 2394 | 2394 | |
| 2395 | 2395 | } | 
| 2396 | 2396 | |
| @@ -2425,7 +2425,7 @@ discard block | ||
| 2425 | 2425 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 2426 | 2426 | 'tx_dlf_structures.thumbnail AS thumbnail', | 
| 2427 | 2427 | 'tx_dlf_structures', | 
| 2428 | -                'tx_dlf_structures.pid='.intval($cPid).' AND tx_dlf_structures.index_name='.$GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures').tx_dlf_helper::whereClause('tx_dlf_structures'), | |
| 2428 | +                'tx_dlf_structures.pid=' . intval($cPid) . ' AND tx_dlf_structures.index_name=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($metadata['type'][0], 'tx_dlf_structures') . tx_dlf_helper::whereClause('tx_dlf_structures'), | |
| 2429 | 2429 | '', | 
| 2430 | 2430 | '', | 
| 2431 | 2431 | '1' | 
| @@ -2441,7 +2441,7 @@ discard block | ||
| 2441 | 2441 | $strctType = tx_dlf_helper::getIndexName($resArray['thumbnail'], 'tx_dlf_structures', $cPid); | 
| 2442 | 2442 | |
| 2443 | 2443 | // Check if this document has a structure element of the desired type. | 
| 2444 | -                    $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="'.$strctType.'"]/@ID'); | |
| 2444 | +                    $strctIds = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@TYPE="' . $strctType . '"]/@ID'); | |
| 2445 | 2445 | |
| 2446 | 2446 |                      if (!empty($strctIds)) { | 
| 2447 | 2447 | |
| @@ -2467,7 +2467,7 @@ discard block | ||
| 2467 | 2467 | |
| 2468 | 2468 |              } elseif (TYPO3_DLOG) { | 
| 2469 | 2469 | |
| 2470 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->_getThumbnail()] No structure of type "'.$metadata['type'][0].'" found in database', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 2470 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->_getThumbnail()] No structure of type "' . $metadata['type'][0] . '" found in database', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 2471 | 2471 | |
| 2472 | 2472 | } | 
| 2473 | 2473 | |
| @@ -2579,7 +2579,7 @@ discard block | ||
| 2579 | 2579 | // Prepare to check database for the requested document. | 
| 2580 | 2580 |          if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($uid)) { | 
| 2581 | 2581 | |
| 2582 | -            $whereClause = 'tx_dlf_documents.uid='.intval($uid).tx_dlf_helper::whereClause('tx_dlf_documents'); | |
| 2582 | +            $whereClause = 'tx_dlf_documents.uid=' . intval($uid) . tx_dlf_helper::whereClause('tx_dlf_documents'); | |
| 2583 | 2583 | |
| 2584 | 2584 |          } else { | 
| 2585 | 2585 | |
| @@ -2632,7 +2632,7 @@ discard block | ||
| 2632 | 2632 |              if (!empty($location) && !empty($this->recordId)) { | 
| 2633 | 2633 | |
| 2634 | 2634 | // Try to match record identifier or location (both should be unique). | 
| 2635 | -                $whereClause = '(tx_dlf_documents.location='.$GLOBALS['TYPO3_DB']->fullQuoteStr($location, 'tx_dlf_documents').' OR tx_dlf_documents.record_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->recordId, 'tx_dlf_documents').')'.tx_dlf_helper::whereClause('tx_dlf_documents'); | |
| 2635 | +                $whereClause = '(tx_dlf_documents.location=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($location, 'tx_dlf_documents') . ' OR tx_dlf_documents.record_id=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->recordId, 'tx_dlf_documents') . ')' . tx_dlf_helper::whereClause('tx_dlf_documents'); | |
| 2636 | 2636 | |
| 2637 | 2637 |              } else { | 
| 2638 | 2638 | |
| @@ -2646,7 +2646,7 @@ discard block | ||
| 2646 | 2646 | // Check for PID if needed. | 
| 2647 | 2647 |          if ($pid) { | 
| 2648 | 2648 | |
| 2649 | - $whereClause .= ' AND tx_dlf_documents.pid='.intval($pid); | |
| 2649 | + $whereClause .= ' AND tx_dlf_documents.pid=' . intval($pid); | |
| 2650 | 2650 | |
| 2651 | 2651 | } | 
| 2652 | 2652 | |
| @@ -2703,7 +2703,7 @@ discard block | ||
| 2703 | 2703 | |
| 2704 | 2704 |              if (TYPO3_DLOG) { | 
| 2705 | 2705 | |
| 2706 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__construct('.$uid.', '.$pid.')] No document with UID "'.$uid.'" found or document not accessible', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 2706 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__construct(' . $uid . ', ' . $pid . ')] No document with UID "' . $uid . '" found or document not accessible', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 2707 | 2707 | |
| 2708 | 2708 | } | 
| 2709 | 2709 | |
| @@ -2722,13 +2722,13 @@ discard block | ||
| 2722 | 2722 | */ | 
| 2723 | 2723 |      public function __get($var) { | 
| 2724 | 2724 | |
| 2725 | - $method = '_get'.ucfirst($var); | |
| 2725 | + $method = '_get' . ucfirst($var); | |
| 2726 | 2726 | |
| 2727 | 2727 |          if (!property_exists($this, $var) || !method_exists($this, $method)) { | 
| 2728 | 2728 | |
| 2729 | 2729 |              if (TYPO3_DLOG) { | 
| 2730 | 2730 | |
| 2731 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__get('.$var.')] There is no getter function for property "'.$var.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 2731 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__get(' . $var . ')] There is no getter function for property "' . $var . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 2732 | 2732 | |
| 2733 | 2733 | } | 
| 2734 | 2734 | |
| @@ -2754,13 +2754,13 @@ discard block | ||
| 2754 | 2754 | */ | 
| 2755 | 2755 |      public function __set($var, $value) { | 
| 2756 | 2756 | |
| 2757 | - $method = '_set'.ucfirst($var); | |
| 2757 | + $method = '_set' . ucfirst($var); | |
| 2758 | 2758 | |
| 2759 | 2759 |          if (!property_exists($this, $var) || !method_exists($this, $method)) { | 
| 2760 | 2760 | |
| 2761 | 2761 |              if (TYPO3_DLOG) { | 
| 2762 | 2762 | |
| 2763 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__set('.$var.', '.$value.')] There is no setter function for property "'.$var.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 2763 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_document->__set(' . $var . ', ' . $value . ')] There is no setter function for property "' . $var . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 2764 | 2764 | |
| 2765 | 2765 | } | 
| 2766 | 2766 | |
| @@ -2785,7 +2785,7 @@ discard block | ||
| 2785 | 2785 | // SimpleXMLElement objects can't be serialized, thus save the XML as string for serialization | 
| 2786 | 2786 | $this->asXML = $this->xml->asXML(); | 
| 2787 | 2787 | |
| 2788 | -        return array ('uid', 'pid', 'recordId', 'parentId', 'asXML'); | |
| 2788 | +        return array('uid', 'pid', 'recordId', 'parentId', 'asXML'); | |
| 2789 | 2789 | |
| 2790 | 2790 | } | 
| 2791 | 2791 | |
| @@ -34,7 +34,7 @@ discard block | ||
| 34 | 34 | * @var array | 
| 35 | 35 | * @access protected | 
| 36 | 36 | */ | 
| 37 | - protected static $locallang = array (); | |
| 37 | + protected static $locallang = array(); | |
| 38 | 38 | |
| 39 | 39 | /** | 
| 40 | 40 | * Adds a message to the message queue. | 
| @@ -160,7 +160,7 @@ discard block | ||
| 160 | 160 | |
| 161 | 161 |                  } elseif ($checksum == 10) { | 
| 162 | 162 | |
| 163 | - return self::checkIdentifier(($digits + 1).substr($id, -2, 2), 'SWD'); | |
| 163 | + return self::checkIdentifier(($digits + 1) . substr($id, -2, 2), 'SWD'); | |
| 164 | 164 | |
| 165 | 165 |                  } elseif (substr($id, -1, 1) != $checksum) { | 
| 166 | 166 | |
| @@ -218,7 +218,7 @@ discard block | ||
| 218 | 218 | |
| 219 | 219 |              if (TYPO3_DLOG) { | 
| 220 | 220 | |
| 221 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] PHP extension "mcrypt" not available', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 221 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt(' . $encrypted . ', ' . $hash . ')] PHP extension "mcrypt" not available', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 222 | 222 | |
| 223 | 223 | } | 
| 224 | 224 | |
| @@ -230,7 +230,7 @@ discard block | ||
| 230 | 230 | |
| 231 | 231 |              if (TYPO3_DLOG) { | 
| 232 | 232 | |
| 233 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] Invalid parameters given for decryption', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 233 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt(' . $encrypted . ', ' . $hash . ')] Invalid parameters given for decryption', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 234 | 234 | |
| 235 | 235 | } | 
| 236 | 236 | |
| @@ -242,7 +242,7 @@ discard block | ||
| 242 | 242 | |
| 243 | 243 |              if (TYPO3_DLOG) { | 
| 244 | 244 | |
| 245 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] No encryption key set in TYPO3 configuration', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 245 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt(' . $encrypted . ', ' . $hash . ')] No encryption key set in TYPO3 configuration', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 246 | 246 | |
| 247 | 247 | } | 
| 248 | 248 | |
| @@ -256,13 +256,13 @@ discard block | ||
| 256 | 256 | |
| 257 | 257 | $salt = substr($hash, 0, 10); | 
| 258 | 258 | |
| 259 | - $hashed = $salt.substr(sha1($salt.$decrypted), -10); | |
| 259 | + $hashed = $salt . substr(sha1($salt . $decrypted), -10); | |
| 260 | 260 | |
| 261 | 261 |          if ($hashed !== $hash) { | 
| 262 | 262 | |
| 263 | 263 |              if (TYPO3_DLOG) { | 
| 264 | 264 | |
| 265 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt('.$encrypted.', '.$hash.')] Invalid hash "'.$hash.'" given for decryption', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 265 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->decrypt(' . $encrypted . ', ' . $hash . ')] Invalid hash "' . $hash . '" given for decryption', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 266 | 266 | |
| 267 | 267 | } | 
| 268 | 268 | |
| @@ -291,7 +291,7 @@ discard block | ||
| 291 | 291 | |
| 292 | 292 |              if (TYPO3_DLOG) { | 
| 293 | 293 | |
| 294 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->encrypt('.$string.')] PHP extension "mcrypt" not available', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 294 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->encrypt(' . $string . ')] PHP extension "mcrypt" not available', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 295 | 295 | |
| 296 | 296 | } | 
| 297 | 297 | |
| @@ -303,7 +303,7 @@ discard block | ||
| 303 | 303 | |
| 304 | 304 |              if (TYPO3_DLOG) { | 
| 305 | 305 | |
| 306 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->encrypt('.$string.')] No encryption key set in TYPO3 configuration', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 306 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->encrypt(' . $string . ')] No encryption key set in TYPO3 configuration', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 307 | 307 | |
| 308 | 308 | } | 
| 309 | 309 | |
| @@ -317,9 +317,9 @@ discard block | ||
| 317 | 317 | |
| 318 | 318 | $salt = substr(md5(uniqid(rand(), TRUE)), 0, 10); | 
| 319 | 319 | |
| 320 | - $hash = $salt.substr(sha1($salt.$string), -10); | |
| 320 | + $hash = $salt . substr(sha1($salt . $string), -10); | |
| 321 | 321 | |
| 322 | -        return array ('encrypted' => $encrypted, 'hash' => $hash); | |
| 322 | +        return array('encrypted' => $encrypted, 'hash' => $hash); | |
| 323 | 323 | |
| 324 | 324 | } | 
| 325 | 325 | |
| @@ -351,7 +351,7 @@ discard block | ||
| 351 | 351 | |
| 352 | 352 |              if (TYPO3_DLOG) { | 
| 353 | 353 | |
| 354 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getBeUser()] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 354 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getBeUser()] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 355 | 355 | |
| 356 | 356 | } | 
| 357 | 357 | |
| @@ -414,7 +414,7 @@ discard block | ||
| 414 | 414 | |
| 415 | 415 |              if (TYPO3_DLOG) { | 
| 416 | 416 | |
| 417 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getFeUser()] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 417 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getFeUser()] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 418 | 418 | |
| 419 | 419 | } | 
| 420 | 420 | |
| @@ -435,11 +435,11 @@ discard block | ||
| 435 | 435 | */ | 
| 436 | 436 |      public static function getHookObjects($scriptRelPath) { | 
| 437 | 437 | |
| 438 | - $hookObjects = array (); | |
| 438 | + $hookObjects = array(); | |
| 439 | 439 | |
| 440 | -        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'])) { | |
| 440 | +        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey . '/' . $scriptRelPath]['hookClass'])) { | |
| 441 | 441 | |
| 442 | -            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey.'/'.$scriptRelPath]['hookClass'] as $classRef) { | |
| 442 | +            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::$extKey . '/' . $scriptRelPath]['hookClass'] as $classRef) { | |
| 443 | 443 | |
| 444 | 444 | $hookObjects[] = &\TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef); | 
| 445 | 445 | |
| @@ -472,11 +472,11 @@ discard block | ||
| 472 | 472 | // Sanitize input. | 
| 473 | 473 | $uid = max(intval($uid), 0); | 
| 474 | 474 | |
| 475 | -        if (!$uid || !in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { | |
| 475 | +        if (!$uid || !in_array($table, array('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { | |
| 476 | 476 | |
| 477 | 477 |              if (TYPO3_DLOG) { | 
| 478 | 478 | |
| 479 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIndexName('.$_uid.', '.$table.', '.$_pid.')] Invalid UID "'.$uid.'" or table "'.$table.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 479 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIndexName(' . $_uid . ', ' . $table . ', ' . $_pid . ')] Invalid UID "' . $uid . '" or table "' . $table . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 480 | 480 | |
| 481 | 481 | } | 
| 482 | 482 | |
| @@ -491,15 +491,15 @@ discard block | ||
| 491 | 491 | |
| 492 | 492 | $pid = max(intval($pid), 0); | 
| 493 | 493 | |
| 494 | - $where = ' AND '.$table.'.pid='.$pid; | |
| 494 | + $where = ' AND ' . $table . '.pid=' . $pid; | |
| 495 | 495 | |
| 496 | 496 | } | 
| 497 | 497 | |
| 498 | 498 | // Get index_name from database. | 
| 499 | 499 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 500 | - $table.'.index_name AS index_name', | |
| 500 | + $table . '.index_name AS index_name', | |
| 501 | 501 | $table, | 
| 502 | - $table.'.uid='.$uid.$where.self::whereClause($table), | |
| 502 | + $table . '.uid=' . $uid . $where . self::whereClause($table), | |
| 503 | 503 | '', | 
| 504 | 504 | '', | 
| 505 | 505 | '1' | 
| @@ -515,7 +515,7 @@ discard block | ||
| 515 | 515 | |
| 516 | 516 |              if (TYPO3_DLOG) { | 
| 517 | 517 | |
| 518 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIndexName('.$_uid.', '.$table.', '.$_pid.')] No "index_name" with UID "'.$uid.'" and PID "'.$pid.'" found in table "'.$table.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 518 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIndexName(' . $_uid . ', ' . $table . ', ' . $_pid . ')] No "index_name" with UID "' . $uid . '" and PID "' . $pid . '" found in table "' . $table . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 519 | 519 | |
| 520 | 520 | } | 
| 521 | 521 | |
| @@ -543,11 +543,11 @@ discard block | ||
| 543 | 543 | |
| 544 | 544 | $_pid = $pid; | 
| 545 | 545 | |
| 546 | -        if (!$index_name || !in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { | |
| 546 | +        if (!$index_name || !in_array($table, array('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures', 'tx_dlf_solrcores'))) { | |
| 547 | 547 | |
| 548 | 548 |              if (TYPO3_DLOG) { | 
| 549 | 549 | |
| 550 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIdFromIndexName('.$_index_name.', '.$table.', '.$_pid.')] Invalid UID "'.$index_name.'" or table "'.$table.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 550 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIdFromIndexName(' . $_index_name . ', ' . $table . ', ' . $_pid . ')] Invalid UID "' . $index_name . '" or table "' . $table . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 551 | 551 | |
| 552 | 552 | } | 
| 553 | 553 | |
| @@ -562,15 +562,15 @@ discard block | ||
| 562 | 562 | |
| 563 | 563 | $pid = max(intval($pid), 0); | 
| 564 | 564 | |
| 565 | - $where = ' AND '.$table.'.pid='.$pid; | |
| 565 | + $where = ' AND ' . $table . '.pid=' . $pid; | |
| 566 | 566 | |
| 567 | 567 | } | 
| 568 | 568 | |
| 569 | 569 | // Get index_name from database. | 
| 570 | 570 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 571 | - $table.'.uid AS uid', | |
| 571 | + $table . '.uid AS uid', | |
| 572 | 572 | $table, | 
| 573 | - $table.'.index_name="'.$index_name.'"'.$where.self::whereClause($table), | |
| 573 | + $table . '.index_name="' . $index_name . '"' . $where . self::whereClause($table), | |
| 574 | 574 | '', | 
| 575 | 575 | '', | 
| 576 | 576 | '1' | 
| @@ -586,7 +586,7 @@ discard block | ||
| 586 | 586 | |
| 587 | 587 |              if (TYPO3_DLOG) { | 
| 588 | 588 | |
| 589 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIdFromIndexName('.$_index_name.', '.$table.', '.$_pid.')] No UID for given "index_name" "'.$index_name.'" and PID "'.$pid.'" found in table "'.$table.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 589 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getIdFromIndexName(' . $_index_name . ', ' . $table . ', ' . $_pid . ')] No UID for given "index_name" "' . $index_name . '" and PID "' . $pid . '" found in table "' . $table . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 590 | 590 | |
| 591 | 591 | } | 
| 592 | 592 | |
| @@ -612,11 +612,11 @@ discard block | ||
| 612 | 612 | |
| 613 | 613 |          if (preg_match('/^[a-z]{3}$/', $isoCode)) { | 
| 614 | 614 | |
| 615 | - $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey).'lib/ISO-639/iso-639-2b.xml'; | |
| 615 | + $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey) . 'lib/ISO-639/iso-639-2b.xml'; | |
| 616 | 616 | |
| 617 | 617 |          } elseif (preg_match('/^[a-z]{2}$/', $isoCode)) { | 
| 618 | 618 | |
| 619 | - $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey).'lib/ISO-639/iso-639-1.xml'; | |
| 619 | + $file = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath(self::$extKey) . 'lib/ISO-639/iso-639-1.xml'; | |
| 620 | 620 | |
| 621 | 621 |          } else { | 
| 622 | 622 | |
| @@ -650,7 +650,7 @@ discard block | ||
| 650 | 650 | |
| 651 | 651 |              if (TYPO3_DLOG) { | 
| 652 | 652 | |
| 653 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLanguageName('.$code.')] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 653 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLanguageName(' . $code . ')] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 654 | 654 | |
| 655 | 655 | } | 
| 656 | 656 | |
| @@ -666,7 +666,7 @@ discard block | ||
| 666 | 666 | |
| 667 | 667 |              if (TYPO3_DLOG) { | 
| 668 | 668 | |
| 669 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLanguageName('.$code.')] Language code "'.$code.'" not found in ISO-639 table', self::$extKey, SYSLOG_SEVERITY_NOTICE); | |
| 669 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLanguageName(' . $code . ')] Language code "' . $code . '" not found in ISO-639 table', self::$extKey, SYSLOG_SEVERITY_NOTICE); | |
| 670 | 670 | |
| 671 | 671 | } | 
| 672 | 672 | |
| @@ -705,7 +705,7 @@ discard block | ||
| 705 | 705 | |
| 706 | 706 |              } elseif (TYPO3_DLOG) { | 
| 707 | 707 | |
| 708 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLL('.$key.', '.$default.', ['.($hsc ? 'TRUE' : 'FALSE').'])] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 708 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLL(' . $key . ', ' . $default . ', [' . ($hsc ? 'TRUE' : 'FALSE') . '])] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 709 | 709 | |
| 710 | 710 | } | 
| 711 | 711 | |
| @@ -724,7 +724,7 @@ discard block | ||
| 724 | 724 | |
| 725 | 725 |              } elseif (TYPO3_DLOG) { | 
| 726 | 726 | |
| 727 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLL('.$key.', '.$default.', ['.($hsc ? 'TRUE' : 'FALSE').'])] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 727 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getLL(' . $key . ', ' . $default . ', [' . ($hsc ? 'TRUE' : 'FALSE') . '])] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 728 | 728 | |
| 729 | 729 | } | 
| 730 | 730 | |
| @@ -754,7 +754,7 @@ discard block | ||
| 754 | 754 | */ | 
| 755 | 755 |      public static function getURN($base, $id) { | 
| 756 | 756 | |
| 757 | - $concordance = array ( | |
| 757 | + $concordance = array( | |
| 758 | 758 | '0' => 1, | 
| 759 | 759 | '1' => 2, | 
| 760 | 760 | '2' => 3, | 
| @@ -795,13 +795,13 @@ discard block | ||
| 795 | 795 | ':' => 17, | 
| 796 | 796 | ); | 
| 797 | 797 | |
| 798 | - $urn = strtolower($base.$id); | |
| 798 | + $urn = strtolower($base . $id); | |
| 799 | 799 | |
| 800 | 800 |          if (preg_match('/[^a-z0-9:-]/', $urn)) { | 
| 801 | 801 | |
| 802 | 802 |              if (TYPO3_DLOG) { | 
| 803 | 803 | |
| 804 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getURN('.$base.', '.$id.')] Invalid chars in given parameters', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 804 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->getURN(' . $base . ', ' . $id . ')] Invalid chars in given parameters', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 805 | 805 | |
| 806 | 806 | } | 
| 807 | 807 | |
| @@ -827,7 +827,7 @@ discard block | ||
| 827 | 827 | |
| 828 | 828 | $checksum = substr(intval($checksum / intval(substr($digits, -1, 1))), -1, 1); | 
| 829 | 829 | |
| 830 | - return $base.$id.$checksum; | |
| 830 | + return $base . $id . $checksum; | |
| 831 | 831 | |
| 832 | 832 | } | 
| 833 | 833 | |
| @@ -867,7 +867,7 @@ discard block | ||
| 867 | 867 | |
| 868 | 868 |              if (TYPO3_DLOG) { | 
| 869 | 869 | |
| 870 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->loadFromSession('.$_key.')] Invalid key "'.$key.'" for session data retrieval', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 870 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->loadFromSession(' . $_key . ')] Invalid key "' . $key . '" for session data retrieval', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 871 | 871 | |
| 872 | 872 | } | 
| 873 | 873 | |
| @@ -888,7 +888,7 @@ discard block | ||
| 888 | 888 | |
| 889 | 889 |              if (TYPO3_DLOG) { | 
| 890 | 890 | |
| 891 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->loadFromSession('.$_key.')] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 891 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->loadFromSession(' . $_key . ')] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 892 | 892 | |
| 893 | 893 | } | 
| 894 | 894 | |
| @@ -910,7 +910,7 @@ discard block | ||
| 910 | 910 | * | 
| 911 | 911 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. | 
| 912 | 912 | */ | 
| 913 | -    public static function processDB(array $data = array (), array $cmd = array (), $reverseOrder = FALSE, $be_user = FALSE) { | |
| 913 | +    public static function processDB(array $data = array(), array $cmd = array(), $reverseOrder = FALSE, $be_user = FALSE) { | |
| 914 | 914 | |
| 915 | 915 | // Instantiate TYPO3 core engine. | 
| 916 | 916 |          $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler'); | 
| @@ -968,7 +968,7 @@ discard block | ||
| 968 | 968 | * | 
| 969 | 969 | * @return array Array of substituted "NEW..." identifiers and their actual UIDs. | 
| 970 | 970 | */ | 
| 971 | -    public static function processDBasAdmin(array $data = array (), array $cmd = array (), $reverseOrder = FALSE) { | |
| 971 | +    public static function processDBasAdmin(array $data = array(), array $cmd = array(), $reverseOrder = FALSE) { | |
| 972 | 972 | |
| 973 | 973 |          if (TYPO3_MODE === 'BE' && $GLOBALS['BE_USER']->isAdmin()) { | 
| 974 | 974 | |
| @@ -978,11 +978,11 @@ discard block | ||
| 978 | 978 | |
| 979 | 979 |              if (TYPO3_DLOG) { | 
| 980 | 980 | |
| 981 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->processDBasAdmin([data->data], [data->cmd], ['.($reverseOrder ? 'TRUE' : 'FALSE').'])] Current backend user has no admin privileges', self::$extKey, SYSLOG_SEVERITY_ERROR, array ('data' => $data, 'cmd' => $cmd)); | |
| 981 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->processDBasAdmin([data->data], [data->cmd], [' . ($reverseOrder ? 'TRUE' : 'FALSE') . '])] Current backend user has no admin privileges', self::$extKey, SYSLOG_SEVERITY_ERROR, array('data' => $data, 'cmd' => $cmd)); | |
| 982 | 982 | |
| 983 | 983 | } | 
| 984 | 984 | |
| 985 | - return array (); | |
| 985 | + return array(); | |
| 986 | 986 | |
| 987 | 987 | } | 
| 988 | 988 | |
| @@ -1025,7 +1025,7 @@ discard block | ||
| 1025 | 1025 | |
| 1026 | 1026 |                      if ($flashMessage->getTitle() !== '') { | 
| 1027 | 1027 | |
| 1028 | -                        $messageContent = sprintf('<h4>%s</h4>', htmlspecialchars($flashMessage->getTitle())).$messageContent; | |
| 1028 | +                        $messageContent = sprintf('<h4>%s</h4>', htmlspecialchars($flashMessage->getTitle())) . $messageContent; | |
| 1029 | 1029 | |
| 1030 | 1030 | } | 
| 1031 | 1031 | |
| @@ -1065,7 +1065,7 @@ discard block | ||
| 1065 | 1065 | |
| 1066 | 1066 |              if (TYPO3_DLOG) { | 
| 1067 | 1067 | |
| 1068 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->saveToSession([data], '.$_key.')] Invalid key "'.$key.'" for session data saving', self::$extKey, SYSLOG_SEVERITY_WARNING, $value); | |
| 1068 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->saveToSession([data], ' . $_key . ')] Invalid key "' . $key . '" for session data saving', self::$extKey, SYSLOG_SEVERITY_WARNING, $value); | |
| 1069 | 1069 | |
| 1070 | 1070 | } | 
| 1071 | 1071 | |
| @@ -1092,7 +1092,7 @@ discard block | ||
| 1092 | 1092 | |
| 1093 | 1093 |              if (TYPO3_DLOG) { | 
| 1094 | 1094 | |
| 1095 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->saveToSession([data], '.$_key.')] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR, $data); | |
| 1095 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->saveToSession([data], ' . $_key . ')] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR, $data); | |
| 1096 | 1096 | |
| 1097 | 1097 | } | 
| 1098 | 1098 | |
| @@ -1121,7 +1121,7 @@ discard block | ||
| 1121 | 1121 | $_pid = $pid; | 
| 1122 | 1122 | |
| 1123 | 1123 | // Load labels into static variable for future use. | 
| 1124 | - static $labels = array (); | |
| 1124 | + static $labels = array(); | |
| 1125 | 1125 | |
| 1126 | 1126 | // Sanitize input. | 
| 1127 | 1127 | $pid = max(intval($pid), 0); | 
| @@ -1130,7 +1130,7 @@ discard block | ||
| 1130 | 1130 | |
| 1131 | 1131 |              if (TYPO3_DLOG) { | 
| 1132 | 1132 | |
| 1133 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate('.$_index_name.', '.$table.', '.$_pid.')] Invalid PID "'.$pid.'" for translation', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1133 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate(' . $_index_name . ', ' . $table . ', ' . $_pid . ')] Invalid PID "' . $pid . '" for translation', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1134 | 1134 | |
| 1135 | 1135 | } | 
| 1136 | 1136 | |
| @@ -1153,7 +1153,7 @@ discard block | ||
| 1153 | 1153 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 1154 | 1154 | 'uid, l18n_parent', | 
| 1155 | 1155 | $table, | 
| 1156 | - 'pid='.$pid.' AND index_name="'.$index_name.'"'.self::whereClause($table, TRUE), | |
| 1156 | + 'pid=' . $pid . ' AND index_name="' . $index_name . '"' . self::whereClause($table, TRUE), | |
| 1157 | 1157 | '', | 
| 1158 | 1158 | '', | 
| 1159 | 1159 | '' | 
| @@ -1167,7 +1167,7 @@ discard block | ||
| 1167 | 1167 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 1168 | 1168 | 'index_name', | 
| 1169 | 1169 | $table, | 
| 1170 | - 'pid='.$pid.' AND uid='.$resArray['l18n_parent'].' AND sys_language_uid='.intval($GLOBALS['TSFE']->sys_language_content).self::whereClause($table, TRUE), | |
| 1170 | + 'pid=' . $pid . ' AND uid=' . $resArray['l18n_parent'] . ' AND sys_language_uid=' . intval($GLOBALS['TSFE']->sys_language_content) . self::whereClause($table, TRUE), | |
| 1171 | 1171 | '', | 
| 1172 | 1172 | '', | 
| 1173 | 1173 | '' | 
| @@ -1188,13 +1188,13 @@ discard block | ||
| 1188 | 1188 |          if (empty($labels[$table][$pid][$GLOBALS['TSFE']->sys_language_content][$index_name])) { | 
| 1189 | 1189 | |
| 1190 | 1190 | // Check if this table is allowed for translation. | 
| 1191 | -            if (in_array($table, array ('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'))) { | |
| 1191 | +            if (in_array($table, array('tx_dlf_collections', 'tx_dlf_libraries', 'tx_dlf_metadata', 'tx_dlf_structures'))) { | |
| 1192 | 1192 | |
| 1193 | 1193 | $additionalWhere = ' AND sys_language_uid IN (-1,0)'; | 
| 1194 | 1194 | |
| 1195 | 1195 |                  if ($GLOBALS['TSFE']->sys_language_content > 0) { | 
| 1196 | 1196 | |
| 1197 | - $additionalWhere = ' AND (sys_language_uid IN (-1,0) OR (sys_language_uid='.intval($GLOBALS['TSFE']->sys_language_content).' AND l18n_parent=0))'; | |
| 1197 | + $additionalWhere = ' AND (sys_language_uid IN (-1,0) OR (sys_language_uid=' . intval($GLOBALS['TSFE']->sys_language_content) . ' AND l18n_parent=0))'; | |
| 1198 | 1198 | |
| 1199 | 1199 | } | 
| 1200 | 1200 | |
| @@ -1202,7 +1202,7 @@ discard block | ||
| 1202 | 1202 | $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 1203 | 1203 | '*', | 
| 1204 | 1204 | $table, | 
| 1205 | - 'pid='.$pid.$additionalWhere.self::whereClause($table, TRUE), | |
| 1205 | + 'pid=' . $pid . $additionalWhere . self::whereClause($table, TRUE), | |
| 1206 | 1206 | '', | 
| 1207 | 1207 | '', | 
| 1208 | 1208 | '' | 
| @@ -1231,7 +1231,7 @@ discard block | ||
| 1231 | 1231 | |
| 1232 | 1232 |                      if (TYPO3_DLOG) { | 
| 1233 | 1233 | |
| 1234 | -                        \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate('.$_index_name.', '.$table.', '.$_pid.')] No translation with PID "'.$pid.'" available in table "'.$table.'" or translation not accessible', self::extKey, SYSLOG_SEVERITY_NOTICE); | |
| 1234 | +                        \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate(' . $_index_name . ', ' . $table . ', ' . $_pid . ')] No translation with PID "' . $pid . '" available in table "' . $table . '" or translation not accessible', self::extKey, SYSLOG_SEVERITY_NOTICE); | |
| 1235 | 1235 | |
| 1236 | 1236 | } | 
| 1237 | 1237 | |
| @@ -1241,7 +1241,7 @@ discard block | ||
| 1241 | 1241 | |
| 1242 | 1242 |                  if (TYPO3_DLOG) { | 
| 1243 | 1243 | |
| 1244 | -                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate('.$_index_name.', '.$table.', '.$_pid.')] No translations available for table "'.$table.'"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1244 | +                    \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->translate(' . $_index_name . ', ' . $table . ', ' . $_pid . ')] No translations available for table "' . $table . '"', self::$extKey, SYSLOG_SEVERITY_WARNING); | |
| 1245 | 1245 | |
| 1246 | 1246 | } | 
| 1247 | 1247 | |
| @@ -1314,7 +1314,7 @@ discard block | ||
| 1314 | 1314 | |
| 1315 | 1315 |              if (TYPO3_DLOG) { | 
| 1316 | 1316 | |
| 1317 | -                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->whereClause('.$table.', ['.($showHidden ? 'TRUE' : 'FALSE').'])] Unexpected TYPO3_MODE "'.TYPO3_MODE.'"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1317 | +                \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('[tx_dlf_helper->whereClause(' . $table . ', [' . ($showHidden ? 'TRUE' : 'FALSE') . '])] Unexpected TYPO3_MODE "' . TYPO3_MODE . '"', self::$extKey, SYSLOG_SEVERITY_ERROR); | |
| 1318 | 1318 | |
| 1319 | 1319 | } | 
| 1320 | 1320 | |
| @@ -11,46 +11,46 @@ | ||
| 11 | 11 | |
| 12 | 12 |  $extensionPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('dlf'); | 
| 13 | 13 | |
| 14 | -return array ( | |
| 15 | - 'tx_dlf_cli' => $extensionPath.'cli/class.tx_dlf_cli.php', | |
| 16 | - 'tx_dlf_alto' => $extensionPath.'common/class.tx_dlf_alto.php', | |
| 17 | - 'tx_dlf_document' => $extensionPath.'common/class.tx_dlf_document.php', | |
| 18 | - 'tx_dlf_format' => $extensionPath.'common/class.tx_dlf_format.php', | |
| 19 | - 'tx_dlf_fulltext' => $extensionPath.'common/class.tx_dlf_fulltext.php', | |
| 20 | - 'tx_dlf_helper' => $extensionPath.'common/class.tx_dlf_helper.php', | |
| 21 | - 'tx_dlf_indexing' => $extensionPath.'common/class.tx_dlf_indexing.php', | |
| 22 | - 'tx_dlf_list' => $extensionPath.'common/class.tx_dlf_list.php', | |
| 23 | - 'tx_dlf_mods' => $extensionPath.'common/class.tx_dlf_mods.php', | |
| 24 | - 'tx_dlf_module' => $extensionPath.'common/class.tx_dlf_module.php', | |
| 25 | - 'tx_dlf_plugin' => $extensionPath.'common/class.tx_dlf_plugin.php', | |
| 26 | - 'tx_dlf_solr' => $extensionPath.'common/class.tx_dlf_solr.php', | |
| 27 | - 'tx_dlf_teihdr' => $extensionPath.'common/class.tx_dlf_teihdr.php', | |
| 28 | - 'tx_dlf_doctype' => $extensionPath.'hooks/class.tx_dlf_doctype.php', | |
| 29 | - 'tx_dlf_em' => $extensionPath.'hooks/class.tx_dlf_em.php', | |
| 30 | - 'tx_dlf_hacks' => $extensionPath.'hooks/class.tx_dlf_hacks.php', | |
| 31 | - 'tx_dlf_tceforms' => $extensionPath.'hooks/class.tx_dlf_tceforms.php', | |
| 32 | - 'tx_dlf_tcemain' => $extensionPath.'hooks/class.tx_dlf_tcemain.php', | |
| 33 | - 'tx_dlf_modIndexing' => $extensionPath.'modules/indexing/index.php', | |
| 34 | - 'tx_dlf_modNewclient' => $extensionPath.'modules/newclient/index.php', | |
| 35 | - 'tx_dlf_audioplayer' => $extensionPath.'plugins/audioplayer/class.tx_dlf_audioplayer.php', | |
| 36 | - 'tx_dlf_basket' => $extensionPath.'plugins/basket/class.tx_dlf_basket.php', | |
| 37 | - 'tx_dlf_collection' => $extensionPath.'plugins/collection/class.tx_dlf_collection.php', | |
| 38 | - 'tx_dlf_feeds' => $extensionPath.'plugins/feeds/class.tx_dlf_feeds.php', | |
| 39 | - 'tx_dlf_listview' => $extensionPath.'plugins/listview/class.tx_dlf_listview.php', | |
| 40 | - 'tx_dlf_metadata' => $extensionPath.'plugins/metadata/class.tx_dlf_metadata.php', | |
| 41 | - 'tx_dlf_navigation' => $extensionPath.'plugins/navigation/class.tx_dlf_navigation.php', | |
| 42 | - 'tx_dlf_newspaper' => $extensionPath.'plugins/newspaper/class.tx_dlf_newspaper.php', | |
| 43 | - 'tx_dlf_oai' => $extensionPath.'plugins/oai/class.tx_dlf_oai.php', | |
| 44 | - 'tx_dlf_pagegrid' => $extensionPath.'plugins/pagegrid/class.tx_dlf_pagegrid.php', | |
| 45 | - 'tx_dlf_pageview' => $extensionPath.'plugins/pageview/class.tx_dlf_pageview.php', | |
| 46 | - 'tx_dlf_search' => $extensionPath.'plugins/search/class.tx_dlf_search.php', | |
| 47 | - 'tx_dlf_search_suggest' => $extensionPath.'plugins/search/class.tx_dlf_search_suggest.php', | |
| 48 | - 'tx_dlf_statistics' => $extensionPath.'plugins/statistics/class.tx_dlf_statistics.php', | |
| 49 | - 'tx_dlf_toc' => $extensionPath.'plugins/toc/class.tx_dlf_toc.php', | |
| 50 | - 'tx_dlf_toolbox' => $extensionPath.'plugins/toolbox/class.tx_dlf_toolbox.php', | |
| 51 | - 'tx_dlf_toolsPdf' => $extensionPath.'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php', | |
| 52 | - 'tx_dlf_toolsFulltext' => $extensionPath.'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php', | |
| 53 | - 'tx_dlf_toolsImagemanipulation' => $extensionPath.'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php', | |
| 54 | - 'tx_dlf_toolsImagedownload' => $extensionPath.'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php', | |
| 55 | - 'tx_dlf_validator' => $extensionPath.'plugins/validator/class.tx_dlf_validator.php' | |
| 14 | +return array( | |
| 15 | + 'tx_dlf_cli' => $extensionPath . 'cli/class.tx_dlf_cli.php', | |
| 16 | + 'tx_dlf_alto' => $extensionPath . 'common/class.tx_dlf_alto.php', | |
| 17 | + 'tx_dlf_document' => $extensionPath . 'common/class.tx_dlf_document.php', | |
| 18 | + 'tx_dlf_format' => $extensionPath . 'common/class.tx_dlf_format.php', | |
| 19 | + 'tx_dlf_fulltext' => $extensionPath . 'common/class.tx_dlf_fulltext.php', | |
| 20 | + 'tx_dlf_helper' => $extensionPath . 'common/class.tx_dlf_helper.php', | |
| 21 | + 'tx_dlf_indexing' => $extensionPath . 'common/class.tx_dlf_indexing.php', | |
| 22 | + 'tx_dlf_list' => $extensionPath . 'common/class.tx_dlf_list.php', | |
| 23 | + 'tx_dlf_mods' => $extensionPath . 'common/class.tx_dlf_mods.php', | |
| 24 | + 'tx_dlf_module' => $extensionPath . 'common/class.tx_dlf_module.php', | |
| 25 | + 'tx_dlf_plugin' => $extensionPath . 'common/class.tx_dlf_plugin.php', | |
| 26 | + 'tx_dlf_solr' => $extensionPath . 'common/class.tx_dlf_solr.php', | |
| 27 | + 'tx_dlf_teihdr' => $extensionPath . 'common/class.tx_dlf_teihdr.php', | |
| 28 | + 'tx_dlf_doctype' => $extensionPath . 'hooks/class.tx_dlf_doctype.php', | |
| 29 | + 'tx_dlf_em' => $extensionPath . 'hooks/class.tx_dlf_em.php', | |
| 30 | + 'tx_dlf_hacks' => $extensionPath . 'hooks/class.tx_dlf_hacks.php', | |
| 31 | + 'tx_dlf_tceforms' => $extensionPath . 'hooks/class.tx_dlf_tceforms.php', | |
| 32 | + 'tx_dlf_tcemain' => $extensionPath . 'hooks/class.tx_dlf_tcemain.php', | |
| 33 | + 'tx_dlf_modIndexing' => $extensionPath . 'modules/indexing/index.php', | |
| 34 | + 'tx_dlf_modNewclient' => $extensionPath . 'modules/newclient/index.php', | |
| 35 | + 'tx_dlf_audioplayer' => $extensionPath . 'plugins/audioplayer/class.tx_dlf_audioplayer.php', | |
| 36 | + 'tx_dlf_basket' => $extensionPath . 'plugins/basket/class.tx_dlf_basket.php', | |
| 37 | + 'tx_dlf_collection' => $extensionPath . 'plugins/collection/class.tx_dlf_collection.php', | |
| 38 | + 'tx_dlf_feeds' => $extensionPath . 'plugins/feeds/class.tx_dlf_feeds.php', | |
| 39 | + 'tx_dlf_listview' => $extensionPath . 'plugins/listview/class.tx_dlf_listview.php', | |
| 40 | + 'tx_dlf_metadata' => $extensionPath . 'plugins/metadata/class.tx_dlf_metadata.php', | |
| 41 | + 'tx_dlf_navigation' => $extensionPath . 'plugins/navigation/class.tx_dlf_navigation.php', | |
| 42 | + 'tx_dlf_newspaper' => $extensionPath . 'plugins/newspaper/class.tx_dlf_newspaper.php', | |
| 43 | + 'tx_dlf_oai' => $extensionPath . 'plugins/oai/class.tx_dlf_oai.php', | |
| 44 | + 'tx_dlf_pagegrid' => $extensionPath . 'plugins/pagegrid/class.tx_dlf_pagegrid.php', | |
| 45 | + 'tx_dlf_pageview' => $extensionPath . 'plugins/pageview/class.tx_dlf_pageview.php', | |
| 46 | + 'tx_dlf_search' => $extensionPath . 'plugins/search/class.tx_dlf_search.php', | |
| 47 | + 'tx_dlf_search_suggest' => $extensionPath . 'plugins/search/class.tx_dlf_search_suggest.php', | |
| 48 | + 'tx_dlf_statistics' => $extensionPath . 'plugins/statistics/class.tx_dlf_statistics.php', | |
| 49 | + 'tx_dlf_toc' => $extensionPath . 'plugins/toc/class.tx_dlf_toc.php', | |
| 50 | + 'tx_dlf_toolbox' => $extensionPath . 'plugins/toolbox/class.tx_dlf_toolbox.php', | |
| 51 | + 'tx_dlf_toolsPdf' => $extensionPath . 'plugins/toolbox/tools/pdf/class.tx_dlf_toolsPdf.php', | |
| 52 | + 'tx_dlf_toolsFulltext' => $extensionPath . 'plugins/toolbox/tools/fulltext/class.tx_dlf_toolsFulltext.php', | |
| 53 | + 'tx_dlf_toolsImagemanipulation' => $extensionPath . 'plugins/toolbox/tools/imagemanipulation/class.tx_dlf_toolsImagemanipulation.php', | |
| 54 | + 'tx_dlf_toolsImagedownload' => $extensionPath . 'plugins/toolbox/tools/imagedownload/class.tx_dlf_toolsImagedownload.php', | |
| 55 | + 'tx_dlf_validator' => $extensionPath . 'plugins/validator/class.tx_dlf_validator.php' | |
| 56 | 56 | ); | 
| @@ -21,11 +21,11 @@ discard block | ||
| 21 | 21 | |
| 22 | 22 | protected $modPath = 'indexing/'; | 
| 23 | 23 | |
| 24 | - protected $buttonArray = array ( | |
| 24 | + protected $buttonArray = array( | |
| 25 | 25 | 'SHORTCUT' => '', | 
| 26 | 26 | ); | 
| 27 | 27 | |
| 28 | - protected $markerArray = array ( | |
| 28 | + protected $markerArray = array( | |
| 29 | 29 | 'CSH' => '', | 
| 30 | 30 | 'MOD_MENU' => '', | 
| 31 | 31 | 'CONTENT' => '', | 
| @@ -52,7 +52,7 @@ discard block | ||
| 52 | 52 | $_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 53 | 53 | 'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid', | 
| 54 | 54 | 'tx_dlf_solrcores', | 
| 55 | -            'tx_dlf_solrcores.pid IN (0,'.intval($this->id).')'.tx_dlf_helper::whereClause('tx_dlf_solrcores'), | |
| 55 | +            'tx_dlf_solrcores.pid IN (0,' . intval($this->id) . ')' . tx_dlf_helper::whereClause('tx_dlf_solrcores'), | |
| 56 | 56 | '', | 
| 57 | 57 | '', | 
| 58 | 58 | '' | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | $_collections = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 63 | 63 | 'tx_dlf_collections.label AS label,tx_dlf_collections.uid AS uid', | 
| 64 | 64 | 'tx_dlf_collections', | 
| 65 | -            'tx_dlf_collections.fe_cruser_id=0 AND tx_dlf_collections.pid='.intval($this->id).' AND tx_dlf_collections.sys_language_uid IN (-1,0)'.tx_dlf_helper::whereClause('tx_dlf_collections'), | |
| 65 | +            'tx_dlf_collections.fe_cruser_id=0 AND tx_dlf_collections.pid=' . intval($this->id) . ' AND tx_dlf_collections.sys_language_uid IN (-1,0)' . tx_dlf_helper::whereClause('tx_dlf_collections'), | |
| 66 | 66 | '', | 
| 67 | 67 | 'tx_dlf_collections.label ASC', | 
| 68 | 68 | '' | 
| @@ -71,25 +71,25 @@ discard block | ||
| 71 | 71 | // TODO: Ändern! | 
| 72 | 72 | $form = '<label for="tx-dlf-modIndexing-id">Kollektion:</label>'; | 
| 73 | 73 | |
| 74 | - $form .= '<select id="tx-dlf-modIndexing-collection" name="'.$this->prefixId.'[collection]">'; | |
| 74 | + $form .= '<select id="tx-dlf-modIndexing-collection" name="' . $this->prefixId . '[collection]">'; | |
| 75 | 75 | |
| 76 | 76 | $form .= '<option value="0">Alle</option>'; | 
| 77 | 77 | |
| 78 | 78 |          while ($_collection = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_collections)) { | 
| 79 | 79 | |
| 80 | - $form .= '<option value="'.$_collection['uid'].'">'.htmlspecialchars($_collection['label']).'</option>'; | |
| 80 | + $form .= '<option value="' . $_collection['uid'] . '">' . htmlspecialchars($_collection['label']) . '</option>'; | |
| 81 | 81 | |
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | 84 | $form .= '</select><br />'; | 
| 85 | 85 | |
| 86 | - $form .= '<select id="tx-dlf-modIndexing-core" name="'.$this->prefixId.'[core]">'; | |
| 86 | + $form .= '<select id="tx-dlf-modIndexing-core" name="' . $this->prefixId . '[core]">'; | |
| 87 | 87 | |
| 88 | 88 | $form .= '<option value="0">---</option>'; | 
| 89 | 89 | |
| 90 | 90 |          while ($_core = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_cores)) { | 
| 91 | 91 | |
| 92 | - $form .= '<option value="'.$_core['uid'].'">'.htmlspecialchars($_core['label']).'</option>'; | |
| 92 | + $form .= '<option value="' . $_core['uid'] . '">' . htmlspecialchars($_core['label']) . '</option>'; | |
| 93 | 93 | |
| 94 | 94 | } | 
| 95 | 95 | |
| @@ -97,7 +97,7 @@ discard block | ||
| 97 | 97 | |
| 98 | 98 | $form .= '<input type="hidden" name="CMD" value="reindexDocs" />'; | 
| 99 | 99 | |
| 100 | -        $form .= '<input type="submit" name="'.$this->prefixId.'[submit]" value="'.$GLOBALS['LANG']->getLL('form.submit').'" />'; | |
| 100 | +        $form .= '<input type="submit" name="' . $this->prefixId . '[submit]" value="' . $GLOBALS['LANG']->getLL('form.submit') . '" />'; | |
| 101 | 101 | |
| 102 | 102 | return $form; | 
| 103 | 103 | |
| @@ -116,7 +116,7 @@ discard block | ||
| 116 | 116 | $_cores = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 117 | 117 | 'tx_dlf_solrcores.label AS label,tx_dlf_solrcores.uid AS uid', | 
| 118 | 118 | 'tx_dlf_solrcores', | 
| 119 | -            'tx_dlf_solrcores.pid IN (0,'.intval($this->id).')'.tx_dlf_helper::whereClause('tx_dlf_solrcores'), | |
| 119 | +            'tx_dlf_solrcores.pid IN (0,' . intval($this->id) . ')' . tx_dlf_helper::whereClause('tx_dlf_solrcores'), | |
| 120 | 120 | '', | 
| 121 | 121 | '', | 
| 122 | 122 | '' | 
| @@ -125,15 +125,15 @@ discard block | ||
| 125 | 125 | // TODO: Ändern! | 
| 126 | 126 | $form = '<label for="tx-dlf-modIndexing-id">METS-Datei:</label>'; | 
| 127 | 127 | |
| 128 | - $form .= '<input type="text" id="tx-dlf-modIndexing-id" name="'.$this->prefixId.'[id]" value="" /><br />'; | |
| 128 | + $form .= '<input type="text" id="tx-dlf-modIndexing-id" name="' . $this->prefixId . '[id]" value="" /><br />'; | |
| 129 | 129 | |
| 130 | - $form .= '<select id="tx-dlf-modIndexing-core" name="'.$this->prefixId.'[core]">'; | |
| 130 | + $form .= '<select id="tx-dlf-modIndexing-core" name="' . $this->prefixId . '[core]">'; | |
| 131 | 131 | |
| 132 | 132 | $form .= '<option value="0">---</option>'; | 
| 133 | 133 | |
| 134 | 134 |          while ($_core = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_cores)) { | 
| 135 | 135 | |
| 136 | - $form .= '<option value="'.$_core['uid'].'">'.htmlspecialchars($_core['label']).'</option>'; | |
| 136 | + $form .= '<option value="' . $_core['uid'] . '">' . htmlspecialchars($_core['label']) . '</option>'; | |
| 137 | 137 | |
| 138 | 138 | } | 
| 139 | 139 | |
| @@ -141,7 +141,7 @@ discard block | ||
| 141 | 141 | |
| 142 | 142 | $form .= '<input type="hidden" name="CMD" value="indexFile" />'; | 
| 143 | 143 | |
| 144 | -        $form .= '<input type="submit" name="'.$this->prefixId.'[submit]" value="'.$GLOBALS['LANG']->getLL('form.submit').'" />'; | |
| 144 | +        $form .= '<input type="submit" name="' . $this->prefixId . '[submit]" value="' . $GLOBALS['LANG']->getLL('form.submit') . '" />'; | |
| 145 | 145 | |
| 146 | 146 | return $form; | 
| 147 | 147 | |
| @@ -182,7 +182,7 @@ discard block | ||
| 182 | 182 | $this->markerArray['CONTENT'] .= $_message->render(); | 
| 183 | 183 | |
| 184 | 184 | // Start next loop. | 
| 185 | -        $this->markerArray['CONTENT'] .= '<script type="text/javascript">window.location.href=unescape("'.\TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeJS(\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array ('id' => $this->id, 'CMD' => 'indexLoop', $this->prefixId => array ('core' => $this->data['core']), 'random' => uniqid())))).'");</script>'; | |
| 185 | +        $this->markerArray['CONTENT'] .= '<script type="text/javascript">window.location.href=unescape("' . \TYPO3\CMS\Core\Utility\GeneralUtility::rawUrlEncodeJS(\TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $this->id, 'CMD' => 'indexLoop', $this->prefixId => array('core' => $this->data['core']), 'random' => uniqid())))) . '");</script>'; | |
| 186 | 186 | |
| 187 | 187 | $this->printContent(); | 
| 188 | 188 | |
| @@ -255,7 +255,7 @@ discard block | ||
| 255 | 255 | 'tx_dlf_documents', | 
| 256 | 256 | 'tx_dlf_relations', | 
| 257 | 257 | 'tx_dlf_collections', | 
| 258 | -                                'AND tx_dlf_documents.pid='.intval($this->id).' AND tx_dlf_collections.uid='.intval($this->data['collection']).' AND tx_dlf_relations.ident='.$GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations').tx_dlf_helper::whereClause('tx_dlf_documents').tx_dlf_helper::whereClause('tx_dlf_collections'), | |
| 258 | +                                'AND tx_dlf_documents.pid=' . intval($this->id) . ' AND tx_dlf_collections.uid=' . intval($this->data['collection']) . ' AND tx_dlf_relations.ident=' . $GLOBALS['TYPO3_DB']->fullQuoteStr('docs_colls', 'tx_dlf_relations') . tx_dlf_helper::whereClause('tx_dlf_documents') . tx_dlf_helper::whereClause('tx_dlf_collections'), | |
| 259 | 259 | 'tx_dlf_documents.uid', | 
| 260 | 260 | '', | 
| 261 | 261 | '' | 
| @@ -267,7 +267,7 @@ discard block | ||
| 267 | 267 | $_result = $GLOBALS['TYPO3_DB']->exec_SELECTquery( | 
| 268 | 268 | 'tx_dlf_documents.title AS title,tx_dlf_documents.uid AS uid', | 
| 269 | 269 | 'tx_dlf_documents', | 
| 270 | -                                'tx_dlf_documents.pid='.intval($this->id).tx_dlf_helper::whereClause('tx_dlf_documents'), | |
| 270 | +                                'tx_dlf_documents.pid=' . intval($this->id) . tx_dlf_helper::whereClause('tx_dlf_documents'), | |
| 271 | 271 | '', | 
| 272 | 272 | '', | 
| 273 | 273 | '' | 
| @@ -276,11 +276,11 @@ discard block | ||
| 276 | 276 | } | 
| 277 | 277 | |
| 278 | 278 | // Save them as a list object in user's session. | 
| 279 | - $elements = array (); | |
| 279 | + $elements = array(); | |
| 280 | 280 | |
| 281 | 281 |                          while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($_result)) { | 
| 282 | 282 | |
| 283 | - $elements[] = array ($resArray['uid'], $resArray['title']); | |
| 283 | + $elements[] = array($resArray['uid'], $resArray['title']); | |
| 284 | 284 | |
| 285 | 285 | } | 
| 286 | 286 | |
| @@ -366,8 +366,8 @@ discard block | ||
| 366 | 366 | */ | 
| 367 | 367 |      protected function setMOD_MENU() { | 
| 368 | 368 | |
| 369 | - $this->MOD_MENU = array ( | |
| 370 | - 'function' => array ( | |
| 369 | + $this->MOD_MENU = array( | |
| 370 | + 'function' => array( | |
| 371 | 371 |                  'indexFile' => $GLOBALS['LANG']->getLL('function.indexFile'), | 
| 372 | 372 |                  //'reindexDoc' => $GLOBALS['LANG']->getLL('function.reindexDoc'), | 
| 373 | 373 |                  'reindexDocs' => $GLOBALS['LANG']->getLL('function.reindexDocs'), |