annule secureFilePutContents dans les modules. Non justifié dans la configuration du module

This commit is contained in:
Fred Tempez 2024-04-05 16:51:03 +02:00
parent 24f679d531
commit 15c4d1edd3
3 changed files with 6 additions and 6 deletions

View File

@ -260,7 +260,7 @@ class gallery extends common
$content = str_replace('#legendBgColor#', $this->getData(['module', $this->getUrl(0), 'theme', 'legendBgColor']), $content);
// Ecriture de la feuille de style
$this->secureFilePutContents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $content . $themeCss);
file_put_contents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $content . $themeCss);
// Nom de la feuille de style
$this->setData(['module', $this->getUrl(0), 'theme', 'style', $fileCSS]);
}
@ -894,7 +894,7 @@ class gallery extends common
$content = str_replace('#legendHeight#', $this->getinput('galleryThemeLegendHeight'), $content);
$content = str_replace('#legendTextColor#', $this->getinput('galleryThemeLegendTextColor'), $content);
$content = str_replace('#legendBgColor#', $this->getinput('galleryThemeLegendBgColor'), $content);
$success = is_int($this->secureFilePutContents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $content . $themeCss));
$success = is_int(file_put_contents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $content . $themeCss));
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl() . '/theme',

View File

@ -281,7 +281,7 @@ class news extends common
mkdir(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', 0755, true);
}
$success = is_int($this->secureFilePutContents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $style));
$success = is_int(file_put_contents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $style));
// Fin feuille de style
@ -643,7 +643,7 @@ class news extends common
$style .= '}';
// Sauver la feuille de style
$this->secureFilePutContents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $style);
file_put_contents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $style);
// Stocker le nom de la feuille de style
$this->setData(['module', $this->getUrl(0), 'theme', 'style', self::DATADIRECTORY . $this->getUrl(0) . '/theme.css']);
}

View File

@ -106,7 +106,7 @@ class search extends common
// Générer la feuille de CSS
$style = '.keywordColor {background: ' . $this->getData(['module', $this->getUrl(0), 'theme', 'keywordColor']) . ';}';
// Sauver la feuille de style
$this->secureFilePutContents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $style);
file_put_contents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $style);
// Stocker le nom de la feuille de style
$this->setData(['module', $this->getUrl(0), 'theme', 'style', $fileCSS]);
}
@ -128,7 +128,7 @@ class search extends common
// Générer la feuille de CSS
$style = '.keywordColor {background:' . $this->getInput('searchKeywordColor') . ';}';
$success = is_int($this->secureFilePutContents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $style));
$success = is_int(file_put_contents(self::DATADIRECTORY . $this->getUrl(0) . '/theme.css', $style));
// Fin feuille de style
// Soumission du formulaire