appdb/. appsubmit.php

WineHQ wineowner at wine.codeweavers.com
Sat Jan 6 23:22:23 CST 2007


ChangeSet ID:	30863
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/01/06 23:22:23

Modified files:
	.              : appsubmit.php 

Log message:
	Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
	Fix app submission. We should check values are non-zero or non-null, not whether they are numeric

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

Old revision  New revision  Changes     Path
 1.58          1.59          +9 -9       appdb/appsubmit.php

Index: appdb/appsubmit.php
diff -u -p appdb/appsubmit.php:1.58 appdb/appsubmit.php:1.59
--- appdb/appsubmit.php:1.58	7 Jan 2007  5:22:23 -0000
+++ appdb/appsubmit.php	7 Jan 2007  5:22:23 -0000
@@ -168,7 +168,7 @@ if ($aClean['sSub'])
                 }
                 //FIXME: remove this when we fix vendor submission
                 $oApp->sKeywords = $aClean['sAppKeywords']." *** ".$aClean['sAppVendorName'];
-                if(is_numeric($oApp->iAppId))
+                if($oApp->iAppId)
                 {
                     $oApp->update();
                     $oApp->ReQueue();
@@ -187,7 +187,7 @@ if ($aClean['sSub'])
         } 
         else
         {
-            if(is_numeric($oVersion->iVersionId))
+            if($oVersion->iVersionId)
             {
                 $oVersion->update();
                 $oVersion->ReQueue();
@@ -208,7 +208,7 @@ if ($aClean['sSub'])
                 }
             }
             $oTest->iVersionId = $oVersion->iVersionId;
-            if(is_numeric($oTest->iTestingId))
+            if($oTest->iTestingId)
             {
                 $oTest->update(true);
                 $oTest->ReQueue();
@@ -221,7 +221,7 @@ if ($aClean['sSub'])
     }
     if ($aClean['sSub'] == 'Delete')
     {
-        if (($aClean['sAppType'] == "application") && is_numeric($aClean['iAppId'])) // application
+        if (($aClean['sAppType'] == "application") && $aClean['iAppId']) // application
         {
             // get the queued versions that refers to the application entry we just removed
             // and delete them as we implicitly added a version entry when adding a new application
@@ -239,7 +239,7 @@ if ($aClean['sSub'])
             // delete the application entry
             $oApp = new Application($aClean['iAppId']);
             $oApp->delete();
-        } else if(($aClean['sAppType'] == "version") && is_numeric($aClean['iVersionId']))  // version
+        } else if(($aClean['sAppType'] == "version") && $aClean['iVersionId'])  // version
         {
             $oVersion = new Version($aClean['iVersionId']);
             $oVersion->delete();
@@ -265,7 +265,7 @@ if ($aClean['sSub'])
                 perform_search_and_output_results($oApp->sName);
                 echo html_frame_end("&nbsp;");
             }
-            if(is_numeric($oApp->iAppId))
+            if($oApp->iAppId)
             {
             
             //help
@@ -316,7 +316,7 @@ if ($aClean['sSub'])
                 $aClean['sAppVendorName'] = "";
         } else //app version
         { 
-            if(is_numeric($oVersion->iVersionId))
+            if($oVersion->iVersionId)
             {
                 $oAppForVersion = new Application($oVersion->iAppId);
                 echo html_frame_start("Potential duplicate versions in the database for application: ".$oAppForVersion->sName,"90%","",0);
@@ -362,7 +362,7 @@ if ($aClean['sSub'])
         if($aClean['sAppType'] == 'application') // application
         {
             echo '<input type="hidden" name="sAppType" value="application" />';
-            if(is_numeric($oApp->iAppId))
+            if($oApp->iAppId)
             {
                 echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
                 echo '<input type=submit value=" Re-Submit App Into Database " class=button>&nbsp',"\n";
@@ -376,7 +376,7 @@ if ($aClean['sSub'])
         {
             echo '<input type="hidden" name="sAppType" value="version" />';
             echo '<input type="hidden" name="iAppId" value="'.$aClean['iAppId'].'" />';
-            if(is_numeric($oVersion->iVersionId))
+            if($oVersion->iVersionId)
             {
                 echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
                 echo '<input type="submit" value="Re-Submit Version Into Database " class="button">&nbsp',"\n";



More information about the wine-cvs mailing list