message action interdite
This commit is contained in:
parent
119063342b
commit
1aaf68b3d6
@ -79,7 +79,7 @@ class page extends common
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} // Jeton incorrect
|
||||
} // Action interdite
|
||||
elseif ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -187,7 +187,7 @@ class page extends common
|
||||
$this->addOutput([
|
||||
'access' => false
|
||||
]);
|
||||
} // Jeton incorrect
|
||||
} // Action interdite
|
||||
elseif ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
@ -62,8 +62,8 @@ class plugin extends common
|
||||
public function delete()
|
||||
{
|
||||
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
@ -291,8 +291,8 @@ class plugin extends common
|
||||
*/
|
||||
public function uploadItem()
|
||||
{
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'store',
|
||||
@ -383,7 +383,7 @@ class plugin extends common
|
||||
implode(' - ', $pageInfos),
|
||||
template::button('moduleExport' . $key, [
|
||||
'class' => $class,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/uploadItem/' . $key ,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/uploadItem/' . $key,
|
||||
'value' => $ico,
|
||||
'help' => $help
|
||||
])
|
||||
@ -454,7 +454,6 @@ class plugin extends common
|
||||
$pagesInfos[$keyi18n][$key]['moduleId'] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Recherche des modules orphelins dans toutes les langues
|
||||
@ -482,7 +481,7 @@ class plugin extends common
|
||||
$infoModules[$key]['delete'] === true
|
||||
? template::button('moduleDelete' . $key, [
|
||||
'class' => 'moduleDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $key ,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $key,
|
||||
'value' => template::ico('trash'),
|
||||
'help' => 'Supprimer le module'
|
||||
])
|
||||
@ -503,12 +502,12 @@ class plugin extends common
|
||||
$infoModules[$key]['version'],
|
||||
'',
|
||||
template::button('moduleSave' . $key, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/save/filemanager/' . $key ,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/save/filemanager/' . $key,
|
||||
'value' => template::ico('download-cloud'),
|
||||
'help' => 'Sauvegarder le module dans le gestionnaire de fichiers'
|
||||
]),
|
||||
template::button('moduleDownload' . $key, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/save/download/' . $key ,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/save/download/' . $key,
|
||||
'value' => template::ico('download'),
|
||||
'help' => 'Sauvegarder et télécharger le module'
|
||||
])
|
||||
@ -534,19 +533,19 @@ class plugin extends common
|
||||
$infoModules[$pagesInfos[$keyi18n][$keyPage]['moduleId']]['version'],
|
||||
template::flag($keyi18n, '20px') . ' <a href ="' . helper::baseUrl() . $keyPage . '" target="_blank">' . $pagesInfos[$keyi18n][$keyPage]['title'] . ' (' . $keyPage . ')</a>',
|
||||
template::button('dataExport' . $keyPage, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage ,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/filemanager/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('download-cloud'),
|
||||
'help' => 'Sauvegarder les données du module dans le gestionnaire de fichiers'
|
||||
]),
|
||||
template::button('dataExport' . $keyPage, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage ,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataExport/download/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('download'),
|
||||
'help' => 'Sauvegarder et télécharger les données du module'
|
||||
]),
|
||||
template::button('dataDelete' . $keyPage, [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage ,
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/dataDelete/' . self::$i18nContent . '/' . $pagesInfos[$keyi18n][$keyPage]['moduleId'] . '/' . $keyPage,
|
||||
// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('trash'),
|
||||
'class' => 'buttonRed dataDelete',
|
||||
@ -572,8 +571,8 @@ class plugin extends common
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(4) !== $_SESSION['csrf']) {
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
@ -646,8 +645,8 @@ class plugin extends common
|
||||
*/
|
||||
public function dataDelete()
|
||||
{
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(5) !== $_SESSION['csrf']) {
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
@ -677,8 +676,8 @@ class plugin extends common
|
||||
*/
|
||||
public function dataExport()
|
||||
{
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(6) !== $_SESSION['csrf']) {
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
@ -818,8 +817,8 @@ class plugin extends common
|
||||
}
|
||||
// Bouton d'importation des données d'un module spécifique
|
||||
if (count(explode('/', $this->getUrl())) === 6) {
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'plugin',
|
||||
|
@ -796,7 +796,7 @@ class theme extends common
|
||||
*/
|
||||
public function fontDelete()
|
||||
{
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
@ -67,7 +67,7 @@ class translate extends common
|
||||
public function update()
|
||||
{
|
||||
$lang = $this->getUrl(2);
|
||||
// Jeton incorrect ou URl avec le code langue incorrecte
|
||||
// Action interdite ou URl avec le code langue incorrecte
|
||||
if (
|
||||
array_key_exists($lang, self::$languages) === false
|
||||
) {
|
||||
@ -364,7 +364,7 @@ class translate extends common
|
||||
*/
|
||||
public function locale()
|
||||
{
|
||||
// Jeton incorrect ou URl avec le code langue incorrecte
|
||||
// Action interdite ou URl avec le code langue incorrecte
|
||||
$lang = $this->getUrl(2);
|
||||
if (
|
||||
array_key_exists($lang, self::$languages) === false
|
||||
@ -469,7 +469,7 @@ class translate extends common
|
||||
public function edit()
|
||||
{
|
||||
$lang = $this->getUrl(2);
|
||||
// Jeton incorrect ou URl avec le code langue incorrecte
|
||||
// Action interdite ou URl avec le code langue incorrecte
|
||||
if (
|
||||
array_key_exists($lang, self::$languages) === false
|
||||
) {
|
||||
@ -558,7 +558,7 @@ class translate extends common
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
// Jeton incorrect ou URl avec le code langue incorrecte
|
||||
// Action interdite ou URl avec le code langue incorrecte
|
||||
$target = $this->getUrl(2);
|
||||
$lang = $this->getUrl(3);
|
||||
if (
|
||||
@ -613,7 +613,7 @@ class translate extends common
|
||||
*/
|
||||
public function default()
|
||||
{
|
||||
// Jeton incorrect ou URl avec le code langue incorrecte
|
||||
// Action interdite ou URl avec le code langue incorrecte
|
||||
$lang = $this->getUrl(2);
|
||||
if (
|
||||
array_key_exists($lang, self::$languages) === false
|
||||
|
@ -156,14 +156,14 @@ class user extends common
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
elseif (
|
||||
$this->checkCSRF()
|
||||
) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'user',
|
||||
'notification' => helper::translate('Jeton incorrect')
|
||||
'notification' => helper::translate('Action interdite')
|
||||
]);
|
||||
}
|
||||
// Bloque la suppression de son propre compte
|
||||
|
@ -378,7 +378,7 @@ class blog extends common
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
elseif ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -403,7 +403,7 @@ class blog extends common
|
||||
*/
|
||||
public function commentDeleteAll()
|
||||
{
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -435,7 +435,7 @@ class blog extends common
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
elseif ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -599,7 +599,7 @@ class blog extends common
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
elseif ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -624,7 +624,7 @@ class blog extends common
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
@ -266,7 +266,7 @@ class form extends common
|
||||
*/
|
||||
public function export2csv()
|
||||
{
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -307,7 +307,7 @@ class form extends common
|
||||
*/
|
||||
public function deleteall()
|
||||
{
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -343,7 +343,7 @@ class form extends common
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
@ -506,7 +506,7 @@ class gallery extends common
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -543,7 +543,7 @@ class gallery extends common
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -853,7 +853,7 @@ class gallery extends common
|
||||
*/
|
||||
public function theme()
|
||||
{
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -934,7 +934,7 @@ class gallery extends common
|
||||
* Options applicables à toutes les galeries du module
|
||||
*/
|
||||
if ($this->getUrl(2) === 'galleries') {
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -975,7 +975,7 @@ class gallery extends common
|
||||
* Enregistre les options de configuration de la galerie d'images sélectionnée
|
||||
*/
|
||||
} elseif ($this->getUrl(2) === 'gallery') {
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
@ -371,7 +371,7 @@ class news extends common
|
||||
'access' => false
|
||||
]);
|
||||
}
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
elseif ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
@ -396,7 +396,7 @@ class news extends common
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
// Jeton incorrect
|
||||
// Action interdite
|
||||
if ($this->checkCSRF()) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
|
Loading…
x
Reference in New Issue
Block a user