From 49cfca4b4cc60f332024a048a80e61e1fb39eb0f Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Fri, 20 Sep 2013 02:38:59 +0100 Subject: Make $kw configurable. --- mod/directory.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/directory.php b/mod/directory.php index c4305dfde..c3c1a30d5 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -70,7 +70,10 @@ function directory_content(&$a) { if($url) { // We might want to make the tagadelic count (&kw=) configurable or turn it off completely. - $query = $url . '?f=&kw=24' ; + $numtags = $a->config['system']['directorytags']; + + $kw = ((intval($numtags)) ? $numtags : 24); + $query = $url . '?f=&kw=' . $kw; if($search) $query .= '&name=' . urlencode($search) . '&keywords=' . urlencode($search); if(strpos($search,'@')) -- cgit v1.2.3 From 30f85a19b1bee0ffaf2505db8d48f647dfee9ad1 Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Fri, 20 Sep 2013 03:24:38 +0100 Subject: Use get_config --- mod/directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/directory.php b/mod/directory.php index c3c1a30d5..cc4e7e81f 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -70,7 +70,7 @@ function directory_content(&$a) { if($url) { // We might want to make the tagadelic count (&kw=) configurable or turn it off completely. - $numtags = $a->config['system']['directorytags']; + $numtags = get_config('system','directorytags'); $kw = ((intval($numtags)) ? $numtags : 24); $query = $url . '?f=&kw=' . $kw; -- cgit v1.2.3