aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-10-16 19:58:12 +0000
committerrvelices <rv-github@modusoptimus.com>2012-10-16 19:58:12 +0000
commitaace3770aec92cb2b9102c4af9ce003936bc356d (patch)
treeaf44d267539015d01bb7b6680104595c0f8ece74 /index.php
parentd283bd51289b852eaa96c4ff94bc1cd92e8bd6c8 (diff)
- improved page title when viewing tags, fix canonical url on index page if the webmaster changes the default number of thumbnails per page
git-svn-id: http://piwigo.org/svn/trunk@18667 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'index.php')
-rw-r--r--index.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/index.php b/index.php
index 6e3f3f6d9..9fbc083f7 100644
--- a/index.php
+++ b/index.php
@@ -98,7 +98,12 @@ if (isset($page['is_homepage']) and $page['is_homepage'])
}
else
{
- $canonical_url = duplicate_index_url();
+ $start = $page['nb_image_page'] * round($page['start'] / $page['nb_image_page']);
+ if ($start>0 && $start >= count($page['items']) )
+ {
+ $start -= $page['nb_image_page'];
+ }
+ $canonical_url = duplicate_index_url(array('start' => $start));
}
$template->assign('U_CANONICAL', $canonical_url);