From 77a375df1ff4179bde89db11aa3c80cb41220797 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sun, 15 Apr 2018 01:31:16 +0900 Subject: [PATCH] Update uri.php --- system/uri.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/uri.php b/system/uri.php index ecb6e2b..d18ea8a 100644 --- a/system/uri.php +++ b/system/uri.php @@ -75,10 +75,16 @@ if(!function_exists("get_requests")) { if(!function_exists("get_route_link")) { function get_route_link($route, $data=array(), $entity=true) { - $link = sprintf("%s?route=%s&%s", base_url(), $route , http_build_query($data)); + $link = sprintf("%s?route=%s", base_url(), $route); + + if(count($data) > 0) { + $link .= "&" . http_build_query($data); + } + if($entity == true) { $link = str_replace("&", "&", $link); } + return $link; } }