Commit Graph

24 Commits

Author SHA1 Message Date
Jarek Radosz
694b5f108b
DEV: Fix various rubocop lints (#24749)
These (21 + 3 from previous PRs) are soon to be enabled in rubocop-discourse:

Capybara/VisibilityMatcher
Lint/DeprecatedOpenSSLConstant
Lint/DisjunctiveAssignmentInConstructor
Lint/EmptyConditionalBody
Lint/EmptyEnsure
Lint/LiteralInInterpolation
Lint/NonLocalExitFromIterator
Lint/ParenthesesAsGroupedExpression
Lint/RedundantCopDisableDirective
Lint/RedundantRequireStatement
Lint/RedundantSafeNavigation
Lint/RedundantStringCoercion
Lint/RedundantWithIndex
Lint/RedundantWithObject
Lint/SafeNavigationChain
Lint/SafeNavigationConsistency
Lint/SelfAssignment
Lint/UnreachableCode
Lint/UselessMethodDefinition
Lint/Void

Previous PRs:
Lint/ShadowedArgument
Lint/DuplicateMethods
Lint/BooleanSymbol
RSpec/SpecFilePathSuffix
2023-12-06 23:25:00 +01:00
David Taylor
436b3b392b
DEV: Apply syntax_tree formatting to script/* 2023-01-09 11:13:22 +00:00
Jay Pfaffman
7ab5dcf82f
FEATURE: my_bb import supports avatars (#17617) 2022-07-25 15:22:25 +02:00
Ruoxin Wang
f9aaed7020
FIX: MyBB importer exposes deleted posts (#13700)
The MyBB importer exposes posts marked as deleted in MyBB. This may lead to a privacy issue.
2021-07-22 09:55:02 +02:00
Sam Saffron
0c52537f10 DEV: update rubocop to version 0.77
We like to stay as close as possible to latest with rubocop cause the cops
get better.

This update required some code changes, specifically the default is to avoid
explicit returns where implicit is done

Also this renames a few rules
2019-12-10 11:48:39 +11:00
Penar Musaraj
067696df8f DEV: Apply Rubocop redundant return style 2019-11-14 15:10:51 -05:00
Sam Saffron
30990006a9 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
Arpit Jalan
f9ab3848ed FEATURE: support disabling emails for non-staff users 2018-06-07 18:31:08 +05:30
Guo Xiang Tan
5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Jay Pfaffman
1c9cab0908 mybb: disable outgoing mail 2017-06-30 16:28:14 -07:00
Jay Pfaffman
a7d89d2a8a mybb: add permalink support 2017-06-30 14:11:49 -07:00
Dan Dascalescu
9171125954 Handle usernames with consecutive spaces 2015-10-14 17:44:27 -07:00
Sam
22d0f2ef8a Merge pull request #3802 from dandv/patch-2
FIX: Correct processing of quote line in MyBB import
2015-10-14 13:02:45 +11:00
Arpit Jalan
38d8d46a4b fix mybb import script 2015-09-29 12:22:35 +05:30
Dan Dascalescu
7c2927f8ab Fix username conversion. Add comments. 2015-09-22 22:31:42 -07:00
Dan Dascalescu
a552170766 Correct processing of quote line in MyBB import 2015-09-22 05:26:57 -07:00
Kane York
821124f3fd FEATURE: Skip batches if all records exist
Update all import scripts to take advantage of all_records_exist?
2015-09-21 17:13:02 -07:00
Régis Hanol
dcc4267490 FIX: base script import to handle category color/text color 2015-05-19 12:40:35 +02:00
Dan Dascalescu
9cd59d382d Add support for MyBB table prefix 2015-03-14 22:31:08 -07:00
Gerhard Schlager
b5426763e4 FIX: Importers should allow categories with existing name if the parent category is different
This changes the content of `@categories_lookup` from `Category` objects
to IDs since the category names aren't needed anymore. The lookup
method has been renamed too.
2015-03-12 21:15:02 +01:00
Stefan Tatschner
3fdda8c2b7 Retrieve first_post_id manually
I had imported a phpbb forum to mybb previously. The importer script
messed up the firstpost ids. In this case most topics cannot be imported
to discourse as the script is not able to determine the topic post.

In case you are infected of this problem just uncomment this mysql
query. It will retrieve the first_post_id manually but it will slow down
the import.
2014-11-14 14:52:16 +01:00
Stefan Tatschner
2ffd3d29d7 Order posts by dateline
The post_ids in my mybb installation did not be in the right order. Post
with ID 2 was posted after post 5. I think it has something to do with a
previous import from phpbb to mybb.
2014-11-14 14:30:16 +01:00
Stefan Tatschner
54d450156f Remove mybb video tags
mybb embedds videos like this:

[video=provider]http://link-to-video.com[/video]

Let's remove these video tags as discourse does this automatically.
2014-11-14 14:26:13 +01:00
coren
d1806649d2 initial version, mostly inspired from phpbb script 2014-09-29 20:37:35 +02:00