[TASK] Fix CGL issues
authorPhilipp Gampe <dev@philippgampe.info>
Sat, 10 Nov 2012 18:31:32 +0000 (19:31 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 14 Nov 2012 19:48:33 +0000 (20:48 +0100)
Wrap a long line and rename an internal variable to lower camel case.

Resolves: #42844
Releases: 6.0

Change-Id: Ia792b71484c1154673a6782c772ad86358c1e268
Reviewed-on: http://review.typo3.org/16383
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
typo3/sysext/linkvalidator/Classes/class.tx_linkvalidator_processor.php

index d2ef2fd..9d35531 100644 (file)
@@ -137,8 +137,13 @@ class LinkAnalyzer {
                $results = array();
                if (count($checkOptions) > 0) {
                        $checkKeys = array_keys($checkOptions);
-                       $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\')) ' . $checkLinkTypeCondition);
+                       $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\'))' .
+                                       $checkLinkTypeCondition
+                       );
                        // Traverse all configured tables
                        foreach ($this->searchFields as $table => $fields) {
                                if ($table === 'pages') {
@@ -188,9 +193,9 @@ class LinkAnalyzer {
                                                        $url = $entryValue['substr']['tokenValue'];
                                                }
                                                $this->linkCounts[$table]++;
-                                               $checkURL = $hookObj->checkLink($url, $entryValue, $this);
+                                               $checkUrl = $hookObj->checkLink($url, $entryValue, $this);
                                                // Broken link found
-                                               if (!$checkURL) {
+                                               if (!$checkUrl) {
                                                        $response = array();
                                                        $response['valid'] = FALSE;
                                                        $response['errorParams'] = $hookObj->getErrorParams();
index e395528..2186646 100644 (file)
@@ -28,4 +28,5 @@ $GLOBALS['LANG']->includeLLFile('EXT:linkvalidator/modfuncreport/locallang.xml')
  * typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
  */
 require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('linkvalidator') . 'Classes/LinkAnalyzer.php';
+
 ?>
\ No newline at end of file