[TASK] Merge submodule linkvalidator into core
[Packages/TYPO3.CMS.git] / typo3 / sysext / linkvalidator / Classes / Report / LinkValidatorReport.php
index 724de5d..7996cf7 100644 (file)
@@ -4,8 +4,8 @@ namespace TYPO3\CMS\Linkvalidator\Report;
 /***************************************************************
  *  Copyright notice
  *
- *  (c) 2005 - 2010 Jochen Rieger (j.rieger@connecta.ag)
- *  (c) 2010 - 2011 Michael Miousse (michael.miousse@infoglobe.ca)
+ *  (c) 2005 - 2013 Jochen Rieger (j.rieger@connecta.ag)
+ *  (c) 2010 - 2013 Michael Miousse (michael.miousse@infoglobe.ca)
  *  All rights reserved
  *
  *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -29,8 +29,6 @@ namespace TYPO3\CMS\Linkvalidator\Report;
  *
  * @author Michael Miousse <michael.miousse@infoglobe.ca>
  * @author Jochen Rieger <j.rieger@connecta.ag>
- * @package TYPO3
- * @subpackage linkvalidator
  */
 class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule {
 
@@ -132,17 +130,12 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
        protected $content;
 
        /**
-        * @var t3lib_pageRenderer $pageRenderer
+        * @var \TYPO3\CMS\Core\Page\PageRenderer
         */
        protected $pageRenderer;
 
        /**
-        * @var string $resPath Path to "linkvalidator/res/" to be used in pageRenderer
-        */
-       protected $resPath = '';
-
-       /**
-        * @var tx_linkvalidator_linktype_Interface[] $hookObjectsArr
+        * @var \TYPO3\CMS\Linkvalidator\Linktype\LinktypeInterface[]
         */
        protected $hookObjectsArr = array();
 
@@ -157,7 +150,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
         * @return string Module content
         */
        public function main() {
-               $GLOBALS['LANG']->includeLLFile('EXT:linkvalidator/modfuncreport/locallang.xml');
+               $GLOBALS['LANG']->includeLLFile('EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf');
                $this->searchLevel = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('search_levels');
                if (isset($this->pObj->id)) {
                        $this->modTS = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->pObj->id, 'mod.linkvalidator');
@@ -193,11 +186,12 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                }
                $GLOBALS['BE_USER']->pushModuleData('web_info', $this->pObj->MOD_SETTINGS);
                $this->initialize();
-               // Setting up the context sensitive menu
-               $this->resPath = ($this->doc->backPath . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('linkvalidator')) . 'res/';
+
                $this->pageRenderer = $this->doc->getPageRenderer();
                // Localization
-               $this->pageRenderer->addInlineLanguageLabelFile(\TYPO3\CMS\Core\Extension\ExtensionManager::extPath('linkvalidator', 'modfuncreport/locallang.xml'));
+               $this->pageRenderer->addInlineLanguageLabelFile(
+                       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('linkvalidator', 'Resources/Private/Language/Module/locallang.xlf')
+               );
                $this->pageRenderer->addJsInlineCode('linkvalidator', 'function toggleActionButton(prefix) {
                        var buttonDisable = true;
                        Ext.select(\'.\' + prefix ,false).each(function(checkBox,i){
@@ -219,9 +213,9 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                $this->pageRenderer->addJsFile($this->doc->backPath . '../t3lib/js/extjs/ux/flashmessages.js');
                $this->pageRenderer->addJsFile($this->doc->backPath . 'js/extjs/iframepanel.js');
                if ($this->modTS['showCheckLinkTab'] == 1) {
-                       $this->updateListHtml = ('<input type="submit" name="updateLinkList" id="updateLinkList" value="' . $GLOBALS['LANG']->getLL('label_update')) . '"/>';
+                       $this->updateListHtml = '<input type="submit" name="updateLinkList" id="updateLinkList" value="' . $GLOBALS['LANG']->getLL('label_update') . '"/>';
                }
-               $this->refreshListHtml = ('<input type="submit" name="refreshLinkList" id="refreshLinkList"  value="' . $GLOBALS['LANG']->getLL('label_refresh')) . '"/>';
+               $this->refreshListHtml = '<input type="submit" name="refreshLinkList" id="refreshLinkList" value="' . $GLOBALS['LANG']->getLL('label_refresh') . '"/>';
                $this->processor = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Linkvalidator\\LinkAnalyzer');
                $this->updateBrokenLinks();
                $brokenLinkOverView = $this->processor->getLinkCounts($this->pObj->id);
@@ -239,13 +233,14 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
        protected function createTabs() {
                $panelCheck = '';
                if ($this->modTS['showCheckLinkTab'] == 1) {
-                       $panelCheck = ('{
+                       $panelCheck = ',
+                       {
                                title: TYPO3.l10n.localize(\'CheckLink\'),
-                               html: ' . json_encode($this->flush())) . ',
+                               html: ' . json_encode($this->flush()) . ',
                        }';
                }
                $this->render();
-               $js = ((('var panel = new Ext.TabPanel( {
+               $js = 'var panel = new Ext.TabPanel( {
                        renderTo: \'linkvalidator-modfuncreport\',
                        id: \'linkvalidator-main\',
                        plain: true,
@@ -255,9 +250,8 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                        {
                                autoHeight: true,
                                title: TYPO3.l10n.localize(\'Report\'),
-                               html: ' . json_encode($this->flush(TRUE))) . '
-                       },
-                       ') . $panelCheck) . '
+                               html: ' . json_encode($this->flush(TRUE)) . '
+                       }' . $panelCheck . '
                        ]
 
                });
@@ -295,8 +289,8 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                }
                $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
-               $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Extension\ExtensionManager::extPath('linkvalidator') . 'modfuncreport/mod_template.html');
-               $this->relativePath = \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('linkvalidator');
+               $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('linkvalidator') . 'Resources/Private/Templates/mod_template.html');
+               $this->relativePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('linkvalidator');
                $this->pageRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->pObj->id, $GLOBALS['BE_USER']->getPagePermsClause(1));
                $this->isAccessibleForCurrentUser = FALSE;
                if ($this->pObj->id && is_array($this->pageRecord) || !$this->pObj->id && $this->isCurrentUserAdmin()) {
@@ -320,7 +314,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                foreach ($this->modTS['searchFields.'] as $table => $fieldList) {
                        $fields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $fieldList);
                        foreach ($fields as $field) {
-                               if ((!$searchFields || !is_array($searchFields[$table])) || array_search($field, $searchFields[$table]) == FALSE) {
+                               if (!$searchFields || !is_array($searchFields[$table]) || array_search($field, $searchFields[$table]) == FALSE) {
                                        $searchFields[$table][] = $field;
                                }
                        }
@@ -352,7 +346,12 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                } else {
                        // If no access or if ID == zero
                        /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */
-                       $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('no.access'), $GLOBALS['LANG']->getLL('no.access.title'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
+                       $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
+                               'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                               $GLOBALS['LANG']->getLL('no.access'),
+                               $GLOBALS['LANG']->getLL('no.access.title'),
+                               \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
+                       );
                        $this->content .= $message->render();
                }
        }
@@ -364,7 +363,11 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
         * @return string $content
         */
        protected function flush($form = FALSE) {
-               $content = $this->doc->moduleBody($this->pageRecord, $this->getDocHeaderButtons(), $form ? $this->getTemplateMarkers() : $this->getTemplateMarkersCheck());
+               $content = $this->doc->moduleBody(
+                       $this->pageRecord,
+                       $this->getDocHeaderButtons(),
+                       $form ? $this->getTemplateMarkers() : $this->getTemplateMarkersCheck()
+               );
                return $content;
        }
 
@@ -377,16 +380,16 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                // Build level selector
                $opt = array();
                $parts = array(
-                       0 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_0'),
-                       1 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_1'),
-                       2 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_2'),
-                       3 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_3'),
-                       999 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_infi')
+                       0 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_0'),
+                       1 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_1'),
+                       2 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_2'),
+                       3 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_3'),
+                       999 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_infi')
                );
                foreach ($parts as $kv => $label) {
-                       $opt[] = ((((('<option value="' . $kv) . '"') . ($kv == intval($this->searchLevel) ? ' selected="selected"' : '')) . '>') . htmlspecialchars($label)) . '</option>';
+                       $opt[] = '<option value="' . $kv . '"' . ($kv == intval($this->searchLevel) ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
                }
-               $lMenu = ('<select name="search_levels">' . implode('', $opt)) . '</select>';
+               $lMenu = '<select name="search_levels">' . implode('', $opt) . '</select>';
                return $lMenu;
        }
 
@@ -405,10 +408,22 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                }
                $rootLineHidden = $this->processor->getRootLineIsHidden($this->pObj->pageinfo);
                if (!$rootLineHidden || $this->modTS['checkhidden'] == 1) {
-                       $pageList = $this->processor->extGetTreeList($this->pObj->id, $this->searchLevel, 0, $GLOBALS['BE_USER']->getPagePermsClause(1), $this->modTS['checkhidden']);
+                       $pageList = $this->processor->extGetTreeList(
+                               $this->pObj->id,
+                               $this->searchLevel,
+                               0,
+                               $GLOBALS['BE_USER']->getPagePermsClause(1),
+                               $this->modTS['checkhidden']
+                       );
                        // Always add the current page, because we are just displaying the results
                        $pageList .= $this->pObj->id;
-                       if ($res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_linkvalidator_link', ((('record_pid in (' . $pageList) . ') and link_type in (\'') . implode('\',\'', $keyOpt)) . '\')', '', 'record_uid ASC, uid ASC')) {
+                       if (($res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                               '*',
+                               'tx_linkvalidator_link',
+                               'record_pid in (' . $pageList . ') and link_type in (\'' . implode('\',\'', $keyOpt) . '\')',
+                               '',
+                               'record_uid ASC, uid ASC')
+                       )) {
                                // Display table with broken links
                                if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0) {
                                        $brokenLinksTemplate = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($this->doc->moduleTemplate, '###BROKENLINKS_CONTENT###');
@@ -423,11 +438,16 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                                } else {
                                        $brokenLinksMarker = $this->getNoBrokenLinkMessage($brokenLinksMarker);
                                }
