Commit graph

1570 commits

Author SHA1 Message Date
Régis Hanol
8f45091ba5 FIX: don't try to feature a topic more than once per category 2014-09-10 16:18:28 +02:00
Sam
ca2100d012 PERF: work around LIMIT breaking query plan
(CTE is a optimisation boundary, so limit no longer has any effect on plan)
2014-09-10 22:19:49 +10:00
Sam
91dcc56fb3 Revert "PERF: avoid OR in complex query"
This reverts commit a8dc6daa38.
2014-09-10 17:10:57 +10:00
Sam
a8dc6daa38 PERF: avoid OR in complex query
10x perf improvement on front page for sitepoint
2014-09-10 16:33:39 +10:00
Régis Hanol
598a3f3e10 FIX: 'disable_edit_notifications' will only disable revisions made by the system user 2014-09-09 18:56:04 +02:00
Régis Hanol
7f498a8795 FIX: N+1 query on /categories page 2014-09-09 15:32:58 +02:00
Robin Ward
56eda5abf9 FIX: Don't allow profile bios longer than 3k chars 2014-09-08 15:23:21 -04:00
Robin Ward
4f6b9815ae FEATURE: List moderator warnings on admin dashboard 2014-09-08 13:25:02 -04:00
Robin Ward
334e21a03a Revert "Revert "FEATURE: Can create warnings for users via PM""
This reverts commit 1c7559380c.
2014-09-08 11:11:56 -04:00
Robin Ward
1c7559380c Revert "FEATURE: Can create warnings for users via PM"
This reverts commit b0bfc1f93f.
2014-09-08 10:38:59 -04:00
Robin Ward
b0bfc1f93f FEATURE: Can create warnings for users via PM 2014-09-08 10:27:06 -04:00
Gerhard Schlager
970aafecb4 FIX: Some default group names could not be translated 2014-09-07 14:48:03 +02:00
Neil Lalonde
ca5f361d0a FEATURE: restrict admin access based on IP address 2014-09-05 12:06:01 -04:00
Sam
59d04c0695 Internal renaming of elder,leader,regular,basic to numbers
Changed internals so trust levels are referred to with

TrustLevel[1], TrustLevel[2] etc.

This gives us much better flexibility naming trust levels, these names
are meant to be controlled by various communities.
2014-09-05 15:20:52 +10:00
Jeff Atwood
fcca64c0cf rename site settings for trust levels as numbers 2014-09-04 13:16:51 -07:00
riking
54484ca18a "FIX": Add error reporting to NotifyMailingListSubscribers
Also skip unactivated users, which may actually fix this
2014-09-03 14:53:05 -07:00
Robin Ward
b04a52676e FIX: Don't show wrong flag choices after undo 2014-09-02 17:37:54 -04:00
Sam
22fbae8556 Merge pull request #2674 from akshaymohite/optimization-fixes
renamed unused variables properly
2014-09-02 08:22:43 +10:00
Sam
e0c8abc911 Merge pull request #2717 from riking/badge-solid
Admin badge interface improvements
2014-09-02 08:21:06 +10:00
riking
808460a28f Fix magic numbers, extra param references 2014-08-31 19:36:31 -07:00
Kamil Bielawski
bf679f1626 FIX: destroy CategoryGroup when Category or Group is destroyed 2014-08-31 22:10:38 +02:00
riking
1833b43ae2 FEATURE: Badge query validation, preview results, and EXPLAIN
Upon saving a badge or requesting a badge result preview,
BadgeGranter.contract_checks! will examine the provided badge SQL for
some contractual obligations - namely, the returned columns and use of
trigger parameters.

Saving the badge is wrapped in a transaction to make this easier, by
raising ActiveRecord::Rollback on a detected violation.

On the client, a modal view is added for the badge query sample run
results, named admin-badge-preview.
The preview action is moved up to the route.
The save action, on failure, triggers a 'saveError' action (also in the
route).

The preview action gains a new parameter, 'explain', which will give the
output of an EXPLAIN query for the badge sql, which can be used by forum
admins to estimate the cost of their badge queries.
The preview link is replaced by two links, one which omits (false) and
includes (true) the EXPLAIN query.

