-
- foreach ( $res as $row ) {
- if ( $currentPage != $row->pp_page ) {
- # Different page than previous row, so add the properties to
- # the result and save the new page id
-
- if ( $currentPage ) {
- if ( !$this->addPageProps( $result, $currentPage, $props ) ) {
- # addPageProps() indicated that the result did not fit
- # so stop adding data. Reset props so that it doesn't
- # get added again after loop exit
-
- $props = array();
- break;
- }
-
- $props = array();
- }
-
- $currentPage = $row->pp_page;
- }
-
- $props[$row->pp_propname] = $row->pp_value;
+ if ( $this->params['prop'] ) {
+ $propnames = $this->params['prop'];
+ $properties = $pageProps->getProperties( $pages, $propnames );
+ } else {
+ $properties = $pageProps->getAllProperties( $pages );