* @return FeedItem
*/
private function createFeedItem( $info ) {
+ if ( !isset( $info['title'] ) ) {
+ // Probably a revdeled log entry, skip it.
+ return null;
+ }
+
$titleStr = $info['title'];
$title = Title::newFromText( $titleStr );
$curidParam = array();
// Probably a formerly-valid title that's now conflicting with an
// interwiki prefix or the like.
if ( isset( $info['pageid'] ) ) {
- $title = Title::newFromId( $info['pageid'] );
+ $title = Title::newFromID( $info['pageid'] );
$curidParam = array( 'curid' => $info['pageid'] );
}
if ( !$title || $title->isExternal() ) {
}
$timestamp = $info['timestamp'];
- $user = $info['user'];
- $completeText = "$comment ($user)";
+ if ( isset( $info['user'] ) ) {
+ $user = $info['user'];
+ $completeText = "$comment ($user)";
+ } else {
+ $user = '';
+ $completeText = (string)$comment;
+ }
return new FeedItem( $titleStr, $completeText, $titleUrl, $timestamp, $user );
}
if ( !isset( $p[ApiBase::PARAM_HELP_MSG] ) ) {
$p[ApiBase::PARAM_HELP_MSG] = "apihelp-query+watchlist-param-$from";
}
+ if ( isset( $p[ApiBase::PARAM_TYPE] ) && is_array( $p[ApiBase::PARAM_TYPE] ) &&
+ isset( $p[ApiBase::PARAM_HELP_MSG_PER_VALUE] )
+ ) {
+ foreach ( $p[ApiBase::PARAM_TYPE] as $v ) {
+ if ( !isset( $p[ApiBase::PARAM_HELP_MSG_PER_VALUE][$v] ) ) {
+ $p[ApiBase::PARAM_HELP_MSG_PER_VALUE][$v] = "apihelp-query+watchlist-paramvalue-$from-$v";
+ }
+ }
+ }
$ret[$to] = $p;
}
} else {