Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign RottenLinks to not depend on a maintenance script #73

Merged
merged 88 commits into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
9453dc4
Redesign RottenLinks slightly to depend on a maintenance script less
paladox Dec 10, 2023
e8086b3
Update extension.json
paladox Dec 10, 2023
3c6a64d
Update extension.json
paladox Dec 10, 2023
dc94133
Update CHANGELOG.md
paladox Dec 10, 2023
8a6d1b0
Update CHANGELOG.md
paladox Dec 10, 2023
d8fb231
CI: lint code to MediaWiki standards
Dec 10, 2023
0cd4d17
Update RottenLinksHooks.php
paladox Dec 10, 2023
4ffc8a2
Create RottenLinksJob.php
paladox Dec 10, 2023
9dce5d5
Update extension.json
paladox Dec 10, 2023
d44df6e
CI: lint code to MediaWiki standards
Dec 10, 2023
d973fa2
Update RottenLinksJob.php
paladox Dec 11, 2023
f1ab350
Update RottenLinksPager.php
paladox Dec 11, 2023
9b34ebe
Update rottenlinks.sql
paladox Dec 11, 2023
436c9b7
Update CHANGELOG.md
paladox Dec 11, 2023
856ac8a
Update extension.json
paladox Dec 11, 2023
186c80d
Update RottenLinksPager.php
paladox Dec 11, 2023
6191bb3
Update RottenLinksPager.php
paladox Dec 11, 2023
e64da21
Update RottenLinksJob.php
paladox Dec 11, 2023
07d4aab
Update RottenLinksHooks.php
paladox Dec 11, 2023
5a1cd57
Update RottenLinksPager.php
paladox Dec 11, 2023
dc428d7
Update SpecialRottenLinks.php
paladox Dec 11, 2023
5c290b6
Update RottenLinksHooks.php
paladox Dec 11, 2023
2201cae
Update RottenLinksJob.php
paladox Dec 11, 2023
69e3806
Update RottenLinksJob.php
paladox Dec 11, 2023
d2d296f
CI: lint code to MediaWiki standards
Dec 11, 2023
1eae9f5
Update RottenLinksJob.php
paladox Dec 11, 2023
448fb20
Update RottenLinksHooks.php
paladox Dec 11, 2023
088ef20
Update RottenLinksJob.php
paladox Dec 11, 2023
75d2b4d
Update RottenLinksJob.php
paladox Dec 11, 2023
6eae1c5
Update RottenLinksPager.php
paladox Dec 11, 2023
a670a5d
Update RottenLinksJob.php
paladox Dec 11, 2023
c30858d
Update RottenLinksPager.php
paladox Dec 11, 2023
e726d9c
Update RottenLinksJob.php
paladox Dec 11, 2023
59c4b4c
Update RottenLinksJob.php
paladox Dec 11, 2023
f7ee684
Update CHANGELOG.md
paladox Dec 11, 2023
87bc6f9
Update extension.json
paladox Dec 11, 2023
653ea3c
Update CHANGELOG.md
paladox Dec 11, 2023
a9c48f1
Update extension.json
paladox Dec 11, 2023
a83536b
Update mediawiki-tests.yml
paladox Dec 11, 2023
a4f07ca
Update mediawiki-tests.yml
paladox Dec 11, 2023
5dcdf46
Update mediawiki-tests.yml
paladox Dec 11, 2023
044b0e1
Update config.php
paladox Dec 11, 2023
23cb987
Update updateExternalLinks.php
paladox Dec 11, 2023
353581a
Update CHANGELOG.md
paladox Dec 11, 2023
a43c1c7
Update RottenLinksHooks.php
paladox Dec 11, 2023
76d4409
Create patch-drop-rl_pageusage.sql
paladox Dec 11, 2023
cc06f4b
Update updateExternalLinks.php
paladox Dec 16, 2023
a3c57a5
CI: lint code to MediaWiki standards
Dec 16, 2023
19f3cf8
Update updateExternalLinks.php
paladox Dec 16, 2023
ae927a0
Update CHANGELOG.md
paladox Dec 16, 2023
43c8641
CI: lint code to MediaWiki standards
Dec 16, 2023
7e5e4a3
Update updateExternalLinks.php
paladox Dec 16, 2023
6af07e0
Update updateExternalLinks.php
paladox Dec 16, 2023
1df20af
Update updateExternalLinks.php
paladox Dec 16, 2023
7bc6590
Update updateExternalLinks.php
paladox Dec 16, 2023
e7b0000
Update updateExternalLinks.php
paladox Dec 16, 2023
e8bbd98
Update updateExternalLinks.php
paladox Dec 16, 2023
4726f49
Update config.php
paladox Dec 16, 2023
bc0974c
Update SpecialRottenLinks.php
paladox Dec 17, 2023
3ce99b2
Update de.json
paladox Dec 17, 2023
49dc0cd
Update en.json
paladox Dec 17, 2023
bf4ede1
Update fi.json
paladox Dec 17, 2023
e86323d
Update fr.json
paladox Dec 17, 2023
1f80cdc
Update he.json
paladox Dec 17, 2023
a62ddd3
Update hu.json
paladox Dec 17, 2023
f0d8e54
Update ia.json
paladox Dec 17, 2023
c4639f7
Update ja.json
paladox Dec 17, 2023
217d25f
Update lt.json
paladox Dec 17, 2023
04b07c4
Update mk.json
paladox Dec 17, 2023
6bb8a4a
Update nl.json
paladox Dec 17, 2023
ebc35fc
Update pl.json
paladox Dec 17, 2023
2acd51a
Update pt-br.json
paladox Dec 17, 2023
3a440a0
Update pt.json
paladox Dec 17, 2023
d6975c4
Update qqq.json
paladox Dec 17, 2023
f34a14d
Update qqq.json
paladox Dec 17, 2023
a6028b7
Update ru.json
paladox Dec 17, 2023
b9b846f
Update sh-cyrl.json
paladox Dec 17, 2023
a4f0846
Update sh-latn.json
paladox Dec 17, 2023
f99ccc9
Update sl.json
paladox Dec 17, 2023
d9edeeb
Update sv.json
paladox Dec 17, 2023
5fa8ab2
Update tr.json
paladox Dec 17, 2023
12d4af7
Update zh-hans.json
paladox Dec 17, 2023
b5280a2
Update zh-hant.json
paladox Dec 17, 2023
513610b
Update updateExternalLinks.php
paladox Dec 17, 2023
e4e2dd0
Update CHANGELOG.md
paladox Dec 17, 2023
454e260
Update extension.json
paladox Dec 17, 2023
38a3cd1
Update RottenLinksPager.php
paladox Dec 17, 2023
d6907f8
Update RottenLinksJob.php
paladox Dec 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/mediawiki-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
strategy:
matrix:
include:
# Latest Old MediaWiki stable - PHP 7.4
- mw: 'REL1_39'
# Latest MediaWiki stable - PHP 7.4
- mw: 'REL1_40'
php: 7.4
php-docker: 74
composer-test: true
experimental: false

