postviews plugin no longer fiddling with (supposedly) private fields of FPDB_Query

This commit is contained in:
real_nowhereman 2010-04-23 18:36:47 +00:00
parent d7ed051fab
commit d6261d4763
2 changed files with 4 additions and 4 deletions

View File

@ -872,7 +872,7 @@
$smarty->assign('entry_commslock', @in_array('commslock',$entry['categories']));
do_action('entry_block');
do_action('entry_block', $id);
}

View File

@ -13,6 +13,7 @@ add_action('entry_block', 'plugin_postviews_do');
function plugin_postviews_calc($id, $calc) {
$dir = entry_dir($id);
if (!$dir) return;
$f = $dir . '/view_counter' .EXT;
@ -36,13 +37,12 @@ function plugin_postviews_calc($id, $calc) {
return $v;
}
function plugin_postviews_do() {
function plugin_postviews_do($id) {
global $fpdb, $smarty;
$q = $fpdb->getQuery();
$calc = $q->single;
$id = $q->currentid;
$v = plugin_postviews_calc($id, $calc);