Commit Graph
652 Commits
Author SHA1 Message Date
Bharat Mediratta e5a78d39ec Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/controllers/albums.php
2009-09-21 21:29:13 -07:00
Bharat Mediratta 529ded3388 2nd attempt at gracefully dealing with sort columns that contain
nulls.  This time around, do a query to determine whether or not the
sort column has nulls in it.  If it doesn't, then use our comparators
as before.

There are NULLs in the sort column, so we can't use MySQL comparators.
Fall back to iterating over every child row to get to the current one.
This can be wildly inefficient for really large albums, but it should
be a rare case that the user is sorting an album with null values in
the sort column.

Fixes #627
2009-09-21 21:28:00 -07:00
Bharat Mediratta 123afc9542 Set children_count to 0, photos have no children. 2009-09-21 21:22:07 -07:00
Bharat Mediratta 88350c5b88 Update the next/previous item calculations to match what we do in photos.php
Force the children_count to be zero, movies have no children.
Rename $photo to $movie everywhere.
2009-09-21 21:21:52 -07:00
Bharat Mediratta 9e6be40e31 Add viewable() protection to children() and children_count() calls.
This is not currently necessary (nor is it a security hole) because we
don't constrain permissions at the child level in the core, but it
makes our security audits easier and will enable the scenario where
somebody writes a module to add per-photo permissions.
2009-09-21 20:47:55 -07:00
Bharat Mediratta a6581ede0b Fix Item_Model::get_position() so that our sort is stable when the comparison
row has a null value in the sort field.  Fix for #627

Note: this changes get_position() to take an Item_Model instead of an id!
2009-09-21 11:35:27 -07:00
Tim Almdal 09f998e7a5 On the edit album form, add dirname and slug asa hidden fields, so that when the edits are being validated on input, the fields are found and can be referenced 2009-09-19 10:51:27 -07:00
Tim Almdal cf89015a29 Change the fix for ticket #775 to always add the Add menu, but not add any items if the album directory is not writable. 2009-09-19 09:34:27 -07:00
Tim Almdal 4e6f2f1b4c Don't display the add menu if the underlying operating system directory is not writable. THis should fix ticket #775 2009-09-18 23:53:48 -07:00
Andy Staudacher 2e23ae98c4 - Add theme->movie_menu() to whitelisted methods.
- xss_data checkpoint
2009-09-17 14:12:43 -07:00
Andy Staudacher 88c374dee8 Arg, fixing the "Sharing your Translations" text, thanks engineer@gmc 2009-09-17 10:01:15 -07:00
Andy Staudacher 30b5c389e6 Fix: Make "Sharing your translations" a localizable string 2009-09-17 01:21:06 -07:00
Andy Staudacher 86996dcac7 Mark permission's display name for translation 2009-09-17 01:17:30 -07:00
Tim Almdal 74d9d0901f Merge branch 'master' of git@github.com:gallery/gallery3 2009-09-16 22:24:15 -07:00
Tim Almdal 9d76797b17 Changed the search module installer to explicitly specify MyISAM as the database type. Changed the packager to not remove the engine specification if the table is search_records. Fixes Ticket #774 2009-09-16 22:23:32 -07:00
Bharat Mediratta e94eaa6b88 Merge branch 'master' of git@github.com:gallery/gallery3 2009-09-16 20:37:06 -07:00
Bharat Mediratta 4e1e24ba1a Add a movie_menu() theme callback, and have the default theme call it
in the sidebar on movie page types.
2009-09-16 20:34:42 -07:00
Andy Staudacher 39632c4689 Also check for rss feeds in controller auth check 2009-09-15 23:01:26 -07:00
Andy Staudacher 7608870537 Controller auth / CSRF fixes 2009-09-15 22:51:49 -07:00
Andy Staudacher dc3d45e760 Add exception for REST controllers (no fixes necessary). 2009-09-15 22:01:59 -07:00
Andy Staudacher e168e0dfae CSRF / auth fixes, golden data file checkpoint 2009-09-15 21:50:48 -07:00
Andy Staudacher 61bbe1d78c First functional version of Controller_Auth_Test 2009-09-15 21:03:23 -07:00
Andy Staudacher 17254799d1 Initial skeleton of Controller_Auth code audit test (non functional). 2009-09-15 20:27:04 -07:00
Andy Staudacher 59eadacc67 Improve language preference (Acccept-Language header matching): Boost same-language match over exact locale match for lower qvalue. 2009-09-15 11:19:32 -07:00
Bharat Mediratta 8fa370c49f Set the version to "3.0 git (pre-RC1)" 2009-09-13 22:59:58 -07:00
Bharat Mediratta c527e70f26 Merge branch 'master' of git@github.com:gallery/gallery3 into beta3_staging 2009-09-13 18:55:48 -07:00
Kevin Nehls 1499778b4a Remove raw HTML that's wrapped around the name of the file
to create if not logged in as admin
2009-09-13 14:09:50 -07:00
Bharat Mediratta 71a2e3624e Merge branch 'master' of git@github.com:gallery/gallery3 into beta3_staging 2009-09-13 01:04:41 -07:00
Bharat Mediratta caa2002d77 If there's a show= param and we can't find the given id in the current
album, just ignore the parameter.
2009-09-13 01:04:16 -07:00
Bharat Mediratta 51f6329a89 Update version to "3.0 beta 3" 2009-09-12 17:11:10 -07:00
Bharat Mediratta 823fa2fc83 Updated for url format changes applied in 2aad580f53. 2009-09-12 10:33:46 -07:00
Bharat Mediratta 7ec490b600 rawurlencode() path components in relative_path_cache and
relative_url_cache so that they're safe for browser use.
2009-09-11 11:04:35 -07:00
Bharat Mediratta af4411a447 Put the buttons for album/photo dialogs in their own group in the form
so that they appear at the end, after any other groups that other
modules add.  Thanks Glooper!
2009-09-10 21:55:36 -07:00
Bharat Mediratta 7fddd2aced Use abs_url() inside url::redirect() calls so that we don't just wind
up tacking onto the base url.
2009-09-10 21:31:50 -07:00
Bharat Mediratta 190d7aaa55 Remove debug code. 2009-09-10 21:12:15 -07:00
Bharat Mediratta b8053c9ddf Rename "after_installer" to "welcome_message" in the code to make it
clearer what its purpose is.  Add some spacing in the theme for it
so that it's less cramped.
2009-09-10 21:10:20 -07:00
Bharat Mediratta 752c857116 Rename ORM_MPTT::is_descendant() to ORM_MPTT::contains() to make the
API a little clearer.  Write a test for it, too.
2009-09-10 10:28:43 -07:00
Bharat Mediratta 6e65a8208f Fix a thinko-- of course we want urls to be the path to the file itself. 2009-09-08 21:52:15 -07:00
Bharat Mediratta 0df4b7d705 Fix line > 100 chars. 2009-09-08 21:49:28 -07:00
Bharat Mediratta 77bd3d3d40 Replace two preg_replace() calls with a single trim() call. 2009-09-08 21:49:09 -07:00
Bharat Mediratta 0709f7526d Change $this->_photo to just $photo 2009-09-08 21:33:45 -07:00
Bharat Mediratta 5d76a73596 Fix test to support new slug code. 2009-09-08 21:32:21 -07:00
Bharat Mediratta 3bd8be2651 Change the relative_path_cache and relative_url_cache columns to store
urlencoded data for ease of use when we're dealing with the data.
This fixes ticket #569 by not allowing the urls that we put into our
RSS feeds to have bad characters in them.

