From: Evan Prodromou Date: Tue, 30 Dec 2008 21:22:02 +0000 (-0500) Subject: wrapper element for config.xml X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d57c06b4171fbed9f059c53d66f6b313d9303d6d;p=quix0rs-gnu-social.git wrapper element for config.xml darcs-hash:20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz --- diff --git a/_darcs/inventory b/_darcs/inventory index 6b875d2ae7..e7100599a4 100644 --- a/_darcs/inventory +++ b/_darcs/inventory @@ -110,4 +110,6 @@ Evan Prodromou **20081230210114] [implement the api/laconica/config method Evan Prodromou **20081230211444] [better serialization of arrays and booleans in config output -Evan Prodromou **20081230211957] \ No newline at end of file +Evan Prodromou **20081230211957] +[wrapper element for config.xml +Evan Prodromou **20081230212202] \ No newline at end of file diff --git a/_darcs/patches/20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz b/_darcs/patches/20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz new file mode 100644 index 0000000000..2fbd4fe4fd Binary files /dev/null and b/_darcs/patches/20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz differ diff --git a/_darcs/pristine/actions/twitapilaconica.php b/_darcs/pristine/actions/twitapilaconica.php index 17b7b08729..722423faec 100644 --- a/_darcs/pristine/actions/twitapilaconica.php +++ b/_darcs/pristine/actions/twitapilaconica.php @@ -115,6 +115,7 @@ class TwitapilaconicaAction extends TwitterapiAction 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); @@ -131,6 +132,7 @@ class TwitapilaconicaAction extends TwitterapiAction } common_element_end($section); } + common_element_end('config'); $this->end_document('xml'); break; case 'json': diff --git a/_darcs/tentative_pristine b/_darcs/tentative_pristine index 2a7c664f3f..6a29f612c1 100644 --- a/_darcs/tentative_pristine +++ b/_darcs/tentative_pristine @@ -1,11 +1,4 @@ -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'); diff --git a/actions/twitapilaconica.php b/actions/twitapilaconica.php index 17b7b08729..722423faec 100644 --- a/actions/twitapilaconica.php +++ b/actions/twitapilaconica.php @@ -115,6 +115,7 @@ class TwitapilaconicaAction extends TwitterapiAction 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); @@ -131,6 +132,7 @@ class TwitapilaconicaAction extends TwitterapiAction } common_element_end($section); } + common_element_end('config'); $this->end_document('xml'); break; case 'json':