aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-10-16 19:59:08 +0000
committerrvelices <rv-github@modusoptimus.com>2012-10-16 19:59:08 +0000
commitafb83c772dee77b6699a0d51d46a1d7f5c5c5c66 (patch)
treeae00c18d065b801f1ac97affe6d7d0a172478b92 /index.php
parent7ed296715ea3e16536961cf219dfe5a9a21c997e (diff)
merge -r18667 from trunk - 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/branches/2.4@18668 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 02cd6369f..90d30ca28 100644
--- a/index.php
+++ b/index.php
@@ -99,7 +99,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);