Skip to content
Snippets Groups Projects
Commit 131a123f authored by Preexo's avatar Preexo
Browse files

improved logging, fixes issue #174

parent 5b94ea37
No related branches found
No related tags found
No related merge requests found
......@@ -22,15 +22,15 @@ class Vtiger_WebUI extends Vtiger_EntryPoint {
* @throws AppException
*/
protected function checkLogin (Vtiger_Request $request) {
if (!$this->hasLogin()) {
$return_params = $_SERVER['QUERY_STRING'];
if($return_params && !$_SESSION['return_params']) {
//Take the url that user would like to redirect after they have successfully logged in.
$return_params = urlencode($return_params);
Vtiger_Session::set('return_params', $return_params);
}
header ('Location: index.php');
throw new AppException('Login is required');
if (!$this->hasLogin()) {
$return_params = $_SERVER['QUERY_STRING'];
if($return_params && !$_SESSION['return_params']) {
//Take the url that user would like to redirect after they have successfully logged in.
$return_params = urlencode($return_params);
Vtiger_Session::set('return_params', $return_params);
}
header ('Location: index.php');
throw new AppException('Login is required');
}
}
......@@ -208,8 +208,9 @@ class Vtiger_WebUI extends Vtiger_EntryPoint {
}
} catch(Exception $e) {
if ($view) {
// Log for developement.
error_log($e->getTraceAsString(), E_NOTICE);
// log for development
global $log;
$log->debug($e->getMessage().":".$e->getTraceAsString());
$viewer = new Vtiger_Viewer();
$viewer->assign('MESSAGE', $e->getMessage());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment