summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/photo.php
AgeCommit message (Collapse)Author
2013-01-26#1951 - Make metadata generation more flexible (photo and movie helpers).shadlaws
- added photo_get_file_metadata and movie_get_file_metadata events - modified photo::get_file_metadata and movie::get_file_metadata to use them - ensure that non-readable files throw exceptions - redirected other photo metadata calls in core to photo::get_file_metadata (the helper function already exists, but in many places getimagesize is still called directly) - added some unit tests (neither of the functions above had one)
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2012-12-16[#1924, #1925, #1927 - enhance compatibility with movies (movie helper) and ↵shadlaws
file types (legal_file helper)] bug fix: modify movie.php helper to take DAR (display aspect ratio) into account in get_file_metadata bug fix / enhancement: add duration to get_file_metadata output bug fix: modify movie.php helper to use correct resolution and duration from get_file_metadata in extract_frame bug fix: modify movie.php helper to be more robust against ffmpeg failures and limitations, including adding "-threads 1" argument if needed enhancement: modified to include ordered maps of extensions to MIME types (get_photo_types_by_extension and get_movie_types_by_extension functions), modified get_file_metadata in movie and photo helpers to use them gallery_installer, module.info, install.sql: updated to v52 with m4v mime correction code (was video/mp4)
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2011-01-21Update copyright to 2011.Bharat Mediratta
2010-08-07Add the ability to replace the source data file in Item_Model::save().Bharat Mediratta
Refactor the rotate code in Quick_Controller to replace the data file, and then have gallery_event::item_updated_data_file() pick up after the change is saved, rebuild the image and handle album covers. This is much more portable than before and it will allow any mechanism (eg: REST) to replace the source image.
2010-06-16Fix issue1068. Fill from_id field in photo with indetificatorJan Koprowski
2010-03-03Update the copyright to 2010. It's only 3 months into the year :-)Bharat Mediratta
2010-01-27Localize all error messages.Bharat Mediratta
2010-01-19Change "filename" to "name" in the edit album form. I'd rather haveBharat Mediratta
consistency between field names than deal with underlying issues with Forge bitching about the "name" property.
2010-01-16Convert Photos_Controller::update() to use model based validation.Bharat Mediratta
2010-01-16Convert photo uploading over to the new model based validationBharat Mediratta
approach. - Rearrange Simple_Uploader_Controller::add_photo() to validate the form early in the process, and switch to using model based validation. - Move thumbnail generation into gallery_event::item_created() so that it's decoupled from the model. - Delete photo::create() and move all of its logic into Item_Model::save(). - Add Item_Model::$data_file to track the data file associated with new movies and photos. - Do some cleanup on the validation callbacks -- it turns out the 2nd argument is the field name not the value.
2010-01-15Move setting Item_Model::rand_key into Item_Model::save() since it'sBharat Mediratta
business logic.
2009-12-31A more thorough fix for #745 and #940. Stop using the referer toBharat Mediratta
guess how to send the user back. Instead, proxy the originating item id through the edit forms so that we can tell exactly what page we were on when we began editing. If we were viewing the item, then redirect to its new url (in case it changed) to fix ticket #745. But if we were viewing some other item, then just stay on the current page to fix #940. The page_type approach didn't work because you'd have the same "collection" page_type when doing a context menu edit for an album.
2009-12-06Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_devBharat Mediratta
2009-12-06Remove the hidden form variable _method which was used in the no longer rest ↵Tim Almdal
controllers.
2009-11-26Database::orwhere() is now Database_Builder::or_where()Bharat Mediratta
2009-11-26Convert all DB where() calls to take 3 arguments.Bharat Mediratta
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-25Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_devBharat Mediratta
Conflicts: modules/gallery/controllers/rest.php
2009-11-25Preliminary work to cut over to Kohana 2.4Bharat Mediratta
- 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-25remove the photo::get_add_form method as its not usedTim Almdal
2009-11-25Refactor the album, movie and photo handling to remove the REST_Controller. ↵Tim Almdal
Partial fix for ticket #917
2009-11-09Revert "Try an new approach to extending forms. Create an extend_form ↵Tim Almdal
event. For the first attempt replace the comment_add_form and item_add_form events." This reverts commit 809e738536b6639bb42ecae8eb1e183543fed93c.
2009-11-01Try an new approach to extending forms. Create an extend_form event. For ↵Tim Almdal
the first attempt replace the comment_add_form and item_add_form events.
2009-10-22Change the name of identity library from Identity to IdentityProvider. ↵Tim Almdal
Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class
2009-10-21Merge branch 'master' into talmdal_devTim Almdal
2009-10-21Correct phpDocTim Almdal
2009-10-16Remove all non Identity API methods from Identity.php. Created an ↵Tim Almdal
MY_Session class to provide the user state changes in the session and a login.php helper that has the login form.
2009-10-16Cleanup merge of user/group helpers into Identity interface. Reduce ↵Tim Almdal
redundant code in the user module and remove references to the Identity helper from the user module as the user module should be able to access things directly. Simplify the get_user_list api method to just accept an array of ids to return user objects for.
2009-10-16Start simplifying the interface by moving the static methods from user.php ↵Tim Almdal
and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module.
2009-10-13Don't allow users to change the file extension of photos/moviesBharat Mediratta
If you can change the extension, then you can alter the way the server handles the file, which is a security problem. So for example, you can change a .JPG to a .PHP and then if you put some malicious PHP code in the EXIF data, you can get the server to execute it. Vulnerability is low because only users who have edit permissions could do this. Fixes ticket #846
2009-10-11Make the slug field required for all items.Bharat Mediratta
Make the filename field required for photos/movies. Fixes ticket #838
2009-10-04Renamed most, if not all css selectors from gName to g-name. Moved a few ↵Chad Kieffer
shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features.
2009-09-23Clone the photo::get_edit_form to the movies helper and use it to generate ↵Tim Almdal
the movie edit form. Fixes ticket #726.
2009-09-10Put the buttons for album/photo dialogs in their own group in the formBharat Mediratta
so that they appear at the end, after any other groups that other modules add. Thanks Glooper!
2009-09-07Add the 'Internet Address' field to all items, along with properBharat Mediratta
validation for the fields.
2009-09-07Add the slug to album, photo, and movie forms.Bharat Mediratta
2009-09-07Add support for a per-item "slug" which will be the user-visible urlBharat Mediratta
component for that given item. Album hierarchies are represented by nested slugs. By default, we convert the filename to a slug when you create an album, photo or movie.
2009-09-02Change graphics::generate() API so that it doesn't return a boolean,Bharat Mediratta
instead it throws an exception if there's a problem. The normal case for graphics::generate is that it's going to succeed. It'll only fail if something un-handleable went wrong, so just use the resulting exception.
2009-08-27Properly deal with invalid images. This fixes ticket #611 which showsBharat Mediratta
a BMP masquerading as a .jpg causing us to be unable to rebuild resizes and thumbnails. Now if that happens, we discard the file, log it and move on.
2009-07-28Revert commit 078c77a62b623322956457bfd7bfbdaf56203b00 and change theTim Almdal
tag_event:item_edit_form to use the new Form_Script library to inject script into a form. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-24Add tag autocomplete to the album and photo edit pop up dialogs.Tim Almdal
This required putting a wrapper view around the forms and passing this view as the parameter to the item_edit_form event. The view contains a $script variable that the modules can add script to be included in the form html when rendered as part of the ajax response.
2009-07-20Make some API changes simplify the tag editing code. We now have aBharat Mediratta
good pattern for allowing modules to add their own hooks to item forms! 1) Album, photo and movie forms now all use edit_item as the group and we publish item_edit_form and item_edit_form_completed events which makes it much easier in the module to handle all events. They can still differentiate based on $item->type if they want to. 2) Added tag::clear_all() and tag::compact() functions which takes the place of hiwilson's tag::update() function and is now used in tag_event::item_delete(). This provides a simple API that allows us to have a lot less event handling code. It's less efficient than what hiwilson was doing before in that it will delete and re-add tags, but if that ever turns out to be a performance issue we can do something about it then.
2009-07-20(1)Add tag edit field in album/photo edit form. (2)provide edit ↵hiwilson
functionality. (3)support multi-word tagging.
2009-07-16Second non-trivial change to the event code. We now publish modelBharat Mediratta
related events from within the model handling code. The only exception to this currently is item_created which is challenging because we have to save the item using ORM_MPTT::add_to_parent() before the object itself is fully set up. When we get that down to one call to save() we can publish that event from within the model also.
2009-07-02ORM::Factory -> ORM::factoryBharat Mediratta
2009-06-07Improve error handling support for corrupt images and report themBharat Mediratta
appropriately in g2_import.
2009-05-27Restructure things so that the application is now just another module.Bharat Mediratta
Kohana makes this type of transition fairly straightforward in that all controllers/helpers/etc are still located in the cascading filesystem without any extra effort, except that I've temporarily added a hack to force modules/gallery into the module path. Rename what's left of "core" to be "application" so that it conforms more closely to the Kohana standard (basically, just application/config/config.php which is the minimal thing that you need in the application directory) There's still considerable work left to be done here.