Changeset 17

Show
Ignore:
Timestamp:
09/03/07 23:28:12 (16 months ago)
Author:
llaumgui
Message:

ezipb_fetch_post devient ezipb_fetch_topic, oups et puis dodo

Location:
ez_publish/ezipb/trunk/autoloads
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • ez_publish/ezipb/trunk/autoloads/ezipb_operators.php

    r16 r17  
    6161                                                                        'ezipb_md5_check', 
    6262                                                                        'ezipb_vars', 
    63                                                                         'ezipb_fetch_post' ); 
     63                                                                        'ezipb_fetch_topic' ); 
    6464        } 
    6565                 
     
    8585                                                'ezipb_md5_check'               => array(), 
    8686                                                'ezipb_vars'                    => array(       'index' => array( 'type' => 'string', 'required' => false, 'default' => '' ) ), 
    87                                                 'ezipb_fetch_post'              => array(       'options' => array( 'type' => 'array', 'required' => false, 'default' => array() ) ) 
     87                                                'ezipb_fetch_topic'             => array(       'options' => array( 'type' => 'array', 'required' => false, 'default' => array() ) ) 
    8888                                        ); 
    8989        } 
     
    114114                        $operatorValue = $this->ezipb_vars(  $namedParameters['index'] ); 
    115115                        break; 
    116                 case 'ezipb_fetch_post': 
    117                         $operatorValue = $this->ezipb_fetch_post(  $namedParameters['options'] ); 
     116                case 'ezipb_fetch_topic': 
     117                        $operatorValue = $this->ezipb_fetch_topic(  $namedParameters['options'] ); 
    118118                        break; 
    119119                } 
     
    203203         * Bref, je pense avoir fait le bon choix ! 
    204204         * 
     205         * Basé sur la fonction return_topic_list_data() 
     206         * sources / api / api_topic_view.php 
     207         *  
    205208         * @param array $options Options de la requêtes. 
    206209         * @return array Infos sur les postes 
    207210         */ 
    208         function ezipb_fetch_post ( $options ) { 
     211        function ezipb_fetch_topic ( $options ) { 
    209212 
    210213                /* Valeurs par défauts */ 
    211214                if ( !array_key_exists( 'sort_by', $options ) || !is_array( $options['sort_by']) ) 
    212                         $options['sort_by']             = array( 'last_post', true ); 
     215                        $options['sort_by']             = array( 'last_post', false ); 
    213216                if ( !array_key_exists( 'offset', $options ) ) 
    214217                        $options['offset']              =  0; 
     
    242245                                                                                )      ); 
    243246                $this->ipsclass->DB->exec_query(); 
    244                 return $this->ipsclass->DB->fetch_row(); 
    245         } 
    246          
     247                 
     248                $ezipb_fetch_topic = array(); 
     249                while( $row = $this->ipsclass->DB->fetch_row() ) { 
     250                        $ezipb_fetch_topic[]    = $row; 
     251                } 
     252                return $ezipb_fetch_topic; 
     253        } 
    247254 
    248255} // EOC 
  • ez_publish/ezipb/trunk/autoloads/eztemplateautoload.php

    r15 r17  
    1111                                                                                                                                        'ezipb_md5_check', 
    1212                                                                                                                                        'ezipb_vars', 
    13                                                                                                                                         'ezipb_fetch_post' ) 
     13                                                                                                                                        'ezipb_fetch_topic' ) 
    1414                                                                        ); 
    1515?>