category: Remove reference to appbrowse.php, fix variable naming

This commit is contained in:
Alexander Nicolaysen Sørnes
2009-08-05 20:29:40 +02:00
committed by Alexander Nicolaysen Sørnes
parent 55e325dc80
commit 6b9332ab2f

View File

@@ -241,37 +241,37 @@ class Category {
/**
* create the Category: line at the top of appdb pages$
*/
function make_cat_path($path, $appId = '', $versionId = '')
function make_cat_path($aPath, $iAppId = '', $iVersionId = '')
{
$str = "";
$catCount = 0;
while(list($iCatIdx, list($iCatId, $name)) = each($path))
$sStr = "";
$iCatCount = 0;
while(list($iCatIdx, list($iCatId, $sName)) = each($aPath))
{
if($name == "ROOT")
$catname = "Main";
if($sName == "ROOT")
$sCatname = "Main";
else
$catname = $name;
$sCatname = $sName;
if ($catCount > 0) $str .= " > ";
$str .= html_ahref($catname,"appbrowse.php?catId=$iCatId");
$catCount++;
if ($iCatCount > 0) $sStr .= " > ";
$sStr .= html_ahref($sCatname,"objectManager.php?sClass=category&iId=$iCatId&sAction=view&sTitle=Browse+Applications");
$iCatCount++;
}
if(!empty($appId))
if($iAppId)
{
$oApp = new Application($appId);
if(!empty($versionId))
$oApp = new Application($iAppId);
if($iVersionId)
{
$oVersion = new Version($versionId);
$str .= " > ".$oApp->objectMakeLink();
$str .= " > ".$oVersion->sName;
$oVersion = new Version($iVersionId);
$sStr .= " > ".$oApp->objectMakeLink();
$sStr .= " > ".$oVersion->sName;
} else
{
$str .= " > ".$oApp->sName;
$sStr .= " > ".$oApp->sName;
}
}
return $str;
return $sStr;
}
public function objectGetState()