mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2026-06-02 06:04:44 -04:00
Fix #33 - finishing touches
This commit is contained in:
@@ -121,9 +121,9 @@ class Constellation
|
||||
$timestamp = time();
|
||||
}
|
||||
|
||||
$c = ($future)?">=":"<=";
|
||||
$operator = ($future)?">=":"<=";
|
||||
$limit++;
|
||||
$sql = $mysqli->prepare("SELECT *, status.id as status_id FROM status INNER JOIN users ON user_id=users.id WHERE `time` $c ? AND `end_time` $c ? OR (`time`<=? AND `end_time` $c ? ) ORDER BY `time` DESC LIMIT ? OFFSET ?");
|
||||
$sql = $mysqli->prepare("SELECT *, status.id as status_id FROM status INNER JOIN users ON user_id=users.id WHERE `time` $operator ? AND `end_time` $operator ? OR (`time`<=? AND `end_time` $operator ? ) ORDER BY `time` DESC LIMIT ? OFFSET ?");
|
||||
$sql->bind_param("iiiiii",$timestamp, $timestamp, $timestamp, $timestamp, $limit, $offset);
|
||||
$sql->execute();
|
||||
$query = $sql->get_result();
|
||||
|
||||
+1
-1
@@ -69,6 +69,6 @@ class Token
|
||||
$stmt = $mysqli->prepare("DELETE FROM tokens WHERE token = ? OR expire<?");
|
||||
$stmt->bind_param("sd", $token,$time);
|
||||
$stmt->execute();
|
||||
$query = $stmt->get_result();
|
||||
$stmt->get_result();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -549,7 +549,7 @@ class User
|
||||
$stmt = $mysqli->prepare("UPDATE users SET email = ? WHERE id=?");
|
||||
$stmt->bind_param("sd", $email, $id);
|
||||
$stmt->execute();
|
||||
$query = $stmt->get_result();
|
||||
$stmt->get_result();
|
||||
Token::delete($token);
|
||||
header("Location: ".WEB_URL."/admin/");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user