Ticket #226: wp-cache-phase2.php.diff

File wp-cache-phase2.php.diff, 1.2 KB (added by MikeLittle, 7 years ago)

patch to wp-cache-phase2

  • wp-cache-phase2.php

     
    129129                if (!$fr) 
    130130                        $buffer = "Couldn't write to: " . $cache_path . $cache_filename . "\n"; 
    131131 
    132                 if (preg_match('/<!--mclude|<!--mfunc/', $buffer)) { //Dynamic content 
     132                if (preg_match('/<!--mclude|<!--pclude|<!--mfunc/', $buffer)) { //Dynamic content 
    133133                        $store = preg_replace('|<!--mclude (.*?)-->(.*?)<!--/mclude-->|is',  
    134134                                        "<!--mclude-->\n<?php include_once('" . ABSPATH . "$1'); ?>\n<!--/mclude-->", $buffer); 
     135            $store = preg_replace('|<!--pclude (.*?)-->(.*?)<!--/pclude-->|is', 
     136                "<!--pclude-->\n<?php include_once('$1'); ?><!--/pclude-->'", $store); 
    135137                        $store = preg_replace('|<!--mfunc (.*?)-->(.*?)<!--/mfunc-->|is',  
    136138                                        "<!--mfunc-->\n<?php $1 ;?>\n<!--/mfunc-->", $store); 
    137139                        $meta_object->dynamic = true; 
    138140                        /* Clean function calls in tag */ 
    139141                        $buffer = preg_replace('|<!--mclude (.*?)-->|is', '<!--mclude-->', $buffer); 
     142                        $buffer = preg_replace('|<!--pclude (.*?)-->|is', '<!--pclude-->', $buffer); 
    140143                        $buffer = preg_replace('|<!--mfunc (.*?)-->|is', '<!--mfunc-->', $buffer); 
    141144                        fputs($fr, $store); 
    142145                } else {