From 6d0419bc39cf9494662b84facbfc311d29c0d846 Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 10 Apr 2015 08:04:45 +1000 Subject: [PATCH] php - remove some uncommon missing variable warnings --- pool/page.php | 18 ++++++++++++++++-- pool/page_pplns2.php | 7 ------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/pool/page.php b/pool/page.php index 86a241c0..7bb2607c 100644 --- a/pool/page.php +++ b/pool/page.php @@ -177,11 +177,19 @@ function trm_force($html) return dotrm($html, false); } # +function isCrap() +{ + if (isset($_SERVER['HTTP_USER_AGENT'])) + return strpos($_SERVER['HTTP_USER_AGENT'],'iP'); + else + return false; +} +# function pghead($css_marker, $script_marker, $name) { global $page_title; - $iCrap = strpos($_SERVER['HTTP_USER_AGENT'],'iP'); + $iCrap = isCrap(); $head = "\n"; @@ -444,6 +452,12 @@ function pgtop($info, $dotop, $user, $douser) $lh = $img1.$lhc.$img2; $lw = $img1.$lwc.$img2; } + + if (!isset($info['users'])) + $info['users'] = '?'; + if (!isset($info['workers'])) + $info['workers'] = '?'; + $top .= '
'; $top .= ''; $top .= ""; @@ -522,7 +536,7 @@ function pgtop($info, $dotop, $user, $douser) # function pgmenu($menus) { - $iCrap = strpos($_SERVER['HTTP_USER_AGENT'],'iP'); + $iCrap = isCrap(); $ret = "\n
$lh
"; $ret .= '
'; diff --git a/pool/page_pplns2.php b/pool/page_pplns2.php index 781fab51..1d87007f 100644 --- a/pool/page_pplns2.php +++ b/pool/page_pplns2.php @@ -222,13 +222,6 @@ Block: $pg .= str_replace(' ', ' ', $msg)."
\n"; } - if (strlen($ans['share_status']) > 0) - { - $pg .= '
'; - $msg = $ans['share_status']." - Can't be paid out yet"; - $pg .= str_replace(' ', ' ', $msg)."
\n"; - } - $pg .= "
\n"; $pg .= ''; $pg .= '';
Name