2 namespace TYPO3\CMS\Linkvalidator\Linktype;
70 $this->responseContent =
true;
72 unset($this->errorParams);
75 if (strpos($softRefEntry[
'substr'][
'recordRef'],
'pages:') !== 0) {
79 if (strpos(
$url,
'#c') !==
false) {
80 $parts = explode(
'#c',
$url);
87 $this->responsePage = $this->
checkPage($page);
91 $this->responseContent = $this->
checkContent($page, $anchor);
94 is_array($this->errorParams[
'page']) && !$this->responsePage
95 || is_array($this->errorParams[
'content']) && !$this->responseContent
100 return ($this->responsePage && $this->responseContent);
111 $row = $this->
getDatabaseConnection()->exec_SELECTgetSingleRow(
'uid, title, deleted, hidden, starttime, endtime',
'pages',
'uid = ' . (
int)$page);
112 $this->responsePage =
true;
114 if ($row[
'deleted'] ==
'1') {
115 $this->errorParams[
'errorType'][
'page'] = self::DELETED;
116 $this->errorParams[
'page'][
'title'] = $row[
'title'];
117 $this->errorParams[
'page'][
'uid'] = $row[
'uid'];
118 $this->responsePage =
false;
119 }
elseif ($row[
'hidden'] ==
'1' ||
$GLOBALS[
'EXEC_TIME'] < (
int)$row[
'starttime'] || $row[
'endtime'] && (
int)$row[
'endtime'] <
$GLOBALS[
'EXEC_TIME']) {
120 $this->errorParams[
'errorType'][
'page'] = self::HIDDEN;
121 $this->errorParams[
'page'][
'title'] = $row[
'title'];
122 $this->errorParams[
'page'][
'uid'] = $row[
'uid'];
123 $this->responsePage =
false;
126 $this->errorParams[
'errorType'][
'page'] = self::NOTEXISTING;
127 $this->errorParams[
'page'][
'uid'] = (int)$page;
128 $this->responsePage =
false;
144 'uid, pid, header, deleted, hidden, starttime, endtime',
146 'uid = ' . (
int)$anchor
148 $this->responseContent =
true;
152 $correctPageID = $res[
'pid'];
155 if (!($correctPageID === $page)) {
156 $this->errorParams[
'errorType'][
'content'] = self::MOVED;
157 $this->errorParams[
'content'][
'uid'] = (int)$anchor;
158 $this->errorParams[
'content'][
'wrongPage'] = (int)$page;
159 $this->errorParams[
'content'][
'rightPage'] = (int)$correctPageID;
160 $this->responseContent =
false;
163 if ($res[
'deleted'] ==
'1') {
164 $this->errorParams[
'errorType'][
'content'] = self::DELETED;
165 $this->errorParams[
'content'][
'title'] = $res[
'header'];
166 $this->errorParams[
'content'][
'uid'] = $res[
'uid'];
167 $this->responseContent =
false;
168 }
elseif ($res[
'hidden'] ==
'1' ||
$GLOBALS[
'EXEC_TIME'] < (
int)$res[
'starttime'] || $res[
'endtime'] && (
int)$res[
'endtime'] <
$GLOBALS[
'EXEC_TIME']) {
169 $this->errorParams[
'errorType'][
'content'] = self::HIDDEN;
170 $this->errorParams[
'content'][
'title'] = $res[
'header'];
171 $this->errorParams[
'content'][
'uid'] = $res[
'uid'];
172 $this->responseContent =
false;
177 $this->errorParams[
'errorType'][
'content'] = self::NOTEXISTING;
178 $this->errorParams[
'content'][
'uid'] = (int)$anchor;
179 $this->responseContent =
false;
195 switch ($errorType[
'page']) {
197 $errorPage = str_replace(
206 $lang->getLL(
'list.report.pagedeleted')
210 $errorPage = str_replace(
219 $lang->getLL(
'list.report.pagenotvisible')
223 $errorPage = str_replace(
226 $lang->getLL(
'list.report.pagenotexisting')
231 switch ($errorType[
'content']) {
233 $errorContent = str_replace(
242 $lang->getLL(
'list.report.contentdeleted')
246 $errorContent = str_replace(
255 $lang->getLL(
'list.report.contentnotvisible')
259 $errorContent = str_replace(
272 $lang->getLL(
'list.report.contentmoved')
276 $errorContent = str_replace(
'###uid###',
$errorParams[
'content'][
'uid'],
$lang->getLL(
'list.report.contentnotexisting'));
279 if (isset($errorPage) && isset($errorContent)) {
280 $response = $errorPage .
'<br />' . $errorContent;
281 }
elseif (isset($errorPage)) {
283 }
elseif (isset($errorContent)) {
303 if (!empty($rootLine)) {
306 if (!empty($domainRecord)) {
307 $domain = $protocol . $domainRecord;
310 return $domain .
'/index.php?id=' . $row[
'url'];