/packages/RewriteURL/RewriteURL/SmartyPlugins/modifier.glink.php
PHP | 22 lines | 10 code | 3 blank | 9 comment | 1 complexity | 5a3eb2c00d8a29b51bdefaa71ff9b525 MD5 | raw file
1<?php
2/**
3 * Make link string from given formatted string.
4 * If OUTPUT_LINK_STYLE is
5 *
6 * @param string $string
7 * @param boolean $with_gets $_GET parametrs to the end
8 * @param string $exclude param from $_GET. (should be coma separated)
9 * @return string
10 */
11function smarty_modifier_glink($link, $with_gets = false, $exclude = ''){
12 $exclude = explode(",", $exclude);
13
14 if($with_gets){
15 RewriteURL::ensureLastSlash($link);
16 $link .= getAllGetParams($exclude);
17 }
18
19 $link = Reg::get('rewriteURL')->glink($link);
20
21 return $link;
22}