Conditions | 3 |
Paths | 4 |
Total Lines | 23 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | function newbbTrackbackResponse($error = 0, $error_message = '') |
||
26 | { |
||
27 | $moduleConfig = newbbLoadConfig(); |
||
28 | |||
29 | if (!empty($moduleConfig['rss_utf8'])) { |
||
30 | $charset = 'utf-8'; |
||
31 | $error_message = xoops_utf8_encode($error_message); |
||
|
|||
32 | } else { |
||
33 | $charset = _CHARSET; |
||
34 | } |
||
35 | header('Content-Type: text/xml; charset="' . $charset . '"'); |
||
36 | if ($error) { |
||
37 | echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n"; |
||
38 | echo '<response>\n'; |
||
39 | echo '<error>1</error>\n'; |
||
40 | echo '<message>$error_message</message>\n'; |
||
41 | echo '</response>'; |
||
42 | exit(); |
||
43 | } |
||
44 | echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n"; |
||
45 | echo '<response>\n'; |
||
46 | echo '<error>0</error>\n'; |
||
47 | echo '</response>'; |
||
48 | } |
||
50 |