diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index 31ba5a02..292522a5 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -161,7 +161,7 @@ function load_messages($locale) { $fp = fopen(dirname(__FILE__)."/../locales/$locale/properties", "r"); while (!feof($fp)) { $line = fgets($fp, 4096); - $keyval = split("=", $line, 2 ); + $keyval = preg_split("/=/", $line, 2 ); if( isset($keyval[1]) ) { if($keyval[0] == 'encoding') { $current_encoding = trim($keyval[1]); diff --git a/src/messenger/webim/libs/operator.php b/src/messenger/webim/libs/operator.php index 8b6e6ee1..9696d682 100644 --- a/src/messenger/webim/libs/operator.php +++ b/src/messenger/webim/libs/operator.php @@ -158,7 +158,7 @@ function check_login($redirect=true) { global $webimroot; if( !isset( $_SESSION['operator'] ) ) { if( isset($_COOKIE['webim_lite']) ) { - list($login,$pwd) = split(",", $_COOKIE['webim_lite'], 2); + list($login,$pwd) = preg_split("/,/", $_COOKIE['webim_lite'], 2); $op = operator_by_login($login); if( $op && isset($pwd) && isset($op['vcpassword']) && md5($op['vcpassword']) == $pwd ) { $_SESSION['operator'] = $op; diff --git a/src/messenger/webim/operator/settings.php b/src/messenger/webim/operator/settings.php index 031d2b92..9069c1d1 100644 --- a/src/messenger/webim/operator/settings.php +++ b/src/messenger/webim/operator/settings.php @@ -70,7 +70,7 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) { } if($params['geolinkparams']) { - foreach(split(",", $params['geolinkparams']) as $oneparam) { + foreach(preg_split("/,/", $params['geolinkparams']) as $oneparam) { if(!preg_match("/^\s*(toolbar|scrollbars|location|status|menubar|width|height|resizable)=\d{1,4}$/", $oneparam)) { $errors[] = "Wrong link parameter: \"$oneparam\", should be one of 'toolbar, scrollbars, location, status, menubar, width, height or resizable'"; } diff --git a/src/messenger/webim/operator/translate.php b/src/messenger/webim/operator/translate.php index 43669416..9a719e6a 100644 --- a/src/messenger/webim/operator/translate.php +++ b/src/messenger/webim/operator/translate.php @@ -60,7 +60,7 @@ function save_message($locale,$key,$value) { $fp = fopen(dirname(__FILE__)."/../locales/$locale/properties", "r"); while (!feof($fp)) { $line = fgets($fp, 4096); - $keyval = split("=", $line, 2 ); + $keyval = preg_split("/=/", $line, 2 ); if( isset($keyval[1]) ) { if($keyval[0] == 'encoding') { $current_encoding = trim($keyval[1]);