[evolvis-commits] r18241: [#2963] kill many addslashes()

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Apr 5 23:01:24 CEST 2012


Author: mirabilos
Date: 2012-04-05 23:01:23 +0200 (Thu, 05 Apr 2012)
New Revision: 18241

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/updates.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/tracker.php
Log:
[#2963] kill many addslashes()

I believe they are *all* obsolete with db_query_params()
but this commit only touches those in the tracker area


Modified: trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php	2012-04-05 21:01:19 UTC (rev 18240)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php	2012-04-05 21:01:23 UTC (rev 18241)
@@ -673,7 +673,7 @@
 		foreach ($efs as $ef) {
 			//new field in this tracker
 			$nef = new ArtifactExtraField($this);
-			if (!$nef->create( addslashes(util_unconvert_htmlspecialchars($ef['field_name'])), $ef['field_type'], $ef['attribute1'], $ef['attribute2'], $ef['is_required'], $ef['alias'])) {
+			if (!$nef->create(util_unconvert_htmlspecialchars($ef['field_name']), $ef['field_type'], $ef['attribute1'], $ef['attribute2'], $ef['is_required'], $ef['alias'])) {
 				$this->setError('Error Creating New Extra Field: '.$nef->getErrorMessage());
 				db_rollback();
 				return false;
@@ -686,7 +686,7 @@
 			while ($el = db_fetch_array($resel)) {
 				//new element
 				$nel = new ArtifactExtraFieldElement($nef);
-				if (!$nel->create( addslashes(util_unconvert_htmlspecialchars($el['element_name'])), $el['status_id'] )) {
+				if (!$nel->create(util_unconvert_htmlspecialchars($el['element_name']), $el['status_id'] )) {
 					db_rollback();
 					$this->setError('Error Creating New Extra Field Element: '.$nel->getErrorMessage());
 					return false;

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/updates.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/updates.php	2012-04-05 21:01:19 UTC (rev 18240)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/updates.php	2012-04-05 21:01:23 UTC (rev 18241)
@@ -353,7 +353,7 @@
 					echo ('Invalid filename :'.$input_file['tmp_name']);
 					exit;
 				}
-				$input_data = addslashes(fread(fopen($input_file['tmp_name'], 'r'), $size));
+				$input_data = fread(fopen($input_file['tmp_name'], 'r'), $size);
 
 				db_query_params ('UPDATE artifact_group_list SET custom_renderer=$1 WHERE group_artifact_id=$2',
 					 	array ($input_data,

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/tracker.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/tracker.php	2012-04-05 21:01:19 UTC (rev 18240)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/tracker.php	2012-04-05 21:01:23 UTC (rev 18241)
@@ -234,8 +234,6 @@
 							} else {
 								$ef[$efid] = $f;
 							}
-						} else {
-							$ef[$efid] = addslashes($ef[$efid]);
 						}
 					}
 				}



More information about the evolvis-commits mailing list