restriction types on the protection form.
* (bug 8440) Allow preventing blocked users from editing their talk pages
* Improved upload file type detection for OpenDocument formats
+* (bug 15739) Add $wgArticlePathForCurid to make links with only curid=# as the
+ query string use the article path, rather than the script path
=== Bug fixes in 1.14 ===
* Requires memcached.
*/
$wgPasswordAttemptThrottle = array( 'count' => 5, 'seconds' => 300 );
+
+/**
+ * Allow using articlepath for links where the only querystring is a curid (e.g. use /wiki/Main_Page?curid=1)
+ * WARNING: This will not work for all hosts or configuration setup, so BE CAREFUL.
+ * Only use this setting if you have to, as it is not recommended.
+ */
+$wgArticlePathForCurid = false;
*/
public function getLocalURL( $query = '', $variant = false ) {
global $wgArticlePath, $wgScript, $wgServer, $wgRequest;
- global $wgVariantArticlePath, $wgContLang, $wgUser;
+ global $wgVariantArticlePath, $wgContLang, $wgUser, $wgArticlePathForCurid;
if( is_array( $query ) ) {
$query = wfArrayToCGI( $query );
}
} else {
$dbkey = wfUrlencode( $this->getPrefixedDBkey() );
- if ( $query == '' ) {
+ if ( $query == '' || ($wgArticlePathForCurid && substr_count( $query, '&' ) == 0 && strpos( $query, 'curid=' ) === 0 ) ) {
if( $variant != false && $wgContLang->hasVariants() ) {
if( $wgVariantArticlePath == false ) {
$variantArticlePath = "$wgScript?title=$1&variant=$2"; // default
} else {
$url = str_replace( '$1', $dbkey, $wgArticlePath );
}
+ if( $query ){
+ if( strpos( $url, '&' ) ){
+ $url .= '&' . $query;
+ }else{
+ $url .= '?' . $query;
+ }
+ }
} else {
global $wgActionPaths;
$url = false;