dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Deprecate $wgEnableAPI and $wgEnableWriteAPI
[lhc/web/wiklou.git]
/
includes
/
EditPage.php
diff --git
a/includes/EditPage.php
b/includes/EditPage.php
index
a8ed19d
..
3fc12ce
100644
(file)
--- a/
includes/EditPage.php
+++ b/
includes/EditPage.php
@@
-519,6
+519,7
@@
class EditPage {
* @deprecated since 1.30
*/
public function isOouiEnabled() {
* @deprecated since 1.30
*/
public function isOouiEnabled() {
+ wfDeprecated( __METHOD__, '1.30' );
return true;
}
return true;
}
@@
-821,8
+822,15
@@
class EditPage {
* @return bool
*/
protected function previewOnOpen() {
* @return bool
*/
protected function previewOnOpen() {
- $previewOnOpenNamespaces = $this->context->getConfig()->get( 'PreviewOnOpenNamespaces' );
+ $config = $this->context->getConfig();
+ $previewOnOpenNamespaces = $config->get( 'PreviewOnOpenNamespaces' );
$request = $this->context->getRequest();
$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;
if ( $request->getVal( 'preview' ) == 'yes' ) {
// Explicit override from request
return true;
@@
-4220,6
+4228,7
@@
class EditPage {
* @return array
*/
public function getCheckboxes( &$tabindex, $checked ) {
* @return array
*/
public function getCheckboxes( &$tabindex, $checked ) {
+ wfDeprecated( __METHOD__, '1.30' );
$checkboxes = [];
$checkboxesDef = $this->getCheckboxesDefinition( $checked );
$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 ) {
* @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 );
}
return $this->getCheckboxesWidget( $tabindex, $checked );
}
@@
-4352,6
+4362,7
@@
class EditPage {
/**
* Get the message key of the label for the button to save the page
*
/**
* Get the message key of the label for the button to save the page
*
+ * @since 1.30
* @return string
*/
protected function getSubmitButtonLabel() {
* @return string
*/
protected function getSubmitButtonLabel() {
@@
-4653,7
+4664,6
@@
class EditPage {
];
// The following classes can be used here:
];
// The following classes can be used here:
- // * mw-editfont-default
// * mw-editfont-monospace
// * mw-editfont-sans-serif
// * mw-editfont-serif
// * mw-editfont-monospace
// * mw-editfont-sans-serif
// * mw-editfont-serif