Commit Graph

3624 Commits

Author SHA1 Message Date
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
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
Tim Almdal
213f718e59 Merge branch 'master' into talmdal_dev 2009-12-18 15:00:01 -08:00
Tim Almdal
2e221a84cc Change how request input is processed.First the input is no longer json 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. 2009-12-18 14:59:44 -08:00
Bharat Mediratta
6f063aceac Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev 2009-12-18 14:27:58 -08:00
Bharat Mediratta
86e0bc863a Use url::base() instead of item::root()->url because we can't be sure
that will work (if your database is sitll at Beta 1, you don't have
the slug column, for example).
2009-12-18 14:26:15 -08:00
Bharat Mediratta
9af0a4e59c Convert a database call. 2009-12-18 13:36:43 -08:00
Tim Almdal
c804279647 Add the parent path to the resource 2009-12-18 12:58:23 -08:00
Tim Almdal
eb55a3c977 Add the name field to remote interface. 2009-12-18 12:21:10 -08:00
Bharat Mediratta
046382c3e7 Remove some unused references to Database::instance() 2009-12-18 11:27:44 -08:00
Bharat Mediratta
338af4a722 Database::escape_str() is now Database::escape(). 2009-12-18 01:16:27 -08:00
Bharat Mediratta
ca1f7d0da7 Convert a database query. 2009-12-18 01:12:16 -08:00
Bharat Mediratta
c10386fe87 Convert html::specialchars() to html::chars() 2009-12-18 01:05:02 -08:00
Bharat Mediratta
0736cf203b In Kohana 2.4, ORM no longer does the find_all() call for us when we
retrieve related ORMs.  If we tack a find_all() on the end, it breaks
the User_Definition interface so create User_Model::groups() and
Groups_Model::users() as glue.
2009-12-17 21:32:53 -08:00
Bharat Mediratta
9d19e272d6 Convert some database queries. 2009-12-17 21:16:51 -08:00
Bharat Mediratta
8883d1605a Convert some more database queries. 2009-12-17 21:16:37 -08:00
Bharat Mediratta
9b75b85e71 Update all database queries such that we can run "php index.php
package" and generate the same SQL as before.
2009-12-17 21:05:58 -08:00
Bharat Mediratta
2aba8c4bff Simplify add_table_prefixes. In Kohana 2.4, it returns the bare table
name, not the prefixed one so this makes our logic easier.
2009-12-17 21:05:47 -08:00
Bharat Mediratta
c99a75b5d1 Improve the exception error message. 2009-12-17 09:16:44 -08:00
Tim Almdal
cd0bf67441 Merge branch 'master' into talmdal_dev 2009-12-16 20:14:03 -08:00
Bharat Mediratta
f431d7e12e Convert a database call. 2009-12-16 18:04:44 -08:00
Bharat Mediratta
86467363c2 Convert a database call. 2009-12-16 18:03:23 -08:00
Bharat Mediratta
9b3b9c6da6 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev 2009-12-16 17:58:49 -08:00
Bharat Mediratta
02b3c4e704 Adjust for the fact that movies have JPG thumbnails. Fixes ticket 2009-12-16 15:18:08 -08:00
Tim Almdal
61c1a8bfbe Make sure we always return a children array for albums. 2009-12-16 10:14:31 -08:00
Bharat Mediratta
b4a35a8e2c Show the right edit form for movies. 2009-12-16 09:37:28 -08:00
Bharat Mediratta
4566c299c1 Convert some database calls. 2009-12-16 09:24:38 -08:00
Tim Almdal
96968b4181 Include the thumb, resize and fullsize sizes (height & width) in the resource contents returned via the rest interface. 2009-12-15 21:04:19 -08:00
Tim Almdal
95e812067e Change what is used as the url to the item. 2009-12-15 20:42:01 -08:00
Tim Almdal
7f5d5b0470 Add the resize url to returned resource. 2009-12-15 12:24:22 -08:00