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
* @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);
$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) {
$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);
}
}
}
*
* @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
*/
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
$this->setErrorParams($errorParams);
}
- $this->url_reports[$url] = $response;
- $this->url_error_params[$url] = $errorParams;
+ $this->urlReports[$url] = $response;
+ $this->urlErrorParams[$url] = $errorParams;
return $response;
}
$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;
}
*/
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) {
}
// 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;
}
}
}
}
}
}
- $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;
}
}
*
* @var integer
*/
- protected $search_level;
+ protected $searchLevel;
/**
* Link validation class.
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');
// get children pages
$pageList = $this->processor->extGetTreeList(
$this->pObj->id,
- $this->search_level,
+ $this->searchLevel,
0,
$GLOBALS['BE_USER']->getPagePermsClause(1)
);
);
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;
$pageList = $this->processor->extGetTreeList(
$this->pObj->id,
- $this->search_level,
+ $this->searchLevel,
0,
$GLOBALS['BE_USER']->getPagePermsClause(1)
);
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>';
$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],
'',