Index: typo3/browse_links.php =================================================================== RCS file: /cvsroot/typo3/TYPO3core/typo3/browse_links.php,v retrieving revision 1.23.2.6 diff -u -r1.23.2.6 browse_links.php --- typo3/browse_links.php 22 Mar 2006 01:11:03 -0000 1.23.2.6 +++ typo3/browse_links.php 29 Mar 2006 06:26:46 -0000 @@ -89,6 +89,16 @@ * @see main() */ var $mode; + + /** + * holds Instance of main browse_links class + * needed fo intercommunication between various classes that need access to variables via $GLOBALS['SOBE'] + * Not the most nice solution but introduced since we don't have another general way to return class-instances or registry for now + * + * @var browse_links + */ + + var $browser; /** @@ -140,27 +150,27 @@ // if type was not rendered use default rendering functions if(!$browserRendered) { - $browser = t3lib_div::makeInstance('browse_links'); - $browser->init(); + $this->browser = t3lib_div::makeInstance('browse_links'); + $this->browser->init(); $modData = $BE_USER->getModuleData('browse_links.php','ses'); - list($modData, $store) = $browser->processSessionData($modData); + list($modData, $store) = $this->browser->processSessionData($modData); $BE_USER->pushModuleData('browse_links.php',$modData); // Output the correct content according to $this->mode switch((string)$this->mode) { case 'rte': - $this->content = $browser->main_rte(); + $this->content = $this->browser->main_rte(); break; case 'db': - $this->content = $browser->main_db(); + $this->content = $this->browser->main_db(); break; case 'file': case 'filedrag': - $this->content = $browser->main_file(); + $this->content = $this->browser->main_file(); break; case 'wizard': - $this->content = $browser->main_rte(1); + $this->content = $this->browser->main_rte(1); break; } } Index: typo3/class.browse_links.php =================================================================== RCS file: /cvsroot/typo3/TYPO3core/typo3/Attic/class.browse_links.php,v retrieving revision 1.1.2.3 diff -u -r1.1.2.3 class.browse_links.php --- typo3/class.browse_links.php 22 Mar 2006 01:11:04 -0000 1.1.2.3 +++ typo3/class.browse_links.php 29 Mar 2006 06:26:51 -0000 @@ -192,10 +192,10 @@ * @return string */ function ext_addP() { - $str = '&act='.$GLOBALS['SOBE']->act. - '&mode='.$GLOBALS['SOBE']->mode. - '&expandPage='.$GLOBALS['SOBE']->expandPage. - '&bparams='.rawurlencode($GLOBALS['SOBE']->bparams); + $str = '&act='.$GLOBALS['SOBE']->browser->act. + '&mode='.$GLOBALS['SOBE']->browser->mode. + '&expandPage='.$GLOBALS['SOBE']->browser->expandPage. + '&bparams='.rawurlencode($GLOBALS['SOBE']->browser->bparams); return $str; } @@ -307,14 +307,14 @@ foreach($treeArr as $k => $v) { $c++; $bgColorClass = ($c+1)%2 ? 'bgColor' : 'bgColor-10'; - if ($GLOBALS['SOBE']->curUrlInfo['act']=='page' && $GLOBALS['SOBE']->curUrlInfo['pageid']==$v['row']['uid'] && $GLOBALS['SOBE']->curUrlInfo['pageid']) { + if ($GLOBALS['SOBE']->browser->curUrlInfo['act']=='page' && $GLOBALS['SOBE']->browser->curUrlInfo['pageid']==$v['row']['uid'] && $GLOBALS['SOBE']->browser->curUrlInfo['pageid']) { $arrCol=''; $bgColorClass='bgColor4'; } else { $arrCol=''; } - $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&expandPage='.$v['row']['uid'].'\');'; + $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->browser->act.'&mode='.$GLOBALS['SOBE']->browser->mode.'&expandPage='.$v['row']['uid'].'\');'; $cEbullet = $this->ext_isLinkable($v['row']['doktype'],$v['row']['uid']) ? '' : ''; @@ -440,7 +440,7 @@ $ficon=t3lib_iconWorks::getIcon('pages',$v); $onClick = "return insertElement('pages', '".$v['uid']."', 'db', ".t3lib_div::quoteJSvalue($v['title']).", '', '', '".$ficon."','',1);"; } else { - $onClick = htmlspecialchars('return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&expandPage='.$v['uid'].'\');'); + $onClick = htmlspecialchars('return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->browser->act.'&mode='.$GLOBALS['SOBE']->browser->mode.'&expandPage='.$v['uid'].'\');'); } return ''.$title.''; } @@ -484,7 +484,7 @@ */ function wrapTitle($title,$v) { if ($this->ext_isLinkable($v)) { - $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&expandFolder='.rawurlencode($v['path']).'\');'; + $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->browser->act.'&mode='.$GLOBALS['SOBE']->browser->mode.'&expandFolder='.rawurlencode($v['path']).'\');'; return ''.$title.''; } else { return ''.$title.''; @@ -539,12 +539,12 @@ $c=0; // Preparing the current-path string (if found in the listing we will see a red blinking arrow). - if (!$GLOBALS['SOBE']->curUrlInfo['value']) { + if (!$GLOBALS['SOBE']->browser->curUrlInfo['value']) { $cmpPath=''; - } else if (substr(trim($GLOBALS['SOBE']->curUrlInfo['info']),-1)!='/') { - $cmpPath=PATH_site.dirname($GLOBALS['SOBE']->curUrlInfo['info']).'/'; + } else if (substr(trim($GLOBALS['SOBE']->browser->curUrlInfo['info']),-1)!='/') { + $cmpPath=PATH_site.dirname($GLOBALS['SOBE']->browser->curUrlInfo['info']).'/'; } else { - $cmpPath=PATH_site.$GLOBALS['SOBE']->curUrlInfo['info']; + $cmpPath=PATH_site.$GLOBALS['SOBE']->browser->curUrlInfo['info']; } // Traverse rows for the tree and print them into table rows: @@ -553,14 +553,14 @@ $bgColorClass=($c+1)%2 ? 'bgColor' : 'bgColor-10'; // Creating blinking arrow, if applicable: - if ($GLOBALS['SOBE']->curUrlInfo['act']=='file' && $cmpPath==$v['row']['path']) { + if ($GLOBALS['SOBE']->browser->curUrlInfo['act']=='file' && $cmpPath==$v['row']['path']) { $arrCol=''; $bgColorClass='bgColor4'; } else { $arrCol=''; } // Create arrow-bullet for file listing (if folder path is linkable): - $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&expandFolder='.rawurlencode($v['row']['path']).'\');'; + $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->browser->act.'&mode='.$GLOBALS['SOBE']->browser->mode.'&expandFolder='.rawurlencode($v['row']['path']).'\');'; $cEbullet = $this->ext_isLinkable($v['row']) ? '' : ''; // Put table row with folder together: @@ -636,7 +636,7 @@ */ function wrapTitle($title,$v) { if ($this->ext_isLinkable($v)) { - $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&expandFolder='.rawurlencode($v['path']).'\');'; + $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->browser->act.'&mode='.$GLOBALS['SOBE']->browser->mode.'&expandFolder='.rawurlencode($v['path']).'\');'; return ''.$title.''; } else { return ''.$title.'';