Index: trunk/phase3/includes/WebRequest.php |
— | — | @@ -65,6 +65,11 @@ |
66 | 66 | public function interpolateTitle() { |
67 | 67 | global $wgUsePathInfo; |
68 | 68 | |
| 69 | + // bug 16019: title interpolation on API queries is useless and possible harmful |
| 70 | + if ( defined( 'MW_API' ) ) { |
| 71 | + return; |
| 72 | + } |
| 73 | + |
69 | 74 | if ( $wgUsePathInfo ) { |
70 | 75 | // PATH_INFO is mangled due to http://bugs.php.net/bug.php?id=31892 |
71 | 76 | // And also by Apache 2.x, double slashes are converted to single slashes. |
Index: trunk/phase3/api.php |
— | — | @@ -34,6 +34,9 @@ |
35 | 35 | * in the URL. |
36 | 36 | */ |
37 | 37 | |
| 38 | +// So extensions (and other code) can check whether they're running in API mode |
| 39 | +define( 'MW_API', true ); |
| 40 | + |
38 | 41 | // Initialise common code |
39 | 42 | require ( dirname( __FILE__ ) . '/includes/WebStart.php' ); |
40 | 43 | |
— | — | @@ -99,9 +102,6 @@ |
100 | 103 | } |
101 | 104 | } |
102 | 105 | |
103 | | -// So extensions can check whether they're running in API mode |
104 | | -define( 'MW_API', true ); |
105 | | - |
106 | 106 | // Set a dummy $wgTitle, because $wgTitle == null breaks various things |
107 | 107 | // In a perfect world this wouldn't be necessary |
108 | 108 | $wgTitle = Title::makeTitle( NS_MAIN, 'API' ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -33,6 +33,7 @@ |
34 | 34 | * Page existence is now not revealed (in the colour of the tabs) to users who |
35 | 35 | cannot read the page in question. |
36 | 36 | * (bug 19006) {{REVISIONUSER}} no longer acts like {{CURRENTUSER}} in some cases |
| 37 | +* (bug 16019) $wgArticlePath = "/$1" no longer breaks API edit/watch actions |
37 | 38 | |
38 | 39 | === API changes in 1.18 === |
39 | 40 | |