mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
improve approval notify + add approval_status filter
This commit is contained in:
@@ -221,6 +221,21 @@ class Torrent extends NexusModel
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public static function listApprovalStatus($onlyKeyValue = false): array
|
||||
{
|
||||
$result = self::$approvalStatus;
|
||||
$keyValue = [];
|
||||
foreach ($result as $status => &$info) {
|
||||
$text = nexus_trans("torrent.approval.status_text.$status");
|
||||
$info['text'] = $text;
|
||||
$keyValue[$status] = $text;
|
||||
}
|
||||
if ($onlyKeyValue) {
|
||||
return $keyValue;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getHrAttribute(): string
|
||||
{
|
||||
$hrMode = Setting::get('hr.mode');
|
||||
|
||||
Reference in New Issue
Block a user