add error 404 from saba to plugin activityReport

This commit is contained in:
Jean-Christian Paul Denis 2022-12-17 17:38:59 +01:00
parent 875f3ca6dc
commit 1da5fe9674
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
4 changed files with 38 additions and 78 deletions

29
_prepend.php Normal file
View File

@ -0,0 +1,29 @@
<?php
/**
* @brief saba, a plugin for Dotclear 2
*
* @package Dotclear
* @subpackage Plugin
*
* @author Jean-Christian Denis and Contributors
*
* @copyright Jean-Christian Denis
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
*/
if (!defined('DC_RC_PATH')) {
return null;
}
if (defined('ACTIVITY_REPORT_V2')) {
dcCore::app()->activityReport->addAction(
'blog',
'saba404',
__('404 error (saba)'),
__('New 404 error page at "%s"'),
'sabaBeforeErrorDocument',
function () {
$logs = [dcCore::app()->blog->url . urldecode($_SERVER['QUERY_STRING'])];
dcCore::app()->activityReport->addLog('blog', 'saba404', $logs);
}
);
}

View File

@ -259,6 +259,8 @@ class urlSaba extends dcUrlHandlers
return false; return false;
} }
dcCore::app()->callBehavior('sabaBeforeErrorDocument');
# Clean URI # Clean URI
$_GET['q'] = implode('%20', $q); $_GET['q'] = implode('%20', $q);
$_SERVER['QUERY_STRING'] = ''; $_SERVER['QUERY_STRING'] = '';

View File

@ -1,85 +1,66 @@
# Language: Français
# Module: saba - 2021.08.21
# Date: 2021-08-22 23:22:12
# Translated with translater 2021.08.18
msgid "" msgid ""
msgstr "" msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: saba 2021.08.21\n" "Project-Id-Version: saba 2022.11.20\n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2021-08-22T23:22:12+00:00\n" "PO-Revision-Date: 2022-12-17T16:29:12+00:00\n"
"Last-Translator: Jean-Christian Denis\n" "Last-Translator: Jean-Christian Denis\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: _admin.php:38
msgid "Search Across Blog Archive" msgid "Search Across Blog Archive"
msgstr "Rechercher dans les archives" msgstr "Rechercher dans les archives"
#: _admin.php:41
msgid "Enable advanced search on this blog" msgid "Enable advanced search on this blog"
msgstr "Activer la recherche avancée sur ce blog" msgstr "Activer la recherche avancée sur ce blog"
#: _admin.php:44
msgid "Enable suggestion for page 404" msgid "Enable suggestion for page 404"
msgstr "Activer la suggestion sur la page 404" msgstr "Activer la suggestion sur la page 404"
#: _admin.php:46
msgid "This suggests visitors some posts on page 404." msgid "This suggests visitors some posts on page 404."
msgstr "Ceci suggère au visiteurs des billets sur la page 404." msgstr "Ceci suggère au visiteurs des billets sur la page 404."
#: _widgets.php:18 msgid "404 error (saba)"
msgstr "Erreur 404 (saba)"
msgid "Advanced search" msgid "Advanced search"
msgstr "Recherche avancée" msgstr "Recherche avancée"
#: _widgets.php:21
msgid "Add more search options on public side" msgid "Add more search options on public side"
msgstr "Ajoute plus d'options de recherche" msgstr "Ajoute plus d'options de recherche"
#: _widgets.php:26
msgid "Disable filter on post types" msgid "Disable filter on post types"
msgstr "Désactiver le filtre de type de billets" msgstr "Désactiver le filtre de type de billets"
#: _widgets.php:30
msgid "Hidden types:" msgid "Hidden types:"
msgstr "Billets cachés :" msgstr "Billets cachés :"
#: _widgets.php:33
msgid "Disable filter on post options" msgid "Disable filter on post options"
msgstr "Désactiver le filtre des options de billet" msgstr "Désactiver le filtre des options de billet"
#: _widgets.php:37
msgid "Hidden options:" msgid "Hidden options:"
msgstr "Options cachées :" msgstr "Options cachées :"
#: _widgets.php:40
msgid "Disable filter on categories" msgid "Disable filter on categories"
msgstr "Désactiver le filtre de catégories" msgstr "Désactiver le filtre de catégories"
#: _widgets.php:44
msgid "Hidden categories:" msgid "Hidden categories:"
msgstr "Catégories cachées" msgstr "Catégories cachées"
#: _widgets.php:47
msgid "Disable filter on authors" msgid "Disable filter on authors"
msgstr "Désactiver le filtre d'auteurs" msgstr "Désactiver le filtre d'auteurs"
#: _widgets.php:51
msgid "Hidden authors:" msgid "Hidden authors:"
msgstr "Auteurs cachés" msgstr "Auteurs cachés"
#: _widgets.php:54
msgid "Disable filter on order" msgid "Disable filter on order"
msgstr "Désactiver le filtre d'ordre" msgstr "Désactiver le filtre d'ordre"
#: _widgets.php:60
msgid "Disable filter on age" msgid "Disable filter on age"
msgstr "Désactiver le filtre de date" msgstr "Désactiver le filtre de date"
#: default-templates/saba_404_dotty.html:22
msgid "Suggested items:" msgid "Suggested items:"
msgstr "Articles suggérés :" msgstr "Articles suggérés :"

