mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-12 06:30:07 +01:00
fix: change default sort for archive to newest-first
This commit is contained in:
parent
ee5148ab7b
commit
ea09c62dc6
2 changed files with 2 additions and 1 deletions
|
@ -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');
|
header('Content-Type: application/json; charset=UTF-8');
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,7 @@ if (!empty($filter_value)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$pastes = $pastes->orderBy('id', 'desc');
|
||||||
$total_results = $pastes->count();
|
$total_results = $pastes->count();
|
||||||
|
|
||||||
$pastes = $pastes->limit($per_page)->offset($per_page * $current_page);
|
$pastes = $pastes->limit($per_page)->offset($per_page * $current_page);
|
||||||
|
|
Loading…
Add table
Reference in a new issue