diff --git a/webapp/controller/NGunController.class.php b/webapp/controller/GunController.class.php similarity index 96% rename from webapp/controller/NGunController.class.php rename to webapp/controller/GunController.class.php index 0c41dc6..2262f09 100644 --- a/webapp/controller/NGunController.class.php +++ b/webapp/controller/GunController.class.php @@ -1,6 +1,8 @@ 'Gun' +); + +function getRewriteClass($oldC) +{ + global $rewriteRule; + if (isset($rewriteRule[$oldC])) { + return $rewriteRule[$oldC]; + } + return $oldC; +} + try{ $c = $_REQUEST['c']; $a = $_REQUEST['a']; + $c = getRewriteClass($c); $classname = $c .'Controller'; $beginTick = phpcommon\getTickCount(); $obj = eval('$obj = new $classname(); $obj->handlePre(); $obj->$a(); $obj->handlePost();');