Show categories on web site from data, not hard-coded

This commit is contained in:
Ciaran Gultnieks 2012-03-03 10:56:28 +00:00
parent bef8695994
commit f9fd11035c

View file

@ -465,7 +465,15 @@ class FDroid
{
$out.='<div style="float:left;">';
if($query_vars['fdfilter']===null) {
$categories = array('All applications','Games','Internet','Multimedia','Navigation','Office','System');
$categories = array('All categories');
$handle = fopen(getenv('DOCUMENT_ROOT').'/repo/categories.txt', 'r');
if ($handle) {
while (($buffer = fgets($handle, 4096)) !== false) {
$categories[] = $buffer;
}
fclose($handle);
}
$out.='<form name="categoryform" action="" method="get">';
$out.=$this->makeformdata($query_vars);