equal
deleted
inserted
replaced
150 } |
150 } |
151 } |
151 } |
152 } |
152 } |
153 |
153 |
154 // execute rule |
154 // execute rule |
|
155 $text_before = $text; |
155 $text = $this->perform_render_step($text, $rule, $parser, $renderer); |
156 $text = $this->perform_render_step($text, $rule, $parser, $renderer); |
|
157 if ( empty($text) ) |
|
158 { |
|
159 trigger_error("Wikitext was empty after rule \"$rule\"; restoring backup", E_USER_WARNING); |
|
160 $text = $text_before; |
|
161 } |
|
162 unset($text_before); |
156 |
163 |
157 // run posthooks |
164 // run posthooks |
158 foreach ( $this->hooks as $hook ) |
165 foreach ( $this->hooks as $hook ) |
159 { |
166 { |
160 if ( $hook['when'] === PO_AFTER && $hook['rule'] === $rule ) |
167 if ( $hook['when'] === PO_AFTER && $hook['rule'] === $rule ) |