Age | Commit message (Collapse) | Author |
|
- fixed all instances of this in core code
- deleted previous Zend Guard Loader workaround in MY_Kohana.php
- updated Bootstrap.php to reflect deleted MY_Kohana.php
|
|
- added system::mark_file_for_delete to be called to mark a file
- added system::delete_marked_files to be called at shutdown to delete the list
- amended system::temp_filename to, by default, add the temp name to the list
- updated a few other places in code where this should be used
|
|
|
|
|
|
delete temporary files during shutdown. Fixes #1788.
|
|
|
|
mode and private gallery mode by setting the following constants in
the controller to true.
ALLOW_MAINTENANCE_MODE
ALLOW_PRIVATE_GALLERY
Fixes #1411 and the subsequent refactoring fixes #1551 as well.
|
|
parsing REST urls. This fixes the problem that setting the url suffix
breaks REST. Fixes #1500.
|
|
key. This is useful if you think it's been compromised in some way.
Fixes ticket #1226.
|
|
reply with a Location field that matches the URL of the newly created
resource. Fixes ticket #1178.
|
|
|
|
handling framework to handle the exception and delegate to our
template, which will JSON encode the response.
|
|
returns just the access key string for the active user. That's how we
use the API, so keep it simple.
|
|
|
|
to extract error information.
|
|
part of a REST request. Format the exception as a json encoded text string so the client can extract the fault information if they so choose.
|
|
|
|
Conflicts:
modules/rest/controllers/rest.php
|
|
|
|
|
|
|
|
|
|
change the urls of the children are sent up asan array of post fields children[0].... children[n]. If an existing child is not included it is deleted. Including a url to an child in another album will move the child. Changing the order of the children will respect the order of the children, if the sort column is 'weight'
|
|
|
|
extra print statement could lead to problems.
|
|
separate from a successful or failed login.
1) Rename user_login_failed event to user_authenticate_failed
2) Rename failed_logins table to failed_auth (bump Gallery module to
v27 to rename the table)
3) auth::too_many_failed_logins -> auth::too_many_failures
4) auth::record_failed_auth_attempts -> auth::record_failed_attempts
auth::clear_failed_auth_attempts -> auth::clear_failed_attempts
|
|
mostly issues around uninitialized variables, calling non-static
functions in a static context, calling Session functions directly
instead of on its singleton, passing non-variables by reference, and
subclasses not using the same interface as the parent class.
|
|
auth::validate_too_many_failed_logins() to conceptually separate the
two.
|
|
And make the REST auth token less predictable by using a better source for randomness.
|
|
relationships. Now when you view a resource, it has 4 top level
elements:
url: the url of this resource
resource: array of key value pairs describing the resource
members: array of urls to members of this collection
relationships: array of array of members.
Relationships are a special type of collection that links two
different resources together. To remove a relationship, just
DELETE its url. To create a relationship, POST to its
collection.
Individual modules can add their own relationships to any
resource via a callback mechanism.
Example:
Array(
[url] => http://g3.com/rest/item/1
[resource] => Array (
[id] => 1
[album_cover_item_id] => 4
[captured] =>
[created] => 1264056417
[description] =>
[height] =>
...
)
[members] => Array(
[0] => http://g3.com/rest/item/2
[1] => http://g3.com/rest/item/3
[2] => http://g3.com/rest/item/4
[3] => http://g3.com/rest/item/5
...
)
[relationships] => Array(
[tags] => Array (
[0] => http://g3.com/rest/tag_item/2,1
[1] => http://g3.com/rest/tag_item/23,1
)
)
)
|
|
|
|
the Kohana framework will handle it properly.
|
|
|
|
controller. This is a clearer workflow; controllers generate output,
not helpers. It's also easier to test.
|
|
appropriate error output.
|
|
1) Deal in fully qualified URL resources through the rest
interface. All rest methods are now passed the complete url in
request->url.
2) Create rest::resolve() which lets individual resource definition
code convert a full url into the appropriate matching resource.
Implement gallery_rest::resolve() and tag_rest::resolve()
3) Reimplement tag_rest's get() and post() methods. They're much
simpler now.
4) Implement the tags_rest helper which supports working with the
entire tags collection.
|
|
1) Simplify gallery_rest to return flat models, no children and do no
validation for now.
2) Flatten the REST replies and use HTTP codes to indicate
success/failure instead of additional status messages.
3) Use the message and error code support in the base Exception class,
instead of brewing our own in Rest_Exception.
4) Get rid of rest::success() and rest::fail() -- we only need
rest::reply() since all failures are covered by throwing an
exception.
5) Get rid of /rest/access_key and just use /rest for authentication.
6) Inline and simplify rest::normalize_request since we only use it once
7) Change rest::set_active_user to succeed or throw an exception
8) Extract Rest_Exception::sendHeaders into rest::send_headers()
Here's what's currently broken:
1) Data validation. There currently is none
2) Logging. That's gone too
3) image block and tag code is broken
4) Tests are broken
5) No movie support
|
|
|
|
so as not to impact other tests.
|
|
restructure the Rest_Tag_Helper_Test to only create items as required for test in each test.
|
|
|
|
instead of calling rest::forbidden and other rest helper error messages.
|
|
converting the rest API to Kohana 2.4
|
|
are acutall a path. Leave it up to the handler to determine.
|
|
|
|
|
|
encode, All the get variables are loaded, then the post variables if the request is a post, and then the path is extracted from the uri.
|
|
|
|
path. This allows us to forego the extension as part of the REST url. As well, urls are consistent between normal usage and rest usage.
|
|
no request_key (access_token) as athat is treated as public permissions
|