Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -95,22 +95,10 @@ |
96 | 96 | |
97 | 97 | // If for some reason the "oldid" is actually the current revision, it may be cached |
98 | 98 | if ( $titleObj->getLatestRevID() === intval( $oldid ) ) { |
99 | | - $p_result = false; |
100 | | - $pcache = ParserCache::singleton(); |
101 | | - |
102 | 99 | $articleObj = new Article( $titleObj ); |
| 100 | + $wgTitle = $titleObj; |
103 | 101 | |
104 | | - if ( $wgEnableParserCache ) { |
105 | | - $p_result = $pcache->get( $articleObj, $popts ); |
106 | | - } |
107 | | - if ( !$p_result ) { |
108 | | - $text = $rev->getText( Revision::FOR_THIS_USER ); |
109 | | - $p_result = $wgParser->parse( $text, $titleObj, $popts ); |
110 | | - |
111 | | - if ( $wgEnableParserCache ) { |
112 | | - $pcache->save( $p_result, $articleObj, $popts ); |
113 | | - } |
114 | | - } |
| 102 | + $p_result = $articleObj->getParserOutput(); |
115 | 103 | } else { |
116 | 104 | $text = $rev->getText( Revision::FOR_THIS_USER ); |
117 | 105 | |
— | — | @@ -166,18 +154,7 @@ |
167 | 155 | $p_result = $wgParser->parse( $text, $titleObj, $popts ); |
168 | 156 | } else { |
169 | 157 | // Try the parser cache first |
170 | | - $p_result = false; |
171 | | - $pcache = ParserCache::singleton(); |
172 | | - if ( $wgEnableParserCache ) { |
173 | | - $p_result = $pcache->get( $articleObj, $popts ); |
174 | | - } |
175 | | - if ( !$p_result ) { |
176 | | - $p_result = $wgParser->parse( $articleObj->getContent(), $titleObj, $popts ); |
177 | | - |
178 | | - if ( $wgEnableParserCache ) { |
179 | | - $pcache->save( $p_result, $articleObj, $popts ); |
180 | | - } |
181 | | - } |
| 158 | + $p_result = $articleObj->getParserOutput(); |
182 | 159 | } |
183 | 160 | } |
184 | 161 | } else { |