Commit Graph

78 Commits

Author SHA1 Message Date
ckieffer
f1076590f1 Add page_title to admin views. Closes #1038. 2010-04-30 00:08:37 -06: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
Andy Staudacher
7099fc71f1 Fix for ticket 1004: Replace all uses of split with explode (none actually required regular expressions). Thanks to Brian Hartsock for providing a patch! 2010-02-06 13:05:44 -08:00
Tim Almdal
e98991b90f return a location method so the page reloads properly if the edit was successful. 2010-01-31 16:58:42 -08:00
Bharat Mediratta
cfbbf9ef60 Convert __toString() to use (string) cast instead. 2010-01-27 21:58:06 -08:00
Bharat Mediratta
5c49c041e7 Use "(string) $form" instead of "$form->__toString()" 2010-01-16 22:42:02 -08:00
Bharat Mediratta
057e8d09af Convert a bunch of leftover kohana::show_404 calls to throw
Kohana_404_Exception instead.  These are the ones where we used a
lower-case 'k' so my previous filter didn't catch it.
2009-12-23 20:51:33 -08:00
Bharat Mediratta
8b9a02084a Updates for the latest version of Kohana 2.4:
1) Controller::$input is gone -- use Input::instance() now
2) Handle new 'database.<default>.connection.params' parameter
3) Handle new 'cache.<default>.prefix' parameter
2009-12-21 21:27:43 -08:00
Bharat Mediratta
3d0a7a33ad Fix a few more database queries 2009-12-06 20:38:57 -08:00
Bharat Mediratta
2132c9a96d Fix some database calls. 2009-12-06 20:19:54 -08:00
Bharat Mediratta
1fd0e14359 Convert all DB where() calls to take 3 arguments.
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-26 12:09:04 -08:00
Bharat Mediratta
0121bfd585 ORM::orderby -> ORM::order_by 2009-11-25 19:26:52 -08:00
Bharat Mediratta
f50dbd992d Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/controllers/rest.php
2009-11-25 13:40:47 -08:00
Bharat Mediratta
2e420522ec Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Tim Almdal
454a96f48f Refactor the tags to remove the REST_Controller. Partial fix for ticket #917 2009-11-25 09:08:33 -08:00
Tim Almdal
57adefc5ba Revert "Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme."
This reverts commit 26114972c3.
2009-11-19 11:44:01 -08:00
Tim Almdal
26114972c3 Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme. 2009-11-18 15:36:13 -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
Bharat Mediratta
846f365db9 Normalize tags a bit.
- Create Tag_Model::url() to mimic Item_Model::url()
- Use the same pagination logic as we do for viewing items
2009-11-14 16:17:19 -08:00
Tim Almdal
beb63a8380 Clean up the In place edit api:
1) Only allow 1 in place edit to be active at a time (gets around the issue of using an id to identify the form
2) remove the add_ prefix from some of the api methods
3) clean up inconsistent naming
2009-11-06 23:05:20 -08:00
Tim Almdal
72a8ce696e Refactor out the in place editting and use the new gallery.in_place_edit widget to manage the tag renames. Part the fix for ticket #750. 2009-11-05 13:01:01 -08:00
Andy Staudacher
d050f0a246 Minor style fix: (string) $var, not (string)$var, and move the explicit cast down where it's needed. 2009-09-17 14:04:13 -07:00
Tim Almdal
2eeacd2656 use an implicit cast to convert the translated error message to a string as it is encoded by the json routines and will be treated as an object otherwise 2009-09-17 13:55:11 -07:00
Tim Almdal
48326ad017 Cleanup issues with the original fix for #779 2009-09-17 12:11:00 -07:00
Tim Almdal
5490057480 When editing tags in place, and there is a validation error, highlight the tag with a red border and show a statust message. This fixes ticket: #779 2009-09-16 12:27:13 -07:00
Andy Staudacher
f1887422f8 Stricter input handling (cast to int) 2009-09-15 23:07:41 -07:00
Andy Staudacher
7608870537 Controller auth / CSRF fixes 2009-09-15 22:51:49 -07:00
Andy Staudacher
e168e0dfae CSRF / auth fixes, golden data file checkpoint 2009-09-15 21:50:48 -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
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
Tim Almdal
975a5ded7b Clean up amd simplify the tag processing: Only allow comma separators between
phrases.  Using only 1 separator cleans up the javascript as well, as we
can use some of the jquery autocomplete to set the tag separator.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-28 09:16:57 +08:00
Tim Almdal
ecc9203c23 Standardize the specification of tags.
With this patch a comma(,) is the only valid tag separator.  Spaces
are allowed in tags and phrases no longer need to be specified with a
dot.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-28 06:28:31 +08:00
Tim Almdal
fa1d32e646 Partial implementation of ticket #80. Provide auto complete and suggestions on the tag add form in the tag sidebar block. Updated the xss golden file as well. Still to do figure out how toget it into the edit popup dialog 2009-07-24 11:24:43 -07:00
Tim Almdal
fa0c17ab5b Make tag handling consistent by converting spaces to periods and using commas or semi-colons as separators 2009-07-23 09:26:04 -07:00
Tim Almdal
7a9a4b9e8b Found another place that p:purify was required.
Generalize the dynamic.html so it doesn't require a tag element
2009-07-04 09:00:11 -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
79582ee5bf Fix up the titles in the default theme. They've been broken for a
while.  This fixes ticket #342.

