Bharat Mediratta
ec052d7130
Assert how many files we analyze so that we can tell if we're suddenly
...
analzying too many or too few.
2010-06-20 09:36:56 -07:00
Bharat Mediratta
9f9d3866e8
Exclude the .git directory.
2010-06-20 09:28:36 -07:00
Bharat Mediratta
ab9049d531
Remove trailing ?>
2010-06-20 09:05:25 -07:00
Bharat Mediratta
1a210dd270
Add "json" as a valid view suffix.
2010-06-20 09:03:23 -07:00
Bharat Mediratta
719328a5a7
If we use <?= .. ?> on the last line, it looks like we've got a
...
trailing ?> and that causes File_Structure_Test to be sad. So instead
use echo and tack on our own newline. But this also requires a
semicolon. Weird, I know but still easier than fixing up the test.
2010-06-20 09:02:59 -07:00
Bharat Mediratta
d86d1a32e8
Updated for comment REST relationships.
2010-06-19 15:12:58 -07:00
Bharat Mediratta
41ca2b0195
Rework our exception framework to fit into Kohana's model better.
...
Instead of overwriting Kohana_Exception::handle() (which we were doing
in MY_Kohana_Exception) we instead use their existing template system.
gallery/views/kohana/error.php overrides system/views/kohana/error.php
and is the standard error template for all exceptions. Our version of
error.php figures out the appropriate view based on context (cli,
authenticated admin, guest viewing a 404, guest viewing a system
error) and delegates appropriately. Each delegated view has a narrow
responsibility.
This paves the way for us to add new error views per module. For
example, the rest module will define its own template in
Rest_Exception and then its exceptions can be rendered the way that it
wants (json encoded, in that case).
2010-06-19 14:07:32 -07:00
Bharat Mediratta
5736698b4b
single -> double quotes.
2010-06-19 10:51:05 -07:00
Bharat Mediratta
bc70ff498d
Use request::protocol()
2010-06-18 15:25:33 -07:00
Tim Almdal
e82aa6dcd8
Update the xss gold file with changes to views in the last couple of commits.
2010-06-17 10:22:19 -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
Tim Almdal
2bbce8dddb
Fix for ticket #1117 align videos to the center.
2010-06-17 09:10:01 -07:00
Tim Almdal
38d09c5d1a
Scale a movie to the resize size so that it doesn't overflow into the sidebar.
2010-06-17 08:03:08 -07:00
Bharat Mediratta
35bbffcc29
Merge branch 'master' of github.com:gallery/gallery3
2010-06-16 14:25:13 -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
e3535349ab
Revert "Add a "convert_ids" parameter to Item_Model::as_restful_array(), which"
...
This reverts commit 98fce83de5 .
Conflicts:
modules/gallery/tests/Item_Model_Test.php
2010-06-15 20:25:35 -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
1df752a2f2
Make the "name" column a little wider.
2010-06-15 16:11:21 -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
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
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
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
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
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
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
6119ddc735
Merge branch 'master' into talmdal_dev
2010-06-10 08:16:07 -07:00
Bharat Mediratta
ab93767e4d
Update golden file
2010-06-09 21:26:36 -07:00
Bharat Mediratta
6556ca8833
In GalleryCodeFilterIterator::accept(), ignore . and .., and stop caring about .svn
2010-06-09 21:23:42 -07:00
Bharat Mediratta
aff0f6eca8
Fix get_ancestor_test() since the parameter was renamed to ancestors_for.
2010-06-09 20:55:39 -07:00
Bharat Mediratta
3dacafb718
Revert the "preserve_ids" global query parameter. We decided that it was a
...
bad idea.
This reverts commit 6425d41edd .
2010-06-09 20:49:32 -07:00
Bharat Mediratta
b40057283e
Add a "can_edit" field to the Item_Model's REST output. It's
...
applicable to the current user.
2010-06-08 20:59:24 -07:00
Tim Almdal
d5b80f2944
Don't use the standard error formatting for exceptions that have occurred as part of a REST request. Format the exception as a json encoded text string so the client can extract the fault information if they so choose.
2010-06-08 14:35:35 -07:00