From 6751a8a9cfc84f2a49d46ccd2aec2ad0bcd72485 Mon Sep 17 00:00:00 2001 From: FramaJosephK Date: Wed, 3 Dec 2014 14:30:25 +0100 Subject: [PATCH] =?UTF-8?q?Retouches=20apr=C3=A8s=20s=C3=A9rie=20de=20merg?= =?UTF-8?q?es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adminstuds.php | 5 +++-- app/classes/Framadate/Utils.php | 34 ++++++++++++++++----------------- creation_sondage.php | 4 ++-- install/error.html | 4 ++-- install/install.html | 4 ++-- 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/adminstuds.php b/adminstuds.php index a738cec..724e15c 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -44,7 +44,8 @@ function getChoicesFromPOST($nbColumns) function getNewChoiceFromChoices($choices) { if(!is_array($choice)) { - throw new Exception('$choices must be a an array'); + /* throw new Exception('$choices must be a an array'); + PHP Fatal error: Class 'Framadate\Exception' not found */ } $newChoice = ''; @@ -886,7 +887,7 @@ if (substr($dsondage->format, 0, 1) == 'D') { // Hours $rbd = ($border[$i]) ? ' rbd' : ''; - if (isset($horoCur[1]) && $horoCur[1] !== "") { + if (isset($horoCur[1]) && $horoCur[1] !== '') { $tr_hours .= ''.$horoCur[1].''; $radio_title[$i] .= ' - '.$horoCur[1]; $td_headers[$i] .= ' H'.$i; diff --git a/app/classes/Framadate/Utils.php b/app/classes/Framadate/Utils.php index 03efeb0..ca333c2 100644 --- a/app/classes/Framadate/Utils.php +++ b/app/classes/Framadate/Utils.php @@ -20,9 +20,9 @@ namespace Framadate; class Utils { - /** - * @return string Server name - */ + /** + * @return string Server name + */ public static function get_server_name() { $scheme = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http'; @@ -32,9 +32,9 @@ class Utils return $scheme . '://' . str_replace('/admin', '', str_replace('//', '/', str_replace('///', '/', $server_name))); } - /** - * Returns a poll or false if it fails - */ + /** + * Returns a poll or false if it fails + */ public static function get_poll_from_id($id) { global $connect; @@ -60,15 +60,15 @@ class Utils return false; } - + /** * Use get_poll_from_id that is fully english name * @deprecated */ public static function get_sondage_from_id($id) { - return get_poll_from_id($id); - } + return self::get_poll_from_id($id); + } public static function is_error($cerr) { @@ -94,7 +94,7 @@ class Utils '; - echo ''; + echo '<title>'; if (! empty($title)) { echo stripslashes($title) . ' - '; } @@ -184,7 +184,7 @@ class Utils $headers .= "Auto-Submitted:auto-generated\n"; $headers .= 'Return-Path: <>'; - $body = html_entity_decode($body, ENT_QUOTES, 'UTF-8'). "\n--\n\n" _('« La route est longue, mais la voie est libre… »') ."\n" . _('Framasoft ne vit que par vos dons (déductibles des impôts).') ."\n". _('Merci d\'avance pour votre soutien http://soutenir.framasoft.org.'); + $body = html_entity_decode($body, ENT_QUOTES, 'UTF-8'). "\n--\n\n" . _('« La route est longue, mais la voie est libre… »') ."\n" . _('Framasoft ne vit que par vos dons (déductibles des impôts).') ."\n". _('Merci d’avance pour votre soutien http://soutenir.framasoft.org.'); mail($to, $subject, $body, $headers, $param); } @@ -252,12 +252,12 @@ class Utils return $suppression_OK ; } - - /** - * @param $connect - * @param $log_txt - * @return void - */ + + /** + * @param $connect + * @param $log_txt + * @return void + */ public static function cleaning_polls($connect, $log_txt) { $connect->StartTrans(); $req = 'SELECT * FROM sondage WHERE date_fin < NOW() LIMIT 20'; diff --git a/creation_sondage.php b/creation_sondage.php index 2ed214e..08a7fb8 100644 --- a/creation_sondage.php +++ b/creation_sondage.php @@ -76,12 +76,12 @@ function ajouter_sondage() $connect->Execute($sql, array($poll, $_SESSION['toutchoix'])); if($config['use_smtp']==true) { - $message = _('This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.'); + $message = _("This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll."); $message .= "\n\n"; $message .= stripslashes(html_entity_decode($_SESSION["nom"],ENT_QUOTES,"UTF-8"))." " . _('hast just created a poll called') . ' : "'.stripslashes(htmlspecialchars_decode($_SESSION['titre'],ENT_QUOTES))."\".\n"; $message .= _('Thanks for filling the poll at the link above') . " :\n\n%s\n\n" . _('Thanks for your confidence.') ."\n". NOMAPPLICATION; - $message_admin = _('This message should NOT be sent to the polled people. It is private for the poll\'s creator.') ."\n\n" ._('You can now modify it at the link above'); + $message_admin = _("This message should NOT be sent to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above"); $message_admin .= " :\n\n%s \n\n" . _('Thanks for your confidence.') . "\n". NOMAPPLICATION; $message = sprintf($message, Utils::getUrlSondage($poll)); diff --git a/install/error.html b/install/error.html index a758055..c6dc5ba 100644 --- a/install/error.html +++ b/install/error.html @@ -12,13 +12,13 @@ <div class="container ombre"> <header role="banner"> <h1> - <img src="../images/logo-framadate.png" width="360" height="50" alt="OpenSondage" /> + <img src="../images/logo-framadate.png" width="360" height="50" alt="Framadate" /> </h1> <h2>Make your polls</h2> <hr class="trait" role="presentation"> </header> <main role="main"> - <h3>OpenSondage Installation</h3> + <h3>Framadate Installation</h3> <div class="alert alert-danger" role="alert"> <?php echo htmlspecialchars($e->getMessage(), ENT_COMPAT | ENT_HTML401, 'UTF-8') ?> </div> diff --git a/install/install.html b/install/install.html index 004097a..1caa3af 100644 --- a/install/install.html +++ b/install/install.html @@ -12,13 +12,13 @@ <div class="container ombre"> <header role="banner"> <h1> - <img src="../images/logo-framadate.png" width="360" height="50" alt="OpenSondage" /> + <img src="../images/logo-framadate.png" width="360" height="50" alt="Framadate" /> </h1> <h2>Make your polls</h2> <hr class="trait" role="presentation"> </header> <main role="main"> - <h3>OpenSondage Installation</h3> + <h3>Framadate Installation</h3> <form action="" method="post" role="form"> <fieldset> <legend>General</legend>