Merge branch '10400' into editeur

This commit is contained in:
Fred Tempez 2020-10-14 10:31:54 +02:00
commit 7048cc37f4
18 changed files with 125 additions and 81 deletions

View File

@ -16,6 +16,9 @@
## version 10.3.03
- Correction :
- Doublons de lignes.
- Modifications :
- Configuration des captcha. Addition simple chiffres de 0 à 9.
- Une icône remplace le terme Connexion dans le menu et dans le pied de page.
## version 10.3.02
- Corrections :

View File

@ -1454,7 +1454,7 @@ class common {
$articleIds = array_keys(helper::arrayCollumn($this->getData(['module',$parent]), 'publishedOn', 'SORT_DESC'));
foreach ($articleIds as $key => $article) {
// Droits les deux groupes
$this->setData(['module', $parent, $article,'editConsent','group']);
$this->setData(['module', $parent, $article,'editConsent', 3]);
// Limite de taille 500
$this->setData(['module', $parent, $article,'commentMaxlength', '500']);
// Pas d'approbation des commentaires
@ -1838,8 +1838,8 @@ class core extends common {
$accessInfo['pageId'] = '';
foreach($this->getData(['user']) as $userId => $userIds){
$t = explode('/',$this->getData(['user', $userId, 'accessUrl']));
if ( $this->getuser('id') &&
$userId !== $this->getuser('id') &&
if ( $this->getUser('id') &&
$userId !== $this->getUser('id') &&
$this->getData(['user', $userId,'accessUrl']) === $this->getUrl() &&
array_intersect($t,self::$accessList) &&
array_intersect($t,self::$accessExclude) !== false &&
@ -1852,8 +1852,8 @@ class core extends common {
}
// Accès concurrent stocke la page visitée
if ($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')) {
$this->setData(['user',$this->getuser('id'),'accessUrl',$this->getUrl()]);
$this->setData(['user',$this->getuser('id'),'accessTimer',time()]);
$this->setData(['user',$this->getUser('id'),'accessUrl',$this->getUrl()]);
$this->setData(['user',$this->getUser('id'),'accessTimer',time()]);
}
// Breadcrumb
$title = $this->getData(['page', $this->getUrl(0), 'title']);
@ -2295,9 +2295,9 @@ class layout extends common {
) {
$items .= '<span id="footerLoginLink" ' .
($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') .
'><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/login/' .
'><wbr>&nbsp;<a href="' . helper::baseUrl() . 'user/login/' .
strip_tags(str_replace('/', '_', $this->getUrl())) .
'" data-tippy-content="Connexion à l\'administration" rel="nofollow">Connexion</a></span>';
'" data-tippy-content="Connexion à l\'administration" rel="nofollow">' . template::ico('login') .'</a></span>';
}
// Affichage de la barre de membre simple
if ( $this->getUser('group') === self::GROUP_MEMBER
@ -2398,7 +2398,7 @@ class layout extends common {
*/
public function showMenu() {
// Met en forme les items du menu
$items = '';
$itemsLeft = '';
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
// Passer les entrées masquées
@ -2406,36 +2406,36 @@ class layout extends common {
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? 'active ' : '';
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page de l'item
$items .= '<li>';
$itemsLeft .= '<li>';
if ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') )
{$items .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">';
{$itemsLeft .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">';
} else {
$items .= '<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'])) {
case '' :
$items .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
break;
case 'text' :
$items .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
break;
case 'icon' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />';
} else {
$items .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
}
break;
case 'icontitle' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" data-tippy-content="';
$items .= $this->getData(['page', $parentPageId, 'title']).'"/>';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']).'"/>';
} else {
$items .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
}
break;
}
@ -2448,64 +2448,65 @@ class layout extends common {
}
if($childrenPageIds && $disableChild !== $totalChild &&
$this->getdata(['page',$parentPageId,'hideMenuChildren']) === false) {
$items .= template::ico('down', 'left');
$itemsLeft .= template::ico('down', 'left');
}
// ------------------------------------------------
$items .= '</a>';
$itemsLeft .= '</a>';
if ($this->getdata(['page',$parentPageId,'hideMenuChildren']) === true ||
empty($childrenPageIds)) {
continue;
}
$items .= '<ul class="navLevel2">';
$itemsLeft .= '<ul class="navLevel2">';
foreach($childrenPageIds as $childKey) {
// Propriétés de l'item
$active = ($childKey === $currentPageId) ? 'active ' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item
$items .= '<li>';
$itemsLeft .= '<li>';
if ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$items .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">';
$itemsLeft .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">';
} else {
$items .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . '>';
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . '>';
}
switch ($this->getData(['page', $childKey, 'typeMenu'])) {
case '' :
$items .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
break;
case 'text' :
$items .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
break;
case 'icon' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
} else {
$items .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
}
break;
case 'icontitle' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" data-tippy-content="';
$items .= $this->getData(['page', $childKey, 'title']).'"/>';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $childKey, 'title']).'"/>';
} else {
$items .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
}
break;
case 'icontext' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$items .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
} else {
$items .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
}
break;
}
$items .= '</a></li>';
$itemsLeft .= '</a></li>';
}
$items .= '</ul>';
$itemsLeft .= '</ul>';
}
// Lien de connexion
$itemsRight = '';
if(
(
$this->getData(['theme', 'menu', 'loginLink'])
@ -2513,11 +2514,11 @@ class layout extends common {
)
OR $this->getUrl(0) === 'theme'
) {
$items .= '<li id="menuLoginLink" ' .
$itemsRight .= '<li id="menuLoginLink" ' .
($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') .
'><a href="' . helper::baseUrl() . 'user/login/' .
strip_tags(str_replace('/', '_', $this->getUrl())) .
'">Connexion</a></li>';
'">' . template::ico('login') .'</a></li>';
}
// Commandes pour les membres simples
if($this->getUser('group') == self::GROUP_MEMBER
@ -2525,11 +2526,11 @@ class layout extends common {
|| $this->getData(['theme','footer','displayMemberBar']) === false
)
) {
$items .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Gérer mon compte">' . template::ico('user', 'right') . '</a></li>';
$items .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
$itemsRight .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Gérer mon compte">' . template::ico('user', 'right') . '</a></li>';
$itemsRight .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
}
// Retourne les items du menu
echo '<ul class="navLevel1">' . $items . '</ul>';
echo '<ul class="navLevel1" id="menuLeft">' . $itemsLeft . '</ul><ul class="navLevel1" id="menuRight">' . $itemsRight . '</ul>';
}
/**

View File

@ -521,6 +521,27 @@ nav a {
nav a:hover {
text-decoration: none;
}
nav #menuLeft {
display: flex;
float: left;
}
nav #menuRight {
display: flex;
float: right;
}
/* fin barre de menu */
nav::after {
content: " ";
clear: both;
display: flex;
}
nav::before {
content: " ";
clear: left;
display: flex;
}
@media (min-width: 768px) {
nav #menu {
display: block;

View File

@ -99,6 +99,12 @@
'checked' => $this->getData(['config', 'cookieConsent'])
]); ?>
</div>
<div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configConnectCaptcha10', true, 'Captcha simple', [
'checked' => $this->getData(['config', 'connect','captcha10']),
'help' => 'Addition limitée aux chiffres de 0 à 9. S\'applique à tous les captchas du site.'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
@ -396,11 +402,6 @@
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('configConnectCaptcha10', true, 'Limité à 10 chiffres', [
'checked' => $this->getData(['config', 'connect','captcha10'])
]); ?>
</div>
</div>
</div>
</div>

View File

@ -30,6 +30,7 @@
.zwiico-trash:before { content: '\e81c'; } /* '' */
.zwiico-plus-circled:before { content: '\e81d'; } /* '' */
.zwiico-minus-circled:before { content: '\e81e'; } /* '' */
.zwiico-login:before { content: '\e81f'; } /* '' */
.zwiico-down-big:before { content: '\e820'; } /* '' */
.zwiico-up-big:before { content: '\e821'; } /* '' */
.zwiico-spin:before { content: '\e831'; } /* '' */

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,7 @@
.zwiico-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81c;&nbsp;'); }
.zwiico-plus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81d;&nbsp;'); }
.zwiico-minus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81e;&nbsp;'); }
.zwiico-login { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81f;&nbsp;'); }
.zwiico-down-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe820;&nbsp;'); }
.zwiico-up-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe821;&nbsp;'); }
.zwiico-spin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }

View File

@ -41,6 +41,7 @@
.zwiico-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81c;&nbsp;'); }
.zwiico-plus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81d;&nbsp;'); }
.zwiico-minus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81e;&nbsp;'); }
.zwiico-login { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81f;&nbsp;'); }
.zwiico-down-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe820;&nbsp;'); }
.zwiico-up-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe821;&nbsp;'); }
.zwiico-spin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }

View File

@ -1,11 +1,11 @@
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.eot?40040077');
src: url('../font/zwiico.eot?40040077#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?40040077') format('woff2'),
url('../font/zwiico.woff?40040077') format('woff'),
url('../font/zwiico.ttf?40040077') format('truetype'),
url('../font/zwiico.svg?40040077#zwiico') format('svg');
src: url('../font/zwiico.eot?21777250');
src: url('../font/zwiico.eot?21777250#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?21777250') format('woff2'),
url('../font/zwiico.woff?21777250') format('woff'),
url('../font/zwiico.ttf?21777250') format('truetype'),
url('../font/zwiico.svg?21777250#zwiico') format('svg');
font-weight: normal;
font-style: normal;
}
@ -15,7 +15,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.svg?40040077#zwiico') format('svg');
src: url('../font/zwiico.svg?21777250#zwiico') format('svg');
}
}
*/
@ -86,6 +86,7 @@
.zwiico-trash:before { content: '\e81c'; } /* '' */
.zwiico-plus-circled:before { content: '\e81d'; } /* '' */
.zwiico-minus-circled:before { content: '\e81e'; } /* '' */
.zwiico-login:before { content: '\e81f'; } /* '' */
.zwiico-down-big:before { content: '\e820'; } /* '' */
.zwiico-up-big:before { content: '\e821'; } /* '' */
.zwiico-spin:before { content: '\e831'; } /* '' */

