[Fusionforge-commits] FusionForge branch master updated. 1b1849ca05657590fda17892066f03b43d8a68f9

Franck Villaume nerville at fusionforge.org
Mon Dec 15 14:10:00 CET 2014


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  1b1849ca05657590fda17892066f03b43d8a68f9 (commit)
       via  346e9d2d3835d1461770c7ae591fd4bd13edd1f5 (commit)
      from  349e53f2d594bd9b4db7658af5cc689cba4aedb2 (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 -----------------------------------------------------------------
commit 1b1849ca05657590fda17892066f03b43d8a68f9
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Dec 15 14:07:59 2014 +0100

    fix RSS widget: exit on error missing php lib

diff --git a/src/common/widget/Widget_Rss.class.php b/src/common/widget/Widget_Rss.class.php
index 869989e..418dbef 100644
--- a/src/common/widget/Widget_Rss.class.php
+++ b/src/common/widget/Widget_Rss.class.php
@@ -51,8 +51,8 @@ require_once 'Widget.class.php';
 				}
 			}
 			if (!(include_once 'simplepie/simplepie.inc'))  // vendor, debian
-			  if (!(include_once 'php-simplepie/autoloader.php'))  // fedora
-			    exit_error('Error', 'Could not load the SimplePie PHP library.');
+				if (!(include_once 'php-simplepie/autoloader.php'))  // fedora
+					exit_error(_('Could not load the SimplePie PHP library.'));
 			if (!is_dir(forge_get_config('data_path') .'/rss')) {
 				if (!mkdir(forge_get_config('data_path') .'/rss')) {
 					$content .= $HTML->error_msg(_('Cannot create backend directory. Contact forge administrator.'));
@@ -149,7 +149,9 @@ require_once 'Widget.class.php';
 			$vTitle = new Valid_String('title');
 			$vTitle->required();
 			if (!$request->validInArray('rss', $vTitle)) {
-				require_once 'simplepie/simplepie.inc';
+				if (!(include_once 'simplepie/simplepie.inc'))  // vendor, debian
+					if (!(include_once 'php-simplepie/autoloader.php'))  // fedora
+						exit_error(_('Could not load the SimplePie PHP library.'));
 				if (!is_dir(forge_get_config('data_path') .'/rss')) {
 					mkdir(forge_get_config('data_path') .'/rss');
 				}

commit 346e9d2d3835d1461770c7ae591fd4bd13edd1f5
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Dec 12 16:51:40 2014 +0100

    indent

diff --git a/src/www/scm/admin/index.php b/src/www/scm/admin/index.php
index 628b1c7..099f2be 100644
--- a/src/www/scm/admin/index.php
+++ b/src/www/scm/admin/index.php
@@ -89,7 +89,7 @@ if (getStringFromRequest('create_repository') && getStringFromRequest('submit'))
 
 	$scmarray = array();
 	$scmvars = array_keys(_getRequestArray());
-    error_log(print_r(_getRequestArray(),1));
+	error_log(print_r(_getRequestArray(),1));
 	foreach (_getRequestArray() as $key => $value) {
 		foreach ($scm_list as $scm) {
 			if ($key == strstr($key, $scm . "_")) {
@@ -100,45 +100,44 @@ if (getStringFromRequest('create_repository') && getStringFromRequest('submit'))
 			}
 		}
 		if ($key == strstr($key, "scm_")) {
-                $hook_params[$key] = $value;
+			$hook_params[$key] = $value;
 		} elseif ($key == 'scmengine') {
-                error_log("foo");
-                if (is_array($value)) {
-                        error_log("bar");
-                        $scmarray = $value;
-                } else {
-                        error_log("baz");
-                        $scmarray = array($value);
-                }
+			error_log("foo");
+			if (is_array($value)) {
+				error_log("bar");
+				$scmarray = $value;
+			} else {
+				error_log("baz");
+				$scmarray = array($value);
+			}
 		}
 	}
 
-    error_log(print_r($scmarray,1));
+	error_log(print_r($scmarray,1));
 
 	$SCMFactory = new SCMFactory();
 	$scm_plugins = $SCMFactory->getSCMs();
 
 	$scm_changed = false;
 
-    foreach ($scm_plugins as $plugin) {
-			$myPlugin = plugin_get_object($plugin);
-            if (in_array($myPlugin->name, $scmarray)) {
-                    if (!$group->usesPlugin($myPlugin->name)) {
-                            $group->setPluginUse($myPlugin->name, 1);
-                            if ($myPlugin->getDefaultServer()) {
-                                    $group->setSCMBox($myPlugin->getDefaultServer());
-                            }
-                            $scm_changed = true;
-                    }
-			} else {
-                    if ($group->usesPlugin($myPlugin->name)) {
-                            $group->setPluginUse($myPlugin->name, 0);
-                            $scm_changed = true;
-                    }
+	foreach ($scm_plugins as $plugin) {
+		$myPlugin = plugin_get_object($plugin);
+		if (in_array($myPlugin->name, $scmarray)) {
+			if (!$group->usesPlugin($myPlugin->name)) {
+				$group->setPluginUse($myPlugin->name, 1);
+				if ($myPlugin->getDefaultServer()) {
+					$group->setSCMBox($myPlugin->getDefaultServer());
+				}
+				$scm_changed = true;
 			}
-    }
+		} else {
+			if ($group->usesPlugin($myPlugin->name)) {
+				$group->setPluginUse($myPlugin->name, 0);
+				$scm_changed = true;
+			}
+		}
+	}
 
-        
 	// Don't call scm plugin update if their form wasn't displayed
 	// to avoid processing an apparently empty form and reset configuration
 	if (!$scm_changed)

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

Summary of changes:
 src/common/widget/Widget_Rss.class.php |    8 +++--
 src/www/scm/admin/index.php            |   55 ++++++++++++++++----------------
 2 files changed, 32 insertions(+), 31 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list