summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/emotes/index.php4
-rw-r--r--public/emotesets.php8
-rw-r--r--public/users.php2
3 files changed, 8 insertions, 6 deletions
diff --git a/public/emotes/index.php b/public/emotes/index.php
index 2013f9b..3491ab8 100644
--- a/public/emotes/index.php
+++ b/public/emotes/index.php
@@ -154,7 +154,7 @@ if (CLIENT_REQUIRES_JSON) {
<head>
<title><?php
- echo (empty($emotes) ? "Emote " . $emote->get_code() : "Emotes") . ' - ' . INSTANCE_NAME
+ echo ($emote != null ? "Emote " . $emote->get_code() : "Emotes") . ' - ' . INSTANCE_NAME
?></title>
<link rel="stylesheet" href="/static/style.css">
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
@@ -177,7 +177,7 @@ if (CLIENT_REQUIRES_JSON) {
<?php display_alert() ?>
<section class="box">
<div class="box navtab">
- <?php echo empty($emotes) ? "Emote - " . $emote->get_code() : "$total_emotes Emotes - Page $page/$total_pages" ?>
+ <?php echo $emote != null ? "Emote - " . $emote->get_code() : "$total_emotes Emotes - Page $page/$total_pages" ?>
</div>
<?php
if (empty($emotes)) { ?>
diff --git a/public/emotesets.php b/public/emotesets.php
index 4e01cba..61a8312 100644
--- a/public/emotesets.php
+++ b/public/emotesets.php
@@ -202,11 +202,11 @@ if (CLIENT_REQUIRES_JSON) {
<section class="content">
<section class="box">
<div class="box navtab">
- <?php echo $emote_sets != null ? ("$total_emotesets emotesets - Page $page/$total_pages") : ('"' . $emote_set["name"] . '" emoteset') ?>
+ <?php echo $emote_set != null ? ('"' . $emote_set["name"] . '" emoteset') : "$total_emotesets emotesets - Page $page/$total_pages" ?>
</div>
<div class="box content items">
<?php
- if ($emote_sets != null) {
+ if (!empty($emote_sets)) {
foreach ($emote_sets as $set_row) {
?>
<a href="/emotesets.php?id=<?php echo $set_row["id"] ?>" class="box">
@@ -240,7 +240,7 @@ if (CLIENT_REQUIRES_JSON) {
?>
<?php
}
- } else {
+ } else if (!empty($emote_set)) {
foreach ($emote_set["emotes"] as $emote_row) {
echo '<a class="box emote" href="/emotes?id=' . $emote_row["id"] . '">';
echo '<img src="/static/userdata/emotes/' . $emote_row["id"] . '/2x.' . $emote_row["ext"] . '" alt="' . $emote_row["code"] . '"/>';
@@ -248,6 +248,8 @@ if (CLIENT_REQUIRES_JSON) {
echo '<p>' . ($emote_row["uploaded_by"] == null ? (ANONYMOUS_DEFAULT_NAME . "*") : $emote_row["uploaded_by"]["username"]) . '</p>';
echo '</a>';
}
+ } else {
+ echo 'No emotesets found...';
}
?>
</section>
diff --git a/public/users.php b/public/users.php
index 95a7958..baebcb4 100644
--- a/public/users.php
+++ b/public/users.php
@@ -5,8 +5,8 @@ include_once "../src/partials.php";
include_once "../src/utils.php";
include_once "../src/accounts.php";
include_once "../src/alert.php";
+
authorize_user();
-session_start();
$is_json = isset($_SERVER["HTTP_ACCEPT"]) && $_SERVER["HTTP_ACCEPT"] == "application/json";