forked from ZwiiCMS-Team/ZwiiCMS
Merge branch '10400' into data_engine
This commit is contained in:
commit
1a97c3b477
@ -15,8 +15,13 @@
|
||||
- Approbation des commentaires
|
||||
|
||||
## version 10.3.04
|
||||
- Correction :
|
||||
- Corrections :
|
||||
- Position des entrées de menu sur les écrans de smartphone.
|
||||
- Thème : import d'un thème, d'administration impossible.
|
||||
- Thème : import d'un thème, nettoyage du dossier tmp.
|
||||
- Thème administration : modification de l'appel du code CSS permettant une mise à jour du thème sans vider le cache.
|
||||
- Amélioration :
|
||||
- Mise en page du corps des mails de notification.
|
||||
|
||||
## version 10.3.03
|
||||
- Correction :
|
||||
|
@ -49,7 +49,7 @@ class template {
|
||||
'value' => '',
|
||||
'limit' => false
|
||||
], $attributes);
|
||||
// Génère deux nombres
|
||||
// Génération des nombres et choix de l'opération
|
||||
$numbers = array(0,1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20);
|
||||
$letters = array('u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a');
|
||||
$limit = $attributes['limit'] ? count($letters)-1 : 10;
|
||||
@ -57,43 +57,37 @@ class template {
|
||||
$firstNumber = mt_rand (1, $limit);
|
||||
mt_srand((float) microtime()*1000000);
|
||||
$secondNumber = mt_rand (1, $limit);
|
||||
// Choisit l'opération
|
||||
mt_srand((float) microtime()*1000000);
|
||||
$operator = mt_rand (0, 3);
|
||||
switch ($operator) {
|
||||
case 0:
|
||||
$operator = '+';
|
||||
$operator = template::ico('plus');
|
||||
if ($firstNumber < $secondNumber) {
|
||||
$temp = $firstNumber;
|
||||
$firstNumber = $secondNumber;
|
||||
$secondNumber = $temp;
|
||||
// [$firstNumber, $secondNumber] = [$secondNumber, $firstNumber]; // ---> A partir de PHP 7.1
|
||||
}
|
||||
$result = $firstNumber + $secondNumber;
|
||||
$operator = template::ico('plus');
|
||||
break;
|
||||
case 1:
|
||||
$operator = '-';
|
||||
$operator = template::ico('minus');
|
||||
if ($firstNumber < $secondNumber) {
|
||||
$temp = $firstNumber;
|
||||
$firstNumber = $secondNumber;
|
||||
$secondNumber = $temp;
|
||||
// [$firstNumber, $secondNumber] = [$secondNumber, $firstNumber]; // ---> A partir de PHP 7.1
|
||||
}
|
||||
$result = $firstNumber - $secondNumber;
|
||||
$operator = template::ico('minus');
|
||||
break;
|
||||
case 2:
|
||||
$operator = 'x';
|
||||
$operator = template::ico('cancel');
|
||||
mt_srand((float) microtime()*1000000);
|
||||
$firstNumber = mt_rand (1, 10);
|
||||
mt_srand((float) microtime()*1000000);
|
||||
$secondNumber = mt_rand (1, 10);
|
||||
$result = $firstNumber * $secondNumber;
|
||||
$operator = template::ico('cancel');
|
||||
break;
|
||||
case 3:
|
||||
$operator = ':';
|
||||
$operator = template::ico('divide');
|
||||
mt_srand((float) microtime()*1000000);
|
||||
$firstNumber = mt_rand (1, 10);
|
||||
mt_srand((float) microtime()*1000000);
|
||||
@ -117,7 +111,6 @@ class template {
|
||||
}
|
||||
$firstNumber = $firstNumber * $secondNumber;
|
||||
$result = $firstNumber / $secondNumber;
|
||||
$operator = template::ico('divide');
|
||||
break;
|
||||
}
|
||||
$result = password_hash($result, PASSWORD_BCRYPT);
|
||||
@ -145,7 +138,7 @@ class template {
|
||||
'<input type="text" %s>',
|
||||
helper::sprintAttributes($attributes)
|
||||
);
|
||||
// Champ résultat caché
|
||||
// Champ résultat codé
|
||||
$html .= self::hidden($attributes['id'] . 'Result', [
|
||||
'value' => $result,
|
||||
'before' => false
|
||||
|
@ -983,6 +983,17 @@ class common {
|
||||
$db->save;
|
||||
}
|
||||
|
||||
/**
|
||||
* Effacer un dossier non vide.
|
||||
* @param string URL du dossier à supprimer
|
||||
*/
|
||||
public function removeDir ( $path ) {
|
||||
foreach ( new DirectoryIterator($path) as $item ):
|
||||
if ( $item->isFile() ) unlink($item->getRealPath());
|
||||
if ( !$item->isDot() && $item->isDir() ) $this->removeDir($item->getRealPath());
|
||||
endforeach;
|
||||
rmdir($path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mises à jour
|
||||
@ -1667,7 +1678,7 @@ class core extends common {
|
||||
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonRed']));
|
||||
$css .= '.button.buttonRed {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonRed:hover {background-color:' . $colors['darken'] . ';color:' . $colors['text'] . ';}.button.buttonRed:active {background-color:' . $colors['veryDarken'] . ';color:' . $colors['text'] . ';}';
|
||||
$colors = helper::colorVariants($this->getData(['admin','backgroundColorButtonGreen']));
|
||||
$css .= '.button.buttonGreen, button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . '}.button.buttonGreen:hover, button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] .';}.button.buttonGreen:active, button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' .$colors['text'] .';}';
|
||||
$css .= '.button.buttonGreen, button[type=submit] {background-color: ' . $colors['normal'] . ';color: ' . $colors['text'] . ';}.button.buttonGreen:hover, button[type=submit]:hover {background-color: ' . $colors['darken'] . ';color: ' . $colors['text'] .';}.button.buttonGreen:active, button[type=submit]:active {background-color: ' . $colors['darken'] . ';color: ' .$colors['text'] .';}';
|
||||
$colors = helper::colorVariants($this->getData(['admin','backgroundBlockColor']));
|
||||
$css .= '.block {border: 1px solid ' . $this->getData(['admin','borderBlockColor']) . ';}.block h4 {background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';}';
|
||||
$css .= 'table tr,input[type=email],input[type=text],input[type=password],select:not(#barSelectPage),textarea:not(.editorWysiwyg),.inputFile{background-color: ' . $colors['normal'] . ';color:' . $colors['text'] . ';border: 1px solid ' . $this->getData(['admin','borderBlockColor']) . ';}';
|
||||
@ -2762,6 +2773,9 @@ class layout extends common {
|
||||
public function showStyle() {
|
||||
if($this->core->output['style']) {
|
||||
echo '<base href="' . helper::baseUrl(true) .'">';
|
||||
if (strpos($this->core->output['style'], 'admin.css') >= 1 ) {
|
||||
echo '<link rel="stylesheet" href="' . self::DATA_DIR . 'admin.css?' . md5_file(self::DATA_DIR .'admin.css') . '">';
|
||||
}
|
||||
echo '<style type="text/css">' . helper::minifyCss($this->core->output['style']) . '</style>';
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@
|
||||
<div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family: sans-serif;">
|
||||
<?php echo $subject; ?>
|
||||
</div>
|
||||
<div style="max-width: 500px; margin: auto;" class="email-container">
|
||||
<div style="max-width: 500px; margin: auto; margin-top: 30px; border: #aaa 1px solid;" class="email-container">
|
||||
<!--[if mso]>
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="500" align="center">
|
||||
<tr>
|
||||
|
@ -12,7 +12,15 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** /** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/ */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
/**
|
||||
* Effet d'animation
|
||||
|
@ -12,7 +12,15 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/ */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
.blockContainer {
|
||||
display : none;
|
||||
|
@ -12,4 +12,8 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -12,4 +12,8 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -18,8 +18,7 @@ class install extends common {
|
||||
public static $actions = [
|
||||
'index' => self::GROUP_VISITOR,
|
||||
'steps' => self::GROUP_ADMIN,
|
||||
'update' => self::GROUP_ADMIN,
|
||||
'removeAll' => self::GROUP_ADMIN
|
||||
'update' => self::GROUP_ADMIN
|
||||
];
|
||||
|
||||
|
||||
@ -253,16 +252,5 @@ class install extends common {
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Effacer un dossier non vide.
|
||||
*/
|
||||
private function removeAll ( $path ) {
|
||||
foreach ( new DirectoryIterator($path) as $item ):
|
||||
if ( $item->isFile() ) unlink($item->getRealPath());
|
||||
if ( !$item->isDot() && $item->isDir() ) $this->removeAll($item->getRealPath());
|
||||
endforeach;
|
||||
|
||||
rmdir($path);
|
||||
}
|
||||
|
||||
}
|
@ -14,5 +14,9 @@
|
||||
|
||||
|
||||
/*
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
*/
|
@ -13,7 +13,11 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
#ceo > .blockContainer,
|
||||
#advanced > .blockContainer {
|
||||
|
@ -616,16 +616,19 @@ class theme extends common {
|
||||
mkdir (self::TEMP_DIR . $tempFolder);
|
||||
$zip->extractTo(self::TEMP_DIR . $tempFolder );
|
||||
// Archive de thème ?
|
||||
if ( file_exists(self::TEMP_DIR . $tempFolder . '/site/data/custom.css')
|
||||
if (( file_exists(self::TEMP_DIR . $tempFolder . '/site/data/custom.css')
|
||||
AND file_exists(self::TEMP_DIR . $tempFolder . '/site/data/theme.css')
|
||||
AND file_exists(self::TEMP_DIR . $tempFolder . '/site/data/theme.json') ) {
|
||||
AND file_exists(self::TEMP_DIR . $tempFolder . '/site/data/theme.json')
|
||||
) OR (
|
||||
file_exists(self::TEMP_DIR . $tempFolder . '/site/data/admin.json')
|
||||
)
|
||||
) {
|
||||
// traiter l'archive
|
||||
$success = $zip->extractTo('.');
|
||||
// traitement de l'erreur
|
||||
$notification = $success ? 'Le thème a été importé' : 'Erreur lors de l\'extraction, vérifiez les permissions.';
|
||||
// Supprimmer le dossier temporaire
|
||||
$install = new install;
|
||||
$install->removeAll(self::TEMP_DIR . $tempFolder);
|
||||
$this->removeDir(self::TEMP_DIR . $tempFolder);
|
||||
} else {
|
||||
// pas une archive de thème
|
||||
$success = false;
|
||||
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
/* Thème administration */
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
/* Thème administration */
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -11,7 +11,11 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
#backToTop {
|
||||
display: block;
|
||||
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
/* Thème administration */
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -12,4 +12,8 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -12,7 +12,11 @@
|
||||
|
||||
|
||||
/* Thème administration */
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
#bar,
|
||||
#site,
|
||||
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
/* Thème administration */
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -12,4 +12,8 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -12,4 +12,8 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,5 +13,9 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
*/
|
||||
|
@ -12,4 +12,8 @@
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -1,4 +1,8 @@
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
/*
|
||||
.formConfigInput {
|
||||
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,7 +13,11 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
.galleryConfigError {
|
||||
color: #F3674A;
|
||||
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -13,4 +13,8 @@
|
||||
*/
|
||||
|
||||
|
||||
@import url("site/data/admin.css");
|
||||
/** @import url("site/data/admin.css"); */
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
Loading…
Reference in New Issue
Block a user