Commit Graph

163 Commits

Author SHA1 Message Date
Bharat Mediratta
3e3098956c Convert the guest_url ORM validation failure back to the url form
parameter and put in a message requiring a valid url.  Fixes ticket
2010-09-16 14:19:28 -07:00
Bharat Mediratta
db75ac642a Use the title of the root album as the site title for all RSS feeds.
Fixes ticket #1307.
2010-09-04 13:40:39 -07:00
Bharat Mediratta
dc80cde379 Add "captcha_protect_form" event that the recaptcha module grabs and
uses to add a captcha to the end of the first group in the form.  If
there are no groups, it adds the captcha at the end of the form.
Updated user_profile and comment forms to use it.
2010-08-22 13:00:08 -07:00
Bharat Mediratta
74e821b03e Rename the feed variable from "children" to "comments" since that
makes more semantic sense.
2010-06-20 17:21:25 -07:00
Bharat Mediratta
7938a57dbe Oops. Remove debug line. 2010-06-20 10:57:48 -07:00
Bharat Mediratta
7500273228 Simplify the descendent logic. viewable() already joins with the
items table so there's no need for a subquery.  The subquery could
generate way too many ids since it didn't pay attention to
permissions.  This isn't a security problem since we were restricting
the item ids according to permissions in the outer query, but it's
wasteful.
2010-06-20 10:55:10 -07:00
Bharat Mediratta
a27189ce9f Remove comment_rest::post() -- that's in comments_rest now. 2010-06-16 20:02:52 -07:00
Bharat Mediratta
1aeaa7daab Add REST support for comments. You can view, add, edit and delete
comments.
2010-06-16 18:05:15 -07:00
Tim Almdal
8ee60e6b5d slap my wrist... i forgot a debugging statement 2010-06-16 11:17:18 -07:00
Tim Almdal
ea8653f947 Fix for ticket #1131. If the rss feed is for an item, then retrieve the item. Using the left and right pointers find all the comments for the child items. Thanks to jankoprowski for the initial investigation. 2010-06-16 08:39:09 -07:00
Bharat Mediratta
94ada2361d Fix a bug in the upgrader where we weren't bumping the version number
during the upgrade path, so the 2nd stanza (version 2 to version 3) was never getting executed.
2010-06-15 16:14:30 -07: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
Bharat Mediratta
ad0e7254eb Require a well-formed email address for all comments. 2010-05-14 16:19:53 -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
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
Bharat Mediratta
bbe70119ef Localize validation messages. 2010-01-27 23:05:57 -08:00
Bharat Mediratta
31e4c21719 Localize error messages. 2010-01-27 23:03:47 -08:00
Bharat Mediratta
1606961153 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/libraries/MY_ORM.php
2010-01-25 19:49:17 -08:00
Tim Almdal
7c06e21ec4 Refactor creating the user profile page content into the the event module. The show_user_profile is used to provide content to the user profile page. Add the list of the users comments to the profile page. 2010-01-24 15:27:33 -08:00
Bharat Mediratta
fecac4a859 Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
Conflicts:
	modules/gallery/tests/xss_data.txt
2010-01-23 16:29:10 -08:00
Tim Almdal
603c3049a1 Treat identity providers just like other modules and use the admin_module to
install and switch to a different identity provider.
2010-01-22 09:39:29 -08:00
Bharat Mediratta
1c85cf6397 Convert comment code over to model based validation. 2010-01-16 22:27:07 -08:00
Bharat Mediratta
31a545fa26 Add missing execute() call -- tests ftw! 2009-12-21 15:58:22 -08:00
Bharat Mediratta
a6dbd25cf1 Update database queries. 2009-12-06 21:38:09 -08:00
Bharat Mediratta
96b00d6cfe Convert some more Database::instance() calls to db::build() form. 2009-11-26 21:14: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
Tim Almdal
4c3b9e363a Refactor the comment module as part of ticket: #917 "Remove Rest Controller"
* Remove the methods create, update, delete, get_edit_form as there are not used
* Change the return when a comment is created to return the html for the new comment.
  This saves a second get request to down load the comment.
