Development

Changeset 15235

You must first sign up to be able to contribute.

Changeset 15235

Show
Ignore:
Timestamp:
02/03/09 19:20:49 (4 years ago)
Author:
elucas
Message:

Bugfix to Doctrine Pager logic

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfXSLTViewPlugin/trunk/lib/sfArray2XML.php

    r15211 r15235  
    812812     * @return boolean 
    813813     */ 
    814     public static function appendDoctrinePager($xmldocument, $node, $val) 
    815     { 
     814    public static function appendDoctrinePager($xmldocument, $node, $val, $key=null) 
     815    { 
     816      $data = array(); 
     817       
    816818      // If the pager has not been executed, it will throw Doctrine_Pager_Exception 
    817819      if (! $val->getExecuted()) 
    818820      { 
    819         $val->execute(); 
     821        $data['results'] = $val->execute(); 
    820822      } 
    821823       
    822       $data = array(); 
    823       $data = $val->getResults(); 
     824      //$data = $val->getResults(); 
    824825      if ($val->haveToPaginate()) 
    825826      { 
    826827        //$data["pagelinks"] = $val->getLinks(); 
     828        $data["pages"] = array(); 
    827829        $data["pages"]['ResultCount'] = $val->getNumResults(); 
    828830        $data["pages"]['FirstPage'] = $val->getFirstPage(); 
     
    837839      if($data) // TODO: Not sure this test makes sense? $data["total"] should be set, forcing 'true' 
    838840      { 
     841        //wtUtil::dump($data); 
    839842        //$this->addArray($data, $node, $key); 
    840843        self::appendArray($xmldocument, $node, $data, $key);