appdb/include filter.php

WineHQ wineowner at wine.codeweavers.com
Thu Jul 5 16:49:17 CDT 2007


ChangeSet ID:	31239
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/07/05 16:49:17

Modified files:
	include        : filter.php 

Log message:
	Chris Morgan <cmorgan at alum.wpi.edu>
	Add a suggestion to users that are receiving filter errors to clear out their cookies.

Patch: http://cvs.winehq.org/patch.py?id=31239

Old revision  New revision  Changes     Path
 1.14          1.15          +10 -4      appdb/include/filter.php

Index: appdb/include/filter.php
diff -u -p appdb/include/filter.php:1.14 appdb/include/filter.php:1.15
--- appdb/include/filter.php:1.14	5 Jul 2007 21:49:17 -0000
+++ appdb/include/filter.php	5 Jul 2007 21:49:17 -0000
@@ -20,6 +20,8 @@ function filter_perform_filtering()
 function filter_gpc()
 {
     global $aClean;
+    $sErrorSuggestion = " Please try clearing out your cookies. If the problem continues ". 
+                        " please email ".APPDB_OWNER_EMAIL." with the error text.";
 
     $aKeys = array_keys($_REQUEST);
     for($i=0; $i < sizeof($aKeys); $i++)
@@ -61,13 +63,15 @@ function filter_gpc()
                 else if(empty($_REQUEST[$aKeys[$i]]))
                     $aClean[$aKeys[$i]] = 0;
                 else
-                    return "Fatal error: ".$aKeys[$i]." should be a numeric value.";
+                    return "Fatal error: ".$aKeys[$i]." should be a numeric value. ".
+                           $sErrorSuggestion;
             break;
             case "b": // boolean
                 if($_REQUEST[$aKeys[$i]]=="true" || $_REQUEST[$aKeys[$i]]=="false")
                     $aClean[$aKeys[$i]] = $_REQUEST[$aKeys[$i]];
                 else
-                    return "Fatal error: ".$aKeys[$i]." should be a boolean value.";
+                    return "Fatal error: ".$aKeys[$i]." should be a boolean value. ".
+                           $sErrorSuggestion;
             break;
             case "s": // string
                 switch($aKeys[$i][1])
@@ -85,10 +89,12 @@ function filter_gpc()
             break;
             case "a": // array
                  if(!is_array($_REQUEST[$aKeys[$i]]))
-                     return "Fatal error: ".$aKeys[$i]." should be an array.";
+                     return "Fatal error: ".$aKeys[$i]." should be an array. ".
+                            $sErrorSuggestion;
             break;
             default:
-                return "Fatal error: type of variable ".$aKeys[$i]." is not recognized.";
+                return "Fatal error: type of variable ".$aKeys[$i]." is not recognized.".
+                       $sErrorSuggestion;
                 break;
         }
     }



More information about the wine-cvs mailing list