Commit Graph

3576 Commits

Author SHA1 Message Date
Tim Almdal
ea8653f947 Fix for ticket #1131. If the rss feed is for an item, then retrieve the item. Using the left and right pointers find all the comments for the child items. Thanks to jankoprowski for the initial investigation. 2010-06-16 08:39:09 -07:00
Jan Koprowski
1fb3339326 Fix issue1068. Fill from_id field in photo with indetificator 2010-06-16 22:51:39 +08: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
8fb56abf03 Bump the organize module to version 2, and check to make sure that the
REST module is active.
2010-06-15 16:30:02 -07:00
Bharat Mediratta
94ada2361d Fix a bug in the upgrader where we weren't bumping the version number
during the upgrade path, so the 2nd stanza (version 2 to version 3) was never getting executed.
2010-06-15 16:14:30 -07:00
Bharat Mediratta
1df752a2f2 Make the "name" column a little wider. 2010-06-15 16:11:21 -07:00
Bharat Mediratta
78186c262c Update the description. 2010-06-15 16:09:45 -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
Bharat Mediratta
d96ce71f1a Remove a stray period. 2010-06-15 15:29:45 -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
Tim Almdal
207f6beb61 Only change the weights of the album children if the item sort_column is set to weight. 2010-06-15 11:40:01 -07:00
Tim Almdal
00c4cb3f63 Revert "Change the item rest update processing to call the itemm::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. Also, only change the weights of the album children if the item sort_column is set to weight."
This reverts commit 603d464014.
2010-06-15 11:38:46 -07:00
Tim Almdal
603d464014 Change the item rest update processing to call the itemm::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. Also, only change the weights of the album children if the item sort_column is set to weight. 2010-06-15 11:20:04 -07:00
Tim Almdal
81f176cf8e url::site(...) adds a leading slash to the uri it generates. Take this into account when creating the base url for accessing rest requests.
Update the sort dropdown box to manual when album items are rearranged.
2010-06-15 09:39:45 -07:00
Bharat Mediratta
7e5661cf49 Add a simple/cheap test to make sure that the database config is ok. Fixes ticket #1029. 2010-06-15 09:14:10 -07:00
Bharat Mediratta
b2afba1db1 The fact that we have a path to a G2 embed file doesn't mean that it's still
valid so check to see that it's ok before proceeding.  This should resolve #458.
2010-06-15 09:14:10 -07:00
Tim Almdal
f5eb5d5d70 add an 'icon' to identify albums in the organize dialog. 2010-06-15 09:14:09 -07:00
ckieffer
9911372d58 Removed self-closing slash from opening <li> tag. 2010-06-15 09:14:09 -07:00
Tim Almdal
f10d641044 Change the parameters for the organize dialog box. The baseUrl parameter was removed and replaced with the restUri, which contains the relative uri for the rest controller. The controller parameter is now the relative uri for the organize controller. The protocol parameter was added. In addition, there is not default size for the organize flex object. It attempts to fit within the gallery3 dialog box. 2010-06-14 13:07:58 -07:00
Tim Almdal
1c5264d7f5 Merge branch 'master' of git@github.com:gallery/gallery3 2010-06-14 07:44:17 -07:00
Bharat Mediratta
793780daa7 Replace __CSRF__ with the actual csrf token. 2010-06-13 20:51:11 -07:00
Bharat Mediratta
6f443a819b Change single to double quotes. 2010-06-13 20:49:50 -07:00
Tim Almdal
821d3f7854 Remove a debugging statement. 2010-06-13 19:50:52 -07:00
Tim Almdal
5decb3b252 Move the source to the gallery3-flex repository. 2010-06-13 19:31:48 -07:00
Tim Almdal
47aa651430 Fix problems ith IE and flex initialization when one of the flashvars contains a json encoded string. Also address the problem that IE returns the color values differently that Firefox and Chrome 2010-06-13 17:58:50 -07:00
Tim Almdal
938eea7fc4 Merge branch 'master' into talmdal_dev 2010-06-13 09:59:27 -07:00
Bharat Mediratta
db0966a9bc Fix up some indentation and comment style. 2010-06-12 15:39:38 -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
Bharat Mediratta
a4586bc0c0 Revert "Fix for ticket #1118. The item validation was flagging duplicate slugs as errors. There was already code in the item save to insure that any"
This introduces a bug where you can create two items with the same slug.

This reverts commit cb01f4017d.
2010-06-12 13:05:40 -07:00
Tim Almdal
cb01f4017d Fix for ticket #1118. The item validation was flagging duplicate slugs as errors. There was already code in the item save to insure that any
duplicates were made unique, so this patch removes the validation as unnecessary.
2010-06-11 16:37:45 -07:00
Tim Almdal
41c18929cd Remove the duplicate query when searching as pointed out by joe7 on ticket #844 2010-06-11 15:54:08 -07:00
Tim Almdal
4c6045843d Merge branch 'master' of git@github.com:gallery/gallery3 2010-06-11 15:41:00 -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
Bharat Mediratta
2c1e3800ef Send back the REST API version as a header. It's on every request,
which sucks, but it's totally unobtrusive because it's a header so
that's ok.  Decided that the current version is "3.0" although it will
surely change before the final 3.0 release.

Fixes ticket #1148
2010-06-11 14:59:17 -07:00
Tim Almdal
bb35aefffb Fix for ticket #797
When load a file is uploaded using a dialog box and the jquery plugin ajaxForm, the ajaxForm plugin uses an hidden iFrame element to send the multi-part
form and this is where the response goes.  The ajaxForm plugin then retrieves the document body and parses the result as a json string. If the file uploads
properly everything is fine, but if it fails Gallery3 return the input form with the the error fields highlighted as part of the json response. As this
response is returned to a hidden iframe, the browser attempts to manipulate it and all hell breaks loose. We lose the trailing brace, we start getting
escaping of form tags. When the ajaxForm plugin retrieves the iFrame body its no longer a valid json frame and the parsing fails and the user sees no
indication that it failed.
2010-06-11 12:36:23 -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
Tim Almdal
0ebc36b4e5 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:15:25 -07:00
Tim Almdal
58b21e909d Change the pattern used to convert the file name to a title. Fixes ticket#1061 2010-06-10 18:49:29 -07:00
Tim Almdal
cbcb7432b3 Correct a problem with the sort order and sort direction fields being ignored. 2010-06-10 14:10:19 -07:00
Tim Almdal
6aab0cbec6 Review the code for xss exposures and provide the functionality to update the organize dialog bar when the selected album changes. 2010-06-10 13:12:10 -07:00
Tim Almdal
38e8ab3d71 Provide better handling and a progress dialog when loading or updating files. 2010-06-10 09:14:13 -07:00
Tim Almdal
30849d10b1 Tweak the error response for rest requests to make it easier for the client to extract error information. 2010-06-10 08:18:15 -07:00
Tim Almdal
6119ddc735 Merge branch 'master' into talmdal_dev 2010-06-10 08:16:07 -07:00