Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix navigation links

  • Loading branch information...
commit 8bc2f3a9e2bb4660d803f205367fe59a08a23b07 1 parent 18c0f7e
Daniel Muller authored Daniel Muller committed

Showing 1 changed file with 6 additions and 4 deletions. Show diff stats Hide diff stats

  1. +6 4 views/paginator.html.php
10 views/paginator.html.php
@@ -47,12 +47,14 @@
47 47 # SEO pagination (http://www.milesjcarter.co.uk/blog/photos-on-the-web/gallery-3-seo-part-perfect-url-scheme/)
48 48 function seo_pagination($url) {
49 49 $pattern = '/\?page=([0-9]+)/';
50   - $replacement = 'page/$1';
  50 + $replacement = '/page/$1';
  51 + $url=preg_replace($pattern, $replacement, $url);
51 52 #REMOVE REDUNDANT /PAGE/1"
52   - $pattern2 = '/page\/1$/';
53   - $replacement2 = '';
  53 + $pattern = '/\/page\/1$/';
  54 + $replacement = '';
54 55 $url=preg_replace($pattern, $replacement, $url);
55   - $url=preg_replace($pattern2, $replacement2, $url);
  56 + #Remove leading double slash
  57 + $url=preg_replace('/^\/\//', '/', $url);
56 58 return $url;
57 59 }
58 60

0 comments on commit 8bc2f3a

Please sign in to comment.
Something went wrong with that request. Please try again.