X-Git-Url: https://git.bts.cx/cx.git/blobdiff_plain/6e68608aecb6a542b9c75a13afd5002aeb7bc0f1..ef10a64a4f43bf4ba5e660c0f56d31e4602998c3:/cx/lib/url.php?ds=inline diff --git a/cx/lib/url.php b/cx/lib/url.php index 1ace539..0bcef4c 100644 --- a/cx/lib/url.php +++ b/cx/lib/url.php @@ -13,3 +13,12 @@ function cx_url_admin($path) { function cx_url_site($path) { return cx_site_url() . cx_url($path); } + +function cx_url_page($number, $delta = 0) { + $next_number = $number + $delta; + if ($next_number <= 0) { + return cx_url_site('/'); + } else { + return cx_url_site('/page/' . $next_number ); + } +}