Allow filtering by license when browsing downloadable apps

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-01-27 22:58:12 +00:00
committed by WineHQ
parent 5bb8448821
commit 57c4b64986
2 changed files with 56 additions and 10 deletions

View File

@@ -1121,6 +1121,20 @@ class Version {
return $sReturn;
}
/* In order to prevent MySQL injections. Returns matched license */
function checkLicense($sLicense)
{
$aLicense = array(LICENSE_RETAIL, LICENSE_OPENSOURCE, LICENSE_FREEWARE,
LICENSE_DEMO, LICENSE_SHAREWARE);
foreach($aLicense as $sElement)
{
if($sLicense == $sElement)
return $sElement;
}
return FALSE;
}
}
?>