Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Bug Fixes
Author Message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sun Apr 01, 2007 12:21 pm Reply with quote

Thanks to Susann for finding and reporting this!

Basically, what is happening is that when an article is rated on, the "Back to Article" link is broken. It is always using a story id of "0". There are errant "&;" instead of "&" in the Header() functions.

Here is the fix if you are interested in fixing this:

=== OPEN ===

modules/News/index.php

=== FIND ===

Code:


        if ($a == 1) {
            Header('Location: modules.php?name=News&op=rate_complete&;sid='.$sid.'&;rated=1');
        } else {
                $result = $db->sql_query('update '.$prefix.'_stories set score=score+'.$score.', ratings=ratings+1 where sid=\''.$sid.'\'');
                $info = base64_encode("$rcookie$sid:");
                setcookie('ratecookie',"$info",time()+3600);
                update_points(7);
                Header('Location: modules.php?name=News&op=rate_complete&;sid='.$sid.$r_options);
        }


=== REPLACE WITH ===

Code:


        if ($a == 1) {
            Header('Location: modules.php?name=News&op=rate_complete&sid='.$sid.'&rated=1');
        } else {
                $result = $db->sql_query('update '.$prefix.'_stories set score=score+'.$score.', ratings=ratings+1 where sid=\''.$sid.'\'');
                $info = base64_encode("$rcookie$sid:");
                setcookie('ratecookie',"$info",time()+3600);
                update_points(7);
                Header('Location: modules.php?name=News&op=rate_complete&sid='.$sid.$r_options);
        }


=== DONE ===

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Sun Apr 01, 2007 2:48 pm Reply with quote

Thanks! Smile

_________________
Only registered users can see links on this board! Get registered or login! - An Event Calendar for PHP-Nuke
Only registered users can see links on this board! Get registered or login! - A Google Maps Nuke Module 
View user's profile Send private message
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Bug Fixes

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©