# Latest MediaWiki stable - PHP 7.4
- mw: 'REL1_40'
# Latest MediaWiki stable - PHP 7.4
- mw: 'REL1_41'
php: 7.4
php-docker: 74
composer-test: true
Expand Down
2 changes: 2 additions & 0 deletions .phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
$cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';

$cfg['suppress_issue_types'] = [
'PhanAccessMethodInternal',
'PhanUndeclaredStaticMethod',
'SecurityCheck-LikelyFalsePositive'
];

Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
## ChangeLog for RottenLinks

### 2.0.0 (DD-MM-2023)
* Redesign RottenLinks to not depend on a maintenance script
* Changes how we count page usage on RottenLinks special page.
We directly gather this from externallinks table rather then
storing it ourselfs. Saves space and reduces complexity in getting it.
* Requires MediaWiki 1.40 or higher and to have migrated externallinks using
migrateExternallinks maintenance script and to set
wgExternalLinksSchemaMigrationStage to SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD.
Config is removed under MW 1.41+.
* Add support for MediaWiki 1.41.
* Fix some deprecated warnings in php 8.2.
* Remove showing lastRun and runTime as these are no longer needed.
They didn't work very well to begin with.
* Adds additional messages to qqq.json.

### 1.0.20 (10-01-2023)
* SpecialRottenLinks: replace usage of deprecated wfGetDB()

