X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpurgeList.php;h=540d2750ecb9e9b5949750dd5fd3a793c5caeb31;hb=9ddd146c262806e993ea66994f367a0a795e762d;hp=d558c478e84cffe9dbafe02d5704d845172b028e;hpb=008428ce9e5f41995b5fa759d8cc3a4aa3cf6a89;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/purgeList.php b/maintenance/purgeList.php index d558c478e8..540d2750ec 100644 --- a/maintenance/purgeList.php +++ b/maintenance/purgeList.php @@ -65,9 +65,14 @@ class PurgeList extends Maintenance { } elseif ( $page !== '' ) { $title = Title::newFromText( $page ); if ( $title ) { - $url = $title->getInternalURL(); - $this->output( "$url\n" ); - $urls[] = $url; + $newUrls = $title->getCdnUrls(); + + foreach ( $newUrls as $url ) { + $this->output( "$url\n" ); + } + + $urls = array_merge( $urls, $newUrls ); + if ( $this->getOption( 'purge' ) ) { $title->invalidateCache(); } @@ -110,8 +115,7 @@ class PurgeList extends Maintenance { $urls = []; foreach ( $res as $row ) { $title = Title::makeTitle( $row->page_namespace, $row->page_title ); - $url = $title->getInternalURL(); - $urls[] = $url; + $urls = array_merge( $urls, $title->getCdnUrls() ); $startId = $row->page_id; } $this->sendPurgeRequest( $urls );