From 319b6c7854114c21af14a19d718f8c96ebb8b4ec Mon Sep 17 00:00:00 2001 From: Daniel Stefan Haischt Date: Fri, 5 Jan 2007 09:08:28 +0000 Subject: * fix: use strpos instead of strcmp in disks_check_mount_fullname() * fix: format function on disks_manage_init.php --- packages/freenas/pkg/freenas_disks.inc | 3 ++- packages/freenas/pkg/freenas_guiconfig.inc | 18 ++++++++++++++++++ packages/freenas/www/disks_manage_init.php | 23 ++++++++++++----------- 3 files changed, 32 insertions(+), 12 deletions(-) (limited to 'packages') diff --git a/packages/freenas/pkg/freenas_disks.inc b/packages/freenas/pkg/freenas_disks.inc index 8ac8eb72..3ccc4f24 100644 --- a/packages/freenas/pkg/freenas_disks.inc +++ b/packages/freenas/pkg/freenas_disks.inc @@ -42,6 +42,7 @@ /* include all configuration functions */ require_once("functions.inc"); +require_once("freenas_functions.inc"); $freenas_config =& $config['installedpackages']['freenas']['config'][0]; @@ -295,7 +296,7 @@ function disks_check_mount_fullname($fullname) { //print_r($detmount); foreach ($detmount as $detmountk => $detmountv) { - if (strcmp($detmountv['fullname'],$fullname) == 0) { + if (strpos($detmountv['fullname'],$fullname) !== false) { $status=1; break; } diff --git a/packages/freenas/pkg/freenas_guiconfig.inc b/packages/freenas/pkg/freenas_guiconfig.inc index 18f936a4..c049659a 100644 --- a/packages/freenas/pkg/freenas_guiconfig.inc +++ b/packages/freenas/pkg/freenas_guiconfig.inc @@ -40,6 +40,24 @@ $d_upnpconfdirty_path = $g['varrun_path'] . "/upnp.conf.dirty"; $freenas_config =& $config['installedpackages']['freenas']['config'][0]; +function print_error_box_np($msg) { + global $g; + + echo "\n"; + echo "\n"; + echo "
"; + echo ""; + echo $msg; + echo ""; + echo "
"; +} + +function print_error_box($msg) { + echo "

"; + print_error_box_np($msg); + echo "

"; +} + function mount_sort() { global $g, $freenas_config; diff --git a/packages/freenas/www/disks_manage_init.php b/packages/freenas/www/disks_manage_init.php index 7267cec3..278efdd5 100644 --- a/packages/freenas/www/disks_manage_init.php +++ b/packages/freenas/www/disks_manage_init.php @@ -226,6 +226,7 @@ function disk_change() { +
@@ -250,7 +251,7 @@ function disk_change() {