+                               $GLOBALS['TYPO3_DB']->sql_free_result($res);
                        }
                } else {
                        $brokenLinksMarker = $this->getNoBrokenLinkMessage($brokenLinksMarker);
                }
-               $brokenLinksTemplate = \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray($brokenLinksTemplate, $brokenLinksMarker, '###|###', TRUE);
+               $brokenLinksTemplate = \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray(
+                       $brokenLinksTemplate,
+                       $brokenLinksMarker, '###|###',
+                       TRUE
+               );
                $content = \TYPO3\CMS\Core\Html\HtmlParser::substituteSubpart($brokenLinksTemplate, '###BROKENLINKS_ITEM', $brokenLinkItems);
                return $content;
        }
@@ -440,8 +460,13 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
         */
        protected function getNoBrokenLinkMessage(array $brokenLinksMarker) {
                $brokenLinksMarker['LIST_HEADER'] = $this->doc->sectionHeader($GLOBALS['LANG']->getLL('list.header'));
-               /** @var \TYPO3\CMS\Core\Messaging\FlashMessage $message */
-               $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('list.no.broken.links'), $GLOBALS['LANG']->getLL('list.no.broken.links.title'), \TYPO3\CMS\Core\Messaging\FlashMessage::OK);
+               /** @var $message \TYPO3\CMS\Core\Messaging\FlashMessage */
+               $message = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
+                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                       $GLOBALS['LANG']->getLL('list.no.broken.links'),
+                       $GLOBALS['LANG']->getLL('list.no.broken.links.title'),
+                       \TYPO3\CMS\Core\Messaging\FlashMessage::OK
+               );
                $brokenLinksMarker['NO_BROKEN_LINKS'] = $message->render();
                return $brokenLinksMarker;
        }
