diff --git a/CHANGES.md b/CHANGES.md
index 85773ce..b431608 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,8 @@
# Changelog
+## Version 4.4.01 de Deltacms
+- Modifications :
+
## Version 4.3.08 de Deltacms
- Modifications :
- Captcha : nouvelle option 'Captcha simple pour les humains', le Captcha se réduit à une simple case à cocher, une analyse comportementale
diff --git a/README.md b/README.md
index bea3e4f..9c5eaee 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-# DeltaCMS 4.3.08
+# DeltaCMS 4.4.01
DeltaCMS est un CMS sans base de données (flat-file) qui permet de créer et gérer facilement un site web sans aucune connaissance en programmation.
L'administration du site est bilingue anglais ou français, le site peut être rédigé dans une des principales langues européennes.
diff --git a/core/core.js.php b/core/core.js.php
index b18e680..0426fb1 100644
--- a/core/core.js.php
+++ b/core/core.js.php
@@ -547,6 +547,6 @@ $(document).ready(function(){
dataType: "html"
});
});
- });
+ });
});
diff --git a/core/core.php b/core/core.php
index 665a193..4bdcba9 100644
--- a/core/core.php
+++ b/core/core.php
@@ -27,8 +27,9 @@ class common {
const GROUP_BANNED = -1;
const GROUP_VISITOR = 0;
const GROUP_MEMBER = 1;
- const GROUP_MODERATOR = 2;
- const GROUP_ADMIN = 3;
+ const GROUP_EDITOR = 2;
+ const GROUP_MODERATOR = 3;
+ const GROUP_ADMIN = 4;
const SIGNATURE_ID = 1;
const SIGNATURE_PSEUDO = 2;
const SIGNATURE_FIRSTLASTNAME = 3;
@@ -48,7 +49,7 @@ class common {
// Numéro de version
const DELTA_UPDATE_URL = 'https://update.deltacms.fr/master/';
- const DELTA_VERSION = '4.3.08';
+ const DELTA_VERSION = '4.4.01';
const DELTA_UPDATE_CHANNEL = "v4";
public static $actions = [];
@@ -1624,7 +1625,7 @@ class common {
) OR (
$this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD')
- AND $this->getUser('group') < self::GROUP_MODERATOR
+ AND $this->getUser('group') < self::GROUP_EDITOR
)
){
$pageUrl = ($this->getData(['locale', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
@@ -1714,7 +1715,7 @@ class common {
) OR (
$this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD')
- AND $this->getUser('group') < self::GROUP_MODERATOR
+ AND $this->getUser('group') < self::GROUP_EDITOR
)
){
$pageUrl = ($this->getData(['locale', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
@@ -1954,7 +1955,7 @@ class common {
if($this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD')) {
// Items de gauche
$leftItems = '';
- if($this->getUser('group') >= self::GROUP_MODERATOR) {
+ if($this->getUser('group') >= self::GROUP_EDITOR) {
$leftItems .= '
';
$leftItems .= ''.$text['core']['showBar'][0].' ';
$leftItems .= '';
@@ -2003,7 +2004,7 @@ class common {
}
$leftItems .= ' ';
$leftItems .= ' ';
- $leftItems .= ' ';
+ if($this->getUser('group') >= self::GROUP_MODERATOR) $leftItems .= ' ';
if(
// Sur un module de page qui autorise le bouton de modification de la page
$this->output['showBarEditButton']
@@ -2016,13 +2017,15 @@ class common {
if ($this->getData(['page', $this->getUrl(0),'moduleId'])) {
$leftItems .= '' . template::ico('gear') . ' ';
}
- $leftItems .= '' . template::ico('clone') . ' ';
- $leftItems .= '' . template::ico('trash') . ' ';
+ if($this->getUser('group') >= self::GROUP_MODERATOR) {
+ $leftItems .= '' . template::ico('clone') . ' ';
+ $leftItems .= '' . template::ico('trash') . ' ';
+ }
}
}
// Items de droite
$rightItems = '';
- if($this->getUser('group') >= self::GROUP_MODERATOR) {
+ if($this->getUser('group') >= self::GROUP_EDITOR) {
$rightItems .= '' . template::ico('folder') . ' ';
}
if($this->getUser('group') >= self::GROUP_ADMIN) {
@@ -2049,7 +2052,7 @@ class common {
$rightItems .= '' . template::ico('update colorRed') . ' ';
}
}
- if($this->getUser('group') >= self::GROUP_MODERATOR) {
+ if($this->getUser('group') >= self::GROUP_EDITOR) {
$rightItems .= '' . template::ico('user', 'right') . '' . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . ' ';
}
$rightItems .= '' . template::ico('logout') . ' ';
@@ -2101,7 +2104,7 @@ class common {
$vars .= 'var baseUrlQs = ' . json_encode(helper::baseUrl()) . ';';
if(
$this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD')
- AND $this->getUser('group') >= self::GROUP_MODERATOR
+ AND $this->getUser('group') >= self::GROUP_EDITOR
) {
$vars .= 'var privateKey = ' . json_encode(md5_file(self::DATA_DIR.'core.json')) . ';';
}
@@ -2363,10 +2366,10 @@ class core extends common {
$css .= '.block h4 {background-color:'. $colors['normal'] . ';color:' . $colors['text'] .';border-radius: ' . $this->getdata(['theme','block','blockBorderRadius']) . ' ' . $this->getdata(['theme','block','blockBorderRadius']) . ' 0px 0px;}';
$css .= '.block p {margin: 0px -5px;}';
//$css .= '.mce-tinymce {border: 1px solid ' . $this->getdata(['theme','block','borderColor']) .' !important;}';
-
+
//Tinymce option titre sous une image valeurs par défaut modifiables dans custom.css
$css .= 'figure.image { border-color: ' . $this->getdata(['theme','block','borderColor']) . '; background-color: ' . $this->getdata(['theme','block','backgroundColor']).'}';
-
+
// Bannière
// Eléments communs
@@ -2659,7 +2662,7 @@ class core extends common {
) OR (
$this->getData(['page', $this->getUrl(0),'disable']) === true
AND $this->getUser('password') === $this->getInput('DELTA_USER_PASSWORD')
- AND $this->getUser('group') < self::GROUP_MODERATOR
+ AND $this->getUser('group') < self::GROUP_EDITOR
)
){
$access = false;
@@ -2963,19 +2966,23 @@ class core extends common {
}
// Erreurs
+ // Lexique
+ include('./core/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_core.php');
+
if($access === 'login') {
http_response_code(302);
header('Location:' . helper::baseUrl() . 'user/login/');
exit();
}
- if($access === false) {
- http_response_code(403);
+ if($access === false) {
if ($accessInfo['userName']) {
+ http_response_code(409);
$this->addOutput([
- 'title' => 'Accès verrouillé',
- 'content' => template::speech('La page ' . $accessInfo['pageId'] . ' est ouverte par l\'utilisateur ' . $accessInfo['userName'] . ' ')
+ 'title' => $text['core']['router'][0],
+ 'content' => template::speech( $text['core']['router'][1] . '' . $accessInfo['pageId'] . ' '. $text['core']['router'][2] .'' . $accessInfo['userName'] . ' ')
]);
} else {
+ http_response_code(403);
$_SESSION['humanBot'] = 'bot';
if ( $this->getData(['locale','page403']) !== 'none'
AND $this->getData(['page',$this->getData(['locale','page403'])]))
@@ -2983,8 +2990,8 @@ class core extends common {
header('Location:' . helper::baseUrl() . $this->getData(['locale','page403']));
} else {
$this->addOutput([
- 'title' => 'Accès interdit',
- 'content' => template::speech('Vous n\'êtes pas autorisé à consulter cette page (erreur 403)')
+ 'title' => $text['core']['router'][3],
+ 'content' => template::speech( $text['core']['router'][4] )
]);
}
}
@@ -2997,8 +3004,8 @@ class core extends common {
header('Location:' . helper::baseUrl() . $this->getData(['locale','page404']));
} else {
$this->addOutput([
- 'title' => 'Page indisponible',
- 'content' => template::speech('Oups ! La page demandée n\'existe pas ou est introuvable (erreur 404)')
+ 'title' => $text['core']['router'][5],
+ 'content' => template::speech( $text['core']['router'][6] )
]);
}
}
diff --git a/core/include/update.inc.php b/core/include/update.inc.php
index 8ff7fab..c788f60 100644
--- a/core/include/update.inc.php
+++ b/core/include/update.inc.php
@@ -68,7 +68,7 @@ if ($this->getData(['core', 'dataVersion']) < 4307) {
}
if ($this->getData(['core', 'dataVersion']) < 4308) {
- $this->setData(['config', 'connect', 'captchaBot', false]);
+ $this->setData(['config', 'connect', 'captchaBot', true]);
$this->setData(['locale', 'captchaSimpleText', 'Je ne suis pas un robot' ]);
$this->setData(['locale', 'captchaSimpleHelp', 'Cochez cette case pour prouver que vous n\'êtes pas un robot' ]);
$this->deleteData([ 'config', 'connect', 'captchaStrong' ]);
@@ -76,4 +76,15 @@ if ($this->getData(['core', 'dataVersion']) < 4308) {
// Mise à jour
$this->setData(['core', 'dataVersion', 4308]);
}
+
+if ($this->getData(['core', 'dataVersion']) < 4401) {
+ $userIdsFirstnames = helper::arrayCollumn($this->getData(['user']), 'firstname');
+ foreach($userIdsFirstnames as $userId => $userFirstname) {
+ if ($this->getData(['user', $userId, 'group']) >= 2) {
+ $this->setData(['user', $userId, 'group', $this->getData(['user', $userId, 'group']) +1 ]);
+ }
+ }
+ // Mise à jour
+ $this->setData(['core', 'dataVersion', 4401]);
+}
?>
diff --git a/core/lang/en/lex_core.php b/core/lang/en/lex_core.php
index f74e87f..ca35749 100644
--- a/core/lang/en/lex_core.php
+++ b/core/lang/en/lex_core.php
@@ -24,6 +24,13 @@ $text['core']['showBar'][14] = 'Setting up users';
$text['core']['showBar'][15] = 'Updating DeltaCMS ';
$text['core']['showBar'][16] = 'Set up my account';
$text['core']['showBar'][17] = 'Logout';
+$text['core']['router'][0] = 'Access locked';
+$text['core']['router'][1] = 'The page ';
+$text['core']['router'][2] = ' is opened by the user ';
+$text['core']['router'][3] = 'Access denied';
+$text['core']['router'][4] = 'You are not authorised to view this page (error 403)';
+$text['core']['router'][5] = 'Page unavailable';
+$text['core']['router'][6] = 'Oops! The requested page does not exist or cannot be found (error 404)';
// core.js.php
diff --git a/core/lang/fr/lex_core.php b/core/lang/fr/lex_core.php
index a6d0cdc..b46f96d 100644
--- a/core/lang/fr/lex_core.php
+++ b/core/lang/fr/lex_core.php
@@ -24,7 +24,13 @@ $text['core']['showBar'][14] = 'Configurer les utilisateurs';
$text['core']['showBar'][15] = 'Mettre à jour DeltaCMS ';
$text['core']['showBar'][16] = 'Configurer mon compte';
$text['core']['showBar'][17] = 'Me déconnecter';
-
+$text['core']['router'][0] = 'Accès verrouillé';
+$text['core']['router'][1] = 'La page ';
+$text['core']['router'][2] = ' est ouverte par l\'utilisateur ';
+$text['core']['router'][3] = 'Accès interdit';
+$text['core']['router'][4] = 'Vous n\'êtes pas autorisé à consulter cette page (erreur 403)';
+$text['core']['router'][5] = 'Page indisponible';
+$text['core']['router'][6] = 'Oups ! La page demandée n\'existe pas ou est introuvable (erreur 404)';
// core.js.php
$text['core_js'][0] = "Effectuer la mise à jour ?";
diff --git a/core/layout/common.css b/core/layout/common.css
index df3d1ad..16cf560 100644
--- a/core/layout/common.css
+++ b/core/layout/common.css
@@ -1772,12 +1772,18 @@ th.col12 {
}
}
+/* Option image avec titre dans tinymce */
figure.image {
display: inline-block;
border: 1px solid;
margin: 0 6px;
}
+figure.align-center {
+ display: table;
+ margin:auto;
+}
+
figure.align-left {
float: left;
}
diff --git a/core/layout/light.php b/core/layout/light.php
index ff10cd8..8ddad4b 100644
--- a/core/layout/light.php
+++ b/core/layout/light.php
@@ -14,8 +14,8 @@
?>
-
-
+
+
showNotification(); ?>
@@ -24,4 +24,4 @@
showScript(); ?>
-