split is deprecated fix

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@646 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2009-08-24 22:06:55 +00:00
parent 1c8e8b88bf
commit 85f5e291d7
4 changed files with 4 additions and 4 deletions

View File

@ -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]);

View File

@ -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;

View File

@ -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'";
}

View File

@ -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]);