Update OOjs UI to v0.23.5
[lhc/web/wiklou.git] / includes / EditPage.php
index aa1f205..3fc12ce 100644 (file)
@@ -519,6 +519,7 @@ class EditPage {
         * @deprecated since 1.30
         */
        public function isOouiEnabled() {
+               wfDeprecated( __METHOD__, '1.30' );
                return true;
        }
 
@@ -821,8 +822,15 @@ class EditPage {
         * @return bool
         */
        protected function previewOnOpen() {
-               $previewOnOpenNamespaces = $this->context->getConfig()->get( 'PreviewOnOpenNamespaces' );
+               $config = $this->context->getConfig();
+               $previewOnOpenNamespaces = $config->get( 'PreviewOnOpenNamespaces' );
                $request = $this->context->getRequest();
+               if ( $config->get( 'RawHtml' ) ) {
+                       // If raw HTML is enabled, disable preview on open
+                       // since it has to be posted with a token for
+                       // security reasons
+                       return false;
+               }
                if ( $request->getVal( 'preview' ) == 'yes' ) {
                        // Explicit override from request
                        return true;
@@ -4220,6 +4228,7 @@ class EditPage {
         * @return array
         */
        public function getCheckboxes( &$tabindex, $checked ) {
+               wfDeprecated( __METHOD__, '1.30' );
                $checkboxes = [];
                $checkboxesDef = $this->getCheckboxesDefinition( $checked );
 
@@ -4275,6 +4284,7 @@ class EditPage {
         * @return array Associative array of string keys to OOUI\FieldLayout instances
         */
        public function getCheckboxesOOUI( &$tabindex, $checked ) {
+               wfDeprecated( __METHOD__, '1.30' );
                return $this->getCheckboxesWidget( $tabindex, $checked );
        }
 
@@ -4654,7 +4664,6 @@ class EditPage {
                        ];
 
                // The following classes can be used here:
-               // * mw-editfont-default
                // * mw-editfont-monospace
                // * mw-editfont-sans-serif
                // * mw-editfont-serif