Merge "Don't try and run a special page through action=parsex"
authorIAlex <ialex.wiki@gmail.com>
Tue, 23 Oct 2012 16:14:39 +0000 (16:14 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 23 Oct 2012 16:14:39 +0000 (16:14 +0000)
includes/EditPage.php
includes/Message.php
includes/db/Database.php

index 15321fc..d2db142 100644 (file)
@@ -2931,11 +2931,7 @@ HTML
                                # Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview
                                if( $level && $format ) {
                                        $note = "<div id='mw-{$level}{$format}preview'>" . wfMessage( "{$level}{$format}preview" )->text()  . "</div>";
-                               } else {
-                                       $note = wfMessage( 'previewnote' )->text() ;
                                }
-                       } else {
-                               $note = wfMessage( 'previewnote' )->text() ;
                        }
 
                        $rt = $content->getRedirectChain();
index 824f177..2feaed2 100644 (file)
@@ -618,7 +618,7 @@ class Message {
                } elseif ( !is_array( $param ) ) {
                        return array( 'before', $param );
                } else {
-                       throw new MWException( "Invalid message parameter" );
+                       throw new MWException( "Invalid message parameter: " . serialize( $param ) );
                }
        }
 
index 48aac9d..c9d2fda 100644 (file)
@@ -1800,7 +1800,7 @@ abstract class DatabaseBase implements DatabaseType {
                                $list .= "$value";
                        } elseif ( ( $mode == LIST_AND || $mode == LIST_OR ) && is_array( $value ) ) {
                                if ( count( $value ) == 0 ) {
-                                       throw new MWException( __METHOD__ . ': empty input' );
+                                       throw new MWException( __METHOD__ . ": empty input for field $field" );
                                } elseif ( count( $value ) == 1 ) {
                                        // Special-case single values, as IN isn't terribly efficient
                                        // Don't necessarily assume the single key is 0; we don't