mirror of
https://github.com/e107inc/e107.git
synced 2025-03-18 19:39:45 +01:00
Merge pull request #2798 from lonalore/library
A more accurate way to prevent plugins/themes from altering libraries…
This commit is contained in:
commit
36302f0ad2
@ -1861,22 +1861,16 @@ class e_library_manager
|
||||
{
|
||||
$coreLibrary = new core_library();
|
||||
$coreLibs = $coreLibrary->config();
|
||||
$coreLib = $coreLibs[$library['machine_name']];
|
||||
|
||||
switch($library['machine_name'])
|
||||
{
|
||||
// Force to use default (original) files on Admin UI.
|
||||
// Prevent plugins/themes from altering libraries on Admin UI.
|
||||
case 'cdn.jquery.ui':
|
||||
case 'jquery.ui':
|
||||
$coreLib = $coreLibs[$library['machine_name']];
|
||||
$library['files'] = $coreLib['files'];
|
||||
$library['variants'] = $coreLib['variants'];
|
||||
break;
|
||||
|
||||
case 'cdn.bootstrap':
|
||||
case 'bootstrap':
|
||||
$coreLib = $coreLibs[$library['machine_name']];
|
||||
$library['files'] = $coreLib['files'];
|
||||
$library['variants'] = $coreLib['variants'];
|
||||
$library = $coreLib;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user