1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-08 15:46:44 +02:00

Issue #3103 -Wrappers containing parms were not overriding wrappers of the same name without parms.

This commit is contained in:
Cameron
2018-08-16 11:34:29 -07:00
parent 73fbe980a4
commit ec3a2e28b5
2 changed files with 13 additions and 8 deletions

View File

@@ -74,7 +74,7 @@ if (!defined('e107_INIT'))
*/
function initShortcodeClass($class, $force = false, $eVars = null)
{
return e107::getScParser()->initShortcodeClass($class, $eVars, $force);
return e107::getScParser()->initShortcodeClass($class, $force);
}
@@ -93,6 +93,8 @@ class e_parse_shortcode
private $legacyBatch = array(); // List of legacy batch file codes. eg. using SC_BEGIN etc.
private $legacyBatchFile = null;
private $debug_legacy = array();
/** @var e_vars */
protected $eVars = null;
protected $wrappers = array(); // Wrappers array for the current parsing cycle, see contact_template.php and $CONTACT_WRAPPER variable
protected $wrapper = null; // current wrapper being processed.
@@ -1429,14 +1431,14 @@ class e_parse_shortcode
{
$pre = $post = '';
if(isset($this->wrappers[$code]) && !empty($this->wrappers[$code])) // eg: $NEWS_WRAPPER['view']['item']['NEWSIMAGE']
{
list($pre, $post) = explode("{---}", $this->wrappers[$code], 2);
}
elseif(!empty($fullShortcodeKey) && !empty($this->wrappers[$fullShortcodeKey]) ) // eg: $NEWS_WRAPPER['view']['item']['NEWSIMAGE: item=1']
if(!empty($fullShortcodeKey) && !empty($this->wrappers[$fullShortcodeKey]) ) // eg: $NEWS_WRAPPER['view']['item']['NEWSIMAGE: item=1']
{
list($pre, $post) = explode("{---}", $this->wrappers[$fullShortcodeKey], 2);
}
elseif(isset($this->wrappers[$code]) && !empty($this->wrappers[$code])) // eg: $NEWS_WRAPPER['view']['item']['NEWSIMAGE']
{
list($pre, $post) = explode("{---}", $this->wrappers[$code], 2);
}
else
{
//if $sc_mode exists, we need it to parse $sc_style