forked from GNUsocial/gnu-social
wrapper element for config.xml
darcs-hash:20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz
This commit is contained in:
parent
76d91a358b
commit
d57c06b417
@ -111,3 +111,5 @@ Evan Prodromou <evan@prodromou.name>**20081230210114]
|
|||||||
Evan Prodromou <evan@prodromou.name>**20081230211444]
|
Evan Prodromou <evan@prodromou.name>**20081230211444]
|
||||||
[better serialization of arrays and booleans in config output
|
[better serialization of arrays and booleans in config output
|
||||||
Evan Prodromou <evan@prodromou.name>**20081230211957]
|
Evan Prodromou <evan@prodromou.name>**20081230211957]
|
||||||
|
[wrapper element for config.xml
|
||||||
|
Evan Prodromou <evan@prodromou.name>**20081230212202]
|
Binary file not shown.
@ -115,6 +115,7 @@ class TwitapilaconicaAction extends TwitterapiAction
|
|||||||
switch ($apidata['content-type']) {
|
switch ($apidata['content-type']) {
|
||||||
case 'xml':
|
case 'xml':
|
||||||
$this->init_document('xml');
|
$this->init_document('xml');
|
||||||
|
common_element_start('config');
|
||||||
// XXX: check that all sections and settings are legal XML elements
|
// XXX: check that all sections and settings are legal XML elements
|
||||||
foreach ($keys as $section => $settings) {
|
foreach ($keys as $section => $settings) {
|
||||||
common_element_start($section);
|
common_element_start($section);
|
||||||
@ -131,6 +132,7 @@ class TwitapilaconicaAction extends TwitterapiAction
|
|||||||
}
|
}
|
||||||
common_element_end($section);
|
common_element_end($section);
|
||||||
}
|
}
|
||||||
|
common_element_end('config');
|
||||||
$this->end_document('xml');
|
$this->end_document('xml');
|
||||||
break;
|
break;
|
||||||
case 'json':
|
case 'json':
|
||||||
|
@ -1,11 +1,4 @@
|
|||||||
hunk ./actions/twitapilaconica.php 122
|
hunk ./actions/twitapilaconica.php 118
|
||||||
- common_element($setting, null, common_config($section, $setting));
|
+ common_element_start('config');
|
||||||
+ $value = common_config($section, $setting);
|
hunk ./actions/twitapilaconica.php 135
|
||||||
+ if (is_array($value)) {
|
+ common_element_end('config');
|
||||||
+ $value = implode(',', $value);
|
|
||||||
+ } else if ($value === false) {
|
|
||||||
+ $value = 'false';
|
|
||||||
+ } else if ($value === true) {
|
|
||||||
+ $value = 'true';
|
|
||||||
+ }
|
|
||||||
+ common_element($setting, null, $value);
|
|
||||||
|
@ -115,6 +115,7 @@ class TwitapilaconicaAction extends TwitterapiAction
|
|||||||
switch ($apidata['content-type']) {
|
switch ($apidata['content-type']) {
|
||||||
case 'xml':
|
case 'xml':
|
||||||
$this->init_document('xml');
|
$this->init_document('xml');
|
||||||
|
common_element_start('config');
|
||||||
// XXX: check that all sections and settings are legal XML elements
|
// XXX: check that all sections and settings are legal XML elements
|
||||||
foreach ($keys as $section => $settings) {
|
foreach ($keys as $section => $settings) {
|
||||||
common_element_start($section);
|
common_element_start($section);
|
||||||
@ -131,6 +132,7 @@ class TwitapilaconicaAction extends TwitterapiAction
|
|||||||
}
|
}
|
||||||
common_element_end($section);
|
common_element_end($section);
|
||||||
}
|
}
|
||||||
|
common_element_end('config');
|
||||||
$this->end_document('xml');
|
$this->end_document('xml');
|
||||||
break;
|
break;
|
||||||
case 'json':
|
case 'json':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user