From 481c6d2316f3a31c85235cb64fbd198a08a92211 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 30 Dec 2008 16:01:14 -0500 Subject: [PATCH] add some breaks so that switch statement works darcs-hash:20081230210114-84dde-4fbf5b718841ae1c46129a6b58d6b4e239d8be09.gz --- _darcs/inventory | 4 +++- ...fbf5b718841ae1c46129a6b58d6b4e239d8be09.gz | Bin 0 -> 161 bytes _darcs/pristine/actions/twitapilaconica.php | 2 ++ _darcs/tentative_pristine | 21 ++++-------------- actions/twitapilaconica.php | 2 ++ 5 files changed, 11 insertions(+), 18 deletions(-) create mode 100644 _darcs/patches/20081230210114-84dde-4fbf5b718841ae1c46129a6b58d6b4e239d8be09.gz diff --git a/_darcs/inventory b/_darcs/inventory index 4a5f9fd976..da728be6f2 100644 --- a/_darcs/inventory +++ b/_darcs/inventory @@ -104,4 +104,6 @@ Evan Prodromou **20081230202513] [add laconica methods to unauthed ones Evan Prodromou **20081230203747] [implement api/laconica/version method -Evan Prodromou **20081230205939] \ No newline at end of file +Evan Prodromou **20081230205939] +[add some breaks so that switch statement works +Evan Prodromou **20081230210114] \ No newline at end of file diff --git a/_darcs/patches/20081230210114-84dde-4fbf5b718841ae1c46129a6b58d6b4e239d8be09.gz b/_darcs/patches/20081230210114-84dde-4fbf5b718841ae1c46129a6b58d6b4e239d8be09.gz new file mode 100644 index 0000000000000000000000000000000000000000..1374e3b1b321f95939d650a7790d7183a268ea01 GIT binary patch literal 161 zcmV;S0ABweiwFP!000001C5Tc3IZ_@MEiWj)+gkWQ}I9%8+&`PSd&1)nQTb*yh8kU z4?(c7aH@I58|IAGLZ#^7S{x2_?!X=y>J->`sEq8QOAHg0p^D=j6Pya!LXk$;xtS07 z!!luX`=;rX>UFnNomN_}F7Ob3OasUk4F^iK<#`=*xS^pG49e^?Y}R4{UwI$e{$uv) Pr}-2w{=vdy-T(jqkm^fN literal 0 HcmV?d00001 diff --git a/_darcs/pristine/actions/twitapilaconica.php b/_darcs/pristine/actions/twitapilaconica.php index 4ecbf94e17..6d3490abdb 100644 --- a/_darcs/pristine/actions/twitapilaconica.php +++ b/_darcs/pristine/actions/twitapilaconica.php @@ -72,10 +72,12 @@ class TwitapilaconicaAction extends TwitterapiAction $this->init_document('xml'); common_element('version', null, LACONICA_VERSION); $this->end_document('xml'); + break; case 'json': $this->init_document('json'); print '"'.LACONICA_VERSION.'"'; $this->end_document('json'); + break; default: $this->client_error(_('API method not found!'), $code=404); } diff --git a/_darcs/tentative_pristine b/_darcs/tentative_pristine index 02f15d0f66..8dfaf737ab 100644 --- a/_darcs/tentative_pristine +++ b/_darcs/tentative_pristine @@ -1,17 +1,4 @@ -hunk ./actions/twitapilaconica.php 56 -+ * URL: http://identi.ca/api/laconica/version.(xml|json) -+ * Formats: xml, json -hunk ./actions/twitapilaconica.php 70 -- common_server_error(_('API method under construction.'), 501); -+ switch ($apidata['content-type']) { -+ case 'xml': -+ $this->init_document('xml'); -+ common_element('version', null, LACONICA_VERSION); -+ $this->end_document('xml'); -+ case 'json': -+ $this->init_document('json'); -+ print '"'.LACONICA_VERSION.'"'; -+ $this->end_document('json'); -+ default: -+ $this->client_error(_('API method not found!'), $code=404); -+ } +hunk ./actions/twitapilaconica.php 75 ++ break; +hunk ./actions/twitapilaconica.php 80 ++ break; diff --git a/actions/twitapilaconica.php b/actions/twitapilaconica.php index 4ecbf94e17..6d3490abdb 100644 --- a/actions/twitapilaconica.php +++ b/actions/twitapilaconica.php @@ -72,10 +72,12 @@ class TwitapilaconicaAction extends TwitterapiAction $this->init_document('xml'); common_element('version', null, LACONICA_VERSION); $this->end_document('xml'); + break; case 'json': $this->init_document('json'); print '"'.LACONICA_VERSION.'"'; $this->end_document('json'); + break; default: $this->client_error(_('API method not found!'), $code=404); }