diff --git a/public/api/ajax_pastes.php b/public/api/ajax_pastes.php index b03aa81..4688dc8 100644 --- a/public/api/ajax_pastes.php +++ b/public/api/ajax_pastes.php @@ -30,7 +30,7 @@ if (!empty($_GET['q']) && is_string($_GET['q'])) { }); } -$pastes = $pastes->get(); +$pastes = $pastes->orderBy('id', 'desc')->get(); header('Content-Type: application/json; charset=UTF-8'); diff --git a/public/archive.php b/public/archive.php index b834423..2ff5f44 100644 --- a/public/archive.php +++ b/public/archive.php @@ -45,6 +45,7 @@ if (!empty($filter_value)) { } } +$pastes = $pastes->orderBy('id', 'desc'); $total_results = $pastes->count(); $pastes = $pastes->limit($per_page)->offset($per_page * $current_page);