aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-09-23 11:19:26 +0000
committermistic100 <mistic@piwigo.org>2012-09-23 11:19:26 +0000
commit4e65d9af4667f3d8556522843f776f1fa074ea21 (patch)
treeea39e514f64b1cea7cd8df375eae4f1fc38e3682 /index.php
parent7e33b84e770ddab61ef1d5c67061cd41c189f20e (diff)
feature 2614: pagination on albums
git-svn-id: http://piwigo.org/svn/trunk@18165 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--index.php31
1 files changed, 18 insertions, 13 deletions
diff --git a/index.php b/index.php
index 02cd6369f..12797cc0b 100644
--- a/index.php
+++ b/index.php
@@ -29,10 +29,6 @@ include(PHPWG_ROOT_PATH.'include/section_init.inc.php');
// Check Access and exit when user status is not ok
check_status(ACCESS_GUEST);
-if (!isset($page['start']))
-{
- $page['start'] = 0;
-}
// access authorization check
if (isset($page['category']))
@@ -74,6 +70,7 @@ if (isset($_GET['display']))
}
//-------------------------------------------------------------- initialization
+// navigation bar
$page['navigation_bar'] = array();
if (count($page['items']) > $page['nb_image_page'])
{
@@ -82,10 +79,25 @@ if (count($page['items']) > $page['nb_image_page'])
count($page['items']),
$page['start'],
$page['nb_image_page'],
- true
+ true, 'start'
);
}
+$page['cats_navigation_bar'] = array();
+if (count($page['categories']) > $conf['nb_categories_page'])
+{
+ $page['cats_navigation_bar'] = create_navigation_bar(
+ duplicate_index_url(array(), array('starta')),
+ count($page['categories']),
+ $page['starta'],
+ $conf['nb_categories_page'],
+ true, 'starta'
+ );
+}
+
+$template->assign( 'thumb_navbar', $page['navigation_bar'] );
+$template->assign( 'cats_navbar', $page['cats_navigation_bar'] );
+
// caddie filling :-)
if (isset($_GET['caddie']))
{
@@ -242,8 +254,6 @@ if ( $page['section']=='search' and $page['start']==0 and
}
}
-// navigation bar
-$template->assign( 'navbar', $page['navigation_bar'] );
if ( $conf['index_sort_order_input']
and count($page['items']) > 0
@@ -288,12 +298,7 @@ if ( isset($page['category']['count_categories']) and $page['category']['count_c
}
//------------------------------------------------------ main part : thumbnails
-if ( 0==$page['start']
- and !isset($page['flat'])
- and !isset($page['chronology_field'])
- and ('recent_cats'==$page['section'] or 'categories'==$page['section'])
- and (!isset($page['category']['count_categories']) or $page['category']['count_categories']>0 )
- )
+if ( !empty($page['categories']) )
{
include(PHPWG_ROOT_PATH.'include/category_cats.inc.php');
}