summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LibertyContent.php5
-rwxr-xr-xLibertySystem.php9
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);