diff --git a/admin_traffic.php b/admin_traffic.php index 2060fe18..352bdc74 100644 --- a/admin_traffic.php +++ b/admin_traffic.php @@ -37,6 +37,9 @@ if ($page == 'overview' || $page == 'customers') { try { $context = Traffic::getCustomerStats($userinfo, $range); } catch (Exception $e) { + if ($e->getCode() === 405) { + Response::dynamicError(lng('traffic.nocustomers')); + } Response::dynamicError($e->getMessage()); } diff --git a/lib/Froxlor/Api/ApiCommand.php b/lib/Froxlor/Api/ApiCommand.php index ca530273..35130a4d 100644 --- a/lib/Froxlor/Api/ApiCommand.php +++ b/lib/Froxlor/Api/ApiCommand.php @@ -470,7 +470,7 @@ abstract class ApiCommand extends ApiParameter * * @param string $customer_hide_option * optional, when called as customer, some options might be hidden due to the - * panel.customer_hide_options ettings + * panel.customer_hide_options settings * * @return array * @throws Exception diff --git a/lng/de.lng.php b/lng/de.lng.php index 272f4a54..ac447272 100644 --- a/lng/de.lng.php +++ b/lng/de.lng.php @@ -2117,6 +2117,7 @@ Vielen Dank, Ihr Administrator', 'http' => 'HTTP', 'ftp' => 'FTP', 'mail' => 'Mail', + 'nocustomers' => 'Es wird mindestens ein Kunde benötigt um die Traffic Statistiken anzuzeigen.', ], 'translator' => '', 'update' => [ diff --git a/lng/en.lng.php b/lng/en.lng.php index 7d440122..18436845 100644 --- a/lng/en.lng.php +++ b/lng/en.lng.php @@ -2243,6 +2243,7 @@ Yours sincerely, your administrator', 'http' => 'HTTP', 'ftp' => 'FTP', 'mail' => 'Mail', + 'nocustomers' => 'You need at least one customer to view the traffic reports.', ], 'translator' => '', 'update' => [