Merge branch '10400' into 10400-import

This commit is contained in:
fredtempez 2020-12-04 17:09:02 +01:00
commit a78db57ef5
9 changed files with 52 additions and 158 deletions

View File

@ -18,6 +18,13 @@
- Traduction automatique dans la langue du navigateur.
- Amélioration de la structure du flux RSS.
## Version 10.3.10
Corrections :
- Conflit page inactive et droit d'un membre.
- Module de recherche, correction dans les pages enfants.
Modification :
- TinyMCE nettoyage init.js d'options non supportées.
## Version 10.3.09
Corrections :
- Configuration : persistance de l'ouverture des blocs.

View File

@ -118,8 +118,7 @@ class template {
copy ('core/vendor/zwiico/png/'.$letters[$secondNumber] . '.png', 'site/tmp/' . $secondLetter . '.png');
// Début du wrapper
$html = '<div class="captcha" id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="captcha inputWrapper ' . $attributes['classWrapper'] . '">';
// Label
$html .= self::label($attributes['id'],
'<img src="' . helper::baseUrl(false) . 'site/tmp/' . $firstLetter . '.png" />&nbsp;<strong>' . $operator . '</strong>&nbsp;<img class="captchaNumber" src="' . helper::baseUrl(false) . 'site/tmp/' . $secondLetter . '.png" /> en chiffres ?', [

View File

@ -1927,6 +1927,17 @@ class core extends common {
$access = false;
}
}
// Empêcher l'accès aux page désactivée par URL directe
if ( ( $this->getData(['page', $this->getUrl(0),'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
) OR (
$this->getData(['page', $this->getUrl(0),'disable']) === true
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') < self::GROUP_MODERATOR
)
){
$access = false;
}
}
/**
@ -2554,12 +2565,17 @@ class layout extends common {
// Mise en page de l'item
$itemsLeft .= '<li>';
if ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') )
{$itemsLeft .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">';
if ( ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
) OR (
$this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') < self::GROUP_MODERATOR
)
){
$itemsLeft .= '<a class="' . $parentPageId . '" href="'. helper::baseUrl() . $this->getUrl(0).'">';
} else {
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>';
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>';
}
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
@ -2609,9 +2625,15 @@ class layout extends common {
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item
$itemsLeft .= '<li>';
if ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$itemsLeft .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">';
if ( ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
) OR (
$this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND $this->getUser('group') < self::GROUP_MODERATOR
)
){
$itemsLeft .= '<a class="' . $parentPageId . '" href="'.helper::baseUrl() . $this->getUrl(0).'">';
} else {
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . '>';
}

View File

@ -2,7 +2,5 @@
"tinymce.min.js",
"jquery.tinymce.min.js",
"init.js",
"init.css",
"plugins/codesample/js/prism.fr",
"plugins/codesample/css/prism.css"
"init.css"
]

View File

@ -104,9 +104,6 @@ tinymce.init({
images_dataimg_filter: function(img) {
return img.hasAttribute('internal-blob');
},*/
// Autorise tous les éléments
valid_elements :"*[*]",
valid_children : "*[*]",
// Autorise l'ajout de script
// extended_valid_elements: "script[language|type|src]",
// Bloque le dimensionnement des médias (car automatiquement en fullsize avec fitvids pour le responsive)

View File

@ -1,138 +0,0 @@
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #a67f59;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}

View File

@ -46,6 +46,13 @@
.blogContent {
display: none;
}
.blogPicture img {
width: 50% ;
display: block;
margin-left: auto;
margin-right: auto;
}
}
/*

View File

@ -32,7 +32,7 @@ class form extends common {
public static $pagination;
const FORM_VERSION = '2.4';
const FORM_VERSION = '2.5';
// Objets
const TYPE_MAIL = 'mail';
@ -87,7 +87,9 @@ class form extends common {
]
]);
// Génération des données vides
$this->setData(['module', $this->getUrl(0), 'data', []]);
if ($this->getData(['module', $this->getUrl(0), 'data']) === null) {
$this->setData(['module', $this->getUrl(0), 'data', []]);
}
// Génération des champs
$inputs = [];
foreach($this->getInput('formConfigPosition', null) as $index => $position) {

View File

@ -126,8 +126,8 @@ class search extends common {
foreach($childIds as $childId) {
// Sous page
if ($this->getData(['page', $childId, 'disable']) === false &&
$this->getUser('group') >= $this->getData(['page', $parentId, 'group']) &&
$this->getData(['page', $parentId, 'block']) !== 'bar') {
$this->getUser('group') >= $this->getData(['page', $childId, 'group']) &&
$this->getData(['page', $childId, 'block']) !== 'bar') {
$url = $childId;
$titre = $this->getData(['page', $childId, 'title']);
$contenu = ' ' . $titre . ' ' . $this->getData(['page', $childId, 'content']);