diff --git a/module/blog/blog.php b/module/blog/blog.php
index 16b23981..c957412f 100755
--- a/module/blog/blog.php
+++ b/module/blog/blog.php
@@ -27,15 +27,15 @@ class blog extends common
const EDIT_ALL = 'all';
public static $actions = [
- 'add' => self::GROUP_MODERATOR,
- 'comment' => self::GROUP_MODERATOR,
- 'commentApprove' => self::GROUP_MODERATOR,
- 'commentDelete' => self::GROUP_MODERATOR,
- 'commentDeleteAll' => self::GROUP_MODERATOR,
- 'config' => self::GROUP_MODERATOR,
- 'option' => self::GROUP_MODERATOR,
- 'delete' => self::GROUP_MODERATOR,
- 'edit' => self::GROUP_MODERATOR,
+ 'add' => self::GROUP_EDITOR,
+ 'comment' => self::GROUP_EDITOR,
+ 'commentApprove' => self::GROUP_EDITOR,
+ 'commentDelete' => self::GROUP_EDITOR,
+ 'commentDeleteAll' => self::GROUP_EDITOR,
+ 'config' => self::GROUP_EDITOR,
+ 'option' => self::GROUP_EDITOR,
+ 'delete' => self::GROUP_EDITOR,
+ 'edit' => self::GROUP_EDITOR,
'index' => self::GROUP_VISITOR,
'rss' => self::GROUP_VISITOR
];
@@ -697,7 +697,7 @@ class blog extends common
ksort(self::$users);
foreach (self::$users as $userId => &$userFirstname) {
// Les membres ne sont pas éditeurs, les exclure de la liste
- if ($this->getData(['user', $userId, 'group']) < self::GROUP_MODERATOR) {
+ if ($this->getData(['user', $userId, 'group']) < self::GROUP_EDITOR) {
unset(self::$users[$userId]);
}
$userFirstname = $userFirstname . ' ' . $this->getData(['user', $userId, 'lastname']) . ' (' . self::$groupEdits[$this->getData(['user', $userId, 'group'])] . ')';
@@ -904,24 +904,21 @@ class blog extends common
*/
public function signature($userId)
{
- if ($this->getUser('permission', __CLASS__, __FUNCTION__) !== true) {
- switch ($this->getData(['user', $userId, 'signature'])) {
- case 1:
- return $userId;
- break;
- case 2:
- return $this->getData(['user', $userId, 'pseudo']);
- break;
- case 3:
- return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
- break;
- case 4:
- return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
- break;
- default:
- return $this->getData(['user', $userId, 'firstname']);
- }
+ switch ($this->getData(['user', $userId, 'signature'])) {
+ case 1:
+ return $userId;
+ break;
+ case 2:
+ return $this->getData(['user', $userId, 'pseudo']);
+ break;
+ case 3:
+ return $this->getData(['user', $userId, 'firstname']) . ' ' . $this->getData(['user', $userId, 'lastname']);
+ break;
+ case 4:
+ return $this->getData(['user', $userId, 'lastname']) . ' ' . $this->getData(['user', $userId, 'firstname']);
+ break;
+ default:
+ return $this->getData(['user', $userId, 'firstname']);
}
-
}
}
\ No newline at end of file
diff --git a/module/blog/enum.json b/module/blog/enum.json
index 7720ddcb..09ca60b1 100644
--- a/module/blog/enum.json
+++ b/module/blog/enum.json
@@ -1 +1 @@
-{"name":"blog","realName":"Blog","version":"6.8","update":"0.0","delete":true,"dataDirectory":""}
\ No newline at end of file
+{"name":"blog","realName":"Blog","version":"6.9","update":"0.0","delete":true,"dataDirectory":""}
\ No newline at end of file
diff --git a/module/blog/view/article/article.php b/module/blog/view/article/article.php
index fb3f83be..48dd1df6 100755
--- a/module/blog/view/article/article.php
+++ b/module/blog/view/article/article.php
@@ -29,7 +29,7 @@
or (
// Groupe
($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_ADMIN
- or $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_MODERATOR)
+ or $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent']) === self::GROUP_EDITOR)
and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'editConsent'])
)
or (
diff --git a/module/blog/view/index/index.php b/module/blog/view/index/index.php
index afedc745..0f608e10 100755
--- a/module/blog/view/index/index.php
+++ b/module/blog/view/index/index.php
@@ -62,7 +62,7 @@
or (
// Groupe
($this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === self::GROUP_ADMIN
- or $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === self::GROUP_MODERATOR)
+ or $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent']) === self::GROUP_EDITOR)
and $this->getUser('group') >= $this->getData(['module', $this->getUrl(0), 'posts', $articleId, 'editConsent'])
)
or (
diff --git a/module/form/changes.md b/module/form/changes.md
index 91770236..3a42994b 100644
--- a/module/form/changes.md
+++ b/module/form/changes.md
@@ -1,6 +1,7 @@
# Version 3.10
- Bloque l'effacement selon le profil
- Masque le code de vérification
+- Export des données en CSV impossible
# Version 3.9
- Redirection des pages orphelines
# Version 3.8
diff --git a/module/form/enum.json b/module/form/enum.json
index 6a438a67..7f3bfc11 100644
--- a/module/form/enum.json
+++ b/module/form/enum.json
@@ -1 +1 @@
-{"name":"form","realName":"Formulaire","version":"3.9","update":"0.0","delete":true,"dataDirectory":""}
\ No newline at end of file
+{"name":"form","realName":"Formulaire","version":"3.10","update":"0.0","delete":true,"dataDirectory":""}
\ No newline at end of file
diff --git a/module/form/form.php b/module/form/form.php
index a3696501..66acf8dd 100644
--- a/module/form/form.php
+++ b/module/form/form.php
@@ -22,13 +22,13 @@ class form extends common
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)
public static $actions = [
- 'config' => self::GROUP_MODERATOR,
- 'option' => self::GROUP_MODERATOR,
- 'data' => self::GROUP_MODERATOR,
- 'delete' => self::GROUP_MODERATOR,
- 'deleteall' => self::GROUP_MODERATOR,
+ 'config' => self::GROUP_EDITOR,
+ 'option' => self::GROUP_EDITOR,
+ 'data' => self::GROUP_EDITOR,
+ 'delete' => self::GROUP_EDITOR,
+ 'deleteall' => self::GROUP_EDITOR,
'index' => self::GROUP_VISITOR,
- 'export2csv' => self::GROUP_MODERATOR,
+ 'export2csv' => self::GROUP_EDITOR,
];
public static $data = [];
@@ -235,7 +235,7 @@ class form extends common
{
$data = $this->getData(['module', $this->getUrl(0), 'data']);
if (
- $this->getUser('permission', __CLASS__, __FUNCTION__) !== true &&
+ $this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$data
) {
// Pagination
@@ -297,7 +297,7 @@ class form extends common
fclose($fp);
// Valeurs en sortie
$this->addOutput([
- 'notification' => sprintf(helper::translate('Export CSV effectué dans %1 '), $csvfilename),
+ 'notification' => sprintf(helper::translate('Export CSV effectué dans %s '), $csvfilename ),
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/data',
'state' => true
]);
diff --git a/module/gallery/enum.json b/module/gallery/enum.json
index 2bc512f9..4d3e43e3 100644
--- a/module/gallery/enum.json
+++ b/module/gallery/enum.json
@@ -1 +1 @@
-{"name":"gallery","realName":"Galerie","version":"3.8","update":"0.0","delete":true,"dataDirectory":"site\/data\/gallery\/"}
\ No newline at end of file
+{"name":"gallery","realName":"Galerie","version":"3.9","update":"0.0","delete":true,"dataDirectory":"site\/data\/gallery\/"}
\ No newline at end of file
diff --git a/module/gallery/gallery.php b/module/gallery/gallery.php
index ebac4dd7..8d87d5b9 100644
--- a/module/gallery/gallery.php
+++ b/module/gallery/gallery.php
@@ -44,15 +44,15 @@ class gallery extends common
public static $config = [];
public static $actions = [
- 'config' => self::GROUP_MODERATOR,
- 'delete' => self::GROUP_MODERATOR,
- 'dirs' => self::GROUP_MODERATOR,
- 'sortGalleries' => self::GROUP_MODERATOR,
- 'sortPictures' => self::GROUP_MODERATOR,
- 'edit' => self::GROUP_MODERATOR,
- 'add' => self::GROUP_MODERATOR,
- 'theme' => self::GROUP_MODERATOR,
- 'option' => self::GROUP_MODERATOR,
+ 'config' => self::GROUP_EDITOR,
+ 'delete' => self::GROUP_EDITOR,
+ 'dirs' => self::GROUP_EDITOR,
+ 'sortGalleries' => self::GROUP_EDITOR,
+ 'sortPictures' => self::GROUP_EDITOR,
+ 'edit' => self::GROUP_EDITOR,
+ 'add' => self::GROUP_EDITOR,
+ 'theme' => self::GROUP_EDITOR,
+ 'option' => self::GROUP_EDITOR,
'index' => self::GROUP_VISITOR
];
diff --git a/module/news/enum.json b/module/news/enum.json
index 30c0fe1b..5ec740c8 100644
--- a/module/news/enum.json
+++ b/module/news/enum.json
@@ -1 +1 @@
-{"name":"news","realName":"News","version":"4.3","update":"0.0","delete":true,"dataDirectory":"site\/data\/news\/"}
\ No newline at end of file
+{"name":"news","realName":"News","version":"4.4","update":"0.0","delete":true,"dataDirectory":"site\/data\/news\/"}
\ No newline at end of file
diff --git a/module/news/news.php b/module/news/news.php
index b131cf74..bf2ef0ec 100644
--- a/module/news/news.php
+++ b/module/news/news.php
@@ -21,13 +21,13 @@ class news extends common
const DATADIRECTORY = self::DATA_DIR . 'news/';
public static $actions = [
- 'add' => self::GROUP_MODERATOR,
- 'config' => self::GROUP_MODERATOR,
+ 'add' => self::GROUP_EDITOR,
+ 'config' => self::GROUP_EDITOR,
// Edition des news
- 'option' => self::GROUP_MODERATOR,
+ 'option' => self::GROUP_EDITOR,
// paramétrage des news
- 'delete' => self::GROUP_MODERATOR,
- 'edit' => self::GROUP_MODERATOR,
+ 'delete' => self::GROUP_EDITOR,
+ 'edit' => self::GROUP_EDITOR,
'index' => self::GROUP_VISITOR,
'rss' => self::GROUP_VISITOR
];
diff --git a/module/redirection/redirection.php b/module/redirection/redirection.php
index c974fdc3..1f3fdf05 100644
--- a/module/redirection/redirection.php
+++ b/module/redirection/redirection.php
@@ -21,7 +21,7 @@ class redirection extends common
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)
public static $actions = [
- 'config' => self::GROUP_MODERATOR,
+ 'config' => self::GROUP_EDITOR,
'index' => self::GROUP_VISITOR
];
@@ -60,7 +60,7 @@ class redirection extends common
if (
$this->getUser('permission', __CLASS__, __FUNCTION__) !== true
&& $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
- && $this->getUser('group') >= self::GROUP_MODERATOR
+ && $this->getUser('group') >= self::GROUP_EDITOR
&& $this->getUrl(1) !== 'force'
) {
// Valeurs en sortie
diff --git a/module/search/search.php b/module/search/search.php
index 17fb043b..12a38747 100644
--- a/module/search/search.php
+++ b/module/search/search.php
@@ -26,7 +26,7 @@ class search extends common
public static $actions = [
'index' => self::GROUP_VISITOR,
- 'config' => self::GROUP_MODERATOR
+ 'config' => self::GROUP_EDITOR
];
// Variables pour l'affichage des résultats
@@ -177,7 +177,6 @@ class search extends common
$this->update();
if (
- $this->getUser('permission', __CLASS__, __FUNCTION__) === true &&
$this->isPost()
) {
//Initialisations variables