Minor fixes

This commit is contained in:
Miraty 2023-03-18 18:38:27 +01:00
parent d41ac85b55
commit 80bef2ca8c
4 changed files with 8 additions and 6 deletions

View File

@ -291,7 +291,7 @@ msgstr "Anonyme"
#: view.php:44
#, php-format
msgid "This form won't be accepted because you need to %slog in%s first."
msgstr "Ce forumulaire ne sera pas accepté car il faut %sse connecter%s d'abord."
msgstr "Ce formulaire ne sera pas accepté car il faut %sse connecter%s d'abord."
#: view.php:51
#, php-format
@ -694,7 +694,7 @@ msgstr "Ajouter un accès de site"
#: pg-view/ht/index.php:40
#, php-format
msgid "In order to be able to setup an HTTP site with this service, a subdirectory for this site must be created inside the SFTP space first. The name of this subdirectory can only contain %1$s, %2$s, %3$s, %4$s and %5$s."
msgid "In order to be able to set up an HTTP site with this service, a subdirectory for this site must be created inside the SFTP space first. The name of this subdirectory can only contain %1$s, %2$s, %3$s, %4$s and %5$s."
msgstr "Pour pouvoir créer un site HTTP avec ce service, un sous-dossier pour ce site doit d'abord être créé dans l'espace SFTP. Le nom de ce sous-dossier ne peut contenir que %1$s, %2$s, %3$s, %4$s et %5$s."
#: pg-view/ht/index.php:51

View File

@ -693,7 +693,7 @@ msgstr ""
#: pg-view/ht/index.php:40
#, php-format
msgid "In order to be able to setup an HTTP site with this service, a subdirectory for this site must be created inside the SFTP space first. The name of this subdirectory can only contain %1$s, %2$s, %3$s, %4$s and %5$s."
msgid "In order to be able to set up an HTTP site with this service, a subdirectory for this site must be created inside the SFTP space first. The name of this subdirectory can only contain %1$s, %2$s, %3$s, %4$s and %5$s."
msgstr ""
#: pg-view/ht/index.php:51

View File

@ -37,7 +37,7 @@ else {
<section>
<h2><?= _('Adding a site access') ?></h2>
<p><?= sprintf(_('In order to be able to setup an HTTP site with this service, a subdirectory for this site must be created inside the SFTP space first. The name of this subdirectory can only contain %1$s, %2$s, %3$s, %4$s and %5$s.'), '<abbr title="abcdefghijklmnopqrstuvwxyz"><code>a</code>-<code>z</code></abbr>', '<abbr title="ABCDEFGHIJKLMNOPQRSTUVWXYZ"><code>A</code>-<code>Z</code></abbr>', '<abbr title="0123456789"><code>0</code>-<code>9</code></abbr>', '<code>_</code>', '<code>-</code>') ?></p>
<p><?= sprintf(_('In order to be able to set up an HTTP site with this service, a subdirectory for this site must be created inside the SFTP space first. The name of this subdirectory can only contain %1$s, %2$s, %3$s, %4$s and %5$s.'), '<abbr title="abcdefghijklmnopqrstuvwxyz"><code>a</code>-<code>z</code></abbr>', '<abbr title="ABCDEFGHIJKLMNOPQRSTUVWXYZ"><code>A</code>-<code>Z</code></abbr>', '<abbr title="0123456789"><code>0</code>-<code>9</code></abbr>', '<code>_</code>', '<code>-</code>') ?></p>
</section>
<section>
@ -93,7 +93,7 @@ $quota = ($_SESSION['type'] ?? '' === 'approved') ? CONF['ht']['user_quota_appro
</dd>
<dt><?= _('Username') ?></dt>
<dd>
<code><?= isset($_SESSION['display-username']) ? $_SESSION['display-username'] : '&lt;username&gt;'; ?></code>
<code><?= defined('DISPLAY_USERNAME') ? DISPLAY_USERNAME : '&lt;username&gt;' ?></code>
</dd>
<dt><?= _('Password') ?></dt>
<dd>

View File

@ -17,6 +17,9 @@ $username = hashUsername($auth_data['username']);
if (usernameExists($username) !== true)
deny();
if (!in_array('ht', explode(',', query('select', 'users', ['username' => $username], 'services')[0]), true))
deny();
$id = query('select', 'users', ['username' => $username], 'id')[0];
if (checkPassword($id, $auth_data['password']) !== true)
@ -36,4 +39,3 @@ echo '
}
';
http_response_code(200);