2011-08-26 Philipp Gampe <forge.typo3.org@philippgampe.info>
* [BUGFIX] Fatal error with E_STRICT: Declaration of fetchType must be compatible with interface
+ * [TASK] Fix phpdoc and method signatures
2011-08-26 Christopher Stelmaszyk <chrissitopher@gmx.de>
***************************************************************/
/**
- * This class provides Processing plugin implementation.
+ * This class provides Processing plugin implementation
*
* @author Michael Miousse <michael.miousse@infoglobe.ca>
* @author Jochen Rieger <j.rieger@connecta.ag>
class tx_linkvalidator_Processor {
/**
- * Array of tables and fields to search for broken links.
+ * Array of tables and fields to search for broken links
*
* @var array
*/
protected $searchFields = array();
/**
- * List of comma seperated page uids (rootline downwards).
+ * List of comma separated page uids (rootline downwards)
*
* @var string
*/
protected $pidList = '';
/**
- * Array of tables and the number of external links they contain.
+ * Array of tables and the number of external links they contain
*
* @var array
*/
protected $linkCounts = array();
/**
- * Array of tables and the number of broken external links they contain.
+ * Array of tables and the number of broken external links they contain
*
* @var array
*/
protected $brokenLinkCounts = array();
/**
- * Array of tables and records containing broken links.
+ * Array of tables and records containing broken links
*
* @var array
*/
protected $recordsWithBrokenLinks = array();
/**
- * Array for hooks for own checks.
+ * Array for hooks for own checks
*
* @var array
*/
protected $hookObjectsArr = array();
/**
- * Array with information about the current page.
+ * Array with information about the current page
*
* @var array
*/
}
/**
- * Init Function: Here all the needed configuration values are stored in class variables.
+ * Store all the needed configuration values in class variables
*
- * @param array $searchField: list of fields in which to search for links
- * @param string $pid: list of comma separated page uids in which to search for links
+ * @param array $searchField List of fields in which to search for links
+ * @param string $pid List of comma separated page uids in which to search for links
* @return void
*/
- public function init($searchField, $pid) {
+ public function init(array $searchField, $pid) {
$this->searchFields = $searchField;
$this->pidList = $pid;
}
/**
- * Find all supported broken links and store them in tx_linkvalidator_link.
+ * Find all supported broken links and store them in tx_linkvalidator_link
*
- * @param array $checkOptions: list of hook object to activate
- * @param boolean $considerHidden: defines whether to look into hidden fields or not
- * @return void
+ * @param array $checkOptions List of hook object to activate
+ * @param boolean $considerHidden Defines whether to look into hidden fields or not
+ * @return void
*/
public function getLinkStatistics($checkOptions = array(), $considerHidden = FALSE) {
$results = array();
- $checlLinkTypeCondition = '';
if(count($checkOptions) > 0) {
$checkKeys = array_keys($checkOptions);
- $checlLinkTypeCondition = ' and link_type in (\'' . implode('\',\'',$checkKeys) . '\')';
+ $checkLinkTypeCondition = ' and link_type in (\'' . implode('\',\'',$checkKeys) . '\')';
- $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_linkvalidator_link', '(record_pid in (' . $this->pidList . ') or ( record_uid IN (' . $this->pidList . ') and table_name like \'pages\')) ' . $checlLinkTypeCondition);
+ $GLOBALS['TYPO3_DB']->exec_DELETEquery('tx_linkvalidator_link',
+ '(record_pid in (' . $this->pidList . ') or ( record_uid IN (' . $this->pidList . ') and table_name like \'pages\')) '
+ . $checkLinkTypeCondition);
- // let's traverse all configured tables
+ // Traverse all configured tables
foreach ($this->searchFields as $table => $fields) {
if($table == 'pages'){
$where = 'deleted = 0 AND uid IN (' . $this->pidList . ')';
if (!$considerHidden) {
$where .= t3lib_BEfunc::BEenableFields($table);
}
- // if table is not configured, we assume the ext is not installed and therefore no need to check it
+ // If table is not configured, assume the extension is not installed and therefore no need to check it
if (!is_array($GLOBALS['TCA'][$table])) continue;
- // re-init selectFields for table
+ // Re-init selectFields for table
$selectFields = 'uid, pid';
$selectFields .= ', ' . $GLOBALS['TCA'][$table]['ctrl']['label'] . ', ' . implode(', ', $fields);
foreach ($this->hookObjectsArr as $key => $hookObj) {
if ((is_array($results[$key])) && empty($checkOptions) || (is_array($results[$key]) && $checkOptions[$key])) {
- // check'em!
+ // Check them
foreach ($results[$key] as $entryKey => $entryValue) {
$table = $entryValue['table'];
$record = array();
$this->pageWithAnchor = $entryValue['pageAndAnchor'];
if (!empty($this->pageWithAnchor)) {
- // page with anchor, e.g. 18#1580
+ // Page with anchor, e.g. 18#1580
$url = $this->pageWithAnchor;
} else {
$url = $entryValue['substr']['tokenValue'];
$this->linkCounts[$table]++;
$checkURL = $hookObj->checkLink($url, $entryValue, $this);
- // broken link found!
+ // Broken link found
if (!$checkURL) {
$response = array();
$response['valid'] = FALSE;
/**
- * Find all supported broken links for a specific record.
+ * Find all supported broken links for a specific record
*
- * @param array $results: array of broken links
- * @param string $table: table name of the record
- * @param array $fields: array of fields to analyze
- * @param array $record: record to analyse
- * @return void
+ * @param array $results Array of broken links
+ * @param string $table Table name of the record
+ * @param array $fields Array of fields to analyze
+ * @param array $record Record to analyse
+ * @return void
*/
- public function analyzeRecord(&$results, $table, $fields, $record) {
+ public function analyzeRecord(array &$results, $table, array $fields, array $record) {
- // array to store urls from relevant field contents
+ // Array to store urls from relevant field contents
$urls = array();
$referencedRecordType = '';
- // last-parsed link element was a page.
+ // Last-parsed link element was a page
$wasPage = TRUE;
- // flag whether row contains a broken link in some field or not
+ // Flag whether row contains a broken link in some field or not
$rowContainsBrokenLink = FALSE;
- // put together content of all relevant fields
+ // Put together content of all relevant fields
$haystack = '';
$htmlParser = t3lib_div::makeInstance('t3lib_parsehtml');
$idRecord = $record['uid'];
- // get all references
+ // Get all references
foreach ($fields as $field) {
$haystack .= $record[$field] . ' --- ';
$conf = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
$valueField = $record[$field];
- // Check if a TCA configured field has softreferences defined (see TYPO3 Core API document)
+ // Check if a TCA configured field has soft references defined (see TYPO3 Core API document)
if ($conf['softref'] && strlen($valueField)) {
- // Explode the list of softreferences/parameters
+ // Explode the list of soft references/parameters
$softRefs = t3lib_BEfunc::explodeSoftRefParserList($conf['softref']);
// Traverse soft references
foreach ($softRefs as $spKey => $spParams) {
// create / get object
$softRefObj = &t3lib_BEfunc::softRefParserObj($spKey);
- // If there was an object returned...:
+ // If there is an object returned...
if (is_object($softRefObj)) {
// Do processing
}
/**
- * Find all supported broken links for a specific link lsit.
+ * Find all supported broken links for a specific link list
*
- * @param array $resultArray: findRef parsed records
- * @param array $results: array of broken links
+ * @param array $resultArray findRef parsed records
+ * @param array $results Array of broken links
+ * @param array $record UID of the current record
+ * @param string $field The current field
+ * @param string $table The current table
* @return void
*/
- private function analyseLinks($resultArray, &$results, $record, $field, $table) {
+ private function analyseLinks(array $resultArray, array &$results, array $record, $field, $table) {
foreach ($resultArray['elements'] as $element) {
$r = $element['subst'];
$title = '';
$idRecord = $record['uid'];
if (!empty($r)) {
// Parse string for special TYPO3 <link> tag:
-
foreach ($this->hookObjectsArr as $keyArr => $hookObj) {
$type = $hookObj->fetchType($r, $type, $keyArr);
}
}
/**
- * Find all supported broken links for a specific typoLink.
+ * Find all supported broken links for a specific typoLink
*
- * @param array $resultArray: findRef parsed records
- * @param array $results: array of broken links
- * @param t3lib_parsehtml $htmlParser: instance of htmlparser
- * @return void
+ * @param array $resultArray findRef parsed records
+ * @param array $results Array of broken links
+ * @param t3lib_parsehtml $htmlParser Instance of html parser
+ * @param array $record The current record
+ * @param string $field The current field
+ * @param string $table The current table
+ * @return void
*/
- private function analyseTypoLinks($resultArray, &$results, $htmlParser, $record, $field, $table) {
+ private function analyseTypoLinks(array $resultArray, array &$results, $htmlParser, array $record, $field, $table) {
$linkTags = $htmlParser->splitIntoBlock('link', $resultArray['content']);
$idRecord = $record['uid'];
for ($i = 1; $i < count($linkTags); $i += 2) {
// Type of referenced record
if (strpos($r['recordRef'], 'pages') !== FALSE) {
$currentR = $r;
- // contains number of the page
+ // Contains number of the page
$referencedRecordType = $r['tokenValue'];
$wasPage = TRUE;
}
- // append number of content element to the page saved in the last loop
+ // Append number of content element to the page saved in the last loop
elseif ((strpos($r['recordRef'], 'tt_content') !== FALSE) && ($wasPage === TRUE)) {
$referencedRecordType = $referencedRecordType . '#c' . $r['tokenValue'];
$wasPage = FALSE;
}
/**
- * Fill a markerarray with the number of links found in a list of pages.
+ * Fill a marker array with the number of links found in a list of pages
*
- * @param string $curPage: comma separated list of page uids
- * @return array markerarray with the number of links found
+ * @param string $curPage Comma separated list of page uids
+ * @return array Marker array with the number of links found
*/
public function getLinkCounts($curPage) {
$markerArray = array();
* Generates a list of page uids from $id. List does not include $id itself.
* The only pages excluded from the list are deleted pages.
*
- * level in the tree to start collecting uids. Zero means
- * 'start right away', 1 = 'next level and out'
- *
- * @param integer Start page id
- * @param integer Depth to traverse down the page tree.
- * @param integer $begin is an optional integer that determines at which
- * @param string Perms clause
- * @return string Returns the list with a comma in the end (if any pages selected!)
+ * @param integer $id Start page id
+ * @param integer $depth Depth to traverse down the page tree.
+ * @param integer $begin is an optional integer that determines at which
+ * @param string $permsClause Perms clause
+ * @param boolean $considerHidden Whether to consider hidden pages or not
+ * @return string Returns the list with a comma in the end (if any pages selected!)
*/
public function extGetTreeList($id, $depth, $begin = 0, $permsClause, $considerHidden = FALSE) {
$depth = intval($depth);
return $theList;
}
- public function getRootLineIsHidden($pageInfo){
+ /**
+ * @param array $pageInfo Array with uid, title, hidden, extendToSubpages from pages table
+ * @return boolean TRUE if rootline contains a hidden page, FALSE if not
+ */
+ public function getRootLineIsHidden(array $pageInfo){
$hidden = FALSE;
if ($pageInfo['extendToSubpages'] == 1 && $pageInfo['hidden'] == 1){
$hidden = TRUE;
if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/linkvalidator/classes/class.tx_linkvalidator_processor.php'])) {
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/linkvalidator/classes/class.tx_linkvalidator_processor.php']);
}
-?>
\ No newline at end of file
+?>
***************************************************************/
/**
- * This class provides Check Base plugin implementation.
+ * This class provides Check Base plugin implementation
*
* @author Michael Miousse <michael.miousse@infoglobe.ca>
* @package TYPO3
protected $errorParams = array();
/**
- * Base type fetching method, based on the type that softRefParserObj returns.
+ * Base type fetching method, based on the type that softRefParserObj returns
*
- * @param array $value: reference properties
- * @param string $type: current type
- * @param string $key: validator hook name
- * @return string fetched type
+ * @param array $value Reference properties
+ * @param string $type Current type
+ * @param string $key Validator hook name
+ * @return string Fetched type
*/
public function fetchType(array $value, $type, $key) {
if ($value['type'] == $key) {
}
/**
- * Set the value of the private property errorParams.
+ * Set the value of the protected property errorParams
*
- * @param array all parameters needed for the rendering of the error message
+ * @param array $value All parameters needed for the rendering of the error message
* @return void
*/
protected function setErrorParams(array $value) {
}
/**
- * Get the value of the private property errorParams.
+ * Get the value of the private property errorParams
*
- * @return array all parameters needed for the rendering of the error message
+ * @return array All parameters needed for the rendering of the error message
*/
public function getErrorParams() {
return $this->errorParams;
}
/**
- * Base url parsing
+ * Construct a valid Url for browser output
*
- * @param array $row: broken link record
- * @return string parsed broken url
+ * @param array $row Broken link record
+ * @return string Parsed broken url
*/
- public function getBrokenUrl($row) {
+ public function getBrokenUrl(array $row) {
return $row['url'];
}
}
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
- * This class provides Check External Links plugin implementation.
+ * This class provides Check External Links plugin implementation
*
* @author Dimitri König <dk@cabag.ch>
* @author Michael Miousse <michael.miousse@infoglobe.ca>
class tx_linkvalidator_linktype_External extends tx_linkvalidator_linktype_Abstract {
/**
- * Cached list of the URLs, which were already checked for the current processing.
+ * Cached list of the URLs, which were already checked for the current processing
*
* @var array $urlReports
*/
protected $urlReports = array();
/**
- * Cached list of all error parameters of the URLs, which were already checked for the current processing.
+ * Cached list of all error parameters of the URLs, which were already checked for the current processing
*
* @var array $urlErrorParams
*/
protected $urlErrorParams = array();
/**
- * List of headers to be used for metching an URL for the current processing
+ * List of headers to be used for matching an URL for the current processing
*
* @var array $additionalHeaders
*/
* Checks a given URL for validity
*
* @param string $url The URL to check
- * @param array $softRefEntry The softref entry which builds the context of that URL
+ * @param array $softRefEntry The soft reference entry which builds the context of that URL
* @param tx_linkvalidator_Processor $reference Parent instance of tx_linkvalidator_Processor
* @return boolean TRUE on success or FALSE on error
*/
}
catch (Exception $e) {
$isValidUrl = FALSE;
- // we hit a redirect loop
+ // A redirect loop occurred
if ($e->getCode() === 40) {
// Parse the exception for more information
$trace = $e->getTrace();
}
/**
- * Generate the localized error message from the error params saved from the parsing.
+ * Generate the localized error message from the error params saved from the parsing
*
* @param array $errorParams All parameters needed for the rendering of the error message
* @return string Validation error message
}
/**
- * Get the external type from the softRefParserObj result.
+ * Get the external type from the softRefParserObj result
*
* @param array $value Reference properties
* @param string $type Current type
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
- * This class provides Check File Links plugin implementation.
+ * This class provides Check File Links plugin implementation
*
* @author Dimitri König <dk@cabag.ch>
* @author Michael Miousse <michael.miousse@infoglobe.ca>
class tx_linkvalidator_linktype_File extends tx_linkvalidator_linktype_Abstract {
/**
- * Checks a given URL + /path/filename.ext for validity.
+ * Checks a given URL + /path/filename.ext for validity
*
- * @param string $url: url to check
- * @param array $softRefEntry: the softref entry which builds the context of that url
- * @param object $reference: parent instance of tx_linkvalidator_Processor
- * @return string TRUE on success or FALSE on error
+ * @param string $url Url to check
+ * @param array $softRefEntry The soft reference entry which builds the context of that url
+ * @param tx_linkvalidator_Processor $reference Parent instance of tx_linkvalidator_Processor
+ * @return boolean TRUE on success or FALSE on error
*/
public function checkLink($url, array $softRefEntry, tx_linkvalidator_Processor $reference) {
if (!@file_exists(PATH_site . rawurldecode($url))) {
}
/**
- * Generate the localized error message from the error params saved from the parsing.
+ * Generate the localized error message from the error params saved from the parsing
*
- * @param array all parameters needed for the rendering of the error message
- * @return string validation error message
+ * @param array $errorParams All parameters needed for the rendering of the error message
+ * @return string Validation error message
*/
public function getErrorMessage($errorParams) {
$response = $GLOBALS['LANG']->getLL('list.report.filenotexisting');
/**
- * Url parsing
+ * Construct a valid Url for browser output
*
- * @param array $row: broken link record
- * @return string parsed broken url
+ * @param array $row Broken link record
+ * @return string Parsed broken url
*/
- public function getBrokenUrl($row) {
+ public function getBrokenUrl(array $row) {
$brokenUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $row['url'];
return $brokenUrl;
}
interface tx_linkvalidator_linktype_Interface {
/**
- * Checks a given URL + /path/filename.ext for validity
+ * Checks a given link for validity
*
- * @param string $url: url to check
- * @param array $softRefEntry: the softref entry which builds the context of that url
- * @param object $reference: parent instance of tx_linkvalidator_Processor
- * @return string validation error message or succes code
+ * @param string $url Url to check
+ * @param array $softRefEntry The soft reference entry which builds the context of that url
+ * @param tx_linkvalidator_Processor $reference Parent instance of tx_linkvalidator_Processor
+ * @return string Validation error message or success code
*/
public function checkLink($url, array $softRefEntry, tx_linkvalidator_Processor $reference);
/**
* Base type fetching method, based on the type that softRefParserObj returns.
*
- * @param array $value: reference properties
- * @param string $type: current type
- * @param string $key: validator hook name
- * @return string fetched type
+ * @param array $value Reference properties
+ * @param string $type Current type
+ * @param string $key Validator hook name
+ * @return string Fetched type
*/
public function fetchType(array $value, $type, $key);
/**
* Get the value of the private property errorParams.
*
- * @return array all parameters needed for the rendering of the error message
+ * @return array All parameters needed for the rendering of the error message
*/
public function getErrorParams();
/**
- * Base url parsing
+ * Construct a valid Url for browser output
*
- * @param array $row: broken link record
- * @return string parsed broken url
+ * @param array $row Broken link record
+ * @return string Parsed broken url
*/
- public function getBrokenUrl($row);
+ public function getBrokenUrl(array $row);
}
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
- * This class provides Check Internal Links plugin implementation.
+ * This class provides Check Internal Links plugin implementation
*
* @author Dimitri König <dk@cabag.ch>
* @author Michael Miousse <michael.miousse@infoglobe.ca>
const NOTEXISTING = 'notExisting';
/**
- * All parameters needed for rendering the error message.
+ * All parameters needed for rendering the error message
*
* @var array
*/
protected $errorParams = array();
/**
- * Result of the check, if the current page uid is valid or not.
+ * Result of the check, if the current page uid is valid or not
*
* @var boolean
*/
protected $responsePage = TRUE;
/**
- * Result of the check, if the current content uid is valid or not.
+ * Result of the check, if the current content uid is valid or not
*
* @var boolean
*/
/**
* Checks a given URL + /path/filename.ext for validity
*
- * @param string $url: url to check as page-id or page-id#anchor (if anchor is present)
- * @param array $softRefEntry: the softref entry which builds the context of that url
- * @param object $reference: parent instance of tx_linkvalidator_Processor
- * @return string TRUE on success or FALSE on error
+ * @param string $url Url to check as page-id or page-id#anchor (if anchor is present)
+ * @param array $softRefEntry: The soft reference entry which builds the context of that url
+ * @param tx_linkvalidator_Processor $reference Parent instance of tx_linkvalidator_Processor
+ * @return boolean TRUE on success or FALSE on error
*/
public function checkLink($url, array $softRefEntry, tx_linkvalidator_Processor $reference) {
$page = '';
$response = TRUE;
$this->responseContent = TRUE;
- // Might already contain values - empty it.
+ // Might already contain values - empty it
unset($this->errorParams);
// defines the linked page and anchor (if any).
$page = $url;
}
- // Check if the linked page is OK.
+ // Check if the linked page is OK
$this->responsePage = $this->checkPage($page, $softRefEntry, $reference);
- // Check if the linked content element is OK.
+ // Check if the linked content element is OK
if ($anchor) {
- // Check if the content element is OK.
+ // Check if the content element is OK
$this->responseContent = $this->checkContent($page, $anchor, $softRefEntry, $reference);
}
/**
* Checks a given page uid for validity
*
- * @param string $page: page uid to check
- * @param array $softRefEntry: the softref entry which builds the context of that url
- * @param object $reference: parent instance of tx_linkvalidator_Processor
- * @return string TRUE on success or FALSE on error
+ * @param string $page Page uid to check
+ * @param array $softRefEntry The soft reference entry which builds the context of that url
+ * @param tx_linkvalidator_Processor $reference Parent instance of tx_linkvalidator_Processor
+ * @return boolean TRUE on success or FALSE on error
*/
- protected function checkPage($page, $softRefEntry, $reference) {
+ protected function checkPage($page, array $softRefEntry, tx_linkvalidator_Processor $reference) {
$row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'uid, title, deleted, hidden, starttime, endtime',
'pages',
if ($row) {
if ($row['deleted'] == '1') {
- $this->errorParams['errorType']['page'] = DELETED;
+ $this->errorParams['errorType']['page'] = self::DELETED;
$this->errorParams['page']['title'] = $row['title'];
$this->errorParams['page']['uid'] = $row['uid'];
$this->responsePage = FALSE;
} elseif ($row['hidden'] == '1'
|| $GLOBALS['EXEC_TIME'] < intval($row['starttime'])
|| ($row['endtime'] && intval($row['endtime']) < $GLOBALS['EXEC_TIME'])) {
- $this->errorParams['errorType']['page'] = HIDDEN;
+ $this->errorParams['errorType']['page'] = self::HIDDEN;
$this->errorParams['page']['title'] = $row['title'];
$this->errorParams['page']['uid'] = $row['uid'];
$this->responsePage = FALSE;
}
} else {
- $this->errorParams['errorType']['page'] = NOTEXISTING;
+ $this->errorParams['errorType']['page'] = self::NOTEXISTING;
$this->errorParams['page']['uid'] = intval($page);
$this->responsePage = FALSE;
}
/**
* Checks a given content uid for validity
*
- * @param string $page: uid of the page to which the link is pointing
- * @param string $anchor: uid of the content element to check
- * @param array $softRefEntry: the softref entry which builds the context of that url
- * @param object $reference: parent instance of tx_linkvalidator_Processor
- * @return string TRUE on success or FALSE on error
+ * @param string $page Uid of the page to which the link is pointing
+ * @param string $anchor Uid of the content element to check
+ * @param array $softRefEntry The soft reference entry which builds the context of that url
+ * @param tx_linkvalidator_Processor $reference Parent instance of tx_linkvalidator_Processor
+ * @return boolean TRUE on success or FALSE on error
*/
protected function checkContent($page, $anchor, $softRefEntry, $reference) {
// Get page ID on which the content element in fact is located
// page ID on which this CE is in fact located.
$correctPageID = $res['pid'];
- // check if the element is on the linked page
- // (the element might have been moved to another page)
+ // Check if the element is on the linked page
+ // (The element might have been moved to another page)
if (!($correctPageID === $page)) {
- $this->errorParams['errorType']['content'] = MOVED;
+ $this->errorParams['errorType']['content'] = self::MOVED;
$this->errorParams['content']['uid'] = intval($anchor);
$this->errorParams['content']['wrongPage'] = intval($page);
$this->errorParams['content']['rightPage'] = intval($correctPageID);
$this->responseContent = FALSE;
} else {
- // the element is located on the page to which the link is pointing
+ // The element is located on the page to which the link is pointing
if ($res['deleted'] == '1') {
- $this->errorParams['errorType']['content'] = DELETED;
+ $this->errorParams['errorType']['content'] = self::DELETED;
$this->errorParams['content']['title'] = $res['header'];
$this->errorParams['content']['uid'] = $res['uid'];
$this->responseContent = FALSE;
} elseif ($res['hidden'] == '1'
|| $GLOBALS['EXEC_TIME'] < intval($res['starttime'])
|| ($res['endtime'] && intval($res['endtime']) < $GLOBALS['EXEC_TIME'])) {
- $this->errorParams['errorType']['content'] = HIDDEN;
+ $this->errorParams['errorType']['content'] = self::HIDDEN;
$this->errorParams['content']['title'] = $res['header'];
$this->errorParams['content']['uid'] = $res['uid'];
$this->responseContent = FALSE;
}
} else {
- // content element does not exist
- $this->errorParams['errorType']['content'] = NOTEXISTING;
+ // The content element does not exist
+ $this->errorParams['errorType']['content'] = self::NOTEXISTING;
$this->errorParams['content']['uid'] = intval($anchor);
$this->responseContent = FALSE;
}
}
/**
- * Generate the localized error message from the error params saved from the parsing.
+ * Generate the localized error message from the error params saved from the parsing
*
- * @param array all parameters needed for the rendering of the error message
- * @return string validation error message
+ * @param array $errorParams All parameters needed for the rendering of the error message
+ * @return string Validation error message
*/
- public function getErrorMessage($errorParams) {
+ public function getErrorMessage(array $errorParams) {
$errorType = $errorParams['errorType'];
if (is_array($errorParams['page'])) {
switch ($errorType['page']) {
- case DELETED:
+ case self::DELETED:
$errorPage = $GLOBALS['LANG']->getLL('list.report.pagedeleted');
$errorPage = str_replace('###title###', $errorParams['page']['title'], $errorPage);
$errorPage = str_replace('###uid###', $errorParams['page']['uid'], $errorPage);
break;
- case HIDDEN:
+ case self::HIDDEN:
$errorPage = $GLOBALS['LANG']->getLL('list.report.pagenotvisible');
$errorPage = str_replace('###title###', $errorParams['page']['title'], $errorPage);
$errorPage = str_replace('###uid###', $errorParams['page']['uid'], $errorPage);
if (is_array($errorParams['content'])) {
switch ($errorType['content']) {
- case DELETED:
+ case self::DELETED:
$errorContent = $GLOBALS['LANG']->getLL('list.report.contentdeleted');
$errorContent = str_replace('###title###', $errorParams['content']['title'], $errorContent);
$errorContent = str_replace('###uid###', $errorParams['content']['uid'], $errorContent);
break;
- case HIDDEN:
+ case self::HIDDEN:
$errorContent = $GLOBALS['LANG']->getLL('list.report.contentnotvisible');
$errorContent = str_replace('###title###', $errorParams['content']['title'], $errorContent);
$errorContent = str_replace('###uid###', $errorParams['content']['uid'], $errorContent);
break;
- case MOVED:
+ case self::MOVED:
$errorContent = $GLOBALS['LANG']->getLL('list.report.contentmoved');
$errorContent = str_replace('###title###', $errorParams['content']['title'], $errorContent);
$errorContent = str_replace('###uid###', $errorParams['content']['uid'], $errorContent);
}
}
- if ($errorPage && $errorContent) {
+ if (isset($errorPage) && isset($errorContent)) {
$response = $errorPage . '<br />' . $errorContent;
- } elseif ($errorPage) {
+ } elseif (isset($errorPage)) {
$response = $errorPage;
- } elseif ($errorContent) {
+ } elseif (isset($errorContent)) {
$response = $errorContent;
+ } else {
+ // This should not happen
+ $response = $GLOBALS['LANG']->getLL('list.report.noinformation');
}
return $response;
}
/**
- * Url parsing
+ * Construct a valid Url for browser output
*
- * @param array $row: broken link record
- * @return string parsed broken url
+ * @param array $row Broken link record
+ * @return string Parsed broken url
*/
- public function getBrokenUrl($row) {
+ public function getBrokenUrl(array $row) {
$domain = rtrim(t3lib_div::getIndpEnv('TYPO3_SITE_URL'), '/');
$rootLine = t3lib_BEfunc::BEgetRootLine($row['record_pid']);
// checks alternate domains
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/linkvalidator/classes/linktypes/class.tx_linkvalidator_linktypes_internal.php']);
}
-?>
\ No newline at end of file
+?>
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
- * This class provides Check Link Handler plugin implementation.
+ * This class provides Check Link Handler plugin implementation
*
* @author Dimitri König <dk@cabag.ch>
* @author Michael Miousse <michael.miousse@infoglobe.ca>
const DELETED = 'deleted';
/**
- * TSconfig of the module tx_linkhandler.
+ * TSconfig of the module tx_linkhandler
*
* @var array
*/
protected $tsconfig;
/**
- * Get TSconfig when loading the class.
+ * Get TSconfig when loading the class
*/
function __construct() {
$this->tsconfig = t3lib_BEfunc::getModTSconfig(1, 'mod.tx_linkhandler');
}
/**
- * Checks a given URL + /path/filename.ext for validity
+ * Checks a given URL for validity
*
- * @param string $url: url to check
- * @param array $softRefEntry: the softref entry which builds the context of that url
- * @param object $reference: parent instance of tx_linkvalidator_Processor
- * @return string TRUE on success or FALSE on error
+ * @param string $url Url to check
+ * @param array $softRefEntry The soft reference entry which builds the context of that url
+ * @param tx_linkvalidator_Processor $reference Parent instance of tx_linkvalidator_Processor
+ * @return boolean TRUE on success or FALSE on error
*/
public function checkLink($url, array $softRefEntry, tx_linkvalidator_Processor $reference) {
$response = TRUE;
if ($row) {
if ($row['deleted'] == '1') {
- $errorParams['errorType'] = DELETED;
+ $errorParams['errorType'] = self::DELETED;
$errorParams['tablename'] = $tableName;
$errorParams['uid'] = $rowid;
$response = FALSE;
}
/**
- * type fetching method, based on the type that softRefParserObj returns.
+ * Type fetching method, based on the type that softRefParserObj returns
*
- * @param array $value: reference properties
- * @param string $type: current type
- * @param string $key: validator hook name
- * @return string fetched type
+ * @param array $value Reference properties
+ * @param string $type Current type
+ * @param string $key Validator hook name
+ * @return string fetched type
*/
public function fetchType(array $value, $type, $key) {
if ($type == 'string' && strtolower(substr($value['tokenValue'], 0, 7)) == 'record:') {
}
/**
- * Generate the localized error message from the error params saved from the parsing.
+ * Generate the localized error message from the error params saved from the parsing
*
- * @param array all parameters needed for the rendering of the error message
- * @return string validation error message
+ * @param array $errorParams All parameters needed for the rendering of the error message
+ * @return string Validation error message
*/
public function getErrorMessage($errorParams) {
$errorType = $errorParams['errorType'];
}
switch ($errorType) {
- case DELETED:
+ case self::DELETED:
$response = $GLOBALS['LANG']->getLL('list.report.rowdeleted');
$response = str_replace('###title###', $title, $response);
$response = str_replace('###uid###', $errorParams['uid'], $response);
***************************************************************/
/**
- * This class provides Scheduler plugin implementation.
+ * This class provides Scheduler plugin implementation
*
* @author Michael Miousse <michael.miousse@infoglobe.ca>
* @package TYPO3
protected $countInARun;
/**
- * Total number of broken links.
+ * Total number of broken links
*
* @var integer
*/
protected $totalBrokenLink = 0;
/**
- * Total number of broken links from the last run.
+ * Total number of broken links from the last run
*
* @var integer
*/
protected $oldTotalBrokenLink = 0;
/**
- * Mail template fetched from the given template file.
+ * Mail template fetched from the given template file
*
* @var string
*/
protected $configuration = array();
/**
- * Shows if number of result was diferent from the result of the last check or not.
+ * Shows if number of result was different from the result of the last check or not
*
* @var boolean
*/
protected $dif;
/**
- * Template to be used for the email.
+ * Template to be used for the email
*
* @var string
*/
protected $emailTemplateFile;
/**
- * Level of pages the task should check.
+ * Level of pages the task should check
*
* @var integer
*/
protected $depth;
/**
- * UID of the start page for this task.
+ * UID of the start page for this task
*
* @var integer
*/
protected $page;
/**
- * Email address to which an email report is sent.
+ * Email address to which an email report is sent
*
* @var string
*/
protected $email;
/**
- * Only send an email, if new broken links were found.
+ * Only send an email, if new broken links were found
*
* @var boolean
*/
protected $emailOnBrokenLinkOnly;
/**
- * Get the value of the protected property email.
+ * Get the value of the protected property email
*
- * @return string Email address to which an email report is sent
+ * @return string Email address to which an email report is sent
*/
public function getEmail() {
return $this->email;
/**
* Set the value of the private property email.
*
- * @param string Email address to which an email report is sent
+ * @param string $email Email address to which an email report is sent
* @return void
*/
public function setEmail($email) {
}
/**
- * Get the value of the protected property emailOnBrokenLinkOnly.
+ * Get the value of the protected property emailOnBrokenLinkOnly
*
- * @return boolean Only send an email, if new broken links were found.
+ * @return boolean Whether to send an email, if new broken links were found
*/
public function getEmailOnBrokenLinkOnly() {
return $this->emailOnBrokenLinkOnly;
}
/**
- * Set the value of the private property emailOnBrokenLinkOnly.
+ * Set the value of the private property emailOnBrokenLinkOnly
*
- * @param boolean Only send an email, if new broken links were found.
+ * @param boolean $emailOnBrokenLinkOnly Only send an email, if new broken links were found
* @return void
*/
public function setEmailOnBrokenLinkOnly($emailOnBrokenLinkOnly) {
}
/**
- * Get the value of the protected property page.
+ * Get the value of the protected property page
*
- * @return integer UID of the start page for this task.
+ * @return integer UID of the start page for this task
*/
public function getPage() {
return $this->page;
}
/**
- * Set the value of the private property page.
+ * Set the value of the private property page
*
- * @param integer UID of the start page for this task.
+ * @param integer $page UID of the start page for this task.
* @return void
*/
public function setPage($page) {
}
/**
- * Get the value of the protected property depth.
+ * Get the value of the protected property depth
*
- * @return integer Level of pages the task should check.
+ * @return integer Level of pages the task should check
*/
public function getDepth() {
return $this->depth;
}
/**
- * Set the value of the private property depth.
+ * Set the value of the private property depth
*
- * @param integer Level of pages the task should check.
+ * @param integer $depth Level of pages the task should check
* @return void
*/
public function setDepth($depth) {
}
/**
- * Get the value of the protected property emailTemplateFile.
+ * Get the value of the protected property emailTemplateFile
*
- * @return string Template to be used for the email.
+ * @return string Template to be used for the email
*/
public function getEmailTemplateFile() {
return $this->emailTemplateFile;
}
/**
- * Set the value of the private property emailTemplateFile.
+ * Set the value of the private property emailTemplateFile
*
- * @param string Template to be used for the email.
+ * @param string $emailTemplateFile Template to be used for the email
* @return void
*/
public function setEmailTemplateFile($emailTemplateFile) {
}
/**
- * Get the value of the protected property configuration.
+ * Get the value of the protected property configuration
*
- * @return array specific TSconfig for this task.
+ * @return array specific TSconfig for this task
*/
public function getConfiguration() {
return $this->configuration;
}
/**
- * Set the value of the private property configuration.
+ * Set the value of the private property configuration
*
- * @param array specific TSconfig for this task.
+ * @param array $configuration specific TSconfig for this task
* @return void
*/
public function setConfiguration($configuration) {
/**
- * Function executed from the Scheduler.
+ * Function execute from the Scheduler
*
- * @return void
+ * @return boolean TRUE on successful execution, FALSE on error
*/
public function execute() {
$this->setCliArguments();
}
/**
- * Validate all links for a page based on the task configuration.
+ * Validate all links for a page based on the task configuration
*
- * @param integer $page: uid of the page to parse.
- * @return string $pageSections: Content of page section.
+ * @param integer $page Uid of the page to parse
+ * @return string $pageSections Content of page section
*/
protected function checkPageLinks($page) {
$pageSections = '';
}
/**
- * Get the linkvalidator modTSconfig for a page.
+ * Get the linkvalidator modTSconfig for a page
*
- * @param integer $page: uid of the page.
- * @return array $modTS: mod.linkvalidator TSconfig array.
+ * @param integer $page Uid of the page
+ * @return array $modTS mod.linkvalidator TSconfig array
*/
protected function loadModTSconfig($page) {
$modTS = t3lib_BEfunc::getModTSconfig($page, 'mod.linkvalidator');
}
/**
- * Get the list of fields to parse in modTSconfig.
+ * Get the list of fields to parse in modTSconfig
*
- * @param array $modTS: mod.linkvalidator TSconfig array.
- * @return array $searchFields: list of fields.
+ * @param array $modTS mod.linkvalidator TSconfig array
+ * @return array $searchFields List of fields
*/
- protected function getSearchField($modTS) {
- // get the searchFields from TypoScript
+ protected function getSearchField(array $modTS) {
+ // Get the searchFields from TypoScript
foreach ($modTS['searchFields.'] as $table => $fieldList) {
$fields = t3lib_div::trimExplode(',', $fieldList);
foreach ($fields as $field) {
$searchFields[$table][] = $field;
}
}
- return $searchFields;
+ return isset($searchFields) ? $searchFields : array();
}
/**
- * Get the list of linkTypes to parse in modTSconfig.
+ * Get the list of linkTypes to parse in modTSconfig
*
- * @param array $modTS: mod.linkvalidator TSconfig array.
- * @return array $linkTypes: list of link types.
+ * @param array $modTS mod.linkvalidator TSconfig array
+ * @return array $linkTypes list of link types
*/
- protected function getLinkTypes($modTS) {
+ protected function getLinkTypes(array $modTS) {
$linkTypes = array();
$typesTmp = t3lib_div::trimExplode(',', $modTS['linktypes'], 1);
if (is_array($typesTmp)) {
}
/**
- * Build and send warning email when new broken links were found.
+ * Build and send warning email when new broken links were found
*
- * @param string $pageSections: Content of page section
- * @param string $modTS: TSconfig array
- * @return bool TRUE if mail was sent, FALSE if or not
+ * @param string $pageSections Content of page section
+ * @param array $modTS TSconfig array
+ * @return boolean TRUE if mail was sent, FALSE if or not
*/
- protected function reportEmail($pageSections, $modTS) {
+ protected function reportEmail($pageSections, array $modTS) {
$content = t3lib_parsehtml::substituteSubpart($this->templateMail, '###PAGE_SECTION###', $pageSections);
- /** @var array $markerArray */
+ /** @var array $markerArray */
$markerArray = array();
- /** @var array $validEmailList */
+ /** @var array $validEmailList */
$validEmailList = array();
- /** @var boolean $sendEmail */
+ /** @var boolean $sendEmail */
$sendEmail = TRUE;
$markerArray['totalBrokenLink'] = $this->totalBrokenLink;
$markerArray['totalBrokenLink_old'] = $this->oldTotalBrokenLink;
$content = t3lib_parsehtml::substituteMarkerArray($content, $markerArray, '###|###', TRUE, TRUE);
- /** @var t3lib_mail_Message $mail */
+ /** @var t3lib_mail_Message $mail */
$mail = t3lib_div::makeInstance('t3lib_mail_Message');
if(empty($modTS['mail.']['fromemail'])) {
$modTS['mail.']['fromemail'] = t3lib_utility_Mail::getSystemFromAddress();
/**
- * Build the mail content.
+ * Build the mail content
*
- * @param int $curPage: id of the current page
- * @param string $pageList: list of pages id
- * @param array $markerArray: array of markers
- * @param array $oldBrokenLink: markerarray with the number of link found
- * @return string Content of the mail
+ * @param int $curPage Id of the current page
+ * @param string $pageList List of pages id
+ * @param array $markerArray Array of markers
+ * @param array $oldBrokenLink Marker array with the number of link found
+ * @return string Content of the mail
*/
- protected function buildMail($curPage, $pageList, $markerArray, $oldBrokenLink) {
+ protected function buildMail($curPage, $pageList, array $markerArray, array $oldBrokenLink) {
$pageSectionHTML = t3lib_parsehtml::getSubpart($this->templateMail, '###PAGE_SECTION###');
if (is_array($markerArray)) {
/**
* Simulate cli call with setting the required options to the $_SERVER['argv']
*
- * @return void
- * @access protected
+ * @return void
*/
protected function setCliArguments() {
$_SERVER['argv'] = array(
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
- * This class provides Scheduler Additional Field plugin implementation.
+ * This class provides Scheduler Additional Field plugin implementation
*
* @author Dimitri König <dk@cabag.ch>
* @author Michael Miousse <michael.miousse@infoglobe.ca>
/**
* Render additional information fields within the scheduler backend.
*
- * @param array $taksInfo: array information of task to return
- * @param task $task: task object
- * @param tx_scheduler_Module $schedulerModule: reference to the calling object (BE module of the Scheduler)
- * @return array additional fields
+ * @param array $taskInfo Array information of task to return
+ * @param task $task Task object
+ * @param tx_scheduler_Module $schedulerModule Reference to the calling object (BE module of the Scheduler)
+ * @return array Additional fields
* @see interfaces/tx_scheduler_AdditionalFieldProvider#getAdditionalFields($taskInfo, $task, $schedulerModule)
*/
public function getAdditionalFields(array &$taskInfo, $task, tx_scheduler_Module $schedulerModule) {
/**
- * Mark current value as selected by returning the "selected" attribute.
+ * Mark current value as selected by returning the "selected" attribute
*
- * @param array $configurationArray: array of configuration
- * @param string $currentValue: value of selector object
- * @return string Html fragment for a selected option or empty
- * @access protected
+ * @param array $configurationArray Array of configuration
+ * @param string $currentValue Value of selector object
+ * @return string Html fragment for a selected option or empty
*/
- protected function getSelectedState($configurationArray, $currentValue) {
+ protected function getSelectedState(array $configurationArray, $currentValue) {
$selected = '';
for ($i = 0; $i < count($configurationArray); $i++) {
if (strcmp($configurationArray[$i], $currentValue) === 0) {
* This method checks any additional data that is relevant to the specific task.
* If the task class is not relevant, the method is expected to return TRUE.
*
- * @param array $submittedData: reference to the array containing the data submitted by the user
- * @param tx_scheduler_module1 $parentObject: reference to the calling object (BE module of the Scheduler)
- * @return boolean TRUE if validation was ok (or selected class is not relevant), FALSE otherwise
+ * @param array $submittedData Reference to the array containing the data submitted by the user
+ * @param tx_scheduler_Module $schedulerModule Reference to the calling object (BE module of the Scheduler)
+ * @return boolean TRUE if validation was ok (or selected class is not relevant), FALSE otherwise
*/
public function validateAdditionalFields(array &$submittedData, tx_scheduler_Module $schedulerModule) {
$isValid = TRUE;
- //!TODO add validation to validate the $submittedData['configuration'] wich is normally a comma seperated string
+ //TODO add validation to validate the $submittedData['configuration'] which is normally a comma separated string
if (!empty($submittedData['linkvalidator']['email'])) {
$emailList = t3lib_div::trimExplode(',', $submittedData['linkvalidator']['email']);
foreach ($emailList as $emailAdd) {
* This method is used to save any additional input into the current task object
* if the task class matches.
*
- * @param array $submittedData: array containing the data submitted by the user
- * @param tx_scheduler_Task $task: reference to the current task object
- * @return void
+ * @param array $submittedData Array containing the data submitted by the user
+ * @param tx_scheduler_Task $task Reference to the current task object
+ * @return void
*/
public function saveAdditionalFields(array $submittedData, tx_scheduler_Task $task) {
$task->setDepth($submittedData['linkvalidator']['depth']);
}
if (TYPO3_MODE == 'BE') {
- // add module
+ // Add module
t3lib_extMgm::insertModuleFunction(
'web_info',
'tx_linkvalidator_ModFuncReport',
***************************************************************/
/**
- * Module 'Linkvalidator' for the 'linkvalidator' extension.
+ * Module 'Linkvalidator' for the 'linkvalidator' extension
*
* @author Michael Miousse <michael.miousse@infoglobe.ca>
* @author Jochen Rieger <j.rieger@connecta.ag>
protected $relativePath;
/**
- * Information about the current page record.
+ * Information about the current page record
*
* @var array
*/
protected $pageRecord = array();
/**
- * Information, if the module is accessible for the current user or not.
+ * Information, if the module is accessible for the current user or not
*
* @var boolean
*/
protected $isAccessibleForCurrentUser = FALSE;
/**
- * Depth for the recursivity of the link validation.
+ * Depth for the recursive traversal of pages for the link validation
*
* @var integer
*/
protected $searchLevel;
/**
- * Link validation class.
+ * Link validation class
*
* @var tx_linkvalidator_Processor
*/
protected $processor;
/**
- * TSconfig of the current module.
+ * TSconfig of the current module
*
* @var array
*/
protected $modTS = array();
/**
- * List of available link types to check defined in the TSconfig.
+ * List of available link types to check defined in the TSconfig
*
* @var array
*/
protected $availableOptions = array();
/**
- * List of link types currently chosen in the Statistics table.
- * Used to show broken links of these types only.
+ * List of link types currently chosen in the statistics table
+ * Used to show broken links of these types only
*
* @var array
*/
protected $checkOpt = array();
/**
- * Html for the button "Check Links".
+ * Html for the button "Check Links"
*
* @var string
*/
protected $updateListHtml;
/**
- * Html for the button "Refresh Display".
+ * Html for the button "Refresh Display"
*
* @var string
*/
protected $refreshListHtml;
/**
- * Html for the Statistics table with the checkboxes of the link types and the numbers of broken links for Report tab.
+ * Html for the statistics table with the checkboxes of the link types and the numbers of broken links for report tab
*
* @var string
*/
/**
- * Html for the Statistics table with the checkboxes of the link types and the numbers of broken links for Check links tab.
+ * Html for the statistics table with the checkboxes of the link types and the numbers of broken links for check links tab
*
* @var string
*/
protected $checkOptHtmlCheck;
/**
- * Complete content (html) to be displayed.
+ * Complete content (html) to be displayed
*
* @var string
*/
if (strpos($this->modTS['linktypes'], $linkType) !== FALSE) {
$this->availableOptions[$linkType] = 1;
}
- // Compile list of types currently selected by the checkboxes.
+ // Compile list of types currently selected by the checkboxes
if (($this->pObj->MOD_SETTINGS[$linkType] && empty($set)) || $set[$linkType]) {
$this->checkOpt[$linkType] = 1;
$this->pObj->MOD_SETTINGS[$linkType] = 1;
$GLOBALS['BE_USER']->pushModuleData('web_info', $this->pObj->MOD_SETTINGS);
$this->initialize();
- // Setting up the context sensitive menu:
+ // Setting up the context sensitive menu
$this->resPath = $this->doc->backPath . t3lib_extMgm::extRelPath('linkvalidator') . 'res/';
- /** @var t3lib_pageRenderer $pageRenderer */
+ /** @var t3lib_pageRenderer $pageRenderer */
$this->pageRenderer = $this->doc->getPageRenderer();
// Localization
}
/**
- * Create TabPanel to split the report and the checklinks functions
+ * Create TabPanel to split the report and the checkLink functions
*
* @return void
*/
}
/**
- * Initializes the menu array internally.
+ * Initializes the menu array internally
*
* @return array Module menu
*/
/**
- * Initializes the Module.
+ * Initializes the Module
*
* @return void
*/
/**
- * Updates the table of stored broken links.
+ * Updates the table of stored broken links
*
* @return void
*/
protected function updateBrokenLinks() {
$searchFields = array();
- // get the searchFields from TypoScript
+ // Get the searchFields from TypoScript
foreach ($this->modTS['searchFields.'] as $table => $fieldList) {
$fields = t3lib_div::trimExplode(',', $fieldList);
foreach ($fields as $field) {
}
$rootLineHidden = $this->processor->getRootLineIsHidden($this->pObj->pageinfo);
if (!$rootLineHidden || $this->modTS['checkhidden'] == 1) {
- // get children pages
+ // Get children pages
$pageList = $this->processor->extGetTreeList(
$this->pObj->id,
$this->searchLevel,
$this->processor->init($searchFields, $pageList);
- // check if button press
+ // Check if button press
$update = t3lib_div::_GP('updateLinkList');
if (!empty($update)) {
}
/**
- * Renders the content of the module.
+ * Renders the content of the module
*
* @return void
*/
/**
- * Flushes the rendered content to the browser.
+ * Flushes the rendered content to the browser
*
* @param boolean $form
- * @return void
+ * @return string $content
*/
protected function flush($form = FALSE) {
$content = $this->doc->moduleBody(
/**
- * Builds the selector for the level of pages to search.
+ * Builds the selector for the level of pages to search
*
* @return string Html code of that selector
*/
protected function getLevelSelector() {
- // Make level selector:
+ // Build level selector
$opt = array();
$parts = array(
0 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_0'),
}
/**
- * Displays the table of broken links or a note if there were no broken links.
+ * Displays the table of broken links or a note if there were no broken links
*
* @return html Content of the table or of the note
*/
protected function renderBrokenLinksTable() {
$items = $brokenLinksMarker = array();
- $brokenLinkItems = $brokenLinksTemplate = '';
+ $brokenLinkItems = '';
$brokenLinksTemplate = t3lib_parsehtml::getSubpart($this->doc->moduleTemplate, '###NOBROKENLINKS_CONTENT###');
$keyOpt = array();
'',
'record_uid ASC, uid ASC')
)) {
- // Display table with broken links
+ // Display table with broken links
if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) > 0) {
$brokenLinksTemplate = t3lib_parsehtml::getSubpart($this->doc->moduleTemplate, '###BROKENLINKS_CONTENT###');
}
/**
- * Displays the table header of the table with the broken links.
+ * Displays the table header of the table with the broken links
*
* @return string Code of content
*/
/**
- * Displays one line of the broken links table.
+ * Displays one line of the broken links table
*
* @param string $table Name of database table
* @param array $row Record row to be processed
if ($GLOBALS['TCA'][$table]['columns'][$row['field']]['label']) {
$fieldName = $GLOBALS['TCA'][$table]['columns'][$row['field']]['label'];
$fieldName = $GLOBALS['LANG']->sL($fieldName);
- // Crop colon from end if present.
+ // Crop colon from end if present
if (substr($fieldName, '-1', '1') === ':') {
$fieldName = substr($fieldName, '0', strlen($fieldName)-1);
}
/**
- * Builds the checkboxes out of the hooks array.
+ * Builds the checkboxes out of the hooks array
*
- * @param array $brokenLinkOverView array of broken links information
+ * @param array $brokenLinkOverView Array of broken links information
+ * @param string $prefix
* @return string code content
*/
protected function getCheckOptions(array $brokenLinkOverView, $prefix = '') {
/**
- * Loads data in the HTML head section (e.g. JavaScript or stylesheet information).
+ * Loads data in the HTML head section (e.g. JavaScript or stylesheet information)
*
* @return void
*/
/**
- * Gets the buttons that shall be rendered in the docHeader.
+ * Gets the buttons that shall be rendered in the docHeader
*
* @return array Available buttons for the docHeader
*/
/**
* Gets the button to set a new shortcut in the backend (if current user is allowed to).
*
- * @return string HTML representiation of the shortcut button
+ * @return string HTML representation of the shortcut button
*/
protected function getShortcutButton() {
$result = '';
/**
- * Gets the filled markers that are used in the HTML template.
+ * Gets the filled markers that are used in the HTML template
*
* @return array The filled marker array
*/
}
/**
- * Gets the filled markers that are used in the HTML template.
+ * Gets the filled markers that are used in the HTML template
*
* @return array The filled marker array
*/
/**
- * Determines whether the current user is an admin.
+ * Determines whether the current user is an admin
*
* @return boolean Whether the current user is admin
*/
include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/linkvalidator/modfuncreport/class.tx_linkvalidator_modfuncreport.php']);
}
-?>
+?>
\ No newline at end of file
<source>Row (###uid###) does not exist.</source>
<target>Row (###uid###) does not exist.</target>
</trans-unit>
+ <trans-unit id="list.report.noinformation" approved="yes">
+ <source>No information about the error is available.</source>
+ <target>No information about the error is available.</target>
+ </trans-unit>
<trans-unit id="list.report.noresponse" approved="yes">
<source>External Link not reachable.</source>
<target>External Link not reachable.</target>