1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 00:27:45 +02:00

Initial commit to integrate Library Manager into core.

This commit is contained in:
Lóna Lore
2016-02-12 10:18:13 +01:00
parent ad0bc1376d
commit 203b0779e2
4 changed files with 1216 additions and 1 deletions

View File

@@ -1638,6 +1638,44 @@ class e107
return self::getSingleton('eMessage', true);
}
/**
* Retrieve Library Manager singleton object
*
* @return e_library_manager
*/
public static function getLibrary()
{
static $included = false;
if(!$included)
{
e107_require_once(e_HANDLER . 'library_manager.php');
$included = true;
}
return e_library_manager::getInstance();
}
/**
* Library Common Public Function.
*
* @param string $action detect|load
* @param string $library
*/
public static function library($action, $library)
{
$libraryHandler = e107::getLibrary();
switch ($action)
{
case 'detect':
$libraryHandler->libraryDetect($library);
break;
case 'load':
$libraryHandler->libraryLoad($library);
break;
}
}
/**
* Retrieve JS Manager singleton object
*

File diff suppressed because it is too large Load Diff

View File

@@ -60,7 +60,8 @@ class e107plugin
'e_related',
'e_rss',
'e_upload',
'e_user'
'e_user',
'e_library', // For third-party libraries are defined by plugins/themes.
);

View File

@@ -0,0 +1,18 @@
<?php
/**
* @file
* Language definitions for Library Manager.
*/
define('LAN_LIBRARY_MANAGER_01', 'The "[x]" library, which the "[y]" library depends on, is not installed.');
define('LAN_LIBRARY_MANAGER_02', 'The version "[x]" of the "[y]" library is not compatible with the "[z]" library.');
define('LAN_LIBRARY_MANAGER_03', 'The "[x]" library could not be found.');
define('LAN_LIBRARY_MANAGER_04', 'The version of the "[x]" library could not be detected.');
define('LAN_LIBRARY_MANAGER_05', 'The installed version "[x]" of the "[y]" library is not supported.');
define('LAN_LIBRARY_MANAGER_06', 'The "[x]" variant of the "[y]" library could not be found.');
define('LAN_LIBRARY_MANAGER_07', 'missing dependency');
define('LAN_LIBRARY_MANAGER_08', 'incompatible dependency');
define('LAN_LIBRARY_MANAGER_09', 'not found');
define('LAN_LIBRARY_MANAGER_10', 'not detected');
define('LAN_LIBRARY_MANAGER_11', 'not supported');