The Badge.save() method is amended to propogate errors.

Badge::Trigger gets some utility methods for use in the
BadgeGranter.contract_checks! method.

Additionally, extra checks outside of BadgeGranter.contract_checks! are
added in the preview() method, to cover cases of null granted_at
columns.

An uninitialized variable path is removed in the backfill() method.

TODO - it would be nice to be able to get the actual names of all
columns the provided query returns, so we could give more errors
2014-08-31 11:25:44 -07:00
Neil Lalonde
ec42b61a4d FIX: suspended users cannot be trust level 3 2014-08-29 12:33:34 -04:00
riking
3396e6fea3 Centralize MessageBus post updates
After this change, only two files directly publish to MessageBus with a
topic interpolated in the channel: Post and TopicUser.
2014-08-28 20:40:36 -07:00
Sam
8ab9c57ca5 Merge pull request #2707 from eyalev/rtl-email
Enable RTL direction in emails.
2014-08-29 09:54:57 +10:00
Sam
5b696ca25a Merge pull request #2708 from Wilhansen/sso_override_avatar
Fix SSO avatar downloading issues.
2014-08-29 09:53:48 +10:00
Neil Lalonde
14890a6002 FEATURE: add a way to map arbitrary urls to a topic, post, or category. Useful for sites that have migrated to Discourse and want to redirect from their old site to Discourse with 301 redirects. 2014-08-28 15:58:24 -04:00
Robin Ward
69cb5bc425 FIX: Centralize Top rendering, remove old code paths. Fix some bugs. 2014-08-28 14:34:31 -04:00
Robin Ward
0ae3c327de Add a message to the staff logs indicating why a user was purged 2014-08-27 16:05:07 -04:00
Neil Lalonde
99d26cef1a FIX: uncategorized counts were always 0. topics_year, topics_month, topics_week, topics_day 2014-08-27 15:58:32 -04:00
Wilhansen Li
bba3f7c0ac Fix SSO avatar downloading issues.
* Follow redirects when downloading SSO avatars.
* Add proper image ext. to downloaded SSO avatars.
2014-08-27 21:35:54 +08:00
Eyal Levin
e0c2f3df3a Enable RTL direction in emails. 2014-08-27 14:38:03 +03:00
Sam
87d2be3ecf FIX: ensure triggered badges are never triggered if filter is missing 2014-08-27 18:02:13 +10:00
Sam
898d86fd9b correct annotations 2014-08-27 15:30:17 +10:00
Sam
414c6d191f FIX: remove nullable dates post upgrade to Rails 4 2014-08-27 15:19:25 +10:00
Sam
1ccfb4fa20 FIX: crashing job 2014-08-26 16:22:13 +10:00
Robin Ward
ed125975a1 SECURITY: Prefix session key and validate token format. 2014-08-25 15:31:49 -04:00
Neil Lalonde
bbb358b356 Add likes given and likes received requirement for being TL3. Configure with site settings leader_requires_likes_given and leader_requires_likes_received. 2014-08-22 17:33:39 -04:00
Neil Lalonde
00c28f2391 Show total likes given. Put likes given/received and flags given/received together. 2014-08-22 15:23:19 -04:00
Neil Lalonde
dafc63e3a0 Show how many likes users received in the last 100 days on their admin profile page 2014-08-22 14:37:07 -04:00
Neil Lalonde
5454c1ed24 Updated model anotations 2014-08-22 13:01:44 -04:00
Sam
c865bf0d71 Merge pull request #2670 from Wilhansen/sso_override_avatar
Implement SSO overriding avatars.
2014-08-22 10:22:06 +10:00
Robin Ward
506dca6d4e FIX: Moving posts was not updating reply_count and
`reply_to_post_number` so reply linkage was broken.
2014-08-20 14:15:23 -04:00
Akshay
0862a65d4a renamed unused variables properly 2014-08-20 23:44:19 +05:30
Régis Hanol
054ae8bc13 TRIVIAL: do not remove backups in development 2014-08-20 18:58:58 +02:00
Robin Ward
c316894167 TWEAK: Don't include moderators on "About" if they are admins. 2014-08-20 12:43:02 -04:00
Neil Lalonde
96eecf18ef FIX: moving a post to a topic with a deleted post should use correct post_number. Was getting unique index violation on (topic_id, post_number). 2014-08-20 12:28:53 -04:00
Robin Ward
6ef85ea014 UX: Don't highlight the latest poster in the topic list if there is only
one avatar shown.
2014-08-20 12:09:39 -04:00
Robin Ward
3235f2c477 FIX: Don't try and delete inactive admins, rare as they may be. 2014-08-19 13:47:01 -04:00
Régis Hanol
f2b0228164 FIX: unhide post when a moderator undos the flag on which s/he took action 2014-08-19 16:14:17 +02:00
Akshay
3fd784b513 removed useless assignments at some places 2014-08-19 18:10:23 +05:30
Wilhansen Li
e0f970326f Implement SSO overriding avatars.
Implemented by having Discourse download the image from the provided URL
and treating it as a custom upload.

