From 91fd4e236d3c80c0e5fdfa0f3cfb302101218321 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 26 Feb 2013 11:09:02 +0000 Subject: [PATCH] --- inc/commons/class.common.tools.php | 12 ++++++++---- inc/ws/Controlleur/class.ws.services.php | 19 +++++++++++-------- inc/ws/Controlleur/class.ws.url.php | 4 ++-- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/inc/commons/class.common.tools.php b/inc/commons/class.common.tools.php index 5a6ab5891..9660bd8a5 100644 --- a/inc/commons/class.common.tools.php +++ b/inc/commons/class.common.tools.php @@ -429,10 +429,11 @@ class commonTools { $upload = $tmp . '/upload.png'; move_uploaded_file($_FILES['file']['tmp_name'], $upload); + $dim = getimagesize($upload); + if (!isset($_POST['round']) || $_POST['round'] == 0) { $round = $upload; } else { - $dim = getimagesize($upload); $w = $dim[0]; $ra = round($w * ($_POST['round'] / 100)); $round = $tmp . '/round.png'; @@ -476,9 +477,12 @@ class commonTools { if (in_array($s, $apple)) { continue; } - $icotool->setArg(null, $r); - if (in_array($s, $icns)) { - $png2icns->setArg(null, $r); + + if ($s <= $dim[0]) { + $icotool->setArg(null, $r); + if (in_array($s, $icns)) { + $png2icns->setArg(null, $r); + } } } diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index 43aeb626e..11a680578 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -158,7 +158,10 @@ class wsServices extends cubeFlashGateway { } if (!isset($cover)) { $pages = $dao->getPagesOfBook($this->args['id']); - $cover = WS_DOCS . '/' . $pages[1]['document_id'] . '/p' . $pages[1]['document_page'] . '.jpg'; + $cover = WS_DOCS . '/' . $pages[1]['document_id'] . '/html/t36-' . $pages[1]['document_page'] . '.jpg'; + if (!file_exists($cover)) { + $cover = WS_DOCS . '/' . $pages[1]['document_id'] . '/p' . $pages[1]['document_page'] . '.jpg'; + } } @@ -371,7 +374,7 @@ class wsServices extends cubeFlashGateway { } public function grdfValidForm() { - $notempty = array('civilite', 'prenom', 'nom', 'adresse', 'codepostal', 'ville', 'telephone', 'optin', 'connu', 'echeance'); + $notempty = array('civilite', 'prenom', 'nom', 'adresse', 'codepostal', 'ville', 'telephone', 'optin', 'connu', 'echeance'); $error = false; $errors = array(); foreach ($notempty as $f) { @@ -381,10 +384,10 @@ class wsServices extends cubeFlashGateway { } } - /*if (!cubeMail::isEmail($this->args['email'])) { - $error = true; - $errors[] = 'email_valid'; - } */ + /* if (!cubeMail::isEmail($this->args['email'])) { + $error = true; + $errors[] = 'email_valid'; + } */ $this->xml->addChild('ok', $error ? '0' : '1'); $this->xml->addChild('errors', implode(',', $errors)); @@ -403,8 +406,8 @@ class wsServices extends cubeFlashGateway { $mail->subject = '[Chéquier avantages] Validation de coupon'; $mail->from = 'noreply@chequieravantages.fr'; $mail->replyTo = 'noreply@chequiavantages.fr'; - $mail->cc = 'gerald@sensoa.fr'; - $mail->to = 'chequieravantages@gmail.com'; + $mail->to = 'projetrenogaz@grdf.fr'; + $mail->bcc = 'test@cubedesigners.com'; $body = ''; foreach ($fields as $k => $f) { diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 59352ac75..c03469e24 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -1166,7 +1166,7 @@ html{height:100%}' . "\n"; if ($book->parametres->facebook_description != '') { $meta['og:description'] = $book->parametres->facebook_description; } - $meta['og:image'] = 'http://workshop.fluidbook.com/services/facebook_thumbnail?id=' . $book->book_id; + $meta['og:image'] = 'http://workshop.fluidbook.com/services/facebook_thumbnail?id=' . $book->book_id . '&j=' . TIME; } $redirectPDF = 'window.location="data/document.pdf"'; @@ -1181,7 +1181,7 @@ html{height:100%}' . "\n"; $res .= ''; $res .= ''; - $res .= '
'; + $res .= '
'; $res .= "\n" . '