Commit Graph
2269 Commits
Author SHA1 Message Date
Tim Almdal 85ed445e23 remove an extra ->reload() that was there for testing 2009-07-22 15:20:30 -07:00
Tim Almdal d4104a23ec Add explicit unit tests for access::user_can 2009-07-22 15:16:56 -07:00
Bharat Mediratta dbeadc1407 Use the Kohana cascading filesystem to locate resources loaded by the
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-22 14:27:57 -07:00
Bharat Mediratta 4854003f41 bump version to "3.0 git (pre-beta3)" 2009-07-22 13:03:01 -07:00
Romain LE DISEZ 06fd89e8bc Merge commit 'upstream/master' 2009-07-22 19:04:16 +02:00
Tim Almdal 4ddaaeb9dd Duh... when I added user_can, I passed in the user, but still used the groups from the session 2009-07-22 09:39:22 -07:00
Romain LE DISEZ 831bf63c23 Upgrade code to migrate the ACL from integer to boolean.
Related to 719c59e040
2009-07-22 15:40:49 +02:00
Romain LE DISEZ 317b7b98c0 Merge commit 'upstream/master' 2009-07-22 08:38:06 +02:00
Tim Almdal f533aee1cc Add an API method user_can that allows for checking a specific user has the
specified permission to the item.  Changed can to delegate to this method
passing in the active user.
2009-07-21 15:52:46 -07:00
Tim Almdal 9f410ec764 Always display the option menu so that modules with options that require
menu items with view permission have somewhere to hang these menu items
from.  If its empty it will get removed by $menu->compact()
2009-07-21 15:49:42 -07:00
Bharat Mediratta 0546f0df13 Fix the bug that the quick menu fires for the wrong photo. This stems
from using a single gQuickPane <div> that we move around.  A race
condition happens when you mouse over two thumbnails quickly.
Whichever server response loses the race gets displayed, and sometimes
it's the one that you're no longer hovering over.

Fix it by changing gQuickPane to be a class and creating a <div> per
thumbnail.

Fixes ticket #290.
2009-07-21 13:39:40 -07:00
Bharat Mediratta f83db99d39 Properly display thumbnails for private movies by backtracking from
the thumbnail to the movie and then showing it as a JPG.  Fixes ticket
#570.
2009-07-21 12:26:16 -07:00
Bharat Mediratta 8f1bca7459 Remove the fallback code. It should trigger extremely rarely and seems highly inefficient to me, so let's see if we can live without it. 2009-07-21 12:18:49 -07:00
Bharat Mediratta 90ba320655 The RSS link should go to the parent album when looking at photos/movies.
Fixes ticket #566.
2009-07-21 11:25:03 -07:00
Bharat Mediratta 2de6b77d61 Use php_uname() instead of PHP_OS for greater accuracy. Fixes ticket #563. 2009-07-21 11:20:36 -07:00
Romain LE DISEZ 00b3ca82de Merge commit 'upstream/master' 2009-07-20 18:46:41 +02:00
Bharat Mediratta 60d6058880 Make some API changes simplify the tag editing code. We now have a
good pattern for allowing modules to add their own hooks to item forms!

1) Album, photo and movie forms now all use edit_item as the group and
   we publish item_edit_form and item_edit_form_completed events which
   makes it much easier in the module to handle all events.  They can
   still differentiate based on $item->type if they want to.

2) Added tag::clear_all() and tag::compact() functions which takes the
   place of hiwilson's tag::update() function and is now used in
   tag_event::item_delete().  This provides a simple API that allows
   us to have a lot less event handling code.  It's less efficient
   than what hiwilson was doing before in that it will delete and
   re-add tags, but if that ever turns out to be a performance issue
   we can do something about it then.
2009-07-20 08:51:12 -07:00
hiwilsonandBharat Mediratta 709d6c5faf (1)Add tag edit field in album/photo edit form. (2)provide edit functionality. (3)support multi-word tagging. 2009-07-20 08:02:07 -07:00
Romain LE DISEZ d3fa2bed68 Merge commit 'upstream/master' 2009-07-20 10:49:47 +02:00
Bharat Mediratta 59e410bb79 Updated for movieplayer.html.php update 2009-07-21 07:25:34 -07:00
Shai Ben-NaphtaliandBharat Mediratta b99774ac49 Fixed grammer and set lowercase for the word project (minor change)
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-07-21 13:19:07 +08:00
Bharat Mediratta 67e83e66c6 Fix indentation 2009-07-20 22:12:39 -07:00
hiwilsonandBharat Mediratta 653badc2e1 set wmode='transparent' other than flowplayer.js
(cherry picked from commit 79a46658196a98a3972983cc422d1ee544b09d4a)
2009-07-20 22:11:22 -07:00
Bharat Mediratta 1a96ce145c Don't let the task status message exceed the size of the status column when there's an error. 2009-07-20 20:47:47 -07:00
Bharat Mediratta 3aea4dd118 Dump out the error message along with the stack trace when we catch an
exception from View::render()
2009-07-20 18:47:32 -07:00
Bharat Mediratta b3f91167c1 Remove excess success logging. In the rebuild images case, it can
make a huge log file.  In the l10n_client case, it's not really
necessary to know that level of detail and it makes for a weird API.
2009-07-19 13:55:22 -07:00
Bharat Mediratta c461881110 Don't post the item_updated() event if we're just updating the view count. 2009-07-19 13:20:08 -07:00
Romain LE DISEZ c9017ae2f2 Consistency : always use self::XXX 2009-07-19 01:11:13 +02:00
Romain LE DISEZ 719c59e040 Use BOOLEAN instead of integer to describe the permissions :
- DENY = false
 - ALLOW = true
 - UNKNOW = null  (for intent only)
 - INHERIT = null (for cache)

