X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=index.php;h=5bf04d624bb2aeca2e97f88374664e31ff0d894c;hb=7a7a4e50628b1397204dfe1c3847aee0bda73a08;hp=90f1938c0daa6f112992f2f0e4c12d2b978318d3;hpb=5a83ee3e1d7f468e904cd44b282293eda1250708;p=dylansserver.git diff --git a/index.php b/index.php index 90f1938..5bf04d6 100644 --- a/index.php +++ b/index.php @@ -304,7 +304,7 @@ class note extends cms { $this->comments_enabled = $comments_enabled; $url = htmlspecialchars($_SERVER['REQUEST_URI']); if (isset($_GET['verify'])) { - $url = substr($url, 0, (strlen($url)-7)); + $url = substr($url, 0, (strlen($url)-6)); } $this->url = $url; } @@ -380,7 +380,7 @@ class note extends cms {

- notes/ + notes/

END_OF_NAVIGATION; @@ -389,7 +389,11 @@ END_OF_NAVIGATION; private function display_comment_link() { // somehow I should be checking if there are any first, // change to 'comment?' - $url = $this->url . 'comments/'; + if (substr($this->url, (strlen($this->url)-1), strlen($this->url)) == '/') { + $url = $this->url . 'comments/'; + } else { + $url = $this->url . '/comments/'; + } echo "comments"; } @@ -425,7 +429,7 @@ var RecaptchaOptions = { END_CAPTCHA_STYLE; require_once('includes/recaptchalib.php'); // Trailing slash is necessary for reloads to work - $url = $this->url . "verify/"; + $url = $this->url . "verify"; echo "
"; echo <<