From: <abe...@us...> - 2014-08-19 21:42:43
|
Revision: 6642 http://sourceforge.net/p/astlinux/code/6642 Author: abelbeck Date: 2014-08-19 21:42:36 +0000 (Tue, 19 Aug 2014) Log Message: ----------- web interface, cleanup some E_NOTICE errors Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/edit.php branches/1.0/package/webinterface/altweb/admin/network.php branches/1.0/package/webinterface/altweb/admin/phoneprov.php branches/1.0/package/webinterface/altweb/common/header.php branches/1.0/package/webinterface/altweb/common/status.inc Modified: branches/1.0/package/webinterface/altweb/admin/edit.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/edit.php 2014-08-19 21:22:23 UTC (rev 6641) +++ branches/1.0/package/webinterface/altweb/admin/edit.php 2014-08-19 21:42:36 UTC (rev 6642) @@ -56,6 +56,7 @@ 'ldap.conf' => 'LDAP Client System Defaults', 'slapd.conf' => 'LDAP Server Configuration', 'lighttpd.conf' => 'Web Server Configuration', + 'php.ini.conf' => 'PHP Runtime Configuration', 'sensors.conf' => 'Lm_sensors Hardware Monitoring', 'zaptel.conf' => 'Zaptel System Config', 'redfone.conf' => 'Redfone foneBRIDGE', Modified: branches/1.0/package/webinterface/altweb/admin/network.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/network.php 2014-08-19 21:22:23 UTC (rev 6641) +++ branches/1.0/package/webinterface/altweb/admin/network.php 2014-08-19 21:42:36 UTC (rev 6642) @@ -1783,9 +1783,9 @@ putHtml('<option value="6to4-relay"'.$sel.'>6to4-relay</option>'); putHtml('</select></td></tr>'); putHtml('<tr class="dtrow1"><td style="text-align: left;" colspan="6">'); - $value = $ipv6_tunnel[1]; + $value = isset($ipv6_tunnel[1]) ? $ipv6_tunnel[1] : ''; putHtml('Remote Server IPv4:<input type="text" size="16" maxlength="15" value="'.$value.'" name="ipv6_tunnel_server" />'); - $value = $ipv6_tunnel[2]; + $value = isset($ipv6_tunnel[2]) ? $ipv6_tunnel[2] : ''; putHtml('– Endpoint IPv6/nn:<input type="text" size="45" maxlength="43" value="'.$value.'" name="ipv6_tunnel_endpoint" />'); putHtml('</td></tr>'); Modified: branches/1.0/package/webinterface/altweb/admin/phoneprov.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2014-08-19 21:22:23 UTC (rev 6641) +++ branches/1.0/package/webinterface/altweb/admin/phoneprov.php 2014-08-19 21:42:36 UTC (rev 6642) @@ -130,7 +130,7 @@ $data[$id]['template'] = $datatokens[1]; $exttokens = explode(';', $datatokens[2]); for ($j = 0; $j < $MAXNUM; $j++) { - $ext_cid = explode('/', $exttokens[$j], 2); // Include any /'s in 'cid' + $ext_cid = explode('/', (isset($exttokens[$j]) ? $exttokens[$j] : ''), 2); // Include any /'s in 'cid' $data[$id]['ext'][$j] = (isset($ext_cid[0]) ? $ext_cid[0] : ''); $data[$id]['cid'][$j] = (isset($ext_cid[1]) ? $ext_cid[1] : ''); } Modified: branches/1.0/package/webinterface/altweb/common/header.php =================================================================== --- branches/1.0/package/webinterface/altweb/common/header.php 2014-08-19 21:22:23 UTC (rev 6641) +++ branches/1.0/package/webinterface/altweb/common/header.php 2014-08-19 21:42:36 UTC (rev 6642) @@ -30,7 +30,7 @@ } } } - return($list); + return(isset($list) ? $list : NULL); } // Function: getTITLEname Modified: branches/1.0/package/webinterface/altweb/common/status.inc =================================================================== --- branches/1.0/package/webinterface/altweb/common/status.inc 2014-08-19 21:22:23 UTC (rev 6641) +++ branches/1.0/package/webinterface/altweb/common/status.inc 2014-08-19 21:42:36 UTC (rev 6642) @@ -142,7 +142,7 @@ } fclose($ph); } - return($status); + return(isset($status) ? $status : NULL); } // Function: parseIPSECstates @@ -179,7 +179,7 @@ } fclose($ph); } - return($status); + return(isset($status) ? $status : NULL); } // Function: parseFIREWALLstates @@ -358,7 +358,7 @@ } array_multisort($p_port, SORT_ASC, SORT_STRING, $status['clients']); } - return($status); + return(isset($status) ? $status : NULL); } // Function: parseDNSMASQleases @@ -388,7 +388,7 @@ } array_multisort($ip, SORT_ASC, SORT_STRING, $status['clients']); } - return($status); + return(isset($status) ? $status : NULL); } // Function: parseOpenVPNClog @@ -420,7 +420,7 @@ $status['remote'] = $remote; } } - return($status); + return(isset($status) ? $status : NULL); } // Function: parseOpenVPNlog @@ -459,7 +459,7 @@ } fclose($ph); } - return($status); + return(isset($status) ? $status : NULL); } if ($_SERVER['REQUEST_METHOD'] === 'POST') { @@ -797,7 +797,7 @@ if (is_file('/var/run/openvpn.pid') && !is_null($openvpn = parseOpenVPNlog($OVPNLOGFILE))) { putHtml("<h2>OpenVPN Server Status:</h2>"); - if (($n = count($openvpn['clients'])) > 0) { + if (isset($openvpn['clients']) && ($n = count($openvpn['clients'])) > 0) { putHtml('<pre><table class="statusdatatable">'); putHtml("<tr>"); echo "<td>", $openvpn['header']['CommonName'], "</td>"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |