replace TYPE= with ENGINE=, (supported since 4.0, TYPE deprecated since 4.1)
[lhc/web/wiklou.git] / includes / Wiki.php
index fa7d783..0a0bd42 100644 (file)
@@ -202,7 +202,7 @@ class MediaWiki {
                $article = $this->articleFromTitle( $title );
                
                // Namespace might change when using redirects
-               if( $action == 'view' && !$request->getVal( 'oldid' ) && 
+               if( $action == 'view' && !$request->getVal( 'oldid' ) &&
                                                $request->getVal( 'redirect' ) != 'no' ) {
                        $dbr=&wfGetDB(DB_SLAVE);
                        
@@ -267,7 +267,7 @@ class MediaWiki {
                foreach( $updates as $up ) {
                        $up->doUpdate();
                }
-               wfProfileOut( 'MediaWiki::doUpdates' );         
+               wfProfileOut( 'MediaWiki::doUpdates' );
        }
 
        /**
@@ -281,7 +281,7 @@ class MediaWiki {
                }
                if ( $wgJobRunRate < 1 ) {
                        $max = mt_getrandmax();
-                       if ( mt_rand( 0, $max ) < $max * $wgJobRunRate ) {
+                       if ( mt_rand( 0, $max ) > $max * $wgJobRunRate ) {
                                return;
                        }
                        $n = 1;
@@ -408,8 +408,8 @@ class MediaWiki {
                                if( wfRunHooks( 'UnknownAction', array( $action, $article ) ) ) {
                                        $output->errorpage( 'nosuchaction', 'nosuchactiontext' );
                                }
+               }
                wfProfileOut( 'MediaWiki::performAction' );
-       }
 
        
        }