74 public function checkLink($url, $softRefEntry, $reference) {
76 $this->responseContent = TRUE;
78 unset($this->errorParams);
81 if (strpos($softRefEntry[
'substr'][
'recordRef'],
'pages:') !== 0) {
85 if (strpos($url,
'#c') !== FALSE) {
86 $parts = explode(
'#c', $url);
93 $this->responsePage = $this->
checkPage($page);
97 $this->responseContent = $this->
checkContent($page, $anchor);
99 if (is_array($this->errorParams[
'page']) && !$this->responsePage
100 || is_array($this->errorParams[
'content']) && !$this->responseContent
104 if ($this->responsePage === TRUE && $this->responseContent === TRUE) {
119 $row =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetSingleRow(
'uid, title, deleted, hidden, starttime, endtime',
'pages',
'uid = ' . (
int)$page);
120 $this->responsePage = TRUE;
122 if ($row[
'deleted'] ==
'1') {
123 $this->errorParams[
'errorType'][
'page'] = self::DELETED;
124 $this->errorParams[
'page'][
'title'] = $row[
'title'];
125 $this->errorParams[
'page'][
'uid'] = $row[
'uid'];
126 $this->responsePage = FALSE;
127 } elseif ($row[
'hidden'] ==
'1' ||
$GLOBALS[
'EXEC_TIME'] < (
int)$row[
'starttime'] || $row[
'endtime'] && (
int)$row[
'endtime'] <
$GLOBALS[
'EXEC_TIME']) {
128 $this->errorParams[
'errorType'][
'page'] = self::HIDDEN;
129 $this->errorParams[
'page'][
'title'] = $row[
'title'];
130 $this->errorParams[
'page'][
'uid'] = $row[
'uid'];
131 $this->responsePage = FALSE;
134 $this->errorParams[
'errorType'][
'page'] = self::NOTEXISTING;
135 $this->errorParams[
'page'][
'uid'] = (int)$page;
136 $this->responsePage = FALSE;
150 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetSingleRow(
'uid, pid, header, deleted, hidden, starttime, endtime',
'tt_content',
'uid = ' . (
int)$anchor);
151 $this->responseContent = TRUE;
155 $correctPageID = $res[
'pid'];
158 if (!($correctPageID === $page)) {
159 $this->errorParams[
'errorType'][
'content'] = self::MOVED;
160 $this->errorParams[
'content'][
'uid'] = (int)$anchor;
161 $this->errorParams[
'content'][
'wrongPage'] = (int)$page;
162 $this->errorParams[
'content'][
'rightPage'] = (int)$correctPageID;
163 $this->responseContent = FALSE;
166 if ($res[
'deleted'] ==
'1') {
167 $this->errorParams[
'errorType'][
'content'] = self::DELETED;
168 $this->errorParams[
'content'][
'title'] = $res[
'header'];
169 $this->errorParams[
'content'][
'uid'] = $res[
'uid'];
170 $this->responseContent = FALSE;
171 } elseif ($res[
'hidden'] ==
'1' ||
$GLOBALS[
'EXEC_TIME'] < (
int)$res[
'starttime'] || $res[
'endtime'] && (
int)$res[
'endtime'] <
$GLOBALS[
'EXEC_TIME']) {
172 $this->errorParams[
'errorType'][
'content'] = self::HIDDEN;
173 $this->errorParams[
'content'][
'title'] = $res[
'header'];
174 $this->errorParams[
'content'][
'uid'] = $res[
'uid'];
175 $this->responseContent = FALSE;
180 $this->errorParams[
'errorType'][
'content'] = self::NOTEXISTING;
181 $this->errorParams[
'content'][
'uid'] = (int)$anchor;
182 $this->responseContent = FALSE;
196 switch ($errorType[
'page']) {
198 $errorPage = str_replace(
207 $GLOBALS[
'LANG']->getLL(
'list.report.pagedeleted')
211 $errorPage = str_replace(
220 $GLOBALS[
'LANG']->getLL(
'list.report.pagenotvisible')
224 $errorPage = str_replace(
227 $GLOBALS[
'LANG']->getLL(
'list.report.pagenotexisting')
232 switch ($errorType[
'content']) {
234 $errorContent = str_replace(
243 $GLOBALS[
'LANG']->getLL(
'list.report.contentdeleted')
247 $errorContent = str_replace(
256 $GLOBALS[
'LANG']->getLL(
'list.report.contentnotvisible')
260 $errorContent = str_replace(
273 $GLOBALS[
'LANG']->getLL(
'list.report.contentmoved')
277 $errorContent = str_replace(
'###uid###',
$errorParams[
'content'][
'uid'],
$GLOBALS[
'LANG']->getLL(
'list.report.contentnotexisting'));
280 if (isset($errorPage) && isset($errorContent)) {
281 $response = $errorPage . LF . $errorContent;
282 } elseif (isset($errorPage)) {
283 $response = $errorPage;
284 } elseif (isset($errorContent)) {
285 $response = $errorContent;
288 $response =
$GLOBALS[
'LANG']->getLL(
'list.report.noinformation');
303 if (count($rootLine) > 0) {
306 if (!empty($domainRecord)) {
307 $domain = $protocol . $domainRecord;
310 return $domain .
'/index.php?id=' . $row[
'url'];
checkContent($page, $anchor)
static BEgetRootLine($uid, $clause='', $workspaceOL=FALSE)
static firstDomainRecord($rootLine)
static getIndpEnv($getEnvName)
getErrorMessage($errorParams)
checkLink($url, $softRefEntry, $reference)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]