includes/wikiformat.php
changeset 1127 4b858862c35c
parent 1108 c1be67a50d81
child 1156 417e66a664d0
equal deleted inserted replaced
1125:367768040a61 1127:4b858862c35c
   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 )