printPasswordForm() & getPageRedirect()

I updated my zenphoto to zenphoto-2011-06-08-trunk, after skipped a few version.

I found that after input the password it can't redirect to original album in password protect album. What I found the reason maybe the getPageRedirect() did not return the correct redirect path, the $_zp_gallery_page in getPageRedirect() in passwordform is "password.php", not the "album.php"

Comments

  • fatman Member
    Another symptom:

    The theme option is stored in options table, if an option, such as "thumb_size" have different value in different theme, seems the getOption() function only return the first match one. I have to manual delete other theme option, or make the theme option in same value.
  • fatman Member
    Just a reminder, I am not sure Zenphoto officially support this upgrade path or not.

    My previous version 1.3.1.2, it can't direct upgrade to 1.4.1-BETA(2011-05-25 nightly build). I have to upgrade to 1.4 first and then to 1.4.1-BETA.
  • THe upgrade "should work" but we have not tested it. What fails when you try the direct upgrade?

    GetOption() will retrieve the option for the "current theme". So it really depends on where the option is being retrieved. If the current theme is not set it will get the base option.
  • fatman Member
    The error of upgrade is the something like "pages" table not found, maybe zenpages table name changed is not working in 1.4.1 upgrade.

    I check the GetOption() in functions-basic.php, seem do not have theme handling, it just fetch the value in the array. So that if I have multiple value for the same option, it just use the last one in table natural order.
  • Yes, the zenpage pages table did change name somewhere along the way, that is handled in setup. Not sure why it would work in 1.4 but fail in 1.4.1.

    But that is not where the theme options are handled. See setupTheme().
  • fatman Member
    OK, I think I found where the bug is.

    The printAlbumThumbImage() and printImageThumb() direct use the constant THUMB_SIZE, that is defined by getOption() before calling setupTheme(), so that the THUMB_SIZE become the last value in options table.
  • Ah, an over zealous optimization. Those need to go back to not being defines for just the reason you notice. Tonight's build.
Sign In or Register to comment.