]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
wrapper element for config.xml
authorEvan Prodromou <evan@prodromou.name>
Tue, 30 Dec 2008 21:22:02 +0000 (16:22 -0500)
committerEvan Prodromou <evan@prodromou.name>
Tue, 30 Dec 2008 21:22:02 +0000 (16:22 -0500)
darcs-hash:20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz

_darcs/inventory
_darcs/patches/20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz [new file with mode: 0644]
_darcs/pristine/actions/twitapilaconica.php
_darcs/tentative_pristine
actions/twitapilaconica.php

index 6b875d2ae726944898d7a02b6fd9d343e61bc3f8..e7100599a48e388acbd0939c703d07a87dae4ea8 100644 (file)
@@ -110,4 +110,6 @@ Evan Prodromou <evan@prodromou.name>**20081230210114]
 [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
diff --git a/_darcs/patches/20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz b/_darcs/patches/20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz
new file mode 100644 (file)
index 0000000..2fbd4fe
Binary files /dev/null and b/_darcs/patches/20081230212202-84dde-d6439ad7061a56c9de0168ced3d95436ca20cb59.gz differ
index 17b7b08729c3e43909c630d83e17106af5d67646..722423faec6f6285067d4f5441d482ae5426dfd7 100644 (file)
@@ -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':
index 2a7c664f3f0cf51f48c542c890e553f2c0ac0d15..6a29f612c16b854e2f15436f09af81ecef7a9b23 100644 (file)
@@ -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');
index 17b7b08729c3e43909c630d83e17106af5d67646..722423faec6f6285067d4f5441d482ae5426dfd7 100644 (file)
@@ -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':