Commit Graph

28793 Commits

Author SHA1 Message Date
David Taylor
d7b5a374c2 Fix indentation 2018-07-23 10:42:15 +01:00
David Taylor
5b4b632358 Correct typo 2018-07-18 22:27:55 +01:00
David Taylor
32db976156 FIX: Stop race condition when topic notification jobs are scheduled during a database transaction
This was not picked up by tests because scheduled jobs are run immediately
and in the current thread (and therefore the current database transaction).

This particular case sometimes occurs inside multiple nested transactions,
so simply moving the offending line outside of the transaction is not enough.

Implemented TransactionHelper, which allows us to use `TransactionHelper.after_commit`
to define code to be run after the current transaction has been committed.
2018-07-18 22:04:43 +01:00
David Taylor
2dc3a50dac FIX: Do not update last seen time for suspended users 2018-07-18 16:04:57 +01:00
Régis Hanol
f55ac892e4 make code prettier 🎀 2018-07-18 13:09:16 +02:00
Régis Hanol
6d6e026e3c FEATURE: selectable avatars 2018-07-18 12:57:43 +02:00
Sam
a24b9981c6 UX: adjust positioning of auto complete vertical
On iPad portrait autocomplete would render off screen
2018-07-18 16:41:31 +10:00
Guo Xiang Tan
487ef9773f Better logging when optimizing image fails. 2018-07-18 14:11:23 +08:00
Guo Xiang Tan
b068a8a771 Fix the build. 2018-07-18 14:03:27 +08:00
Guo Xiang Tan
be71f9ff82 REFACTOR: Don't load entire AR object just to get a column. 2018-07-18 13:53:57 +08:00
Arpit Jalan
7da22e395b FIX: do not show links with 0 click on topic map 2018-07-18 10:50:01 +05:30
OsamaSayegh
281538ae61 FIX: theme JS should only run when needed global objects exist (#6098) 2018-07-18 15:13:47 +10:00
Sam
0c159f17b7 skip failing spec 2018-07-18 14:43:06 +10:00
Sam
379384ae1e FIX: never block /srv/status which is used for health checks
This route is also very cheap so blocking it is not required

It is still rate limited and so on elsewhere
2018-07-18 12:37:01 +10:00
Guo Xiang Tan
3874d40910 Prepare to drop EmailLog#topic_id. 2018-07-18 10:22:24 +08:00
Neil Lalonde
dbfa491ee2 FIX: avatars in discourse_merger.rb 2018-07-17 21:40:24 -04:00
Sam
a66d812b92 pick a better icon for auto bump 2018-07-18 11:15:01 +10:00
Sam
5adf5b527d FEATURE: support filter_auto_bump_topics event
Use this event to filter the list of auto bumped topics.

EG:

  on(:filter_auto_bump_topics) do |_category, filters|
    filters.push(->(r) { r.where(<<~SQL)
        NOT EXISTS(
          SELECT 1 FROM topic_custom_fields
          WHERE topic_id = topics.id
          AND name = 'accepted_answer_post_id'
        )
      SQL
    })
  end
2018-07-18 10:56:09 +10:00
Sam
02628883d2 FEATURE: adjust autobump system
- We spread out bumping through the day, if you are bumping
 4 topics then a topic will be bumped every 6 hours

- We add a small, bumping action at the bottom of the post to
 denote a topic got bumped
2018-07-18 10:17:33 +10:00
Neil Lalonde
f146f94ef6 FIX: errors when copying post_uploads in discourse_merger.rb 2018-07-17 16:47:23 -04:00
Neil Lalonde
04077a7df6 WIP: a fast method of copying uploads in discourse_merger.rb. not working yet. 2018-07-17 16:46:32 -04:00
Robin Ward
bec53426c4 Remove pointless method 2018-07-17 12:34:20 -04:00
Philipp Rudloff
79b08b2679 Set result.target for update (matching _saveNew) (#6094)
* Set result.target for update (matching _saveNew)

* Add tests for update result including a target property
2018-07-17 11:56:32 -04:00
Guo Xiang Tan
202b839208 Fix the build. 2018-07-17 17:20:57 +08:00
Guo Xiang Tan
d839a42bf9 Skip imagemagick tests on Travis. 2018-07-17 17:11:05 +08:00
Guo Xiang Tan
3553375dd2 PERF: Store EmailLog#reply_key as uuid data type. 2018-07-17 17:05:42 +08:00
Arpit Jalan
22dad7f0e8 bump onebox version 2018-07-17 13:55:00 +05:30
Guo Xiang Tan
1d74ccaaf8 Add compatibility for ImageMagick7. 2018-07-17 15:50:58 +08:00
Arpit Jalan
a7ec949e02 make RuboCop happy 2018-07-17 13:15:44 +05:30
Arpit Jalan
7c7509e1bd FEATURE: update TwitterApi for prettifying like/retweet count 2018-07-17 12:59:40 +05:30
Sam
9f1e8d4f58 FIX: inaccurate tracking of current topic
Under some cases we would trigger the "you are replying on a different
topic" when in fact, your were not
2018-07-17 17:24:23 +10:00
Guo Xiang Tan
fe230f29cd Update annotations. 2018-07-17 13:11:45 +08:00
Evg
b6fba9ecc6 Add plug-in (in search results) (#6090)
* Add to plugin

Add the ability to use the plugin...

* Edit name
2018-07-17 14:44:39 +10:00
Guo Xiang Tan
a6e9f4f44b FIX: DROP NOT NULL instead of changing all the rows in the table.
```
change_column :topic_views, :ip_address, :inet, null: true
```

translates to

```
"ALTER TABLE \"topic_views\" ALTER COLUMN \"ip_address\" TYPE inet"
```

which locks the whole table while the migration is taking place.
2018-07-17 11:03:41 +08:00
Sam
818bc10107 FIX: count subcategories in breadcrumbs 2018-07-17 12:06:48 +10:00
Sam
292e8a3756 FIX: category list should set category on topic 2018-07-17 10:38:42 +10:00
Sam
91266cdabb correct auto bump topic logic 2018-07-17 09:33:33 +10:00
Sam
e7102c73fb correct test and move to async 2018-07-17 09:10:55 +10:00
David Taylor
f4c902b434 FIX: set default on theme.key, if it has not yet been dropped (#6095) 2018-07-17 08:40:35 +10:00
Kris
331296e851 Fix for JK highlighting, typo 2018-07-16 14:52:00 -04:00
Kris
35e8d489de Fixing JK highlighting for Edge 2018-07-16 14:51:05 -04:00
Neil Lalonde
2786c79354 another check to avoid unique index error in discourse_merger.rb 2018-07-16 13:34:41 -04:00
Kris
bd51cd52cd Hide edit category tabs with display: none; 2018-07-16 12:37:06 -04:00
Neil Lalonde
7b3ef4d13f FIX: use email color settings consistently in notification emails 2018-07-16 12:30:42 -04:00
Gerhard Schlager
d3e04daa95 Add Swahili language 2018-07-16 18:11:38 +02:00
Guo Xiang Tan
59e72b466a Add uniq_ip_or_user_id_topic_views index concurrently. 2018-07-16 23:45:38 +08:00
Guo Xiang Tan
c0c263405a
PERF: Store EmailLog#bounce_key as uuid data type. (#6093)
PERF: Store `EmailLog#bounce_key` as `uuid` data type.
2018-07-16 20:05:54 +08:00
Vinoth Kannan
f3868fd646 FIX: Create empty user_avatar row if not exist 2018-07-16 14:06:49 +05:30
Sam
ac0053f491 FEATURE: navigate to first post and auto bump category settings
### navigate_to_first_post_after_read setting for categories

When enabled on categories logged on users will return to OP after
reading the entire category. (useful for documentation categories)

### num_auto_bump_daily

Set a number of topics that will automatically bump daily on a category.

- Every 15 minutes we will check if any category has this setting
- Categories with the setting are shuffled
- We exclude pinned, closed, category description and archived topics
- Maximum of 1 topic for the list of categories is bumped till limit reached per category
- We always try to bump oldest first
- Limit is elastic using a RateLimiter that ensures that we only bump N per day

Also some minor organisation on category settings

Froze strings on category.rb
2018-07-16 18:10:35 +10:00
Sam
259d16a781 we already have another .invisible no need to have 2 2018-07-16 18:10:35 +10:00