summaryrefslogtreecommitdiff
path: root/modules/server_add/helpers
AgeCommit message (Collapse)Author
2013-01-31Drop the requirement to have the install() function set the moduleBharat Mediratta
version. It's redundant. Fixes #1985.
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2011-04-23Inline admin JS into admin_server_add.html.php. Fixes #1686.Bharat Mediratta
2011-01-21Update copyright to 2011.Bharat Mediratta
2011-01-15Fix all the head() and admin_head() theme callbacks to return theBharat Mediratta
results of the $theme->css() and $theme->script() calls. This handles the case where combining scripts/css returns HTML instead of putting it in the queue for combination. Fixes #1611.
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.
2010-08-09"Server Add" -> "Server add"Bharat Mediratta
(Sentence capitalization)
2010-03-03Update the copyright to 2010. It's only 3 months into the year :-)Bharat Mediratta
2009-10-30Add type attribute to rest of our script tags.Chad Kieffer
2009-10-28Normalize capitalization ticket #596Tim Almdal
2009-10-24Merge branch 'master' into talmdal_devTim Almdal
Conflicts: modules/server_add/helpers/server_add_theme.php
2009-10-23Adjust order of items on server_add admin page. Restore autocomplete to the ↵Chad Kieffer
add form. Created a server_add.css file.
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-19Change the fix for ticket #775 to always add the Add menu, but not add any ↵Tim Almdal
items if the album directory is not writable.
2009-09-18Don't display the add menu if the underlying operating system directory is ↵Tim Almdal
not writable. THis should fix ticket #775
2009-08-31Rename mark_safe() to mark_clean()Andy Staudacher
2009-08-30Merge commit 'upstream/master'Andy Staudacher
Conflicts: modules/gallery/views/l10n_client.html.php modules/organize/views/organize_tree.html.php modules/server_add/helpers/server_add_event.php
2009-08-30Tabs to spaces cleanupAndy Staudacher
2009-08-30Change all instances of SafeString::of_safe_html() to html::mark_safe() in ↵Andy Staudacher
views.
2009-08-29Delete obsolete comment and tighten the code in site_menu().Bharat Mediratta
2009-08-29Undo url helper changes - url methods no longer return a SafeString.Andy Staudacher
Adding SafeString::of_safe_html() calls where urls are passed as parameters to t() and t2().
2009-08-29* created new generic "Add" dropdown in the site menu. this should take care ↵jhilden
of ticket #537 * removed start/stop translation menu items from the admin, since they are on the languags admin page now
2009-08-27Remove 'ENGINE=InnoDB' specification from tables that we create. UseBharat Mediratta
the system's default table specification. Fixes ticket #597.
2009-07-28Use events to generate menus, instead of having xxx_menu helpers.Bharat Mediratta
This is the first step towards having a simple, lightweight and unified API for module interaction.
2009-07-22Use the Kohana cascading filesystem to locate resources loaded by theBharat Mediratta
theme. Because the theme comes first, this means that themes can override any module resources, at the cost that we no longer have namespacing for JS and CSS files. The only file getting used outside of this model is themes/default/screen.css which is used in the admin theme. I fixed that by copying screen.css into admin_default and renaming its screen.css to admin_screen.css. I also copied over all the images that it was referencing. Fixes tickets #48 and #539. Theme API changes: - theme_script(), theme_url() and theme_css() are no longer needed - script(), url() and css() now refer to the first matching asset in the module load path, where gallery3/lib is at the end of the path
2009-07-14Don't use "else" clauses in upgrade() -- it prevents multiple version bumps ↵Bharat Mediratta
at once.
2009-07-11Forgot to bump the version up to 3Bharat Mediratta
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-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-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-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-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-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-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-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-02Change comment style for brevity.Bharat Mediratta
2009-05-02Whitespace cleanup.Bharat Mediratta
2009-04-09Fix server add to correctly ignore a authorized path if there are noTim Almdal
files to be uploaded from it.