From f43ee5d652892f554058979f1b690f5c3188efcd Mon Sep 17 00:00:00 2001 From: Kano Date: Wed, 27 Jun 2012 15:26:27 +1000 Subject: [PATCH] miner.php - fix/enable autorefresh for custom pages --- miner.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/miner.php b/miner.php index 637c1f85..1c64e5a8 100644 --- a/miner.php +++ b/miner.php @@ -117,21 +117,24 @@ $showndate = false; global $rigerror; $rigerror = array(); # -function htmlhead($checkapi, $rig) +function htmlhead($checkapi, $rig, $pg = null) { global $miner_font_family, $miner_font_size; global $error, $readonly, $here; global $ignorerefresh, $autorefresh; - $paramrig = ''; + $extraparams = ''; if ($rig != null && $rig != '') - $paramrig = "&rig=$rig"; + $extraparams = "&rig=$rig"; + else + if ($pg != null && $pg != '') + $extraparams = "&pg=$pg"; if ($ignorerefresh == true || $autorefresh == 0) $refreshmeta = ''; else { - $url = "$here?ref=$autorefresh$paramrig"; + $url = "$here?ref=$autorefresh$extraparams"; $refreshmeta = "\n"; } @@ -162,7 +165,7 @@ td.lst { color:blue; $miner_font background:#ffffdd } function pr(a,m){if(m!=null){if(!confirm(m+'?'))return}window.location='$here?ref=$autorefresh'+a}\n"; if ($ignorerefresh == false) - echo "function prr(a){if(a){v=document.getElementById('refval').value}else{v=0}window.location='$here?ref='+v+'$paramrig'}\n"; + echo "function prr(a){if(a){v=document.getElementById('refval').value}else{v=0}window.location='$here?ref='+v+'$extraparams'}\n"; if ($readonly === false && $checkapi === true) { @@ -1206,7 +1209,7 @@ function showcustompage($pagename) { global $customsummarypages; - htmlhead(false, null); + htmlhead(false, null, $pagename); pagetop(null, $pagename);