Skip to content

Commit

Permalink
Fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylian committed Apr 4, 2014
1 parent 328511f commit 3b9c9a4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions single_item_pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

$plugin_description = gettext('Provides extra functionality for numbered pagination of single items (images, albums, Zenpage articles and pages).');
$plugin_author = "Malte Müller (acrylian)";
$plugin_version = '1.0';
$plugin_version = '1.0.1';

/**
* Prints the single image page navigation with prev/next links and the page number list
Expand Down Expand Up @@ -251,7 +251,7 @@ function printPrevNextItemPagelistWithNav($mode='image',$next='next',$prev='prev
break;
case 'album':
$album = $albums[$k1-1];
$obj = new Album($_zp_gallery,$album);
$obj = newAlbum($album);
$link = $obj->getLink();
break;
case 'article':
Expand Down Expand Up @@ -291,8 +291,8 @@ function printPrevNextItemPagelistWithNav($mode='image',$next='next',$prev='prev
break;
case 'album':
$album = $albums[$i-1];
$obj = new Album($_zp_gallery,$album);
$link = $obj->getAlbumLink();
$obj = newAlbum($album);
$link = $obj->getLink();
break;
case 'article':
if($i == 1 AND getOption("zenpage_zp_index_news")) {
Expand Down Expand Up @@ -325,7 +325,7 @@ function printPrevNextItemPagelistWithNav($mode='image',$next='next',$prev='prev
break;
case 'album':
$album = $albums[$k2-1];
$obj = new Album($_zp_gallery,$album);
$obj = newAlbum($album);
$link = $obj->getLink();
break;
case 'article':
Expand All @@ -346,7 +346,8 @@ function printPrevNextItemPagelistWithNav($mode='image',$next='next',$prev='prev
switch($mode) {
case 'image':
if($_zp_current_album->isDynamic()) {
$img = $_zp_current_search->getImage($total-1);
$imgindex = $total-1;
$img = $_zp_current_album->getImage($imgindex);
$link = $img->getLink();
} else {
$img = $_zp_current_album->getImage($_zp_current_album->getNumImages() - 1);
Expand All @@ -355,7 +356,7 @@ function printPrevNextItemPagelistWithNav($mode='image',$next='next',$prev='prev
break;
case 'album':
$album = $albums[($total-1)];
$obj = new Album($_zp_gallery,$album);
$obj = newAlbum($album);
$link = $obj->getLink();
break;
case 'article':
Expand Down Expand Up @@ -383,7 +384,7 @@ function printPrevNextItemPagelistWithNav($mode='image',$next='next',$prev='prev
if($current != $total) {
$hasnext = true;
$album = $albums[$current];
$obj = new Album($_zp_gallery,$album);
$obj = newAlbum($album);
$link = $obj->getLink();
}
break;
Expand Down

0 comments on commit 3b9c9a4

Please sign in to comment.