@@ -484,11 +509,23 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                // Restore the linktype object
                $hookObj = $this->hookObjectsArr[$row['link_type']];
                $brokenUrl = $hookObj->getBrokenUrl($row);
-               $params = ((('&edit[' . $table) . '][') . $row['record_uid']) . ']=edit';
-               $actionLinks = (((((('<a href="#" onclick="' . \TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'], ((((\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI') . '?id=') . $this->pObj->id) . '&search_levels=') . $this->searchLevel))) . '"') . ' title="') . $GLOBALS['LANG']->getLL('list.edit')) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open')) . '</a>';
+               // Construct link to edit the content element
+               $params = '&edit[' . $table . '][' . $row['record_uid'] . ']=edit';
+               $requestUri = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI') .
+                       '?id=' . $this->pObj->id .
+                       '&search_levels=' . $this->searchLevel;
+               $actionLink = '<a href="#" onclick="';
+               $actionLink .= \TYPO3\CMS\Backend\Utility\BackendUtility::editOnClick(
+                       $params,
+                       $GLOBALS['BACK_PATH'],
+                       $requestUri
+               );
+               $actionLink .= '" title="' . $GLOBALS['LANG']->getLL('list.edit') . '">';
+               $actionLink .= \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open');
+               $actionLink .= '</a>';
                $elementHeadline = $row['headline'];
                if (empty($elementHeadline)) {
-                       $elementHeadline = ('<i>' . $GLOBALS['LANG']->getLL('list.no.headline')) . '</i>';
+                       $elementHeadline = '<i>' . $GLOBALS['LANG']->getLL('list.no.headline') . '</i>';
                }
                // Get the language label for the field from TCA
                if ($GLOBALS['TCA'][$table]['columns'][$row['field']]['label']) {
@@ -502,19 +539,23 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                // Fallback, if there is no label
                $fieldName = !empty($fieldName) ? $fieldName : $row['field'];
                // column "Element"
-               $element = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord($table, $row, array('title' => ($table . ':') . $row['record_uid']));
+               $element = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord(
+                       $table,
+                       $row,
+                       array('title' => $table . ':' . $row['record_uid'])
+               );
                $element .= $elementHeadline;
                $element .= ' ' . sprintf($GLOBALS['LANG']->getLL('list.field'), $fieldName);
-               $markerArray['actionlink'] = $actionLinks;
+               $markerArray['actionlink'] = $actionLink;
                $markerArray['path'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordPath($row['record_pid'], '', 0, 0);
                $markerArray['element'] = $element;
                $markerArray['headlink'] = $row['link_title'];
                $markerArray['linktarget'] = $brokenUrl;
                $response = unserialize($row['url_response']);
                if ($response['valid']) {
-                       $linkMessage = ('<span style="color: green;">' . $GLOBALS['LANG']->getLL('list.msg.ok')) . '</span>';
+                       $linkMessage = '<span style="color: green;">' . $GLOBALS['LANG']->getLL('list.msg.ok') . '</span>';
                } else {
-                       $linkMessage = ('<span style="color: red;">' . $hookObj->getErrorMessage($response['errorParams'])) . '</span>';
+                       $linkMessage = '<span style="color: red;">' . $hookObj->getErrorMessage($response['errorParams']) . '</span>';
                }
                $markerArray['linkmessage'] = $linkMessage;
                $lastRunDate = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $row['last_check']);
@@ -536,7 +577,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                $markerArray = array();
                $additionalAttr = '';
                if (!empty($prefix)) {
-                       $additionalAttr = (((' onclick="toggleActionButton(\'' . $prefix) . '\');" class="') . $prefix) . '" ';
+                       $additionalAttr = ' onclick="toggleActionButton(\'' . $prefix . '\');" class="' . $prefix . '" ';
                } else {
                        $additionalAttr = ' onclick="toggleActionButton(\'refresh\');" class="refresh" ';
                }
@@ -554,7 +595,8 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                $linktypes = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->modTS['linktypes'], 1);
                $hookSectionContent = '';
                if (is_array($linktypes)) {
-                       if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks']) && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
+                       if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])
+                               && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $type => $value) {
                                        if (in_array($type, $linktypes)) {
                                                $hookSectionMarker = array();
@@ -565,14 +607,22 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                                                }
                                                $translation = $GLOBALS['LANG']->getLL('hooks.' . $type);
                                                $translation = $translation ? $translation : $type;
-                                               $option = (((((((((((((((((('<input type="checkbox" ' . $additionalAttr) . '  id="') . $prefix) . 'SET_') . $type) . '" name="') . $prefix) . 'SET[') . $type) . ']" value="1"') . ($this->pObj->MOD_SETTINGS[$type] ? ' checked="checked"' : '')) . '/>') . '<label for="') . $prefix) . 'SET[') . $type) . ']">') . htmlspecialchars($translation)) . '</label>';
+                                               $option = '<input type="checkbox" ' . $additionalAttr . ' id="' . $prefix . 'SET_' . $type . '" name="' . $prefix . 'SET[' . $type . ']" value="1"' . ($this->pObj->MOD_SETTINGS[$type] ? ' checked="checked"' : '') . '/>' . '<label for="' . $prefix . 'SET[' . $type . ']">' . htmlspecialchars($translation) . '</label>';
                                                $hookSectionMarker['option'] = $option;
-                                               $hookSectionContent .= \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray($hookSectionTemplate, $hookSectionMarker, '###|###', TRUE, TRUE);
+                                               $hookSectionContent .= \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray(
+                                                       $hookSectionTemplate,
+                                                       $hookSectionMarker, '###|###',
+                                                       TRUE,
+                                                       TRUE
+                                               );
                                        }
                                }
                        }
                }
