Replacing split() with explode().

1.9.x
Julio Montoya 11 years ago
parent e5862de9c3
commit a2b919a091
  1. 14
      main/inc/lib/usermanager.lib.php

@ -1414,7 +1414,7 @@ class UserManager
case self::USER_FIELD_TYPE_SELECT_MULTIPLE: case self::USER_FIELD_TYPE_SELECT_MULTIPLE:
$sqluo = "SELECT * FROM $t_ufo WHERE field_id = ".$rowuf['id']; $sqluo = "SELECT * FROM $t_ufo WHERE field_id = ".$rowuf['id'];
$resuo = Database::query($sqluo); $resuo = Database::query($sqluo);
$values = split(';', $fvalues); $values = explode(';', $fvalues);
if (Database::num_rows($resuo) > 0) { if (Database::num_rows($resuo) > 0) {
$check = false; $check = false;
while ($rowuo = Database::fetch_array($resuo)) { while ($rowuo = Database::fetch_array($resuo)) {
@ -1639,7 +1639,7 @@ class UserManager
$twolist = explode('|', $fieldoptions); $twolist = explode('|', $fieldoptions);
$counter = 0; $counter = 0;
foreach ($twolist as $individual_list) { foreach ($twolist as $individual_list) {
$splitted_individual_list = split(';', $individual_list); $splitted_individual_list = explode(';', $individual_list);
foreach ($splitted_individual_list as $individual_list_option) { foreach ($splitted_individual_list as $individual_list_option) {
//echo 'counter:'.$counter; //echo 'counter:'.$counter;
if ($counter == 0) { if ($counter == 0) {
@ -1651,7 +1651,7 @@ class UserManager
$counter++; $counter++;
} }
} else { } else {
$list = split(';', $fieldoptions); $list = explode(';', $fieldoptions);
} }
foreach ($list as $option) { foreach ($list as $option) {
$option = Database::escape_string($option); $option = Database::escape_string($option);
@ -1732,7 +1732,7 @@ class UserManager
$twolist = explode('|', $fieldoptions); $twolist = explode('|', $fieldoptions);
$counter = 0; $counter = 0;
foreach ($twolist as $individual_list) { foreach ($twolist as $individual_list) {
$splitted_individual_list = split(';', $individual_list); $splitted_individual_list = explode(';', $individual_list);
foreach ($splitted_individual_list as $individual_list_option) { foreach ($splitted_individual_list as $individual_list_option) {
//echo 'counter:'.$counter; //echo 'counter:'.$counter;
if ($counter == 0) { if ($counter == 0) {
@ -1744,7 +1744,7 @@ class UserManager
$counter++; $counter++;
} }
} else { } else {
$templist = split(';', $fieldoptions); $templist = explode(';', $fieldoptions);
$list = array_map('trim', $templist); $list = array_map('trim', $templist);
} }
@ -1864,7 +1864,7 @@ class UserManager
$rowu = Database::fetch_array($resu); $rowu = Database::fetch_array($resu);
$fval = $rowu['fval']; $fval = $rowu['fval'];
if ($row['type'] == self::USER_FIELD_TYPE_SELECT_MULTIPLE) { if ($row['type'] == self::USER_FIELD_TYPE_SELECT_MULTIPLE) {
$fval = split(';', $rowu['fval']); $fval = explode(';', $rowu['fval']);
} }
} else { } else {
$row_df = Database::fetch_array($res_df); $row_df = Database::fetch_array($res_df);
@ -1931,7 +1931,7 @@ class UserManager
$rowu = Database::fetch_array($resu); $rowu = Database::fetch_array($resu);
$fval = $rowu['fval']; $fval = $rowu['fval'];
if ($row['type'] == self::USER_FIELD_TYPE_SELECT_MULTIPLE) { if ($row['type'] == self::USER_FIELD_TYPE_SELECT_MULTIPLE) {
$fval = split(';', $rowu['fval']); $fval = explode(';', $rowu['fval']);
} }
} }
if ($prefix) { if ($prefix) {

Loading…
Cancel
Save