Commit Graph
457 Commits
Author SHA1 Message Date
Tim Almdal 41969cc9e4 Another holdover from the K2.4 conversion. In R2.4 the url::current(true) was returning an empty string. This fixes ticket #955. 2009-12-29 15:48:21 -08:00
Bharat Mediratta 73aeed8902 indentation fix. 2009-12-24 20:08:04 -08:00
Bharat Mediratta 24ef52eccb whitespace fix 2009-12-24 18:06:26 -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
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
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 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 c65cd702fc Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/helpers/identity.php
2009-12-13 16:52:18 -08:00
Bharat Mediratta 3d1f166fe5 Log the entire stack trace when we catch an exception. 2009-12-10 21:20:18 -08:00
Bharat Mediratta d5c35210b9 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev 2009-12-06 21:38:47 -08:00
Bharat Mediratta dec084fe08 Update database queries. 2009-12-06 21:34:09 -08:00
Tim Almdal 16bed1ffd5 Remove the hidden form variable _method which was used in the no longer rest controllers. 2009-12-06 21:32:27 -08:00
Bharat Mediratta fb899c313c Further simplifications to viewable(). Stop trying to optimize for
the case where we just have one restriction, it's unnecessary.
2009-12-06 21:28:40 -08:00
Bharat Mediratta b9dadb77c3 Get rid of unused _method param in the item edit form.
Fix viewable() to properly OR view restrictions together.
2009-12-06 21:21:35 -08:00
Bharat Mediratta 5a7449f315 Update more database calls. 2009-12-06 19:51:25 -08:00
Bharat Mediratta 8ed47ceaad Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev 2009-12-06 19:17:02 -08:00
Bharat Mediratta 1f3567ec04 Update the gallery module to version 21 in the installer. 2009-12-05 21:08:10 -08:00
Bharat Mediratta 320a569c10 Fix whitespace. 2009-12-05 20:56:16 -08:00
Bharat Mediratta 62693db037 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev 2009-12-05 17:56:31 -08:00
Bharat Mediratta c9e6869c68 Rename the "upload_limit" variable to "simultaneous_upload_limit" for
clarity, since it only limits concurrency not the number of actual uploads.

Move the default-setting code into the upgrader so that we avoid
creating the variable as a side-effect of the view (personal
preference to avoid side-effect code since it's led to problems in the
past).
2009-12-02 19:08:13 -08:00
Bharat Mediratta c7b934bc6d Update a couple more queries. 2009-12-02 12:20:21 -08:00
Bharat Mediratta d2cb217e20 Convert more database calls over to the new format
- admin/maintenance page loads, the rebuild thumbs/resizes task works
- Fixed up some conversion bugs in the Cache driver
2009-12-02 00:34:34 -08:00
Bharat Mediratta c803cb2909 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev 2009-12-01 19:44:29 -08:00
Bharat Mediratta 852653ef24 Clean up item routing a bit.
1) The new default route is "albums", and Albums_Controller::index() does the right thing
2) Items_Controller redirects to the appropriate specific controller
3) All item controllers now have show() instead of _show(), so that
   the routing code in url::parse_url() can get to it.  But that code is protected against
   receiving bogus requests.
2009-11-30 13:57:50 -08:00
Bharat Mediratta 299da7b54f Don't allow the extra "/?" sequence (ie: "/index.php/?kohana_uri=...") in the generated .htaccess files. 2009-11-30 10:59:00 -08:00
Bharat Mediratta 1b41ad8c42 Don't use PathInfo based urls to reroute access protection. Fixes
ticket #922.
2009-11-29 22:47:33 -08:00
Bharat Mediratta 01bad461df Publish theme_edit_form and theme_edit_form_completed events so that themes can piggyback on the regular Admin > Appearance > Theme Options page. 2009-11-29 12:39:21 -08:00
Bharat Mediratta 53df0df0a4 Update a few more occurrences of ORM/Database -> Database_Builder 2009-11-29 02:48:42 -08:00
Bharat Mediratta 3f63e1c521 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/helpers/theme.php
	modules/gallery/libraries/Admin_View.php
	modules/gallery/libraries/Theme_View.php
2009-11-29 02:45:39 -08:00
Bharat Mediratta f3981bbaa9 Rework the theme loading code to allow themes to be treated as Gallery
modules, and have an admin subdirectory that is treated like a Kohana
module (as distinct from a Gallery module).

The main advantage of creating the separate admin subdirectory is that
we will not load an admin theme and a site theme at the same time.
We'll only load a few specialized bits of the site theme while the
admin theme is active.

Concrete examples. A site theme named "xxx":
- will receive events at themes/xxx/helpers/xxx_event.php
- will have working controllers at themes/xxx/controllers/xxx.php

If theme xxx has an admin subdir, then in admin mode it:
- will receive events at themes/xxx/admin/helpers/xxx_event.php
- will have working controllers at themes/xxx/admin/controllers/xxx.php
2009-11-28 23:25:07 -08:00
Bharat Mediratta b677778253 Expose theme::$is_admin 2009-11-28 15:42:11 -08:00
Bharat Mediratta 22149b52c3 Move the theme fallback checking into theme::load_themes() so that
we're calling it once per request.
2009-11-27 17:12:13 -08:00
Bharat Mediratta 96b00d6cfe Convert some more Database::instance() calls to db::build() form. 2009-11-26 21:14:54 -08:00
Bharat Mediratta b9a0e09637 Kohana::config_xxx() is now Kohana_Config::instance()->xxx 2009-11-26 21:14:43 -08:00
Bharat Mediratta dee3ee81e2 Database::orwhere() is now Database_Builder::or_where() 2009-11-26 20:25:32 -08:00
Bharat Mediratta e8fb773b68 Update all portable where clauses to the new Kohana 2.4 format. 2009-11-26 19:33:03 -08:00
Bharat Mediratta 1fd0e14359 Convert all DB where() calls to take 3 arguments.
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-26 12:09:04 -08:00
Bharat Mediratta 0121bfd585 ORM::orderby -> ORM::order_by 2009-11-25 19:26:52 -08:00
Bharat Mediratta f50dbd992d Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/controllers/rest.php
2009-11-25 13:40:47 -08:00
Bharat Mediratta 2e420522ec Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Tim Almdal dc67cf6481 Remove the REST_Controller and assorted baggage. Completes ticket #917 2009-11-25 13:02:14 -08:00
Tim Almdal 15cf6870d5 remove the photo::get_add_form method as its not used 2009-11-25 12:47:00 -08:00
Tim Almdal 2d5c232c42 Refactor the album, movie and photo handling to remove the REST_Controller. Partial fix for ticket #917 2009-11-25 12:46:04 -08:00
Bharat Mediratta 3ed7a5af46 Rename I18n to Gallery_I18n to avoid conflict with Kohana 2.4 2009-11-24 19:24:02 -08:00
Bharat Mediratta befb824420 Fixes #898 2009-11-20 21:16:59 -08:00
Tim Almdal f5b0ce1f47 Revert "Currently Admin_Theme_Options controller assumes that all the themes will provide the same values. This change corrects that assumption and moves the management of the theme options, including creating the form and updating the theme options into the theme."
This reverts commit 1692ee1308.
2009-11-19 11:44:09 -08:00
Tim Almdal 57adefc5ba Revert "Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme."
This reverts commit 26114972c3.
2009-11-19 11:44:01 -08:00
Tim Almdal 26114972c3 Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme. 2009-11-18 15:36:13 -08:00