Avoid key conflict errors in User::addToDatabase
[lhc/web/wiklou.git] / includes / EditPage.php
index b1a7a33..98e0ec4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Page edition user interface.
+ * User interface for page editing.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -799,7 +799,11 @@ class EditPage {
                        } else {
                                // If we receive the last parameter of the request, we can fairly
                                // claim the POST request has not been truncated.
-                               $this->incompleteForm = !$request->getVal( 'wpUltimateParam' );
+
+                               // TODO: softened the check for cutover.  Once we determine
+                               // that it is safe, we should complete the transition by
+                               // removing the "edittime" clause.
+                               $this->incompleteForm = ( !$request->getVal( 'wpUltimateParam' ) && is_null( $this->edittime ) );
                        }
                        if ( $this->incompleteForm ) {
                                # If the form is incomplete, force to preview.
@@ -2302,7 +2306,7 @@ class EditPage {
                        if ( $title instanceof Title && $title->exists() && $title->userCan( 'read' ) ) {
                                global $wgOut;
                                // Added using template syntax, to take <noinclude>'s into account.
-                               $wgOut->addWikiTextTitleTidy( '{{:' . $title->getFullText() . '}}', $this->mTitle );
+                               $wgOut->addWikiTextTitleTidy( '<div class="mw-editintro">{{:' . $title->getFullText() . '}}</div>', $this->mTitle );
                                return true;
                        }
                }