Index: trunk/extensions/intersection/DynamicPageList.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | */ |
39 | 39 | |
40 | 40 | $wgDLPminCategories = 1; // Minimum number of categories to look for |
41 | | -$wgDLPmaxCategories = 5; // Maximum number of categories to look for |
| 41 | +$wgDLPmaxCategories = 6; // Maximum number of categories to look for |
42 | 42 | $wgDLPMinResultCount = 1; // Minimum number of results to allow |
43 | 43 | $wgDLPMaxResultCount = 50; // Maximum number of results to allow |
44 | 44 | $wgDLPAllowUnlimitedResults = true; // Allow unlimited results |
— | — | @@ -69,6 +69,7 @@ |
70 | 70 | // The callback function for converting the input text to HTML output |
71 | 71 | function DynamicPageList( $input ) { |
72 | 72 | global $wgUser; |
| 73 | + global $wgTitle; |
73 | 74 | global $wgLang; |
74 | 75 | global $wgContLang; |
75 | 76 | global $wgDLPminCategories, $wgDLPmaxCategories,$wgDLPMinResultCount, $wgDLPMaxResultCount; |
— | — | @@ -95,6 +96,11 @@ |
96 | 97 | |
97 | 98 | $aParams = explode("\n", $input); |
98 | 99 | |
| 100 | + $parser = new Parser(); |
| 101 | + $parser->mTitle = $wgTitle; |
| 102 | + $parser->mOutputType = OT_MSG; |
| 103 | + $parser->initialiseVariables(); |
| 104 | + |
99 | 105 | foreach($aParams as $sParam) |
100 | 106 | { |
101 | 107 | $aParam = explode("=", $sParam); |
— | — | @@ -104,14 +110,14 @@ |
105 | 111 | $sArg = trim($aParam[1]); |
106 | 112 | if ($sType == 'category') |
107 | 113 | { |
108 | | - $title = Title::newFromText( $sArg ); |
| 114 | + $title = Title::newFromText( $parser->replaceVariables($sArg) ); |
109 | 115 | if( is_null( $title ) ) |
110 | 116 | continue; |
111 | 117 | $aCategories[] = $title; |
112 | 118 | } |
113 | 119 | else if ($sType == 'notcategory') |
114 | 120 | { |
115 | | - $title = Title::newFromText( $sArg ); |
| 121 | + $title = Title::newFromText( $parser->replaceVariables($sArg) ); |
116 | 122 | if( is_null( $title ) ) |
117 | 123 | continue; |
118 | 124 | $aExcludeCategories[] = $title; |