[implement the api/laconica/config method
Evan Prodromou <evan@prodromou.name>**20081230211444]
[better serialization of arrays and booleans in config output
-Evan Prodromou <evan@prodromou.name>**20081230211957]
\ No newline at end of file
+Evan Prodromou <evan@prodromou.name>**20081230211957]
+[wrapper element for config.xml
+Evan Prodromou <evan@prodromou.name>**20081230212202]
\ No newline at end of file
switch ($apidata['content-type']) {
case 'xml':
$this->init_document('xml');
+ common_element_start('config');
// XXX: check that all sections and settings are legal XML elements
foreach ($keys as $section => $settings) {
common_element_start($section);
}
common_element_end($section);
}
+ common_element_end('config');
$this->end_document('xml');
break;
case 'json':
-hunk ./actions/twitapilaconica.php 122
-- common_element($setting, null, common_config($section, $setting));
-+ $value = common_config($section, $setting);
-+ if (is_array($value)) {
-+ $value = implode(',', $value);
-+ } else if ($value === false) {
-+ $value = 'false';
-+ } else if ($value === true) {
-+ $value = 'true';
-+ }
-+ common_element($setting, null, $value);
+hunk ./actions/twitapilaconica.php 118
++ common_element_start('config');
+hunk ./actions/twitapilaconica.php 135
++ common_element_end('config');
switch ($apidata['content-type']) {
case 'xml':
$this->init_document('xml');
+ common_element_start('config');
// XXX: check that all sections and settings are legal XML elements
foreach ($keys as $section => $settings) {
common_element_start($section);
}
common_element_end($section);
}
+ common_element_end('config');
$this->end_document('xml');
break;
case 'json':