Fix filefix FILELIST command when area not provided
This commit is contained in:
parent
2c1ab88bbd
commit
aeea49abe7
@ -41,26 +41,29 @@ class Filelist extends Base
|
||||
if ($days > 365)
|
||||
$days = 365;
|
||||
|
||||
if (! ($area=Arr::get($this->arguments,0)))
|
||||
return sprintf('%-25s <-- INVALID, AN AREA IS REQUIRED',$command);
|
||||
|
||||
// Area exists
|
||||
if ($fa=$this->mo->fftn->domain->fileareas->where('name',$this->arguments[0])->pop()) {
|
||||
if ($fa=$this->mo->fftn->domain->fileareas->where('name',$area)->pop()) {
|
||||
// If already subscribed
|
||||
if ($this->mo->fftn->fileareas->pluck('name')->contains($this->arguments[0])) {
|
||||
if ($this->mo->fftn->fileareas->pluck('name')->contains($area)) {
|
||||
Notification::route('netmail',$this->mo->fftn)
|
||||
->notify(new FileListNotification($this->mo,$fa,$days));
|
||||
|
||||
Log::debug(sprintf('%s:- FTN [%s] FILELIST [%s] DAYS [%d]',self::LOGKEY,$this->mo->fftn->ftn,$this->arguments[0],$days));
|
||||
Log::debug(sprintf('%s:- FTN [%s] FILELIST [%s] DAYS [%d]',self::LOGKEY,$this->mo->fftn->ftn,$area,$days));
|
||||
|
||||
return sprintf('%-25s <-- FILELIST [%d] DAYS',$command,$days);
|
||||
|
||||
// If not subscribed
|
||||
} else {
|
||||
Log::debug(sprintf('%s:- FTN [%s] is NOT subscribed to [%s], NO ACTION taken',self::LOGKEY,$this->mo->fftn->ftn,$this->arguments[0]));
|
||||
Log::debug(sprintf('%s:- FTN [%s] is NOT subscribed to [%s], NO ACTION taken',self::LOGKEY,$this->mo->fftn->ftn,$area));
|
||||
|
||||
return sprintf('%-25s <-- NOT subscribed, NO ACTION taken',$command);
|
||||
}
|
||||
|
||||
} else {
|
||||
Log::debug(sprintf('%s:- FILE [%s] area UNKNOWN [%s], NO ACTION taken',self::LOGKEY,$this->mo->fftn->ftn,$this->arguments[0]));
|
||||
Log::debug(sprintf('%s:- FILE [%s] area UNKNOWN [%s], NO ACTION taken',self::LOGKEY,$this->mo->fftn->ftn,$area));
|
||||
|
||||
return sprintf('%-25s <-- AREA UNKNOWN, NO ACTION TAKEN',$command);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class Resend extends Base
|
||||
if (count($this->arguments) < 2)
|
||||
return sprintf('%-25s <-- INVALID, NOT ENOUGH ARGUMENTS',$command);
|
||||
elseif (count($this->arguments) > 2)
|
||||
return sprintf('%-25s <-- INVALID, TOO MANU ARGUMENTS',$command);
|
||||
return sprintf('%-25s <-- INVALID, TOO MANY ARGUMENTS',$command);
|
||||
|
||||
Log::debug(sprintf('%s:- Resending [%s] from [%s] to [%s]',self::LOGKEY,$this->arguments[1],$this->arguments[0],$this->mo->fftn->ftn));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user