* Fixed bug #12428 Adapt Variable Names to naming conventions
authormichael.miousse <michael.miousse@infoglobe.ca>
Fri, 21 Jan 2011 06:23:31 +0000 (06:23 +0000)
committermichael.miousse <michael.miousse@infoglobe.ca>
Fri, 21 Jan 2011 06:23:31 +0000 (06:23 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/linkvalidator/trunk@42431 735d13b6-9817-0410-8766-e36946ffe9aa

typo3/sysext/linkvalidator/ChangeLog
typo3/sysext/linkvalidator/classes/class.tx_linkvalidator_processor.php
typo3/sysext/linkvalidator/classes/linktype/class.tx_linkvalidator_linktype_external.php
typo3/sysext/linkvalidator/classes/linktype/class.tx_linkvalidator_linktype_linkhandler.php
typo3/sysext/linkvalidator/classes/tasks/class.tx_linkvalidator_tasks_validator.php
typo3/sysext/linkvalidator/modfuncreport/class.tx_linkvalidator_modfuncreport.php

index 68386ae..d635ad9 100644 (file)
@@ -1,4 +1,5 @@
 2011-01-20  Michael Miousse  <michael.miousse@infoglobe.ca> 
+       * Fixed bug #12428 Adapt Variable Names to naming conventions
        * Fixed bug #12427 Rename draw*() methods to render*()
        * Fixed bug #12426: Rename classes according to naming conventions
        * Fixed bug #12425: Give modfunc1 a better name
index e1a9a7a..d06902a 100644 (file)
@@ -353,7 +353,7 @@ class tx_linkvalidator_Processor {
         * @param       string          Perms clause
         * @return      string          Returns the list with a comma in the end (if any pages selected!)
         */
-       public function extGetTreeList($id, $depth, $begin = 0, $perms_clause) {
+       public function extGetTreeList($id, $depth, $begin = 0, $permsClause) {
                $depth = intval($depth);
                $begin = intval($begin);
                $id = intval($id);
@@ -363,7 +363,7 @@ class tx_linkvalidator_Processor {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                'uid,title',
                                'pages',
-                               'pid=' . $id . ' AND deleted=0 AND ' . $perms_clause
+                               'pid=' . $id . ' AND deleted=0 AND ' . $permsClause
                        );
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                if ($begin <= 0) {
@@ -371,7 +371,7 @@ class tx_linkvalidator_Processor {
                                        $this->extPageInTreeInfo[] = array($row['uid'], htmlspecialchars($row['title'], $depth));
                                }
                                if ($depth > 1) {
-                                       $theList .= $this->extGetTreeList($row['uid'], $depth - 1, $begin - 1, $perms_clause);
+                                       $theList .= $this->extGetTreeList($row['uid'], $depth - 1, $begin - 1, $permsClause);
                                }
                        }
                }
index 5d9cd3c..c16c844 100644 (file)
@@ -37,14 +37,14 @@ class tx_linkvalidator_linktype_External extends tx_linkvalidator_linktype_Abstr
         *
         * @var array
         */
-       protected $url_reports = array();
+       protected $urlReports = array();
 
        /**
         * Cached list of all error parameters of the URLs, which were already checked for the current processing.
         *
         * @var array
         */
-       protected $url_error_params = array();
+       protected $urlErrorParams = array();
 
        /**
         * Checks a given URL + /path/filename.ext for validity
@@ -56,13 +56,13 @@ class tx_linkvalidator_linktype_External extends tx_linkvalidator_linktype_Abstr
         */
        public function checkLink($url, $softRefEntry, $reference) {
                $errorParams = array();
-               if (isset($this->url_reports[$url])) {
-                       if(!$this->url_reports[$url]) {
-                               if(is_array($this->url_error_params[$url])) {
-                                   $this->setErrorParams($this->url_error_params[$url]);
+               if (isset($this->urlReports[$url])) {
+                       if(!$this->urlReports[$url]) {
+                               if(is_array($this->urlErrorParams[$url])) {
+                                   $this->setErrorParams($this->urlErrorParams[$url]);
                                }
                        }
-                       return $this->url_reports[$url];
+                       return $this->urlReports[$url];
                }
 
                        // remove possible anchor from the url
@@ -136,8 +136,8 @@ class tx_linkvalidator_linktype_External extends tx_linkvalidator_linktype_Abstr
                        $this->setErrorParams($errorParams);
                }
 
-               $this->url_reports[$url] = $response;
-               $this->url_error_params[$url] = $errorParams;
+               $this->urlReports[$url] = $response;
+               $this->urlErrorParams[$url] = $errorParams;
 
                return $response;
        }
index cdfccb6..25f8081 100644 (file)
@@ -61,23 +61,23 @@ class tx_linkvalidator_linktype_LinkHandler extends tx_linkvalidator_linktype_Ab
                $errorParams = array();
                $parts = explode(":", $url);
                if (count($parts) == 3) {
-                       $tablename = htmlspecialchars($parts[1]);
+                       $tableName = htmlspecialchars($parts[1]);
                        $rowid = intval($parts[2]);
                        $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                                '*',
-                               $tablename,
+                               $tableName,
                                'uid = ' . intval($rowid)
                        );
 
                        if ($rows[0]) {
                                if ($rows[0]['deleted'] == '1') {
                                        $errorParams['errorType'] = DELETED;
-                                       $errorParams['tablename'] = $tablename;
+                                       $errorParams['tablename'] = $tableName;
                                        $errorParams['uid'] = $rowid;
                                        $response =  FALSE;
                                }
                        } else {
-                               $errorParams['tablename'] = $tablename;
+                               $errorParams['tablename'] = $tableName;
                                $errorParams['uid'] = $rowid;
                                $response =  FALSE;
                        }
@@ -113,11 +113,11 @@ class tx_linkvalidator_linktype_LinkHandler extends tx_linkvalidator_linktype_Ab
         */
        public function getErrorMessage($errorParams) {
                $errorType = $errorParams['errorType'];
-               $tablename = $errorParams['tablename'];
+               $tableName = $errorParams['tablename'];
                $title = $GLOBALS['LANG']->getLL('list.report.rowdeleted.default.title');
 
-               if ($this->tsconfig['properties'][$tablename . '.']) {
-                       $title = $this->tsconfig['properties'][$tablename . '.']['label'];
+               if ($this->tsconfig['properties'][$tableName . '.']) {
+                       $title = $this->tsconfig['properties'][$tableName . '.']['label'];
                }
 
                switch ($errorType) {
index d4b2442..078a5bf 100644 (file)
@@ -276,14 +276,14 @@ class tx_linkvalidator_tasks_Validator extends tx_scheduler_Task {
                                }
 
                                        // get the searchFields from TCA
-                               foreach ($GLOBALS['TCA'] as $tablename => $table) {
+                               foreach ($GLOBALS['TCA'] as $tableName => $table) {
                                        if (!empty($table['columns'])) {
-                                               foreach ($table['columns'] as $columnname => $column) {
+                                               foreach ($table['columns'] as $columnName => $column) {
                                                        if ($column['config']['type'] == 'text' || $column['config']['type'] == 'input') {
                                                                if (!empty($column['config']['softref']) && (stripos($column['config']['softref'], "typolink")
                                                                                !== FALSE || stripos($column['config']['softref'], "url") !== FALSE)) {
 
-                                                                       $searchFields[$tablename][] = $columnname;
+                                                                       $searchFields[$tableName][] = $columnName;
                                                                }
                                                        }
                                                }
@@ -301,12 +301,12 @@ class tx_linkvalidator_tasks_Validator extends tx_scheduler_Task {
                                                }
                                        }
                                }
-                               $linktypes = t3lib_div::trimExplode(',', $modTS['linktypes'], 1);
-                               if (is_array($linktypes)) {
+                               $linkTypes = t3lib_div::trimExplode(',', $modTS['linktypes'], 1);
+                               if (is_array($linkTypes)) {
                                        if (!empty($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])
                                                        && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
                                                foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $type => $value) {
-                                                       if (in_array($type, $linktypes)) {
+                                                       if (in_array($type, $linkTypes)) {
                                                                $array[$type] = 1;
                                                        }
                                                }
index 51996fa..0b5fd4e 100644 (file)
@@ -62,7 +62,7 @@ class tx_linkvalidator_ModFuncReport extends t3lib_extobjbase {
         *
         * @var integer
         */
-       protected $search_level;
+       protected $searchLevel;
 
        /**
         * Link validation class.
@@ -136,7 +136,7 @@ class tx_linkvalidator_ModFuncReport extends t3lib_extobjbase {
        public function main() {
                $GLOBALS['LANG']->includeLLFile('EXT:linkvalidator/modfuncreport/locallang.xml');
 
-               $this->search_level = t3lib_div::_GP('search_levels');
+               $this->searchLevel = t3lib_div::_GP('search_levels');
 
                if (isset($this->pObj->id)) {
                        $this->modTS = t3lib_BEfunc::getModTSconfig($this->pObj->id, 'mod.linkvalidator');
@@ -264,7 +264,7 @@ class tx_linkvalidator_ModFuncReport extends t3lib_extobjbase {
                        // get children pages
                $pageList = $this->processor->extGetTreeList(
                        $this->pObj->id,
-                       $this->search_level,
+                       $this->searchLevel,
                        0,
                        $GLOBALS['BE_USER']->getPagePermsClause(1)
                );
@@ -335,7 +335,7 @@ class tx_linkvalidator_ModFuncReport extends t3lib_extobjbase {
                );
 
                foreach ($parts as $kv => $label) {
-                       $opt[] = '<option value="' . $kv . '"' . ($kv == intval($this->search_level) ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
+                       $opt[] = '<option value="' . $kv . '"' . ($kv == intval($this->searchLevel) ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
                }
                $lMenu = '<select name="search_levels">' . implode('', $opt) . '</select>';
                return $lMenu;
@@ -358,7 +358,7 @@ class tx_linkvalidator_ModFuncReport extends t3lib_extobjbase {
 
                $pageList = $this->processor->extGetTreeList(
                        $this->pObj->id,
-                       $this->search_level,
+                       $this->searchLevel,
                        0,
                        $GLOBALS['BE_USER']->getPagePermsClause(1)
                );
@@ -461,7 +461,7 @@ class tx_linkvalidator_ModFuncReport extends t3lib_extobjbase {
                                t3lib_BEfunc::editOnClick(
                                        $params,
                                        $GLOBALS['BACK_PATH'],
-                                       t3lib_div::getIndpEnv('REQUEST_URI') . '?id=' . $this->pObj->id . '&search_levels=' . $this->search_level
+                                       t3lib_div::getIndpEnv('REQUEST_URI') . '?id=' . $this->pObj->id . '&search_levels=' . $this->searchLevel
                                ) . '"' .
                                ' title="' . $GLOBALS['LANG']->getLL('list.edit') . '">' .
                                t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
@@ -556,7 +556,7 @@ class tx_linkvalidator_ModFuncReport extends t3lib_extobjbase {
                                                $translation = $GLOBALS['LANG']->getLL('hooks.' . $type);
                                                $translation = $translation ? $translation : $type;
                                                $option = t3lib_BEfunc::getFuncCheck(
-                                                       array('id' => $this->pObj->id, 'search_levels' => $this->search_level),
+                                                       array('id' => $this->pObj->id, 'search_levels' => $this->searchLevel),
                                                        'SET[' . $type . ']',
                                                        $this->pObj->MOD_SETTINGS[$type],
                                                        '',