2 /***************************************************************
5 * (c) 2005 - 2010 Jochen Rieger (j.rieger@connecta.ag)
6 * (c) 2010 - 2011 Michael Miousse (michael.miousse@infoglobe.ca)
9 * This script is part of the TYPO3 project. The TYPO3 project is
10 * free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * The GNU General Public License can be found at
16 * http://www.gnu.org/copyleft/gpl.html.
18 * This script is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * This copyright notice MUST APPEAR in all copies of the script!
24 ***************************************************************/
27 * Module 'Linkvalidator' for the 'linkvalidator' extension.
29 * @author Michael Miousse <michael.miousse@infoglobe.ca>
30 * @author Jochen Rieger <j.rieger@connecta.ag>
32 * @subpackage linkvalidator
34 class tx_linkvalidator_ModFuncReport
extends t3lib_extobjbase
{
44 protected $relativePath;
47 * Information about the current page record.
51 protected $pageRecord = array();
54 * Information, if the module is accessible for the current user or not.
58 protected $isAccessibleForCurrentUser = FALSE;
61 * Depth for the recursivity of the link validation.
65 protected $searchLevel;
68 * Link validation class.
70 * @var tx_linkvalidator_Processor
75 * TSconfig of the current module.
79 protected $modTS = array();
82 * List of available link types to check defined in the TSconfig.
86 protected $availableOptions = array();
89 * List of link types currently chosen in the Statistics table.
90 * Used to show broken links of these types only.
94 protected $checkOpt = array();
97 * Html for the button "Check Links".
101 protected $updateListHtml;
104 * Html for the button "Refresh Display".
108 protected $refreshListHtml;
111 * Html for the Statistics table with the checkboxes of the link types and the numbers of broken links for Report tab.
115 protected $checkOptHtml;
119 * Html for the Statistics table with the checkboxes of the link types and the numbers of broken links for Check links tab.
123 protected $checkOptHtmlCheck;
126 * Complete content (html) to be displayed.
133 * Main method of modfuncreport
135 * @return string Module content
137 public function main() {
138 $GLOBALS['LANG']->includeLLFile('EXT:linkvalidator/modfuncreport/locallang.xml');
140 $this->searchLevel
= t3lib_div
::_GP('search_levels');
142 if (isset($this->pObj
->id
)) {
143 $this->modTS
= t3lib_BEfunc
::getModTSconfig($this->pObj
->id
, 'mod.linkvalidator');
144 $this->modTS
= $this->modTS
['properties'];
146 $update = t3lib_div
::_GP('updateLinkList');
148 if (!empty($update)) {
151 $set = t3lib_div
::_GP($prefix . 'SET');
152 $this->pObj
->handleExternalFunctionValue();
154 if(isset($this->searchLevel
)) {
155 $this->pObj
->MOD_SETTINGS
['searchlevel'] = $this->searchLevel
;
157 $this->searchLevel
= $this->pObj
->MOD_SETTINGS
['searchlevel'];
160 if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
161 foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $linkType => $value) {
162 // Compile list of all available types. Used for checking with button "Check Links".
163 if (strpos($this->modTS
['linktypes'], $linkType) !== FALSE) {
164 $this->availableOptions
[$linkType] = 1;
166 // Compile list of types currently selected by the checkboxes.
167 if (($this->pObj
->MOD_SETTINGS
[$linkType] && empty($set)) ||
$set[$linkType]) {
168 $this->checkOpt
[$linkType] = 1;
169 $this->pObj
->MOD_SETTINGS
[$linkType] = 1;
171 $this->pObj
->MOD_SETTINGS
[$linkType] = 0;
172 unset($this->checkOpt
[$linkType]);
176 $GLOBALS['BE_USER']->pushModuleData('web_info', $this->pObj
->MOD_SETTINGS
);
179 // Setting up the context sensitive menu:
180 $this->resPath
= $this->doc
->backPath
. t3lib_extMgm
::extRelPath('linkvalidator') . 'res/';
181 /** @var t3lib_pageRenderer $pageRenderer */
182 $this->pageRenderer
= $this->doc
->getPageRenderer();
185 $this->pageRenderer
->addInlineLanguageLabelFile(t3lib_extMgm
::extPath('linkvalidator', 'modfuncreport/locallang.xml'));
188 $this->pageRenderer
->addJsInlineCode('linkvalidator','function toggleActionButton(prefix) {
189 var buttonDisable = true;
190 Ext.select(\'.\' + prefix ,false).each(function(checkBox,i){
191 checkDom = checkBox.dom;
192 if(checkDom.checked){
193 buttonDisable = false;
197 if(prefix == \'check\'){
198 checkSub = document.getElementById(\'updateLinkList\');
201 checkSub = document.getElementById(\'refreshLinkList\');
203 checkSub.disabled = buttonDisable;
208 $this->pageRenderer
->addJsFile($this->doc
->backPath
. '../t3lib/js/extjs/ux/Ext.ux.FitToParent.js');
209 $this->pageRenderer
->addJsFile($this->doc
->backPath
. '../t3lib/js/extjs/ux/flashmessages.js');
210 $this->pageRenderer
->addJsFile($this->doc
->backPath
. 'js/extjs/iframepanel.js');
212 if ($this->modTS
['showCheckLinkTab'] == 1) {
213 $this->updateListHtml
= '<input type="submit" name="updateLinkList" id="updateLinkList" value="' . $GLOBALS['LANG']->getLL('label_update') . '"/>';
216 $this->refreshListHtml
= '<input type="submit" name="refreshLinkList" id="refreshLinkList" value="' . $GLOBALS['LANG']->getLL('label_refresh') . '"/>';
218 $this->processor
= t3lib_div
::makeInstance('tx_linkvalidator_Processor');
219 $this->updateBrokenLinks();
221 $brokenLinkOverView = $this->processor
->getLinkCounts($this->pObj
->id
);
222 $this->checkOptHtml
= $this->getCheckOptions($brokenLinkOverView);
223 $this->checkOptHtmlCheck
= $this->getCheckOptions($brokenLinkOverView, 'check');
225 return '<div id="linkvalidator-modfuncreport"></div>';
229 * Create TabPanel to split the report and the checklinks functions
233 protected function createTabs() {
235 if ($this->modTS
['showCheckLinkTab'] == 1) {
237 title: TYPO3.lang.CheckLink,
238 html: ' . json_encode($this->flush()) . '
243 $js = 'var panel = new Ext.TabPanel( {
244 renderTo : "linkvalidator-modfuncreport",
245 id: "linkvalidator-main",
248 bodyStyle: "padding:10px;",
252 title: TYPO3.lang.Report,
253 html: ' . json_encode($this->flush(TRUE)) . '
260 $this->pageRenderer
->addExtOnReadyCode($js);
264 * Initializes the menu array internally.
266 * @return array Module menu
268 public function modMenu() {
273 if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
274 foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $linkType => $value) {
275 $modMenu[$linkType] = 1;
284 * Initializes the Module.
288 protected function initialize() {
289 if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
290 foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $linkType => $classRef) {
291 $this->hookObjectsArr
[$linkType] = &t3lib_div
::getUserObj($classRef);
295 $this->doc
= t3lib_div
::makeInstance('template');
296 $this->doc
->backPath
= $GLOBALS['BACK_PATH'];
297 $this->doc
->setModuleTemplate(t3lib_extMgm
::extPath('linkvalidator') . 'modfuncreport/mod_template.html');
299 $this->relativePath
= t3lib_extMgm
::extRelPath('linkvalidator');
300 $this->pageRecord
= t3lib_BEfunc
::readPageAccess($this->pObj
->id
, $this->perms_clause
);
302 $this->isAccessibleForCurrentUser
= FALSE;
303 if ($this->pObj
->id
&& is_array($this->pageRecord
) ||
!$this->pObj
->id
&& $this->isCurrentUserAdmin()) {
304 $this->isAccessibleForCurrentUser
= TRUE;
307 $this->loadHeaderData();
309 // Don't access in workspace
310 if ($GLOBALS['BE_USER']->workspace
!== 0) {
311 $this->isAccessibleForCurrentUser
= FALSE;
317 * Updates the table of stored broken links.
321 protected function updateBrokenLinks() {
322 $searchFields = array();
324 // get the searchFields from TypoScript
325 foreach ($this->modTS
['searchFields.'] as $table => $fieldList) {
326 $fields = t3lib_div
::trimExplode(',', $fieldList);
327 foreach ($fields as $field) {
328 if (!$searchFields ||
!is_array($searchFields[$table]) ||
array_search($field, $searchFields[$table]) == FALSE) {
329 $searchFields[$table][] = $field;
333 $rootLineHidden = $this->processor
->getRootLineIsHidden($this->pObj
->pageinfo
);
334 if(!$rootLineHidden ||
$this->modTS
['checkhidden']==1) {
335 // get children pages
336 $pageList = $this->processor
->extGetTreeList(
340 $GLOBALS['BE_USER']->getPagePermsClause(1),
341 $this->modTS
['checkhidden']
345 if($this->pObj
->pageinfo
['hidden'] == 0 ||
$this->modTS
['checkhidden']==1){
346 $pageList .= $this->pObj
->id
;
350 $this->processor
->init($searchFields, $pageList);
352 // check if button press
353 $update = t3lib_div
::_GP('updateLinkList');
355 if (!empty($update)) {
356 $this->processor
->getLinkStatistics($this->checkOpt
, $this->modTS
['checkhidden']);
362 * Renders the content of the module.
366 protected function render() {
367 if ($this->isAccessibleForCurrentUser
) {
368 $this->content
= $this->renderBrokenLinksTable();
370 // If no access or if ID == zero
371 $message = t3lib_div
::makeInstance(
372 't3lib_FlashMessage',
373 $GLOBALS['LANG']->getLL('no.access'),
374 $GLOBALS['LANG']->getLL('no.access.title'),
375 t3lib_FlashMessage
::ERROR
377 $this->content
.= $message->render();
383 * Flushes the rendered content to the browser.
385 * @param boolean $form
388 protected function flush($form = FALSE) {
389 $content = $this->doc
->moduleBody(
391 $this->getDocHeaderButtons(),
392 ($form) ?
$this->getTemplateMarkers(): $this->getTemplateMarkersCheck()
400 * Builds the selector for the level of pages to search.
402 * @return string Html code of that selector
404 protected function getLevelSelector() {
405 // Make level selector:
408 0 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_0'),
409 1 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_1'),
410 2 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_2'),
411 3 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_3'),
412 999 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_infi'),
415 foreach ($parts as $kv => $label) {
416 $opt[] = '<option value="' . $kv . '"' . ($kv == intval($this->searchLevel
) ?
' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
418 $lMenu = '<select name="search_levels">' . implode('', $opt) . '</select>';
423 * Displays the table of broken links or a note if there were no broken links.
425 * @return html Content of the table or of the note
427 protected function renderBrokenLinksTable() {
428 $items = $brokenLinksMarker = array();
429 $brokenLinkItems = $brokenLinksTemplate = '';
430 $brokenLinksTemplate = t3lib_parsehtml
::getSubpart($this->doc
->moduleTemplate
, '###NOBROKENLINKS_CONTENT###');
433 if (is_array($this->checkOpt
)) {
434 $keyOpt = array_keys($this->checkOpt
);
436 $rootLineHidden = $this->processor
->getRootLineIsHidden($this->pObj
->pageinfo
);
437 if(!$rootLineHidden ||
$this->modTS
['checkhidden']==1) {
438 $pageList = $this->processor
->extGetTreeList(
442 $GLOBALS['BE_USER']->getPagePermsClause(1),
443 $this->modTS
['checkhidden']
445 if($this->pObj
->pageinfo
['hidden'] == 0 ||
$this->modTS
['checkhidden']==1){
446 $pageList .= $this->pObj
->id
;
449 if (($res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
451 'tx_linkvalidator_link',
452 'record_pid in (' . $pageList . ') and link_type in (\'' . implode("','", $keyOpt) . '\')',
454 'record_uid ASC, uid ASC')
456 // Display table with broken links
457 if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0) {
458 $brokenLinksTemplate = t3lib_parsehtml
::getSubpart($this->doc
->moduleTemplate
, '###BROKENLINKS_CONTENT###');
460 $brokenLinksItemTemplate = t3lib_parsehtml
::getSubpart($this->doc
->moduleTemplate
, '###BROKENLINKS_ITEM###');
463 $brokenLinksMarker = $this->startTable();
465 // Table rows containing the broken links
466 while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) {
467 $items[] = $this->renderTableRow($row['table_name'], $row, $brokenLinksItemTemplate);
469 $brokenLinkItems = implode(chr(10), $items);
471 // Display note that there are no broken links to display
473 $brokenLinksMarker = $this->getNoBrokenLinkMessage($brokenLinksMarker);
479 $brokenLinksMarker = $this->getNoBrokenLinkMessage($brokenLinksMarker);
481 $brokenLinksTemplate = t3lib_parsehtml
::substituteMarkerArray($brokenLinksTemplate, $brokenLinksMarker, '###|###', TRUE);
482 $content = t3lib_parsehtml
::substituteSubpart($brokenLinksTemplate, '###BROKENLINKS_ITEM', $brokenLinkItems);
487 protected function getNoBrokenLinkMessage($brokenLinksMarker){
488 $brokenLinksMarker['LIST_HEADER'] = $this->doc
->sectionHeader($GLOBALS['LANG']->getLL('list.header'));
489 $message = t3lib_div
::makeInstance(
490 't3lib_FlashMessage',
491 $GLOBALS['LANG']->getLL('list.no.broken.links'),
492 $GLOBALS['LANG']->getLL('list.no.broken.links.title'),
493 t3lib_FlashMessage
::OK
495 $brokenLinksMarker['NO_BROKEN_LINKS'] = $message->render();
497 return $brokenLinksMarker;
501 * Displays the table header of the table with the broken links.
503 * @return string Code of content
505 protected function startTable() {
508 $makerTableHead = array();
510 $makerTableHead['tablehead_path'] = $GLOBALS['LANG']->getLL('list.tableHead.path');
511 $makerTableHead['tablehead_element'] = $GLOBALS['LANG']->getLL('list.tableHead.element');
512 $makerTableHead['tablehead_headlink'] = $GLOBALS['LANG']->getLL('list.tableHead.headlink');
513 $makerTableHead['tablehead_linktarget'] = $GLOBALS['LANG']->getLL('list.tableHead.linktarget');
514 $makerTableHead['tablehead_linkmessage'] = $GLOBALS['LANG']->getLL('list.tableHead.linkmessage');
515 $makerTableHead['tablehead_lastcheck'] = $GLOBALS['LANG']->getLL('list.tableHead.lastCheck');
517 // Add CSH to the header of each column
518 foreach($makerTableHead as $column => $label) {
519 $label = t3lib_BEfunc
::wrapInHelp('linkvalidator', $column, $label);
520 $makerTableHead[$column] = $label;
523 // Add section header
524 $makerTableHead['list_header'] = $this->doc
->sectionHeader($GLOBALS['LANG']->getLL('list.header'));
526 return $makerTableHead;
531 * Displays one line of the broken links table.
533 * @param string $table Name of database table
534 * @param array $row Record row to be processed
535 * @param array $brokenLinksItemTemplate Markup of the template to be used
536 * @return string HTML of the rendered row
538 protected function renderTableRow($table, array $row, $brokenLinksItemTemplate) {
539 $markerArray = array();
540 if (is_array($row) && !empty($row['link_type'])) {
541 if (($hookObj = $this->hookObjectsArr
[$row['link_type']])) {
542 $brokenUrl = $hookObj->getBrokenUrl($row);
546 $params = '&edit[' . $table . '][' . $row['record_uid'] . ']=edit';
547 $actionLinks = '<a href="#" onclick="' .
548 t3lib_BEfunc
::editOnClick(
550 $GLOBALS['BACK_PATH'],
551 t3lib_div
::getIndpEnv('REQUEST_URI') . '?id=' . $this->pObj
->id
. '&search_levels=' . $this->searchLevel
553 ' title="' . $GLOBALS['LANG']->getLL('list.edit') . '">' .
554 t3lib_iconWorks
::getSpriteIcon('actions-document-open') . '</a>';
556 $elementHeadline = $row['headline'];
557 if (empty($elementHeadline)) {
558 $elementHeadline = '<i>' . $GLOBALS['LANG']->getLL('list.no.headline') . '</i>';
561 // Get the language label for the field from TCA
562 if ($GLOBALS['TCA'][$table]['columns'][$row['field']]['label']) {
563 $fieldName = $GLOBALS['TCA'][$table]['columns'][$row['field']]['label'];
564 $fieldName = $GLOBALS['LANG']->sL($fieldName);
565 // Crop colon from end if present.
566 if (substr($fieldName, '-1', '1') === ':') {
567 $fieldName = substr($fieldName, '0', strlen($fieldName)-1);
570 // Fallback, if there is no label
571 $fieldName = $fieldName ?
$fieldName : $row['field'];
574 $element = t3lib_iconWorks
::getSpriteIconForRecord($table, $row, array('title' => $table . ':' . $row['record_uid']));
575 $element .= $elementHeadline;
576 $element .= ' ' . sprintf($GLOBALS['LANG']->getLL('list.field'), $fieldName);
578 $markerArray['actionlink'] = $actionLinks;
579 $markerArray['path'] = t3lib_BEfunc
::getRecordPath($row['record_pid'], '', 0, 0);
580 $markerArray['element'] = $element;
581 $markerArray['headlink'] = $row['link_title'];
582 $markerArray['linktarget'] = $brokenUrl;
584 $response = unserialize($row['url_response']);
585 if ($response['valid']) {
586 $linkMessage = '<span style="color: green;">' . $GLOBALS['LANG']->getLL('list.msg.ok') . '</span>';
588 $linkMessage = '<span style="color: red;">' . $hookObj->getErrorMessage($response['errorParams']) . '</span>';
590 $markerArray['linkmessage'] = $linkMessage;
592 $lastRunDate = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $row['last_check']);
593 $lastRunTime = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $row['last_check']);
594 $message = sprintf($GLOBALS['LANG']->getLL('list.msg.lastRun'), $lastRunDate, $lastRunTime);
595 $markerArray['lastcheck'] = $message;
597 // Return the table html code as string
598 return t3lib_parsehtml
::substituteMarkerArray($brokenLinksItemTemplate, $markerArray, '###|###', TRUE, TRUE);
603 * Builds the checkboxes out of the hooks array.
605 * @param array $brokenLinkOverView array of broken links information
606 * @return string code content
608 protected function getCheckOptions(array $brokenLinkOverView, $prefix = '') {
609 $markerArray = array();
610 $additionalAttr = '';
611 if(!empty($prefix)) {
612 $additionalAttr = ' onclick="toggleActionButton(\'' . $prefix . '\');" class="' . $prefix . '" ';
615 $additionalAttr = ' onclick="toggleActionButton(\'refresh\');" class="refresh" ';
617 $checkOptionsTemplate = t3lib_parsehtml
::getSubpart($this->doc
->moduleTemplate
, '###CHECKOPTIONS_SECTION###');
619 $hookSectionContent = '';
620 $hookSectionTemplate = t3lib_parsehtml
::getSubpart($checkOptionsTemplate, '###HOOK_SECTION###');
622 $markerArray['statistics_header'] = $this->doc
->sectionHeader($GLOBALS['LANG']->getLL('report.statistics.header'));
624 $totalCountLabel = $GLOBALS['LANG']->getLL('overviews.nbtotal');
625 $totalCountLabel = t3lib_BEfunc
::wrapInHelp('linkvalidator', 'checkboxes', $totalCountLabel);
626 $markerArray['total_count_label'] = $totalCountLabel;
628 if (empty($brokenLinkOverView['brokenlinkCount'])) {
629 $markerArray['total_count'] = '0';
631 $markerArray['total_count'] = $brokenLinkOverView['brokenlinkCount'];
634 $linktypes = t3lib_div
::trimExplode(',', $this->modTS
['linktypes'], 1);
635 $hookSectionContent = '';
637 if (is_array($linktypes)) {
638 if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])
639 && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])
641 foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $type => $value) {
642 if (in_array($type, $linktypes)) {
643 $hookSectionMarker = array();
644 if (empty($brokenLinkOverView[$type])) {
645 $hookSectionMarker['count'] = '0';
647 $hookSectionMarker['count'] = $brokenLinkOverView[$type];
649 $translation = $GLOBALS['LANG']->getLL('hooks.' . $type);
650 $translation = $translation ?
$translation : $type;
651 $option = '<input type="checkbox" ' . $additionalAttr . ' id="' . $prefix . 'SET_' . $type . '" name="' . $prefix . 'SET[' . $type . ']" value="1"' . ($this->pObj
->MOD_SETTINGS
[$type] ?
' checked="checked"' : '') .
652 '/>'.'<label for="' . $prefix . 'SET[' . $type . ']">' . htmlspecialchars( $translation ) . '</label>';
653 $hookSectionMarker['option'] = $option;
654 $hookSectionContent .= t3lib_parsehtml
::substituteMarkerArray($hookSectionTemplate, $hookSectionMarker, '###|###', TRUE, TRUE);
660 $checkOptionsTemplate = t3lib_parsehtml
::substituteSubpart($checkOptionsTemplate, '###HOOK_SECTION###', $hookSectionContent);
662 return t3lib_parsehtml
::substituteMarkerArray($checkOptionsTemplate, $markerArray, '###|###', TRUE, TRUE);
667 * Loads data in the HTML head section (e.g. JavaScript or stylesheet information).
671 protected function loadHeaderData() {
672 $this->doc
->addStyleSheet('linkvalidator', $this->relativePath
. 'res/linkvalidator.css', 'linkvalidator');
673 $this->doc
->getPageRenderer()->addJsFile($this->doc
->backPath
. '../t3lib/js/extjs/ux/Ext.ux.FitToParent.js');
678 * Gets the buttons that shall be rendered in the docHeader.
680 * @return array Available buttons for the docHeader
682 protected function getDocHeaderButtons() {
684 'csh' => t3lib_BEfunc
::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']),
685 'shortcut' => $this->getShortcutButton(),
693 * Gets the button to set a new shortcut in the backend (if current user is allowed to).
695 * @return string HTML representiation of the shortcut button
697 protected function getShortcutButton() {
699 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
700 $result = $this->doc
->makeShortcutIcon('', 'function', $this->MCONF
['name']);
707 * Gets the filled markers that are used in the HTML template.
709 * @return array The filled marker array
711 protected function getTemplateMarkers() {
713 'FUNC_TITLE' => $GLOBALS['LANG']->getLL('report.func.title'),
714 'CHECKOPTIONS_TITLE' => $GLOBALS['LANG']->getLL('report.statistics.header'),
715 'FUNC_MENU' => $this->getLevelSelector(),
716 'CONTENT' => $this->content
,
717 'CHECKALLLINK' => $this->checkAllHtml
,
718 'CHECKOPTIONS' => $this->checkOptHtml
,
719 'ID' => '<input type="hidden" name="id" value="' . $this->pObj
->id
. '" />',
720 'REFRESH' => $this->refreshListHtml
,
728 * Gets the filled markers that are used in the HTML template.
730 * @return array The filled marker array
732 protected function getTemplateMarkersCheck() {
734 'FUNC_TITLE' =>$GLOBALS['LANG']->getLL('checklinks.func.title'),
735 'CHECKOPTIONS_TITLE' =>$GLOBALS['LANG']->getLL('checklinks.statistics.header'),
736 'FUNC_MENU' => $this->getLevelSelector(),
738 'CHECKALLLINK' => $this->checkAllHtml
,
739 'CHECKOPTIONS' => $this->checkOptHtmlCheck
,
740 'ID' => '<input type="hidden" name="id" value="' . $this->pObj
->id
. '" />',
742 'UPDATE' => $this->updateListHtml
750 * Determines whether the current user is an admin.
752 * @return boolean Whether the current user is admin
754 protected function isCurrentUserAdmin() {
755 return ((bool) $GLOBALS['BE_USER']->user
['admin']);
759 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE
]['XCLASS']['ext/linkvalidator/modfuncreport/class.tx_linkvalidator_modfuncreport.php'])) {
760 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE
]['XCLASS']['ext/linkvalidator/modfuncreport/class.tx_linkvalidator_modfuncreport.php']);