https://bugzilla.wikimedia.org/show_bug.cgi?id=29722

Roan Kattouw <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Roan Kattouw <[email protected]> 2011-07-15 01:44:20 
UTC ---
(In reply to comment #1)
> Maybe we could add some kind of check for the redirect...
> 
> if ( strstr( $page, '#REDIRECT' ) ) {
>    $pattern = '/#REDIRECT\s*\[\[(.*)\]\]/i';
>    $tester = preg_match( $pattern, $page, $matches );
>    $talkPageTitle = $matches[1];
> }
> 
Nooooo! There are better ways to check for this, don't reinvent the wheel.
There's Article::getRedirectTarget() (technically in the WikiPage class in
trunk) on the PHP side, and an API call for this on the JS side.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to