diff --git a/core/urls.php b/core/urls.php index 9ef20b41..0950f4bc 100644 --- a/core/urls.php +++ b/core/urls.php @@ -27,7 +27,7 @@ class Link * Figure out the correct way to link to a page, taking into account * things like the nice URLs setting. * - * eg make_link("post/list") becomes "/v2/index.php?q=post/list" + * eg make_link("foo/bar") becomes "/v2/index.php?q=foo/bar" */ function make_link(?string $page=null, ?string $query=null, ?string $fragment=null): string { diff --git a/ext/approval/main.php b/ext/approval/main.php index 935091b9..1f62ed5f 100644 --- a/ext/approval/main.php +++ b/ext/approval/main.php @@ -116,7 +116,7 @@ class Approval extends Extension if (!$this->check_permissions(($event->image))) { $page->set_mode(PageMode::REDIRECT); - $page->set_redirect(make_link("post/list")); + $page->set_redirect(make_link()); } } diff --git a/ext/comment/theme.php b/ext/comment/theme.php index 6f92e7ef..8fe95367 100644 --- a/ext/comment/theme.php +++ b/ext/comment/theme.php @@ -29,7 +29,7 @@ class CommentListTheme extends Themelet $h_prev = ($page_number <= 1) ? "Prev" : 'Prev'; - $h_index = "Index"; + $h_index = "Index"; $h_next = ($page_number >= $total_pages) ? "Next" : 'Next'; @@ -186,7 +186,7 @@ class CommentListTheme extends Themelet //$query = empty($u_tags) ? "" : '/'.$u_tags; $h_prev = ($page_number <= 1) ? "Prev" : "Prev"; - $h_index = "Index"; + $h_index = "Index"; $h_next = ($page_number >= $total_pages) ? "Next" : "Next"; $page->set_title(html_escape($user->name)."'s comments"); diff --git a/ext/image/main.php b/ext/image/main.php index 94effd32..bcdbf753 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -91,7 +91,7 @@ class ImageIO extends Extension redirect_to_next_image($image); } else { $page->set_mode(PageMode::REDIRECT); - $page->set_redirect(referer_or(make_link("post/list"), ['post/view'])); + $page->set_redirect(referer_or(make_link(), ['post/view'])); } } } diff --git a/ext/private_image/main.php b/ext/private_image/main.php index 88f06d35..7c9ada83 100644 --- a/ext/private_image/main.php +++ b/ext/private_image/main.php @@ -119,7 +119,7 @@ class PrivateImage extends Extension if ($event->image->private===true && $event->image->owner_id!=$user->id && !$user->can(Permissions::SET_OTHERS_PRIVATE_IMAGES)) { $page->set_mode(PageMode::REDIRECT); - $page->set_redirect(make_link("post/list")); + $page->set_redirect(make_link()); } } diff --git a/ext/rating/main.php b/ext/rating/main.php index 9f222951..ac70adb5 100644 --- a/ext/rating/main.php +++ b/ext/rating/main.php @@ -172,7 +172,7 @@ class Ratings extends Extension **/ if (!$this->check_permissions($event->image)) { $page->set_mode(PageMode::REDIRECT); - $page->set_redirect(make_link("post/list")); + $page->set_redirect(make_link()); } } @@ -394,7 +394,7 @@ class Ratings extends Extension # on image_tags.tag_id = tags.id where tags.tag = :tag); # ", ['rating'=>$_POST["rating"], 'tag'=>$_POST["tag"]]); $page->set_mode(PageMode::REDIRECT); - $page->set_redirect(make_link("post/list")); + $page->set_redirect(make_link()); } } } diff --git a/ext/regen_thumb/main.php b/ext/regen_thumb/main.php index b66389ee..1e40d6f0 100644 --- a/ext/regen_thumb/main.php +++ b/ext/regen_thumb/main.php @@ -37,7 +37,7 @@ class RegenThumb extends Extension } $page->set_mode(PageMode::REDIRECT); - $page->set_redirect(make_link("post/list")); + $page->set_redirect(make_link()); } } diff --git a/ext/trash/main.php b/ext/trash/main.php index 5667fb0a..55537bb9 100644 --- a/ext/trash/main.php +++ b/ext/trash/main.php @@ -71,7 +71,7 @@ class Trash extends Extension if (!$this->check_permissions(($event->image))) { $page->set_mode(PageMode::REDIRECT); - $page->set_redirect(make_link("post/list")); + $page->set_redirect(make_link()); } } diff --git a/ext/user/main.php b/ext/user/main.php index 7b8679d2..f0c3db78 100644 --- a/ext/user/main.php +++ b/ext/user/main.php @@ -840,7 +840,7 @@ class UserPage extends Extension ); $page->set_mode(PageMode::REDIRECT); - $page->set_redirect(make_link("post/list")); + $page->set_redirect(make_link()); } } }