diff --git a/appview.php b/appview.php index 034548e..ca8cf1b 100644 --- a/appview.php +++ b/appview.php @@ -93,11 +93,11 @@ function get_screenshot_img($appId, $versionId="") /** * TODO: what does it do ? */ -function display_catpath($catId) +function display_catpath($catId, $appId, $versionId = '') { $cat = new Category($catId); - $catFullPath = make_cat_path($cat->getCategoryPath()); + $catFullPath = make_cat_path($cat->getCategoryPath(), $appId, $versionId); echo html_frame_start("",'98%','',2); echo "
Category: ". $catFullPath ."
\n";
echo html_frame_end();
@@ -275,7 +275,7 @@ if($appId && !$versionId)
apidb_header("Viewing App - ".$data->appName);
// cat display
- display_catpath($app->data->catId);
+ display_catpath($app->data->catId, $appId);
// set Vendor
$vendor = $app->getVendor();
@@ -449,7 +449,7 @@ else if($appId && $versionId)
apidb_header("Viewing App Version - ".$data->appName);
// cat
- display_catpath($app->data->catId);
+ display_catpath($app->data->catId, $appId, $versionId);
// set URL
$appLinkURL = ($ver->webPage) ? "".substr(stripslashes($ver->webPage),0,30)."": " ";
diff --git a/bugs.php b/bugs.php
index 5cae5ee..a7ef631 100644
--- a/bugs.php
+++ b/bugs.php
@@ -42,11 +42,11 @@ function get_screenshot_img($appId, $versionId)
}
-function display_catpath($catId)
+function display_catpath($catId, $appId, $versionId = '')
{
$cat = new Category($catId);
- $catFullPath = make_cat_path($cat->getCategoryPath());
+ $catFullPath = make_cat_path($cat->getCategoryPath(),$appId, $versionId);
echo html_frame_start("",'98%','',2);
echo "
Category: ". $catFullPath ."
\n";
echo html_frame_end();
@@ -173,7 +173,7 @@ if($appId)
apidb_header("Search for bugs in Bugzila for - ".$data->appName);
//cat display
- display_catpath($app->data->catId);
+ display_catpath($app->data->catId, $appId);
//set Vendor
$vendor = $app->getVendor();
diff --git a/include/category.php b/include/category.php
index cea6a8d..efe2e49 100644
--- a/include/category.php
+++ b/include/category.php
@@ -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;
}
diff --git a/votestats.php b/votestats.php
index eb7f307..c5411c3 100644
--- a/votestats.php
+++ b/votestats.php
@@ -105,7 +105,6 @@ foreach ($cat_array_reversed as $i => $value)
/******************************************************************/
/* add to the list all of the sub sections of the current section */
$cat = new Category($catId);
-$catFullPath = make_cat_path($cat->getCategoryPath());
$subs = $cat->getCategoryList();
if($subs)