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
EditPage: Don't allow clients that mangle unicode to edit
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiEditPage.php
diff --git
a/includes/api/ApiEditPage.php
b/includes/api/ApiEditPage.php
index
2245195
..
94d6e97
100644
(file)
--- a/
includes/api/ApiEditPage.php
+++ b/
includes/api/ApiEditPage.php
@@
-62,7
+62,7
@@
class ApiEditPage extends ApiBase {
$redirValues = [];
$redirValues = [];
- /** @var
$newTitle
Title */
+ /** @var
Title $new
Title */
foreach ( $titles as $id => $newTitle ) {
if ( !isset( $titles[$id - 1] ) ) {
$titles[$id - 1] = $oldTitle;
foreach ( $titles as $id => $newTitle ) {
if ( !isset( $titles[$id - 1] ) ) {
$titles[$id - 1] = $oldTitle;
@@
-266,6
+266,7
@@
class ApiEditPage extends ApiBase {
'wpIgnoreBlankArticle' => true,
'wpIgnoreSelfRedirect' => true,
'bot' => $params['bot'],
'wpIgnoreBlankArticle' => true,
'wpIgnoreSelfRedirect' => true,
'bot' => $params['bot'],
+ 'wpUnicodeCheck' => EditPage::UNICODE_CHECK,
];
if ( !is_null( $params['summary'] ) ) {
];
if ( !is_null( $params['summary'] ) ) {
@@
-359,7
+360,7
@@
class ApiEditPage extends ApiBase {
$articleContext->setWikiPage( $pageObj );
$articleContext->setUser( $this->getUser() );
$articleContext->setWikiPage( $pageObj );
$articleContext->setUser( $this->getUser() );
- /** @var
$articleObject Article
*/
+ /** @var
Article $articleObject
*/
$articleObject = Article::newFromWikiPage( $pageObj, $articleContext );
$ep = new EditPage( $articleObject );
$articleObject = Article::newFromWikiPage( $pageObj, $articleContext );
$ep = new EditPage( $articleObject );