[Fusionforge-commits] FusionForge branch master updated. b7e1d9759036d2c047d09610ae96d0d4521dfe24

Franck VILLAUME nerville at fusionforge.org
Wed Feb 5 11:28: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  b7e1d9759036d2c047d09610ae96d0d4521dfe24 (commit)
       via  1164630a93e3ee8e13b4295587cdf668e08cd17b (commit)
       via  49fb2d83f80ca4d3c88e779d1bec4dfa99cb4c7b (commit)
      from  f95a660d956f97d4408701140fdafdfc582f984c (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 b7e1d9759036d2c047d09610ae96d0d4521dfe24
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 1164630a93e3ee8e13b4295587cdf668e08cd17b
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 338b9a8..302360f 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 8b44e3e..22cfeb1 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 49fb2d83f80ca4d3c88e779d1bec4dfa99cb4c7b
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Wed Feb 5 10:19:56 2014 +0100

    merge from Branch_5_3

diff --git a/src/www/snippet/snippet_utils.php b/src/www/snippet/snippet_utils.php
index 1207945..cdb48e7 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
diff --git a/src/www/snippet/submit.php b/src/www/snippet/submit.php
index b7f0c00..8b44e3e 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 |   14 +-------------
 src/www/snippet/submit.php        |   13 +++++++------
 4 files changed, 18 insertions(+), 26 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list