summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/quick.php
AgeCommit message (Collapse)Author
2013-02-17#2006 - Add system::mark_file_for_delete API to delete files at shutdown.shadlaws
- added system::mark_file_for_delete to be called to mark a file - added system::delete_marked_files to be called at shutdown to delete the list - amended system::temp_filename to, by default, add the temp name to the list - updated a few other places in code where this should be used
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2011-04-30Change the signature of system::tempnam to something more appropriate for ↵Chad Parry
Gallery.
2011-04-30Create a tempnam substitute that safely creates files with a given extension.Chad Parry
2011-02-23Added extra arg to gallery_graphics calls and updated userscolings
2011-01-21Update copyright to 2011.Bharat Mediratta
2010-09-16Preserve the image extension on the temp file that we create forBharat Mediratta
rotating images. Some versions of GD won't work if we don't do this. Fixes ticket #1375.
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-07-31Full pass over all the JSON encoding and JS dialog code. We now abideBharat Mediratta
by the following rules: 1) An initial dialog or panel load can take either HTML or JSON, but the mime type must accurately reflect its payload. 2) dialog form submits can handle a pure HTML response, but the mime type must also be correct. This properly resolves the problem where the reauth code gets a JSON response first from the reauth code, and then an HTML response when you reauth and continue on to a given form -- try it out with Admin > Settings > Advanced. 3) All JSON replies must set the mime type correctly. The json::reply convenience function does this for us. 4) By default, any HTML content sent back in the JSON response should be in the "html" field, no longer the "form" field. The combination of these allows us to stop doing boilerplate code like this in our controllers: // Print our view, JSON encoded json::reply(array("form" => (string) $view)); instead, controllers can just return HTML, eg: // Print our view print $view; That's much more intuitive for developers.
2010-07-31More patches as part of #1225. Change the 'core' modules to use the json::replyTim Almdal
method to set the content type header and encode the response as a json object
2010-07-11Merge branch 'master' into talmdal_devTim Almdal
2010-07-10Rotate all matching album covers when we rotate an item. Fixes ticket #1200.Bharat Mediratta
2010-07-10Wrap album deletes in a batch so that we can handle lots of cascadingBharat Mediratta
deletes in bulk. This lets us avoid the problem where we continually choose and delete album covers which makes deletes really slow. It probably also avoids huge amounts of notification emails (untested). Fixes ticket #1190.
2010-07-10Pass along the from_id in item::get_delete_form() and then check toBharat Mediratta
see if we're deleting the album we're inside in quick::delete. If we delete the album we're currently viewing, redirect to the parent. This fixes ticket #1185.
2010-07-06Fix for ticket #1181. Use $.getJSON to retrieve the json contents of the ↵Tim Almdal
dialog. Convert all the controllers that create the data to go into a dialog to return the html as part of a json object.
2010-05-14Remove "rnd=" param from quick changes since we have the m= cache-buster ↵Bharat Mediratta
already.
2010-03-03Update the copyright to 2010. It's only 3 months into the year :-)Bharat Mediratta
2010-01-28Add @todo.Bharat Mediratta
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-16Show the right edit form for movies.Bharat Mediratta
2009-11-17Redesign the way that we consider page types to create buckets of pageBharat Mediratta
types, and a subtype for specifics. Currently the top level bucket collection, item, other Here are the core subtypes so far: collection: album, search, tag item: movie, photo other: login, reset, comment-fragment, comment It's legal to create new page_subtypes whenever you want. Use the appropriate page_type to get the coarse grain behavior that you want.
2009-10-06Move the graphics::rotate to gallery_graphics::rotate to be consistent with ↵Tim Almdal
the other gallery graphics functions.
2009-09-08Move specialized (pretty) url generation back into Item_Model so thatBharat Mediratta
we're not relying on overriding url::site() to do tricks around item urls. This means that you won't get item urls by doing url::site("albums/37"), for example, but it also means that we won't get pretty urls where we don't expect them (like in the action of a <form> element). Incidentally, this will help us move over to using the slug format because if you've got a bad character in a url, the edit forms will now work on it since they'll be id based.
2009-08-29Update all code to use helper method html::clean(), html::purify(), ... ↵Andy Staudacher
instead of SafeString directly.
2009-08-29Merge commit 'upstream/master'Andy Staudacher
Conflicts: modules/akismet/views/admin_akismet.html.php modules/comment/helpers/comment_rss.php modules/gallery/helpers/gallery_rss.php modules/gallery/libraries/I18n.php modules/gallery/views/permissions_browse.html.php modules/gallery/views/simple_uploader.html.php modules/info/views/info_block.html.php modules/organize/controllers/organize.php modules/organize/views/organize.html.php modules/organize/views/organize_album.html.php themes/default/views/album.html.php themes/default/views/movie.html.php themes/default/views/photo.html.php
2009-08-29Refactor all calls of p::clean() to SafeString::of() and p::purify() to ↵Andy Staudacher
SafeString::purify(). Removing any p::clean() calls for arguments to t() and t2() since their args are wrapped in a SafeString anyway.
2009-08-03Combine the quick menu and the thumb menu into a single menu calledBharat Mediratta
the "context" menu. This new context menu is generated using the typical event processing system, like our other menus. The specialized quick CSS and JS is now gone, replaced by our generic menu handling code. It's all rolled together currently using the thumb_menu UI for easy packaging. All the CSS and JS is updated. NOTE: the non-dialog links (rotate, album_cover) have a broken UI because they return JSON which the quick.js code handled specially, but we don't handle properly now. I need to fix this.
2009-07-11Fix a problem in delete() where we were referencing $parent withoutBharat Mediratta
saving its value before $item got deleted. Further fix for #528.
2009-07-03Split the clean method into two clean and purify. clean is a light weightTim Almdal
approach using html::specialchars and purify uses HTMLPurifier to intelligently cleanse the output fields. Use purifier for text and title fields where it is likely that a user would enter html to format their data.
2009-07-01Fix a bunch of XSS vulnerabilities turned up by manual inspectionBharat Mediratta
using the checklist in ticket #385.
2009-06-23Cache the page_type in pane() instead of looking it up twice.Bharat Mediratta
2009-06-22Change the quick pan from static to dynamic. This allows modules to add ↵Tim Almdal
buttons to the quick pane. The quick pane is now divided into 4 sections: left, center, right and additional. Additional items appear in the drop down box. Buttons are not sorted within the groupings. In addition, the quick pane will overflow onto the "additional" dropdown if there is not enough room to display all the buttons. The use case is the digibug printing module needed to add a button to the quick pane, and I don't like putting code into core that says if module is active... That's another one of those code smells :-) Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-14Get rid of the word "items" in the delete confirmation dialog.Bharat Mediratta
2009-06-14Switch quick delete from JS confirm to jQuery UI dialog, closes ticket #355.Chad Kieffer
2009-06-09Show status message when album cover is set (#257)Chad Kieffer
2009-06-01Security pass over all controller code. Mostly adding CSRF checkingBharat Mediratta
and verifying user permissions, but there are several above-the-bar changes: 1) Server add is now only available to admins. This is a hard requirement because we have to limit server access (eg: server_add::children) to a user subset and the current permission model doesn't include that. Easiest fix is to restrict to admins. Got rid of the server_add permission. 2) We now know check permissions at every level, which means in controllers AND in helpers. This "belt and suspenders" approach will give us defense in depth in case we overlook it in one area. 3) We now do CSRF checking in every controller method that changes the code, in addition to the Forge auto-check. Again, defense in depth and it makes scanning the code for security much simpler. 4) Moved Simple_Uploader_Controller::convert_filename_to_title to item:convert_filename_to_title 5) Fixed a bug in sending notification emails. 6) Fixed the Organize code to verify that you only have access to your own tasks. In general, added permission checks to organize which had pretty much no validation code. I did my best to verify every feature that I touched.
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.