content_list.php

Go to the documentation of this file.
00001 <?php
00002 
00009 class Content_List extends oxAdminList
00010 {
00011 
00017     protected $_sListClass = 'oxcontent';
00018 
00024     protected $_sListType = 'oxcontentlist';
00025 
00032     public function render()
00033     {
00034         parent::render();
00035 
00036         $sFolder = oxRegistry::getConfig()->getRequestParameter("folder");
00037         $sFolder = $sFolder ? $sFolder : -1;
00038 
00039         $this->_aViewData["folder"] = $sFolder;
00040         $this->_aViewData["afolder"] = $this->getConfig()->getConfigParam('aCMSfolder');
00041 
00042         return "content_list.tpl";
00043     }
00044 
00053     protected function _prepareWhereQuery($aWhere, $sqlFull)
00054     {
00055         $sQ = parent::_prepareWhereQuery($aWhere, $sqlFull);
00056         $sFolder = oxRegistry::getConfig()->getRequestParameter('folder');
00057         $sViewName = getviewName("oxcontents");
00058 
00059         //searchong for empty oxfolder fields
00060         if ($sFolder == 'CMSFOLDER_NONE' || $sFolder == 'CMSFOLDER_NONE_RR') {
00061             $sQ .= " and {$sViewName}.oxfolder = '' ";
00062         } elseif ($sFolder && $sFolder != '-1') {
00063             $sFolder = oxDb::getDb()->quote($sFolder);
00064             $sQ .= " and {$sViewName}.oxfolder = {$sFolder}";
00065         }
00066 
00067 
00068         return $sQ;
00069     }
00070 }