Add page_props table access class
[lhc/web/wiklou.git] / includes / actions / InfoAction.php
index 7389ae2..6f33db7 100644 (file)
@@ -203,18 +203,10 @@ class InfoAction extends FormlessAction {
 
                $pageCounts = $this->pageCounts( $this->page );
 
-               // Get page properties
-               $dbr = wfGetDB( DB_SLAVE );
-               $result = $dbr->select(
-                       'page_props',
-                       array( 'pp_propname', 'pp_value' ),
-                       array( 'pp_page' => $id ),
-                       __METHOD__
-               );
-
                $pageProperties = array();
-               foreach ( $result as $row ) {
-                       $pageProperties[$row->pp_propname] = $row->pp_value;
+               $props = PageProps::getInstance()->getProperties( $title );
+               if ( isset( $props[$id] ) ) {
+                       $pageProperties = $props[$id];
                }
 
                // Basic information