Skip to content

Commit 96d9608

Browse files
committed
fix: corrected minor glitches after moving to Twig
1 parent ce4e4a1 commit 96d9608

File tree

12 files changed

+19
-19
lines changed

12 files changed

+19
-19
lines changed

phpmyfaq/admin/faqs.editor.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
}
214214

215215
// Revisions
216-
$selectedRevisionId = Filter::filterInput(INPUT_POST, 'revisionid_selected', FILTER_VALIDATE_INT);
216+
$selectedRevisionId = Filter::filterInput(INPUT_POST, 'selectedRevisionId', FILTER_VALIDATE_INT);
217217
if (is_null($selectedRevisionId)) {
218218
$selectedRevisionId = $faqData['revision_id'];
219219
}
@@ -348,7 +348,6 @@
348348
$isInActive = null;
349349
}
350350

351-
352351
$attList = AttachmentFactory::fetchByRecordId(
353352
$faqConfig,
354353
$faqData['id']

phpmyfaq/assets/templates/admin/content/faq.editor.twig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@
5656
<div class="form-group mb-2">
5757
<form id="selectRevision" name="selectRevision" method="post"
5858
action="?action=editentry&id={{ faqData['id'] }}&lang={{ faqLang }}">
59-
<select class="form-select" name="revisionid_selected" onchange="this.form.submit();">
60-
<option value="{{ faqRevisionId }}">{{ ad_changerev }}</option>
61-
{% for revision in revisions %}
62-
{% set selected = selectedRevisionId == revision['revision_id'] %}
63-
<option value="{{ revision['revision_id'] }}" {{ selected == 1 ? ' selected' }}>
64-
{{ ad_entry_revision }} 1.{{ revision['revision_id'] }}:
65-
{{ revision['updated'] | createIsoDate }} - {{ revision['author'] }}
59+
<select class="form-select" name="selectedRevisionId" onchange="this.form.submit();">
60+
<option value="0">{{ ad_changerev }}</option>
61+
{% for currentRevision in revisions %}
62+
{% set selected = selectedRevisionId == faqData['revision_id'] %}
63+
<option value="{{ currentRevision['revision_id'] }}" {{ selected == true ? ' selected' }}>
64+
{{ ad_entry_revision }} 1.{{ currentRevision['revision_id'] }}:
65+
{{ currentRevision['updated'] | createIsoDate }} - {{ currentRevision['author'] }}
6666
</option>
6767
{% endfor %}
6868
</select>
@@ -396,7 +396,7 @@
396396
</label>
397397
</div>
398398
<div class="form-check">
399-
<input type="radio" id="inactive" name="active" value="no" class="form-check-input" {{ isinActive }}>
399+
<input type="radio" id="inactive" name="active" value="no" class="form-check-input" {{ isInActive }}>
400400
<label class="form-check-label" for="inactive">
401401
{{ ad_entry_not_visibility }}
402402
</label>

phpmyfaq/src/phpMyFAQ/Controller/Administration/FaqController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public function create(Request $request): JsonResponse
8888

8989
// Collect FAQ data
9090
$question = Filter::filterVar($data->question, FILTER_SANITIZE_SPECIAL_CHARS);
91+
9192
if (is_array($data->{'categories[]'})) {
9293
$categories = Filter::filterArray($data->{'categories[]'});
9394
} else {

phpmyfaq/translations/language_de.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@
11931193

11941194
// added v2.9.0-RC - 2016-02-19 by Thorsten
11951195
$PMF_LANG['ad_admin_notes'] = 'Private Notizen';
1196-
$PMF_LANG['ad_admin_notes_hint'] = '%s (nur für Editoren sichtbar)';
1196+
$PMF_LANG['ad_admin_notes_hint'] = ' (nur für Editoren sichtbar)';
11971197

11981198
// added v2.9.10 - 2018-02-17 by Thorsten
11991199
$PMF_LANG['ad_quick_entry'] = 'Neue FAQ in dieser Kategorie anlegen';

phpmyfaq/translations/language_en.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@
11931193

11941194
// added v2.9.0-RC - 2016-02-19 by Thorsten
11951195
$PMF_LANG['ad_admin_notes'] = 'Private Notes';
1196-
$PMF_LANG['ad_admin_notes_hint'] = '%s (only visible for editors)';
1196+
$PMF_LANG['ad_admin_notes_hint'] = ' (only visible for editors)';
11971197

11981198
// added v2.9.10 - 2018-02-17 by Thorsten
11991199
$PMF_LANG['ad_quick_entry'] = 'Add new FAQ in this category';

phpmyfaq/translations/language_es.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@
11911191

11921192
// añadido v2.9.0-RC - 2016-02-19 por Thorsten
11931193
$PMF_LANG['ad_admin_notes'] = 'Notas privadas';
1194-
$PMF_LANG['ad_admin_notes_hint'] = '%s (sólo visible para los editores)';
1194+
$PMF_LANG['ad_admin_notes_hint'] = ' (sólo visible para los editores)';
11951195

11961196
// Añadido v2.9.10 - 2018-02-17 por Thorsten
11971197
$PMF_LANG['ad_quick_entry'] = 'Crear nueva FAQ en esta categoría';

phpmyfaq/translations/language_fr.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@
11951195

11961196
// added v2.9.0-RC - 2016-02-19 by Thorsten
11971197
$PMF_LANG["ad_admin_notes"] = "Notes privées";
1198-
$PMF_LANG["ad_admin_notes_hint"] = "%s (visible seulement pour les éditeurs)";
1198+
$PMF_LANG["ad_admin_notes_hint"] = " (visible seulement pour les éditeurs)";
11991199

12001200
// added v2.9.10 - 2018-02-17 by Thorsten
12011201
$PMF_LANG["ad_quick_entry"] = "Ajouter une nouvelle FAQ dans cette catégorie";

phpmyfaq/translations/language_ja.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@
937937

938938
// added v2.9.0-RC
939939
$PMF_LANG['ad_admin_notes'] = 'プライベートメモ';
940-
$PMF_LANG['ad_admin_notes_hint'] = '%s (編集者のみ閲覧可)';
940+
$PMF_LANG['ad_admin_notes_hint'] = ' (編集者のみ閲覧可)';
941941

942942
// added v2.9.10
943943
$PMF_LANG['ad_quick_entry'] = 'このカテゴリーにFAQを追加';

phpmyfaq/translations/language_nl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@
915915
$PMF_LANG['ad_export_generate_json'] = 'Maak JSON bestand aan';
916916
$PMF_LANG['ad_media_name_search'] = 'Zoeken op medianaam';
917917
$PMF_LANG['ad_admin_notes'] = 'Persoonlijke notities';
918-
$PMF_LANG['ad_admin_notes_hint'] = '%s (alleen zichtbaar voor auteurs)';
918+
$PMF_LANG['ad_admin_notes_hint'] = ' (alleen zichtbaar voor auteurs)';
919919
$PMF_LANG['msgGoToCategory'] = 'Ga naar categorie';
920920

921921
return $PMF_LANG;

phpmyfaq/translations/language_pl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@
12071207

12081208
// added v2.9.0-RC - 2016-02-19 by Thorsten
12091209
$PMF_LANG['ad_admin_notes'] = 'Notatki Prywatne';
1210-
$PMF_LANG['ad_admin_notes_hint'] = '%s (widoczne tylko dla redaktorów)';
1210+
$PMF_LANG['ad_admin_notes_hint'] = ' (widoczne tylko dla redaktorów)';
12111211

12121212
// added v2.9.10 - 2018-02-17 by Thorsten
12131213
$PMF_LANG['ad_quick_entry'] = 'Dodaj nowe FAQ w tej kategorii';

0 commit comments

Comments
 (0)