dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setup: Move wgActionPath logic to PathRouter
[lhc/web/wiklou.git]
/
includes
/
Title.php
diff --git
a/includes/Title.php
b/includes/Title.php
index
547b28c
..
b641448
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-2068,16
+2068,18
@@
class Title implements LinkTarget, IDBAccessObject {
$url = false;
$matches = [];
$url = false;
$matches = [];
- if ( !empty( $wgActionPaths )
+ $articlePaths = PathRouter::getActionPaths( $wgActionPaths, $wgArticlePath );
+
+ if ( $articlePaths
&& preg_match( '/^(.*&|)action=([^&]*)(&(.*)|)$/', $query, $matches )
) {
$action = urldecode( $matches[2] );
&& preg_match( '/^(.*&|)action=([^&]*)(&(.*)|)$/', $query, $matches )
) {
$action = urldecode( $matches[2] );
- if ( isset( $
wgAction
Paths[$action] ) ) {
+ if ( isset( $
article
Paths[$action] ) ) {
$query = $matches[1];
if ( isset( $matches[4] ) ) {
$query .= $matches[4];
}
$query = $matches[1];
if ( isset( $matches[4] ) ) {
$query .= $matches[4];
}
- $url = str_replace( '$1', $dbkey, $
wgAction
Paths[$action] );
+ $url = str_replace( '$1', $dbkey, $
article
Paths[$action] );
if ( $query != '' ) {
$url = wfAppendQuery( $url, $query );
}
if ( $query != '' ) {
$url = wfAppendQuery( $url, $query );
}