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

--- Comment #6 from Daniel Friesen <[email protected]> 
2012-04-25 00:05:17 UTC ---
The code would go in the ShortURL extension. You'd likely use a configuration
variable for it, and you'd use the WebRequestPathInfoRouter hook.

Something like:

$wgShortUrlPath = "/s/$1";
$wgHooks['WebRequestPathInfoRouter'][] = 'egShortURLRouter';
function egShortURLRouter( $router ) {
  global $wgShortUrlPath;
  if ( $wgShortUrlPath ) {
    $router->add( $wgShortUrlPath, array( 'title' => Special::getTitleFor(
'ShortUrl', '$1' ) );
  }
  return true;
}

-- 
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.
You are the assignee for the bug.

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

Reply via email to