| @@ 307-319 (lines=13) @@ | ||
| 304 | * @param string $file Path to the XML-file |
|
| 305 | * @return array All user information read from the file |
|
| 306 | */ |
|
| 307 | function parse_xml_data($file) |
|
| 308 | { |
|
| 309 | global $users; |
|
| 310 | $users = array(); |
|
| 311 | $parser = xml_parser_create('UTF-8'); |
|
| 312 | xml_set_element_handler($parser, 'element_start', 'element_end'); |
|
| 313 | xml_set_character_data_handler($parser, 'character_data'); |
|
| 314 | xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false); |
|
| 315 | xml_parse($parser, api_utf8_encode_xml(file_get_contents($file))); |
|
| 316 | xml_parser_free($parser); |
|
| 317 | ||
| 318 | return $users; |
|
| 319 | } |
|
| 320 | ||
| 321 | $this_section = SECTION_PLATFORM_ADMIN; |
|
| 322 | api_protect_admin_script(true, null, 'login'); |
|
| @@ 308-319 (lines=12) @@ | ||
| 305 | * @param string $file Path to the XML-file |
|
| 306 | * @return array All user information read from the file |
|
| 307 | */ |
|
| 308 | function parse_xml_data($file) |
|
| 309 | { |
|
| 310 | global $users; |
|
| 311 | $users = array(); |
|
| 312 | $parser = xml_parser_create('UTF-8'); |
|
| 313 | xml_set_element_handler($parser, 'element_start', 'element_end'); |
|
| 314 | xml_set_character_data_handler($parser, 'character_data'); |
|
| 315 | xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false); |
|
| 316 | xml_parse($parser, api_utf8_encode_xml(file_get_contents($file))); |
|
| 317 | xml_parser_free($parser); |
|
| 318 | return $users; |
|
| 319 | } |
|
| 320 | ||
| 321 | $this_section = SECTION_PLATFORM_ADMIN; |
|
| 322 | api_protect_admin_script(true, null, 'login'); |
|