From 9fd2fc1b9f87f2ea0b003460ef49cc809aa98735 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 14 Apr 2011 09:05:36 +0000 Subject: [PATCH] * fix for bug #197 --- module/user/control.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/module/user/control.php b/module/user/control.php index a937dc18bc..f70c53d525 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -349,7 +349,22 @@ class user extends control ) { if($this->app->getViewType() == 'json') die(json_encode(array('status' => 'success'))); - die(js::locate($this->post->referer, 'parent')); + if($this->config->requestType == 'PATH_INFO') + { + $path = substr($this->post->referer, strrpos($this->post->referer, '/')+1); + $path = rtrim($path, 'html'); + $path = rtrim($path, '.'); + list($module, $method) = explode($this->config->requestFix, $path); + } + else + { + $module = $this->get->m; + $method = $this->get->f; + } + if(common::hasPriv($module, $method)) + die(js::locate($this->post->referer, 'parent')); + else + die(js::locate($this->config->default->module, 'parent')); } else {