mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Issue #5205 - Creation of urls with custom domain setting when using 'full' mode.
This commit is contained in:
@@ -4348,7 +4348,8 @@ class e107
|
|||||||
|
|
||||||
if ($options['mode'] === 'full')
|
if ($options['mode'] === 'full')
|
||||||
{
|
{
|
||||||
$sefUrl = SITEURL . $rawUrl;
|
$siteURL = !empty($tmp[$plugin][$key]['domain']) ? 'https://'.rtrim($tmp[$plugin][$key]['domain'],'/').'/' : SITEURL;
|
||||||
|
$sefUrl = $siteURL . $rawUrl;
|
||||||
}
|
}
|
||||||
elseif ($options['mode'] === 'raw')
|
elseif ($options['mode'] === 'raw')
|
||||||
{
|
{
|
||||||
|
@@ -41,6 +41,14 @@ class _blank_url // plugin-folder + '_url'
|
|||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$config['parked'] = array(
|
||||||
|
'domain' => 'parked-domain.com',
|
||||||
|
'regex' => '^custom/?$', // matched against url, and if true, redirected to 'redirect' below.
|
||||||
|
'sef' => 'custom', // used by e107::url(); to create a url from the db table.
|
||||||
|
'redirect' => '{e_PLUGIN}_blank/blank.php?custom=1', // file-path of what to load when the regex returns true.
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1566,6 +1566,12 @@ class e107Test extends \Codeception\Test\Unit
|
|||||||
// $this->assertEquals("https://localhost/e107/news", $result);
|
// $this->assertEquals("https://localhost/e107/news", $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// e107 v2.4 - test for custom domain
|
||||||
|
e107::getPlugin()->install('_blank');
|
||||||
|
$result = $obj::url('_blank', 'parked',null,['mode'=>'full']);
|
||||||
|
self::assertSame('https://parked-domain.com/custom', $result);
|
||||||
|
e107::getPlugin()->uninstall('_blank');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user