Merge "Revert "Log the reason why revision->getContent() returns null""
[lhc/web/wiklou.git] / includes / api / ApiProtect.php
index 746dc9a..f67d3b3 100644 (file)
@@ -1,9 +1,5 @@
 <?php
 /**
- *
- *
- * Created on Sep 1, 2007
- *
  * Copyright © 2007 Roan Kattouw "<Firstname>.<Lastname>@gmail.com"
  *
  * This program is free software; you can redistribute it and/or modify
@@ -29,8 +25,6 @@
  */
 class ApiProtect extends ApiBase {
        public function execute() {
-               global $wgContLang;
-
                $params = $this->extractRequestParams();
 
                $pageObj = $this->getTitleOrPageId( $params, 'fromdbmaster' );
@@ -101,7 +95,7 @@ class ApiProtect extends ApiBase {
                        }
                        $resultProtections[] = [
                                $p[0] => $protections[$p[0]],
-                               'expiry' => $wgContLang->formatExpiry( $expiryarray[$p[0]], TS_ISO_8601, 'infinite' ),
+                               'expiry' => ApiResult::formatExpiry( $expiryarray[$p[0]], 'infinite' ),
                        ];
                }
 
@@ -201,6 +195,6 @@ class ApiProtect extends ApiBase {
        }
 
        public function getHelpUrls() {
-               return 'https://www.mediawiki.org/wiki/API:Protect';
+               return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Protect';
        }
 }