diff --git a/src/messenger/.project b/src/messenger/.project index 83da58a6..1885041d 100644 --- a/src/messenger/.project +++ b/src/messenger/.project @@ -1,6 +1,6 @@ - messenger-lite-sf + messenger diff --git a/src/messenger/webim/libs/operator.php b/src/messenger/webim/libs/operator.php index 8aa14328..de73989f 100644 --- a/src/messenger/webim/libs/operator.php +++ b/src/messenger/webim/libs/operator.php @@ -147,7 +147,7 @@ function generate_button($title,$locale,$style,$group,$inner,$showhost,$forcesec return "".$temp.""; } -function check_login() { +function check_login($redirect=true) { global $webimroot; if( !isset( $_SESSION['operator'] ) ) { if( isset($_COOKIE['webim_lite']) ) { @@ -162,9 +162,13 @@ function check_login() { if($_SERVER['REQUEST_METHOD'] == 'GET' && $_SERVER['QUERY_STRING']) { $requested .= "?".$_SERVER['QUERY_STRING']; } - $_SESSION['backpath'] = $requested; - header("Location: $webimroot/operator/login.php"); - exit; + if($redirect) { + $_SESSION['backpath'] = $requested; + header("Location: $webimroot/operator/login.php"); + exit; + } else { + return null; + } } return $_SESSION['operator']; } diff --git a/src/messenger/webim/operator/autologin.php b/src/messenger/webim/operator/autologin.php new file mode 100644 index 00000000..593ea6c9 --- /dev/null +++ b/src/messenger/webim/operator/autologin.php @@ -0,0 +1,28 @@ +OK"; +} else { + echo "FAILED"; +} + +exit; +?> \ No newline at end of file