*/
class ApiProtect extends ApiBase {
public function execute() {
- global $wgContLang;
-
$params = $this->extractRequestParams();
$pageObj = $this->getTitleOrPageId( $params, 'fromdbmaster' );
}
$resultProtections[] = [
$p[0] => $protections[$p[0]],
- 'expiry' => $wgContLang->formatExpiry( $expiryarray[$p[0]], TS_ISO_8601, 'infinite' ),
+ 'expiry' => ApiResult::formatExpiry( $expiryarray[$p[0]], 'infinite' ),
];
}
}
public function getHelpUrls() {
- return 'https://www.mediawiki.org/wiki/API:Protect';
+ return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Protect';
}
}