39 Commits

Author SHA1 Message Date
Bharat Mediratta
9e0631ab0d Provide a "default moderate" option for comments. The default behavior
is unchanged, but you now have the option to set all new comments to
be unpublished and then moderate them through the Admin > Content >
Comments interface.

Fixes #2126.
2014-05-28 14:54:02 -04:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
5400c4be26 Oops, fix up a bug originally added in
7d66ab2e94 when I tweaked the name of
the rss_available variable to be rss_visible, but got it wrong.  Bump
the comment module to 6 so that we run the installer and clean up old
vars.

Fixes #1854.
2012-05-07 13:45:13 -07:00
Bharat Mediratta
7d66ab2e94 Improve comment RSS feed visibility, initially added by Thomas E. Horner in
fc942aacda.

Change some variable names, refactor out visibility checking code, actually
check visibility at generation time instead of just suppressing the UI,
update module.info

Fixes #1829.
2012-03-29 13:06:44 -07:00
Bharat Mediratta
60286bfba3 Merge commit 'fc942aa' 2012-03-29 06:37:00 -07:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Thomas E. Horner
fc942aacda availability of rss is now configurable 2011-07-08 09:33:51 +02:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
87fde3f360 Create a UI under Admin > Settings > Comments where you can limit
comments only to registered users.  It's simplistic, but is better
than adding a permission since generally this setting will be used
Gallery-wide.

Fixes ticket #1002
2010-06-05 23:35:32 -07:00
Bharat Mediratta
2157285d9b Rename admin/comments to admin/manage_comments to make room for
admin/comments to be a settings page.
2010-05-16 22:53:19 -07:00
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
Bharat Mediratta
c050acf30a Fix lots of warnings that pop up when we're in E_STRICT mode. They're
mostly issues around uninitialized variables, calling non-static
functions in a static context, calling Session functions directly
instead of on its singleton, passing non-variables by reference, and
subclasses not using the same interface as the parent class.
2010-01-31 16:07:41 -08:00
Tim Almdal
a11bf29507 Fix for ticket #972 and more. In Kohana 2.4, ORM::delete_all ignores any where
clauses and deletes all the entries in the table unless an array of id's are
passed as the parameter.  This fix used the Database_builder to specify any where
conditions. Thanks psvo for find the first one. :-)
2010-01-09 23:57:16 -08:00
Bharat Mediratta
d036e2fc49 Convert another Database::instance() query over to using db::build() 2009-11-26 13:18:10 -08:00
Bharat Mediratta
dd2bca0224 Modify the expiration code to work with db::build() 2009-11-26 12:54:07 -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
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
Andy Staudacher
b64729bfbe Fix ticket 890 (related to 879): Don't double-escape menu labels on the comment admin screen. 2009-11-15 19:46:12 -08:00
Bharat Mediratta
d12e3698e3 Call for_js() on all menu labels, since they're SafeStrings. Fixes ticket #879. 2009-11-13 09:29:00 -08: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
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
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
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
de812e1e82 Refactor to support pagination and simplify the code.
- Simplify the public controller methods
- Fix a bug where missing thumbnails would cause a divide by zero error
- actually pay attention to the page # for pagination and limit the query accordingly.
2009-05-11 20:15:24 +00:00
Tim Almdal
c04ff8e02f Change the pattern to identify tables that need prefix substitution to
mirror the drupal pattern of using braces {}.
2009-02-28 06:37:28 +00:00
Tim Almdal
bd15853708 This implements table prefix for all the queries in core, user, exif,
tag, search, comment and notification modules (Ticket #68)
2009-02-27 21:07:18 +00:00
Tim Almdal
89edd4d3ff Fix trac issue: #31 2009-02-02 15:36:43 +00:00
Bharat Mediratta
2920640c2b Fix validation when adding new comments.
Fire off the appropriate item_related_update events as appropriate.
2009-01-16 04:06:03 +00:00
Andy Staudacher
e4a9b19bf9 Changing t() placeholder syntax from {{replace_me}} to %replace_me. 2009-01-15 10:02:41 +00:00
Andy Staudacher
e53916dd06 Simplifying the way t() is called. Refactoring localization function t($message, $options=array()) into 2 separate functions:
- the new t($message, $options=array()) is for simple strings, optionally with placeholder interpolation.
- t2($singular, $plural, $count, $options=array()) is for plurals.
2009-01-15 09:30:15 +00:00
Bharat Mediratta
5bfde5ceb8 Rename 'xxx_changed' events to 'xxx_updated' 2009-01-15 02:53:13 +00:00
Bharat Mediratta
44bfc1c6a4 Auto-delete 7-day old spam/deleted comments. 2009-01-10 11:25:33 +00:00
Bharat Mediratta
74766e5b82 Create a 'recently deleted' queue 2009-01-10 11:11:24 +00:00
Bharat Mediratta
9d584a528b Update the queue counts in the menu list whenever we
approve/unapprove/spam a comment.
2009-01-10 07:55:16 +00:00
Andy Staudacher
a631fe29f3 i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax
- Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
2009-01-08 17:13:06 +00:00
Bharat Mediratta
8bf388a6f6 Incremental improvement in comment moderation:
1) Akismet now detects when we change a comment's published state and submits
   info back to akismet.com as appropriate

2) We now show 4 different queues (all / approved / unapproved / spam) and let you
   move messages between the queues

3) We track and display "spam caught" stats.

4) You can delete comments entirely.
2009-01-08 02:50:23 +00:00
Bharat Mediratta
01dcbbcda5 Add very basic comment listing which shows the different queues
(approved, unapproved, spam).
2009-01-07 09:08:53 +00:00