Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_modules / articles [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
28 Jul 2002 18:26:46 | postnuke_modules/articles | pnadmin.php,1.18,1.19 pnuserapi.php,1.19,1.20 | Mike |
admin view per publication type |
Update of /home/cvsroot/postnuke_modules/articles In directory ns7.hostnuke.net:/tmp/cvs-serv2793 Modified Files: pnadmin.php pnuserapi.php Log Message: admin view per publication type Index: pnadmin.php =================================================================== RCS file: /home/cvsroot/postnuke_modules/articles/pnadmin.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** pnadmin.php 28 Jul 2002 17:33:41 -0000 1.18 --- pnadmin.php 28 Jul 2002 18:26:44 -0000 1.19 *************** *** 311,315 **** { // Get parameters ! $startnum = pnVarCleanFromInput('startnum'); // Default parameters --- 311,316 ---- { // Get parameters ! list($startnum, ! $ptid) = pnVarCleanFromInput('startnum','ptid'); // Default parameters *************** *** 317,320 **** --- 318,324 ---- $startnum = 1; } + if (!isset($ptid)) { + $ptid = null; + } if (!pnSecAuthAction(0, 'articles::category', '::', ACCESS_EDIT)) { *************** *** 341,344 **** --- 345,349 ---- array('startnum' => $startnum, 'numitems' => pnModGetVar('articles', 'itemsperpage'), + 'ptid' => $ptid, 'cids' => false)); *************** *** 377,398 **** } - // Load user API to obtain item count function - if (!pnModAPILoad('categories', 'user')) { - $msg = pnML('Unable to load #(1) user API', - 'Categories'); - pnExceptionSet(PN_SYSTEM_EXCEPTION, 'NO_PERMISSION', - new SystemException($msg)); - return; - } - // TODO : add pager (once it exists in BL) $output = new pnHTML(); // Add pager $output->Pager($startnum, ! pnModAPIFunc('categories', 'user', 'countitems'), pnModURL('articles', 'admin', 'view', ! array('startnum' => '%%')), pnModGetVar('articles', 'itemsperpage')); $pager = $output->GetOutput(); --- 382,395 ---- } // TODO : add pager (once it exists in BL) $output = new pnHTML(); // Add pager $output->Pager($startnum, ! pnModAPIFunc('articles', 'user', 'countitems', ! array('ptid' => $ptid)), pnModURL('articles', 'admin', 'view', ! array('startnum' => '%%', 'ptid' => $ptid)), pnModGetVar('articles', 'itemsperpage')); $pager = $output->GetOutput(); *************** *** 403,408 **** --- 400,428 ---- $labels['options'] = pnVarPrepForDisplay(_ARTICLESOPTIONS); + $pubfilters = array(); + $pubitem = array(); + if (empty($ptid)) { + $pubitem['plink'] = ''; + } else { + $pubitem['plink'] = pnModURL('articles','admin','view',array()); + } + $pubitem['ptitle'] = pnML('All'); + $pubfilters[] = $pubitem; + $pubtypes = pnModAPIFunc('articles','user','getpubtypes'); + foreach ($pubtypes as $id => $pubtype) { + $pubitem = array(); + if ($id == $ptid) { + $pubitem['plink'] = ''; + } else { + $pubitem['plink'] = pnModURL('articles','admin','view', + array('ptid' => $id)); + } + $pubitem['ptitle'] = $pubtype['descr']; + $pubfilters[] = $pubitem; + } + // Return the template variables defined in this function return array('menu' => articles_admin_getmenu(), + 'pubfilters' => $pubfilters, 'labels' => $labels, 'items' => $items, Index: pnuserapi.php =================================================================== RCS file: /home/cvsroot/postnuke_modules/articles/pnuserapi.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** pnuserapi.php 28 Jul 2002 17:39:42 -0000 1.19 --- pnuserapi.php 28 Jul 2002 18:26:44 -0000 1.20 *************** *** 394,398 **** function articles_userapi_countitems($args) { ! if (isset($args['ptid'])) { $pntable = pnDBGetTables(); $articlestable = $pntable['articles']; --- 394,398 ---- function articles_userapi_countitems($args) { ! if (!empty($args['ptid'])) { $pntable = pnDBGetTables(); $articlestable = $pntable['articles'];
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |