function dba_replace($key, $string, $handle) { return dbmreplace($handle, $key, $string); }
function IncreaseHitCount($dbi, $pagename) { if (dbmexists($dbi['hitcount'], $pagename)) { // increase the hit count // echo "$pagename there, incrementing...<br>\n"; $count = dbmfetch($dbi['hitcount'], $pagename); $count++; dbmreplace($dbi['hitcount'], $pagename, $count); } else { // add it, set the hit count to one $count = 1; dbminsert($dbi['hitcount'], $pagename, $count); } }
function IncreaseHitCount($dbi, $pagename) { return; return; // kluge: we ignore the $dbi for hit counting global $WikiDB; $hcdb = OpenDataBase($WikiDB['hitcount']); if (dbmexists($hcdb['active'], $pagename)) { // increase the hit count $count = dbmfetch($hcdb['active'], $pagename); $count++; dbmreplace($hcdb['active'], $pagename, $count); } else { // add it, set the hit count to one $count = 1; dbminsert($hcdb['active'], $pagename, $count); } CloseDataBase($hcdb); }