mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
Show categories on web site from data, not hard-coded
This commit is contained in:
parent
bef8695994
commit
f9fd11035c
1 changed files with 10 additions and 2 deletions
|
|
@ -464,8 +464,16 @@ class FDroid
|
|||
if(($query_vars['fdfilter']===null || $query_vars['fdfilter']!='') && $numpages>0)
|
||||
{
|
||||
$out.='<div style="float:left;">';
|
||||
if($query_vars['fdfilter']===null) {
|
||||
$categories = array('All applications','Games','Internet','Multimedia','Navigation','Office','System');
|
||||
if($query_vars['fdfilter']===null) {
|
||||
|
||||
$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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue