From e4dd23d11484c66762f2833cdca1a77d2ce89b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Fri, 12 Feb 2016 10:26:36 +0100 Subject: [PATCH] Set return values for e107::library(). --- e107_handlers/e107_class.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index b3b0b05d5..35e1e60d3 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -1657,8 +1657,16 @@ class e107 /** * Library Common Public Function. * - * @param string $action detect|load + * @param string $action + * - 'detect': Tries to detect a library and its installed version. + * - 'load': Loads a library. * @param string $library + * The name of the library to detect/load. + * + * @return array|boolean + * - In case of 'detect': An associative array of the library information. + * - In case of 'load': An associative array containing registered information for the library specified by $name, + * or FALSE if the library $name is not registered. */ public static function library($action, $library) { @@ -1667,11 +1675,11 @@ class e107 switch ($action) { case 'detect': - $libraryHandler->libraryDetect($library); + return $libraryHandler->libraryDetect($library); break; case 'load': - $libraryHandler->libraryLoad($library); + return $libraryHandler->libraryLoad($library); break; } }