make_cat_path() make use of arguments instead of globals

This commit is contained in:
Paul van Schayck
2004-12-25 20:11:13 +00:00
committed by WineHQ
parent f5741ea108
commit 2c6592efbd
4 changed files with 14 additions and 13 deletions

View File

@@ -182,7 +182,7 @@ function versionIdToName($versionId)
/**
* create the Category: line at the top of appdb pages$
*/
function make_cat_path($path)
function make_cat_path($path, $appId = '', $versionId = '')
{
$str = "";
$catCount = 0;
@@ -198,11 +198,13 @@ function make_cat_path($path)
$catCount++;
}
if($_REQUEST['appId'])
$str .= " > ".html_ahref(appIdToName($_REQUEST['appId']),"appview.php?appId=".$_REQUEST['appId']);
if(!empty($appId))
{
$str .= " > ".html_ahref(appIdToName($appId),"appview.php?appId=$appId");
if($_REQUEST['versionId'])
$str .= " > ".html_ahref(versionIdToName($_REQUEST['versionId']),"appview.php?appId=".$_REQUEST['appId']."&versionId=".$_REQUEST['versionId']);
if(!empty($versionId))
$str .= " > ".html_ahref(versionIdToName($versionId),"appview.php?appId=".$appId."&versionId=".$versionId);
}
return $str;
}