diff options
Diffstat (limited to 'LibertySystem.php')
| -rwxr-xr-x | LibertySystem.php | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/LibertySystem.php b/LibertySystem.php index f3bdd5f..406cb42 100755 --- a/LibertySystem.php +++ b/LibertySystem.php @@ -3,7 +3,7 @@ * System class for handling the liberty package * * @package liberty -* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.23 2006/04/10 13:58:10 squareing Exp $ +* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.24 2006/04/10 17:38:44 squareing Exp $ * @author spider <spider@steelsun.com> */ @@ -278,7 +278,7 @@ class LibertySystem extends LibertyBase { } function parse_data_plugins( &$data, &$preparsed, &$noparsed, &$pParser ) { - global $gLibertySystem, $gParsedDataPlugins; + global $gLibertySystem; // Find the plugins // note: $curlyTags[0] is the complete match, $curlyTags[1] is plugin name, $curlyTags[2] is plugin arguments preg_match_all("/\{\/?([A-Za-z]+)([^\}]*)\}/", $data, $curlyTags); @@ -387,10 +387,8 @@ function parse_data_plugins( &$data, &$preparsed, &$noparsed, &$pParser ) { $ret = preg_replace( "/\~(\/?)[np]p\~/", '', $ret ); } - // pass plugin output to hash and place a unique key in the text for later replacement - $key = md5( microtime( rand() ) ); - $gParsedDataPlugins[$key] = $ret; - $data = substr_replace( $data, $key, $pos, $pos_end - $pos + strlen( $plugin_end ) ); + // Replace plugin section with its output in data + $data = substr_replace($data, $ret, $pos, $pos_end - $pos + strlen($plugin_end)); } } $i--; @@ -403,17 +401,6 @@ function parse_data_plugins( &$data, &$preparsed, &$noparsed, &$pParser ) { } } -// parse_data_plugins places all plugin data in $gParsedDataPlugins. The plugin -// data is passed back into $data once all the parsing has finished -function post_parse_data( &$pData ) { - global $gParsedDataPlugins; - if( !empty( $gParsedDataPlugins ) && is_array( $gParsedDataPlugins ) ) { - foreach( $gParsedDataPlugins as $key => $data ) { - $pData = str_replace( $key, $data, $pData ); - } - } -} - global $gLibertySystem; $gLibertySystem = new LibertySystem(); ?> |
