aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-12-10 12:30:09 +0000
committerErmal <eri@pfsense.org>2010-12-10 12:30:09 +0000
commitd78afeef3efb084afdd8d849f7b38a837b1cce30 (patch)
tree283020577ea90fbaf9cb91b530a7cd01e45e4a31
parent039d1805264ab91686416b5cb552390f3f3be819 (diff)
downloadpfsense-packages-d78afeef3efb084afdd8d849f7b38a837b1cce30.tar.gz
pfsense-packages-d78afeef3efb084afdd8d849f7b38a837b1cce30.tar.bz2
pfsense-packages-d78afeef3efb084afdd8d849f7b38a837b1cce30.zip
Prepend package name to functions and use require_once instead of require.
-rw-r--r--config/tftp/tftp.inc8
-rw-r--r--config/tftp/tftp_files.tmp6
2 files changed, 7 insertions, 7 deletions
diff --git a/config/tftp/tftp.inc b/config/tftp/tftp.inc
index 9d06573c..e19d68bb 100644
--- a/config/tftp/tftp.inc
+++ b/config/tftp/tftp.inc
@@ -32,7 +32,7 @@
*/
-function guid()
+function tftp_guid()
{
if (function_exists('com_create_guid')){
return com_create_guid();
@@ -53,7 +53,7 @@ function guid()
//echo guid();
-function pkg_is_service_running($servicename)
+function tftp_pkg_is_service_running($servicename)
{
exec("/bin/ps ax | awk '{ print $5 }'", $psout);
array_shift($psout);
@@ -68,7 +68,7 @@ function pkg_is_service_running($servicename)
}
}
-function byte_convert( $bytes ) {
+function tftp_byte_convert( $bytes ) {
if ($bytes<=0)
return '0 Byte';
@@ -293,4 +293,4 @@ function tftp_deinstall_command()
}
-?> \ No newline at end of file
+?>
diff --git a/config/tftp/tftp_files.tmp b/config/tftp/tftp_files.tmp
index 3141b8fa..a55e92c6 100644
--- a/config/tftp/tftp_files.tmp
+++ b/config/tftp/tftp_files.tmp
@@ -28,8 +28,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-require("guiconfig.inc");
-require("/usr/local/pkg/tftp.inc");
+require_once("guiconfig.inc");
+require_once("/usr/local/pkg/tftp.inc");
$filename = $_GET['filename'];
if (($_GET['a'] == "download") && $_GET['t'] == "backup") {
@@ -202,7 +202,7 @@ if ($savemsg) {
if ($file != "." && $file != "..") {
$tftp_filesize = filesize('/tftpboot/'.$file);
- $tftp_filesize = byte_convert($tftp_filesize);
+ $tftp_filesize = tftp_byte_convert($tftp_filesize);
echo "<tr>\n";
echo " <td class=\"listlr\" ondblclick=\"\">\n";