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_official / html / modules / hitcount [ view in CVS ]
| Date | Directory [filter] | File(s) [view] | Author [filter] |
| 27 Aug 2002 21:12:16 | postnuke_official/html/modules/hitcount | pnadminapi.php,1.2,1.3 pnuser.php,1.4,1.5 pnuserapi.php,1.4,1.5 | Mike |
| change default permission, some array names & test template | |||
Update of /home/cvsroot/postnuke_official/html/modules/hitcount
In directory ns7.hostnuke.net:/tmp/cvs-serv23995
Modified Files:
pnadminapi.php pnuser.php pnuserapi.php
Log Message:
change default permission, some array names & test template
Index: pnadminapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/hitcount/pnadminapi.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pnadminapi.php 12 Aug 2002 11:02:36 -0000 1.2
--- pnadminapi.php 27 Aug 2002 21:12:14 -0000 1.3
***************
*** 63,67 ****
// Security check - important to do this as early on as possible to
// avoid potential security holes or just too much wasted processing
! if (!pnSecAuthAction(0, 'Hitcount::', "$modname::$objectid", ACCESS_ADD)) {
$msg = pnML('Not authorized to add #(1) items',
'Hitcount');
--- 63,67 ----
// Security check - important to do this as early on as possible to
// avoid potential security holes or just too much wasted processing
! if (!pnSecAuthAction(0, 'Hitcount::', "$modname::$objectid", ACCESS_READ)) {
$msg = pnML('Not authorized to add #(1) items',
'Hitcount');
Index: pnuser.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/hitcount/pnuser.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pnuser.php 11 Aug 2002 17:41:15 -0000 1.4
--- pnuser.php 27 Aug 2002 21:12:14 -0000 1.5
***************
*** 38,58 ****
}
$modlist = pnModAPIFunc('hitcount','user','getmodules');
- $out = "Modules we're currently counting display hits for : (test only)<br><ul>";
foreach ($modlist as $modid => $numitems) {
$modinfo = pnModGetInfo($modid);
! $out .= "<li>$modinfo[name] => $numitems</li>\n<ul>\n";
! $toplist = pnModAPIFunc('hitcount','user','tophits',
! array('modname' => $modinfo['name']));
! foreach ($toplist as $topitem) {
! $out .= "<li>$topitem[itemid] => $topitem[hits]</li>\n";
! }
! $out .= "</ul>\n";
}
- $out .= "</ul>\n";
// Return output
! //return pnML('// TODO: show overview of hooked modules ?');
! return $out;
}
--- 38,58 ----
}
+ $data['title'] = "Modules we're currently counting display hits for : (test)";
+ $data['moditems'] = array();
+
$modlist = pnModAPIFunc('hitcount','user','getmodules');
foreach ($modlist as $modid => $numitems) {
$modinfo = pnModGetInfo($modid);
! $moditem = array();
! $moditem['name'] = $modinfo['name'];
! $moditem['numitems'] = $numitems;
! $moditem['link'] = pnModURL($modinfo['name'],'user','main');
! $moditem['tophits'] = pnModAPIFunc('hitcount','user','tophits',
! array('modname' => $modinfo['name']));
! $data['moditems'][] = $moditem;
}
// Return output
! return $data;
}
Index: pnuserapi.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/modules/hitcount/pnuserapi.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pnuserapi.php 11 Aug 2002 17:41:15 -0000 1.4
--- pnuserapi.php 27 Aug 2002 21:12:14 -0000 1.5
***************
*** 203,215 ****
}
! $toplist = array();
while (!$result->EOF) {
list($id,$hits) = $result->fields;
! $toplist[] = array('itemid' => $id, 'hits' => $hits);
$result->MoveNext();
}
$result->close();
! return $toplist;
}
--- 203,215 ----
}
! $tophits = array();
while (!$result->EOF) {
list($id,$hits) = $result->fields;
! $tophits[] = array('itemid' => $id, 'hits' => $hits);
$result->MoveNext();
}
$result->close();
! return $tophits;
}
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 |