[Bb-trac] Re: [bbPress] #1126: repermalink fails, causing redirect loop on SunOS (Solaris?), and 404 errors.

bbPress bb-trac at lists.bbpress.org
Thu Jun 25 13:44:11 GMT 2009


#1126: repermalink fails, causing redirect loop on SunOS (Solaris?), and 404
errors.
----------------------------------------------------------------------+-----
 Reporter:  SteveBooth                                                |        Owner:          
     Type:  defect                                                    |       Status:  new     
 Priority:  high                                                      |    Milestone:  1.5     
Component:  Front-end                                                 |      Version:  1.0-rc-1
 Severity:  major                                                     |   Resolution:          
 Keywords:  Sun SunOS Solaris bb_repermalink redirect loop 404 error  |  
----------------------------------------------------------------------+-----
Comment (by SteveBooth):

 I have a further question.  Here is the beginning of bb_repermalink:

 {{{
 function bb_repermalink() {
         global $page;
         $location = bb_get_location();
         $uri = $_SERVER['REQUEST_URI'];
         if ( isset($_GET['id']) )
                 $id = $_GET['id'];
         else
                 $id = bb_get_path();
         $_original_id = $id;

         do_action( 'pre_permalink', $id );

         $id = apply_filters( 'bb_repermalink', $id );

         switch ($location) {
                 case 'front-page':
                         $path = null;
                         $querystring = null;
                         if ($page > 1) {
                                 if (bb_get_option( 'mod_rewrite' )) {
                                         $path = 'page/' . $page;
                                 } else {
                                         $querystring = array('page' =>
 $page);
                                 }
                         }
                         $permalink = bb_get_uri($path, $querystring,
 BB_URI_CONTEXT_HEADER);
                         $issue_404 = true;
                         break;
 }}}

 I'm particularly concerned with the 'if ($page >1)' in the 'front-page'
 case.  Can someone please tell me where the $page variable is initialized
 in the prior code? Because as it stands, to my eye, it will always be
 zero.

-- 
Ticket URL: <http://trac.bbpress.org/ticket/1126#comment:2>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list