error display, bug changement mdp, enlevé tous les echo
This commit is contained in:
parent
20e28ce78f
commit
524532d050
6 changed files with 12 additions and 9 deletions
|
@ -35,7 +35,7 @@ class MySQLDatabase {
|
|||
$result = @mysql_select_db($database, $this->connection);
|
||||
|
||||
if ($result == false) {
|
||||
echo "Erreur : " + mysql_error();
|
||||
trigger_error("SQL Error : " . mysql_error(), E_USER_ERROR);
|
||||
die(Localization::SQLdeath);
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,6 @@ class MySQLDatabase {
|
|||
$result = mysql_affected_rows($this->connection);
|
||||
} else {
|
||||
$result = false;
|
||||
// echo mysql_error($this->connection);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
|
|
@ -93,7 +93,6 @@ class CategoryFormatter {
|
|||
|
||||
function sortByDescPoints($a, $b) {
|
||||
if ($a->getPoints() == $b->getPoints()) {
|
||||
echo "Equal";
|
||||
return 0;
|
||||
}
|
||||
if ($a->getPoints() < $b->getPoints()) {
|
||||
|
|
|
@ -46,9 +46,7 @@ class TournamentEntry {
|
|||
}
|
||||
|
||||
public static function Create(Tournament $tournament, Member $user, Category $category, $points, $rank, $participants) {
|
||||
echo "Creating a new entry for";
|
||||
$tournamentId = $tournament->getIdentifier();
|
||||
echo "<br>tournament #" . $tournamentId;
|
||||
$categoryId = $category->getIdentifier();
|
||||
$userId = $user->getIdentifier();
|
||||
|
||||
|
|
|
@ -268,12 +268,20 @@ class Member {
|
|||
$this->mail = $mail;
|
||||
|
||||
if (strlen($new_password) > 4) {
|
||||
$message = "Changing password for user " . $this->username;
|
||||
$message .= " from " . $this->password;
|
||||
$message .= " to " . $new_password;
|
||||
trigger_error($message);
|
||||
$passwordHash = hash("sha512", $new_password);
|
||||
} else {
|
||||
$this->password = $passwordHash;
|
||||
}
|
||||
|
||||
if ($new_password == "-") {
|
||||
trigger_error("Disabling password for user " . $this->username);
|
||||
$passwordHash = "disabled";
|
||||
$this->password = $passwordHash;
|
||||
}
|
||||
|
||||
$this->password = $passwordHash;
|
||||
|
||||
$this->rights = $rights;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
session_start();
|
||||
if (array_key_exists("ugly_debug", $_GET)) {
|
||||
$_SESSION['ugly_debug'] = $_GET['ugly_debug'];
|
||||
}
|
||||
|
@ -6,7 +7,6 @@ if (array_key_exists("ugly_debug", $_SESSION)) {
|
|||
ini_set('display_errors', 1);
|
||||
error_reporting(-1);
|
||||
}
|
||||
session_start();
|
||||
date_default_timezone_set("Europe/Berlin");
|
||||
|
||||
$_SESSION['startTime'] = microtime(true);
|
||||
|
|
|
@ -252,7 +252,6 @@ FORM;
|
|||
$entry = TournamentEntry::Get($entryId);
|
||||
$entry->setContent($user, $category, $entryPoints, $entryRank, $entryParticipants);
|
||||
} else {
|
||||
echo "Calling for creation of entry";
|
||||
$entry = TournamentEntry::Create($tournament, $user, $category, $entryPoints, $entryRank, $entryParticipants);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue