00001 <?php
00002
00009 class Content_List extends oxAdminList
00010 {
00016 protected $_sListClass = 'oxcontent';
00017
00023 protected $_sListType = 'oxcontentlist';
00024
00031 public function render()
00032 {
00033 parent::render();
00034
00035 $sFolder = oxConfig::getParameter( "folder" );
00036 $sFolder = $sFolder ? $sFolder : -1;
00037
00038 $this->_aViewData["folder"] = $sFolder;
00039 $this->_aViewData["afolder"] = $this->getConfig()->getConfigParam( 'aCMSfolder' );
00040 return "content_list.tpl";
00041 }
00042
00051 protected function _prepareWhereQuery( $aWhere, $sqlFull )
00052 {
00053 $sQ = parent::_prepareWhereQuery( $aWhere, $sqlFull );
00054 $sFolder = oxConfig::getParameter( 'folder' );
00055
00056 if ( $sFolder == 'CMSFOLDER_NONE' || $sFolder == 'CMSFOLDER_NONE_RR') {
00057 $sQ .= " and oxcontents.oxfolder = '' ";
00058 } else if ( $sFolder && $sFolder != '-1' ) {
00059 $sFolder = oxDb::getDb()->quote( $sFolder );
00060 $sQ .= " and oxcontents.oxfolder = {$sFolder}";
00061 }
00062
00063 return $sQ;
00064 }
00065
00066 }