This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  adb1604ed2e9371ddfff2d33ffa29e77619e75bf (commit)
      from  787d7c1f35be3f6845af3c62c19fc3aa41351443 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=adb1604ed2e9371ddfff2d33ffa29e77619e75bf

commit adb1604ed2e9371ddfff2d33ffa29e77619e75bf
Author: Franck Villaume <[email protected]>
Date:   Tue Apr 23 11:40:11 2019 +0000

    fix PHP warning

diff --git a/src/plugins/externalsearch/common/ExternalSearchPlugin.class.php 
b/src/plugins/externalsearch/common/ExternalSearchPlugin.class.php
index d78eeac..1b1a682 100644
--- a/src/plugins/externalsearch/common/ExternalSearchPlugin.class.php
+++ b/src/plugins/externalsearch/common/ExternalSearchPlugin.class.php
@@ -47,13 +47,15 @@ the configuration file.");
                global $gfconfig;
                switch($hookname) {
                        case 'search_engines':
-                               $externalSearchEngines = json_decode 
(file_get_contents(forge_get_config ('engines', 'externalsearch'))) ;
-                               foreach($externalSearchEngines AS $name => 
$url) {
-                                       $type = 
SEARCH__TYPE_IS_EXTERNAL.'_'.$name;
-                                       $searchManager->addSearchEngine(
-                                               $type,
-                                               new ExternalSearchEngine($type, 
$name, str_replace('%web_host%',forge_get_config('web_host'),$url)
-                                                       ));
+                               if (is_file(forge_get_config('engines', 
'externalsearch'))) {
+                                       $externalSearchEngines = json_decode 
(file_get_contents(forge_get_config ('engines', 'externalsearch'))) ;
+                                       foreach($externalSearchEngines AS $name 
=> $url) {
+                                               $type = 
SEARCH__TYPE_IS_EXTERNAL.'_'.$name;
+                                               $searchManager->addSearchEngine(
+                                                       $type,
+                                                       new 
ExternalSearchEngine($type, $name, 
str_replace('%web_host%',forge_get_config('web_host'),$url)
+                                                               ));
+                                       }
                                }
                                break;
                }

-----------------------------------------------------------------------

Summary of changes:
 .../externalsearch/common/ExternalSearchPlugin.class.php | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to