From 61c4a6463b658d602e03dea7a71530b80ece508a Mon Sep 17 00:00:00 2001 From: Ashelyn Dawn Date: Tue, 22 Jul 2025 17:56:01 -0600 Subject: [PATCH 1/2] nixos/mediawiki: wfGetDB removed MediaWiki 1.44 has removed the wfGetDB function, so the init script can no longer use it Release notes: https://www.mediawiki.org/wiki/Release_notes/1.44#Breaking_changes_in_1.44 --- nixos/modules/services/web-apps/mediawiki.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/web-apps/mediawiki.nix b/nixos/modules/services/web-apps/mediawiki.nix index 1b8df02f9984..138c997bd945 100644 --- a/nixos/modules/services/web-apps/mediawiki.nix +++ b/nixos/modules/services/web-apps/mediawiki.nix @@ -713,7 +713,7 @@ in tr -dc A-Za-z0-9 /dev/null | head -c 64 > ${stateDir}/secret.key fi - echo "exit( wfGetDB( DB_PRIMARY )->tableExists( 'user' ) ? 1 : 0 );" | \ + echo "exit( \$this->getPrimaryDB()->tableExists( 'user' ) ? 1 : 0 );" | \ ${php}/bin/php ${pkg}/share/mediawiki/maintenance/eval.php --conf ${mediawikiConfig} && \ ${php}/bin/php ${pkg}/share/mediawiki/maintenance/install.php \ --confpath /tmp \ From 0918d45da948ccbcc81eab645514e6c850146106 Mon Sep 17 00:00:00 2001 From: Ashelyn Dawn Date: Tue, 22 Jul 2025 18:15:03 -0600 Subject: [PATCH 2/2] nixos/mediawiki: update maintenance script usage Calling maintenance scripts directly was deprecated in 1.40, so we should call them via run.php instead Release notes: https://www.mediawiki.org/wiki/Release_notes/1.40#Upgrading_notes_for_1.40 --- nixos/modules/services/web-apps/mediawiki.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/web-apps/mediawiki.nix b/nixos/modules/services/web-apps/mediawiki.nix index 138c997bd945..ef68bd389368 100644 --- a/nixos/modules/services/web-apps/mediawiki.nix +++ b/nixos/modules/services/web-apps/mediawiki.nix @@ -714,7 +714,7 @@ in fi echo "exit( \$this->getPrimaryDB()->tableExists( 'user' ) ? 1 : 0 );" | \ - ${php}/bin/php ${pkg}/share/mediawiki/maintenance/eval.php --conf ${mediawikiConfig} && \ + ${php}/bin/php ${pkg}/share/mediawiki/maintenance/run.php eval --conf ${mediawikiConfig} && \ ${php}/bin/php ${pkg}/share/mediawiki/maintenance/install.php \ --confpath /tmp \ --scriptpath / \