Remove old code + Add doc

This commit is contained in:
Olivier PEREZ 2014-12-17 13:52:52 +01:00
parent 9284a5d62b
commit ceb6ae3bca
2 changed files with 9 additions and 29 deletions

View File

@ -82,17 +82,6 @@ class Utils
}
public static function check_table_sondage()
{
global $connect;
if (in_array('sondage', $connect->MetaTables('TABLES'))) {
return true;
}
return false;
}
/**
* Check if an email address is valid using PHP filters
*
@ -157,22 +146,6 @@ class Utils
mail($to, $subject, $body, $headers, $param);
}
/**
* Fonction vérifiant l'existance et la valeur non vide d'une clé d'un tableau
* @deprecated
* @param string $name La clé à tester
* @param array $tableau Le tableau rechercher la clé ($_POST par défaut)
* @return bool Vrai si la clé existe et renvoie une valeur non vide
*/
/*public static function issetAndNoEmpty($name, $tableau = null)
{
if (is_null($tableau)) {
$tableau = $_POST;
}
return isset($tableau[$name]) && ! empty($tableau[$name]);
}*/
/**
* Fonction permettant de générer les URL pour les sondage
* @param string $id L'identifiant du sondage
@ -200,6 +173,7 @@ class Utils
/**
* Completly delete data about the given poll
* TODO Move this function to FramaDB
*/
public static function removeSondage($poll_id)
{
@ -219,6 +193,10 @@ class Utils
}
/**
* Clean old poll (end_date < now).
* TODO Move this function to FramaDB
*/
public static function cleaningOldPolls($log_txt) {
global $connect;
@ -234,6 +212,10 @@ class Utils
$connect->commit();
}
/**
* This method pretty prints an object to the page framed by pre tags.
* @param Object $object The object to print.
*/
public static function debug($object)
{
echo '<pre>';

View File

@ -148,6 +148,4 @@ $smarty->assign('comments', $comments);
$smarty->assign('editingVoteId', $editingVoteId);
$smarty->assign('message', $message);
//Utils::debug(computeBestMoments($votes));exit;
$smarty->display('studs.tpl');