Changeset 17 for ez_publish/ezipb/trunk
- Timestamp:
- 09/03/07 23:28:12 (15 months ago)
- Location:
- ez_publish/ezipb/trunk/autoloads
- Files:
-
- 2 modified
-
ezipb_operators.php (modified) (5 diffs)
-
eztemplateautoload.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ez_publish/ezipb/trunk/autoloads/ezipb_operators.php
r16 r17 61 61 'ezipb_md5_check', 62 62 'ezipb_vars', 63 'ezipb_fetch_ post' );63 'ezipb_fetch_topic' ); 64 64 } 65 65 … … 85 85 'ezipb_md5_check' => array(), 86 86 '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() ) ) 88 88 ); 89 89 } … … 114 114 $operatorValue = $this->ezipb_vars( $namedParameters['index'] ); 115 115 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'] ); 118 118 break; 119 119 } … … 203 203 * Bref, je pense avoir fait le bon choix ! 204 204 * 205 * Basé sur la fonction return_topic_list_data() 206 * sources / api / api_topic_view.php 207 * 205 208 * @param array $options Options de la requêtes. 206 209 * @return array Infos sur les postes 207 210 */ 208 function ezipb_fetch_ post( $options ) {211 function ezipb_fetch_topic ( $options ) { 209 212 210 213 /* Valeurs par défauts */ 211 214 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 ); 213 216 if ( !array_key_exists( 'offset', $options ) ) 214 217 $options['offset'] = 0; … … 242 245 ) ); 243 246 $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 } 247 254 248 255 } // EOC -
ez_publish/ezipb/trunk/autoloads/eztemplateautoload.php
r15 r17 11 11 'ezipb_md5_check', 12 12 'ezipb_vars', 13 'ezipb_fetch_ post' )13 'ezipb_fetch_topic' ) 14 14 ); 15 15 ?>
