Commit 58c3af32 authored by Clément OUDOT's avatar Clément OUDOT

Apply patch from Jessy Campos to fix CLI bugs (#688)

parent aa31950b
......@@ -8,7 +8,7 @@ use POSIX qw(strftime);
# Constants
our $VERSION = "1.3.2";
our $VERSION = "1.3.3";
my $ERRORS = {
TOO_FEW_ARGUMENTS => "Too few arguments",
......@@ -426,15 +426,14 @@ sub appsSetName {
$found = 1;
$self->{confModified} = 1;
}
if ( $found == 0 ) {
$self->setError( "$id: "
. $ERRORS->{CONFIG_WRITE_ERROR}
. ": Application $id not found" );
return 0;
}
}
}
if ( $found == 0 ) {
$self->setError( "$id: "
. $ERRORS->{CONFIG_WRITE_ERROR}
. ": Application $id not found" );
return 0;
}
}
## @method void appsSetDesc ( string id, string desc )
......@@ -458,15 +457,14 @@ sub appsSetDesc {
$found = 1;
$self->{confModified} = 1;
}
if ( $found == 0 ) {
$self->setError( "$id: "
. $ERRORS->{CONFIG_WRITE_ERROR}
. ": Application $id not found" );
return 0;
}
}
}
if ( $found == 0 ) {
$self->setError( "$id: "
. $ERRORS->{CONFIG_WRITE_ERROR}
. ": Application $id not found" );
return 0;
}
}
## @method void appsSetLogo ( string id, string logo )
......@@ -490,15 +488,14 @@ sub appsSetLogo {
$found = 1;
$self->{confModified} = 1;
}
if ( $found == 0 ) {
$self->setError( "$id: "
. $ERRORS->{CONFIG_WRITE_ERROR}
. ": Application $id not found" );
return 0;
}
}
}
if ( $found == 0 ) {
$self->setError( "$id: "
. $ERRORS->{CONFIG_WRITE_ERROR}
. ": Application $id not found" );
return 0;
}
}
## @method void appsSetDisplay ( string id, string display )
......@@ -522,15 +519,16 @@ sub appsSetDisplay {
$found = 1;
$self->{confModified} = 1;
}
if ( $found == 0 ) {
$self->setError( "$id: "
. $ERRORS->{CONFIG_WRITE_ERROR}
. ": Application $id not found" );
return 0;
}
}
}
if ( $found == 0 ) {
$self->setError( "$id: "
. $ERRORS->{CONFIG_WRITE_ERROR}
. ": Application $id not found" );
return 0;
}
}
## @method void appsGet ( string id )
......@@ -868,8 +866,8 @@ sub vhostDel {
$error .= ". ignoring...";
$self->setError(
"$vhost: " . $ERRORS->{CONFIG_WRITE_ERROR} . ": $error" );
$self->{confModified} = 1;
}
$self->{confModified} = 1;
}
## @method void vhostSetPort ( string vhost, int port )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment