summaryrefslogtreecommitdiff
path: root/includes/parser/Preprocessor_DOM.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/parser/Preprocessor_DOM.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/parser/Preprocessor_DOM.php')
-rw-r--r--includes/parser/Preprocessor_DOM.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php
index 755563a0..066589f6 100644
--- a/includes/parser/Preprocessor_DOM.php
+++ b/includes/parser/Preprocessor_DOM.php
@@ -81,7 +81,7 @@ class Preprocessor_DOM implements Preprocessor {
*/
function memCheck() {
if ( $this->memoryLimit === false ) {
- return;
+ return true;
}
$usage = memory_get_usage();
if ( $usage > $this->memoryLimit * 0.9 ) {
@@ -543,7 +543,7 @@ class Preprocessor_DOM implements Preprocessor {
'open' => $curChar,
'close' => $rule['end'],
'count' => $count,
- 'lineStart' => ($i == 0 || $text[$i-1] == "\n"),
+ 'lineStart' => ($i > 0 && $text[$i-1] == "\n"),
);
$stack->push( $piece );
@@ -957,8 +957,7 @@ class PPFrame_DOM implements PPFrame {
return $root;
}
- if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() )
- {
+ if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
return '<span class="error">Node-count limit exceeded</span>';
}
@@ -1340,6 +1339,15 @@ class PPFrame_DOM implements PPFrame {
function isTemplate() {
return false;
}
+
+ /**
+ * Get a title of frame
+ *
+ * @return Title
+ */
+ function getTitle() {
+ return $this->title;
+ }
}
/**