Binary file not shown.

View File

@ -68,6 +68,8 @@
<glyph glyph-name="minus-circled" unicode="&#xe81e;" d="M420 770q174 0 297-123t123-297-123-297-297-123-297 123-123 297 123 297 297 123z m252-368l-504 0 0-102 504 0 0 102z" horiz-adv-x="840" />
<glyph glyph-name="login" unicode="&#xe81f;" d="M661 350q0-14-11-25l-303-304q-11-10-26-10t-25 10-10 25v161h-250q-15 0-25 11t-11 25v214q0 15 11 25t25 11h250v161q0 14 10 25t25 10 26-10l303-304q11-10 11-25z m196 196v-392q0-67-47-114t-114-47h-178q-7 0-13 5t-5 13q0 2-1 11t0 15 2 13 5 11 12 3h178q37 0 64 27t26 63v392q0 37-26 64t-64 26h-174t-6 0-6 2-5 3-4 5-1 8q0 2-1 11t0 15 2 13 5 11 12 3h178q67 0 114-47t47-114z" horiz-adv-x="857.1" />
<glyph glyph-name="down-big" unicode="&#xe820;" d="M899 386q0-30-21-50l-363-364q-22-21-51-21-29 0-50 21l-363 364q-21 20-21 50 0 29 21 51l41 41q22 21 51 21 29 0 50-21l164-164v393q0 29 21 50t51 22h71q29 0 50-22t21-50v-393l165 164q20 21 50 21 29 0 51-21l41-41q21-22 21-51z" horiz-adv-x="928.6" />
<glyph glyph-name="up-big" unicode="&#xe821;" d="M899 308q0-28-21-50l-41-42q-22-21-51-21-30 0-50 21l-165 164v-393q0-29-20-47t-51-19h-71q-30 0-51 19t-21 47v393l-164-164q-20-21-50-21t-50 21l-42 42q-21 21-21 50 0 30 21 51l363 363q20 21 50 21 30 0 51-21l363-363q21-22 21-51z" horiz-adv-x="928.6" />

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -23,7 +23,7 @@ if(version_compare(PHP_VERSION, '5.6.0', '<')) {
/* Set locale to French */
date_default_timezone_set('Europe/Paris');
setlocale (LC_TIME, 'fr_FR.utf8','fra');
setlocale (LC_ALL, 'fr_FR.utf8','fra');
/**
* Initialisation de Zwii

View File

@ -78,7 +78,7 @@ class blog extends common {
// Permissions d'un article
public static $articleConsent = [
self::EDIT_GROUP => 'Groupe du propriétaire',
self::EDIT_OWNER => 'Propiétaire'
self::EDIT_OWNER => 'Propiétaire'
];
@ -118,7 +118,7 @@ class blog extends common {
'state' => $this->getInput('blogAddState', helper::FILTER_BOOLEAN),
'title' => $this->getInput('blogAddTitle', helper::FILTER_STRING_SHORT, true),
'userId' => $newuserid,
'editConsent' => $this->getInput('blogAddConsent'),
'editConsent' => $this->getInput('blogEditConsent') === self::EDIT_GROUP ? $this->getUser('group') : self::EDIT_OWNER,
'commentMaxlength' => $this->getInput('blogAddCommentMaxlength'),
'commentApproved' => $this->getInput('blogAddCommentApproved', helper::FILTER_BOOLEAN),
'commentClose' => $this->getInput('blogAddCommentClose', helper::FILTER_BOOLEAN),
@ -304,14 +304,18 @@ class blog extends common {
// Gestion des droits d'accès
$filterData=[];
foreach ($articleIds as $key => $value) {
$consent = $this->getData(['module', $this->getUrl(0), $value,'editConsent']);
if (
(
$consent === self::EDIT_OWNER
AND $this->getData(['module', $this->getUrl(0), $value,'userId']) === $this->getUser('id')
( // Propriétaire
(
$this->getData(['module', $this->getUrl(0), $value,'editConsent']) === self::EDIT_OWNER
AND $this->getData(['module', $this->getUrl(0), $value,'userId']) === $this->getUser('id')
) // Ou une autorité
OR $this->getUser('group') > $this->getData(['module',$this->getUrl(0), $value,'editConsent'])
) OR (
$consent === self::EDIT_GROUP
AND $this->getUser('group') >= $this->getData(['user',$this->getUser('group'),'group'])
// Groupe
$this->getData(['module', $this->getUrl(0), $this->getUrl(1),'editConsent']) !== self::EDIT_OWNER
AND $this->getUser('group') >= $this->getData(['module',$this->getUrl(0), $value,'editConsent'])
)
) {
$filterData[] = $value;
@ -456,8 +460,8 @@ class blog extends common {
'state' => $this->getInput('blogEditState', helper::FILTER_BOOLEAN),
'title' => $this->getInput('blogEditTitle', helper::FILTER_STRING_SHORT, true),
'userId' => $newuserid,
'editConsent' => $this->getInput('blogEditConsent'),
'commentMaxlength' => $this->getInput('blogEditCommentMaxength'),
'editConsent' => $this->getInput('blogEditConsent') === self::EDIT_GROUP ? $this->getUser('group') : self::EDIT_OWNER,
'commentMaxlength' => $this->getInput('blogEditCommentMaxlength'),
'commentApproved' => $this->getInput('blogEditCommentApproved', helper::FILTER_BOOLEAN),
'commentClose' => $this->getInput('blogEditCommentClose', helper::FILTER_BOOLEAN),
'commentNotification' => $this->getInput('blogEditCommentNotification', helper::FILTER_BOOLEAN),

View File

@ -7,17 +7,24 @@
à <?php echo strftime('%H:%M', $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'publishedOn'])); ?>
</div>
</div>
<?php if(
$this->getUser('group') >= self::GROUP_MODERATOR
AND $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
): ?>
<div class="col2">
<?php echo template::button('blogEdit', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'],
'value' => 'Editer'
]); ?>
</div>
<?php endif; ?>
<?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND
( // Propriétaire
(
$this->getData(['module', $this->getUrl(0), $this->getUrl(1),'editConsent']) === $module::EDIT_OWNER
AND $this->getData(['module', $this->getUrl(0), $this->getUrl(1),'userId']) === $this->getUser('id')
AND $this->getUser('group') >= self::GROUP_MODERATOR
)
) OR (
// Groupe
$this->getData(['module', $this->getUrl(0), $this->getUrl(1),'editConsent']) !== $module::EDIT_OWNER
AND $this->getUser('group') >= $this->getData(['module',$this->getUrl(0), $this->getUrl(1),'editConsent'])
)
): ?>
<?php endif; ?>
</div>
</div>
<?php $pictureSize = $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'pictureSize']) === null ? '100' : $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'pictureSize']); ?>
<?php if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'hidePicture']) == false) {

View File

@ -115,7 +115,7 @@
</div>
<div class="col4 commentOptionsWrapper ">
<?php echo template::checkbox('blogEditCommentApprove', true, 'Approbation par un modérateur', [
'checked' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'commentApprove']),
'checked' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'commentApproved']),
''
]); ?>
</div>