From 7fdac301801bc44f6fdb343187413bdfd2d5366c Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sun, 8 May 2011 15:23:09 +0000 Subject: h-source:added the driver entry for 3g-cards --- h-source/Library/Call.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'h-source/Library/Call.php') diff --git a/h-source/Library/Call.php b/h-source/Library/Call.php index e89b3b0..a2c7e68 100755 --- a/h-source/Library/Call.php +++ b/h-source/Library/Call.php @@ -72,10 +72,10 @@ function callHook() } //rewrite the URL -// if (Route::$rewrite === 'yes') -// { -// $url = rewrite($url); -// } + if (Route::$rewrite === 'yes') + { + $url = rewrite($url); + } // echo $url; @@ -212,18 +212,18 @@ function callHook() } -// //rewrite the URL -// function rewrite($url) -// { -// foreach (Route::$map as $key => $address) -// { -// if (preg_match('/^'.$key.'/',$url)) -// { -// return preg_replace('/^'.$key.'/',$address,$url); -// } -// } -// return ERROR_CONTROLLER.'/'.ERROR_ACTION; -// } +//rewrite the URL +function rewrite($url) +{ + foreach (Route::$map as $key => $address) + { + if (preg_match('/^'.$key.'/',$url)) + { + return preg_replace('/^'.$key.'/',$address,$url); + } + } + return $url; +} function getQueryString() { -- cgit v1.2.3