printAlbumStatistic function bug ?

Hi guys,
I've just noticed that using the printAlbumStatistic function on my index page adds the suffix (.php or .html as chosen in the general settings) of the page at the end of the generated links.
So I get links like this :
http://www.domain.com/album-title/sub-album-title/.html
which of course doesn't work.

Zenphoto 1.4.5.7 [59c22b2fba]
PHP : 5.3.22
MySQLi : 5.1.67
Theme : lightly custom ZPskeleton

And that's the same thing with the printLatestUpdatedAlbums function.

Comments

  • acrylian Administrator, Developer
    Looks like a bug, please open a ticket.
  • From looking at the code it seems that this would happen if there are no images in the album. Can you confirm that this is your case?
  • acrylian Administrator, Developer
    Line 182 "$albumpath" looks as if it could be updated with an proper $obj->getImageLink() call at least. But that part only takes effect if you set the parameter for the "firstimage of album" link.
  • Hi guys,
    thanks for the quick replies.
    Stephen, yes there are no images in the top level albums but only subalbums containing images.
    Acrylian, as far as I understood, by default the firstimage of album link is set to "false", so using the function like I do :
    <?php printAlbumStatistic(8,'latest',true,true,false,'','',320,150,true); ?>
    should not have changed something about it, right ?

    Do you still want me to open a ticket ?
  • No, fix is on the way.
  • Hi guys.
    Current nightly ?
  • acrylian Administrator, Developer
    Yes, but there are of course no "nightlies" anymore. The support build is updated when it is updated actually ;-)
  • Ah ok,
    I've just realized that it's done here (yeah, I know...) :
    https://github.com/zenphoto/zenphoto/blob/master/zp-core/zp-extensions/image_album_statistics.php

    Let's give a try...
  • It works.

    Many thanks, guys !
Sign In or Register to comment.