We have to convert a path like var/albums/foo/"quotes"/bar.jpg into
something like var/albums/foo/%22quotes%22/bar.jpg.  If we take the
approach of storing native data in the cache, then we have to explode
the path, urlencode the bits, and implode it again to avoid escaping
the / char.  By storing it escaped, we avoid this problem. I believe
(but have not tested) that this is more efficient.
2009-09-08 21:02:45 -07:00
Bharat Mediratta 6cfcab2a5e Amend the v12 installer to empty out the relative_url_cache and
relative_path_cache columns.
2009-09-08 20:59:39 -07:00
Bharat Mediratta 48becbe017 Update item::convert_filename_to_slug() to eliminate leading and
trailing hyphens.
2009-09-08 20:03:55 -07:00
Bharat Mediratta 453fb76443 Actually use the slug when creating new albums (instead of just converting the
filename over).
2009-09-08 20:00:04 -07:00
Bharat Mediratta f69dee8841 Trim leading and trailing hyphens from the slug. 2009-09-08 19:58:27 -07:00
Bharat Mediratta df85f43aa1 Remove unused $feed->link. 2009-09-08 17:05:38 -07:00
Bharat Mediratta cf0c8b6319 Minor tweaks to the url refactor. 2009-09-08 17:01:59 -07:00
Bharat Mediratta 2aad580f53 Move specialized (pretty) url generation back into Item_Model so that
we're not relying on overriding url::site() to do tricks around item
urls.  This means that you won't get item urls by doing
url::site("albums/37"), for example, but it also means that we won't
get pretty urls where we don't expect them (like in the action of a
<form> element).

Incidentally, this will help us move over to using the slug format
because if you've got a bad character in a url, the edit forms will
now work on it since they'll be id based.
2009-09-08 13:44:52 -07:00