Closed (fixed)
Project:
Gallery
Version:
4.0.0
Component:
Modules
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2003 at 08:23 UTC
Updated:
25 Apr 2003 at 15:37 UTC
The navigation in a gallery is broken (was OK in 4.1.0 version). When a gallery has more than one page, the navigation links are respectively
http://localhost/drupal/?q=-1
and
http://localhost/drupal/?q=1
It should be (for a two pages gallery which taxonomy id is 3)
http://localhost/drupal/?q=image/tid/3/page/1 (for )
Comments
Comment #1
bruno commentedmmmh, parser doesn't like double '>'...
The navigation in a gallery is broken (was OK in 4.1.0 version). When a gallery has more than one page, the << and >> navigation links are respectively
http://localhost/drupal/?q=-1and
http://localhost/drupal/?q=1It should be (for a two pages gallery which taxonomy id is 3)
http://localhost/drupal/?q=image/tid/3/page/1 (for <<)http://localhost/drupal/?q=image/tid/3/page/2 (for >>)Comment #2
bruno commentedLooks like the problem is related to the l() function used in image_thumb_browser(). In 4.1.0 version of the image.module the function lm() was used.
The call:
l(">>", "image/tid/". $data["tid"] ."/page/". $data["page"] + 1)always returns "1", while the call:
l("<<", "image/tid/". $data["tid"] ."/page/". $data["page"] - 1)always returns "-1"
Should we fix l() function or patch image.module?
Comment #3
bruno commentedFixed!
Adding a couple of parenthesis solved the problem:
l("<<", "image/tid/". $data["tid"] ."/page/". <b>(</b>$data["page"] - 1<b>)</b>)and
l(">>", "image/tid/". $data["tid"] ."/page/". <b>(</b>$data["page"] + 1<b>)</b>)Comment #4
dries commentedGreat. Are you able to send a patch to the developers mailing list? On *nix, you can create a patch using the following command:
cvs diff -u modules/image.module > image.module.patch. If not, I'd be happy to make these (and the other image module) changes manually.Comment #5
bruno commentedI'm not on *nix, but I have cygwin. I'll try to make a patch, but I have to clean up my local copy of image.module first...
Comment #6
bruno commentedPatch sent to drupal-devel list.
Comment #7
killes@www.drop.org commentedI applied the patch.