Introducing 'frameless' keyword to [[Image:]] syntax which respects the user preferen...
[lhc/web/wiklou.git] / includes / Wiki.php
index 0080c67..601a722 100644 (file)
@@ -61,7 +61,8 @@ class MediaWiki {
                list( $host, $lag ) = $wgLoadBalancer->getMaxLag();
                if ( $lag > $maxLag ) {
                        header( 'HTTP/1.1 503 Service Unavailable' );
-                       header( 'Retry-After: ' . max( intval( $maxLag ), 5 );
+                       header( 'Retry-After: ' . max( intval( $maxLag ), 5 ) );
+                       header( 'X-Database-Lag: ' . intval( $lag ) );
                        header( 'Content-Type: text/plain' );
                        echo "Waiting for $host: $lag seconds lagged\n";
                        return false;
@@ -157,7 +158,7 @@ class MediaWiki {
                                $title = SpecialPage::getTitleFor( 'Badtitle' );
                                throw new ErrorPageError( 'badtitle', 'badtitletext' );
                        }
-               } else if ( ( $action == 'view' ) &&
+               } else if ( ( $action == 'view' ) && !$wgRequest->wasPosted() && 
                        (!isset( $this->GET['title'] ) || $title->getPrefixedDBKey() != $this->GET['title'] ) &&
                        !count( array_diff( array_keys( $this->GET ), array( 'action', 'title' ) ) ) )
                {