summaryrefslogtreecommitdiff
path: root/modules/server_add
AgeCommit message (Collapse)Author
2009-07-09Use p::purify instead of p::cleanBharat 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
2009-07-02Merge branch 'master' of git@github.com:/gallery/gallery3Bharat Mediratta
Conflicts: modules/server_add/controllers/admin_server_add.php
2009-07-02Temporary version add() that just dumps out the values for now.Bharat Mediratta
2009-07-02@todo if we uncheck all the children for a parent, we should uncheck theBharat Mediratta
parent itself, otherwise in the code we'll add the entire parent since if we find an album as a leaf, we assume that it's never been expanded in the UI.
2009-07-02Properly manage disabled state for the [add] button.Bharat Mediratta
2009-07-02Only enable the [add] button when boxes are checked.Bharat Mediratta
2009-07-02Add some jsDoc.Bharat Mediratta
2009-07-02Partial pass of server_add cleanup. It's broken at this stage sinceBharat Mediratta
I've redone the browsing code but I have not implemented the adding code. 1) Rename index() to browse() since index is too generic. 2) Simplify the data that we pass to _dialog and _tree 3) Change _tree to return list items only, so that the outer dialog can be a <ul> for consistency. 4) Simplify the data structures so that we're not tracking checked vs. unchecked status in the PHP code, it's all done in jquery where we can do it with just a line or two of JS 5) use glob() which pretty much entirely replaces _get_children
2009-07-02Eliminate temporary variables by passing the $item into the view andBharat Mediratta
making API calls on the item.
2009-07-02Remove empty <script> block.Bharat Mediratta
2009-07-02In remove_path(), if the path is invalid don't echo it back in the UI.Bharat Mediratta
2009-07-01Fix a bunch of XSS vulnerabilities turned up by manual inspectionBharat Mediratta
using the checklist in ticket #385.
2009-06-29Temporary checkin to allow merge with trunk... don't integrateTim Almdal
2009-06-28Use $theme->script() method to render module javascript filesTim Almdal
2009-06-23Merge branch 'master' of git@github.com:gallery/gallery3Chad Kieffer
2009-06-23Use gMessage for "no paths defined" status message.Chad Kieffer
2009-06-23Refactor the install/upgrade code to be more flexible.Bharat Mediratta
Add xxx_installer::upgrade($version) method so that upgrade stanzas are separate from install stanzas. In the old code, to do an upgrade meant that you had to re-evolve everything from the initial install because we'd step through each version's changes. But what we really want is for the initial install to start off in the perfect initial state, and the upgrades to do the work behind the scenes. So now the install() function gets things set up properly the first time, and the upgrade() function does any work to catch you up to the latest code. See gallery_installer.php for a good example.
2009-06-12Convert the filename to a sensible title to match the way that the simple ↵Bharat Mediratta
uploader works.
2009-06-10Changed how directories are processed when the parent directory is selected andTim Almdal
the branch was never opened on the client. This should fix some of the issues with the server_add as I was able to select the staging directory and then add over 400 images in a multi-tier structure. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-04Only request the server_add js if the user is an adminBharat Mediratta
2009-06-05Rewrite the server_add to have the server format the selection when a branch ↵Tim Almdal
is opened. Sub trees re only retrieved when the branch is opened. Changed the start task processing to fill in any subtrees that are selected, but were never expanded on the client. Added the loading icon. Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-06-03Guard against pages with no items.Bharat Mediratta
2009-06-03Minor tweaks to the way that we turn the add photos item into a menuBharat Mediratta
to make it a little more robust.
2009-06-02made "Add photos" its own site menu itemjhilden
* open for suggestions on the submenu item labels * @bharat: not sure about the add photos menu item id in the dropdown case
2009-06-02Have server_add turn the "Add Photo" menu option into a dropdown andBharat Mediratta
make "Add from Server" a 2nd option there. This requires adding the Menu::remove() API function.
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-31Run all variables that come from user-entered data through p::clean()Bharat Mediratta
2009-05-26Restructure the module lifecycle.Bharat Mediratta
Install: <module>_installer::install() is called, any necessary tables are created. Activate: <module>_installer::activate() is called. Module controllers are routable, helpers are accessible, etc. The module is in use. Deactivate: <module>_installer::deactivate() is called. Module code is not accessible or routable. Module is *not* in use, but its tables are still around. Uninstall: <module>_installer::uninstall() is called. Module is completely removed from the database. Admin > Modules will install and activate modules, but will only deactivate (will NOT uninstall modules).
2009-05-21Change $view->action to a absolute url.Bharat Mediratta
2009-05-13Gee it's May already. Update copyright to 2009.Bharat Mediratta
2009-05-13Create a new "add" permission and require it at the controller levelBharat Mediratta
when adding photos/movies/albums
2009-05-09Remove quotes and correct typoTim Almdal
2009-05-09Fix for ticket #217Tim Almdal
2009-05-02Change comment style for brevity.Bharat Mediratta
2009-05-02Whitespace cleanup.Bharat Mediratta
2009-04-231) Change the processing so the server_add start task can return done = 1Tim Almdal
if there are no eligible files selected 2) Change the javascript to handle this condition and show a pop up
2009-04-09Don't try to import the staging directory as an albumTim Almdal
2009-04-09Provide a translation of the titleon the fatal error dialog pop-upTim Almdal
2009-04-09Create a pause method on the server_add controller and get rid of theTim Almdal
optional parameter/
2009-04-09Fix server add to correctly ignore a authorized path if there are noTim Almdal
files to be uploaded from it.
2009-04-08Fixes issues with Server Add:Tim Almdal
1) Fixes Ticket #208 2) Fixes Ticket #190 3) Fixes an unticketed issue where two items could collide when creating the thumbnail and/or resize. For example, loading a.flv and a.jpg would have generated the same thumbnail image. This change adds a random value to the name to avoid conflicts. 4) Added item::__set() to clear the relative path if the name changes
2009-04-06Fix for ticket #207, which should then generate a whole bunch ofTim Almdal
errors that are described in ticket #208.
2009-04-03Fix for ticket #200. When an error occurs the current uri is noTim Almdal
longer admin/server_add but admin/server_add/add_path and the equality check fails.
2009-03-27Put csrf token into Admin_View and Theme_View by default, then use itBharat Mediratta
directly wherever possible instead of access::csrf_token().
2009-03-25Fix for ticket #184. Sort the output children as DirectoryIteratorTim Almdal
does not provide a sort order. Separate the directory and files, sort them individually and then merge them together so directories are at the top of the list
2009-03-24Fix the problem I created by trying to run the task again after it was ↵Tim Almdal
completed.
2009-03-24Add a pause button to the server add dialog and if it is clicked thenTim Almdal
the upload is paused. If the dialog is closed and the task is not complete then a warning message is displayed on the album.
2009-03-17Switch from using SimpleUploader to using swfUpload as our flash basedBharat Mediratta
uploader. This is modeled on http://codex.gallery2.org/Gallery3:Upload_UX but is not yet complete. Notes: * Changed #gProgressBar to .gProgressBar to support multiple progress bars on the same page * Added a bunch of CSS to the "needs a home" section in themes/default/css/screen.css
2009-03-16Get rid of $hidden; it was never definedBharat Mediratta