Upgrade is not included for now.
2009-07-19 00:49:47 +02:00
Romain LE DISEZ c78744d4f8 Merge commit 'upstream/master' 2009-07-18 17:51:23 +02:00
Bharat Mediratta df22832a5b Rename "locale" helper to "locales" to avoid conflicting with PHP 5.3.
Fixes ticket #194
2009-07-17 18:35:06 -07:00
Bharat Mediratta d692002bcf Don't show the combined CSS/JS elements if we didn't combine anything.
Fixes ticket #554.
2009-07-17 18:24:31 -07:00
Bharat Mediratta 6200955003 Don't bother making gzencoded version of combined CSS/JS if zlib.output_compression=On 2009-07-17 18:19:43 -07:00
Bharat Mediratta bb981bb7b6 Merge branch 'master' of git@github.com:/gallery/gallery3 2009-07-17 16:58:15 -07:00
Bharat Mediratta e7c6861507 Don't send back the gzipped version if we're using
zlib.output_compression in PHP, since that means that the stream is
already compressed.  Fixes ticket 555.
2009-07-17 16:58:00 -07:00
Bharat Mediratta cd907c2b42 Change model_cache::clear() API to clear everything. This prevents
old ORM relationships from hanging around, which was causing problems
when doing MPTT manipulations (resulting in incorrect permission
propagation-- very bad!)
2009-07-17 12:51:27 -07:00
Bharat Mediratta 8a6556b30b Fix a bug where moved items don't properly inherit permissions from
their new target.  After each move, recalculate the permissions for
the new parent's hierarchy.

Fixes ticket #552
2009-07-17 08:14:08 -07:00
Bharat Mediratta 0f766b149d Second non-trivial change to the event code. We now publish model
related events from within the model handling code.  The only
exception to this currently is item_created which is challenging
because we have to save the item using ORM_MPTT::add_to_parent()
before the object itself is fully set up.  When we get that down to
one call to save() we can publish that event from within the model
also.
2009-07-16 12:31:40 -07:00
Bharat Mediratta 43324fd12a Update golden file to match recent changes in event code. 2009-07-16 12:29:01 -07:00
Bharat Mediratta 5b3b675b6d Non-trivial changes to the event handling code:
1) The item_updated event no longer takes the old and new items.
   Instead we overload ORM to track the original data and make
   that available via the item.  This will allow us to move event
   publishing down into the API methods which in turn will give us
   more stability since we won't require each controller to remember
   to do it.

2) ORM class now tracks the original values.  It doesn't track
   the original relationships (no need for that, yet)

3) Added new events:
     item_deleted
     group_deleted
     user_deleted
2009-07-16 11:19:34 -07:00
Bharat Mediratta ec634c91a6 Stripped the trailing ?> without changing whitespace. 2009-07-16 10:45:06 -07:00
Bharat Mediratta 2cd0d6389c Revert "Remove trailing ?>."
This reverts commit a333e01bd1.
2009-07-16 10:44:23 -07:00
Bharat Mediratta a333e01bd1 Remove trailing ?>. 2009-07-16 10:32:18 -07:00
Bharat Mediratta d9f3e0bc0e Remove spurious blank line at the top of the file introduced in 09c9b1a755 2009-07-16 10:27:18 -07:00
Bharat Mediratta b46998e392 Update Xss_Security_Test to know about p::purify() and checkpoint the
golden file.
2009-07-16 10:24:10 -07:00
Romain LE DISEZ 7f5030ac20 Merge commit 'upstream/master' 2009-07-16 17:31:20 +02:00
Kevin NehlsandBharat Mediratta 85b0f58029 move fix for backslashes on windows outside of loop per bharat's suggestion
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-07-16 21:36:51 +08:00
Kevin NehlsandBharat Mediratta 5cb2f42628 Fix backslashes in relative URLs of combined css files.
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-07-16 21:36:50 +08:00
Bharat Mediratta c4fce2cc68 Remove a completed @todo. 2009-07-15 20:32:53 -07:00
Tim Almdal 2cba5d9395 Fix 542 by changing the wording from you to your, thanks Floridave
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-15 07:58:30 +08:00