summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries
AgeCommit message (Collapse)Author
2010-02-14Need to allow access to ::change_provider for CLI, to make packager work.Andy Staudacher
2010-02-14Minor security tightening of IdentityProvider::change_provider().Andy Staudacher
2010-02-14Some HTML validation fixes (don't render empty <ul> lists, empty id ↵Andy Staudacher
attributes, use &amp; not &)
2010-02-12Fix for tickets 1009 and 603: Show a themed error page to guests / ↵Andy Staudacher
registered users (not to admins though). And show a login form to guests for 404 (incl. insufficient view permissions) errors.
2010-02-08Override Input::clean_input_keys() to sanitize malicious values out ofBharat Mediratta
strings instead of dying. This at least gives us graceful degradation. Fixes ticket #764, patch thanks to djnz.
2010-02-07Remove the redundant reference to ["force_rtl".Tim Almdal
2010-02-07Refactor the is_rtl() helper into the Gallery_I18n class. This allows checkingTim Almdal
for a config value "force_rtl" which will layout the gallery pages in rtl mode without having to change to an language that is no longer understandable to the developer. Adding the line "$config['force_rtl'] = true;" to the config/locales.php file will make it happen.
2010-02-07Add prefix support for the target of RENAME TABLE.Bharat Mediratta
2010-01-31Fix lots of warnings that pop up when we're in E_STRICT mode. They'reBharat Mediratta
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.
2010-01-30Dump out validation errors so that we have some extra information in the logs.Bharat Mediratta
2010-01-29Stop using obsolete form::close()Bharat Mediratta
Update the way we include the hidden CSRF field for InPlaceEdit.
2010-01-28Use identity::set_active_user() instead of auth::login() when weBharat Mediratta
change providers otherwise the user_installer code is going to be calling auth::login() which causes all kinds of unexpected weirdness, like it triggers the handler in gallery_event which detects graphics toolkits, and that's only supposed to run on the first admin login.
2010-01-27Convert back to using ORM::factory(..., $id) instead of calling where().Bharat Mediratta
2010-01-25Make only one attempt to restore the old identity provider in case ofBharat Mediratta
failure. Else, we can get into an infinite recursion.
2010-01-23Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_devBharat Mediratta
Conflicts: modules/gallery/tests/xss_data.txt
2010-01-23Add a user_menu method to the Admin_View and then use this method to get theTim Almdal
user menu. Since the information displayed is identical in both admin and theme views, it makes sense to combine the generation to it is done in a common location.
2010-01-22Trap any errors that may occur when trying to install a new identity ↵Tim Almdal
provider and then reinstall the current one.
2010-01-22Refactor the identity provider installation in to a common helper method ↵Tim Almdal
(change_provider) with an initialization callback.
2010-01-20Make move_to protected since we don't want folks calling it onBharat Mediratta
Item_Model. If there's a need to make this public, we should override it in Item_Model and throw an exception there.
2010-01-20Oops, bug in save() -- we weren't returning the saved value!Bharat Mediratta
2010-01-20Delete MY_ORM::original(). We did not have proper containment toBharat Mediratta
generate $original when we needed it, resulting in inconsistent behavior.
2010-01-18Whitespace.Bharat Mediratta
2010-01-18Switch from ORM_MPTT::$db_builder to db::build().Bharat Mediratta
2010-01-18in move_to(), move the lock to before we do any calculations so that we have ↵Bharat Mediratta
the latest data.
2010-01-17Change IdentityProvider::create_user() to take $email as well, since that's ↵Bharat Mediratta
a required parameter for the Gallery driver.
2010-01-17If we call original() and there's no $original yet, then consider thisBharat Mediratta
to be the original. That should be safe because we're already guarding __set, __unset and save.
2010-01-16Get rid of add_rules_from() -- it's no longer necessary now that we're doing ↵Bharat Mediratta
model based validation.
2010-01-16Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_devBharat Mediratta
Conflicts: modules/gallery/models/item.php
2010-01-15Revert "Fix for ticket #978. Don't reset the original property as part of ↵Bharat Mediratta
the save processing, because that will overwrite the original values with all the new values. The problem with the original approach is that when changed event handlers used ->original(), it had already been reset as part of the save processing. Went back and forth on either leaving this alone and forcing callers to save the original prior to calling the save function, but there were a few event handlers that used ->original(). This seemed the easier change. So to reset the original you need to call reload() or clear(). There is now an optional parameter on the reload to only reload the original." This reverts commit daeaca110d16128040c86727c65df225e957f7c6.
2010-01-15Revert "Did the old commit then save trick"Bharat Mediratta
This reverts commit e41ad23a8ea05d28a99d12c01d8f317455b1d361.
2010-01-15Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_devBharat Mediratta
2010-01-15Call parent::save() before releasing the lock to make creating the hole and ↵Bharat Mediratta
filling it an atomic operation.
2010-01-15Move model business logic out of album::create() and intoBharat Mediratta
Item_Model::save(). This makes creating albums similar to editing them and makes it difficult to create an album poorly. I expect to be able to remove a lot of code from the photo and movie helper because it's duplicated here. In order to do this, I refactored ORM_MPTT::add_to_parent() into ORM_MPTT::save() so we now add it to the parent when we do save. This allows us to call save() only once which saves a database call per add. The Albums_Controller logic is roughly the same as before. Haven't updated the tests yet, they're going to fail miserably since many of them depend on album::create() which is now gone.
2010-01-13Did the old commit then save trickTim Almdal
2010-01-13Fix for ticket #978. Don't reset the original property as part of the save ↵Tim Almdal
processing, because that will overwrite the original values with all the new values. The problem with the original approach is that when changed event handlers used ->original(), it had already been reset as part of the save processing. Went back and forth on either leaving this alone and forcing callers to save the original prior to calling the save function, but there were a few event handlers that used ->original(). This seemed the easier change. So to reset the original you need to call reload() or clear(). There is now an optional parameter on the reload to only reload the original.
2010-01-08Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_devBharat Mediratta
2010-01-08Remove stray semicolons.Bharat Mediratta
2010-01-08Remove the display of the "body_attributes" div when in debug mode. debug ↵Tim Almdal
mode is by default set up to add new div's to display the location of the content. "body_attributes" are attributes on the body tag and trying to add content introduces an extra > in the html stream.
2010-01-08Expect merge_where and merge_or_where to handle empty tuples.Bharat Mediratta
2009-12-27Fix a bug where we weren't replacing table names when there's noBharat Mediratta
prefix. This is wrong because even when there's no prefix we have to get rid of the {curly} braces.
2009-12-22Don't use as_array() on the result from db::build()->execute() -- it's no ↵Bharat Mediratta
longer necessary.
2009-12-22The default value for $offset should always be null (according to theBharat Mediratta
new K24 ORM). Fix up a bad where tuple in the test.
2009-12-21Updates for the latest version of Kohana 2.4:Bharat Mediratta
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-21Fix some bugs in the cache database driver, and update the tests for K24.Bharat Mediratta
2009-12-21Add Database::set_default_instance() for testsBharat Mediratta
2009-12-17Simplify add_table_prefixes. In Kohana 2.4, it returns the bare tableBharat Mediratta
name, not the prefixed one so this makes our logic easier.
2009-12-06Add the current file/line at the top of the trace.Bharat Mediratta
2009-12-06Overload Kohana_Exception::text() to dump out the complete stack traceBharat Mediratta
so that we have useful data in the logs.
2009-12-06Oops, removed the overload for query() before, we need this back soBharat Mediratta
that we can prefix table names properly.
2009-12-05Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_devBharat Mediratta