-               $checkOptionsTemplate = \TYPO3\CMS\Core\Html\HtmlParser::substituteSubpart($checkOptionsTemplate, '###HOOK_SECTION###', $hookSectionContent);
+               $checkOptionsTemplate = \TYPO3\CMS\Core\Html\HtmlParser::substituteSubpart(
+                       $checkOptionsTemplate,
+                       '###HOOK_SECTION###', $hookSectionContent
+               );
                return \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray($checkOptionsTemplate, $markerArray, '###|###', TRUE, TRUE);
        }
 
@@ -582,7 +632,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
         * @return void
         */
        protected function loadHeaderData() {
-               $this->doc->addStyleSheet('linkvalidator', $this->relativePath . 'res/linkvalidator.css', 'linkvalidator');
+               $this->doc->addStyleSheet('linkvalidator', $this->relativePath . 'Resources/Public/Css/linkvalidator.css', 'linkvalidator');
                $this->doc->getPageRenderer()->addJsFile($this->doc->backPath . '../t3lib/js/extjs/ux/Ext.ux.FitToParent.js');
        }
 
@@ -626,7 +676,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                        'CONTENT' => $this->content,
                        'CHECKALLLINK' => $this->checkAllHtml,
                        'CHECKOPTIONS' => $this->checkOptHtml,
-                       'ID' => ('<input type="hidden" name="id" value="' . $this->pObj->id) . '" />',
+                       'ID' => '<input type="hidden" name="id" value="' . $this->pObj->id . '" />',
                        'REFRESH' => $this->refreshListHtml,
                        'UPDATE' => ''
                );
@@ -646,7 +696,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
                        'CONTENT' => '',
                        'CHECKALLLINK' => $this->checkAllHtml,
                        'CHECKOPTIONS' => $this->checkOptHtmlCheck,
-                       'ID' => ('<input type="hidden" name="id" value="' . $this->pObj->id) . '" />',
+                       'ID' => '<input type="hidden" name="id" value="' . $this->pObj->id . '" />',
                        'REFRESH' => '',
                        'UPDATE' => $this->updateListHtml
                );
@@ -664,5 +714,4 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
 
 }
 
-
 ?>
\ No newline at end of file