Merge branch 'bugfix' into 'master'

Nettoyage

- j'ai remis les double quote pour le texte envoyé par email (il y a des sauts de ligne)
- les fonctions dans Utils doivent être appelées avec `self::` en préfixe
- `throw new Exception` dans adminstuds produit une erreur
- j'ai remplacé les « OpenSondage » par « Framadate » dans install ; on garde un nom unique pour le service en ligne et pour le logiciel.

See merge request !28
This commit is contained in:
JosephK 2014-12-03 14:52:04 +01:00
commit 887f48699a
5 changed files with 26 additions and 25 deletions

View File

@ -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 .= '<th class="bg-info'.$rbd.'" id="H'.$i.'" title="'.$horoCur[1].'">'.$horoCur[1].'</th>';
$radio_title[$i] .= ' - '.$horoCur[1];
$td_headers[$i] .= ' H'.$i;

View File

@ -67,7 +67,7 @@ class Utils
*/
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)
@ -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 davance pour votre soutien http://soutenir.framasoft.org.');
mail($to, $subject, $body, $headers, $param);
}

View File

@ -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));

View File

@ -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>

View File

@ -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>