Commit Graph

345 Commits

Author SHA1 Message Date
Bharat Mediratta
583950616e Improve the fix for #1176 to use request::is_ajax() instead of tacking
on a query param to urls that appear in dialogs.  This keeps things simpler.
2010-07-16 11:58:13 -07:00
Tim Almdal
993e041274 Remove the code to call the controller directly and just use redirect. Now that all the form calls actually return the form as a json object, calling the form creation controller method i no longer required. 2010-07-15 14:57:43 -07:00
Tim Almdal
155d2b809b Rename g-in-dialog to the naming standard for query parameters and give it something more representative... 'gallery_dialog_request' 2010-07-15 14:54:45 -07:00
Bharat Mediratta
fe2881a22a Rename Flash_Uploader to just Uploader. Modules that want to replace
this will just replace the controller.  This makes overriding that
much easier in the future.
2010-07-15 12:37:44 -07:00
Bharat Mediratta
297f98fcee Fix reauth authentication to use the identity helper instead of the
user helper directly.  Else it doesn't work with LDAP and other
identity systems.
2010-07-13 12:52:59 -07:00
Tim Almdal
329abfe539 Merge branch 'master' into talmdal_dev 2010-07-11 09:09:52 -07:00
Bharat Mediratta
0389dceb47 Rotate all matching album covers when we rotate an item. Fixes ticket #1200. 2010-07-10 21:29:34 -07:00
Bharat Mediratta
b20f9123dc Wrap album deletes in a batch so that we can handle lots of cascading
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-10 18:25:23 -07:00
Bharat Mediratta
7ca201b118 Pass along the from_id in item::get_delete_form() and then check to
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-10 12:00:06 -07:00
Romain LE DISEZ
39962eaddc Accept extension .m4v as video/mp4 2010-07-10 08:09:04 -07:00
Tim Almdal
213807a807 remove debugging statement 2010-07-09 14:59:23 -07:00
Tim Almdal
72f801df7d Only add the 'Successfully re-authenticated' message to the status if the admin page is not displayed in a dialog. 2010-07-08 08:23:08 -07:00
Tim Almdal
9538b3888d Fix for ticket #1176. Have the gallery.dialog code add a g-in-dialog parameter to the url to let the controller know its in a dialog. The reauthenticate controller will format the password prompt as a page or a form content. If authentication is successful, then the original controller is called instead of being redirected to. 2010-07-07 08:58:38 -07:00
Tim Almdal
dbf3199e46 Fix for ticket #1181. Use $.getJSON to retrieve the json contents of the 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-07-06 14:12:01 -07:00
Bharat Mediratta
df3af7d521 Merge branch 'master' of github.com:gallery/gallery3 2010-07-05 19:17:30 -07:00
Tim Almdal
226d1f7146 Revert "If the admin request originates as a dialog link, don't display the entire page when reauthenticating the administrator. Just put the form in the dialog."
This reverts commit 8493a3d36f.
2010-07-05 08:58:36 -07:00
Bharat Mediratta
0977c31009 Merge branch 'master' of github.com:gallery/gallery3 2010-07-05 08:47:40 -07:00
Bharat Mediratta
45b210c287 Add maessage when we automatically log you out of the admin area. 2010-07-05 08:44:46 -07:00
Tim Almdal
8493a3d36f If the admin request originates as a dialog link, don't display the entire page when reauthenticating the administrator. Just put the form in the dialog. 2010-07-05 08:23:17 -07:00
Bharat Mediratta
d82863421d Rename "simple_uploader" to "flash_uploader" to make room for an HTML
uploader.
2010-06-20 21:10:22 -07:00
Tim Almdal
a03e3d1dc1 Fix for ticket #1110. Need to use the encode_path with a movie extension to find the item. Thanks to samdavidoff for the initial fix. 2010-06-17 09:38:36 -07:00
Bharat Mediratta
a432a43b3b Revert "Change the item rest update processing to call the
item::move(source, target) helper when the parent member has changed.
Using the move method insures that names and slugs that could conflict
in the target album are resolved properly.  Changed the item::move
method so it returns a message to be displayed if the caller chooses.
And changed the move controller to display the message returned by the
move if the item name was renamed as part of the move."

Rolling this back for a couple of reasons:

1) Bug in move.php ("message.info" is not a function name)

2) Having the message come back from the API call as a side-effect is
sloppy.  We should find a cleaner way to do this checking.

3) having item::move() call save() on any changed values in the ORM
is counter-intuitive.  Move should move, save should save.

I think the right approach here is to roll the move() code properly into
save().

This reverts commit 2492280cc0.
2010-06-15 17:18:22 -07:00
Bharat Mediratta
48dc07dbc8 Revert "Fix for ticket #1118. Create a item::save_with_retries helper
method, which encapsulates saving an item and handling name and slug
conflicts. Call this instead of doing a save directly."

Rolled this back because it fails KISS.  We already have an API for
saving models with Item_Model::save() that's consistent with all of
our other model code.  Adding a new way to save items is confusing and
inconsistent.

