Commit graph

10568 commits

Author SHA1 Message Date
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
Sam
5c244c6f8f FIX: autocomplete username failing to pop up
Janky autocomplete behavior due to debounce not being accounted for
correctly when dealing with promises

This also fixes a promise leak
2014-09-01 01:48:17 +10:00
Jeff Atwood
9aac004c0a minor copy update, Omit Needless Words 2014-08-31 04:47:27 -07:00
Jeff Atwood
6221a84ce8 minor copy updates 2014-08-31 04:46:20 -07:00
Jeff Atwood
bdd3dd8a5b add 1GB memory change notes 2014-08-31 01:13:20 -07:00
Jeff Atwood
6d1be665a1 Merge pull request #2729 from cpradio/firefox-kbd-post-navigation
FIX: j/k navigation for posts using Firefox
2014-08-30 13:32:15 -07:00
Jeff Atwood
a0e47dae63 Merge pull request #2728 from techAPJ/patch-3
UX: add line break before time for post navigator
2014-08-30 13:26:28 -07:00
cpradio
37639308c0 FIX: Firefox j/k post navigation is inconsistent
https://meta.discourse.org/t/j-k-navigation-in-lengthy-topics/18945
2014-08-30 08:59:08 -04:00
cpradio
4aec030cb6 Merge branch 'master' of http://github.com/discourse/discourse 2014-08-30 08:20:57 -04:00
Arpit Jalan
82d4c29c88 TRIVIAL: add line break before time for post navigator 2014-08-30 16:14:00 +05:30
Jeff Atwood
fb33081c36 Merge pull request #2727 from techAPJ/patch-4
FIX: use short date format for topic summary
2014-08-29 23:41:16 -07:00
Arpit Jalan
289d9e4fe1 FIX: use short date format for topic summary 2014-08-30 12:07:43 +05:30
Jeff Atwood
7a50ba600a Merge pull request #2726 from techAPJ/patch-4
FIX: use short date format for post navigator
2014-08-29 23:11:31 -07:00
Arpit Jalan
3c005557e6 FIX: use short date format for post navigator 2014-08-30 11:34:33 +05:30
Jeff Atwood
70dbad16dc UX: simplify copy for summarize topic mode 2014-08-29 22:59:39 -07:00
Jeff Atwood
4281b16616 UX: dim the new and unread education 2014-08-29 22:54:11 -07:00
Jeff Atwood
d7e4a19f3a Merge pull request #2723 from cpradio/keyboard-binding-incoming-updated-topics
UX: Keyboard binding incoming/updated topics
2014-08-29 19:33:40 -07:00
cpradio
3853fb1367 Merge branch 'master' of http://github.com/discourse/discourse 2014-08-29 21:24:56 -04:00
cpradio
8b349b43a5 UX: Add keyboard binding for reply as new topic
Removed extra translation in the keyboard shortcut modal window
2014-08-29 20:10:34 -04:00
Jeff Atwood
111b35f613 UX: rename "Leader" to "Veteran" (more) 2014-08-29 17:09:54 -07:00
cpradio
2e200ffbf0 Merge remote-tracking branch 'origin/master' into keyboard-binding-incoming-updated-topics
Conflicts:
	config/locales/client.en.yml
2014-08-29 20:05:59 -04:00
cpradio
875b39fb5f Merge remote-tracking branch 'origin/master' into keyboard-binding-incoming-updated-topics 2014-08-29 19:56:39 -04:00
cpradio
d2dea54c88 Merge remote-tracking branch 'cpradio/keyboard-binding-incoming-updated-topics'
Conflicts:
	config/locales/client.en.yml