Expand Down
16 changes: 12 additions & 4 deletions extension.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{
"name": "RottenLinks",
"version": "1.0.20",
"version": "2.0.0",
"author": [
"John Lewis",
"Universal Omega"
"Universal Omega",
"Paladox"
],
"descriptionmsg": "rottenlinks-desc",
"license-name": "GPL-3.0-or-later",
"url": "https://github.com/miraheze/RottenLinks",
"type": "specialpage",
"requires": {
"MediaWiki": ">= 1.35.3"
"MediaWiki": ">= 1.40.0"
},
"SpecialPages": {
"RottenLinks": "SpecialRottenLinks"
},
"JobClasses": {
"RottenLinksJob": "RottenLinksJob"
},
"MessagesDirs": {
"RottenLinks": [
"i18n"
Expand All @@ -26,12 +30,16 @@
"AutoloadClasses": {
"RottenLinks": "includes/RottenLinks.php",
"RottenLinksHooks": "includes/RottenLinksHooks.php",
"RottenLinksJob": "includes/RottenLinksJob.php",
"RottenLinksPager": "includes/RottenLinksPager.php",
"SpecialRottenLinks": "includes/SpecialRottenLinks.php"
},
"Hooks": {
"LoadExtensionSchemaUpdates": [
"RottenLinksHooks::fnRottenLinksSchemaUpdates"
"RottenLinksHooks::onRottenLinksSchemaUpdates"
],
"LinksUpdateComplete": [
"RottenLinksHooks::onLinksUpdateComplete"
]
},
"config": {
Expand Down
2 changes: 0 additions & 2 deletions i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Externer Link",
"rottenlinks-table-response": "HTTP-Antwort",
"rottenlinks-table-usage": "Seitenanzahl",
"rottenlinks-rundate": "Ausführungsdatum",
"rottenlinks-runtime": "Ausführungszeitraum",
"rottenlinks-showbad": "Lediglich fehlerhafte Links anzeigen",
"rottenlinks-statistics": "Statistiken zu den Links",
"rottenlinks-stats": "Statistiken anzeigen"
Expand Down
2 changes: 0 additions & 2 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"rottenlinks-table-external": "External Link",
"rottenlinks-table-response": "HTTP Response",
"rottenlinks-table-usage": "Page Usage",
"rottenlinks-rundate": "Script run date",
"rottenlinks-runtime": "Script execution time",
"rottenlinks-showbad": "Show rotten links only",
"rottenlinks-statistics": "Rotten Link Statistics",
"rottenlinks-stats": "Show link statistics"
Expand Down
2 changes: 0 additions & 2 deletions i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Ulkoinen linkki",
"rottenlinks-table-response": "HTTP-vastaus",
"rottenlinks-table-usage": "Käyttö sivuilla",
"rottenlinks-rundate": "Skriptin suorituspäivä",
"rottenlinks-runtime": "Skriptin suoritusaika",
"rottenlinks-showbad": "Näytä vain huonot linkit",
"rottenlinks-statistics": "Ulkoisten linkkien toimivuustilasto",
"rottenlinks-stats": "Näytä linkkitilastot"
Expand Down
2 changes: 0 additions & 2 deletions i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"rottenlinks-table-external": "Lien externe",
"rottenlinks-table-response": "Réponse HTTP",
"rottenlinks-table-usage": "Utilisation de la page",
"rottenlinks-rundate": "Date d’exécution du script",
"rottenlinks-runtime": "Durée d’exécution du script",
"rottenlinks-showbad": "Afficher seulement les liens corrompus",
"rottenlinks-statistics": "Statistiques des liens corrompus",
"rottenlinks-stats": "Afficher les statistiques des liens"
Expand Down
2 changes: 0 additions & 2 deletions i18n/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "קישור חיצוני",
"rottenlinks-table-response": "תגובת HTTP",
"rottenlinks-table-usage": "שימוש בדף",
"rottenlinks-rundate": "תאריך הרצת הסקריפט",
"rottenlinks-runtime": "זמן ביצוע הסקריפט",
"rottenlinks-showbad": "הצג קישורים מתים בלבד",
"rottenlinks-statistics": "סטטיסטיקות קישורים מתים",
"rottenlinks-stats": "הצגת סטטיסטיקות קישורים"
Expand Down
3 changes: 1 addition & 2 deletions i18n/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
]
},
"rottenlinks": "Külső linkek állapota",
"rottenlinks-table-response": "HTTP-válasz",
"rottenlinks-rundate": "A szkript legutóbbi futtatása"
"rottenlinks-table-response": "HTTP-válasz"
}
2 changes: 0 additions & 2 deletions i18n/ia.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Ligamine externe",
"rottenlinks-table-response": "Responsa HTTP",
"rottenlinks-table-usage": "Uso del pagina",
"rottenlinks-rundate": "Data de execution del script",
"rottenlinks-runtime": "Durata de execution del script",
"rottenlinks-showbad": "Monstrar solmente le ligamines putrite",
"rottenlinks-statistics": "Statisticas de ligamines putrite",
"rottenlinks-stats": "Monstrar statisticas de ligamines"
Expand Down
2 changes: 0 additions & 2 deletions i18n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
"rottenlinks-table-external": "外部リンク",
"rottenlinks-table-response": "HTTPレスポンス",
"rottenlinks-table-usage": "ページの使用状況",
"rottenlinks-rundate": "スクリプトが実行されて日時",
"rottenlinks-runtime": "スクリプトの実行時間",
"rottenlinks-showbad": "腐ったリンクのみを表示",
"rottenlinks-statistics": "腐ったリンクの統計",
"rottenlinks-stats": "リンクの統計を表示"
Expand Down
2 changes: 0 additions & 2 deletions i18n/lt.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Išorinė nuoroda",
"rottenlinks-table-response": "HTTP atsakymas",
"rottenlinks-table-usage": "Puslapio naudojimas",
"rottenlinks-rundate": "Kodo vykdymo data",
"rottenlinks-runtime": "Kodo vykdymo trukmė",
"rottenlinks-showbad": "Rodyti tik sugedusias nuorodas",
"rottenlinks-statistics": "Sugedusių nuorodų statistika",
"rottenlinks-stats": "Rodyti nuorodų statistiką"
Expand Down
2 changes: 0 additions & 2 deletions i18n/mk.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Надворешна врска",
"rottenlinks-table-response": "HTTP-одговор",
"rottenlinks-table-usage": "Употреба на страницата",
"rottenlinks-rundate": "Датум на пуштање",
"rottenlinks-runtime": "Време на исполнување",
"rottenlinks-showbad": "Прикажувај само расипани врски",
"rottenlinks-statistics": "Статистика за расипани врски",
"rottenlinks-stats": "Дај статистика за врски"
Expand Down
2 changes: 0 additions & 2 deletions i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Externe koppeling",
"rottenlinks-table-response": "HTTP-antwoord",
"rottenlinks-table-usage": "Paginagebruik",
"rottenlinks-rundate": "Uitvoeringsdatum script",
"rottenlinks-runtime": "Uitvoeringstijd script",
"rottenlinks-showbad": "Alleen rotte links tonen",
"rottenlinks-statistics": "Statistieken over rotte links",
"rottenlinks-stats": "Linkstatistieken weergeven"
Expand Down
2 changes: 0 additions & 2 deletions i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"rottenlinks-table-external": "Link zewnętrzny",
"rottenlinks-table-response": "Odpowiedź HTTP",
"rottenlinks-table-usage": "Użycie na stronach",
"rottenlinks-rundate": "Data uruchomienia skryptu",
"rottenlinks-runtime": "Czas wykonania skryptu",
"rottenlinks-showbad": "Pokaż tylko zgniłe linki",
"rottenlinks-statistics": "Statystyki zgniłych linków",
"rottenlinks-stats": "Pokaż statystyki linków"
Expand Down
2 changes: 0 additions & 2 deletions i18n/pt-br.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Link externo",
"rottenlinks-table-response": "Resposta HTTP",
"rottenlinks-table-usage": "Uso de página",
"rottenlinks-rundate": "Data de execução do script",
"rottenlinks-runtime": "Tempo de execução do script",
"rottenlinks-showbad": "Mostrar somente links quebrados",
"rottenlinks-statistics": "Estatísticas de link quebrado",
"rottenlinks-stats": "Mostrar estatísticas do link"
Expand Down
2 changes: 0 additions & 2 deletions i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Hiperligação externa",
"rottenlinks-table-response": "Resposta HTTP",
"rottenlinks-table-usage": "Utilização da página",
"rottenlinks-rundate": "Data de execução do ''script''",
"rottenlinks-runtime": "Tempo de execução do ''script''",
"rottenlinks-showbad": "Mostrar só as hiperligações corrompidas",
"rottenlinks-statistics": "Estatísticas de hiperligações corrompidas",
"rottenlinks-stats": "Mostrar estatísticas das hiperligações"
Expand Down
11 changes: 7 additions & 4 deletions i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
"@metadata": {
"authors": [
"John Lewis",
"Kghbln"
"Kghbln",
"Universal Omega"
]
},
"rottenlinks": "This is the title of Special:RottenLinks as well as the label of the link pointing to it on Special:SpecialPages",
"rottenlinks-desc": "This is the extension's despription on Special:Verion",
"rottenlinks": "{{doc-special}}",
"rottenlinks-desc": "{{desc|name=RottenLinks|url=https://github.com/miraheze/RottenLinks}}",
"rottenlinks-table-external": "This is the label of a tabel header on Special:RottenLinks",
"rottenlinks-table-response": "This is the label of a tabel header on Special:RottenLinks",
"rottenlinks-table-usage": "This is the label of a tabel header on Special:RottenLinks",
"rottenlinks-showbad": "This is the text describing a checkbox on Special:RottenLinks"
"rottenlinks-showbad": "This is the text describing a checkbox on Special:RottenLinks",
"rottenlinks-statistics": "This is the text of a form section on Special:RottenLinks",
"rottenlinks-stats": "This is the text describing a checkbox on Special:RottenLinks"
}
2 changes: 0 additions & 2 deletions i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Внешняя ссылка",
"rottenlinks-table-response": "HTTP-ответ",
"rottenlinks-table-usage": "Использование страницы",
"rottenlinks-rundate": "Дата выполнения скрипта",
"rottenlinks-runtime": "Время выполнения скрипта",
"rottenlinks-showbad": "Отобразить только гнилые ссылки",
"rottenlinks-statistics": "Статистика гнилых ссылок",
"rottenlinks-stats": "Отобразить статистику ссылок"
Expand Down
2 changes: 0 additions & 2 deletions i18n/sh-cyrl.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Вањски линк",
"rottenlinks-table-response": "HTTP-одговор",
"rottenlinks-table-usage": "Употреба странице",
"rottenlinks-rundate": "Датум покретања скрипте",
"rottenlinks-runtime": "Вријеме извршења скрипте",
"rottenlinks-showbad": "Прикажи само покварене линкове",
"rottenlinks-statistics": "Статистика покварених линкова",
"rottenlinks-stats": "Дај статистику линкова"
Expand Down
2 changes: 0 additions & 2 deletions i18n/sh-latn.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"rottenlinks-table-external": "Vanjski link",
"rottenlinks-table-response": "HTTP-odgovor",
"rottenlinks-table-usage": "Upotreba stranice",
"rottenlinks-rundate": "Datum pokretanja skripte",
"rottenlinks-runtime": "Vrijeme izvršenja skripte",
"rottenlinks-showbad": "Prikaži samo pokvarene linkove",
"rottenlinks-statistics": "Statistika pokvarenih linkova",
"rottenlinks-stats": "Daj statistiku linkova"
Expand Down
2 changes: 0 additions & 2 deletions i18n/sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Zunanja povezava",
"rottenlinks-table-response": "HTTP-odgovor",
"rottenlinks-table-usage": "Uporaba strani",
"rottenlinks-rundate": "Datum izvedbe skripta",
"rottenlinks-runtime": "Čas izvedbe skripta",
"rottenlinks-showbad": "Pokaži samo nedelujoče povezave",
"rottenlinks-statistics": "Statistika nedelujočih povezav",
"rottenlinks-stats": "Prikaži statistiko povezav"
Expand Down
2 changes: 0 additions & 2 deletions i18n/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "Extern länk",
"rottenlinks-table-response": "HTTP-respons",
"rottenlinks-table-usage": "Sidanvändning",
"rottenlinks-rundate": "Skriptkörningsdatum",
"rottenlinks-runtime": "Skriptuförningstid",
"rottenlinks-showbad": "Visa bara döda länkar",
"rottenlinks-statistics": "Statistik över döda länkar",
"rottenlinks-stats": "Visa länkstatistik"
Expand Down
2 changes: 0 additions & 2 deletions i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"rottenlinks-table-external": "Dış Bağlantı",
"rottenlinks-table-response": "HTTP Yanıtı",
"rottenlinks-table-usage": "Sayfa Kullanımı",
"rottenlinks-rundate": "Komut dosyası çalıştırma tarihi",
"rottenlinks-runtime": "Komut dosyası yürütme süresi",
"rottenlinks-showbad": "Yalnızca bozuk bağlantıları göster",
"rottenlinks-statistics": "Bozuk Bağlantı İstatistikleri",
"rottenlinks-stats": "Bağlantı istatistiklerini göster"
Expand Down
2 changes: 0 additions & 2 deletions i18n/zh-hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "外部链接",
"rottenlinks-table-response": "HTTP响应",
"rottenlinks-table-usage": "页面使用情况",
"rottenlinks-rundate": "脚本运行日期",
"rottenlinks-runtime": "脚本执行时间",
"rottenlinks-showbad": "仅显示错误链接",
"rottenlinks-statistics": "错误链接统计信息",
"rottenlinks-stats": "显示链接统计信息"
Expand Down
2 changes: 0 additions & 2 deletions i18n/zh-hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"rottenlinks-table-external": "外部連結",
"rottenlinks-table-response": "HTTP 回應",
"rottenlinks-table-usage": "頁面使用情況",
"rottenlinks-rundate": "腳本運作日期",
"rottenlinks-runtime": "腳本執行時間",
"rottenlinks-showbad": "只顯示損壞連結",
"rottenlinks-statistics": "損壞連結統計",
"rottenlinks-stats": "顯示連結統計"
Expand Down
28 changes: 27 additions & 1 deletion includes/RottenLinksHooks.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
<?php

