Commit Graph

22 Commits

Author SHA1 Message Date
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
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Bharat Mediratta
aacafaaf35 Add @todo. 2010-01-28 23:17:32 -08:00
Bharat Mediratta
20bd09ff00 A more thorough fix for #745 and #940. Stop using the referer to
guess how to send the user back.  Instead, proxy the originating item
id through the edit forms so that we can tell exactly what page we
were on when we began editing.  If we were viewing the item, then
redirect to its new url (in case it changed) to fix ticket #745.  But
if we were viewing some other item, then just stay on the current page
to fix #940.

The page_type approach didn't work because you'd have the same
"collection" page_type when doing a context menu edit for an album.
2009-12-31 17:21:19 -08:00
Bharat Mediratta
b4a35a8e2c Show the right edit form for movies. 2009-12-16 09:37:28 -08:00
Bharat Mediratta
1067e68292 Redesign the way that we consider page types to create buckets of page
types, and a subtype for specifics.  Currently the top level bucket

   collection, item, other

Here are the core subtypes so far:

   collection: album, search, tag
   item: movie, photo
   other: login, reset, comment-fragment, comment

It's legal to create new page_subtypes whenever you want.  Use the
appropriate page_type to get the coarse grain behavior that you want.
2009-11-17 14:04:45 -08:00
Tim Almdal
b35051ff6f Move the graphics::rotate to gallery_graphics::rotate to be consistent with the other gallery graphics functions. 2009-10-06 18:30:08 -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
Andy Staudacher
b9bd1681a3 Update all code to use helper method html::clean(), html::purify(), ... instead of SafeString directly. 2009-08-29 22:54:20 -07:00
Andy Staudacher
a5dfc81a8f Merge commit 'upstream/master'
Conflicts:

	modules/akismet/views/admin_akismet.html.php
	modules/comment/helpers/comment_rss.php
	modules/gallery/helpers/gallery_rss.php
	modules/gallery/libraries/I18n.php
	modules/gallery/views/permissions_browse.html.php
	modules/gallery/views/simple_uploader.html.php
	modules/info/views/info_block.html.php
	modules/organize/controllers/organize.php
	modules/organize/views/organize.html.php
	modules/organize/views/organize_album.html.php
	themes/default/views/album.html.php
	themes/default/views/movie.html.php
	themes/default/views/photo.html.php
2009-08-29 14:17:48 -07:00
Andy Staudacher
c01ac42c46 Refactor all calls of p::clean() to SafeString::of() and p::purify() to SafeString::purify().
Removing any p::clean() calls for arguments to t() and t2() since their args are wrapped in a SafeString anyway.
2009-08-29 12:48:40 -07:00
Bharat Mediratta
52147cf6f8 Combine the quick menu and the thumb menu into a single menu called
the "context" menu.

This new context menu is generated using the typical event processing
system, like our other menus.  The specialized quick CSS and JS is now
gone, replaced by our generic menu handling code.  It's all rolled
together currently using the thumb_menu UI for easy packaging.  All
the CSS and JS is updated.

NOTE: the non-dialog links (rotate, album_cover) have a broken UI
because they return JSON which the quick.js code handled specially,
but we don't handle properly now.  I need to fix this.
2009-08-03 21:45:54 -07:00
Bharat Mediratta
e2967aa1c1 Fix a problem in delete() where we were referencing $parent without
saving its value before $item got deleted.  Further fix for #528.
2009-07-11 07:45:41 -07:00
Tim Almdal
54ffea2419 Split the clean method into two clean and purify. clean is a light weight
approach using html::specialchars and purify uses HTMLPurifier to intelligently
cleanse the output fields. Use purifier for text and title fields where it is
likely that a user would enter html to format their data.
2009-07-03 21:44:10 -07:00
Bharat Mediratta
8f9a943f55 Fix a bunch of XSS vulnerabilities turned up by manual inspection
using the checklist in ticket #385.
2009-07-01 17:57:39 -07:00
Bharat Mediratta
e44053f692 Cache the page_type in pane() instead of looking it up twice. 2009-06-23 21:42:25 -07:00
Tim Almdal
fa4bb5b7ac Change the quick pan from static to dynamic. This allows modules to add buttons to the
quick pane.  The quick pane is now divided into 4 sections: left, center, right and
additional.  Additional items appear in the drop down box.  Buttons are not sorted
within the groupings.

In addition, the quick pane will overflow onto the "additional" dropdown if there is not
enough room to display all the buttons.

The use case is the digibug printing module needed to add a button to the quick pane, and
I don't like putting code into core that says if module is active... That's another one
of those code smells :-)

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-22 21:08:35 +08:00
Bharat Mediratta
aaa215a285 Get rid of the word "items" in the delete confirmation dialog. 2009-06-14 10:41:34 -07:00
Chad Kieffer
390bc7c1f6 Switch quick delete from JS confirm to jQuery UI dialog, closes ticket #355. 2009-06-14 10:42:14 -06:00
Chad Kieffer
d2b8ca241d Show status message when album cover is set (#257) 2009-06-09 00:25:49 -06:00
Bharat Mediratta
43abcd9386 Security pass over all controller code. Mostly adding CSRF checking
and verifying user permissions, but there are several above-the-bar
changes:

1) Server add is now only available to admins.  This is a hard
   requirement because we have to limit server access (eg:
   server_add::children) to a user subset and the current permission
   model doesn't include that.  Easiest fix is to restrict to admins.
   Got rid of the server_add permission.

2) We now know check permissions at every level, which means in
   controllers AND in helpers.  This "belt and suspenders" approach will
   give us defense in depth in case we overlook it in one area.

3) We now do CSRF checking in every controller method that changes the
   code, in addition to the Forge auto-check.  Again, defense in depth
   and it makes scanning the code for security much simpler.

4) Moved Simple_Uploader_Controller::convert_filename_to_title to
   item:convert_filename_to_title

5) Fixed a bug in sending notification emails.

6) Fixed the Organize code to verify that you only have access to your
   own tasks.  In general, added permission checks to organize which had
   pretty much no validation code.

I did my best to verify every feature that I touched.
2009-06-01 22:40:22 -07:00
Bharat Mediratta
28b41056e3 Restructure things so that the application is now just another module.
Kohana makes this type of transition fairly straightforward in that
all controllers/helpers/etc are still located in the cascading
filesystem without any extra effort, except that I've temporarily
added a hack to force modules/gallery into the module path.

Rename what's left of "core" to be "application" so that it conforms
more closely to the Kohana standard (basically, just
application/config/config.php which is the minimal thing that you need
in the application directory)

There's still considerable work left to be done here.
2009-05-27 15:07:27 -07:00