2014-08-29 19:53:54 -04:00
Jeff Atwood
cb45d5fa25 Merge pull request #2724 from cpradio/key-binding-reply-new-topic
UX: Add keyboard binding for reply as new topic
2014-08-29 16:46:34 -07:00
Jeff Atwood
d74f94afa1 Merge pull request #2722 from cpradio/dismiss-keyboard-bindings
UX: Add key-bindings for Dismiss New, Dismiss Posts, and Dismiss Topics
2014-08-29 16:28:25 -07:00
cpradio
68e807f791 UX: Add keyboard binding for reply as new topic 2014-08-29 19:14:42 -04:00
Sam
68a3fd5ef0 FIX: developer emails not working on ruby 2.0 2014-08-30 09:07:30 +10:00
Jeff Atwood
0eb367f9c3 UX: rename "Leader" to "Veteran" (first steps) 2014-08-29 15:57:13 -07:00
Jeff Atwood
324c0eb7e4 UX: improve default new user guidance 2014-08-29 15:47:53 -07:00
cpradio
bc07bc4819 Remove incoming/updated topics logic (not sure how that got in here, but it is causing a conflict) 2014-08-29 18:19:06 -04:00
cpradio
8a8552019a Fixed qunit test assertion 2014-08-29 18:03:27 -04:00
cpradio
80cb8f3a96 Fixed qunit test assertion 2014-08-29 17:54:50 -04:00
Neil Lalonde
1291e94c78 Merge pull request #2715 from cpradio/master
UX: Add focus to menu only if it comes from a keyboard shortcut and improve keyboard functionality for search
2014-08-29 17:04:52 -04:00
Neil Lalonde
095b645ff9 Merge pull request #2721 from gschlager/i18n_fix03
UX: Add missing German locale files
2014-08-29 16:45:55 -04:00
Jeff Atwood
586ce668f8 FEATURE: prevent 0 length setting in message len 2014-08-29 13:20:23 -07:00
Jeff Atwood
72293073f6 UX: better copy on mailing_list_mode pref 2014-08-29 13:07:36 -07:00
Robin Ward
6dcde9ccc3 FIX: Navigating to None was not working 2014-08-29 15:51:28 -04:00
Gerhard Schlager
d49a2bf075 UX: Add missing German locale files 2014-08-29 21:15:08 +02:00
Neil Lalonde
cd74829d55 FIX: Kunena import script no longer requires a csv file with Joomla user records. MySQL is used for all data. 2014-08-29 14:55:28 -04:00
Robin Ward
9062719480 Merge pull request #2720 from techAPJ/patch-3
FIX: do not redirect topic for JSON request
2014-08-29 13:59:45 -04:00
Robin Ward
926e45d030 SECURITY: User action route was returning too much data 2014-08-29 13:46:50 -04:00
Arpit Jalan
84d0b599a4 FIX: do not redirect topic for JSON request 2014-08-29 23:09:02 +05:30
Robin Ward
16c9f073b5 FIX: Back button breaks translation of incoming stuff 2014-08-29 12:53:06 -04:00
Neil Lalonde
ec42b61a4d FIX: suspended users cannot be trust level 3 2014-08-29 12:33:34 -04:00
Neil Lalonde
6b41c6b335 add permalinks route constraint 2014-08-29 11:28:16 -04:00
cpradio
8033972536 UX: Add keyboard bidning for incoming/updated topics
Fixed the selector used to gain access to the clickable div
2014-08-29 10:01:36 -04:00
cpradio
5ca96e741d UX: Add keyboard bidning for incoming/updated topics 2014-08-29 09:44:26 -04:00
cpradio
096bc0c0ae Merge branch 'keyboard-binding-new-topics-banner' into dismiss-keyboard-bindings
Conflicts:
	app/assets/javascripts/discourse/lib/keyboard_shortcuts.js
2014-08-29 09:36:34 -04:00
cpradio
cde64580b1 Change the Dismiss keybindings to use 'x' instead of 'd' - moved it to a function binding 2014-08-29 09:35:38 -04:00
cpradio
3f085c3fd3 Change the Dismiss keybindings to use 'x' instead of 'd' 2014-08-29 09:22:47 -04:00