View File

@ -1,118 +1,66 @@
# Language: Français
# Module: saba - 2021.08.21
# Date: 2021-08-22 23:22:12
# Translated with translater 2021.08.18
msgid "" msgid ""
msgstr "" msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: saba 2021.08.21\n" "Project-Id-Version: saba 2022.11.20\n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2021-08-22T23:22:12+00:00\n" "PO-Revision-Date: 2022-12-17T16:29:12+00:00\n"
"Last-Translator: Jean-Christian Denis\n" "Last-Translator: Jean-Christian Denis\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: _public.php:293
#: _public.php:303
msgid "Selected entry"
msgstr "Billet sélectionné"
#: _public.php:294
msgid "With comments" msgid "With comments"
msgstr "Avec commentaires" msgstr "Avec commentaires"
#: _public.php:295
msgid "With trackbacks" msgid "With trackbacks"
msgstr "Avec rétroliens" msgstr "Avec rétroliens"
#: _public.php:302
msgid "Title"
msgstr "Titre"
#: _public.php:304
msgid "Author"
msgstr "Auteur·rice"
#: _public.php:305
msgid "Date"
msgstr "Date"
#: _public.php:306
msgid "Update"
msgstr "Mise à jour"
#: _public.php:307
msgid "Comments count" msgid "Comments count"
msgstr "Nombre de commentaires" msgstr "Nombre de commentaires"
#: _public.php:308
msgid "Trackbacks count" msgid "Trackbacks count"
msgstr "Nombre de rétroliens" msgstr "Nombre de rétroliens"
#: _public.php:315
msgid "All" msgid "All"
msgstr "Tous" msgstr "Tous"
#: _public.php:316
msgid "Less than a month" msgid "Less than a month"
msgstr "Moins d'un mois" msgstr "Moins d'un mois"
#: _public.php:317
msgid "From 1 to 6 month" msgid "From 1 to 6 month"
msgstr "De 1 à 6 mois" msgstr "De 1 à 6 mois"
#: _public.php:318
msgid "From 6 to 12 month" msgid "From 6 to 12 month"
msgstr "De 6 à 12 mois" msgstr "De 6 à 12 mois"
#: _public.php:319
msgid "More than a year" msgid "More than a year"
msgstr "Plus d'un an" msgstr "Plus d'un an"
#: _public.php:326
msgid "Entry"
msgstr "Publication"
#: _public.php:327
msgid "Page"
msgstr "Page"
#: _public.php:328
msgid "Poll" msgid "Poll"
msgstr "Sondage" msgstr "Sondage"
#: _public.php:329
msgid "Event" msgid "Event"
msgstr "Événement" msgstr "Événement"
#: _widgets.php:114
msgid "Reverse order" msgid "Reverse order"
msgstr "Inverser l'ordre" msgstr "Inverser l'ordre"
#: _widgets.php:115
msgid "Filter order" msgid "Filter order"
msgstr "Options de tri" msgstr "Options de tri"
#: _widgets.php:135
msgid "Filter options" msgid "Filter options"
msgstr "Options du filtre" msgstr "Options du filtre"
#: _widgets.php:151
msgid "Filter by age" msgid "Filter by age"
msgstr "Filtrer par date" msgstr "Filtrer par date"
#: _widgets.php:171
msgid "Filter by type" msgid "Filter by type"
msgstr "Filtrer par type" msgstr "Filtrer par type"
#: _widgets.php:192
msgid "Filter by category" msgid "Filter by category"
msgstr "Filter par catégorie" msgstr "Filter par catégorie"
#: _widgets.php:213
msgid "Filter by author" msgid "Filter by author"
msgstr "Filtrer par auteur" msgstr "Filtrer par auteur"