Dotclear

Changeset 2662


Ignore:
Timestamp:
09/24/10 17:50:26 (12 years ago)
Author:
arno
Message:

fixes: prvcat fails with pagination

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/prvcat/_public.php

    r2210 r2662  
    77if (!defined('DC_RC_PATH')) { return; } 
    88 
    9 class prvCatLoader extends dcUrlHandlers { 
    10      public static function load($tpl,$content_type='text/html',$http_cache=true,$http_etag=true) { 
    11          self::serveDocument($tpl,$content_type,$http_cache,$http_etag); 
    12     } 
    13 } 
    14  
    15 class prvCatPublic extends urlHandler { 
     9class prvCatPublic extends dcUrlHandlers { 
    1610    protected static function urlinfos($url) { 
    1711        $type = $args = ''; 
     
    3529    public static function beforeDocumentCallback(dcCore $core) { 
    3630        $infos = self::urlinfos($core->url); 
     31        $args = $infos['args']; 
     32        self::getPageNumber($args); 
    3733        if ($infos['type'] == 'category') { 
    38             $category = $core->blog->getCategories(array('cat_url' => $infos['args'])); 
     34            $category = $core->blog->getCategories(array('cat_url' => $args)); 
    3935            $cat_id = $category->cat_id; 
    4036            $perms = new prvCatPermMgr($core->con, $core->prefix); 
     
    4945            global $_ctx; 
    5046            $_ctx->categories = $category; 
    51             prvCatLoader::load('prvcat-password.html','text/html',false); 
     47            self::load('prvcat-password.html','text/html',false); 
    5248            exit; 
    5349        } else if ($infos['type'] == 'feed') { 
    54             if (strpos($infos['args'], "category/") === 0) { 
     50            if (strpos($args, "category/") === 0) { 
    5551                $id = substr($infos['args'], strlen("category/")); 
    5652                $perms = new prvCatPermMgr($core->con, $core->prefix); 
     
    6561                    // FIXME: we cannot get feed typen in CategoryFeedURL 
    6662                    // callback, so we just use atom 
    67                     prvCatLoader::load('atom.xml','application/atom+xml',true); 
     63                    self::load('atom.xml','application/atom+xml',true); 
    6864                    exit; 
    6965                } 
     
    9187        $args[0] = $core->blog->url.$core->url->getBase("feed")."/category/".$uuid; 
    9288    } 
     89 
     90    public static function load($tpl,$content_type='text/html',$http_cache=true,$http_etag=true) { 
     91        self::serveDocument($tpl,$content_type,$http_cache,$http_etag); 
     92    } 
    9393} 
    9494 
Note: See TracChangeset for help on using the changeset viewer.

Sites map