equal
deleted
inserted
replaced
2221 */ |
2221 */ |
2222 |
2222 |
2223 function paginate_array($q, $num_results, $result_url, $start = 0, $perpage = 10, $header = '', $footer = '') |
2223 function paginate_array($q, $num_results, $result_url, $start = 0, $perpage = 10, $header = '', $footer = '') |
2224 { |
2224 { |
2225 global $db, $session, $paths, $template, $plugins; // Common objects |
2225 global $db, $session, $paths, $template, $plugins; // Common objects |
2226 $parser = $template->makeParserText($tpl_text); |
|
2227 $num_pages = ceil ( $num_results / $perpage ); |
2226 $num_pages = ceil ( $num_results / $perpage ); |
2228 $out = ''; |
2227 $out = ''; |
2229 $i = 0; |
2228 $i = 0; |
2230 $this_page = ceil ( $start / $perpage ); |
2229 $this_page = ceil ( $start / $perpage ); |
2231 |
2230 |
2666 */ |
2665 */ |
2667 |
2666 |
2668 function sanitize_tag($tag) |
2667 function sanitize_tag($tag) |
2669 { |
2668 { |
2670 $tag = strtolower($tag); |
2669 $tag = strtolower($tag); |
2671 $tag = preg_replace('/[^\w _@\$%\^&-]+/', '', $tag); |
2670 $tag = preg_replace('/[^\w @\$%\^&-]+/', '', $tag); |
|
2671 $tag = str_replace('_', ' ', $tag); |
2672 $tag = trim($tag); |
2672 $tag = trim($tag); |
2673 return $tag; |
2673 return $tag; |
2674 } |
2674 } |
2675 |
2675 |
2676 /** |
2676 /** |