[vhffs-dev] [911] Fixed refused message, consider empty refuse message as null |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 911
Author: gradator
Date: 2007-09-11 06:23:39 +0000 (Tue, 11 Sep 2007)
Log Message:
-----------
Fixed refused message, consider empty refuse message as null
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Object.pm
Modified: trunk/vhffs-api/src/Vhffs/Object.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Object.pm 2007-09-11 06:05:13 UTC (rev 910)
+++ trunk/vhffs-api/src/Vhffs/Object.pm 2007-09-11 06:23:39 UTC (rev 911)
@@ -428,6 +428,7 @@
my $self = shift;
my $reason = shift;
+ undef $reason if( defined $reason && length $reason <= 0 );
my $vhffs = $self->{main};
my $user = Vhffs::User::get_by_uid( $vhffs , $self->get_owner_uid );
@@ -439,7 +440,7 @@
Vhffs::Functions::type_string_from_type_id( $self->get_type ),
$self->get_label,
$vhffs->get_config->get_host_name,
- $reason or gettext('no reason given'),
+ $reason || gettext('no reason given'),
$vhffs->get_config->get_host_name,
$vhffs->get_config->get_panel->{url}
);