From: <abe...@us...> - 2012-01-19 18:15:30
|
Revision: 5396 http://astlinux.svn.sourceforge.net/astlinux/?rev=5396&view=rev Author: abelbeck Date: 2012-01-19 18:15:24 +0000 (Thu, 19 Jan 2012) Log Message: ----------- webinterface, Status tab, DAHDI Status can display Sangoma status commands 'wanrouter status' or 'wanrouter summary' if defined in Prefs tab -> DAHDI Status Command Modified Paths: -------------- branches/1.0/package/webinterface/altweb/common/status.inc Modified: branches/1.0/package/webinterface/altweb/common/status.inc =================================================================== --- branches/1.0/package/webinterface/altweb/common/status.inc 2012-01-18 23:47:06 UTC (rev 5395) +++ branches/1.0/package/webinterface/altweb/common/status.inc 2012-01-19 18:15:24 UTC (rev 5396) @@ -877,7 +877,11 @@ putHtml("<h2>DAHDI Status:</h2>"); putHtml("<pre>"); $tmpfile = tempnam("/tmp", "PHP_"); - asteriskCMD($cmd, $tmpfile); + if ($cmd === 'wanrouter status' || $cmd === 'wanrouter summary') { + shell('/usr/sbin/'.$cmd.' >'.$tmpfile, $ret_status); + } else { + asteriskCMD($cmd, $tmpfile); + } $ph = @fopen($tmpfile, "r"); while (! feof($ph)) { if ($line = trim(fgets($ph, 1024))) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |