forked from extern/nixos-wiki-infra
Merge pull request #15 from Mic92/drop-patches
AuthManagerOAuth: fixup dependencies
This commit is contained in:
commit
6eadd35908
@ -1,32 +0,0 @@
|
|||||||
From c88ac02c0ef24025f00d359e0bec96dbf2583357 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
|
||||||
Date: Sat, 4 Nov 2023 18:28:03 +0000
|
|
||||||
Subject: [PATCH 1/2] MWCallbackStream::write: add missing return type
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
PHP Fatal Error from line 49 of /nix/store/rh28r8z3fqnqlfmqf0yn3ka1laysw1cm-mediawiki-full-1.40.1/share/mediawiki/includes/http/MWCallbackStream.php:
|
|
||||||
Declaration of MWCallbackStream::write($string) must be compatible with Psr\Http\Message\StreamInterface::write(string $string): int
|
|
||||||
|
|
||||||
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
|
|
||||||
---
|
|
||||||
includes/http/MWCallbackStream.php | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/includes/http/MWCallbackStream.php b/includes/http/MWCallbackStream.php
|
|
||||||
index 3566019dcd6..c1bc911940b 100644
|
|
||||||
--- a/includes/http/MWCallbackStream.php
|
|
||||||
+++ b/includes/http/MWCallbackStream.php
|
|
||||||
@@ -46,7 +46,7 @@ public function __construct( callable $cb ) {
|
|
||||||
$this->callback = $cb;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function write( $string ) {
|
|
||||||
+ public function write( $string ): int {
|
|
||||||
return call_user_func( $this->callback, $this, $string );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.42.0
|
|
||||||
|
|
@ -1,113 +0,0 @@
|
|||||||
From fb19bb8089981c5fc56c9532f5ab19bde98446aa Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
|
||||||
Date: Sat, 4 Nov 2023 18:39:57 +0000
|
|
||||||
Subject: [PATCH 2/2] StringStream: add missing types
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
|
|
||||||
---
|
|
||||||
includes/Rest/StringStream.php | 28 ++++++++++++++--------------
|
|
||||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/includes/Rest/StringStream.php b/includes/Rest/StringStream.php
|
|
||||||
index bd7295c28b5..1131dfa8d0c 100644
|
|
||||||
--- a/includes/Rest/StringStream.php
|
|
||||||
+++ b/includes/Rest/StringStream.php
|
|
||||||
@@ -36,34 +36,34 @@ public function copyToStream( $stream ) {
|
|
||||||
fwrite( $stream, $this->getContents() );
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function __toString() {
|
|
||||||
+ public function __toString(): string {
|
|
||||||
return $this->contents;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function close() {
|
|
||||||
+ public function close(): void {
|
|
||||||
}
|
|
||||||
|
|
||||||
public function detach() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function getSize() {
|
|
||||||
+ public function getSize(): ?int {
|
|
||||||
return strlen( $this->contents );
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function tell() {
|
|
||||||
+ public function tell(): int {
|
|
||||||
return $this->offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function eof() {
|
|
||||||
+ public function eof(): bool {
|
|
||||||
return $this->offset >= strlen( $this->contents );
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function isSeekable() {
|
|
||||||
+ public function isSeekable(): bool {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function seek( $offset, $whence = SEEK_SET ) {
|
|
||||||
+ public function seek( int $offset, int $whence = SEEK_SET ): void {
|
|
||||||
switch ( $whence ) {
|
|
||||||
case SEEK_SET:
|
|
||||||
$this->offset = $offset;
|
|
||||||
@@ -88,15 +88,15 @@ public function seek( $offset, $whence = SEEK_SET ) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function rewind() {
|
|
||||||
+ public function rewind(): void {
|
|
||||||
$this->offset = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function isWritable() {
|
|
||||||
+ public function isWritable(): bool {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function write( $string ) {
|
|
||||||
+ public function write( string $string ): int {
|
|
||||||
if ( $this->offset === strlen( $this->contents ) ) {
|
|
||||||
$this->contents .= $string;
|
|
||||||
} else {
|
|
||||||
@@ -107,11 +107,11 @@ public function write( $string ) {
|
|
||||||
return strlen( $string );
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function isReadable() {
|
|
||||||
+ public function isReadable(): bool {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function read( $length ) {
|
|
||||||
+ public function read( int $length ): string {
|
|
||||||
if ( $this->offset === 0 && $length >= strlen( $this->contents ) ) {
|
|
||||||
$ret = $this->contents;
|
|
||||||
} elseif ( $this->offset >= strlen( $this->contents ) ) {
|
|
||||||
@@ -123,7 +123,7 @@ public function read( $length ) {
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function getContents() {
|
|
||||||
+ public function getContents() : string {
|
|
||||||
if ( $this->offset === 0 ) {
|
|
||||||
$ret = $this->contents;
|
|
||||||
} elseif ( $this->offset >= strlen( $this->contents ) ) {
|
|
||||||
@@ -135,7 +135,7 @@ public function getContents() {
|
|
||||||
return $ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public function getMetadata( $key = null ) {
|
|
||||||
+ public function getMetadata( ?string $key = null ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.42.0
|
|
||||||
|
|
@ -23,20 +23,14 @@
|
|||||||
nginx.hostName = config.services.nixos-wiki.hostname;
|
nginx.hostName = config.services.nixos-wiki.hostname;
|
||||||
uploadsDir = "/var/lib/mediawiki-uploads/";
|
uploadsDir = "/var/lib/mediawiki-uploads/";
|
||||||
passwordFile = config.sops.secrets."nixos-wiki".path;
|
passwordFile = config.sops.secrets."nixos-wiki".path;
|
||||||
package = pkgs.mediawiki.overrideAttrs (old: {
|
|
||||||
patches = [
|
|
||||||
./0001-MWCallbackStream-write-add-missing-return-type.patch
|
|
||||||
./0002-StringStream-add-missing-types.patch
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
extensions.SyntaxHighlight_GeSHi = null; # provides <SyntaxHighlight> tags
|
extensions.SyntaxHighlight_GeSHi = null; # provides <SyntaxHighlight> tags
|
||||||
extensions.ParserFunctions = null;
|
extensions.ParserFunctions = null;
|
||||||
extensions.Cite = null;
|
extensions.Cite = null;
|
||||||
extensions.VisualEditor = null;
|
extensions.VisualEditor = null;
|
||||||
extensions.AuthManagerOAuth = pkgs.fetchzip {
|
extensions.AuthManagerOAuth = pkgs.fetchzip {
|
||||||
url = "https://github.com/mohe2015/AuthManagerOAuth/releases/download/v0.3.0/AuthManagerOAuth.zip";
|
url = "https://github.com/Mic92/AuthManagerOAuth/releases/download/vendor-bugfix/AuthManagerOAuth.zip";
|
||||||
hash = "sha256-4ev8LwuConmHzFm5cPr+ni9aYPDOHLArGoJhzdugEn4=";
|
hash = "sha256-Xq56QxBYpAG51HQw4TJLnzwHWztv0EhTGXk/i3w2+fs=";
|
||||||
}; # Github login
|
}; # Github login
|
||||||
extensions.ConfirmEdit = null; # Combat SPAM with a simple Captcha
|
extensions.ConfirmEdit = null; # Combat SPAM with a simple Captcha
|
||||||
extensions.StopForumSpam = pkgs.fetchzip {
|
extensions.StopForumSpam = pkgs.fetchzip {
|
||||||
|
Loading…
Reference in New Issue
Block a user