mirror of
https://github.com/openvk/openvk
synced 2024-11-13 10:39:24 +03:00
Removed unnecessary extensions from the routes
... almost. restore.pl was left temporarily (namely for two days) so that users could safely restore their passwords if they needed to.
This commit is contained in:
parent
c2588d18dc
commit
8863ededf1
22 changed files with 41 additions and 37 deletions
|
@ -94,7 +94,7 @@
|
|||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<a href="http://{$_SERVER['HTTP_HOST']}/restore.pl?act=finish&key={rawurlencode($key)}" align="center" class="float-center">Сбросить пароль!</a>
|
||||
<a href="http://{$_SERVER['HTTP_HOST']}/restore?act=finish&key={rawurlencode($key)}" align="center" class="float-center">Сбросить пароль!</a>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -118,8 +118,8 @@
|
|||
<table class="callout">
|
||||
<tr>
|
||||
<th class="callout-inner primary">
|
||||
<a href="http://{$_SERVER['HTTP_HOST']}/restore.pl?act=finish&key={$key}" style="color: #000; text-decoration: none;">
|
||||
http://{$_SERVER['HTTP_HOST']}/restore.pl?act=finish&key={$key}
|
||||
<a href="http://{$_SERVER['HTTP_HOST']}/restore?act=finish&key={$key}" style="color: #000; text-decoration: none;">
|
||||
http://{$_SERVER['HTTP_HOST']}/restore?act=finish&key={$key}
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
|
|
|
@ -122,7 +122,7 @@ final class CommentPresenter extends OpenVKPresenter
|
|||
$this->flashFail(
|
||||
"succ",
|
||||
"Успешно",
|
||||
"Этот комментарий больше не будет показыватся.<br/><a href='/al_comments.pl/spam?$id'>Отметить как спам</a>?"
|
||||
"Этот комментарий больше не будет показыватся.<br/><a href='/al_comments/spam?$id'>Отметить как спам</a>?"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@
|
|||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||||
<input type="submit" value="{_'log_in'}" class="button" style="display: inline-block;" />
|
||||
<a n:if="OPENVK_ROOT_CONF['openvk']['preferences']['registration']['enable']" href="/reg" class="button" style="display: inline-block;" >{_registration}</a><br><br>
|
||||
<a href="/restore.pl">{_"forgot_password"}</a>
|
||||
<a href="/restore">{_"forgot_password"}</a>
|
||||
</form>
|
||||
{/ifset}
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
{block content}
|
||||
<div class="container_gray">
|
||||
<form method="POST" enctype="multipart/form-data" action="/club{$club->getId()}/setAdmin.jsp">
|
||||
<form method="POST" enctype="multipart/form-data" action="/club{$club->getId()}/setAdmin">
|
||||
<table cellspacing="7" cellpadding="0" width="40%" border="0" align="center">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
{var user = $x instanceof $Manager ? $x->getUser() : $x}
|
||||
{var manager = $x instanceof $Manager ? $x : $club->getManager($user, !$club->canBeModifiedBy($thisUser))}
|
||||
{if $club->canBeModifiedBy($thisUser ?? NULL)}
|
||||
<a class="profile_link" href="/club{$club->getId()}/setAdmin.jsp?user={$user->getId()}&hash={rawurlencode($csrfToken)}" n:if="$club->getOwner()->getId() !== $user->getId()">
|
||||
<a class="profile_link" href="/club{$club->getId()}/setAdmin?user={$user->getId()}&hash={rawurlencode($csrfToken)}" n:if="$club->getOwner()->getId() !== $user->getId()">
|
||||
{if $manager}
|
||||
{_devote}
|
||||
{else}
|
||||
|
@ -130,12 +130,12 @@
|
|||
{_set_comment}
|
||||
</a>
|
||||
{if $manager}
|
||||
<a class="profile_link" href="/club{$club->getId()}/setAdmin.jsp?user={$user->getId()}&hidden={(int) !$manager->isHidden()}&hash={rawurlencode($csrfToken)}">
|
||||
<a class="profile_link" href="/club{$club->getId()}/setAdmin?user={$user->getId()}&hidden={(int) !$manager->isHidden()}&hash={rawurlencode($csrfToken)}">
|
||||
{if $manager->isHidden()}{_hidden_yes}{else}{_hidden_no}{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{if $club->getOwner()->getId() == $user->getId()}
|
||||
<a class="profile_link" href="/club{$club->getId()}/setAdmin.jsp?user={$user->getId()}&hidden={(int) !$club->isOwnerHidden()}&hash={rawurlencode($csrfToken)}">
|
||||
<a class="profile_link" href="/club{$club->getId()}/setAdmin?user={$user->getId()}&hidden={(int) !$club->isOwnerHidden()}&hash={rawurlencode($csrfToken)}">
|
||||
{if $club->isOwnerHidden()}{_hidden_yes}{else}{_hidden_no}{/if}
|
||||
</a>
|
||||
{/if}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<div class="album-photo">
|
||||
<a
|
||||
n:if="!is_null($thisUser) && $album->canBeModifiedBy($thisUser)"
|
||||
href="/album{$album->getPrettyId()}/remove_photo.pl/{$photo->getId()}" class="album-photo--delete">
|
||||
href="/album{$album->getPrettyId()}/remove_photo/{$photo->getId()}" class="album-photo--delete">
|
||||
×
|
||||
</a>
|
||||
|
||||
|
|
|
@ -39,6 +39,6 @@
|
|||
</form>
|
||||
<hr/>
|
||||
<center>
|
||||
{_"you_can_also"} <a href="/album{$album->getOwner()->getId()}_{$album->getId()}/delete.pl?hash={rawurlencode($csrfToken)}">{_"delete_album"}</a>.
|
||||
{_"you_can_also"} <a href="/album{$album->getOwner()->getId()}_{$album->getId()}/delete?hash={rawurlencode($csrfToken)}">{_"delete_album"}</a>.
|
||||
</center>
|
||||
{/block}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<a href="/support/delete/{$id}?hash={$csrfToken}">{_delete}</a>
|
||||
</div><br/>
|
||||
<div>
|
||||
<form action="/al_comments.pl/create/support/reply/{$id}" method="post" style="margin:0;">
|
||||
<form action="/al_comments/create/support/reply/{$id}" method="post" style="margin:0;">
|
||||
<textarea name="text" id="answer_text" style="width: 100%;resize: vertical;"></textarea>
|
||||
<div>
|
||||
<!-- padding to fix <br/> bug -->
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
{if $ticket->getType() !== 2}
|
||||
<br>
|
||||
<div>
|
||||
<form action="/al_comments.pl/create/support/{$id}" method="post" style="margin:0;">
|
||||
<form action="/al_comments/create/support/{$id}" method="post" style="margin:0;">
|
||||
<textarea name="text" style="width: 100%;resize: vertical;"></textarea>
|
||||
<div>
|
||||
<!-- padding to fix <br/> bug -->
|
||||
|
|
|
@ -288,7 +288,7 @@
|
|||
{elseif $isAvatar}
|
||||
|
||||
<h4>{_"profile_picture"}</h4>
|
||||
<form action="/al_avatars.pl" method="POST" enctype="multipart/form-data">
|
||||
<form action="/al_avatars" method="POST" enctype="multipart/form-data">
|
||||
<table cellspacing="7" cellpadding="0" width="60%" border="0" align="center">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
|
@ -507,7 +507,7 @@
|
|||
(function() {
|
||||
res = document.querySelector("#uBanMsgInput").value;
|
||||
xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "/admin/ban.pl/" + {$user->getId()} + "?reason=" + res + "&hash=" + {rawurlencode($csrfToken)}, true);
|
||||
xhr.open("GET", "/admin/ban/" + {$user->getId()} + "?reason=" + res + "&hash=" + {rawurlencode($csrfToken)}, true);
|
||||
xhr.onload = (function() {
|
||||
if(xhr.responseText.indexOf("reason") === -1)
|
||||
MessageBox("Ошибка", "Не удалось забанить пользователя...", ["OK"], [Function.noop]);
|
||||
|
@ -529,7 +529,7 @@
|
|||
(function() {
|
||||
res = document.querySelector("#uWarnMsgInput").value;
|
||||
xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", "/admin/warn.pl/" + {$user->getId()} + "?message=" + res + "&hash=" + {rawurlencode($csrfToken)}, true);
|
||||
xhr.open("GET", "/admin/warn/" + {$user->getId()} + "?message=" + res + "&hash=" + {rawurlencode($csrfToken)}, true);
|
||||
xhr.onload = (function() {
|
||||
if(xhr.responseText.indexOf("message") === -1)
|
||||
MessageBox("Ошибка", "Не удалось отправить предупреждение...", ["OK"], [Function.noop]);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<h4 n:if="$showTitle ?? true">{_"comments"} ({$count})</h4>
|
||||
|
||||
<div n:ifset="$thisUser">
|
||||
{var commentsURL = "/al_comments.pl/create/$model/" . $parent->getId()}
|
||||
{var commentsURL = "/al_comments/create/$model/" . $parent->getId()}
|
||||
{var club = $parent instanceof \openvk\Web\Models\Entities\Post && $parent->getTargetWall() < 0 ? (new openvk\Web\Models\Repositories\Clubs)->get(abs($parent->getTargetWall())) : $club}
|
||||
{if !$readOnly}
|
||||
{include "textArea.xml", route => $commentsURL, postOpts => false, graffiti => (bool) ovkGetQuirk("comments.allow-graffiti"), club => $club}
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
{include "../comment.xml", comment => $comment, $compact => true}
|
||||
{/foreach}
|
||||
<div n:ifset="$thisUser" id="commentTextArea{$commentTextAreaId}" n:attr="style => ($commentsCount == 0 ? 'display: none;')" class="commentsTextFieldWrap">
|
||||
{var commentsURL = "/al_comments.pl/create/posts/" . $post->getId()}
|
||||
{var commentsURL = "/al_comments/create/posts/" . $post->getId()}
|
||||
{include "../textArea.xml", route => $commentsURL, postOpts => false, graffiti => (bool) ovkGetQuirk("comments.allow-graffiti"), post => $post}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -19,10 +19,12 @@ routes:
|
|||
handler: "Support->view"
|
||||
- url: "/support/comment/{num}/rate/{num}"
|
||||
handler: "Support->rateAnswer"
|
||||
- url: "/al_comments.pl/create/support/{num}"
|
||||
- url: "/al_comments/create/support/{num}"
|
||||
handler: "Support->makeComment"
|
||||
- url: "/al_comments.pl/create/support/reply/{num}"
|
||||
- url: "/al_comments/create/support/reply/{num}"
|
||||
handler: "Support->AnswerTicketReply"
|
||||
- url: "/al_comments/create/{text}/{num}"
|
||||
handler: "Comment->makeComment"
|
||||
- url: "/support/delete/{num}"
|
||||
handler: "Support->delete"
|
||||
- url: "/language"
|
||||
|
@ -47,6 +49,10 @@ routes:
|
|||
handler: "Auth->register"
|
||||
- url: "/logout"
|
||||
handler: "Auth->logout"
|
||||
- url: "/restore"
|
||||
handler: "Auth->restore"
|
||||
- url: "/restore/internal-finish"
|
||||
handler: "Auth->finishRestoringPassword"
|
||||
- url: "/restore.pl"
|
||||
handler: "Auth->restore"
|
||||
- url: "/restore.pl/internal-finish"
|
||||
|
@ -75,8 +81,6 @@ routes:
|
|||
handler: "Group->sub"
|
||||
- url: "/setSub/v4/club"
|
||||
handler: "Group->attend"
|
||||
- url: "/al_comments.pl/create/{text}/{num}"
|
||||
handler: "Comment->makeComment"
|
||||
- url: "/groups/{num}/setNewOwner/{num}"
|
||||
handler: "Group->changeOwner"
|
||||
- url: "/comment{num}/like"
|
||||
|
@ -123,9 +127,9 @@ routes:
|
|||
handler: "Photos->album"
|
||||
- url: "/album{num}_{num}/edit"
|
||||
handler: "Photos->editAlbum"
|
||||
- url: "/album{num}_{num}/delete.pl"
|
||||
- url: "/album{num}_{num}/delete"
|
||||
handler: "Photos->deleteAlbum"
|
||||
- url: "/album{num}_{num}/remove_photo.pl/{num}"
|
||||
- url: "/album{num}_{num}/remove_photo/{num}"
|
||||
handler: "Photos->unlinkPhoto"
|
||||
- url: "/photos/upload"
|
||||
handler: "Photos->uploadPhoto"
|
||||
|
@ -137,7 +141,7 @@ routes:
|
|||
handler: "Photos->editPhoto"
|
||||
- url: "/photo{num}_{num}/delete"
|
||||
handler: "Photos->deletePhoto"
|
||||
- url: "/al_avatars.pl"
|
||||
- url: "/al_avatars"
|
||||
handler: "User->setAvatar"
|
||||
- url: "/videos{num}"
|
||||
handler: "Videos->list"
|
||||
|
@ -161,7 +165,7 @@ routes:
|
|||
handler: "Group->followers"
|
||||
- url: "/club{num}/followers/{num}"
|
||||
handler: "Group->admin"
|
||||
- url: "/club{num}/setAdmin.jsp"
|
||||
- url: "/club{num}/setAdmin"
|
||||
handler: "Group->modifyAdmin"
|
||||
- url: "/groups{num}"
|
||||
handler: "User->groups"
|
||||
|
@ -253,15 +257,15 @@ routes:
|
|||
handler: "Admin->giftCategory"
|
||||
- url: "/admin/gifts/{slug}.{num}/"
|
||||
handler: "Admin->gifts"
|
||||
- url: "/admin/ban.pl/{num}"
|
||||
- url: "/admin/ban/{num}"
|
||||
handler: "Admin->quickBan"
|
||||
- url: "/admin/warn.pl/{num}"
|
||||
- url: "/admin/warn/{num}"
|
||||
handler: "Admin->quickWarn"
|
||||
- url: "/method/{text}.{text}"
|
||||
handler: "VKAPI->route"
|
||||
- url: "/token"
|
||||
handler: "VKAPI->tokenLogin"
|
||||
- url: "/sandbox_cocksex"
|
||||
- url: "/admin/sandbox"
|
||||
handler: "About->sandbox"
|
||||
- url: "/internal/wall{num}"
|
||||
handler: "Wall->wallEmbedded"
|
||||
|
|
|
@ -185,7 +185,7 @@ function repostPost(id, hash) {
|
|||
|
||||
function setClubAdminComment(clubId, adminId, hash) {
|
||||
MessageBox("Изменить комментарий к администратору", `
|
||||
<form action="/club${clubId}/setAdmin.jsp" method="post" id="uClubAdminCommentForm_${clubId}_${adminId}">
|
||||
<form action="/club${clubId}/setAdmin" method="post" id="uClubAdminCommentForm_${clubId}_${adminId}">
|
||||
<input type="hidden" name="user" value="${adminId}">
|
||||
<input type="hidden" name="hash" value="${hash}">
|
||||
<input type="hidden" name="removeComment" id="uClubAdminCommentRemoveCommentInput_${clubId}_${adminId}" value="0">
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"forgot_password" = "Մոռացե՞լ եք գաղտնաբառը";
|
||||
|
||||
"login_failed" = "Չհաջողվեց մուտք գործել";
|
||||
"invalid_username_or_password" = "Սխալ օգտատիրոջ անուն կամ գաղտնաբառ։ Դուք կարող եք <a href='/restore.pl'>վերականգնել ձեր գաղտնաբառը</a>։";
|
||||
"invalid_username_or_password" = "Սխալ օգտատիրոջ անուն կամ գաղտնաբառ։ Դուք կարող եք <a href='/restore'>վերականգնել ձեր գաղտնաբառը</a>։";
|
||||
|
||||
"failed_to_register" = "Չհաջողվեց գրանցվել";
|
||||
"referral_link_invalid" = "Հրավերքային հղումը սխալ է։";
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"forgot_password" = "Forgot your password?";
|
||||
|
||||
"login_failed" = "Login failed";
|
||||
"invalid_username_or_password" = "The username or password you entered is incorrect. <a href='/restore.pl'>Forgot your password?</a>";
|
||||
"invalid_username_or_password" = "The username or password you entered is incorrect. <a href='/restore'>Forgot your password?</a>";
|
||||
|
||||
"failed_to_register" = "Failed to register";
|
||||
"referral_link_invalid" = "The referral link is invalid.";
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"forgot_password" = "Ĉu vi forgesis vian pasvorton?";
|
||||
|
||||
"login_failed" = "Ensaluto malsukcesis";
|
||||
"invalid_username_or_password" = "La uzantnomo aŭ pasvorto, kiun vi enigis, estas malĝusta. <a href='/restore.pl'>Ĉu vi forgesis vian pasvorton?</a>";
|
||||
"invalid_username_or_password" = "La uzantnomo aŭ pasvorto, kiun vi enigis, estas malĝusta. <a href='/restore'>Ĉu vi forgesis vian pasvorton?</a>";
|
||||
|
||||
"failed_to_register" = "Malsukcesis registri";
|
||||
"referral_link_invalid" = "La invito ligilo estas malvalida.";
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"forgot_password" = "Құпиясөзіңізді ұмыттыңыз ба?";
|
||||
|
||||
"login_failed" = "Жүйеге кіру сәтті аяқталмады";
|
||||
"invalid_username_or_password" = "Қолданушы аты немесе құпиясөз дұрыс емес.<a href='/restore.pl'>Құпиясөзді ұмыттыңыз ба?</a>";
|
||||
"invalid_username_or_password" = "Қолданушы аты немесе құпиясөз дұрыс емес.<a href='/restore'>Құпиясөзді ұмыттыңыз ба?</a>";
|
||||
|
||||
"failed_to_register" = "Жүйеге тіркелу сәтті аяқталмады";
|
||||
"referral_link_invalid" = "Реферал сілтемесі жарамсыз.";
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"forgot_password" = "Забыли пароль?";
|
||||
|
||||
"login_failed" = "Не удалось войти";
|
||||
"invalid_username_or_password" = "Неверное имя пользователя или пароль. <a href='/restore.pl'>Забыли пароль?</a>";
|
||||
"invalid_username_or_password" = "Неверное имя пользователя или пароль. <a href='/restore'>Забыли пароль?</a>";
|
||||
|
||||
"failed_to_register" = "Не удалось зарегистрироваться";
|
||||
"referral_link_invalid" = "Пригласительная ссылка недействительна.";
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"forgot_password" = "Запамятовали шифръ?";
|
||||
|
||||
"login_failed" = "Не удалось войти";
|
||||
"invalid_username_or_password" = "Невѣрное имя пользователя или шифръ. <a href='/restore.pl'>Забыли шифръ?</a>";
|
||||
"invalid_username_or_password" = "Невѣрное имя пользователя или шифръ. <a href='/restore'>Забыли шифръ?</a>";
|
||||
|
||||
"failed_to_register" = "Не удалось зарегистрироваться";
|
||||
"referral_link_invalid" = "Пригласительная ссылка недѣйствительна.";
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"forgot_password" = "Забули пароль?";
|
||||
|
||||
"login_failed" = "Не вдалося увійти";
|
||||
"invalid_username_or_password" = "Неправильне ім'я користувача або пароль. <a href='/restore.pl'>Забули пароль?</a>";
|
||||
"invalid_username_or_password" = "Неправильне ім'я користувача або пароль. <a href='/restore'>Забули пароль?</a>";
|
||||
|
||||
"failed_to_register" = "Не вдалося зареєструватися";
|
||||
"referral_link_invalid" = "Посилання на запрошення недійсне.";
|
||||
|
|
Loading…
Reference in a new issue