Retouches après série de merges

This commit is contained in:
FramaJosephK 2014-12-03 14:30:25 +01:00
parent 811d525239
commit 6751a8a9cf
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

@ -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
<head>
<meta charset="utf-8" />';
echo '<title>';
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 davance 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';

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>