[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 22422335009c4dc7680ce292767821d0bd23e0d9

Franck VILLAUME nerville at fusionforge.org
Wed Feb 5 11:22:35 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, Branch_5_3 has been updated
       via  22422335009c4dc7680ce292767821d0bd23e0d9 (commit)
       via  5ed907f66158ac462737e0cdc598015d7d710e80 (commit)
       via  ac51b3029ab2f577befb16db325a7d7f852ff5e1 (commit)
      from  d63db37f5ce2316be16c0f98d1142c110e119e8f (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 22422335009c4dc7680ce292767821d0bd23e0d9
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Feb 5 11:19:53 2014 +0100

    snippet: fix download, disable debug

diff --git a/src/www/snippet/download.php b/src/www/snippet/download.php
index 09b0f70..e3a1eec 100644
--- a/src/www/snippet/download.php
+++ b/src/www/snippet/download.php
@@ -3,6 +3,7 @@
  * Code Snippets Repository
  *
  * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -34,9 +35,10 @@ $result = db_query_params ('SELECT language,code FROM (snippet NATURAL JOIN snip
 			   array ($id));
 
 if ($result && db_numrows($result) > 0) {
+	$sysdebug_enable = false;
 	header('Content-Type: text/plain');
 	header('Content-Disposition: attachment; filename="snippet_'.$id.$SCRIPT_EXTENSION[db_result($result,0,'language')].'"');
-	if (strlen(db_result($result,0,'code')) > 1) {
+	if (strlen(db_result($result,0,'code'))) {
 		echo util_unconvert_htmlspecialchars( db_result($result,0,'code') );
 	} else {
 		echo 'nothing in here';

commit 5ed907f66158ac462737e0cdc598015d7d710e80
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Feb 5 11:04:27 2014 +0100

    snippet: use HTML5 required

diff --git a/src/www/snippet/addversion.php b/src/www/snippet/addversion.php
index e59eafd..8570990 100644
--- a/src/www/snippet/addversion.php
+++ b/src/www/snippet/addversion.php
@@ -3,6 +3,7 @@
  * Code Snippets Repository
  *
  * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -91,16 +92,16 @@ if (session_loggedin()) {
 		<input type="hidden" name="id" value="<?php echo $id; ?>" />
 
 		<table>
-		<tr><td colspan="2"><strong><?php echo _('Version')._(':'); ?></strong><br />
-			<input type="text" name="version" size="10" maxlength="15" />
+		<tr><td colspan="2"><strong><?php echo _('Version')._(':'). utils_requiredField(); ?></strong><br />
+			<input type="text" name="version" size="10" maxlength="15" required="required" />
 		</td></tr>
 
-		<tr><td colspan="2"><strong><?php echo _('Changes')._(':'); ?></strong><br />
-			<textarea name="changes" rows="5" cols="45"></textarea>
+		<tr><td colspan="2"><strong><?php echo _('Changes')._(':'). utils_requiredField(); ?></strong><br />
+			<textarea name="changes" rows="5" cols="45" required="required" s></textarea>
 		</td></tr>
 
-		<tr><td colspan="2"><strong><?php echo _('Paste the Code Here')._(':'); ?></strong><br />
-			<textarea name="code" rows="30" cols="85"></textarea>
+		<tr><td colspan="2"><strong><?php echo _('Paste the Code Here')._(':'). utils_requiredField(); ?></strong><br />
+			<textarea name="code" rows="30" cols="85" required="required" ></textarea>
 		</td></tr>
 
 		<tr><td colspan="2" class="align-center">
diff --git a/src/www/snippet/submit.php b/src/www/snippet/submit.php
index bced01b..a88b84a 100644
--- a/src/www/snippet/submit.php
+++ b/src/www/snippet/submit.php
@@ -3,6 +3,7 @@
  * Code Snippets Repository
  *
  * Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -101,11 +102,11 @@ if (session_loggedin()) {
 	<table>
 
 	<tr><td colspan="2">
-	    <?php echo $HTML->html_input('name', '', _('Title')._(': ') . utils_requiredField(), 'text', '', array('size' => '45', 'maxlength' => '60')); ?>
+	    <?php echo $HTML->html_input('name', '', _('Title')._(': ') . utils_requiredField(), 'text', '', array('size' => '45', 'maxlength' => '60', 'required' => 'required')); ?>
 	</td></tr>
 
 	<tr><td colspan="2">
-        <?php echo $HTML->html_textarea('description', '', _('Description')._(': ') . utils_requiredField(), '', array('rows' => '5', 'cols' => '45')); ?>
+        <?php echo $HTML->html_textarea('description', '', _('Description')._(': ') . utils_requiredField(), '', array('rows' => '5', 'cols' => '45', 'required' => 'required')); ?>
 	</td></tr>
 
 	<tr>
@@ -133,11 +134,11 @@ if (session_loggedin()) {
 	</tr>
 
 	<tr><td colspan="2">
-        <?php echo $HTML->html_input('version', '', _('Version')._(': ') . utils_requiredField(), 'text', '', array('size' => '10', 'maxlength' => '15')); ?>
+        <?php echo $HTML->html_input('version', '', _('Version')._(': ') . utils_requiredField(), 'text', '', array('size' => '10', 'maxlength' => '15', 'required' => 'required')); ?>
 	</td></tr>
 
 	<tr><td colspan="2">
-	    <?php echo $HTML->html_textarea('code', '', _('Paste the Code Here')._(': ') . utils_requiredField(), '', array('rows' => '30', 'cols' => '85')); ?>
+	    <?php echo $HTML->html_textarea('code', '', _('Paste the Code Here')._(': ') . utils_requiredField(), '', array('rows' => '30', 'cols' => '85', 'required' => 'required')); ?>
 	</td></tr>
 
 	<tr><td colspan="2" class="align-center">

commit ac51b3029ab2f577befb16db325a7d7f852ff5e1
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Feb 5 10:19:56 2014 +0100

    snippet: remove double feedback display, cleanup

diff --git a/src/www/snippet/snippet_utils.php b/src/www/snippet/snippet_utils.php
index e4d9428..1cf0bd2 100644
--- a/src/www/snippet/snippet_utils.php
+++ b/src/www/snippet/snippet_utils.php
@@ -4,7 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems - Tim Perdue
  * Copyright 2012, Jean-Christophe Masson - French National Education Department
- * Copyright 2012, Franck Villaume - TrivialDev
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -103,24 +103,12 @@ $SCRIPT_EXTENSION[16] = '.cs';
 
 function snippet_header($params) {
 	global $HTML;
-	global $feedback;
-	global $warning_msg;
-	global $error_msg;
 
 	if (!forge_get_config('use_snippet')) {
 		exit_disabled();
 	}
 
 	$HTML->header($params);
-	if (!empty($error_msg)) {
-		html_feedback_top($error_msg);
-	}
-	if (!empty($warning_msg)) {
-		html_feedback_top($warning_msg);
-	}
-	if (!empty($feedback)) {
-		html_feedback_top($feedback);
-	}
 
 	/*
 		Show horizontal links
@@ -134,7 +122,7 @@ function snippet_header($params) {
 }
 
 function snippet_footer($params) {
-	GLOBAL $HTML;
+	global $HTML;
 	$HTML->footer($params);
 }
 
diff --git a/src/www/snippet/submit.php b/src/www/snippet/submit.php
index 5219b18..bced01b 100644
--- a/src/www/snippet/submit.php
+++ b/src/www/snippet/submit.php
@@ -86,10 +86,10 @@ if (session_loggedin()) {
 
 	?>
 	<p>
-    <?php echo _('You can post a new code snippet and share it with other people around the world. Just fill in this information. <strong>Give a good description</strong> and <strong>comment your code</strong> so others can read and understand it.'); ?>
+	<?php echo _('You can post a new code snippet and share it with other people around the world. Just fill in this information. <strong>Give a good description</strong> and <strong>comment your code</strong> so others can read and understand it.'); ?>
 	</p>
 	<p>
-    <?php echo _('<span class="important">Note:</span> You can submit a new version of an existing snippet by browsing the library. You should only use this page if you are submitting an entirely new script or function.'); ?>
+	<?php echo _('<span class="important">Note:</span> You can submit a new version of an existing snippet by browsing the library. You should only use this page if you are submitting an entirely new script or function.'); ?>
 	</p>
 	<form action="<?php echo getStringFromServer('PHP_SELF'); ?>" method="post" id="snippet_submit">
 	<?php

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

Summary of changes:
 src/www/snippet/addversion.php    |   13 +++++++------
 src/www/snippet/download.php      |    4 +++-
 src/www/snippet/snippet_utils.php |   16 ++--------------
 src/www/snippet/submit.php        |   13 +++++++------
 4 files changed, 19 insertions(+), 27 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list