Tim Almdal
586f2d78b8
Add the functionality to add, delete and rename tags via the Gallery3 remote interface.
2009-12-24 19:25:14 -08:00
Tim Almdal
4268889fbf
Update the gallery_rest handlers test to pass the path in as an array in the request arguments property instead of the path property.
2009-12-24 19:24:22 -08:00
Bharat Mediratta
24ef52eccb
whitespace fix
2009-12-24 18:06:26 -08:00
Tim Almdal
a2a3741b53
Change the image block rest handler to expect the type (i.e. random) as a parameter not part of the path.
2009-12-24 11:36:00 -08:00
Bharat Mediratta
b16ab9d94a
Don't treat objects like strings.
2009-12-24 03:08:06 -08:00
Bharat Mediratta
057e8d09af
Convert a bunch of leftover kohana::show_404 calls to throw
...
Kohana_404_Exception instead. These are the ones where we used a
lower-case 'k' so my previous filter didn't catch it.
2009-12-23 20:51:33 -08:00
Bharat Mediratta
b62083bd24
Cleaner version. Probably has a bunch of cruft in it, but it looks good enough.
2009-12-23 20:48:50 -08:00
Bharat Mediratta
29f982679d
First shot at integrating the K24 error page.
2009-12-23 20:36:38 -08:00
Tim Almdal
cf6de01f1e
Provide a REST interface to retrieve tags or tagged items.
...
GET /tag?limit=nn,offset=nn Retrieve all tags sorted by count descending
GET /tag/uri/uri/uri Retrieve all the tags for the resource specified by path
GET /tag/t1/t2/t3 Retrieve all the items that have the specified tags
Can specifiy limit and offset to limit response size
2009-12-23 14:20:23 -08:00
Bharat Mediratta
eb047d7f5d
ORM relations now require you to do find_all() or count_all() to get the results.
2009-12-23 13:31:52 -08:00
Tim Almdal
d0dd6650be
When normalizing the rest request don't assume that the additional arguments are acutall a path. Leave it up to the handler to determine.
2009-12-23 13:13:03 -08:00
Bharat Mediratta
3e8e13bd25
Updated Kohana to r4728
2009-12-23 12:42:57 -08:00
Bharat Mediratta
05c50a0523
Revert "Fix preamble issues. Upstream tickets:"
...
This reverts commit b2291a0e34 .
2009-12-23 12:29:40 -08:00
Tim Almdal
d622d1aa4f
Updated the unit tests to match the current API
...
Corrected a problem identified with the unit tests... failed if the path was empty on PUT.
2009-12-23 09:32:32 -08:00
Bharat Mediratta
b79e0c9d57
Back out my temporary fix for http://dev.kohanaframework.org/issues/2384
...
now that the real fix is in.
2009-12-22 22:15:13 -08:00
Bharat Mediratta
ffca63235a
Fix where tuple sent to descendant_counts() -- it needs to be wrapped in an array
2009-12-22 21:18:31 -08:00
Tim Almdal
b8ee6f25bd
Add a restful get random image block
2009-12-22 18:55:03 -08:00
Bharat Mediratta
63fd9622c0
Don't use as_array() on the result from db::build()->execute() -- it's no longer necessary.
2009-12-22 16:50:15 -08:00
Bharat Mediratta
0bc92614d3
Checkpoint
2009-12-22 16:48:18 -08:00
Bharat Mediratta
6601bb29d9
Update.
2009-12-22 16:25:31 -08:00
Bharat Mediratta
a6da027aad
The default value for $offset should always be null (according to the
...
new K24 ORM).
Fix up a bad where tuple in the test.
2009-12-22 16:22:24 -08:00
Bharat Mediratta
71e154b674
Use a Database_Expression to handle the MAX() function.
2009-12-22 16:13:08 -08:00
Bharat Mediratta
bdd7c68ede
Fix some function definitions (they should be static)
2009-12-22 15:41:47 -08:00
Bharat Mediratta
d711c5b930
Convert tabs to spaces. Enough to get the file structure test to
...
pass, but not really the Gallery coding convention -- this is a
compatibility class though.
2009-12-22 15:36:36 -08:00
Bharat Mediratta
b2291a0e34
Fix preamble issues. Upstream tickets:
...
http://dev.kohanaframework.org/issues/2457
http://dev.kohanaframework.org/issues/2458
2009-12-22 15:13:36 -08:00
Bharat Mediratta
fda4227bb1
Latest K24 does not automatically add an id attribute to every form
...
element with the same value as the name. Yay! That was a weird and
unexpected behavior.
2009-12-22 14:00:52 -08:00
Bharat Mediratta
ca293db214
Don't rely on implicit object -> id conversion, that doesn't work with K24's Database_Builder::where()
2009-12-22 13:57:49 -08:00
Bharat Mediratta
0650109d4b
Add merge_or_where() to MY_Datatabase_Builder and use that instead of
...
or_where() for compatibility and convenience. Caught by failing unit
tests.
2009-12-22 13:50:52 -08:00
Bharat Mediratta
7118f84aa9
ORM::factory() in K24 does not allow you to specify an alternate key
...
for lookup. So instead of doing:
ORM::factory("foo", array("some_key" => "some_value"))
you have to do:
ORM::factory("foo"->where("some_key", "=" "some_value")->find()
2009-12-22 13:32:02 -08:00
Tim Almdal
cbe5a89a9f
Update the api so it allows images to be uploaded.
2009-12-22 12:32:27 -08:00
Bharat Mediratta
8b9a02084a
Updates for the latest version of Kohana 2.4:
...
1) Controller::$input is gone -- use Input::instance() now
2) Handle new 'database.<default>.connection.params' parameter
3) Handle new 'cache.<default>.prefix' parameter
2009-12-21 21:27:43 -08:00
Bharat Mediratta
9285c8c66c
Updated Kohana to r4724
2009-12-21 20:05:27 -08:00
Bharat Mediratta
9c5df1d31b
Fix preambles, and fix the File_Structure_Test to be more lenient
...
because of preamble variation in K24.
2009-12-21 19:59:44 -08:00
Bharat Mediratta
e0dc520648
Updated for recent K24 Forge changes.
2009-12-21 17:26:24 -08:00
Bharat Mediratta
e94009e90d
Add a helper for doing complex string comparisons
2009-12-21 17:26:04 -08:00
Bharat Mediratta
a474fb5155
Get rid of unnecessary cleanup that makes debugging harder.
2009-12-21 16:40:48 -08:00
Bharat Mediratta
ffb81c3357
Rename $id --> $uuid for clarity.
2009-12-21 16:40:18 -08:00
Bharat Mediratta
5080bc12a2
Fix the relationship. DigibugProxy belongs to Item, not the other way
...
around. K24 ORM requires this because it needs to know where the
foreign key is (in the Digibug_Proxy table, in this case).
2009-12-21 16:40:01 -08:00
Bharat Mediratta
31a545fa26
Add missing execute() call -- tests ftw!
2009-12-21 15:58:22 -08:00
Bharat Mediratta
cc4d7c672c
Update database tests for K24. Use a mock database that we load
...
through the framework so that we're properly testing the
Database_Builder, it's a lot cleaner than what we had before.
2009-12-21 15:47:11 -08:00
Bharat Mediratta
e1f43ad403
Updated for K24
2009-12-21 12:22:19 -08:00
Bharat Mediratta
5df1dc135b
Fix some bugs in the cache database driver, and update the tests for K24.
2009-12-21 12:13:25 -08:00
Bharat Mediratta
0c3fd9579f
Stop using Kohana::lang.
2009-12-21 12:09:16 -08:00
Bharat Mediratta
7d8f76fa7a
Fix the translation keys to not require "unit_test." as a prefix.
2009-12-21 12:07:20 -08:00
Bharat Mediratta
bfcd99f3f2
Updated for K24
2009-12-21 11:30:34 -08:00
Bharat Mediratta
0cd03c8883
Add Database::set_default_instance() for tests
2009-12-21 11:30:26 -08:00
Bharat Mediratta
287f79dd72
Updated for K24
2009-12-21 11:30:06 -08:00
Bharat Mediratta
a22aa4ab05
Forgot to rename the file when I renamed the class.
2009-12-21 11:29:28 -08:00
Bharat Mediratta
91e39f75a2
Hardcode language translations since K24 now does it totally differently. This forks the code, but it's reached the end of its development path and we should replace it with phpunit anyway
2009-12-21 11:29:13 -08:00
Tim Almdal
fd7990735c
Added validation to the edit functionality, since we can't trust any input
2009-12-21 11:25:11 -08:00