Changeset 2662
- Timestamp:
- 09/24/10 17:50:26 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/prvcat/_public.php
r2210 r2662 7 7 if (!defined('DC_RC_PATH')) { return; } 8 8 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 { 9 class prvCatPublic extends dcUrlHandlers { 16 10 protected static function urlinfos($url) { 17 11 $type = $args = ''; … … 35 29 public static function beforeDocumentCallback(dcCore $core) { 36 30 $infos = self::urlinfos($core->url); 31 $args = $infos['args']; 32 self::getPageNumber($args); 37 33 if ($infos['type'] == 'category') { 38 $category = $core->blog->getCategories(array('cat_url' => $ infos['args']));34 $category = $core->blog->getCategories(array('cat_url' => $args)); 39 35 $cat_id = $category->cat_id; 40 36 $perms = new prvCatPermMgr($core->con, $core->prefix); … … 49 45 global $_ctx; 50 46 $_ctx->categories = $category; 51 prvCatLoader::load('prvcat-password.html','text/html',false);47 self::load('prvcat-password.html','text/html',false); 52 48 exit; 53 49 } else if ($infos['type'] == 'feed') { 54 if (strpos($ infos['args'], "category/") === 0) {50 if (strpos($args, "category/") === 0) { 55 51 $id = substr($infos['args'], strlen("category/")); 56 52 $perms = new prvCatPermMgr($core->con, $core->prefix); … … 65 61 // FIXME: we cannot get feed typen in CategoryFeedURL 66 62 // callback, so we just use atom 67 prvCatLoader::load('atom.xml','application/atom+xml',true);63 self::load('atom.xml','application/atom+xml',true); 68 64 exit; 69 65 } … … 91 87 $args[0] = $core->blog->url.$core->url->getBase("feed")."/category/".$uuid; 92 88 } 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 } 93 93 } 94 94
Note: See TracChangeset
for help on using the changeset viewer.