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
Merge "Add SPARQL client to core"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiFeedWatchlist.php
diff --git
a/includes/api/ApiFeedWatchlist.php
b/includes/api/ApiFeedWatchlist.php
index
b9bb761
..
393e536
100644
(file)
--- a/
includes/api/ApiFeedWatchlist.php
+++ b/
includes/api/ApiFeedWatchlist.php
@@
-1,9
+1,5
@@
<?php
/**
<?php
/**
- *
- *
- * Created on Oct 13, 2006
- *
* Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
* Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
@@
-52,6
+48,7
@@
class ApiFeedWatchlist extends ApiBase {
public function execute() {
$config = $this->getConfig();
$feedClasses = $config->get( 'FeedClasses' );
public function execute() {
$config = $this->getConfig();
$feedClasses = $config->get( 'FeedClasses' );
+ $params = [];
try {
$params = $this->extractRequestParams();
try {
$params = $this->extractRequestParams();
@@
-166,7
+163,7
@@
class ApiFeedWatchlist extends ApiBase {
// Something is seriously wrong
$errorCode = 'internal_api_error';
}
// Something is seriously wrong
$errorCode = 'internal_api_error';
}
- $errorTitle = $this->msg( 'api-feed-error-title', $
msg->getApiCode()
);
+ $errorTitle = $this->msg( 'api-feed-error-title', $
errorCode
);
$errorText = $e->getMessage();
$feedItems[] = new FeedItem( $errorTitle, $errorText, '', '', '' );
}
$errorText = $e->getMessage();
$feedItems[] = new FeedItem( $errorTitle, $errorText, '', '', '' );
}
@@
-214,10
+211,7
@@
class ApiFeedWatchlist extends ApiBase {
preg_match( '!(.*)/\*\s*(.*?)\s*\*/(.*)!', $comment, $matches )
) {
global $wgParser;
preg_match( '!(.*)/\*\s*(.*?)\s*\*/(.*)!', $comment, $matches )
) {
global $wgParser;
-
- $sectionTitle = $wgParser->stripSectionName( $matches[2] );
- $sectionTitle = Sanitizer::normalizeSectionNameWhitespace( $sectionTitle );
- $titleUrl .= Title::newFromText( '#' . $sectionTitle )->getFragmentForURL();
+ $titleUrl .= $wgParser->guessSectionNameFromWikiText( $matches[ 2 ] );
}
$timestamp = $info['timestamp'];
}
$timestamp = $info['timestamp'];
@@
-306,6
+300,6
@@
class ApiFeedWatchlist extends ApiBase {
}
public function getHelpUrls() {
}
public function getHelpUrls() {
- return 'https://www.mediawiki.org/wiki/API:Watchlist_feed';
+ return 'https://www.mediawiki.org/wiki/
Special:MyLanguage/
API:Watchlist_feed';
}
}
}
}