Adds two more parameters to the SSO site’s response:

* `avatar_url` specifies the URL of the overriding avatar.
* `avatar_force_update` Discourse does not re-download avatars that
has already been download from the same URL. Setting this to true forces
Discourse to re-download the avatar in `avatar_url`

Note that both parameters are ignored if `sso_overrides_avatar` is set
to false.
2014-08-19 15:53:34 +08:00
Akshay
9d11ccc42e removed usless access modifiers specified in models 2014-08-19 07:28:21 +05:30
Neil Lalonde
1445ad61da FIX: case-insensitive category lookup when creating topics 2014-08-18 11:07:49 -04:00
Régis Hanol
d7b1313d5e FEATURE: acting on a flag should not post an automated status message if you already replied to it 2014-08-18 17:00:14 +02:00
Régis Hanol
0d72b670f8 Merge pull request #2666 from akshaymohite/optimization-fixes
Fixed ActiveRecord validation for post_id in incoming_link.rb
2014-08-18 16:14:56 +02:00
Régis Hanol
e1191a5fcf Merge pull request #2511 from windhamg/s3_iam_role
support for EC2 IAM roles with Amazon S3 file store/backup
2014-08-18 16:14:14 +02:00
Akshay
fd6683697f Fixed ActiveRecord validation for post_id in incoming_link.rb 2014-08-18 19:11:34 +05:30
Régis Hanol
66aaa9329e FEATURE: vBulletin importer 2014-08-18 13:04:08 +02:00
Akshay
b4e38e5646 updated checks of environment with Rails.env by Rails.env methods 2014-08-18 15:36:47 +05:30
Sam
5193c9fd16 FIX: ensure consistency on topic featured users 2014-08-18 17:13:32 +10:00
Sam
f7d4cb6745 FIX: incorrect tooltip, most posts was only sometimes right 2014-08-18 17:13:32 +10:00
Sam
8737ffb272 Merge pull request #2658 from akshaymohite/optimization-fixes
Not initializing variable for looping if unused in loop
2014-08-18 14:42:52 +10:00
Sam
baaa3e0f9f FIX: #2664 it should be validates not validate
Thanks @chancancode
2014-08-18 14:40:54 +10:00
Sam
e18b030b8a SECURITY: stop potential symbol leak 2014-08-18 13:00:02 +10:00
Sam
9ba8b29e98 FIX: API should return post_action or nil, true is wrong 2014-08-18 12:03:46 +10:00
Arpit Jalan
8d7f4c1944 FEATURE: add additional fields in user list export 2014-08-16 00:39:28 +05:30
Akshay
6301a43d57 Not initializing variable for looping if unused in loop 2014-08-15 03:24:55 +05:30
Robin Ward
167f393a03 Merge pull request #2655 from techAPJ/patch-3
FEATURE: export user list
2014-08-14 17:19:49 -04:00
Arpit Jalan
b0f44dcdf3 clean up exports weekly 2014-08-15 02:03:30 +05:30
Arpit Jalan
d0736a06b6 FEATURE: export user list 2014-08-15 01:46:57 +05:30
Akshay
7ef61144e7 Avoid using to_s when performing String Interpolation 2014-08-14 23:55:27 +05:30
Robin Ward
ba15a6a9ea PERF: Only delete 100 inactive users at once 2014-08-13 17:56:40 -04:00
Régis Hanol
4c4ce05964 FIX & PERF: vanilla import
PERF: disabled refresh_avatar callback when importing users
PERF: avoid using UsernameSuggester when not needed
FIX: categories wasn't working
FIX: posts from deleted users are now from the system user
2014-08-13 22:20:06 +02:00
Robin Ward
22de2edae7 FIX: Allow a search for a parent slug when a child exists with the same
name.
2014-08-13 15:24:28 -04:00
Robin Ward
7ed969f0c7 Site Setting to customize how frequently inactive users are purged 2014-08-13 15:11:19 -04:00
Robin Ward
74d9293ca9 FIX: Allow duplicate slugs when the parent category is not the same 2014-08-13 14:45:25 -04:00
Robin Ward
3c6673aceb Purge inactive accounts that are older than 7 days 2014-08-13 14:13:41 -04:00
Robin Ward
9a1580244a FIX: Don't show profile pages for inactive users and don't show them in
search results.
2014-08-13 13:30:25 -04:00
Régis Hanol
a62968c846 FIX: actually compute top score for 'older' periods 2014-08-12 19:42:46 +02:00
Robin Ward
36f081bf43 FIX: Don't show the category edit button unless the user can edit the
category
2014-08-12 13:31:05 -04:00
Neil Lalonde
e40e9351f6 FIX: don't allow same category name with different case 2014-08-12 11:40:33 -04:00
Robin Ward
c8767dc505 UX: Tweak about page 2014-08-11 18:15:49 -04:00
Robin Ward
c103398e9a First stab at About page 2014-08-11 16:59:15 -04:00
Neil Lalonde
e564614b70 PERF: fix performance of Group.refresh_automatic_group! by removing a nasty IN clause. Thanks for helping, Donald Chea! 2014-08-11 13:34:01 -04:00
Régis Hanol
85570ddc77 TRIVIAL: fix grammar on 'deferred' columns 2014-08-11 11:56:54 +02:00
Régis Hanol
e64d3b8a42 FIX: disagree flag should unhide hidden post 2014-08-11 10:48:00 +02:00
Sam
eeff092ead PERF/FIX: Dismiss Post coming back
Now that post numbers are monotonically increasing we should not need this job
Stuff should just self correct as users browser along

