1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 12:48:26 +02:00

Merge pull request #2798 from lonalore/library

A more accurate way to prevent plugins/themes from altering libraries…
This commit is contained in:
Cameron
2017-09-25 09:49:27 -07:00
committed by GitHub

View File

@@ -1861,22 +1861,16 @@ class e_library_manager
{ {
$coreLibrary = new core_library(); $coreLibrary = new core_library();
$coreLibs = $coreLibrary->config(); $coreLibs = $coreLibrary->config();
$coreLib = $coreLibs[$library['machine_name']];
switch($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 'cdn.jquery.ui':
case 'jquery.ui': case 'jquery.ui':
$coreLib = $coreLibs[$library['machine_name']];
$library['files'] = $coreLib['files'];
$library['variants'] = $coreLib['variants'];
break;
case 'cdn.bootstrap': case 'cdn.bootstrap':
case 'bootstrap': case 'bootstrap':
$coreLib = $coreLibs[$library['machine_name']]; $library = $coreLib;
$library['files'] = $coreLib['files'];
$library['variants'] = $coreLib['variants'];
break; break;
} }
} }