mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
{SITELINKS_ALT} fix and test.
This commit is contained in:
@@ -1260,11 +1260,12 @@ class e_parse_shortcode
|
||||
{
|
||||
// Code is not registered, let's look for .sc or .php file
|
||||
// .php file takes precedence over .sc file
|
||||
if (is_readable(e_CORE.'shortcodes/single/'.strtolower($code).'.php'))
|
||||
$codeLower = strtolower($code);
|
||||
if (is_readable(e_CORE.'shortcodes/single/'.$codeLower.'.php'))
|
||||
{
|
||||
$_function = strtolower($code).'_shortcode';
|
||||
$_class = ($code === 'sitelinks_alt') ? sitelinks_alt : null; // all others are plain functions.
|
||||
$_path = e_CORE.'shortcodes/single/'.strtolower($code).'.php';
|
||||
$_function = $codeLower.'_shortcode';
|
||||
$_class = ($codeLower === 'sitelinks_alt') ? 'sitelinks_alt' : null; // all others are plain functions.
|
||||
$_path = e_CORE.'shortcodes/single/'.$codeLower.'.php';
|
||||
|
||||
include_once($_path);
|
||||
|
||||
@@ -1289,7 +1290,7 @@ class e_parse_shortcode
|
||||
}
|
||||
else
|
||||
{
|
||||
$scFile = e_CORE.'shortcodes/single/'.strtolower($code).'.sc';
|
||||
$scFile = e_CORE.'shortcodes/single/'.$codeLower.'.sc';
|
||||
$_path = $scFile;
|
||||
}
|
||||
}
|
||||
|
@@ -1688,7 +1688,8 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
|
||||
'url' => 'news/view/item|news_id=1&news_sef=sef-string&category_id=1&category_sef=category-sef&options[full]=1',
|
||||
'user_extended' => 'name.text.1',
|
||||
'lan' => 'LAN_EDIT',
|
||||
'search' => 'all'
|
||||
'search' => 'all',
|
||||
'sitelinks_alt' => '/e107_themes/bootstrap3/images/logo.webp+noclick',
|
||||
);
|
||||
|
||||
foreach($list as $sc)
|
||||
@@ -1701,7 +1702,6 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$shortcode = '{';
|
||||
$shortcode .= strtoupper($name);
|
||||
$shortcode .= isset($parms[$name]) ? '='.$parms[$name] : '';
|
||||
|
Reference in New Issue
Block a user