Corrected the job not to reset the disimissed posts in case we need it
2014-08-11 10:26:46 +10:00
Sam
22cd259687 FIX: remove faulty "ensure consistency" badge job 2014-08-11 09:21:06 +10:00
Robin Ward
859167470e PERF: Limit the amount of badges fixed in the consistency check. 2014-08-08 15:13:43 -04:00
Sam
c1cbf1b269 PERF: new table used for title similarity search 2014-08-08 15:50:26 +10:00
Sam
16b7004767 PERF: optimise and improve topic similarity search
FIX: shows up similarity search with blank results
2014-08-08 12:12:53 +10:00
Sam
953d3f2151 PERF: add optional delta badge filtering
This is tricky and optional, some badges are very expensive to calculate

pass in :backfill , :post_ids and :user_ids to all badge queries so they
can do pre-filtering, if you do it after the sub-query it is too late
2014-08-08 10:02:43 +10:00
Sam
cd22b6158c PERF: stop mucking with user stats every 15 minutes
(pushed to twice daily)
2014-08-07 14:20:42 +10:00
Sam
b5045a005f PERF: last seen index on users 2014-08-07 13:33:11 +10:00
Sam
022109bc76 FIX: avoid exception in path that is very exception prone 2014-08-07 13:14:39 +10:00
Robin Ward
6783565d8f Revert "Enable RTL direction in emails." 2014-08-06 15:30:07 -04:00
Eyal Levin
f8c99a35d0 Enable RTL direction in emails. 2014-08-06 15:27:15 +03:00
Sam
0b01310c84 FIX: system badges where created under id 100 2014-08-06 10:51:39 +10:00
Sam
b573b3227e FIX: catch specific exception 2014-08-06 10:00:55 +10:00