[bbDev] [593] trunk/bb-includes/functions.php: Use request_uri in get_path.

Trent Adams trent.adams at gmail.com
Sun Jan 14 22:27:44 GMT 2007


Last update screwed the my tags.   Check it out:

http://forum.trentadams.ca/

Trent

On 1/14/07, m at wordpress.org <m at wordpress.org> wrote:
>
>
>  Revision 593 Author mdawaffe Date 2007-01-14 22:06:20 +0000 (Sun, 14 Jan
> 2007)
> Log Message Use request_uri in get_path. Fixes #543 props so1o
>
> Modified Paths
>
> trunk/bb-includes/functions.php
>
> Diff
> Modified: trunk/bb-includes/functions.php (592 => 593)
> --- trunk/bb-includes/functions.php 2007-01-12 22:39:49 UTC (rev 592)
> +++ trunk/bb-includes/functions.php 2007-01-14 22:06:20 UTC (rev 593)
> @@ -1057,12 +1057,12 @@
>  }
>
>  function get_path( $level = 1 ) {
> - if ( isset($_SERVER['PATH_INFO']) ) :
> - $url = explode('/',$_SERVER['PATH_INFO']);
> - return $url[$level];
> - else :
> - return;
> - endif;
> + $request = parse_url($_SERVER['REQUEST_URI']);
> + $path = $request['path'];
> + $bbpath = bb_get_option('path');
> + $path = preg_replace("#$bbpath#",'',$path,1);
> + $url = explode('/',$path);
> + return $url[$level];
>  }
>
>  function add_topic_tag( $topic_id, $tag ) {
>
>
> _______________________________________________
> bbDev mailing list
> bbDev at lists.bbpress.org
> http://lists.bbpress.org/mailman/listinfo/bbdev
>
>
>


-- 
[company] - Adams Ranch Ltd.
[email] -  trent.adams at gmail.com
[phone] -  (403) 901-9030
[office] - (403) 787-2204
[fax] -   (866) 773-6483


More information about the bbDev mailing list