diff --git a/includes/Pastedown.php b/includes/Pastedown.php index a79c778..51766a9 100644 --- a/includes/Pastedown.php +++ b/includes/Pastedown.php @@ -10,7 +10,6 @@ class Pastedown extends ParsedownExtra { $this->BlockTypes['@'] = ['Purpletext']; } - protected function blockGreentext($Line) { if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) diff --git a/public/api/ajax_pastes.php b/public/api/ajax_pastes.php index dd139da..4681790 100644 --- a/public/api/ajax_pastes.php +++ b/public/api/ajax_pastes.php @@ -20,6 +20,7 @@ $pastes = Paste::with([ } ])->select(['id', 'user_id', 'title', 'expiry']) ->where('visible', Paste::VISIBILITY_PUBLIC) + ->where('hidden', false) ->whereRaw("((expiry IS NULL) OR ((expiry != 'SELF') AND (expiry > NOW())))"); if (!empty($_GET['q']) && is_string($_GET['q'])) { diff --git a/public/paste.php b/public/paste.php index 5f93592..fc7ac8f 100644 --- a/public/paste.php +++ b/public/paste.php @@ -115,6 +115,7 @@ if (isset($_POST['hide'])) { $paste->is_hidden = $is_hidden; $paste->save(); + $redis->del('ajax_pastes'); /* Expire from Redis so it doesn't show up anymore */ flashSuccess('Paste ' . ($is_hidden ? 'hidden' : 'unhidden') . '.'); header('Location: /'); die();