Index: class.db_list.inc =================================================================== --- class.db_list.inc (Revision 8664) +++ class.db_list.inc (Arbeitskopie) @@ -148,15 +148,15 @@ * @return void */ function start($id,$table,$pointer,$search="",$levels="",$showLimit=0) { - global $TCA; - // Setting internal variables: - $this->id=intval($id); // sets the parent id - if ($TCA[$table]) $this->table=$table; // Setting single table mode, if table exists: - $this->firstElementNumber=$pointer; - $this->searchString=trim($search); - $this->searchLevels=trim($levels); - $this->showLimit=t3lib_div::intInRange($showLimit,0,10000); + $this->id = intval($id); // sets the parent id + if ($GLOBALS['TCA'][$table]) { + $this->table = $table; // Setting single table mode, if table exists: + } + $this->firstElementNumber = $pointer; + $this->searchString = trim($search); + $this->searchLevels = trim($levels); + $this->showLimit = t3lib_div::intInRange($showLimit,0,10000); // Setting GPvars: $this->csvOutput = t3lib_div::_GP('csv') ? TRUE : FALSE; @@ -344,7 +344,7 @@ '.$formElements[1]; - $content .= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_searchbox', $GLOBALS['BACK_PATH'], '|
'); + $content .= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_searchbox', $this->backPath, '|
'); return $content; } @@ -811,26 +811,25 @@ * @param string string with table, orig uid and language separated by ":" * @return void */ - function localizationRedirect($justLocalized) { - global $TCA; + function localizationRedirect($justLocalized) { + list($table, $orig_uid, $language) = explode(':', $justLocalized); - list($table,$orig_uid,$language) = explode(':',$justLocalized); - - if ($TCA[$table] && $TCA[$table]['ctrl']['languageField'] && $TCA[$table]['ctrl']['transOrigPointerField']) { + if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) { list($localizedRecord) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( 'uid', $table, - $TCA[$table]['ctrl']['languageField'].'='.intval($language).' AND '. - $TCA[$table]['ctrl']['transOrigPointerField'].'='.intval($orig_uid). + $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '= '. intval($language) . ' AND ' . + $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . intval($orig_uid) . t3lib_BEfunc::deleteClause($table). t3lib_BEfunc::versioningPlaceholderClause($table) ); - if (is_array($localizedRecord)) { + if (is_array($localizedRecord)) { // Create parameters and finally run the classic page module for creating a new page translation - $params = '&edit['.$table.']['.$localizedRecord['uid'].']=edit'; - $returnUrl = '&returnUrl='.rawurlencode($this->listURL()); - $location = $GLOBALS['BACK_PATH'].'alt_doc.php?'.$params.$returnUrl; + $url = substr($this->listURL(), strlen($this->backPath)); + $params = '&edit[' . $table . '][' . $localizedRecord['uid'] . ']=edit'; + $returnUrl = '&returnUrl=' . rawurlencode($url); + $location = $this->backPath . 'alt_doc.php?' . $params . $returnUrl; t3lib_utility_Http::redirect($location); } Index: class.db_list_extra.inc =================================================================== --- class.db_list_extra.inc (Revision 8664) +++ class.db_list_extra.inc (Arbeitskopie) @@ -174,11 +174,11 @@ // CSH if (!strlen($this->id)) { - $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_noId', $GLOBALS['BACK_PATH'], '', TRUE); + $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_noId', $this->backPath, '', TRUE); } elseif(!$this->id) { - $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_root', $GLOBALS['BACK_PATH'], '', TRUE); + $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module_root', $this->backPath, '', TRUE); } else { - $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module', $GLOBALS['BACK_PATH'], '', TRUE); + $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'list_module', $this->backPath, '', TRUE); } if (isset($this->id)) { @@ -1550,9 +1550,7 @@ * @param array The record for which to make the localization panel. * @return array Array with key 0/1 with content for column 1 and 2 */ - function makeLocalizationPanel($table,$row) { - global $TCA,$LANG; - + function makeLocalizationPanel($table,$row) { $out = array( 0 => '', 1 => '', @@ -1562,17 +1560,17 @@ $this->translations = $translations['translations']; // Language title and icon: - $out[0] = $this->languageFlag($row[$TCA[$table]['ctrl']['languageField']]); + $out[0] = $this->languageFlag($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]); - if (is_array($translations)) { - + if (is_array($translations)) { // Traverse page translations and add icon for each language that does NOT yet exist: $lNew = ''; - foreach($this->pageOverlays as $lUid_OnPage => $lsysRec) { - if (!isset($translations['translations'][$lUid_OnPage]) && $GLOBALS['BE_USER']->checkLanguageAccess($lUid_OnPage)) { + foreach($this->pageOverlays as $lUid_OnPage => $lsysRec) { + if (!isset($translations['translations'][$lUid_OnPage]) && $GLOBALS['BE_USER']->checkLanguageAccess($lUid_OnPage)) { + $url = substr($this->listURL(), strlen($this->backPath)); $href = $this->backPath . $GLOBALS['TBE_TEMPLATE']->issueCommand( - '&cmd['.$table.']['.$row['uid'].'][localize]='.$lUid_OnPage, - $this->listURL().'&justLocalized='.rawurlencode($table.':'.$row['uid'].':'.$lUid_OnPage) + '&cmd[' . $table . '][' . $row['uid'] . '][localize]=' . $lUid_OnPage, + $url . '&justLocalized=' . rawurlencode($table . ':' . $row['uid'] . ':' . $lUid_OnPage) ); $language = t3lib_BEfunc::getRecord('sys_language', $lUid_OnPage, 'title'); $lC = ($this->languageIconTitles[$lUid_OnPage]['flagIcon'] ? '' : $this->languageIconTitles[$lUid_OnPage]['title']); Index: class.file_list.inc =================================================================== --- class.file_list.inc (Revision 8664) +++ class.file_list.inc (Arbeitskopie) @@ -565,7 +565,7 @@ } else { $params='&SET[sort]='.$col.'&SET[reverse]=0'; } - $href = $GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath('filelist') . 'mod1/' . $this->script . '?id=' . rawurlencode($path) . $params; + $href = $this->backPath . t3lib_extMgm::extRelPath('filelist') . 'mod1/' . $this->script . '?id=' . rawurlencode($path) . $params; return ''.$code.''; }