mirror of
https://github.com/openvk/openvk
synced 2024-11-15 19:49:14 +03:00
Compare commits
4 commits
3349fa8b01
...
8786bd36fb
Author | SHA1 | Date | |
---|---|---|---|
|
8786bd36fb | ||
|
3707ae0772 | ||
|
bbbc8b7700 | ||
|
4521d4a2f1 |
6 changed files with 23 additions and 7 deletions
|
@ -48,6 +48,13 @@ final class AdminPresenter extends OpenVKPresenter
|
|||
if(!OPENVK_ROOT_CONF["openvk"]["preferences"]["commerce"])
|
||||
$this->flash("warn", tr("admin_commerce_disabled"), tr("admin_commerce_disabled_desc"));
|
||||
}
|
||||
|
||||
private function warnIfLongpoolBroken(): void
|
||||
{
|
||||
bdump(is_writable(CHANDLER_ROOT . '/tmp/events.bin'));
|
||||
if(file_exists(CHANDLER_ROOT . '/tmp/events.bin') == false || is_writable(CHANDLER_ROOT . '/tmp/events.bin') == false)
|
||||
$this->flash("warn", tr("admin_longpool_broken"), tr("admin_longpool_broken_desc", CHANDLER_ROOT . '/tmp/events.bin'));
|
||||
}
|
||||
|
||||
private function searchResults(object $repo, &$count)
|
||||
{
|
||||
|
@ -76,7 +83,7 @@ final class AdminPresenter extends OpenVKPresenter
|
|||
|
||||
function renderIndex(): void
|
||||
{
|
||||
|
||||
$this->warnIfLongpoolBroken();
|
||||
}
|
||||
|
||||
function renderUsers(): void
|
||||
|
@ -681,7 +688,8 @@ final class AdminPresenter extends OpenVKPresenter
|
|||
$this->template->obj_type = $obj_type;
|
||||
}
|
||||
|
||||
$this->template->logs = (new Logs)->search($filter);
|
||||
$logs = iterator_to_array((new Logs)->search($filter));
|
||||
$this->template->logs = $logs;
|
||||
$this->template->object_types = (new Logs)->getTypes();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,8 +54,8 @@
|
|||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="120" valign="top"><span class="nobold">{_gender}: </span></td>
|
||||
<td>{$user->isFemale() ? tr("female"): tr("male")}</td>
|
||||
<td width="120" valign="top"><span class="nobold">{_pronouns}: </span></td>
|
||||
<td>{$x->isFemale() ? tr("female") : ($x->isNeutral() ? tr("neutral") : tr("male"))}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="120" valign="top"><span class="nobold">{_registration_date}: </span></td>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<form n:if="$report->getContentType() != 'group'" action="/admin/reportAction{$report->getId()}" method="post">
|
||||
<input type="hidden" name="hash" value="{$csrfToken}"/>
|
||||
<input type="submit" name="ban" value="{_ban_user_action}" class="button">
|
||||
<input n:if="$report->getContentType() !== 'user'" type="submit" name="delete" value="{_delete}" class="button">
|
||||
<input n:if="$report->getContentType() !== 'user'" type="submit" name="delete" value="{_delete_content}" class="button">
|
||||
<input type="submit" name="ignore" value="{_ignore_report}" class="button">
|
||||
</form>
|
||||
<form n:if="$report->getContentType() == 'group'" action="/admin/reportAction{$report->getId()}" method="post">
|
||||
|
|
|
@ -112,8 +112,8 @@
|
|||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="120" valign="top"><span class="nobold">{_gender}: </span></td>
|
||||
<td>{$x->isFemale() ? tr("female") : tr("male")}</td>
|
||||
<td width="120" valign="top"><span class="nobold">{_pronouns}: </span></td>
|
||||
<td>{$x->isFemale() ? tr("female") : ($x->isNeutral() ? tr("neutral") : tr("male"))}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="120" valign="top"><span class="nobold">{_relationship}:</span></td>
|
||||
|
|
|
@ -479,6 +479,7 @@
|
|||
|
||||
"upd_m" = "updated his profile picture";
|
||||
"upd_f" = "updated her profile picture";
|
||||
"upd_n" = "updated their profile picture";
|
||||
"upd_g" = "updated group's picture";
|
||||
|
||||
"add_photos" = "Add photos";
|
||||
|
@ -1197,6 +1198,7 @@
|
|||
"report_number" = "Report #";
|
||||
"list_of_reports" = "List of reports";
|
||||
"text_of_the_post" = "Text of the post";
|
||||
"delete_content" = "Delete content";
|
||||
"today" = "today";
|
||||
|
||||
"will_be_watched" = "It will be reviewed by the moderators soon";
|
||||
|
@ -1624,6 +1626,9 @@
|
|||
"admin_commerce_disabled" = "Commerce has been disabled by the system administrator";
|
||||
"admin_commerce_disabled_desc" = "The voucher and gift settings will be saved, but will have no effect.";
|
||||
|
||||
"admin_longpool_broken" = "Longpool is broken and will not work!";
|
||||
"admin_longpool_broken_desc" = "Make sure file at the path <code>$1</code> exist and have correct rights and ownership.";
|
||||
|
||||
"admin_banned_links" = "Blocked links";
|
||||
"admin_banned_link" = "Link";
|
||||
"admin_banned_domain" = "Domain";
|
||||
|
|
|
@ -1130,6 +1130,7 @@
|
|||
"report_number" = "Жалоба №";
|
||||
"list_of_reports" = "Список жалоб";
|
||||
"text_of_the_post" = "Текст записи";
|
||||
"delete_content" = "Удалить контент";
|
||||
"today" = "сегодня";
|
||||
|
||||
"will_be_watched" = "Скоро её рассмотрят модераторы";
|
||||
|
@ -1516,6 +1517,8 @@
|
|||
"admin_about_instance" = "Инстанция";
|
||||
"admin_commerce_disabled" = "Коммерция отключена системным администратором";
|
||||
"admin_commerce_disabled_desc" = "Настройки ваучеров и подарков будут сохранены, но не будут оказывать никакого влияния.";
|
||||
"admin_longpool_broken" = "Longpool сломан!";
|
||||
"admin_longpool_broken_desc" = "Проверьте, существует ли файл по пути <code>$1</code> и выданы ли у него правильные права на запись.";
|
||||
"admin_banned_links" = "Заблокированные ссылки";
|
||||
"admin_banned_link" = "Ссылка";
|
||||
"admin_banned_domain" = "Домен";
|
||||
|
|
Loading…
Reference in a new issue