From d57c06b4171fbed9f059c53d66f6b313d9303d6d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 30 Dec 2008 16:22:02 -0500 Subject: [PATCH] wrapper element for config.xml darcs-hash:20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz --- _darcs/inventory | 4 +++- ...e-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz | Bin 0 -> 172 bytes _darcs/pristine/actions/twitapilaconica.php | 2 ++ _darcs/tentative_pristine | 15 ++++----------- actions/twitapilaconica.php | 2 ++ 5 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 _darcs/patches/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 0000000000000000000000000000000000000000..2fbd4fe4fd1058a0355ebb36cb9b3b5e99035317 GIT binary patch literal 172 zcmV;d08{@TiwFP!000001C7qH3c@fHh2cF6+F+9#($os# zyIWA9lX$j&`8cOBp!Yg}?zGh|LPG%*xyD@h-FED7LkGt|bs$RvZ1vQ8|84Hj>Rp=3 zJTHYTaw(+D3{^&mvaRxq0)YspogCsiLY#6|Kx alPouXnZ^32sa-u6pX>!8SGqL-0RRB?XiR(n literal 0 HcmV?d00001 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': -- 2.39.5