Index: trunk/extensions/uniwiki/Layouts/Layouts.php |
— | — | @@ -76,9 +76,9 @@ |
77 | 77 | /* don't hijack the request if we are |
78 | 78 | * in the middle of switching modes, |
79 | 79 | * previewing, or showing changes */ |
80 | | - if ( $wgRequest->data['switch-mode'] |
81 | | - || $wgRequest->data['wpTextbox1'] |
82 | | - || $wgRequest->data['section-0'] ) |
| 80 | + if ( isset( $wgRequest->data['switch-mode'] ) |
| 81 | + || isset( $wgRequest->data['wpTextbox1'] ) |
| 82 | + || isset( $wgRequest->data['section-0'] ) ) |
83 | 83 | return true; |
84 | 84 | |
85 | 85 | /* if this page is new, |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | * and the page is in a namespace that is using the extension |
88 | 88 | * and we are not submitting the form (either saving OR preview) |
89 | 89 | * and we're NOT editing an old revision */ |
90 | | - if ( $article->fetchContent( $wgRequest->data['oldid'] ) === false |
| 90 | + if ( ( !isset( $wgRequest->data['oldid'] ) || $article->fetchContent( $wgRequest->data['oldid'] ) === false ) |
91 | 91 | && ( $wgRequest->getVal ( "layout" ) === NULL ) |
92 | 92 | && in_array ( $article->mTitle->getNamespace(), $wgLayoutWhiteList ) |
93 | 93 | && ( $wgRequest->getVal( "action" ) != "submit" ) ) |