summaryrefslogtreecommitdiff
path: root/modules/server_add/controllers/server_add.php
AgeCommit message (Collapse)Author
2013-01-28#1945 - Extend legal_file helper functions.shadlaws
- Added get_types_by_extension function, which is a merged version of get...types_by_extension functions (similar to get_extensions). - Added optional extension argument to get...extensions functions similar to get...types_by_extension functions. - Added unit tests. Now, every legal_file function has one. - Restructured helper file to include caches. - Added array_unique to get...types (derived from get...types_by_extension, which can be many-to-one). - Edited server_add, uploader, and item model to use new functionality.
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2012-05-07Use legal_file::get_extensions() and variants where appropriate. Fixes #1815.Bharat Mediratta
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2011-04-02Fix an outdated reference to $entry->file which went away in v4 of theBharat Mediratta
module. Fixes #1669.
2011-01-21Update copyright to 2011.Bharat Mediratta
2011-01-21Fix: photos get added as albums in case only some photos are selected via ↵Joe7
server ad Fixes #1619
2011-01-20Fix a bug introduced in the refactor inBharat Mediratta
65448548637f462ad17c12b149cdb2a169d07026 for #1547. By skipping the staging dirs, we wind up scanning the entire filesystem because the first model is blank so there's no leading path before the /*.
2011-01-19Fix a bug introduced in 65ff2470a505fbc18211093ac131c29b1e820c3e,Bharat Mediratta
clearly I didn't test this enough. Further fix for #1460.
2011-01-10New albums should take the sort order from their parent. Fixes #1599.Bharat Mediratta
2011-01-09Use eeldivad's fallback code from ↵Bharat Mediratta
http://gallery.menalto.com/node/96806#comment-358404 instead of relying solely on preg_quote. Fixes #1460.
2011-01-09Move the directory queue into the database as well, otherwise if youBharat Mediratta
have too many directories it blows out the task queue and the whole thing falls over. Fixes #1547.
2011-01-09Replace preg_quote with a more targeted regex to fix the problem whereBharat Mediratta
directories get skipped. Fixes #1460, I think.
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-10Cast the status message to a string so that it gets sent down as a string in ↵Bharat Mediratta
the json blob. Fixes ticket #1198.
2010-07-10Accept extension .m4v as video/mp4Romain LE DISEZ
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-04-04preg_quote() the pattern we use for directory globs to avoid lettingBharat Mediratta
the filename be treated as a regexp. Fixes #1086.
2010-03-03Update the copyright to 2010. It's only 3 months into the year :-)Bharat Mediratta
2010-02-22Fix server-add for German and other locales that use comma as decimal separator.Andy Staudacher
2010-01-31Remove debug code.Bharat Mediratta
2010-01-28cast $task->done to bool so that it doesn't show up as "0" to the JS,Bharat Mediratta
which will interpret that as a true value, when it's not.
2010-01-27Convert back to using ORM::factory(..., $id) instead of calling where().Bharat Mediratta
2010-01-23Switch to model based validation.Bharat Mediratta
2010-01-24First pass at converting server add to model based validation.Bharat Mediratta
2010-01-09Fix for ticket #972 and more. In Kohana 2.4, ORM::delete_all ignores any whereTim Almdal
clauses and deletes all the entries in the table unless an array of id's are passed as the parameter. This fix used the Database_builder to specify any where conditions. Thanks psvo for find the first one. :-)
2009-12-30The problem occurs because the square brackets are treated as special ↵Tim Almdal
characters in the glob to find the children. This patch escapes the square brackets. Fixes ticket #855
2009-12-25Fix uses of count_records() and use ORM to count instead.Bharat Mediratta
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-18Convert a database call.Bharat Mediratta
2009-12-02Fix a bunch of places where we were using "= null" instead of "IS NULL".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-25ORM::orderby -> ORM::order_byBharat Mediratta
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-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-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-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-09-17Don't try to creat an album that corresponds to the staging directory. Just ↵Tim Almdal
add the contents of the staging directlyinto the album that server_add was invoked from. Fixes ticket #785
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-08-04Skip empty files, since we know they're broken. Fixes ticket #610.Bharat Mediratta
2009-07-21Fix some consistency in text.Shai Ben-Naphtali
This fixes ticket #546 Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-07-19Fix l10n message inconsistency, ticket 546Andy Staudacher
2009-07-11Further simplify server_add (and bump it to version 3).Bharat Mediratta
Now we don't have checkboxes, but instead we restrict you to selecting directories and albums from only one level in the hierarchy. This makes it easier for us to make sure that we properly create the hierarchy that you want and avoid confusion about what's going to wind up where. Modify Server_Add_File_Model to have a parent_id and item_id and then modify them as we go so that we can build up a tree structure there *before* we create any items. This makes it much easier to figure out where a new item is going to go and get rid of a bunch of probably buggy code in the main task.
2009-07-10Remove debug code.Bharat Mediratta
2009-07-10Fix a bug where we were not properly locating the parent album whenBharat Mediratta
adding a new album or photo. Simplify the data structure that we pass down to server_add_tree.html.php so that we just pass a file list and let it do whatever it wants with it.
2009-07-09Avoid blowing the task data column by only adding directories to the queue ↵Bharat Mediratta
instead of directories and files.
2009-07-09Add status output to make it clearer what's happening when you add files.Bharat Mediratta
2009-07-07Rework server_add. It's smaller and leaner now, storing the list ofBharat Mediratta
files out in a separate model for scalability. Removed the "pause" functionality. - Server_Add_Controller extends Admin_Controller so that we don't have to check for admin every time. - Task completion time now factors in the time it takes to walk the arbitrarily deep trees - Moved checkbox management entirely into JS using jQuery - Simplified the JS considerably