Dotclear

Changeset 3106:729173e2b2a8


Ignore:
Timestamp:
09/29/15 17:34:17 (10 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Blogs (lists) are now sorted in lexical order as far as possible, addresses #1850

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin/blogs.php

    r3046 r3106  
    6666     $rs = $core->getBlogs($params); 
    6767     $nb_blog = $counter->f(0); 
     68     $rsStatic = $rs->toStatic(); 
     69     if ($sortby != 'blog_upddt') { 
     70          // Sort blog list using lexical order if necessary 
     71          $rsStatic->extend('rsExtUser'); 
     72          $rsStatic = $rsStatic->toExtStatic(); 
     73          $rsStatic->lexicalSort(($sortby == 'UPPER(blog_name)' ? 'blog_name' : 'blog_id'),$order); 
     74     } 
    6875} catch (Exception $e) { 
    6976     $core->error->add($e->getMessage()); 
     
    163170          '</tr>'; 
    164171 
    165           while ($rs->fetch()) { 
    166                echo blogLine($rs); 
     172          while ($rsStatic->fetch()) { 
     173               echo blogLine($rsStatic); 
    167174          } 
    168175 
  • inc/core/class.dc.rs.extensions.php

    r3105 r3106  
    894894} 
    895895 
     896class rsExtBlog 
     897{ 
     898     private static $sortfield; 
     899     private static $sortsign; 
     900     /** 
     901     Converts this record to a {@link extStaticRecord} instance. 
     902 
     903     @param    rs   Invisible parameter 
     904      */ 
     905     public static function toExtStatic($rs) 
     906     { 
     907          if ($rs instanceof extStaticRecord) { 
     908               return $rs; 
     909          } 
     910          return new extStaticRecord($rs); 
     911     } 
     912} 
     913 
    896914class extStaticRecord extends staticRecord 
    897915{ 
Note: See TracChangeset for help on using the changeset viewer.

Sites map