This reverts commit 9504f71efc.
2010-06-15 17:17:25 -07:00
Bharat Mediratta
ae6af2f9b6 Install the rest module by default. 2010-06-15 16:01:41 -07:00
Bharat Mediratta
4d40cf62e9 Sort files by path in _dump_var() for consistent output.
Skip . and .. (PHP 5.3 iterators seem to include those now).
2010-06-15 15:50:10 -07:00
Tim Almdal
9504f71efc Fix for ticket #1118. Create a item::save_with_retries helper method, which encapsulates saving an item and handling name and slug conflicts. Call this instead of doing a save directly. 2010-06-15 14:18:23 -07:00
Tim Almdal
2492280cc0 Change the item rest update processing to call the item::move(source, target) helper when the parent member has changed. Using the move method insures that names and slugs that could conflict in the target album are resolved properly. Changed the item::move method so it returns a message to be displayed if the caller chooses. And changed the move controller to display the message returned by the move if the item name was renamed as part of the move. 2010-06-15 12:52:28 -07:00
Bharat Mediratta
87f8b6ff0a Bounce the user to the login page if they try to get to part of the
admin site as a guest.  Also, theme the login/html page.
2010-06-12 15:28:03 -07:00
Bharat Mediratta
dceecabbf1 Make login/logout continuation url code consistent. Where necessary,
we specify the continue_url in the session, but we store it in the
login form so that we can propagate it across the session creation
that happens at login time.
2010-06-12 15:16:47 -07:00
Bharat Mediratta
c026da85cd Use "continue_url" instead of "continue" for consistency with the
reauth code.
2010-06-12 15:10:34 -07:00
Bharat Mediratta
b61b50604b Push the continue url into the form for consistency with other
login/continue code.
2010-06-12 15:09:16 -07:00
Bharat Mediratta
63d95087bf Stop trying to parse the continue url in the logout controller because
it requires us to reproduce a bunch of complex routing logic.
Instead, just have the logout link generating code generate a link
that's visible to guests.
2010-06-12 13:35:12 -07:00
Tim Almdal
bbbb35675a Fix for ticket #1039. The problem was, as Bryan76 pointed out, with passing the full url in the continue parameter. In the logout controller, we tried to get the item from the url so we could check the permission of the item to insure that the guest user had access. But url::get_item_from_url expects a relative url. 2010-06-11 15:40:54 -07:00
Tim Almdal
30f4e143e8 Actually execute the database query that updates the album view count. Fixes ticket #1092. Thanks to shinta for pointing the way. 2010-06-11 08:17:03 -07:00
Bharat Mediratta
3422185938 Remove "rnd=" param from quick changes since we have the m= cache-buster already. 2010-05-14 16:51:51 -07:00
ckieffer
f1076590f1 Add page_title to admin views. Closes #1038. 2010-04-30 00:08:37 -06:00
Bharat Mediratta
6d81feacae Change the key for invalid passwords from "invalid" to
"invalid_password" to remove ambiguity.
2010-04-17 12:28:46 -07:00
Bharat Mediratta
ca45341361 Trigger the album_add_form_completed event after creating a new album. 2010-04-17 12:10:01 -07:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Andy Staudacher
a19b97f8d6 First step towards fixing ticket #1038: Allowing for custom page <title> in admin pages, just like in non-admin pages.
TODO: Set $view->page_title in the many admin controllers we have. I just set it for admin_maintenance.php to show how it's intended to be used. I copied the title from views/admin_maintenance.html.php to the controller.
2010-02-28 13:35:58 -08:00
Andy Staudacher
dacb58ceed Additional fixes for plural handling when deleting translations / marking them as untranslated. 2010-02-27 20:06:37 -08:00
Andy Staudacher
48193371e4 Incremental fix for ticket #1042: Delete translation from outgoing_translations when the user submits a form with an empty translation. 2010-02-27 18:54:36 -08:00
Andy Staudacher
6ce0132842 Fix for ticket #1027: Add index on cache key column.
(and fix the packager to truncate the cache table before packaging)
2010-02-22 00:30:54 -08:00
Andy Staudacher
334cd2368d Performance improvement: Load all translations of a locale as one serialized array from the Cache.
Until now, we loaded hundreds of translation messages row by row, and unserializing one by one at bootstrap time. That amounted to a significant percentage of the complete request time. This approach is more than 10x faster.
2010-02-21 23:50:01 -08:00
Andy Staudacher
8e7eda9cc6 Fix progress bar / maintenance tasks for locales that use comma as decimal separator, such as German. 2010-02-21 23:23:48 -08:00
Bharat Mediratta
d388e4bb86 Refactor away the "display_all" construct in User_Profile_Controller.
"display_all" is too coarse, and we should be letting event handlers
make the appropriate decision on what to display and when.  This
duplicates some code, but it's now very clear in the event handlers
what's getting shown.

Throw a 404 if we try to view the user profile for a missing user.

The only feature change in this should be that we now display the
name, full name and website for a user to any other registered user,
which makes sense since these are typically public fields.

Don't show any of the edit buttons unless identity::is_writable()
2010-02-19 11:40:49 -08:00
Andy Staudacher
4091219425 Fix for ticket #491: Make user and group names translatable.
Also fixed a UI bug: No longer showing the edit user buttons to admins in the profile view (to be consistent with the requirements in the controller).
2010-02-14 19:26:34 -08:00
Andy Staudacher
0f66db51ef Change JavaScript reauthentication check to check via XHR.
Benefit: Getting the real deadline this way, not interfering with an ongoing maintenance task.
2010-02-14 07:15:59 -08:00
Andy Staudacher
8412aeb133 For consistency, use straight Kohana_404_Exception instead of the event system. 2010-02-14 07:15:57 -08:00
Andy Staudacher
d53f6d0e05 Fix for tickets 1009 and 603: Show a themed error page to guests / registered users (not to admins though). And show a login form to guests for 404 (incl. insufficient view permissions) errors. 2010-02-12 16:40:44 -08:00