TYPO3 CMS  TYPO3_6-2
LinkValidatorReport.php
Go to the documentation of this file.
1 <?php
3 
19 
27 
31  public $doc;
32 
36  protected $relativePath;
37 
43  protected $pageRecord = array();
44 
50  protected $isAccessibleForCurrentUser = FALSE;
51 
57  protected $searchLevel;
58 
64  protected $processor;
65 
71  protected $modTS = array();
72 
78  protected $availableOptions = array();
79 
86  protected $checkOpt = array();
87 
93  protected $updateListHtml;
94 
100  protected $refreshListHtml;
101 
108  protected $checkOptHtml;
109 
117 
123  protected $content;
124 
128  protected $pageRenderer;
129 
133  protected $hookObjectsArr = array();
134 
138  protected $checkAllHtml = '';
139 
145  public function main() {
146  $GLOBALS['LANG']->includeLLFile('EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf');
147  $this->searchLevel = GeneralUtility::_GP('search_levels');
148  if (isset($this->pObj->id)) {
149  $this->modTS = BackendUtility::getModTSconfig($this->pObj->id, 'mod.linkvalidator');
150  $this->modTS = $this->modTS['properties'];
151  }
152  $update = GeneralUtility::_GP('updateLinkList');
153  $prefix = '';
154  if (!empty($update)) {
155  $prefix = 'check';
156  }
157  $set = GeneralUtility::_GP($prefix . 'SET');
158  $this->pObj->handleExternalFunctionValue();
159  if (isset($this->searchLevel)) {
160  $this->pObj->MOD_SETTINGS['searchlevel'] = $this->searchLevel;
161  } else {
162  $this->searchLevel = $this->pObj->MOD_SETTINGS['searchlevel'];
163  }
164  if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
165  foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $linkType => $value) {
166  // Compile list of all available types. Used for checking with button "Check Links".
167  if (strpos($this->modTS['linktypes'], $linkType) !== FALSE) {
168  $this->availableOptions[$linkType] = 1;
169  }
170  // Compile list of types currently selected by the checkboxes
171  if ($this->pObj->MOD_SETTINGS[$linkType] && empty($set) || $set[$linkType]) {
172  $this->checkOpt[$linkType] = 1;
173  $this->pObj->MOD_SETTINGS[$linkType] = 1;
174  } else {
175  $this->pObj->MOD_SETTINGS[$linkType] = 0;
176  unset($this->checkOpt[$linkType]);
177  }
178  }
179  }
180  $GLOBALS['BE_USER']->pushModuleData('web_info', $this->pObj->MOD_SETTINGS);
181  $this->initialize();
182 
183  // Localization
184  $this->pageRenderer->addInlineLanguageLabelFile(
185  \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('linkvalidator', 'Resources/Private/Language/Module/locallang.xlf')
186  );
187  $this->pageRenderer->addJsInlineCode('linkvalidator', 'function toggleActionButton(prefix) {
188  var buttonDisable = true;
189  Ext.select(\'.\' + prefix ,false).each(function(checkBox,i){
190  checkDom = checkBox.dom;
191  if (checkDom.checked){
192  buttonDisable = false;
193  }
194 
195  });
196  if (prefix == \'check\'){
197  checkSub = document.getElementById(\'updateLinkList\');
198  } else {
199  checkSub = document.getElementById(\'refreshLinkList\');
200  }
201  checkSub.disabled = buttonDisable;
202  }');
203  // Add JS
204  $this->pageRenderer->addJsFile($this->doc->backPath . 'js/extjs/ux/Ext.ux.FitToParent.js');
205  $this->pageRenderer->addJsFile($this->doc->backPath . 'sysext/backend/Resources/Public/JavaScript/flashmessages.js');
206  $this->pageRenderer->addJsFile($this->doc->backPath . 'sysext/backend/Resources/Public/JavaScript/iframepanel.js');
207  if ($this->modTS['showCheckLinkTab'] == 1) {
208  $this->updateListHtml = '<input type="submit" name="updateLinkList" id="updateLinkList" value="' . $GLOBALS['LANG']->getLL('label_update') . '"/>';
209  }
210  $this->refreshListHtml = '<input type="submit" name="refreshLinkList" id="refreshLinkList" value="' . $GLOBALS['LANG']->getLL('label_refresh') . '"/>';
211  $this->processor = GeneralUtility::makeInstance('TYPO3\\CMS\\Linkvalidator\\LinkAnalyzer');
212  $this->updateBrokenLinks();
213  $brokenLinkOverView = $this->processor->getLinkCounts($this->pObj->id);
214  $this->checkOptHtml = $this->getCheckOptions($brokenLinkOverView);
215  $this->checkOptHtmlCheck = $this->getCheckOptions($brokenLinkOverView, 'check');
216  $this->createTabs();
217  return '<div id="linkvalidator-modfuncreport"></div>';
218  }
219 
225  protected function createTabs() {
226  $panelCheck = '';
227  if ($this->modTS['showCheckLinkTab'] == 1) {
228  $panelCheck = ',
229  {
230  title: TYPO3.l10n.localize(\'CheckLink\'),
231  html: ' . json_encode($this->flush()) . ',
232  }';
233  }
234  $this->render();
235  $js = 'var panel = new Ext.TabPanel( {
236  renderTo: \'linkvalidator-modfuncreport\',
237  id: \'linkvalidator-main\',
238  plain: true,
239  activeTab: 0,
240  bodyStyle: \'padding:10px;\',
241  items : [
242  {
243  autoHeight: true,
244  title: TYPO3.l10n.localize(\'Report\'),
245  html: ' . json_encode($this->flush(TRUE)) . '
246  }' . $panelCheck . '
247  ]
248 
249  });
250  ';
251  $this->pageRenderer->addExtOnReadyCode($js);
252  }
253 
259  public function modMenu() {
260  $modMenu = array(
261  'checkAllLink' => 0
262  );
263  if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
264  foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $linkType => $value) {
265  $modMenu[$linkType] = 1;
266  }
267  }
268  return $modMenu;
269  }
270 
276  protected function initialize() {
277  if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
278  foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $linkType => $classRef) {
279  $this->hookObjectsArr[$linkType] = GeneralUtility::getUserObj($classRef);
280  }
281  }
282  $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
283  $this->doc->backPath = $GLOBALS['BACK_PATH'];
284  $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('linkvalidator') . 'Resources/Private/Templates/mod_template.html');
285  $this->relativePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('linkvalidator');
286  $this->pageRecord = BackendUtility::readPageAccess($this->pObj->id, $GLOBALS['BE_USER']->getPagePermsClause(1));
287  $this->pageRenderer = $this->doc->getPageRenderer();
288  $this->isAccessibleForCurrentUser = FALSE;
289  if ($this->pObj->id && is_array($this->pageRecord) || !$this->pObj->id && $this->isCurrentUserAdmin()) {
290  $this->isAccessibleForCurrentUser = TRUE;
291  }
292  $this->loadHeaderData();
293  // Don't access in workspace
294  if ($GLOBALS['BE_USER']->workspace !== 0) {
295  $this->isAccessibleForCurrentUser = FALSE;
296  }
297  }
298 
304  protected function updateBrokenLinks() {
305  $searchFields = array();
306  // Get the searchFields from TypoScript
307  foreach ($this->modTS['searchFields.'] as $table => $fieldList) {
308  $fields = GeneralUtility::trimExplode(',', $fieldList);
309  foreach ($fields as $field) {
310  if (!$searchFields || !is_array($searchFields[$table]) || array_search($field, $searchFields[$table]) == FALSE) {
311  $searchFields[$table][] = $field;
312  }
313  }
314  }
315  $rootLineHidden = $this->processor->getRootLineIsHidden($this->pObj->pageinfo);
316  if (!$rootLineHidden || $this->modTS['checkhidden'] == 1) {
317  // Get children pages
318  $pageList = $this->processor->extGetTreeList($this->pObj->id, $this->searchLevel, 0, $GLOBALS['BE_USER']->getPagePermsClause(1), $this->modTS['checkhidden']);
319  if ($this->pObj->pageinfo['hidden'] == 0 || $this->modTS['checkhidden'] == 1) {
320  $pageList .= $this->pObj->id;
321  }
322  $this->processor->init($searchFields, $pageList);
323  // Check if button press
324  $update = GeneralUtility::_GP('updateLinkList');
325  if (!empty($update)) {
326  $this->processor->getLinkStatistics($this->checkOpt, $this->modTS['checkhidden']);
327  }
328  }
329  }
330 
336  protected function render() {
337  if ($this->isAccessibleForCurrentUser) {
338  $this->content = $this->renderBrokenLinksTable();
339  } else {
340  // If no access or if ID == zero
342  $message = GeneralUtility::makeInstance(
343  'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
344  $GLOBALS['LANG']->getLL('no.access'),
345  $GLOBALS['LANG']->getLL('no.access.title'),
346  \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
347  );
348  $this->content .= $message->render();
349  }
350  }
351 
358  protected function flush($form = FALSE) {
359  $content = $this->doc->moduleBody(
360  $this->pageRecord,
361  $this->getDocHeaderButtons(),
362  $form ? $this->getTemplateMarkers() : $this->getTemplateMarkersCheck()
363  );
364  return $content;
365  }
366 
372  protected function getLevelSelector() {
373  // Build level selector
374  $opt = array();
375  $parts = array(
376  0 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_0'),
377  1 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_1'),
378  2 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_2'),
379  3 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_3'),
380  999 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.depth_infi')
381  );
382  foreach ($parts as $kv => $label) {
383  $opt[] = '<option value="' . $kv . '"' . ($kv == (int)$this->searchLevel ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
384  }
385  $lMenu = '<select name="search_levels">' . implode('', $opt) . '</select>';
386  return $lMenu;
387  }
388 
394  protected function renderBrokenLinksTable() {
395  $items = ($brokenLinksMarker = array());
396  $brokenLinkItems = '';
397  $brokenLinksTemplate = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($this->doc->moduleTemplate, '###NOBROKENLINKS_CONTENT###');
398  $keyOpt = array();
399  if (is_array($this->checkOpt)) {
400  $keyOpt = array_keys($this->checkOpt);
401  }
402  $rootLineHidden = $this->processor->getRootLineIsHidden($this->pObj->pageinfo);
403  if (!$rootLineHidden || $this->modTS['checkhidden'] == 1) {
404  $pageList = $this->processor->extGetTreeList(
405  $this->pObj->id,
406  $this->searchLevel,
407  0,
408  $GLOBALS['BE_USER']->getPagePermsClause(1),
409  $this->modTS['checkhidden']
410  );
411  // Always add the current page, because we are just displaying the results
412  $pageList .= $this->pObj->id;
413  if (($res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
414  '*',
415  'tx_linkvalidator_link',
416  'record_pid in (' . $pageList . ') and link_type in (\'' . implode('\',\'', $keyOpt) . '\')',
417  '',
418  'record_uid ASC, uid ASC')
419  )) {
420  // Display table with broken links
421  if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0) {
422  $brokenLinksTemplate = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($this->doc->moduleTemplate, '###BROKENLINKS_CONTENT###');
423  $brokenLinksItemTemplate = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($this->doc->moduleTemplate, '###BROKENLINKS_ITEM###');
424  // Table header
425  $brokenLinksMarker = $this->startTable();
426  // Table rows containing the broken links
427  while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) !== FALSE) {
428  $items[] = $this->renderTableRow($row['table_name'], $row, $brokenLinksItemTemplate);
429  }
430  $brokenLinkItems = implode(chr(10), $items);
431  } else {
432  $brokenLinksMarker = $this->getNoBrokenLinkMessage($brokenLinksMarker);
433  }
434  $GLOBALS['TYPO3_DB']->sql_free_result($res);
435  }
436  } else {
437  $brokenLinksMarker = $this->getNoBrokenLinkMessage($brokenLinksMarker);
438  }
439  $brokenLinksTemplate = \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray(
440  $brokenLinksTemplate,
441  $brokenLinksMarker, '###|###',
442  TRUE
443  );
444  $content = \TYPO3\CMS\Core\Html\HtmlParser::substituteSubpart($brokenLinksTemplate, '###BROKENLINKS_ITEM', $brokenLinkItems);
445  return $content;
446  }
447 
454  protected function getNoBrokenLinkMessage(array $brokenLinksMarker) {
455  $brokenLinksMarker['LIST_HEADER'] = $this->doc->sectionHeader($GLOBALS['LANG']->getLL('list.header'));
457  $message = GeneralUtility::makeInstance(
458  'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
459  $GLOBALS['LANG']->getLL('list.no.broken.links'),
460  $GLOBALS['LANG']->getLL('list.no.broken.links.title'),
461  \TYPO3\CMS\Core\Messaging\FlashMessage::OK
462  );
463  $brokenLinksMarker['NO_BROKEN_LINKS'] = $message->render();
464  return $brokenLinksMarker;
465  }
466 
472  protected function startTable() {
473  // Listing head
474  $makerTableHead = array();
475  $makerTableHead['tablehead_path'] = $GLOBALS['LANG']->getLL('list.tableHead.path');
476  $makerTableHead['tablehead_element'] = $GLOBALS['LANG']->getLL('list.tableHead.element');
477  $makerTableHead['tablehead_headlink'] = $GLOBALS['LANG']->getLL('list.tableHead.headlink');
478  $makerTableHead['tablehead_linktarget'] = $GLOBALS['LANG']->getLL('list.tableHead.linktarget');
479  $makerTableHead['tablehead_linkmessage'] = $GLOBALS['LANG']->getLL('list.tableHead.linkmessage');
480  $makerTableHead['tablehead_lastcheck'] = $GLOBALS['LANG']->getLL('list.tableHead.lastCheck');
481  // Add CSH to the header of each column
482  foreach ($makerTableHead as $column => $label) {
483  $label = BackendUtility::wrapInHelp('linkvalidator', $column, $label);
484  $makerTableHead[$column] = $label;
485  }
486  // Add section header
487  $makerTableHead['list_header'] = $this->doc->sectionHeader($GLOBALS['LANG']->getLL('list.header'));
488  return $makerTableHead;
489  }
490 
499  protected function renderTableRow($table, array $row, $brokenLinksItemTemplate) {
500  $markerArray = array();
501  $fieldName = '';
502  // Restore the linktype object
503  $hookObj = $this->hookObjectsArr[$row['link_type']];
504  $brokenUrl = $hookObj->getBrokenUrl($row);
505  // Construct link to edit the content element
506  $params = '&edit[' . $table . '][' . $row['record_uid'] . ']=edit';
507  $requestUri = GeneralUtility::getIndpEnv('REQUEST_URI') .
508  '&id=' . $this->pObj->id .
509  '&search_levels=' . $this->searchLevel;
510  $actionLink = '<a href="#" onclick="';
511  $actionLink .= htmlspecialchars(BackendUtility::editOnClick(
512  $params,
513  $GLOBALS['BACK_PATH'],
514  $requestUri
515  ));
516  $actionLink .= '" title="' . htmlspecialchars($GLOBALS['LANG']->getLL('list.edit')) . '">';
517  $actionLink .= \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open');
518  $actionLink .= '</a>';
519  $elementHeadline = $row['headline'];
520  // Get the language label for the field from TCA
521  if ($GLOBALS['TCA'][$table]['columns'][$row['field']]['label']) {
522  $fieldName = $GLOBALS['TCA'][$table]['columns'][$row['field']]['label'];
523  $fieldName = $GLOBALS['LANG']->sL($fieldName);
524  // Crop colon from end if present
525  if (substr($fieldName, '-1', '1') === ':') {
526  $fieldName = substr($fieldName, '0', strlen($fieldName) - 1);
527  }
528  }
529  // Fallback, if there is no label
530  $fieldName = !empty($fieldName) ? $fieldName : $row['field'];
531  // column "Element"
532  $element = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord(
533  $table,
534  $row,
535  array('title' => $table . ':' . $row['record_uid'])
536  );
537  if (empty($elementHeadline)) {
538  $element .= '<i>' . htmlspecialchars($GLOBALS['LANG']->getLL('list.no.headline')) . '</i>';
539  } else {
540  $element .= htmlspecialchars($elementHeadline);
541  }
542  $element .= ' ' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('list.field'), $fieldName));
543  $markerArray['actionlink'] = $actionLink;
544  $markerArray['path'] = BackendUtility::getRecordPath($row['record_pid'], '', 0, 0);
545  $markerArray['element'] = $element;
546  $markerArray['headlink'] = htmlspecialchars($row['link_title']);
547  $markerArray['linktarget'] = htmlspecialchars($brokenUrl);
548  $response = unserialize($row['url_response']);
549  if ($response['valid']) {
550  $linkMessage = '<span style="color: green;">' . htmlspecialchars($GLOBALS['LANG']->getLL('list.msg.ok')) . '</span>';
551  } else {
552  $linkMessage = '<span style="color: red;">'
553  . nl2br(
554  // Encode for output
555  htmlspecialchars(
556  $hookObj->getErrorMessage($response['errorParams']),
557  ENT_QUOTES,
558  'UTF-8',
559  FALSE
560  )
561  )
562  . '</span>';
563  }
564  $markerArray['linkmessage'] = $linkMessage;
565  $lastRunDate = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $row['last_check']);
566  $lastRunTime = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $row['last_check']);
567  $message = sprintf($GLOBALS['LANG']->getLL('list.msg.lastRun'), $lastRunDate, $lastRunTime);
568  $markerArray['lastcheck'] = htmlspecialchars($message);
569  // Return the table html code as string
570  return \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray($brokenLinksItemTemplate, $markerArray, '###|###', TRUE, TRUE);
571  }
572 
580  protected function getCheckOptions(array $brokenLinkOverView, $prefix = '') {
581  $markerArray = array();
582  $additionalAttr = '';
583  if (!empty($prefix)) {
584  $additionalAttr = ' onclick="toggleActionButton(\'' . $prefix . '\');" class="' . $prefix . '" ';
585  } else {
586  $additionalAttr = ' onclick="toggleActionButton(\'refresh\');" class="refresh" ';
587  }
588  $checkOptionsTemplate = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($this->doc->moduleTemplate, '###CHECKOPTIONS_SECTION###');
589  $hookSectionTemplate = \TYPO3\CMS\Core\Html\HtmlParser::getSubpart($checkOptionsTemplate, '###HOOK_SECTION###');
590  $markerArray['statistics_header'] = $this->doc->sectionHeader($GLOBALS['LANG']->getLL('report.statistics.header'));
591  $totalCountLabel = $GLOBALS['LANG']->getLL('overviews.nbtotal');
592  $totalCountLabel = BackendUtility::wrapInHelp('linkvalidator', 'checkboxes', $totalCountLabel);
593  $markerArray['total_count_label'] = $totalCountLabel;
594  if (empty($brokenLinkOverView['brokenlinkCount'])) {
595  $markerArray['total_count'] = '0';
596  } else {
597  $markerArray['total_count'] = $brokenLinkOverView['brokenlinkCount'];
598  }
599  $linktypes = GeneralUtility::trimExplode(',', $this->modTS['linktypes'], TRUE);
600  $hookSectionContent = '';
601  if (is_array($linktypes)) {
602  if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])
603  && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
604  foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $type => $value) {
605  if (in_array($type, $linktypes)) {
606  $hookSectionMarker = array();
607  if (empty($brokenLinkOverView[$type])) {
608  $hookSectionMarker['count'] = '0';
609  } else {
610  $hookSectionMarker['count'] = $brokenLinkOverView[$type];
611  }
612  $translation = $GLOBALS['LANG']->getLL('hooks.' . $type);
613  $translation = $translation ? $translation : $type;
614  $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>';
615  $hookSectionMarker['option'] = $option;
616  $hookSectionContent .= \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray(
617  $hookSectionTemplate,
618  $hookSectionMarker, '###|###',
619  TRUE,
620  TRUE
621  );
622  }
623  }
624  }
625  }
626  $checkOptionsTemplate = \TYPO3\CMS\Core\Html\HtmlParser::substituteSubpart(
627  $checkOptionsTemplate,
628  '###HOOK_SECTION###', $hookSectionContent
629  );
630  return \TYPO3\CMS\Core\Html\HtmlParser::substituteMarkerArray($checkOptionsTemplate, $markerArray, '###|###', TRUE, TRUE);
631  }
632 
638  protected function loadHeaderData() {
639  $this->doc->addStyleSheet('linkvalidator', $this->relativePath . 'Resources/Public/Css/linkvalidator.css', 'linkvalidator');
640  $this->pageRenderer->addJsFile($this->doc->backPath . 'js/extjs/ux/Ext.ux.FitToParent.js');
641  }
642 
648  protected function getDocHeaderButtons() {
649  $buttons = array(
650  'csh' => BackendUtility::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH']),
651  'shortcut' => $this->getShortcutButton(),
652  'save' => ''
653  );
654  return $buttons;
655  }
656 
662  protected function getShortcutButton() {
663  $result = '';
664  if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
665  $result = $this->doc->makeShortcutIcon('', 'function', $this->MCONF['name']);
666  }
667  return $result;
668  }
669 
675  protected function getTemplateMarkers() {
676  $markers = array(
677  'FUNC_TITLE' => $GLOBALS['LANG']->getLL('report.func.title'),
678  'CHECKOPTIONS_TITLE' => $GLOBALS['LANG']->getLL('report.statistics.header'),
679  'FUNC_MENU' => $this->getLevelSelector(),
680  'CONTENT' => $this->content,
681  'CHECKALLLINK' => $this->checkAllHtml,
682  'CHECKOPTIONS' => $this->checkOptHtml,
683  'ID' => '<input type="hidden" name="id" value="' . $this->pObj->id . '" />',
684  'REFRESH' => $this->refreshListHtml,
685  'UPDATE' => ''
686  );
687  return $markers;
688  }
689 
695  protected function getTemplateMarkersCheck() {
696  $markers = array(
697  'FUNC_TITLE' => $GLOBALS['LANG']->getLL('checklinks.func.title'),
698  'CHECKOPTIONS_TITLE' => $GLOBALS['LANG']->getLL('checklinks.statistics.header'),
699  'FUNC_MENU' => $this->getLevelSelector(),
700  'CONTENT' => '',
701  'CHECKALLLINK' => $this->checkAllHtml,
702  'CHECKOPTIONS' => $this->checkOptHtmlCheck,
703  'ID' => '<input type="hidden" name="id" value="' . $this->pObj->id . '" />',
704  'REFRESH' => '',
705  'UPDATE' => $this->updateListHtml
706  );
707  return $markers;
708  }
709 
715  protected function isCurrentUserAdmin() {
716  return (bool) $GLOBALS['BE_USER']->user['admin'];
717  }
718 
719 }
static readPageAccess($id, $perms_clause)
static getUserObj($classRef, $checkPrefix='', $silent=FALSE)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
static getSubpart($content, $marker)
Definition: HtmlParser.php:39
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]