content_list.php

Go to the documentation of this file.
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         $sViewName = getviewName( "oxcontents" );
00056 
00057         //searchong for empty oxfolder fields
00058         if ( $sFolder == 'CMSFOLDER_NONE' || $sFolder == 'CMSFOLDER_NONE_RR') {
00059             $sQ .= " and {$sViewName}.oxfolder = '' ";
00060         } elseif ( $sFolder && $sFolder != '-1' ) {
00061             $sFolder = oxDb::getDb()->quote( $sFolder );
00062             $sQ .= " and {$sViewName}.oxfolder = {$sFolder}";
00063         }
00064 
00065 
00066         return $sQ;
00067     }
00068 
00069 }