[geeklog-devel] [geeklog-cvs] Geeklog-1.x/system/classes story.class.php, 1.15, 1.16

Dirk Haun dirk at haun-online.de
Sun Sep 30 12:12:33 EDT 2007


Dirk Haun wrote:

>Modified Files:
>	story.class.php 
>Log Message:
>Handle app:draft <-> draft_flag translation in lib-webservices; minor
>hack to handle checkbox-values when using the webservices API
(..)

>!                 } elseif (($array[$key] === 'on') || ($array[$key]
=== 1)) {
>                      // If it's a checkbox that is on
>                      $this->{$varname} = 1;

Okay, so it's not pretty but both the form-based submits and the
webservices calls go through loadFromArgsArray() and _loadBasics() and
at that level, it's impossible to tell where it came from and whether to
expect 'on' (from a checkbox in a form) or 1 (from the webservices call).

The translation from 'on' to 1 (and back) should probably be handled
somewhere else entirely, but for the moment I'm just happy that appfs
finally lists draft stories in its "drafts" directory. If this is in
conflict with someone's sense of aesthetics, feel free to change it (but
make sure you test it with an Atompub client) ...

bye, Dirk


-- 
http://www.geeklog.net/
http://geeklog.info/




More information about the geeklog-devel mailing list