Author Topic: Redirect the users to the homepage when you use an image_id which does not exist  (Read 3468 times)

0 Members and 1 Guest are viewing this topic.

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Hello,

I spent more than 4 hours looking in my 4images gallery for the code who redirect the users to the homepage when you use an image_id which does not exist.

For example:

/details.php?image_id=9000000000

First I thought this code do this action:

if (!$image_id) {
    
redirect($url);
}


but when I deleted it, I still be redirected to the homepage.


Any Idea?






Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
if (!check_permission("auth_viewcat"$cat_id) || !check_permission("auth_viewimage"$cat_id) || !$image_row) {
  
redirect($url);
}
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sun Zaza

  • Sr. Member
  • ****
  • Posts: 399
    • View Profile
Thanks v@no. I didn't expect that those lines will be so simple. Now I can going on with my project.
You get another THANK YOU from me.