Version 3.1.4

This commit is contained in:
Neo committed 2025-12-19 00:32:22 -08:00
1 parent 1d4720f3e2
commit ae5c01cc78
2563 files changed
+283048 -240689

No files matched your search

@@ -1,19 +1,21 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Skin Functions
* Last Updated: $Date: 2009-12-07 21:57:46 -0500 (Mon, 07 Dec 2009) $
* Last Updated: $Date: 2010-10-13 14:43:52 -0400 (Wed, 13 Oct 2010) $
* </pre>
*
* Owner: Matt
* @author $Author: bfarber $
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @link http://www.iinvisionpower.com
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @link http://www.invisionpower.com
* @since 9th March 2005 11:03
* @version $Revision: 5529 $
* @version $Revision: 6972 $
*
*/
@@ -81,6 +83,12 @@ class skinFunctions
*/
public $remapData = array();
/**
* Set cache
* @var private
*/
private $_seenSet = array();
/**
* Constructor
*
@@ -102,6 +110,9 @@ class skinFunctions
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->lang = $this->registry->class_localization;
$this->registry->class_localization->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// IN_DEV on?
@@ -137,6 +148,111 @@ class skinFunctions
return $this->recursiveTiers;
}
/**
* Fetch highest order
*
* @access public
* @return int
*/
public function fetchHighestSetPosition()
{
$bill = $this->DB->buildAndFetch( array( 'select' => 'MAX(set_order) as and_ted',
'from' => 'skin_collections' ) );
/* Excellent! (guitar solo) */
return intval( $bill['and_ted'] );
}
/**
* Can we use the merge system?
*
* @access public
* @return int
*/
public function canUseMergeSystem()
{
$c = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as ount',
'from' => 'skin_templates_previous' ) );
return ( $c['ount'] ) ? true : false;
}
/**
* Fetch master template keys
*
* @access public
* @return arraya
*/
public function fetchMasterKeys()
{
if ( is_array( $this->remapData ) AND is_array( $this->remapData['masterKeys'] ) )
{
return $this->remapData['masterKeys'];
}
else
{
$REMAP = array();
require( DOC_IPS_ROOT_PATH . 'cache/skin_cache/masterMap.php' );
if ( is_array($REMAP) && count($REMAP) )
{
$this->remapData = array( 'masterKeys' => $REMAP['masterKeys'] );
}
}
return $this->remapData['masterKeys'];
}
/**
* Returns a skin set ID based on a key
* @param string $key
*/
public function fetchSetIdByKey( $key )
{
$masterKeys = $this->fetchMasterKeys();
if ( in_array( $key, $masterKeys ) )
{
/* Default master keys are always 0 */
return 0;
}
if ( ! $this->_seenSet[ 'k-' . $key ] )
{
$this->_seenSet[ 'k-' . $key ] = $this->DB->buildAndFetch( array( 'select' => 'set_id',
'from' => 'skin_collections',
'where' => 'set_key=\'' . addslashes( $key ) . '\'' ) );
}
return ( $this->_seenSet[ 'k-' . $key ]['set_id'] ) ? $this->_seenSet[ 'k-' . $key ]['set_id'] : 0;
}
/**
* Returns a skin set key based on a id
* @param string $key
*/
public function fetchSetKeyById( $id )
{
$masterKeys = $this->fetchMasterKeys();
if ( $id == 0 )
{
/* Default master keys are always 0 */
return '';
}
if ( ! $this->_seenSet[ 'i-' . $id ] )
{
$this->_seenSet[ 'i-' . $id ] = $this->DB->buildAndFetch( array( 'select' => 'set_key',
'from' => 'skin_collections',
'where' => 'set_id=' . intval( $id ) ) );
}
return ( $this->_seenSet[ 'i-' . $id ]['set_key'] ) ? $this->_seenSet[ 'i-' . $id ]['set_key'] : 0;
}
/**
* Search template bits
*
@@ -201,7 +317,9 @@ class skinFunctions
{
return $return;
}
$_templateCount = 0;
/* You may continue... */
foreach( $_templates as $_group => $_gdata )
{
@@ -380,7 +498,9 @@ class skinFunctions
$this->remapData = $this->registry->output->buildRemapData();
}
$_dir = $this->remapData['templates'][ $id ];
$_id = ( $id == 0 ) ? $this->remapData['inDevDefault'] : $id;
$_dir = $this->remapData['templates'][ $_id ];
if( ! file_exists(IPS_CACHE_PATH."cache/skin_cache/" . $_dir . "/".$name.".php") )
{
@@ -440,7 +560,7 @@ class skinFunctions
}
/* Root skin? */
if ( in_array( $setID, array_values( $this->remapData['export'] ) ) )
if ( in_array( $setID, $this->remapData['masterKeys'] ) )
{
return FALSE;
}
@@ -492,18 +612,36 @@ class skinFunctions
$this->DB->delete( 'skin_url_mapping', 'map_skin_set_id=' . $setID );
/* Delete CSS Files */
$this->registry->adminFunctions->removeDirectory( IPS_CACHE_PATH . PUBLIC_DIRECTORY . '/style_css/css_' . $setID );
$this->registry->adminFunctions->removeDirectory( DOC_IPS_ROOT_PATH . PUBLIC_DIRECTORY . '/style_css/css_' . $setID );
/* Delete PHP Cache Files */
$this->registry->adminFunctions->removeDirectory( IPS_CACHE_PATH . 'cache/skin_cache/cacheid_' . $setID );
/* Delete any diff/merge sessions */
$this->DB->build( array( 'select' => '*',
'from' => 'skin_merge_session',
'where' => 'merge_set_id=' . $setID ) );
$o = $this->DB->execute();
while( $row = $this->DB->fetch( $o ) )
{
/* Delete 'em */
$this->DB->delete('skin_merge_session', 'merge_id=' . $row['merge_id'] );
$this->DB->delete('skin_merge_changes', 'change_session_id=' . $row['merge_id'] );
}
/* Rebuild Tree Information */
$this->rebuildTreeInformation();
/* Rebuild Skin Set Caches */
$this->rebuildSkinSetsCache();
$this->rebuildURLMapCache();
if ( class_exists( 'skinCaching' ) )
{
$this->rebuildSkinSetsCache();
$this->rebuildURLMapCache();
$this->cache->putWithCacheLib( 'Skin_Store_' . $setID, array(), 1 );
}
return TRUE;
}
@@ -540,10 +678,47 @@ class skinFunctions
{
$_parents = $this->recursiveTiers->fetchItemParents( $row['set_id'] );
$_children = $this->recursiveTiers->fetchItemChildren( $row['set_id'] );
$this->DB->update( 'skin_collections', array( 'set_parent_array' => serialize( ( is_array( $_parents ) ) ? $_parents : array() ),
'set_child_array' => serialize( ( is_array( $_children ) ) ? $_children : array() ) ), 'set_id=' . $row['set_id'] );
/* Reset master key - parents */
if( count($_parents) AND $row['set_id'] )
{
$_p = $_parents;
$_id = array_pop( $_p );
$rootParent = $this->fetchSkinData( $_id, true );
/* If no parent, we must be a parent, then */
if ( ! $rootParent['set_id'] )
{
$rootParent = $this->fetchSkinData( $setID, true );
}
$this->DB->update( 'skin_collections', array( 'set_master_key' => ( $rootParent['set_master_key'] ) ? $rootParent['set_master_key'] : 'root' ), 'set_id IN (' . implode( ',', $_parents ) . ')' );
}
/* Reset master key - children */
if( count($_children) AND $row['set_id'] )
{
if ( ! is_array( $rootParent ) )
{
$_p = $_parents;
$_id = array_pop( $_p );
$rootParent = $this->fetchSkinData( $_id, true );
/* If no parent, we must be a parent, then */
if ( ! $rootParent['set_id'] )
{
$rootParent = $this->fetchSkinData( $setID, true );
}
}
$this->DB->update( 'skin_collections', array( 'set_master_key' => ( $rootParent['set_master_key'] ) ? $rootParent['set_master_key'] : 'root' ), 'set_id IN (' . implode( ',', $_children ) . ')' );
}
if( count($_parents) AND $setID )
{
foreach( $_parents as $parent )
@@ -552,7 +727,7 @@ class skinFunctions
}
}
}
return TRUE;
}
@@ -576,13 +751,35 @@ class skinFunctions
*/
public function fetchReplacements( $setID )
{
$replacements = array();
//-----------------------------------------
// Try and get the skin from the cache
//-----------------------------------------
$skinSetData = $this->fetchSkinData( $setID );
$replacements = array();
/* Did we pass a master key? - all root skins are 0 */
if ( ! is_numeric( $setID ) )
{
$skinSetData = array( 'set_id' => 0,
'set_master_key' => $setID,
'set_key' => $setID,
'_isMaster' => 1,
'_parentTree' => array(),
'_childTree' => array(),
'_userAgents' => array(),
'_cssGroupsArray' => array() );
}
else
{
$skinSetData = $this->fetchSkinData( $setID );
}
/* Did we get a skin set? */
if ( ! isset( $skinSetData['_parentTree'] ) OR ! is_array( $skinSetData['_parentTree'] ) )
{
return array();
}
//-----------------------------------------
// Push root ID onto the END of the parent array
//-----------------------------------------
@@ -593,8 +790,29 @@ class skinFunctions
// Push the current skin set ID onto the beginnging
//-----------------------------------------
array_unshift( $skinSetData['_parentTree'], $setID );
if ( is_numeric( $setID ) )
{
array_unshift( $skinSetData['_parentTree'], $setID );
}
/* We want to capture only this set's master bits */
$where = ' AND ( ( replacement_set_id > 0 AND ( replacement_master_key=\'\' OR replacement_master_key IS NULL ) ) OR ( replacement_set_id=0 AND replacement_master_key=\'' . $skinSetData['set_master_key'] . '\' ) )';
//-----------------------------------------
// Push root ID onto the END of the parent array
//-----------------------------------------
array_push( $skinSetData['_parentTree'], 0 );
//-----------------------------------------
// Push the current skin set ID onto the beginnging
//-----------------------------------------
if ( is_numeric( $setID ) )
{
array_unshift( $skinSetData['_parentTree'], $setID );
}
//-----------------------------------------
// Geddit
//-----------------------------------------
@@ -603,7 +821,7 @@ class skinFunctions
$this->DB->buildInstring( "," . implode( ",", $skinSetData['_parentTree'] ) . ",",
$this->DB->buildConcat( array( array( ',', 'string' ), array( 'replacement_set_id' ), array( ',', 'string' ) ) ) ) . ' as theorder',
'from' => 'skin_replacements',
'where' => "replacement_set_id IN (" . implode( ",", $skinSetData['_parentTree'] ) .")",
'where' => "replacement_set_id IN (" . implode( ",", $skinSetData['_parentTree'] ) .")" . $where,
'order' => 'replacement_key ASC, theorder DESC' ) );
$i = $this->DB->execute();
@@ -809,7 +1027,7 @@ class skinFunctions
//-----------------------------------------
$replacementID = intval( $replacementID );
//-----------------------------------------
// Fetch replacement data
//-----------------------------------------
@@ -887,14 +1105,33 @@ class skinFunctions
*/
public function fetchCSS( $setID, $parse=TRUE, $skipRemoved=TRUE )
{
//-----------------------------------------
// Try and get the skin from the cache
//-----------------------------------------
$skinSetData = $this->fetchSkinData( $setID );
$css = array();
$skip = array();
$where = '';
/* Did we pass a master key? - all root skins are 0 */
if ( ! is_numeric( $setID ) )
{
$skinSetData = array( 'set_id' => 0,
'set_master_key' => $setID,
'set_key' => $setID,
'_isMaster' => 1,
'_parentTree' => array(),
'_childTree' => array(),
'_userAgents' => array(),
'_cssGroupsArray' => array() );
}
else
{
$skinSetData = $this->fetchSkinData( $setID );
}
/* Did we get a skin set? */
if ( ! isset( $skinSetData['_parentTree'] ) OR ! is_array( $skinSetData['_parentTree'] ) )
{
return array();
}
//-----------------------------------------
// Push root ID onto the END of the parent array
//-----------------------------------------
@@ -905,7 +1142,13 @@ class skinFunctions
// Push the current skin set ID onto the beginnging
//-----------------------------------------
array_unshift( $skinSetData['_parentTree'], $setID );
if ( is_numeric( $setID ) )
{
array_unshift( $skinSetData['_parentTree'], $setID );
}
/* We want to capture only this set's master bits */
$where = ' AND ( ( css_set_id > 0 AND ( css_master_key=\'\' OR css_master_key IS NULL ) ) OR ( css_set_id=0 AND css_master_key=\'' . $skinSetData['set_master_key'] . '\' ) )';
//-----------------------------------------
// Geddit
@@ -915,7 +1158,7 @@ class skinFunctions
$this->DB->buildInstring( "," . implode( ",", $skinSetData['_parentTree'] ) . ",",
$this->DB->buildConcat( array( array( ',', 'string' ), array( 'css_set_id' ), array( ',', 'string' ) ) ) ) . ' as theorder',
'from' => 'skin_css',
'where' => "css_set_id IN (" . implode( ",", $skinSetData['_parentTree'] ) .")",
'where' => "css_set_id IN (" . implode( ",", $skinSetData['_parentTree'] ) .")" . $where,
'order' => 'css_group, theorder DESC' ) );
$i = $this->DB->execute();
@@ -943,7 +1186,7 @@ class skinFunctions
$css[ $row['css_group'] ] = $row;
}
return $css;
}
@@ -992,6 +1235,7 @@ class skinFunctions
$css['_actualSetID'] = $css['css_set_id'];
$css['_belongsSetID'] = $setID;
$css['_isMaster'] = ( $css['css_master_key'] ) ? true : false;
//$css['_css_content'] = $css['css_content'];
//-----------------------------------------
@@ -1340,7 +1584,7 @@ class skinFunctions
* Fetch Templates from the tree
*
* @access public
* @param int Skin set ID
* @param mixed Skin key or Skin set ID
* @param string Type of data to return: 'allTemplates' will return the data [template_group][template_name], 'allNoContent' the same as 'allTemplates' minus the actual template content, 'groupNames'; [template_group] or groupTemplates, just that groups templates [template_name], groupTemplatesNoContent is the same as groupTemplates but template_content is removed
* @param string Which group to use
* @return array Array of data depending on the params
@@ -1352,6 +1596,8 @@ class skinFunctions
* $templates = $skinFunctions->fetchTemplates( 1, 'groupTemplates', 'skin_global' );
* # To return all templates in all groups
* $templates = $skinFunctions->fetchTemplates( 1, 'allTemplates');
* # To return all master templates for the mobile skin
* $templates = $skinFunctions->fetchTemplates( 'mobile', 'allTemplates' );
* </code>
*/
public function fetchTemplates( $setID, $type='allTemplates', $group='')
@@ -1361,13 +1607,31 @@ class skinFunctions
//-----------------------------------------
$templates = array();
$where = '';
/* Did we pass a master key? - all root skins are 0 */
if ( ! is_numeric( $setID ) )
{
$skinSetData = array( 'set_id' => 0,
'set_master_key' => $setID,
'set_key' => $setID,
'_isMaster' => 1,
'_parentTree' => array(),
'_childTree' => array(),
'_userAgents' => array(),
'_cssGroupsArray' => array() );
}
else
{
$skinSetData = $this->fetchSkinData( $setID );
}
/* Did we get a skin set? */
if ( ! isset( $skinSetData['_parentTree'] ) OR ! is_array( $skinSetData['_parentTree'] ) )
{
return array();
}
//-----------------------------------------
// Try and get the skin from the cache
//-----------------------------------------
$skinSetData = $this->fetchSkinData( $setID );
//-----------------------------------------
// Push root ID onto the END of the parent array
//-----------------------------------------
@@ -1377,9 +1641,63 @@ class skinFunctions
//-----------------------------------------
// Push the current skin set ID onto the beginnging
//-----------------------------------------
array_unshift( $skinSetData['_parentTree'], $setID );
if ( is_numeric( $setID ) )
{
array_unshift( $skinSetData['_parentTree'], $setID );
}
/* We want to capture only this set's master bits */
$where = ' AND ( ( template_set_id > 0 AND ( template_master_key=\'\' OR template_master_key IS NULL ) ) OR ( template_set_id=0 AND template_master_key=\'' . $skinSetData['set_master_key'] . '\' ) )';
/* First off, load 'root' skin as we tend to develop this the most and there is always a small chance other master skins won't
contain all the template bits. We'll just load the group / name and leave the content blank to prevent parse errors, etc */
if ( $setID != 'root' )
{
if ( ( $type == 'groupTemplates' OR $type == 'groupTemplatesNoContent' ) and $group != '' )
{
$_w = " AND template_group='{$group}'";
}
$this->DB->build( array( 'select' => '*',
'from' => 'skin_templates',
'where' => "template_master_key='root'" . $_w,
'order' => 'template_group' ) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
{
$r['template_content'] = '<!--no data in this master skin-->';
if ( $type == 'groupNames' )
{
$templates[ $r['template_group'] ] = $r;
}
else if ( $type == 'groupTemplates' OR $type == 'groupTemplatesNoContent' )
{
$r['_templateSize'] = IPSLib::sizeFormat( IPSLib::strlenToBytes( strlen( $r['template_content'] ) ) );
if ( $type == 'groupTemplatesNoContent' )
{
unset( $r['template_data'] );
unset( $r['template_content'] );
}
$templates[ strtolower($r['template_name']) ] = $r;
}
else
{
if ( $type == 'allNoContent' )
{
unset( $r['template_content'] );
}
$templates[ $r['template_group'] ][ strtolower($r['template_name']) ] = $r;
}
}
}
//-----------------------------------------
// Ok, what to return?
//-----------------------------------------
@@ -1391,7 +1709,7 @@ class skinFunctions
$this->DB->buildInstring( "," . implode( ",", $skinSetData['_parentTree'] ) . ",",
$this->DB->buildConcat( array( array( ',', 'string' ), array( 'template_set_id' ), array( ',', 'string' ) ) ) ) . ' as theorder',
'from' => 'skin_templates',
'where' => "template_set_id IN (" . implode( ",", $skinSetData['_parentTree'] ) ." )",
'where' => "template_set_id IN (" . implode( ",", $skinSetData['_parentTree'] ) ." )" . $where,
'order' => 'template_group, theorder DESC'
) );
$newq = $this->DB->execute();
@@ -1403,7 +1721,7 @@ class skinFunctions
$this->DB->buildInstring( "," . implode( ",", $skinSetData['_parentTree'] ) . ",",
$this->DB->buildConcat( array( array( ',', 'string' ), array( 'template_set_id' ), array( ',', 'string' ) ) ) ) . ' as theorder',
'from' => 'skin_templates',
'where' => "template_set_id IN (" . implode( ",", $skinSetData['_parentTree'] ) . ") AND template_group='{$group}'",
'where' => "template_set_id IN (" . implode( ",", $skinSetData['_parentTree'] ) . ") AND template_group='{$group}'" . $where,
'order' => 'template_name, theorder DESC'
) );
$newq = $this->DB->execute();
@@ -1415,7 +1733,7 @@ class skinFunctions
$this->DB->buildInstring( "," . implode( ",", $skinSetData['_parentTree'] ) . ",",
$this->DB->buildConcat( array( array( ',', 'string' ), array( 'template_set_id' ), array( ',', 'string' ) ) ) ) . ' as theorder',
'from' => 'skin_templates',
'where' => "template_set_id IN (" . implode( ",", $skinSetData['_parentTree'] ) .")",
'where' => "template_set_id IN (" . implode( ",", $skinSetData['_parentTree'] ) .")" . $where,
'order' => 'template_group, template_name, theorder DESC'
) );
$newq = $this->DB->execute();
@@ -1471,6 +1789,14 @@ class skinFunctions
}
ksort($templates);
foreach( $templates as $k => $v )
{
if( is_array($v) )
{
ksort($templates[ $k ]);
}
}
return $templates;
}
@@ -1500,8 +1826,8 @@ class skinFunctions
//-----------------------------------------
$template = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'skin_templates',
'where' => 'template_id=' . $templateID ) );
'from' => 'skin_templates',
'where' => 'template_id=' . $templateID ) );
if ( ! $template['template_id'] )
{
@@ -1522,6 +1848,7 @@ class skinFunctions
$template['_belongsSetID'] = $setID;
$template['_template_content'] = $template['template_content'];
$template['_template_data'] = $template['template_data'];
$template['_isMaster'] = ( $template['template_master_key'] ) ? true : false;
//-----------------------------------------
// Update content for editing
@@ -1712,7 +2039,7 @@ class skinFunctions
// Test it..
//-----------------------------------------
if ( $this->testTemplateBitSyntax( $template['template_name'], $template_data, $template_content ) !== TRUE )
if ( $this->testTemplateBitSyntax( $template_name, $template_data, $template_content ) !== TRUE )
{
throw new Exception( "SYNTAX_INCORRECT" );
}
@@ -2034,9 +2361,10 @@ class skinFunctions
{
continue;
}
$config = array();
require( $path . '/' . $_name . '/conf.php' );
$formats[ $_name ] = $config;
}
}
@@ -2060,7 +2388,7 @@ class skinFunctions
/* Fetch groups? */
if ( ! count( $groups ) )
{
$groups = array_keys( $this->fetchTemplates( 1, 'groupNames' ) );
$groups = array_keys( $this->fetchTemplates( 'root', 'groupNames' ) );
}
/* Got a hooks cache? */
@@ -2074,21 +2402,21 @@ class skinFunctions
if( is_array( $hooksCache['templateHooks'] ) AND count( $hooksCache['templateHooks'] ) )
{
foreach( $hooksCache['templateHooks'] as $hook )
foreach( $hooksCache['templateHooks'] as $skinGroup => $hooks )
{
foreach( $hook as $tplHook )
/* Check to see if the group is loaded */
if( ! in_array( $skinGroup, $groups ) )
{
/* Check to see if the group is loaded */
if( ! in_array( $tplHook['skinGroup'], $groups ) )
{
continue;
}
continue;
}
foreach( $hooks as $tplHook )
{
/* Check for hook file */
if( file_exists( DOC_IPS_ROOT_PATH . 'hooks/' . $tplHook['filename'] ) )
{
$tplHook['_commentTag'] = $tplHook['type'] . '.' . $tplHook['skinGroup'] . '.' . $tplHook['skinFunction'] . '.' . $tplHook['id'] . '.' . $tplHook['position'];
$myHooks[ $tplHook['skinGroup'] ][] = $tplHook;
$tplHook['_commentTag'] = $tplHook['type'] . '.' . $skinGroup . '.' . $tplHook['skinFunction'] . '.' . $tplHook['id'] . '.' . $tplHook['position'];
$myHooks[ $skinGroup ][] = $tplHook;
}
}
}
@@ -2123,9 +2451,10 @@ class skinFunctions
*
* @access public
* @param int Skin set ID
* @param bool Force load from DB
* @return array
*/
public function fetchSkinData( $setID )
public function fetchSkinData( $setID, $forceLoadDB=false )
{
//-----------------------------------------
// Skin ID #0?
@@ -2135,7 +2464,8 @@ class skinFunctions
{
/* This is a master skin, so lets fake it */
$skinSetData['set_id'] = 0;
$skinSetData['set_key'] = 'root';
$skinSetData['set_key'] = is_numeric( $setID ) ? 'root' : $setID;
$skinSetData['set_master_key'] = is_numeric( $setID ) ? 'root' : $setID;
$skinSetData['_isMaster'] = 1;
$skinSetData['_parentTree'] = array();
$skinSetData['_childTree'] = array();
@@ -2174,7 +2504,7 @@ class skinFunctions
// Got nothing?
//-----------------------------------------
if ( $setID > 0 AND ! is_array( $skinSetData ) )
if ( $forceLoadDB OR ( $setID > 0 AND ! $skinSetData['set_id'] ) )
{
$skinSetData = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'skin_collections',
@@ -2199,6 +2529,9 @@ class skinFunctions
$skinSetData['_cssGroupsArray'] = array();
}
}
/* Fail safe */
$skinSetData['set_master_key'] = ( $skinSetData['set_master_key'] ) ? $skinSetData['set_master_key'] : 'root';
return $skinSetData;
}
@@ -2306,8 +2639,10 @@ class skinFunctions
// Test...
//-----------------------------------------
$eval = $this->registry->templateEngine->convertHtmlToPhp( 'test__' . $name, $data, $content );
ob_start();
eval( $this->registry->templateEngine->convertHtmlToPhp( 'test__' . $name, $data, $content ) );
eval( $eval );
$return = ob_get_contents();
ob_end_clean();
@@ -2418,7 +2753,7 @@ class skinFunctions
$templates = $this->fetchTemplates( 0, 'groupTemplatesNoContent', $_group );
/* Clean out any template bits no longer part of this group */
$this->DB->delete( 'skin_templates', "template_group='" . $_group . "' AND LOWER(template_name) NOT IN ('" . implode( "','", array_keys( $templates ) ) . "')" );
$this->DB->delete( 'skin_templates', "template_group='" . $_group . "' AND " . $this->DB->buildLower('template_name') . " NOT IN ('" . implode( "','", array_keys( $templates ) ) . "')" );
$affected += intval( $this->DB->getAffectedRows() );
}