diff options
| author | Christian Fowler <spider@viovio.com> | 2007-05-17 18:50:28 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2007-05-17 18:50:28 +0000 |
| commit | df0055fe748cba93d5385b53e8e3df2ef7c71edc (patch) | |
| tree | 98ba976682f0a68fa415b90c45de9470937ad2a3 | |
| parent | 43ca21cfbdb6a9419b6fc1ade9523f4c81bc58e8 (diff) | |
| download | liberty-df0055fe748cba93d5385b53e8e3df2ef7c71edc.tar.gz liberty-df0055fe748cba93d5385b53e8e3df2ef7c71edc.tar.bz2 liberty-df0055fe748cba93d5385b53e8e3df2ef7c71edc.zip | |
first crack at stencils. They work! woot! tidy up still needed.
| -rw-r--r-- | LibertyContent.php | 5 | ||||
| -rwxr-xr-x | LibertySystem.php | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/LibertyContent.php b/LibertyContent.php index aea657f..8ec12f4 100644 --- a/LibertyContent.php +++ b/LibertyContent.php @@ -3,7 +3,7 @@ * Management of Liberty content * * @package liberty -* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.209 2007/05/15 19:45:11 bitweaver Exp $ +* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertyContent.php,v 1.210 2007/05/17 18:50:27 spiderr Exp $ * @author spider <spider@steelsun.com> */ @@ -2207,11 +2207,12 @@ class LibertyContent extends LibertyBase { * @return absolute path */ function isCached( $pContentId = NULL ) { + global $gBitSystem; if( empty( $pContentId ) && @BitBase::verifyId( $this->mContentId ) ) { $pContentId = $this->mContentId; } - return( is_file( LibertyContent::getCacheFile( $pContentId ))); + return( $gBitSystem->getConfig( 'liberty_cache' ) && is_file( LibertyContent::getCacheFile( $pContentId ))); } /** diff --git a/LibertySystem.php b/LibertySystem.php index 0faade0..d13d430 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.69 2007/05/17 14:14:29 nickpalmer Exp $ +* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.70 2007/05/17 18:50:28 spiderr Exp $ * @author spider <spider@steelsun.com> */ @@ -688,8 +688,13 @@ class LibertySystem extends LibertyBase { * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure */ function parse_data_plugins( &$data, &$preparsed, &$noparsed, &$pParser, &$pCommonObject ) { - global $gLibertySystem; + global $gLibertySystem, $gBitSystem; // Find the plugins + if( $gBitSystem->isPackageActive( 'stencil' ) ) { + require_once( STENCIL_PKG_PATH.'BitStencil.php' ); + $data = preg_replace_callback("/\{\{\/?([^|]+)([^\}]*)\}\}/", 'parse_stencil_data', $data ); + } + // note: $curlyTags[0] is the complete match, $curlyTags[1] is plugin name, $curlyTags[2] is plugin arguments preg_match_all("/\{\/?([A-Za-z0-9]+)([^\}]*)\}/", $data, $curlyTags); |
