Project

General

Profile

Feature #12340 » 12340.diff

Michael Miousse, 2011-01-18 22:02

View differences:

classes/class.tx_linkvalidator_processing.php (working copy)
protected $brokenLinkCounts = array(); // array of tables containing number of broken external link
protected $recordsWithBrokenLinks = array(); // array of tables and records containing broken links
protected $hookObjectsArr = array(); // array for hooks for own checks
protected $extPageInTreeInfo = array(); //array of the current page informations
/**
* Fill hookObjectsArr with different link types and possible XClasses.
classes/linktypes/class.tx_linkvalidator_linktypes_abstract.php (working copy)
* @package TYPO3
* @subpackage linkvalidator
*/
abstract class tx_linkvalidator_linkTypes_Abstract {
abstract class tx_linkvalidator_linkTypes_Abstract implements tx_linkvalidator_linkTypes_Interface {
private $errorParams = array(); // array all parameters needed for the rendering of the error message
/**
* @var array
*/
protected $errorParams = array(); // all parameters needed for the rendering of the error message
/**
* Base type fetching method, based on the type that softRefParserObj returns.
......
*
* @param array all parameters needed for the rendering of the error message
*/
public function setErrorParams(array $value) {
protected function setErrorParams(array $value) {
$this->errorParams = $value;
}
classes/linktypes/class.tx_linkvalidator_linktypes_external.php (working copy)
* @package TYPO3
* @subpackage linkvalidator
*/
class tx_linkvalidator_linkTypes_External extends tx_linkvalidator_linkTypes_Abstract implements tx_linkvalidator_linkTypes_Interface {
var $url_reports = array();
var $url_error_params = array();
class tx_linkvalidator_linkTypes_External extends tx_linkvalidator_linkTypes_Abstract {
/**
* @var array
*/
protected $url_reports = array(); //cached list of already checked ulrs for the current processing.
/**
* @var array
*/
protected $url_error_params = array(); //cached list of all error parameters of already checked ulrs for the current processing.
/**
* Checks a given URL + /path/filename.ext for validity
......
return $response;
}
/**
* get the external type from the softRefParserObj result.
* Base type fetching method, based on the type that softRefParserObj returns.
*
* @param array $value: reference properties
* @param array $value: reference properties
* @param string $type: current type
* @return string fetched type
* @param string $key: validator hook name
* @return string fetched type
*/
public function fetchType($value, $type) {
public function fetchType($value, $type, $key) {
preg_match_all('/((?:http|https|ftp|ftps))(?::\/\/)(?:[^\s<>]+)/i', $value['tokenValue'], $urls, PREG_PATTERN_ORDER);
if (!empty($urls[0][0])) {
classes/linktypes/class.tx_linkvalidator_linktypes_file.php (working copy)
* @package TYPO3
* @subpackage linkvalidator
*/
class tx_linkvalidator_linkTypes_File extends tx_linkvalidator_linkTypes_Abstract implements tx_linkvalidator_linkTypes_Interface {
class tx_linkvalidator_linkTypes_File extends tx_linkvalidator_linkTypes_Abstract {
/**
* Checks a given URL + /path/filename.ext for validity.
classes/linktypes/class.tx_linkvalidator_linktypes_interface.php (working copy)
*/
public function checkLink($url, $softRefEntry, $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
*/
public function fetchType($value, $type, $key);
/**
* Get the value of the private property errorParams.
*
* @return array all parameters needed for the rendering of the error message
*/
public function getErrorParams();
/**
* Base url parsing
*
* @param array $row: broken link record
* @return string parsed broken url
*/
public function getBrokenUrl($row);
}
?>
classes/linktypes/class.tx_linkvalidator_linktypes_internal.php (working copy)
* @package TYPO3
* @subpackage linkvalidator
*/
class tx_linkvalidator_linkTypes_Internal extends tx_linkvalidator_linkTypes_Abstract implements tx_linkvalidator_linkTypes_Interface {
class tx_linkvalidator_linkTypes_Internal extends tx_linkvalidator_linkTypes_Abstract {
const DELETED = 'deleted';
const HIDDEN = 'hidden';
const MOVED = 'moved';
const NOTEXISTING = 'notExisting';
var $errorParams = array();
/**
* @var array
*/
protected $errorParams = array(); // all parameters needed for the rendering of the error message.
var $responsePage = TRUE;
var $responseContent = TRUE;
/**
* @var boolean
*/
protected $responsePage = TRUE; // current page uid is valid or not.
/**
* @var boolean
*/
protected $responseContent = TRUE; // current content is valid or not.
/**
* Checks a given URL + /path/filename.ext for validity
......
* @param object $reference: parent instance of tx_linkvalidator_processing
* @return string TRUE on success or FALSE on error
*/
public function checkPage($page, $softRefEntry, $reference) {
protected function checkPage($page, $softRefEntry, $reference) {
$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'uid, title, deleted, hidden, starttime, endtime',
'pages',
......
* @param object $reference: parent instance of tx_linkvalidator_processing
* @return string TRUE on success or FALSE on error
*/
public function checkContent($page, $anchor, $softRefEntry, $reference) {
protected function checkContent($page, $anchor, $softRefEntry, $reference) {
// Get page ID on which the content element in fact is located
$res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'uid, pid, header, deleted, hidden, starttime, endtime',
classes/linktypes/class.tx_linkvalidator_linktypes_linkhandler.php (working copy)
* @package TYPO3
* @subpackage linkvalidator
*/
class tx_linkvalidator_linkTypes_LinkHandler extends tx_linkvalidator_linkTypes_Abstract implements tx_linkvalidator_linkTypes_Interface {
class tx_linkvalidator_linkTypes_LinkHandler extends tx_linkvalidator_linkTypes_Abstract {
public $tsconfig;
const DELETED = 'deleted';
/**
* @var array
*/
protected $tsconfig; // tsconfig of the module tx_linkhandler
/**
* Get TsConfig on loading of the class
*/
......
}
/**
* 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 array $value: reference properties
* @param string $type: current type
* @param string $key: validator hook name
* @return string fetched type
*/
public function fetchType($value, $type) {
public function fetchType($value, $type, $key) {
if ($type == 'string' && strtolower(substr($value['tokenValue'], 0, 7)) == 'record:') {
$type = 'linkhandler';
}
classes/tasks/class.tx_linkvalidator_tasks_validate.php (working copy)
/**
* @var integer
*/
public $totalBrokenLink = 0;
protected $totalBrokenLink = 0;
/**
* @var integer
......
/**
* @var integer
*/
public $oldTotalBrokenLink = 0;
protected $oldTotalBrokenLink = 0;
/**
* @var string
*/
protected $templateMail; // Mail template fetch into the given template file.
/**
* @var boolean
*/
protected $dif; // Number of result was diferent or not.
/**
* @var string
*/
protected $emailfile; // template to be used for the email.
/**
* @var integer
*/
protected $depth; // Level of pages the task should check.
/**
* @var integer
*/
protected $page; // UID of the start page for this task.
/**
* @var string
*/
protected $email; // Email address to which an email report is sent.
/**
* @var boolean
*/
protected $emailonbrokenlinkonly; // Only send an email, if new broken links were found.
/**
* Function executed from the Scheduler.
modfunc1/class.tx_linkvalidator_modfunc1.php (working copy)
* @var template
*/
public $doc;
protected $relativePath;
protected $pageRecord = array();
protected $isAccessibleForCurrentUser = FALSE;
/**
* @var string
*/
protected $relativePath;
/**
* @var array
*/
protected $pageRecord = array(); // current page record
/**
* @var boolean
*/
protected $isAccessibleForCurrentUser = FALSE; // module is accessible for the current user or not
/**
* @var integer
*/
protected $search_level; // depth for the recursivity of the link validation
/**
* @var tx_linkvalidator_processing
*/
protected $processing; // link validation class
protected $processing;
/**
* @var array
*/
protected $modTS = array(); // tsconfig of the current module
/**
* @var array
*/
protected $availableOptions = array(); // list of available link types to check defined in the tsconfig
/**
* @var array
*/
protected $checkOpt = array(); // list of current used link types to check.
/**
* @var string
*/
protected $firstSteps; // hint message displayed on top of the module.
/**
* @var string
*/
protected $updateListHtml; // html for the check links button
/**
* @var string
*/
protected $refreshListHtml; // html for he Refresh display button.
/**
* @var string
*/
protected $checkOptHtml; // html for the checkbox of the type of link.
/**
* @var string
*/
protected $content; // html to be displayed.
/**
* Main method of modfunc1
(1-1/7)