Switching from tokenhash to userdir and from path to link

This commit is contained in:
Timo Ley 2020-08-29 12:34:22 +02:00
parent 639dd58d7a
commit d610f25a48
1 changed files with 4 additions and 1 deletions

View File

@ -110,7 +110,8 @@ if ($method == "GET") {
while ($row = mysqli_fetch_array($res_users, MYSQLI_ASSOC)) {
$user = new stdClass();
$user->name = $row["name"];
$user->tokenhash = md5($row["token"]);
$user->tokenhash = $row["userdir"];
$user->userdir = $row["userdir"];
$user->dayuploads = $row["uploadsLast24H"];
array_push($users, $user);
}
@ -161,6 +162,7 @@ function checksql($res) {
function memesArray($query) {
global $jmcon;
global $jmurl;
$memes = array();
$res_memes = mysqli_query($jmcon, $query);
@ -170,6 +172,7 @@ function memesArray($query) {
$meme->id = $row["id"];
$path = $row["path"];
$path = str_replace(" ", "%20", $path);
$meme->link = $jmurl . $path;
$meme->path = $path;
$meme->category = $row["cat"];
$meme->user = $row["user"];