[[Kategorie:Wissen]][[Kategorie:Mediawiki]] ==Patches== Patch um unbekannte Namespaces zu verstecken und das Cachen des Feeds zu verhindern wenn $wgFeedCacheTimeout gleich 0 ist.
Index: includes/SpecialRecentchanges.php =================================================================== --- includes/SpecialRecentchanges.php (revision 18244) +++ includes/SpecialRecentchanges.php (working copy) @@ -17,6 +17,7 @@ global $wgUser, $wgOut, $wgRequest, $wgUseRCPatrol; global $wgRCShowWatchingUsers, $wgShowUpdatedMarker; global $wgAllowCategorizedRecentChanges ; + global $wgCanonicalNamespaceNames; $fname = 'wfSpecialRecentchanges'; # Get query parameters @@ -155,6 +156,7 @@ # Namespace filtering $hidem .= is_null( $namespace ) ? '' : ' AND rc_namespace' . ($invert ? '!=' : '=') . $namespace; + $hidem .= ' AND rc_namespace IN (0,'.join( ',', array_map( 'intval', array_keys($wgCanonicalNamespaceNames) ) ).')'; // This is the big thing! @@ -370,10 +372,11 @@ rcDoOutputFeed( $rows, $feed ); $cachedFeed = ob_get_contents(); ob_end_flush(); - - $expire = 3600 * 24; # One day - $messageMemc->set( $key, $cachedFeed ); - $messageMemc->set( $timekey, wfTimestamp( TS_MW ), $expire ); + if ( $wgFeedCacheTimeout > 0 ) { + $expire = 3600 * 24; # One day + $messageMemc->set( $key, $cachedFeed ); + $messageMemc->set( $timekey, wfTimestamp( TS_MW ), $expire ); + } } return true; } Index: includes/Revision.php =================================================================== --- includes/Revision.php (revision 18244) +++ includes/Revision.php (working copy) @@ -165,6 +165,8 @@ * @static */ private static function loadFromConds( &$db, $conditions ) { + global $wgCanonicalNamespaceNames; + array_push( $conditions, 'page_namespace IN (0,'.join( ',', array_map( 'intval', array_keys($wgCanonicalNamespaceNames) ) ).')' ); $res = Revision::fetchFromConds( $db, $conditions ); if( $res ) { $row = $res->fetchObject();Der Patch für Title.php sorgt dafür, daß Mediawiki nicht solche häßlichen URLs mit index.php im Namen generiert wenn Parameter zu übergeben sind.
Index: includes/Title.php =================================================================== --- includes/Title.php (revision 18244) +++ includes/Title.php (working copy) @@ -879,6 +879,8 @@ } else $url = str_replace( '$1', $dbkey, $wgArticlePath ); + } else if ( $query && $query != '' ) { + $url = str_replace( '$1', $dbkey, $wgArticlePath )."?".$query; } else { global $wgActionPaths; $url = false;Der Patch sorgt dafür, daß Special:Allpages nicht auf die index.php submitted.
Index: includes/SpecialAllpages.php =================================================================== --- includes/SpecialAllpages.php (revision 18464) +++ includes/SpecialAllpages.php (working copy) @@ -50,7 +50,6 @@ * @param string $from Article name we are starting listing at. */ function namespaceForm ( $namespace = NS_MAIN, $from = '' ) { - global $wgScript; $t = SpecialPage::getTitleFor( $this->name ); $namespaceselect = HTMLnamespaceselector($namespace, null); @@ -59,8 +58,7 @@ . htmlspecialchars ( $from ) . '"/>'; $submitbutton = ''; + $out = "