mirror of
https://github.com/openvk/openvk
synced 2024-12-23 17:12:01 +03:00
d2e7602eb5
So, it's no longer looks like shit. The commiter can just add their language to list.yml and make a strings file, and he is done: His name will be automatically added to About page and the language itself will appear in the list
73 lines
1.7 KiB
PHP
73 lines
1.7 KiB
PHP
<?php declare(strict_types=1);
|
|
namespace openvk\Web\Presenters;
|
|
use openvk\Web\Themes\Themepacks;
|
|
use openvk\Web\Models\Repositories\{Users, Managers};
|
|
use Chandler\Session\Session;
|
|
|
|
final class AboutPresenter extends OpenVKPresenter
|
|
{
|
|
protected $banTolerant = true;
|
|
|
|
function renderIndex(): void
|
|
{
|
|
if(!is_null($this->user)) {
|
|
header("HTTP/1.1 302 Found");
|
|
header("Location: /id" . $this->user->id);
|
|
exit;
|
|
}
|
|
|
|
if($_SERVER['REQUEST_URI'] == "/id0") {
|
|
header("HTTP/1.1 302 Found");
|
|
header("Location: /");
|
|
exit;
|
|
}
|
|
|
|
$this->template->stats = (new Users)->getStatistics();
|
|
}
|
|
|
|
function renderRules(): void
|
|
{
|
|
$this->pass("openvk!Support->knowledgeBaseArticle", "rules");
|
|
}
|
|
|
|
function renderHelp(): void
|
|
{}
|
|
|
|
function renderBB(): void
|
|
{}
|
|
|
|
function renderInvite(): void
|
|
{
|
|
$this->assertUserLoggedIn();
|
|
}
|
|
|
|
function renderDonate(): void
|
|
{
|
|
$this->pass("openvk!Support->knowledgeBaseArticle", "donate");
|
|
}
|
|
|
|
function renderPrivacy(): void
|
|
{
|
|
$this->pass("openvk!Support->knowledgeBaseArticle", "privacy");
|
|
}
|
|
|
|
function renderVersion(): void
|
|
{
|
|
$this->template->themes = Themepacks::i()->getAllThemes();
|
|
$this->template->languages = getLanguages();
|
|
}
|
|
|
|
function renderLanguage(): void
|
|
{
|
|
$this->template->languages = getLanguages();
|
|
|
|
if(!is_null($_GET['lg'])){
|
|
setLanguage($_GET['lg']);
|
|
}
|
|
}
|
|
|
|
function renderSandbox(): void
|
|
{
|
|
$this->template->languages = getLanguages();
|
|
}
|
|
}
|