2022-09-17 00:19:46 +03:00
|
|
|
<?php
|
2025-01-31 18:20:13 +03:00
|
|
|
|
2022-09-17 00:19:46 +03:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace openvk\Web\Presenters;
|
|
|
|
|
|
|
|
final class MaintenancePresenter extends OpenVKPresenter
|
|
|
|
{
|
|
|
|
protected $presenterName = "maintenance";
|
|
|
|
|
2025-01-31 18:20:13 +03:00
|
|
|
public function renderSection(string $name): void
|
2022-09-17 00:19:46 +03:00
|
|
|
{
|
2025-01-31 18:20:13 +03:00
|
|
|
if (!OPENVK_ROOT_CONF["openvk"]["preferences"]["maintenanceMode"][$name]) {
|
2022-09-17 00:19:46 +03:00
|
|
|
$this->flashFail("err", tr("error"), tr("forbidden"));
|
2025-01-31 18:20:13 +03:00
|
|
|
}
|
2022-09-17 00:19:46 +03:00
|
|
|
|
|
|
|
$this->template->name = [
|
|
|
|
"photos" => tr("my_photos"),
|
|
|
|
"videos" => tr("my_videos"),
|
|
|
|
"messenger" => tr("my_messages"),
|
|
|
|
"user" => tr("users"),
|
|
|
|
"group" => tr("my_groups"),
|
|
|
|
"comment" => tr("comments"),
|
|
|
|
"gifts" => tr("gifts"),
|
|
|
|
"apps" => tr("apps"),
|
|
|
|
"notes" => tr("my_notes"),
|
|
|
|
"notification" => tr("my_feedback"),
|
|
|
|
"support" => tr("menu_support"),
|
2025-01-31 18:20:13 +03:00
|
|
|
"topics" => tr("topics"),
|
2022-09-17 00:19:46 +03:00
|
|
|
][$name] ?? $name;
|
|
|
|
}
|
|
|
|
|
2025-01-31 18:20:13 +03:00
|
|
|
public function renderAll(): void {}
|
2022-09-17 00:19:46 +03:00
|
|
|
}
|