show errors when search failed;
This commit is contained in:
@@ -7,6 +7,7 @@ abstract class searchBase
|
||||
protected $query = null;
|
||||
protected $tableTitles = [];
|
||||
protected $rows = [];
|
||||
protected $errors = [];
|
||||
protected $actionLinks = [["name" => 'download', 'path' => '/index.php/apps/ncdownloader/new'], ['name' => 'clipboard']];
|
||||
|
||||
public function getTableTitles(): array
|
||||
@@ -38,4 +39,14 @@ abstract class searchBase
|
||||
return $this->rows;
|
||||
}
|
||||
|
||||
public function hasErrors(): bool
|
||||
{
|
||||
return (bool) (count($this->errors) > 0);
|
||||
}
|
||||
|
||||
public function getErrors(): string
|
||||
{
|
||||
return implode(",", $this->errors);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user