From aed5ba4ec86f63f2f19393b47e1011fcd6e78895 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 21 May 2014 09:18:21 -0300 Subject: Fix package changelog link when package doesn't has its own directory inside config subdir. Ticket #3672 --- usr/local/www/pkg_mgr.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr/local/www/pkg_mgr.php') diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php index 73dd917..4afb295 100644 --- a/usr/local/www/pkg_mgr.php +++ b/usr/local/www/pkg_mgr.php @@ -202,7 +202,11 @@ include("head.inc"); /* get history/changelog git dir */ $commit_dir=explode("/",$index['config_file']); - $changeloglink ="https://github.com/pfsense/pfsense-packages/commits/master/config/".$commit_dir[(count($commit_dir)-2)]; + $changeloglink = "https://github.com/pfsense/pfsense-packages/commits/master/config/"; + if ($commit_dir[(count($commit_dir)-2)] == "config") + $changeloglink .= $commit_dir[(count($commit_dir)-1)]; + else + $changeloglink .= $commit_dir[(count($commit_dir)-2)]; /* Check package info link */ if($index['pkginfolink']) { -- cgit v1.1