Dotclear


Ignore:
Timestamp:
09/30/13 09:51:02 (12 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

blog_count was only set when getPermissions was called.
Add a new method (getBlogCount()) that used blog_count param or retrieved it from database.
close 1545

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.auth.php

    r1179 r2159  
    377377               return $this->blogs[$blog_id]; 
    378378          } 
    379            
    380           if ($this->blog_count === null) { 
    381                $this->blog_count = $this->core->getBlogs(array(),true)->f(0); 
    382           } 
    383            
     379 
    384380          if ($this->user_admin) { 
    385381               $strReq = 'SELECT blog_id '. 
     
    404400          return $this->blogs[$blog_id]; 
    405401     } 
     402 
     403    public function getBlogCount() { 
     404          if ($this->blog_count === null) { 
     405               $this->blog_count = $this->core->getBlogs(array(),true)->f(0); 
     406          } 
     407 
     408        return $this->blog_count; 
     409    } 
    406410      
    407411     public function findUserBlog($blog_id=null) 
Note: See TracChangeset for help on using the changeset viewer.

Sites map