show errors when search failed;

This commit is contained in:
huangjx
2022-02-27 14:28:56 +08:00
parent f9169240de
commit 3ff0f786f3
6 changed files with 55 additions and 11 deletions

View File

@@ -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);
}
}