Merge pull request '10400' (#3) from ZwiiCMS-Team/ZwiiCMS:10400 into 10400

Reviewed-on: #3
This commit is contained in:
lapervenche 2021-02-09 20:02:49 +01:00
commit 674c98d9d4
21 changed files with 133 additions and 210 deletions

View File

@ -1,7 +1,15 @@
# Changelog
## version 10.4.00
Corrections :
- Bug de pages non accessibles dans le menu suite à la création d'entrées fantômes dans le fichier de données de modules.
- Nettoyage du fichiers des données de modules des entrées fantômes.
- Thème : déformation des images en arrière-plan dans les modes responsives cover et contain lorsque la longueur de la page change. L'image en arrière-plan est désormais placée dans la balise html et l'option fixe s'active lorsque cover ou contain sont sélectionnés.
- Thème : déformation du sélecteur de fichiers dans certains formats de page.
- Module Form : mauvais affichage du guillemet et de l'apostrophe dans les noms des champs lors de l'édition.
- Thème : faille CSRF, protection de la réinitialisation des fichiers de thème.
- Modifications :
- Filtrage des URL générées par facebook (FBCLID) occasionnant une erreur 404
- Captcha arithmétique, activation recommandée dans la configuration.
- Module User
- Pour les articles de blog et de news, choix de la signature, nom+prenom ; nom+prenom ; id ; pseudo
@ -15,9 +23,9 @@
- Approbation des commentaires
- Gestion des thèmes :
- Bouton de réinitialisation avec confirmation
- Traduction automatique dans la langue du navigateur.
- Amélioration de la structure du flux RSS.
## Version 10.3.13
Modifications :
- Système de données (JsonDB) :

View File

@ -44,7 +44,7 @@ class common {
const ACCESS_TIMER = 1800;
// Numéro de version
const ZWII_VERSION = '10.4.00.013';
const ZWII_VERSION = '10.4.00.015';
const ZWII_UPDATE_CHANNEL = "v10";
public static $actions = [];
@ -192,10 +192,6 @@ class common {
$this->input['_COOKIE'] = $_COOKIE;
}
// Déterminer le dossier de langues
if (isset($_POST['ZWII_USER_I18N'])) {
self::$i18nCurrent = $_POST['ZWII_USER_I18N'];
}
// Instanciation de la classe des entrées / sorties
// Récupère les descripteurs
@ -236,30 +232,6 @@ class common {
$this->user = $this->getData(['user', $this->getInput('ZWII_USER_ID')]);
}
// Traduction du site avec le script Google
if ( $this->getData(['config','translate','scriptGoogle'])) {
// Lire la langue stockée dans le cookie (choix manuel)
if ( isset($_COOKIE['ZWII_USER_I18N']) ) {
$lan_cookie = $_COOKIE['ZWII_USER_I18N'];
}
// Lire la langue du navigateur
if ( $this->getData(['config','translate','autoDetect'])) {
$lan_browser = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
}
// Priorité : choix manuel - navigateur - fr
$lan = isset($lan_cookie) ? $lan_cookie : (isset($lan_browser) ? $lan_browser : 'fr');
// Changer la locale
if ( $lan !== 'fr') {
setlocale (LC_TIME, $lan . '_' . strtoupper ($lan) );
// Charge la librairie Google Translate
setrawcookie("googtrans", '/fr/'. $lan, time() + 3600, helper::baseUrl());
} else {
setrawcookie("googtrans", '/fr/fr', time() + 3600, helper::baseUrl());
}
}
// Construit la liste des pages parents/enfants
if($this->hierarchy['all'] === []) {
$pages = helper::arrayCollumn($this->getData(['page']), 'position', 'SORT_ASC');
@ -561,16 +533,7 @@ class common {
// Une partie de l'url
else {
$url = explode('/', $this->url);
if (array_key_exists($key, $url) ) {
if (strpos($url[$key],'fbclid=') === false) {
$result = $url[$key];
} else {
$result = $key === 0 ? $this->getData(['config','homePageId']) : '';
}
} else {
$result = null;
}
return $result;
return array_key_exists($key, $url) ? $url[$key] : null;
}
}
@ -1536,12 +1499,8 @@ class common {
foreach ($pageList as $parentKey => $parent) {
//La page est un blog
if ($this->getData(['page',$parent,'moduleId']) === 'blog' ) {
//echo "<pre>".$parent;
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module', $parent, 'posts']), 'publishedOn', 'SORT_DESC'));
//var_dump($articleIds);
foreach ($articleIds as $key => $article) {
//echo $article;
//echo "<p>";
// Droits les deux groupes
$this->setData(['module', $parent, 'posts', $article,'editConsent', 3]);
// Limite de taille 500
@ -1579,13 +1538,29 @@ class common {
$path = realpath('site/data');
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)) as $filename)
{
echo "$filename</br>";
if (strpos($filename,'back.json')) {
rename($filename, str_replace('back.json','backup.json',$filename));
}
}
}
// Supprimer les fichiers CSS devenus inutiles du module search
if (file_exists('module/search/ressource/theme.css') )
unlink('module/search/ressource/theme.css');
if (file_exists('module/search/ressource/vartheme.css') )
unlink('module/search/ressource/vartheme.css');
$this->deleteData(['theme','search','keywordColor']);
// Nettoyer les modules avec des données null
$modules = $this->getData(['module']);
foreach($modules as $key => $value) {
if (is_null($value) ) {
unset($modules[$key]);
}
}
$this->setData (['module',$modules]);
$this->setData(['core', 'dataVersion', 10400]);
/**
@ -1672,20 +1647,27 @@ class core extends common {
$css = '/*' . md5(json_encode($this->getData(['theme']))) . '*/';
// Import des polices de caractères
$css .= '@import url("https://fonts.googleapis.com/css?family=' . $this->getData(['theme', 'text', 'font']) . '|' . $this->getData(['theme', 'title', 'font']) . '|' . $this->getData(['theme', 'header', 'font']) . '|' . $this->getData(['theme', 'menu', 'font']) . '");';
// Fond du site
// Fond du body
$colors = helper::colorVariants($this->getData(['theme', 'body', 'backgroundColor']));
$css .= 'body,div.mce-edit-area{background-color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}';
// Fond TinyMCe
$css .= 'div.mce-edit-area{background-color:' . $colors['normal'] . ' !important}';
// Body
$css .= 'body{font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}';
if($themeBodyImage = $this->getData(['theme', 'body', 'image'])) {
$css .= 'body,div.mce-edit-area{background-image:url("../file/source/' . $themeBodyImage . '");background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}';
$css .= 'div.mce-edit-area{background-image:url("../file/source/' . $themeBodyImage . '") !important;background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}';
// Image dans html pour éviter les déformations.
$css .= 'html{background-image:url("../file/source/' . $themeBodyImage . '");background-position:' . $this->getData(['theme', 'body', 'imagePosition']) . ';background-attachment:' . $this->getData(['theme', 'body', 'imageAttachment']) . ';background-size:' . $this->getData(['theme', 'body', 'imageSize']) . ';background-repeat:' . $this->getData(['theme', 'body', 'imageRepeat']) . '}';
// Couleur du body transparente
$css .= 'body{background-color: rgba(0,0,0,0)}';
} else {
// Pas d'image couleur du body
$css .= 'html{background-color:' . $colors['normal'] . ';}';
}
// Icône BacktoTop
$css .= '#backToTop {background-color:' .$this->getData(['theme', 'body', 'toTopbackgroundColor']). ';color:'.$this->getData(['theme', 'body', 'toTopColor']).';}';
// Site
$colors = helper::colorVariants($this->getData(['theme', 'text', 'linkColor']));
$css .= 'a{color:' . $colors['normal'] . '}';
// Fond TinyMCe
$css .= 'div.mce-edit-area{background-color:' . $colors['normal'] . ' !important}';
$css .= 'div.mce-edit-area{background-color:' . $colors['normal'] . ';font-family:"' . str_replace('+', ' ', $this->getData(['theme', 'text', 'font'])) . '",sans-serif}';
//$css .= 'a:hover:not(.inputFile, button){color:' . $colors['darken'] . '}';
$css .= 'body,.row > div{font-size:' . $this->getData(['theme', 'text', 'fontSize']) . '}';
$css .= 'body{color:' . $this->getData(['theme', 'text', 'textColor']) . '}';
@ -1937,7 +1919,7 @@ class core extends common {
$access = false;
}
}
// Empêcher l'accès aux page désactivée par URL directe
// Empêcher l'accès aux pages désactivées par URL directe
if ( ( $this->getData(['page', $this->getUrl(0),'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
) OR (
@ -2188,21 +2170,6 @@ class core extends common {
}
}
// Chargement de la librairie googtrans
// Le multi langue est actif
if ($this->getData(['config','translate','scriptGoogle']) === true ) {
// la traduction auto est active
if ( $this->getData(['config','translate','autoDetect']) === true
// Cas des pages d'administration
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
OR ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getData(['config','translate','admin']) === true )
) {
$this->addOutput([
'vendor' => array_merge($this->output['vendor'], ['i18n'])
]);
}
}
// Erreurs
if($access === 'login') {
http_response_code(302);
@ -2339,26 +2306,6 @@ class layout extends common {
echo $this->core->output['content'];
/**
* Affiche les crédits, conditions requis :
* La traduction est active et le site n'est pas en français.
* La fonction est activée.
*/
if ( (
( $this->getData(['config','translate','scriptGoogle']) === true
AND substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) !== 'fr'
)
OR ( isset($_COOKIES['ZWII_USER_I18N'])
AND array_key_exists($_COOKIES['ZWII_USER_I18N'],$this->i18nList
AND $_COOKIES['ZWII_USER_I18N'] !== 'fr' )
)
)
AND $this->getData(['config','translate','showCredits']) === true
)
{
echo '<div id="googTransLogo"><a href="//policies.google.com/terms#toc-content" data-lity><img src="core/module/translate/ressource/googtrans.png" /></a></div>';
}
}
@ -3047,20 +2994,4 @@ class layout extends common {
}
}
}
/**
* Affiche le cadre avec les drapeaux
*/
public function showi18n() {
if ( $this->getData(['config','translate','scriptGoogle']) === true ) {
echo '<div id="i18nContainer"><ul>';
foreach (self::$i18nList as $key => $value) {
if ($this->getData(['config','translate','script' . strtoupper($key)]) ) {
echo '<li>';
echo '<a href="' . helper::baseUrl() . 'translate/language/' . $key . '/' . $this->getUrl(0) . '"><img class= "flag" src="' . helper::baseUrl(false) . 'core/vendor/i18n/png/' . $key . '.png" /></a>';
echo '</li>';
}
}
echo '</ul></div>';
}
}
}

View File

@ -1158,10 +1158,14 @@ textarea {
}
label {
display: inline-block;
display: block;
margin-bottom: 4px;
}
.captcha label {
display:inline-block;
}
/* Simule le padding des cols pour les inputs en dehors des cols */
:not([class^="col"])>.inputWrapper {
padding: 10px 0;

View File

@ -60,7 +60,7 @@ $lan = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); ?>
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<!-- Bannière dans le fond du site -->
<header>
<?php $layout->showi18n();?>
<?php //$layout->showi18n();?>
<?php
if ($this->getData(['theme','header','linkHomePage'])){
echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?>
@ -154,7 +154,7 @@ $lan = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); ?>
<?php endif; ?>
<!-- Corps de page -->
<section>
<?php $layout->showi18n();?>
<?php //$layout->showi18n();?>
<?php
// Gabarit :
// Récupérer la config de la page courante

View File

@ -552,8 +552,6 @@ class config extends common {
PHP_EOL .
'<ifModule mod_rewrite.c>' . PHP_EOL .
"\tRewriteEngine on" . PHP_EOL .
"\tRewriteCond %{QUERY_STRING} ^(.*)&?fbclid=[^&]+&?(.*)$ [NC]". PHP_EOL .
"\tRewriteRule ^/?(.*)$ /$1?%1%2 [R=301,L]". PHP_EOL .
"\tRewriteBase " . helper::baseUrl(false, false) . PHP_EOL .
"\tRewriteCond %{REQUEST_FILENAME} !-f" . PHP_EOL .
"\tRewriteCond %{REQUEST_FILENAME} !-d" . PHP_EOL .

View File

@ -781,17 +781,7 @@ class init extends common {
'values' => ''
]
]
],
'locale' => [
'homePageId' => 'accueil',
'page302' => 'erreur302',
'page403' => 'erreur403',
'page404' => 'erreur404',
'legalPageId' => 'mentions-legales',
'searchPageId' => 'recherche',
'metaDescription' => 'Zwii est un CMS sans base de données qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.',
'title' => 'Votre site en quelques clics !'
],
]
]
];
}

