[Fusionforge-commits] r14721 - in trunk/src: common/pm plugins/scmhook/common plugins/scmhook/cronjobs

Alain Peyrat aljeux at fusionforge.org
Wed Oct 26 11:45:15 CEST 2011


Author: aljeux
Date: 2011-10-26 11:45:15 +0200 (Wed, 26 Oct 2011)
New Revision: 14721

Modified:
   trunk/src/common/pm/ProjectGroup.class.php
   trunk/src/common/pm/ProjectGroupFactory.class.php
   trunk/src/plugins/scmhook/common/scmhookPlugin.class.php
   trunk/src/plugins/scmhook/cronjobs/updateScmRepo.php
Log:
Better messages & HTML

Modified: trunk/src/common/pm/ProjectGroup.class.php
===================================================================
--- trunk/src/common/pm/ProjectGroup.class.php	2011-10-26 09:45:09 UTC (rev 14720)
+++ trunk/src/common/pm/ProjectGroup.class.php	2011-10-26 09:45:15 UTC (rev 14721)
@@ -144,7 +144,7 @@
 			return false;
 		}
 		if (strlen($description) < 10) {
-			$this->setError(_('Document Description Must Be At Least 10 Characters'));
+			$this->setError(_('Subproject Description Must Be At Least 10 Characters'));
 			return false;
 		}
 		if ($send_all_posts_to) {
@@ -325,7 +325,7 @@
 			return false;
 		}
 		if (strlen($description) < 10) {
-			$this->setError(_('Document Description Must Be At Least 10 Characters'));
+			$this->setError(_('Subproject Description Must Be At Least 10 Characters'));
 			return false;
 		}
 

Modified: trunk/src/common/pm/ProjectGroupFactory.class.php
===================================================================
--- trunk/src/common/pm/ProjectGroupFactory.class.php	2011-10-26 09:45:09 UTC (rev 14720)
+++ trunk/src/common/pm/ProjectGroupFactory.class.php	2011-10-26 09:45:15 UTC (rev 14721)
@@ -89,7 +89,7 @@
 	 *
 	 *	@return	array	The array of ProjectGroups.
 	 */
-	function &getProjectGroups() {
+	function getProjectGroups() {
 		if ($this->projectGroups) {
 			return $this->projectGroups;
 		}

Modified: trunk/src/plugins/scmhook/common/scmhookPlugin.class.php
===================================================================
--- trunk/src/plugins/scmhook/common/scmhookPlugin.class.php	2011-10-26 09:45:09 UTC (rev 14720)
+++ trunk/src/plugins/scmhook/common/scmhookPlugin.class.php	2011-10-26 09:45:15 UTC (rev 14721)
@@ -134,7 +134,7 @@
 			if ($statusDeploy)
 				echo '<p class="warning">'._('Hooks management update process waiting ...').'</p>';
 
-			echo '<h3>'._('Enable Repository Hooks').'</h3>';
+			echo '<h2>'._('Enable Repository Hooks').'</h2>';
 			$hooksPreCommit = array();
 			$hooksPostCommit = array();
 			foreach ($hooksAvailable as $hook) {
@@ -155,7 +155,7 @@
 				}
 			}
 			if (count($hooksPreCommit)) {
-				echo '<h4>'._('pre-commit Hooks').'</h4>';
+				echo '<h3>'._('pre-commit Hooks').'</h3>';
 				$tabletop = array('', _('Hook Name'), _('Description'));
 				$classth = array('unsortable', '', '');
 				echo $HTML->listTableTop($tabletop, false, 'sortable_scmhook_precommit', 'sortable', $classth);
@@ -179,7 +179,7 @@
 				echo $HTML->listTableBottom();
 			}
 			if (count($hooksPostCommit)) {
-				echo '<h4>'._('post-commit Hooks').'</h4>';
+				echo '<h3>'._('post-commit Hooks').'</h3>';
 				$tabletop = array('', _('Hook Name'), _('Description'));
 				$classth = array('unsortable', '', '');
 				echo $HTML->listTableTop($tabletop, false, 'sortable_scmhook_postcommit', 'sortable', $classth);
@@ -202,7 +202,7 @@
 				}
 				echo $HTML->listTableBottom();
 			}
-			echo '</div>';
+			echo '</div><p />';
 		} else {
 			echo '<p class="information">'._('No hooks available').'</p>';
 		}

Modified: trunk/src/plugins/scmhook/cronjobs/updateScmRepo.php
===================================================================
--- trunk/src/plugins/scmhook/cronjobs/updateScmRepo.php	2011-10-26 09:45:09 UTC (rev 14720)
+++ trunk/src/plugins/scmhook/cronjobs/updateScmRepo.php	2011-10-26 09:45:15 UTC (rev 14721)
@@ -23,8 +23,7 @@
  */
 
 require dirname(__FILE__).'/../../env.inc.php';
-
-require $gfwww.'include/squal_pre.php';
+require_once $gfcommon.'include/pre.php';
 require_once $gfcommon.'include/cron_utils.php';
 require_once $gfplugins.'scmhook/common/scmhookPlugin.class.php';
 
@@ -82,7 +81,7 @@
 			break;
 		}
 		default: {
-			cron_debug("WARNING No scm plugin found for this project ".$group->getUnixName()." or no cronjobs for thi type");
+			cron_debug("WARNING No scm plugin found for this project ".$group->getUnixName()." or no cronjobs for this type");
 			$returnvalue = false;
 			break;
 		}




More information about the Fusionforge-commits mailing list