2009-11-25 08:12:50 -08:00
Tim Almdal
a5a8cfd1bc Re-generate the install.sql so that the keys of the block lists are an md5 hash of the module_name:block_id. Also change the packager so we delete the _cache variable for the module gallery not core. 2009-11-12 13:14:02 -08:00
Tim Almdal
26f8240e34 Revert "Try an new approach to extending forms. Create an extend_form event. For the first attempt replace the comment_add_form and item_add_form events."
This reverts commit 809e738536.
2009-11-09 11:52:43 -08:00
Tim Almdal
809e738536 Try an new approach to extending forms. Create an extend_form event. For the first attempt replace the comment_add_form and item_add_form events. 2009-11-01 13:14:11 -08:00
Tim Almdal
376eb5673f Convert the event handlers for the "identity provider changed" and "user_deleted" events to use ORM or the Kohana query builder to build the database update calls instead of coding the sql directly. 2009-11-01 10:22:56 -08:00
Tim Almdal
488b67014b Revert "Cleanup typo and change what is passwed into the event. pass the group that the recaptch element should be attached to instead of the whole form. This allows the recaptch event to have no knowledge of the containing form."
Revert "Generalize the adding of the recaptcha form by changing the name of the event to recaptch_add.  This prevents us from having to keep modifying the recaptch module anytime we add a form that requires recaptcha."

This reverts commits e45ea9359d and bfafef95e8.
2009-10-31 16:26:20 -07:00
Tim Almdal
903b5f6f67 Add identity_change handlers to resolve the ownership issues of comments, subscription, items and tasks. 2009-10-31 14:23:05 -07:00
Tim Almdal
90465012d1 Patch to clean up loose ends when a user is deleted.
* For items and tasks the owner id is set to admin
* For notification subscriptions, the subscription is deleted
* For comments, I've extracted the user name, email and url and set the guest_name, guest_email and guest_url columns while setting the author_id to identity::guest()->id
Fix for ticket #777.
2009-10-30 14:23:57 -07:00
Tim Almdal
e45ea9359d Cleanup typo and change what is passwed into the event. pass the group that the recaptch element should be attached to instead of the whole form. This allows the recaptch event to have no knowledge of the containing form. 2009-10-29 09:27:44 -07:00
Tim Almdal
bfafef95e8 Generalize the adding of the recaptcha form by changing the name of the event to recaptch_add. This prevents us from having to keep modifying the recaptch module anytime we add a form that requires recaptcha. 2009-10-29 09:21:07 -07:00
Tim Almdal
7ea13b3869 Normalize capitalization ticket #596 2009-10-28 12:15:52 -07:00
Tim Almdal
6fb116c53b Merge branch 'master' into talmdal_dev 2009-10-26 06:24:51 -07:00
Chad Kieffer
76aa4bd1ef Move comment and recaptcha CSS to their respective modules. 2009-10-25 23:32:49 -06:00
Tim Almdal
3c936d661a Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class 2009-10-22 13:11:03 -07:00
Tim Almdal
78ee4193b7 Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form. 2009-10-16 10:06:58 -07:00
Tim Almdal
00eacd659f Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module. 2009-10-16 08:53:31 -07:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Tim Almdal
60d35b8992 Use the block_manager to manage site sidebar panels. Fixes ticket #110.
* Extend block_manager to handle sidebar blocks. get_available has become get_available_admin_blocks, get_list becomes get_admin_list.
* Create new functions get_available_site_blocks which will look for gallery_block get_available_site_blocks.
* Refactor sidebar_blocks into a separate function and then call block_manager::get_html(site.sidebar). Convert image_block to use block management instead of theme::sidebar_blocks
* Change the block_manager api so that the theme is passed into the get method. convert info to the new sidebar block approach
* Convert the user module to use the new sidebar block structure. remove the installers for info and image_block modules.
* Convert tag and rss modules to the new sidebar framework. reset the version number to 1 for info and image_block modules.
* Change the get_html method to ignore empty blocks and change the individual handlers to return an empty string if no block is generated
* Add a warning message if no sidebar blocks are active and provide a link to the admin page that configures the sidebar.
2009-09-30 07:31:12 -07:00
Bharat Mediratta
aed7ce9161 Specify a page anchor for the comments block. 2009-09-13 14:25:17 -07:00
Bharat Mediratta
d5cd6a92e7 Rename $comment_model to $comments, this time without stomping on the
pre-existing variable.
2009-09-01 20:40:18 -07:00
Bharat Mediratta
eab5d71d06 Revert "Rename $comment_model to $comments."
This reverts commit d85a8b20bb.
2009-09-01 20:39:08 -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