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 / tests [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
11 Aug 2002 14:58:49 | postnuke_official/tests | import8.php,1.13,1.14 | Mike |
adapt import of counters to new hitcount API |
Update of /home/cvsroot/postnuke_official/tests In directory ns7.hostnuke.net:/tmp/cvs-serv10999 Modified Files: import8.php Log Message: adapt import of counters to new hitcount API Index: import8.php =================================================================== RCS file: /home/cvsroot/postnuke_official/tests/import8.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** import8.php 9 Aug 2002 16:12:12 -0000 1.13 --- import8.php 11 Aug 2002 14:58:47 -0000 1.14 *************** *** 180,184 **** $dbconn->Execute('FLUSH TABLE ' . $pntable['categories_linkage']); } ! if (pnModAvailable('hitcount') && pnModAPILoad('hitcount','user')) { if ($reset) { $regid2 = pnModGetIDFromName('categories'); --- 180,184 ---- $dbconn->Execute('FLUSH TABLE ' . $pntable['categories_linkage']); } ! if (pnModAvailable('hitcount') && pnModAPILoad('hitcount','admin')) { if ($reset) { $regid2 = pnModGetIDFromName('categories'); *************** *** 227,237 **** echo "Creating topic ($id) $text - $name [$image]<br>\n"; if (!empty($docounter)) { ! $counter--; ! $hits = pnModAPIFunc('hitcount','user','hit',array('modname' => 'categories', 'objectid' => $topicid[$id], 'hits' => $counter)); ! $counter++; ! if ($hits != $counter) { ! echo "Hits $hits don't match counter $counter for topic $topicid[$id] $text<br>\n"; } } --- 227,235 ---- echo "Creating topic ($id) $text - $name [$image]<br>\n"; if (!empty($docounter)) { ! $hcid = pnModAPIFunc('hitcount','admin','create',array('modname' => 'categories', 'objectid' => $topicid[$id], 'hits' => $counter)); ! if (!isset($hcid)) { ! echo "Couldn't create hit counter $counter for topic $topicid[$id] $text<br>\n"; } } *************** *** 255,265 **** echo "Creating category ($id) $title - $title<br>\n"; if (!empty($docounter)) { ! $counter--; ! $hits = pnModAPIFunc('hitcount','user','hit',array('modname' => 'categories', 'objectid' => $catid[$id], 'hits' => $counter)); ! $counter++; ! if ($hits != $counter) { ! echo "Hits $hits don't match counter $counter for category $catid[$id] $title<br>\n"; } } --- 253,261 ---- echo "Creating category ($id) $title - $title<br>\n"; if (!empty($docounter)) { ! $hcid = pnModAPIFunc('hitcount','admin','create',array('modname' => 'categories', 'objectid' => $catid[$id], 'hits' => $counter)); ! if (!isset($hcid)) { ! echo "Couldn't create hit counter $counter for category $catid[$id] $title<br>\n"; } } *************** *** 311,315 **** $dbconn->Execute('FLUSH TABLE ' . $pntable['articles']); } ! if (pnModAvailable('hitcount') && pnModAPILoad('hitcount','user')) { if ($reset && $startnum == 0) { $dbconn->Execute("DELETE FROM " . $pntable['hitcount'] . " WHERE pn_moduleid = " . $regid); --- 307,311 ---- $dbconn->Execute('FLUSH TABLE ' . $pntable['articles']); } ! if (pnModAvailable('hitcount') && pnModAPILoad('hitcount','admin')) { if ($reset && $startnum == 0) { $dbconn->Execute("DELETE FROM " . $pntable['hitcount'] . " WHERE pn_moduleid = " . $regid); *************** *** 354,364 **** $num++; if (!empty($docounter)) { ! $counter--; ! $hits = pnModAPIFunc('hitcount','user','hit',array('modname' => 'articles', 'objectid' => $aid, 'hits' => $counter)); ! $counter++; ! if ($hits != $counter) { ! echo "Hits $hits don't match counter $counter for article $aid $title<br>\n"; } } --- 350,358 ---- $num++; if (!empty($docounter)) { ! $hcid = pnModAPIFunc('hitcount','admin','create',array('modname' => 'articles', 'objectid' => $aid, 'hits' => $counter)); ! if (!isset($hcid)) { ! echo "Couldn't create hit counter $counter for article $aid $title<br>\n"; } } *************** *** 528,532 **** die("Oops, select section content failed : " . $dbconn->ErrorMsg()); } ! if (pnModAvailable('hitcount') && pnModAPILoad('hitcount','user')) { $docounter = 1; } --- 522,526 ---- die("Oops, select section content failed : " . $dbconn->ErrorMsg()); } ! if (pnModAvailable('hitcount') && pnModAPILoad('hitcount','admin')) { $docounter = 1; } *************** *** 558,568 **** $aid = $dbconn->PO_Insert_ID($pntable['articles'], 'pn_aid'); if (!empty($docounter)) { ! $counter--; ! $hits = pnModAPIFunc('hitcount','user','hit',array('modname' => 'articles', 'objectid' => $aid, 'hits' => $counter)); ! $counter++; ! if ($hits != $counter) { ! echo "Hits $hits don't match counter $counter for article $aid $title<br>\n"; } } --- 552,560 ---- $aid = $dbconn->PO_Insert_ID($pntable['articles'], 'pn_aid'); if (!empty($docounter)) { ! $hcid = pnModAPIFunc('hitcount','admin','create',array('modname' => 'articles', 'objectid' => $aid, 'hits' => $counter)); ! if (!isset($hcid)) { ! echo "Couldn't create hit counter $counter for article $aid $title<br>\n"; } } *************** *** 704,708 **** $dbconn->Execute('OPTIMIZE TABLE ' . $pntable['articles']); $dbconn->Execute('OPTIMIZE TABLE ' . $pntable['categories_linkage']); ! if (pnModAvailable('hitcount') && pnModAPILoad('hitcount','user')) { $dbconn->Execute('OPTIMIZE TABLE ' . $pntable['hitcount']); } --- 696,700 ---- $dbconn->Execute('OPTIMIZE TABLE ' . $pntable['articles']); $dbconn->Execute('OPTIMIZE TABLE ' . $pntable['categories_linkage']); ! if (pnModAvailable('hitcount') && pnModAPILoad('hitcount','admin')) { $dbconn->Execute('OPTIMIZE TABLE ' . $pntable['hitcount']); }
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 |