[Owncloud] Introducing device tracking feature to ownCloud was: ideas for GSoC 2013

Bernhard Posselt nukeawhale at gmail.com
Thu Mar 14 09:41:39 UTC 2013


On 03/14/2013 07:51 AM, Qingping Hou wrote:
> On Thu, Mar 14, 2013 at 7:05 AM, Bernhard Posselt <nukeawhale at gmail.com> wrote:
>> Regarding PUT: PHP does not support it officially and the solutions are a
>> bit hacky so I chose to not implement them.
>> The global variables are passed to the Request class:
>>
>>
>> I would like to take this junior job :)
>>
>> My question is should NotFoundResponse and ForbiddenResponse return null or
>> user defined contents on render call? If users can also control render output,
>> then I am not sure which base class should I choose for them. Because user
>> might want to render template or json or just plaintext.
>> _______________________________________________
>> Owncloud mailing list
>> Owncloud at kde.org
>> https://mail.kde.org/mailman/listinfo/owncloud

I'd just extend Response and add the headers in the constructor like 
https://github.com/owncloud/apps/blob/master/appframework/http/redirectresponse.php#L42 
which is also a pure header response. There are too many options too 
extend this like you said (template/json/even download) so people should 
just inherit from that class if they need it like: 
NotFoundTemplateResponse extends NotFoundResponse.

I dont think people need these responses though since the 
server/ownCloud should serve a standard template anyway on 404 or 403.

PS: dont forget the tests ;) should only be one test for each response.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20130314/c5e9af5f/attachment.html>


More information about the Owncloud mailing list