- Timestamp:
- 06/06/10 14:41:17 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/page/classes/modules/page/mapper/Page.mapper.class.php
r934 r935 100 100 } 101 101 102 public function GetPages() { 102 public function GetPages($aFilter) { 103 $sPidNULL=''; 104 if (array_key_exists('pid',$aFilter) and is_null($aFilter['pid'])) { 105 $sPidNULL='and page_pid IS NULL'; 106 } 103 107 $sql = "SELECT 104 108 *, … … 106 110 page_pid as PARENT_KEY 107 111 FROM 108 ".Config::Get('plugin.page.table.page')." 112 ".Config::Get('plugin.page.table.page')." 113 WHERE 114 1=1 115 { and page_active = ?d } 116 { and page_main = ?d } 117 { and page_pid = ? } {$sPidNULL} 109 118 ORDER by page_sort desc; 110 119 "; 111 if ($aRows=$this->oDb->select($sql)) { 120 if ($aRows=$this->oDb->select($sql, 121 isset($aFilter['main']) ? $aFilter['main']:DBSIMPLE_SKIP, 122 isset($aFilter['active']) ? $aFilter['active']:DBSIMPLE_SKIP, 123 (array_key_exists('pid',$aFilter) and !is_null($aFilter['pid'])) ? $sPid : DBSIMPLE_SKIP 124 )) { 112 125 return $aRows; 113 126 }