View File

@ -317,8 +317,10 @@ class page extends common {
$this->setData(['page', $childrenPageId, 'parentPageId', $pageId]);
}
// Change l'id de page dans les données des modules
$this->setData(['module', $pageId, $this->getData(['module', $this->getUrl(2)])]);
$this->deleteData(['module', $this->getUrl(2)]);
if ($this->getData(['module', $this->getUrl(2)]) !== null ) {
$this->setData(['module', $pageId, $this->getData(['module', $this->getUrl(2)])]);
$this->deleteData(['module', $this->getUrl(2)]);
}
// Si la page correspond à la page d'accueil, change l'id dans la configuration du site
if($this->getData(['locale', 'homePageId']) === $this->getUrl(2)) {
$this->setData(['locale', 'homePageId', $pageId]);

View File

@ -533,31 +533,43 @@ class theme extends common {
* Réinitialisation de la personnalisation avancée
*/
public function reset() {
// Supprime le fichier de personnalisation avancée
$redirect ='';
switch ($this->getUrl(2)) {
case 'admin':
$this->initData('admin');
$redirect = helper::baseUrl() . 'theme/admin';
break;
case 'manage':
$this->initData('theme');
$redirect = helper::baseUrl() . 'theme/manage';
break;
case 'custom':
unlink(self::DATA_DIR.'custom.css');
$redirect = helper::baseUrl() . 'theme/advanced';
break;
default :
$redirect = helper::baseUrl() . 'theme';
}
// $url prend l'adresse sans le token
$url = explode('&',$this->getUrl(2));
// Valeurs en sortie
$this->addOutput([
'notification' => 'Réinitialisation effectuée',
'redirect' => $redirect,
'state' => true
]);
if ( isset($_GET['csrf'])
AND $_GET['csrf'] === $_SESSION['csrf']
) {
// Réinitialisation
$redirect ='';
switch ($url[0]) {
case 'admin':
$this->initData('admin');
$redirect = helper::baseUrl() . 'theme/admin';
break;
case 'manage':
$this->initData('theme');
$redirect = helper::baseUrl() . 'theme/manage';
break;
case 'custom':
unlink(self::DATA_DIR.'custom.css');
$redirect = helper::baseUrl() . 'theme/advanced';
break;
default :
$redirect = helper::baseUrl() . 'theme';
}
// Valeurs en sortie
$this->addOutput([
'notification' => 'Réinitialisation effectuée',
'redirect' => $redirect,
'state' => true
]);
} else {
// Valeurs en sortie
$this->addOutput([
'notification' => 'Jeton incorrect'
]);
}
}

View File

@ -16,7 +16,7 @@
<div class="col2 offset">
<?php echo template::button('configAdminReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'theme/reset/admin',
'href' => helper::baseUrl() . 'theme/reset/admin' . '&csrf=' . $_SESSION['csrf'],
'value' => 'Réinitialiser',
'ico' => 'cancel'
]); ?>

View File

@ -10,7 +10,7 @@
</div>
<div class="col2 offset6">
<?php echo template::button('themeAdvancedReset', [
'href' => helper::baseUrl() . 'theme/reset/custom',
'href' => helper::baseUrl() . 'theme/reset/custom' . '&csrf=' . $_SESSION['csrf'],
'class' => 'buttonRed',
'ico' => 'cancel',
'value' => 'Réinitialiser'

View File

@ -21,15 +21,25 @@ $(document).ready(function(){
* Aperçu en direct
*/
$("input, select").on("change", function() {
// Option fixe pour contain et cover
var themeBodyImageSize = $("#themeBodyImageSize").val();
if(themeBodyImageSize === "cover" ||
themeBodyImageSize === "contain" ) {
$("#themeBodyImageAttachment").val("fixed");
}
// Couleur du fond
var css = "body{background-color:" + $("#themeBodyBackgroundColor").val() + "}";
var css = "html{background-color:" + $("#themeBodyBackgroundColor").val() + "}";
// Image du fond
var themeBodyImage = $("#themeBodyImage").val();
if(themeBodyImage) {
css += "body{background-image:url('<?php echo helper::baseUrl(false); ?>site/file/source/" + themeBodyImage + "');background-repeat:" + $("#themeBodyImageRepeat").val() + ";background-position:" + $("#themeBodyImagePosition").val() + ";background-attachment:" + $("#themeBodyImageAttachment").val() + ";background-size:" + $("#themeBodyImageSize").val() + "}";
css += "html{background-image:url('<?php echo helper::baseUrl(false); ?>site/file/source/" + themeBodyImage + "');background-repeat:" + $("#themeBodyImageRepeat").val() + ";background-position:" + $("#themeBodyImagePosition").val() + ";background-attachment:" + $("#themeBodyImageAttachment").val() + ";background-size:" + $("#themeBodyImageSize").val() + "}";
css += "html{background-color:rgba(0,0,0,0);}";
}
else {
css += "body{background-image:none}";
css += "html{background-image:none}";
}
css += '#backToTop {background-color:' + $("#themeBodyToTopBackground").val() + ';color:' + $("#themeBodyToTopColor").val() + ';}';

View File

@ -11,7 +11,7 @@
<div class="col2 offset6">
<?php echo template::button('configManageReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'theme/reset/manage',
'href' => helper::baseUrl() . 'theme/reset/manage' . '&csrf=' . $_SESSION['csrf'],
'value' => 'Réinitialiser',
'ico' => 'cancel'
]); ?>

View File

@ -32,7 +32,7 @@ class form extends common {
public static $pagination;
const FORM_VERSION = '2.5';
const FORM_VERSION = '2.6';
// Objets
const TYPE_MAIL = 'mail';
@ -94,7 +94,7 @@ class form extends common {
$inputs = [];
foreach($this->getInput('formConfigPosition', null) as $index => $position) {
$inputs[] = [
'name' => $this->getInput('formConfigName[' . $index . ']'),
'name' => htmlspecialchars_decode($this->getInput('formConfigName[' . $index . ']'),ENT_QUOTES),
'position' => helper::filter($position, helper::FILTER_INT),
'required' => $this->getInput('formConfigRequired[' . $index . ']', helper::FILTER_BOOLEAN),
'type' => $this->getInput('formConfigType[' . $index . ']'),

View File

@ -1,14 +1,10 @@
<?php
class theme extends search {
public static $defaultData = [
'keywordColor' => 'rgba(229, 229, 1, 1)'
];
}
class data extends search {
class init extends search {
public static $defaultData = [
'previewLength' => 100,
'resultHideContent' => false,
'placeHolder' => 'Un ou plusieurs mots-clés séparés par un espace ou par +',
'submitText' => 'Rechercher'
'submitText' => 'Rechercher',
'keywordColor' => 'rgba(229, 229, 1, 1)'
];
}

View File

@ -1,11 +0,0 @@
.searchTitle {
font: caption;
font-style: italic;
margin-left: 1em;
}
.searchKeyword {
background: var(--keywordColor);
}
.searchResult {
margin: .3em 0 .3em 1em;
}

View File

@ -1,3 +0,0 @@
.searchKeyword {
--keywordColor: #keywordColor#;
}

View File

@ -38,37 +38,31 @@ class search extends common {
400 => '400 caractères',
];
// Message par défaut
public static $messagePlaceHolder = 'Un ou plusieurs mots-clés entre des espaces ou des guillemets';
public static $messageButtontext = 'Rechercher';
const SEARCH_VERSION = '1.1';
const SEARCH_VERSION = '1.2';
// Configuration vide
public function config() {
// Initialisation des données de thème de la galerie dasn theme.json
// Création des valeurs de réglage par défaut
if ( $this->getData(['module', $this->getUrl(0)]) === null ) {
require_once('module/search/ressource/defaultdata.php');
$this->setData(['module', $this->getUrl(0), init::$defaultData]);
}
if($this->isPost()) {
// Soumission du formulaire
$this->setData(['theme', 'search', [
'keywordColor' => $this->getInput('searchKeywordColor')
]]);
$this->setData(['module', $this->getUrl(0), [
'submitText' => $this->getInput('searchSubmitText'),
'placeHolder' => $this->getInput('searchPlaceHolder'),
'resultHideContent' => $this->getInput('searchResultHideContent',helper::FILTER_BOOLEAN),
'previewLength' => $this->getInput('searchPreviewLength',helper::FILTER_INT)
'previewLength' => $this->getInput('searchPreviewLength',helper::FILTER_INT),
'keywordColor' => $this->getInput('searchKeywordColor')
]]);
// Création des fichiers CSS
$content = file_get_contents('module/search/ressource/vartheme.css');
$themeCss = file_get_contents('module/search/ressource/theme.css');
// Injection des variables
$content = str_replace('#keywordColor#',$this->getinput('searchKeywordColor'),$content );
$success = file_put_contents('module/search/view/index/index.css',$content . $themeCss);
// Valeurs en sortie, affichage du formulaire
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(),
'notification' => $success !== FALSE ? 'Modifications enregistrées' : 'Modifications non enregistées !',
'notification' => $success !== FALSE ? 'Modifications enregistrées' : 'Modifications non enregistrées !',
'state' => $success !== FALSE
]);
@ -84,15 +78,11 @@ class search extends common {
}
public function index() {
// Création des valeurs de thème par défaut
if ( $this->getData(['theme', 'search']) === null ) {
require_once('module/search/ressource/defaultdata.php');
$this->setData(['theme', 'search', theme::$defaultData]);
}
// Création des valeurs de réglage par défaut
if ( $this->getData(['module', 'search']) === null ) {
if ( $this->getData(['module', $this->getUrl(0)]) === null ) {
require_once('module/search/ressource/defaultdata.php');
$this->setData(['module', $this->getUrl(0), data::$defaultData]);
$this->setData(['module', $this->getUrl(0), init::$defaultData]);
}
if($this->isPost()) {
@ -241,7 +231,7 @@ class search extends common {
// Découper l'aperçu
$t = substr($contenu, $d ,$this->getData(['module',$this->getUrl(0),'previewLength']));
// Applique une mise en évidence
$t = preg_replace($keywords, '<span class="searchKeyword">\1</span>',$t);
$t = preg_replace($keywords, '<span style="background:' . $this->getData(['module',$this->getUrl(0),'keywordColor']). ';">\1</span>',$t);
// Sauver résultat
$resultat .= '<p class="searchResult">'.$t.'...</p>';
$resultat .= '<p class="searchTitle">' . count($matches[0]) . (count($matches[0]) === 1 ? ' correspondance<p>' : ' correspondances<p>');

View File

@ -59,7 +59,7 @@
'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence, le placer tout à la gauche pour un surlignement invisible.',
'label' => 'Surlignement',
'value' => $this->getData(['theme', 'search', 'keywordColor'])
'value' => $this->getData(['module', $this->getUrl(0), 'keywordColor'])
]); ?>
</div>
</div>

View File

@ -1,14 +1,10 @@
.searchKeyword {
--keywordColor: rgba(229, 229, 1, 1);
}
.searchTitle {
font: caption;
font-style: italic;
margin-left: 1em;
}
.searchKeyword {
background: var(--keywordColor);
}
.searchResult {
margin: .3em 0 .3em 1em;
}

View File

@ -4,13 +4,13 @@
<div class="row">
<div class="col9 verticalAlignMiddle">
<?php echo template::text('searchMotphraseclef', [
'placeholder' => $this->getData(['module', $this->getUrl(0), 'placeHolder']) ? $this->getData(['module', $this->getUrl(0), 'placeHolder']) : $module::$messagePlaceHolder,
'placeholder' => $this->getData(['module', $this->getUrl(0), 'placeHolder']),
'value' => $module::$motclef
]); ?>
</div>
<div class="col3 verticalAlignMiddle">
<?php echo template::submit('pageEditSubmit', [
'value' => $this->getData(['module', $this->getUrl(0), 'submitText']) ? $this->getData(['module', $this->getUrl(0), 'submitText']) : $module::$messageButtontext
'value' => $this->getData(['module', $this->getUrl(0), 'submitText'])
]); ?>
</div>
</div>

View File

@ -1,5 +1,5 @@
# Bloque l'accès aux données
<FilesMatch ".(htaccess|json|log)$">
<Files ~ "\.(htaccess|json|log)$">
Order deny,allow
Deny from all
</FilesMatch>
</Files>