use MediaWiki\MediaWikiServices;

class RottenLinksHooks {
/**
* Handler for LinksUpdateComplete hook.
* @see https://www.mediawiki.org/wiki/Manual:Hooks/LinksUpdateComplete
* @param LinksUpdate $linksUpdate
* @param mixed $ticket
*/
public static function onLinksUpdateComplete( $linksUpdate, $ticket ) {
$addedExternalLinks = $linksUpdate->getAddedExternalLinks();
$removedExternalLinks = $linksUpdate->getRemovedExternalLinks();

if ( $addedExternalLinks || $removedExternalLinks ) {
$params = [
'addedExternalLinks' => $addedExternalLinks,
'removedExternalLinks' => $removedExternalLinks
];
MediaWikiServices::getInstance()->getJobQueueGroup()->push(
new RottenLinksJob( $params )
);
}
}

/**
* @param DatabaseUpdater $updater
*/
public static function fnRottenLinksSchemaUpdates( DatabaseUpdater $updater ) {
public static function onRottenLinksSchemaUpdates( DatabaseUpdater $updater ) {
$updater->addExtensionTable( 'rottenlinks',
__DIR__ . '/../sql/rottenlinks.sql' );

Expand All @@ -13,5 +36,8 @@ public static function fnRottenLinksSchemaUpdates( DatabaseUpdater $updater ) {

$updater->addExtensionIndex( 'rottenlinks', 'rl_externallink',
__DIR__ . '/../sql/patches/20210215.sql' );

$updater->dropExtensionField( 'rottenlinks', 'rl_pageusage',
__DIR__ . '/../sql/patches/patch-drop-rl_pageusage.sql' );
}
}
Loading
Loading