Skip to content

Commit

Permalink
fix: corrected minor glitches after moving to Twig
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed May 12, 2024
1 parent ce4e4a1 commit 96d9608
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
3 changes: 1 addition & 2 deletions phpmyfaq/admin/faqs.editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
}

// Revisions
$selectedRevisionId = Filter::filterInput(INPUT_POST, 'revisionid_selected', FILTER_VALIDATE_INT);
$selectedRevisionId = Filter::filterInput(INPUT_POST, 'selectedRevisionId', FILTER_VALIDATE_INT);
if (is_null($selectedRevisionId)) {
$selectedRevisionId = $faqData['revision_id'];
}
Expand Down Expand Up @@ -348,7 +348,6 @@
$isInActive = null;
}


$attList = AttachmentFactory::fetchByRecordId(
$faqConfig,
$faqData['id']
Expand Down
16 changes: 8 additions & 8 deletions phpmyfaq/assets/templates/admin/content/faq.editor.twig
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@
<div class="form-group mb-2">
<form id="selectRevision" name="selectRevision" method="post"
action="?action=editentry&id={{ faqData['id'] }}&lang={{ faqLang }}">
<select class="form-select" name="revisionid_selected" onchange="this.form.submit();">
<option value="{{ faqRevisionId }}">{{ ad_changerev }}</option>
{% for revision in revisions %}
{% set selected = selectedRevisionId == revision['revision_id'] %}
<option value="{{ revision['revision_id'] }}" {{ selected == 1 ? ' selected' }}>
{{ ad_entry_revision }} 1.{{ revision['revision_id'] }}:
{{ revision['updated'] | createIsoDate }} - {{ revision['author'] }}
<select class="form-select" name="selectedRevisionId" onchange="this.form.submit();">
<option value="0">{{ ad_changerev }}</option>
{% for currentRevision in revisions %}
{% set selected = selectedRevisionId == faqData['revision_id'] %}
<option value="{{ currentRevision['revision_id'] }}" {{ selected == true ? ' selected' }}>
{{ ad_entry_revision }} 1.{{ currentRevision['revision_id'] }}:
{{ currentRevision['updated'] | createIsoDate }} - {{ currentRevision['author'] }}
</option>
{% endfor %}
</select>
Expand Down Expand Up @@ -396,7 +396,7 @@
</label>
</div>
<div class="form-check">
<input type="radio" id="inactive" name="active" value="no" class="form-check-input" {{ isinActive }}>
<input type="radio" id="inactive" name="active" value="no" class="form-check-input" {{ isInActive }}>
<label class="form-check-label" for="inactive">
{{ ad_entry_not_visibility }}
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function create(Request $request): JsonResponse

// Collect FAQ data
$question = Filter::filterVar($data->question, FILTER_SANITIZE_SPECIAL_CHARS);

if (is_array($data->{'categories[]'})) {
$categories = Filter::filterArray($data->{'categories[]'});
} else {
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/translations/language_de.php
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@

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

// added v2.9.10 - 2018-02-17 by Thorsten
$PMF_LANG['ad_quick_entry'] = 'Neue FAQ in dieser Kategorie anlegen';
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/translations/language_en.php
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@

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

// added v2.9.10 - 2018-02-17 by Thorsten
$PMF_LANG['ad_quick_entry'] = 'Add new FAQ in this category';
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/translations/language_es.php
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@

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

// Añadido v2.9.10 - 2018-02-17 por Thorsten
$PMF_LANG['ad_quick_entry'] = 'Crear nueva FAQ en esta categoría';
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/translations/language_fr.php
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@

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

// added v2.9.10 - 2018-02-17 by Thorsten
$PMF_LANG["ad_quick_entry"] = "Ajouter une nouvelle FAQ dans cette catégorie";
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/translations/language_ja.php
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@

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

// added v2.9.10
$PMF_LANG['ad_quick_entry'] = 'このカテゴリーにFAQを追加';
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/translations/language_nl.php
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@
$PMF_LANG['ad_export_generate_json'] = 'Maak JSON bestand aan';
$PMF_LANG['ad_media_name_search'] = 'Zoeken op medianaam';
$PMF_LANG['ad_admin_notes'] = 'Persoonlijke notities';
$PMF_LANG['ad_admin_notes_hint'] = '%s (alleen zichtbaar voor auteurs)';
$PMF_LANG['ad_admin_notes_hint'] = ' (alleen zichtbaar voor auteurs)';
$PMF_LANG['msgGoToCategory'] = 'Ga naar categorie';

return $PMF_LANG;
2 changes: 1 addition & 1 deletion phpmyfaq/translations/language_pl.php
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@

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

// added v2.9.10 - 2018-02-17 by Thorsten
$PMF_LANG['ad_quick_entry'] = 'Dodaj nowe FAQ w tej kategorii';
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/translations/language_pt-br.php
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@
$PMF_LANG['ad_export_generate_json'] = 'Criar arquivo JSON';
$PMF_LANG['ad_media_name_search'] = 'Buscar por nome da mídia';
$PMF_LANG['ad_admin_notes'] = 'Notas Privadas';
$PMF_LANG['ad_admin_notes_hint'] = '%s (visível somente para editores)';
$PMF_LANG['ad_admin_notes_hint'] = ' (visível somente para editores)';
$PMF_LANG['ad_quick_entry'] = 'Adicionar nova FAQ nesta categoria';
$LANG_CONF['ldap.ldap_mapping.name'] = ["input", 'Mapeamento do LDAP para nome, "cn" quando estiver usando um ADS'];
$LANG_CONF['ldap.ldap_mapping.username'] = ["input", 'Mapeamento do LDAP para nome de usuário, "samAccountName" quando estiver usando ADS'];
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/translations/language_tr.php
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@

// added v2.9.0-RC - 2016-02-19 by Thorsten
$PMF_LANG['ad_admin_notes'] = "Özel Not";
$PMF_LANG['ad_admin_notes_hint'] = "%s (yalnızca editörler tarafından görülebilir)";
$PMF_LANG['ad_admin_notes_hint'] = " (yalnızca editörler tarafından görülebilir)";

// added 2.10.0-alpha - 2016-08-08 by Thorsten
$LANG_CONF['ldap.ldap_mapping.name'] = array('input', 'LDAP mapping for name, "cn" when using an ADS');
Expand Down

0 comments on commit 96d9608

Please sign in to comment.