The bug is that we were using $item instead of $theme->item().  But we
were also not special casing tags properly, and they are effectively
first class citizens (at least for now) so treat them properly.  Also,
set page_title by default in the theme so that we don't have to do an
empty() check on it (makes the theme easier to read) and move the
title out of Tags_Controller so that the theme has more control over
it.
2009-06-15 18:15:41 -07:00
Bharat Mediratta
dd854379c2 Sanitize all data we return via json_encode() to guard against XSS and
other data leaks.
2009-06-03 17:08:23 -07:00
Bharat Mediratta
91c7eb1200 Don't throw an error if there are no visible tags. 2009-06-01 23:00:10 -07: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
88a3d43ba9 Update all references to the core application to now point to the
gallery module.  This type of mass update is prone to some small bugs.
2009-05-27 16:17:29 -07:00
Tim Almdal
908618960b Since organize is now in the preview stage and will probably be
rewritten by beta2, pull all of its "tenticles" back into itself and
out of core or tags module.
2009-05-26 14:43:31 +00:00
Tim Almdal
ee0bd765b6 Implement a basic tag management interface with the organize drawer 2009-05-22 16:14:42 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
99c26f30c6 Allow users to enter multiple tags at once, split by space, semicolon
or comma.

Fixes ticket #193.
2009-05-13 01:43:47 +00:00
Jakob Hilden
b909132f54 tag changes in the tag admin should now work as expected 2009-03-25 04:47:25 +00:00
Tim Almdal
85f2c6b666 Move the setting of the page title into the controller that is
creating the page.  Provide for a default page title if none is
set. This allows less changes to page.html.php as different modules
want to change the page title.
2009-03-12 16:06:13 +00:00
Tim Almdal
b82b60c91a Rename tag.html.php to dynamic.html.php as part of ticket #115
creating Dynamic Albums.  This name change reflects the usage better
and allows multiple dynamic albums (including tags) to use the same
page template.
2009-03-12 15:40:08 +00:00
Tim Almdal
2b1f68a654 Continue the journey of replacing raw sql with ORM or Database method
calls (Ticket #68)
2009-02-27 00:19:12 +00:00
Andy Staudacher
e4a9b19bf9 Changing t() placeholder syntax from {{replace_me}} to %replace_me. 2009-01-15 10:02:41 +00:00