[Pmwiki-users] PmWikiDataStore - Using a class for page file i/o.
Greg Morgan
Cybie
Sun Mar 21 23:55:14 CST 2004
Patrick R. Michaud wrote:
>On Sun, Mar 21, 2004 at 09:17:17PM -0800, Greg Morgan wrote:
>
>
>> [1]http://www.pmichaud.com/wiki/Development/PmWikiDataStore
>> I've just finished a patch for PmWiki that I was hoping to get
>> included in the next release.
>> ______________________________________________________________________
>>
>> I'm working on two add-ons for [2]PmWiki
>> 1. [3]XML-RPC support using the vpwiki API.
>> 2. Allowing as an option to use an SQL database to store pages as
>> opposed to the current file based method.
>>
>> While writing the XML-RPC module I realized I was going to have
>> duplicate most of the functionality in the handle_post function, if I
>> wanted to update pages and keep the page revisions current. That and
>> there's no way to override the existing ReadPage[4]? and WritePage[5]?
>> methods to allow for other means of storing pages. So what I did was
>> create a class called WikiDataStore[6]?.
>>
>>
>
>WikiDataStore looks a little too complex for my tastes for inclusion
>in the base code--perhaps we can simplify it down a bit? I appreciate
>the OO approach to doing this, but all of this just seems a bit over
>the top to me for what needs to be accomplished.
>
>
>
It's funny.. in my head it actually smplifies things. I re-wrote the
existing ReadPage, WritePage functions to use the class.. so as far as
the rest of PmWiki is concerned nothing changed. The addition of the
PageList method makes writing code that needs to act on all pages easier
to impliment.
>OTOH, I don't mind providing variables to override ReadPage and
>WritePage-- that's pretty easy and I've been planning to eventually
>do that anyway.
>
>Isn't there a way to write some XML-RPC glue to call HandlePost
>with the needed information rather than having to duplicate it?
>Or, I could abstract the relevant details of HandlePost into a
>separate function that's more easily called by an XML-RPC handler.
>
>
handlepost uses $_POST array quite a bit. While I might be able to
populate all of the global variables needed to use the handle_post
function, it seemed kind of clunky to me.
>Is there somewhere that I can get the details on the vpwiki API?
>
>
Check Development.XML-RPC
<http://www.pmichaud.com/wiki/Development/XML-RPC>, I put links to the
API on there.
>> NOTE: $UserName & $Password not currently implemented.
>>
>>
>
>Unfortunately there's no way I can put anything in PmWiki that would
>remove password support--it would totally break too many existing
>systems.
>
>Pm
>
>
This was badly phrased on my part... my patch does NOT break the
retrieveauthpage function in any way, it works as normal. However,
since there is no per-user authentication system (yet!), that $username
and $password doesn't do much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://contra.vosn.net/pipermail/pmwiki-users_pmichaud.com/attachments/20040321/55401299/attachment-0001.htm
More information about the pmwiki-users
mailing list