00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 class t3lib_browseTree extends t3lib_treeView {
00074
00075
00076
00077
00078
00079
00080
00081
00082 function init($clause='') {
00083
00084
00085 $clauseExludePidList = '';
00086 if ($pidList = $GLOBALS['BE_USER']->getTSConfigVal('options.hideRecords.pages')) {
00087 if ($pidList = $GLOBALS['TYPO3_DB']->cleanIntList($pidList)) {
00088 $clauseExludePidList = ' AND pages.uid NOT IN ('.$pidList.')';
00089 }
00090 }
00091
00092
00093 parent::init(' AND '.$GLOBALS['BE_USER']->getPagePermsClause(1).' '.$clause.$clauseExludePidList, 'sorting');
00094
00095 $this->table = 'pages';
00096 $this->setTreeName('browsePages');
00097 $this->domIdPrefix = 'pages';
00098 $this->iconName = '';
00099 $this->title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
00100 $this->MOUNTS = $GLOBALS['WEBMOUNTS'];
00101
00102 if ($pidList) {
00103
00104 $hideList = explode(',',$pidList);
00105 $this->MOUNTS = array_diff($this->MOUNTS,$hideList);
00106 }
00107
00108 $this->fieldArray = array_merge($this->fieldArray,array('doktype','php_tree_stop','t3ver_id','t3ver_state','t3ver_wsid','t3ver_swapmode','t3ver_state','t3ver_move_id'));
00109 if (t3lib_extMgm::isLoaded('cms')) {
00110 $this->fieldArray = array_merge(
00111 $this->fieldArray,
00112 array('hidden', 'starttime', 'endtime', 'fe_group', 'module', 'extendToSubpages', 'is_siteroot', 'nav_hide')
00113 );
00114 }
00115 }
00116
00117
00118
00119
00120
00121
00122
00123
00124 function getTitleAttrib($row) {
00125 return t3lib_BEfunc::titleAttribForPages($row,'1=1 '.$this->clause,0);
00126 }
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136 function wrapIcon($icon,$row) {
00137
00138 $theIcon = $this->addTagAttributes($icon,($this->titleAttrib ? $this->titleAttrib.'="'.$this->getTitleAttrib($row).'"' : ''));
00139
00140
00141 if (!$this->ext_IconMode) {
00142 $theIcon = $GLOBALS['TBE_TEMPLATE']->wrapClickMenuOnIcon($theIcon,$this->treeName,$this->getId($row),0);
00143 } elseif (!strcmp($this->ext_IconMode,'titlelink')) {
00144 $aOnClick = 'return jumpTo(\''.$this->getJumpToParam($row).'\',this,\''.$this->domIdPrefix.$this->getId($row).'\','.$this->bank.');';
00145 $theIcon='<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$theIcon.'</a>';
00146 }
00147 return $theIcon;
00148 }
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158 function getTitleStr($row,$titleLen=30) {
00159
00160 $title = parent::getTitleStr($row,$titleLen);
00161 if (isset($row['is_siteroot']) && $row['is_siteroot'] != 0 && $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showDomainNameWithTitle')) {
00162 $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('domainName,sorting', 'sys_domain',
00163 'pid=' . $GLOBALS['TYPO3_DB']->quoteStr($row['uid'], 'sys_domain'), '', 'sorting', 1);
00164 if (is_array($rows) && count($rows) > 0) {
00165 $title = sprintf('%s [%s]', $title, $rows[0]['domainName']);
00166 }
00167 }
00168 return $title;
00169 }
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179 function wrapStop($str, $row) {
00180 if ($row['php_tree_stop']) {
00181 $str .= '<span class="typo3-red">
00182 <a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => $row['uid']))).'" class="typo3-red">+</a>
00183 </span>';
00184 }
00185 return $str;
00186 }
00187 }
00188
00189 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_browsetree.php']) {
00190 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_browsetree.php']);
00191 }
00192
00193 ?>