Commit Graph

605 Commits

Author SHA1 Message Date
Azareal 372508bf98 fix poll results on ajax topic and eliminate unnecessary allocs for resources that aren't used 2020-03-13 12:56:23 +10:00
Azareal aa32bd335c try to avoid as many upfront gzip allocs to avoid wasting resources when they're not needed
avoid gzip for guests on routeAPI
2020-03-12 16:52:26 +10:00
Azareal 17c8f7604a rename avatar to img to save a few bytes in alerts 2020-03-12 13:29:19 +10:00
Azareal 61688a0c6d improve efficiency for small static files 2020-03-12 13:00:04 +10:00
Azareal 30b68945b4 guarantee more space for alerts 2020-03-12 11:08:56 +10:00
Azareal d43bffdec5 experiment with ajax load for topic
track route perf for BadRoute
2020-03-11 13:26:33 +10:00
Azareal aa303dc14d use empty string instead of 0 for pruned ips
eliminate a WriteRune call in BuildAlertSb
2020-03-09 17:11:58 +10:00
Azareal 28f210371e try to optimise routeAPI 2020-03-09 15:16:44 +10:00
Azareal b04d77d7b6 optimise topic lists by caching common qcounts for getList stmts
recalc forum topic counts
reduce thaw period to 3
cache top 8 forums instead of 5
optimise GetListByForum with zero topics
add Each method to ForumStore
2020-03-09 13:51:44 +10:00
Azareal 5007ddcb1e fix tests 2020-03-08 18:10:56 +10:00
Azareal f5c9a34fdd simple top forum topiclist caching
reduce thaw period to 4
fix the _ ua bug
try using a hard period for routeAPI to avoid unneccessary churn for a return string that is unlikely to change
2020-03-08 18:04:37 +10:00
Azareal 7d2be466b3 optimise ua tracking
reduce number of bytes used when we don't know the lang
add more spammy domain strings
2020-03-08 14:15:27 +10:00
Azareal f3bdfffbed avoid allocs for guest alert etags
use phrase file modtime instead of instance start time for routeAPIPhrases to avoid cache churn
2020-03-07 12:59:06 +10:00
Azareal 83a2659b1c this too x.x 2020-03-07 07:55:26 +10:00
Azareal 133c240350 experiment with range header in StaticFile
optimise StaticFile with StrLength
add things i forgot yesterday
2020-03-07 07:52:58 +10:00
Azareal 8f21d34964 experiment with bce in plist 2020-03-05 14:43:40 +10:00
Azareal c31ca03a0d use string builder in buildFlexiWhere
add string builder growth hints
track favicon perf
2020-03-05 09:56:45 +10:00
Azareal 28daeee702 use string builder for alert api 2020-03-04 14:31:11 +10:00
Azareal 24107aaef1 initial reduce pointer derefs and improve bce in templates 2020-03-03 23:02:46 +10:00
Azareal 2330b5bfeb optimise topic list orderby
filter out forums with no topics from search queries
update go version in go.mod
2020-03-03 14:25:18 +10:00
Azareal 7c3c8dcae0 unify single forums in topic lists and forum pages with GetListByForum
add GetListByForum method
remove forums with topic counts of zero from filter lists
avoid locking whenever possible in route view counter
2020-03-01 16:22:43 +10:00
Azareal b1c9e0d11c swap TopicCountInForums's implementation out for a saner one...
clean up repetition in route legends
2020-02-29 17:34:38 +10:00
Azareal ae8c27fc2d remove redundant topiccount query in topiclist slow path 2020-02-29 15:38:30 +10:00
Azareal 46732286e5 optimise route perf tracking
expand route perf tracking to more routes
2020-02-29 11:10:39 +10:00
Azareal 03862d1b09 experiment with more route perf tracking 2020-02-29 09:11:07 +10:00
Azareal c403b4a85a optimise os tracking
optimise memory tracking

add panel_stats_routes_perf_head phrase
2020-02-28 15:47:43 +10:00
Azareal ca8411a519 experimental route perf pane
add 1.14 to travis test list
more qutils tests

add panel_menu_stats_routes_perf phrase
2020-02-28 14:52:45 +10:00
Azareal 671134b1f3 try to fix the int max bug again 2020-02-28 11:56:06 +10:00
Azareal 4ea5e91f2d tweak the check 2020-02-28 11:41:16 +10:00
Azareal 8db923cb6e troubleshoot anomalous int max with stacktrace 2020-02-28 09:21:38 +10:00
Azareal af7b6ebbcb try to fix int max perf counter bug 2020-02-27 11:45:07 +10:00
Azareal ea1037bd63 track favicon stats
experiment with tracking average route performance
temporary error route stub
optimise dumprequest
add DisableAnalytics config setting
fix double hyphens in slugs being mistaken for sql injection
more querygen tests

You wil need to run the updater / patcher for this commit.
2020-02-26 20:34:38 +10:00
Azareal 04fdf4c318 optimise agent and system counters 2020-02-25 18:12:54 +10:00
Azareal 64335cf1ef optimise lang counter
optimise dumprequest
add more suspicious phrases
capture more router gen errors
2020-02-25 14:25:50 +10:00
Azareal fb942fd100 optimise route counter
allow for multiple keys in mysql AddKey
add SimpleBulkInsert method
add BulkInsert acc builder
add DateOlderThanQ AccSelectBuilder method
2020-02-24 21:15:17 +10:00
Azareal 9c185cd1fd add missing perf units 2020-02-24 18:28:43 +10:00
Azareal 459d745cb1 initial perf anaytics
add tasks to debug page
ignore .git on debug page for speed

add perfchunks table

Renamed phrases (changed statistics to stats):
panel_menu_stats
panel_menu_stats_posts
panel_menu_stats_topics
panel_menu_stats_forums
panel_menu_stats_routes
panel_menu_stats_agents
panel_menu_stats_systems
panel_menu_stats_languages
panel_menu_stats_referrers
panel_menu_stats_memory
panel_menu_stats_active_memory
panel_menu_stats_perf
panel_stats_views_head_suffix
panel_stats_user_agents_head
panel_stats_forums_head
panel_stats_languages_head
panel_stats_post_counts_head
panel_stats_referrers_head
panel_stats_routes_head
panel_stats_operating_systems_head
panel_stats_topic_counts_head
panel_stats_requests_head
panel_stats_memory_head
panel_stats_active_memory_head
panel_stats_spam_hide
panel_stats_spam_show
panel_stats_memory_type_total
panel_stats_memory_type_stack
panel_stats_memory_type_heap
panel_stats_time_range_one_year
panel_stats_time_range_three_months
panel_stats_time_range_one_month
panel_stats_time_range_one_week
panel_stats_time_range_two_days
panel_stats_time_range_one_day
panel_stats_time_range_twelve_hours
panel_stats_time_range_six_hours
panel_stats_post_counts_chart_aria
panel_stats_topic_counts_chart_aria
panel_stats_requests_chart_aria
panel_stats_memory_chart_aria
panel_stats_details_head
panel_stats_post_counts_table_aria
panel_stats_topic_counts_table_aria
panel_stats_route_views_table_aria
panel_stats_requests_table_aria
panel_stats_memory_table_aria
panel_stats_views_suffix
panel_stats_posts_suffix
panel_stats_topics_suffix
panel_stats_user_agents_no_user_agents
panel_stats_forums_no_forums
panel_stats_languages_no_languages
panel_stats_post_counts_no_post_counts
panel_stats_referrers_no_referrers
panel_stats_routes_no_routes
panel_stats_operating_systems_no_operating_systems
panel_stats_memory_no_memory

Added phrases:
panel_debug_tasks
panel_debug_tasks_half_second
panel_debug_tasks_second
panel_debug_tasks_fifteen_minute
panel_debug_tasks_hour
panel_debug_tasks_shutdown
panel_stats_perf_head
panel_stats_perf_low
panel_stats_perf_high
panel_stats_perf_avg

You will need to run the updater / patcher for this commit.
2020-02-23 19:08:47 +10:00
Azareal 24cef43439 fix search not working properly
fix missing title index properly
add search tests
roll back accidental duplicate indices

You will need to run the updater / patcher for this commit.
2020-02-21 21:42:21 +10:00
Azareal d723895f5d remove polls from poll cache on deletion
add test for poll castvote and delete
2020-02-20 21:28:49 +10:00
Azareal 887804ff54 fix attachcount not being updated properly when attachments are deleted
tests for attachcount changes

add fget method to attachmentstore
2020-02-20 14:32:49 +10:00
Azareal 1766d5decd more attachment tests
Add UpdateLinked method to AttachmentStore.
2020-02-19 20:32:26 +10:00
Azareal 1191076c5b stop storing poll vote ips when anti-cheat is off
remove the PollStore.CastVote method
2020-02-19 15:17:12 +10:00
Azareal 7fd67210d0 reduce poll ip cutoff to 90 days 2020-02-19 15:00:55 +10:00
Azareal da3a41b51a reduce poll ip cutoff to 180 days 2020-02-19 14:58:45 +10:00
Azareal 570569be77 avoid confusion by formatting nil errors differently in LogWarning 2020-02-19 09:21:16 +10:00
Azareal 363826624f Reduce bandwidth usage for client templates.
Add js and ptmpl (stub) template functions.
Simple constant folding for true / false values in templates.
Use empty string instead of 0 for poll vote ips when DisablePollIP is enabled.

Shorten some things.
2020-02-19 09:04:14 +10:00
Lars Lehtonen 548a8bb39f
common: fix shadowed error in SQLSearcher.Query() 2020-02-18 11:21:32 -08:00
Lars Lehtonen 080a8fd615
common: fix shadowed error in SendEmail() 2020-02-18 11:16:16 -08:00
Azareal cd7577c84c convo alerts
change convo_dev phrase
change account_menu_messages phrase
change alerts_no_linked_topic phrase
change alerts_no_linked_topic_by_reply phrase
add alerts.convo_create phrase
add alerts.convo_reply phrase
add alerts_no_linked_convo phrase
2020-02-13 20:44:03 +10:00
Azareal 01b7a18ea9 Show avatars for 1-1 conversations in the convo list.
Don't show your own name in conversation titles.
Don't record the same participant in a conversation twice.
2020-02-12 19:11:27 +10:00
Azareal ae2a4809ba carry over the recipient when creating a convo via profile
hide the convo reply form when we don't have permission to create a reply
2020-02-11 17:01:13 +10:00
Azareal 84cdc097e7 Add UseConvosOnlyWithMod group permission.
Add UseConvosOnlyWithMod phrase.
Add initial convo tests.
Bar access to ConvosCreate route if we don't have the needed perms.
2020-02-11 13:13:38 +10:00
Azareal 459a7f0205 fix convo creation lastReplyBy default value bug
DefaultConversationStore.GetUser now returns ErrNoRows when there aren't any results.
2020-02-10 20:28:33 +10:00
Azareal b6931fe16a Add registered time as a parameter for group promotions.
Run group promotions on group change.
Run group promotions on registration.
Load the CreatedAt field when users are loaded.
Set the default for last_ip properly.
Fix the default values in the group promotion form.
Add initial group promotion tests.

Add panel_group_promotion_registered_for phrase.
Add the registeredFor column to the users_groups_promotions table.

You will need to run the updater / patcher for this commit.
2020-02-09 20:00:08 +10:00
Azareal e37c98eaa1 cache default noavatar strings to avoid allocs 2020-02-07 22:27:33 +10:00
Azareal 158b1de7bc travis... 2020-02-05 13:02:07 +10:00
Azareal f858797835 code cleanup 2020-02-05 12:48:35 +10:00
Azareal 4ae2200760 simplify ws dashboard stat push code 2020-02-05 12:29:35 +10:00
Azareal 0c1d6f0516 Add CreateProfileReply and AutoEmbed group permissions.
Log profile reply deletions in the moderator log.
Split the global permissions in the UI to make them easier to manage.
Experiment with showing group ID in group edit header.
Avoid loading groups multiple times for the same profile reply.

Initialise disabled IP log points to empty string rather than 0.

Add CreateProfileReply perm phrase.
Add AutoEmbed perm phrase.
Add panel_group_mod_permissions phrase.
Add panel_logs_mod_action_profile_reply_delete phrase.
2020-02-04 21:47:03 +10:00
Azareal 2e8c6e6fb6 fix deleting like alerts when unliking a reply
immediately delete alerts via websockets when a topic or reply is unliked

Add AidsByParams method to ActivityStream.
2020-02-01 16:56:04 +10:00
Azareal b38df9773b fix group ids in cached replies 2020-02-01 15:55:33 +10:00
Azareal b5fa9c69f7 Let users unlike posts.
Hide like buttons on own posts for Tempra Simple and Shadow themes too.
fix like visual ui.
fix topic.Unlike err return.

Add topic.minus_one phrase.
2020-01-31 20:48:55 +10:00
Azareal 6935637867 Cascade delete attachments properly.
Cascade delete replied to topic events for replies properly.
Cascade delete likes on topic posts properly.
Cascade delete replies and their children properly.
Recalculate user stats properly when items are deleted.
Users can now unlike topic opening posts.
Add a recalculator to fix abnormalities across upgrades.
Try fixing a last_ip daily update bug.

Add Existable interface.
Add Delete method to LikeStore.
Add Each, Exists, Create, CountUser, CountMegaUser and CountBigUser methods to ReplyStore.
Add CountUser, CountMegaUser, CountBigUser methods to TopicStore.
Add Each method to UserStore.
Add Add, Delete and DeleteResource methods to SubscriptionStore.
Add Delete, DeleteByParams, DeleteByParamsExtra and AidsByParamsExtra methods to ActivityStream.
Add Exists method to ProfileReplyStore.

Add DropColumn, RenameColumn and ChangeColumn to the database adapters.

Shorten ipaddress column names to ip.
- topics table.
- replies table
- users_replies table.
- polls_votes table.
Add extra column to activity_stream table.
Fix an issue upgrading sites to MariaDB 10.3 from older versions of Gosora. Please report any other issues you find.

You need to run the updater / patcher for this commit.
2020-01-31 17:22:08 +10:00
Azareal da26a29597 Cascade deletes for attachments properly when deleting a topic or deleting all of a user's posts.
Eliminate some allocs for maxAgeYear in ShowAttachment.
Split DeleteAttachment out of deleteAttachment for reuse elsewhere.
2020-01-23 16:17:50 +10:00
Azareal 32bb2edfe4 Cascade poll deletions properly when deleting topics normally or via delete all posts. 2020-01-20 16:58:22 +10:00
Azareal a21454ba5d Cascade like deletions properly when deleting topics. 2020-01-18 18:12:00 +10:00
Azareal ec7b304c08 Cascade like deletions properly when using delete all posts. 2020-01-18 17:24:51 +10:00
Azareal 7ec2037f5f Delete likes on replies / topics properly when their parent is deleted. 2020-01-15 14:16:10 +10:00
Azareal 2625db3989 Update last replies on topics properly for delete all posts. 2020-01-14 20:38:05 +10:00
Azareal e4cfe610f6 Update last reply on topics properly upon reply delete. 2020-01-14 20:29:23 +10:00
Azareal 69a2430e5a Add option to delete all of a user's posts.
Add limited dynanicism to langf.
Eliminate a few queries when updating user stats.
Minor clean-up.

Namespace the profile language strings.
2020-01-14 15:07:00 +10:00
Azareal a569772e9c Add DisableRegLog configuration setting.
Unit tests for DisablePostIP. Awkward but does the job for now.
2020-01-04 15:30:25 +10:00
Azareal b39d90e4b6 Add DisablePostIP configuration setting. 2020-01-03 07:52:41 +10:00
Azareal aed409ae9e Add DisablePollIP configuration setting. 2020-01-02 19:49:34 +10:00
Azareal 0d81557009 Add DisableLastIP configuration setting.
Reduce default PollIPCutoff to 365.
2020-01-02 16:04:10 +10:00
Azareal e2f97d29cb Experiment with 720 days for default poll vote cutoff. 2020-01-02 15:48:05 +10:00
Azareal f789a8498e Add PollIPCutoff configuration setting.
Add tests for qgen processWhere and qgen mysql buildWhere.

Shorten some things.
2020-01-02 15:28:36 +10:00
Azareal 35ddc89009 Optimise the database layer.
Refactor database adapters.
Experimental last ip cutoff.

More parser test cases.
2020-01-01 07:57:54 +10:00
Azareal d22021b022 Reduce default PostIPCutoff from 180 to 120 days.
Reduce default LogPruneCutoff from 365 to 180 days.
2019-12-19 17:09:56 +10:00
Azareal 0dede6a329 NoEmbeds privacy and config settings.
Phase out url_prefix and url_name.
Eliminate some boilerplate and allocations while we're at it.
Reduce the number of conditional statements in url validator loops.
Better parsing of Site.URL to handle user error better.

You will have to run the patcher / updater for this commit.
2019-12-08 13:40:56 +10:00
Azareal 501c0dff0a Shorten things. 2019-12-07 16:27:01 +10:00
Azareal 06f0779525 Shorten some names and eliminate a few allocs. 2019-11-12 16:56:51 +10:00
Azareal 430df1e325 Add blocklist page.
Add account_blocked phrase.
Add account_menu_blocked phrase.
Add account_blocked_head phrase.
Add account_blocked_remove phrase.
Add account_blocked_no_users phrase.
2019-11-12 16:17:46 +10:00
Azareal ec95b922cf fix the search and filter widget 2019-11-11 17:04:11 +10:00
Azareal 1044518e74 Finish up the adminlogs.
Throw an error instead of updating a word filter that doesn't exist.
Track a bit of extra data for word filter updates.

Shorten the prefixes of the adminlog phrases from panel_logs_administration_ to panel_logs_admin_
Add a bunch of new adminlog phrases.
Tweak the word filter phrases.

Add the extra column to the moderation_logs and administration_logs tables.

You need to run the updater / patcher for this commit.
2019-11-10 12:37:53 +10:00
Azareal 2fb15556e1 More word filter tests.
Fix WordFilters.Get.
2019-11-09 08:07:05 +10:00
Azareal ffdc9e7705 Adminlogs: Custom pages, settings, word filters and backups.
WordFilters.Create now returns the ID.
Add the WordFilters.Get method.
Reduce the boilerplate in the backup page and page store.

Sanitise the names and titles in the Page Manager.

Add page_unknown phrase.
Add setting_unknown phrase.
Add panel_logs_administration_action_page_create phrase.
Add panel_logs_administration_action_page_delete phrase.
Add panel_logs_administration_action_page_edit phrase.
Add panel_logs_administration_action_setting_edit phrase.
Add panel_logs_administration_action_word_filter_create phrase.
Add panel_logs_administration_action_word_filter_delete phrase.
Add panel_logs_administration_action_word_filter_edit phrase.
Add panel_logs_administration_action_backup_download phrase.
2019-11-09 07:46:50 +10:00
Azareal 6e8c241d8b Fix undefined buttons on edit reply.
Move some logic from files.go into templates.go
Shorten some things in templates.go

Fixes #63
2019-11-07 13:53:29 +10:00
Azareal cc76d399e5 Simple spoilers. 2019-11-07 07:15:43 +10:00
Azareal 5441adb7fc Very incomplete adminlogs. Only user edit so far.
Inline error when there aren't any reglogs, modlogs or adminlogs.
Hide the email on a reglog, if the user didn't insert one.

Add panel_logs_registration_no_logs phrase.
Add panel_logs_moderation_no_logs phrase.
Add panel_logs_administration_action_user_edit phrase.
Add panel_logs_administration_action_unknown phrase.
Add panel_logs_administration_no_logs phrase.
2019-11-06 12:00:44 +10:00
Azareal 4179f472e5 Oops, add this struct too. 2019-11-05 09:49:37 +10:00
Azareal 142359ce11 Add SslSchema config setting.
Reject URL usernames on registration.

Reduce length of char variable name.
2019-11-04 21:55:52 +10:00
Azareal 6b745a056f Terminate this loop earlier. 2019-11-04 17:00:12 +10:00
Azareal bffb095b57 Add zipx, kgb, pea, xz and zz archive formats. 2019-11-01 09:34:50 +10:00
Azareal f227aadb6d Allow users to upload small archives.
Fix the ordering of functions in topic.Delete.
2019-11-01 09:17:26 +10:00
Azareal 1ad3e9c9da The forum list should be updated properly now when a topic is deleted. 2019-10-31 18:55:03 +10:00
Azareal e9cf06a5f2 More jpeg file extensions. 2019-10-30 18:16:19 +10:00
Azareal 8f98708087 This too.
Rename VerifyEmailSubject phrase to ActivateEmailSubject.
Rename VerifyEmailBody phrase to ActivateEmailBody.
Add ValidateEmailSubject phrase.
Add ValidateEmailBody phrase.
Tweak menu_forums_aria phrase.
2019-10-30 16:41:05 +10:00
Azareal 40aa215331 Fix group tags not propagating to replies. 2019-10-30 15:53:35 +10:00
Azareal 01d956f9d1 Encode tiffs too.
Update file extension lists.
Update mod floater.
2019-10-30 13:52:04 +10:00
Azareal 9e8b95b1be Add jfif as an image file extension.
Add jpeg as jpgs for post attachments.

Move some things.
2019-10-30 12:59:34 +10:00
Azareal d2be6b220e Support for optional emails.
Reduce boilerplate and allocations.
Fix the error shown on AccountEditEmailTokenSubmit when there aren't any emails rows.

Add register_account_email_optional phrase.
Add account_email_none phrase.
2019-10-30 08:13:45 +10:00
Azareal 033f4624c8 Experiment with the accumulator.
Less boilerplate.
2019-10-29 11:58:04 +10:00
Azareal eb49dde076 Experiment with eliminating allocations.
Encode png images as pngs rather than turning them into jpgs.
Shorten things to eliminate bytes and boilerplate.
Remove some old code.
2019-10-28 17:46:14 +10:00
Azareal 02cb64d3d9 Fix attachment parsing.
Shorten some things to reduce boilerplate.
Save some allocations.
2019-10-28 09:53:16 +10:00
Azareal 4d9dc76392 Begin work on making the analytics panes somewhat usable when having JavaScript disabled.
Very minor refactoring here and there across the software.
Save some allocations here and there.
2019-10-28 09:13:24 +10:00
Azareal 1189967f2b Add a missing instruction to the installation guide.
Add the /tmp/ folder, currently unused.

Shorten some things.
2019-10-27 09:11:09 +10:00
Azareal bbfd3c51c7 Stop blocked users making profile comments too.
Hide the Send Message option on profiles for blocked users.
Move the profile reply routes to their own file.
Remove a redundant user initialisation.

Shorten things.
2019-10-19 20:33:59 +10:00
Azareal 8720de83d8 Rudimentary user convo blocking.
Simplify some things.

Add create_block title phrase.
Add remove_block title phrase.
Add create_block_msg phrase.
Add remove_block_msg phrase.
Add profile_unblock phrase.

Add the users_blocks table.

You will need to run the updater / patcher for this commit.
2019-10-18 10:35:13 +10:00
Azareal fd1d54c394 Wrestling with tests while pushing random changes. 2019-10-13 20:50:15 +10:00
Azareal f8e0c5635c basic queries for friends and blocks
fix the tests again
2019-10-13 20:36:50 +10:00
Azareal 3cff453494 push a bit of progress while fixing the tests 2019-10-13 19:07:05 +10:00
Azareal 5404b6fdbe start laying down the skeletons for blocks and friends 2019-10-13 18:50:55 +10:00
Azareal 6147db18dd fix the url parser.
improve the url validator.
add a few more url parser test cases.
2019-10-13 17:32:05 +10:00
Azareal 38bbdfe0c2 Make parsed URLs look a little nicer. 2019-10-13 14:45:15 +10:00
Azareal df6e268a06 Speed up template compilation by not building the same parse trees multiple times.
Compile panel_debug.
Add the ability to print int8, int16, int32, uint, uint8, uint16, uint32 and uint64 in compiled templates.
Add the ability to pass string nodes to subtemplates in the template compiler.
Fix bunit in the template compiler.

Shorten some things.
2019-10-13 08:49:08 +10:00
Azareal 65b4fef40e WIP Add more language strings for panel debug.
Shorten more things.
Sneak draft tables in.

Add the profile_block phrase.
Add the panel_debug_memory_stats phrase.
Add the panel_debug_memory_stats_sys phrase.
Add the panel_debug_memory_stats_heapsys phrase.
Add the panel_debug_memory_stats_heapalloc phrase.
Add the panel_debug_memory_stats_heapidle phrase.
Add the panel_debug_memory_stats_heapobjects phrase.
Add the panel_debug_memory_stats_stackinuse phrase.
Add the panel_debug_caches phrase.
Add the panel_debug_caches_topic phrase.
Add the panel_debug_caches_user phrase.
Add the panel_debug_caches_reply phrase.
Add the panel_debug_caches_topic_list phrase.
Add the panel_debug_database phrase.
Add the panel_debug_database_topics phrase.
Add the panel_debug_database_users phrase.
Add the panel_debug_database_replies phrase.
Add the panel_debug_disk phrase.
2019-10-11 10:57:33 +10:00
Azareal dcd4d7d7eb The lang template function now accepts dynamic variables. 2019-10-11 10:36:45 +10:00
Azareal 3798838ece Update the group promotion UI.
Invert the direction of the query to make promotions a little less exacting.
Make sure admins can't set the from group as the to group in a group promotion.
Shorten a field name in the word filter manager.

Add panel_group_promotions_level_prefix phrase.
Add panel_group_promotions_posts_prefix phrase.
Add panel_group_promotions_delete_button phrase.
2019-10-07 08:54:09 +10:00
Azareal 2e28ae39f3 Add posts as a criteria for group promotions.
Load the posts column when loading users.
Make DefaultUserStore.Reload a wrapper around DefaultUserStore.BypassGet.
Use the OO style query builder more in common/user.go
GroupPromotions is now bound to an interface rather than the concrete type.
Fix some issues in the GroupPromotionStore interface.
Improve error handling for table creation and reduce boilerplate.
Shorten some more things.

Add panel_group_promotions_posts phrase.

You will need to run the patcher / updater for this commit.
2019-10-07 08:20:37 +10:00
Azareal a5f77c376b Users can now delete their own posts.
Merge GlobalPerms and LocalPerms phrase spaces into Perms.
Shorten more things and eliminate boilerplate.
2019-10-06 21:32:00 +10:00
Azareal 45a3065db1 Use json marshal for the group permissions in querygen.
Add an omitempty json tag to the Perms struct.
Take the opportunity to shorten some things.
2019-10-06 15:32:08 +10:00
Azareal 8d40139ae5 Tests are green now.
Recognise localhost equivalents in the parser.
Add rel=ugc to the bbcode parser too.
More shortening and boilerplate eliminating.
Fix a potential lock bug.
2019-10-06 11:49:31 +10:00
Azareal 11d1286b56 Save a few allocations in the parser.
Pave the way for rel=ugc support.
2019-10-06 10:55:03 +10:00
Azareal 5705252029 Add UseConvos permission.
Use UseConvos permission instead of ban flags in convo perm checks.
Stop users without the UseConvos permission from editing convo replies, although they can still delete them for privacy reasons.

Shorten some things and reduce the amount of boilerplate.
Add a few misc parser test cases.
Fix footer and tweak indentation.
2019-10-06 10:34:09 +10:00
Azareal ff48ec9d86 Shortening some things.
Fix the ordering of the lock in WsHubImpl.GuestCount.
2019-10-02 07:06:22 +10:00
Azareal 3ba977c75e Shorten things. 2019-09-29 15:10:05 +10:00
Azareal 78c5c62eee Basic group promotions.
Add the users_groups_promotions table.
Optimise ConvoViewPage.

Shortened some things.
Convo CSS fixes.
Make sure the user cache is flushed properly after the post stats change.

You will need to run the patcher / updater for this commit.
2019-09-29 14:56:39 +10:00
Azareal 4e166df3e2 x.x 2019-09-01 09:40:53 +10:00
Azareal 92a8706709 Fix the resources not being invalidated properly.
Tweak the convo list styling.
2019-09-01 09:39:39 +10:00
Azareal 218e177a29 Shorten more things. 2019-09-01 08:59:00 +10:00
Azareal f1bebb7326 Shorten the names of the IP fields.
Shorten some other things.
2019-09-01 08:34:43 +10:00
Azareal 31d65b91a6 Accelerate the convo list. 2019-09-01 08:17:37 +10:00
Azareal 523837910c Accelerate the convo list.
Shorten some things.
2019-09-01 08:07:34 +10:00
Azareal c309faf79f Use constant time comparisons for sessions in forms. 2019-08-30 20:59:50 +10:00
Azareal ddb917761f Show the names of the participants on the convo list instead of the placeholder text.
Shorten some things to save a bit of memory and to standardise things.
2019-08-28 16:47:54 +10:00
Azareal cae7e00b0c Show the users in a convo. 2019-08-21 11:31:13 +10:00
Azareal 0e9c459446 Adjust convo permissions.
Speed up convo_view.html
Make ContentLines in ConvoViewRow an int as it should be.
Shorten common. in the generated templates.
Fix the page titles for the convo panes.
Stop non-present users from editing their convo posts but still allow them to delete them, if they somehow have a way to do that.
Reduce the amount of boilerplate in the currently broken guilds plugin.
2019-08-21 08:32:10 +10:00
Azareal f8991e089a Basic conversations now work, although there is still testing and UI stuff to be done.
Simplify some header script / sheet bits.
2019-08-20 18:44:37 +10:00
Azareal 4d8c97812d More conversations work.
Add support for AS in columns for SimpleInnerJoin.
Add a referrer policy to improve privacy a little.
Shorten /static/ to /s/ since it comes up so much.
Remove some obsolete code.
Shorten some variable names.
Reduce the amount of boilerplate in the patcher.

Added the RefNoTrack and RefNoRef privacy config settings.

You may need to run the updater / patcher for this commit.
2019-08-14 20:39:04 +10:00
Azareal 377a5dc5ea Reduce boilerplate.
Prealloc in AnalyticsViews.
Remove some old debug code.
Normalise the URL ID error for CreateTopicSubmit.
Reduce the number of allocations for action posts.
Use aliases to shorten a few queries.
2019-07-29 09:19:46 +10:00
Azareal e9e527e76a Experimenting with request state in local errors.
Move the sheet and style declarations after the initial error on the profiles.
Use a global URL ID error message for the profiles.

Updates #51
2019-07-28 14:58:01 +10:00
Azareal a465850adb simplify the agents, forums, memory and referrer counters
move DirSize into it's own file
2019-07-28 14:01:33 +10:00
Azareal 01ccdb2087 simplify the requests, posts, topics, routes and systems counters 2019-07-28 13:46:19 +10:00
Azareal 6d805a13cf fix the instance crashing after deleting a topic due to a topic view counter error
simplify the topic view counter
2019-07-28 13:06:04 +10:00
Azareal a287ccc3d6 WIP Conversations templates.
WIP Conversations structs.
WIP Unbound conversations routes.
Shorten more variable names.
Eliminate a few characters here and there.
Track down widget tick errors more easily.

Add the convos_head title phrase.
Add the convo_head title phrase.
Add the unit phrase.
Add the account_menu_messages phrase.
Add the convos_head phrase.
Add the convo_head phrase.
Add the create_convo_head phrase.
Add the create_convo_button phrase.
Add the profile_send_message phrase.
Add the panel_dashboard_disk_unknown phrase.
2019-07-27 09:29:42 +10:00
Azareal 093a37e3c7 Check in even more conversations stuff. 2019-07-27 09:14:37 +10:00
Azareal 7c8bb39024 Check in some more conversations stuff. 2019-07-27 09:13:43 +10:00
Azareal 1c0a3dd5b6 Accept shorter session param names as these are so common.
Prealloc in DefaultPollStore.BulkGetMap
Shorten more variable names.
Remove a bit of inline CSS in topic_alt_quick_reply
2019-07-27 08:36:06 +10:00
Azareal fa629f4b5d fix reports
shorten some variable names
2019-07-27 08:26:52 +10:00
Azareal 22cb2701b2 Shorten a couple of attachment parameters.
Rename a mislabelled variable.
Prealloc in DefaultUserStore.BulkGetMap.
Prealloc in DefaultTopicStore.BulkGetMap.
Shorten the names of some temps.
Shorten a mssql querystring.
2019-07-25 17:00:49 +10:00
Azareal 91f12e26a4 Don't forget this bit.
Updates #59
2019-07-23 20:41:34 +10:00
Azareal ed68c6fc04 Add a simple letter favicon.
Disable Gzip for favicons, it doesn't make them smaller anyway.
Eliminate an allocation for static files.

Fixes #59
2019-07-23 20:34:44 +10:00
Azareal 101b1c51df Fix the empty route errors.
Updates #53
2019-07-12 07:27:08 +10:00
Azareal 13fa2326bd Avoid a few allocations for mentions.
Add six new parser test cases.
Stop treating lone double forward slashes as URLs.

Fixes #52
2019-07-11 20:44:18 +10:00
Azareal 1d13330a06 Move the emoji shortcode mappings into /config/emoji_default.json, custom emoji shortcodes can be defined in /config/emoji.json
Add the ldflags to the advanced installation steps.
2019-07-11 17:13:05 +10:00
Azareal 55382dfdb1 Just in case things blow up, shouldn't be necessary. 2019-06-23 16:25:03 +10:00
Azareal 947306a0af Fix a potential data race when reloading the permissions for a forum.
Log more things during start-up.
Save a few bytes here and there.

Add a couple of initial forum perms store tests.
Add an additional group.CanSee test.
2019-06-19 13:16:03 +10:00
Azareal 54abbe980f Add some test cases to avoid breaking CanSee with GroupStore.Reload again.
Shorten some variable names.
2019-06-18 20:02:45 +10:00
Azareal 97fb4af723 Fix a bug where reloaded groups lost their CanSee data.
Remove a couple of redundant queries in group reload.
Exit from group reload early if there's an error.
Remove a couple of redundant assignments in the forum list.
Shorten some variable names.
2019-06-18 14:13:47 +10:00
Azareal 89ca5ee823 langf now works in transpiled templates, albeit a little inefficiently.
Removed the quick_topic.add_poll_option phrase.
Added the quick_topic.add_poll_option_first phrase.
Changed the topic.reply_add_poll_option phrase.
Added the topic.reply_add_poll_option_first phrase.
2019-06-17 09:36:31 +10:00
Azareal 89c8f4e775 Use a client template for poll input.
Tweak the poll input phrase.
Increase the padding on .pollinput for Nox.
2019-06-16 17:26:31 +10:00
Azareal a5441f18de More conversations progress, still not usable yet.
Flush the debug page incrementally.
Eliminate a tiny bit of code in PreparseMessage.
Shorten some of the pointer capture variables in the poll store.
Tweak the advanced installation instructions for EasyJSON to make it more repeatable.

Added the ConvoKey config setting.
Added /.git/ disk usage to the debug page, if it exists.
Added a UserStore.BulkGetMap multi-user test.
2019-06-16 16:30:58 +10:00
Azareal 2b03a295a6 Don't blank the opening post when adding a poll. 2019-06-15 22:53:46 +10:00
Azareal ee3c29b136 Let admins change and revoke user avatars.
Linkify avatars in the user manager too.

Add the panel_user_avatar phrase.
2019-06-11 08:00:57 +10:00
Azareal 199a841bc3 Add the UploadAvatars permission.
Let users revoke their own avatars, work in progress.
Reduce boilerplate in debug.go

Add the UploadAvatars phrase.
Add the account_penalties phrase.
Add the account_menu_penalties phrase.
Add the account_avatar_revoke_button phrase.

More Vue and Conversations Work.
2019-06-09 13:21:48 +10:00
Azareal 9c19fc92ca Use a like store to abstract some things.
Provisional conversations.
2019-06-05 16:00:40 +10:00
Azareal 084f1bbeca Use strings.Builder in NameToSlug. 2019-06-05 15:10:42 +10:00
Azareal ac0dd6d2cb The login and registration logs are pruned after a year now.
Add filter exclusions for the user agents analytics pane.
Shorten some of the variable names in qgen.

Add ComplexDelete to the query adapter.
Add DateCutoff and DateOlderThan to accDeleteBuilder.
2019-06-05 14:57:10 +10:00
Azareal 05a8adb25e Add the log tables to the debug page. 2019-06-05 11:46:45 +10:00
Azareal fdd223d9cf Rewrite the pagination algorithm so it works properly.
Shorten a few bits of JS.
Get the topic store methods to call BypassGet instead of duplicating logic.
2019-06-04 15:48:12 +10:00
Azareal 5b5b8339d6 Add instance disk usage to the Control Panel Dashboard.
Split the dashboard grid into two.
Add more analytics tables to the debug page.
Add flushes to the Control Panel Dashboard.
Fix some templates not transpiling properly.
Reduce duplication in the debug route.
Fix the link styling in the Control Panel Dashboard for Tempra Simple.

Transpile the Control Panel Dashboard.

Added the panel_dashboard_disk phrase.
Added the panel_dashboard_disk_desc phrase.
2019-06-03 15:26:27 +10:00
Azareal 9caef90d72 Add more tables to the Debug Page.
Localise more parts of the Control Panel Dashboard.

Added 11 new phrases.
2019-06-03 10:35:25 +10:00
Azareal 05c2ac3ce4 Add the disk and database sections to the debug page.
Add the ActivityStream interface to abstract Get, Add and Count.
Rename the GlobalCount methods to Count for simplicity.
Simplify the variable names in the Count methods.
Rename the GlobalCount method to Count and rename the original Count method to CountUser in LoginLogStore.
Add a float64 case for bunit, sort of.
Theme.RunTmpl now returns ErrBadDefaultTemplate instead of panicking when an interpreted template doesn't exist.
Widget.Allowed now checks the zoneid.
Fire the alert off in the background in AddActivityAndNotifyTarget instead of blocking the request.
Use ErrBadDefaultTemplate instead of calling DefaultTemplates.Lookup directly for custom pages.
Split the page struct for the debug page into multiple structs to make things more organised.

Add the Count method to ProfileReplyStore.
Add the Count method to ReplyStore.
Add the DirSize utility function.

Add a few ActivityStream tests.

Secret gallery stuff.
2019-06-01 22:31:48 +10:00
Azareal 7c56b64c31 mysql x.x 2019-05-28 10:07:26 +10:00
Azareal 0d1e4e5993 Add super experimental support for per-forum templates.
Add the ExtraTmpls developer setting to config.json
Call ForumStore.BypassGet in ForumStore.Reload instead of duplicating it.
Fix a potential deadlock in ForumStore.Create.
Attempt to fix a weird installation bug.
Add a few more forum store test cases.

You will need to run the updater / patcher for this commit.
2019-05-27 19:00:40 +10:00
Azareal bc20c495c3 Support IPv6 hosts in the URL Parser.
Support m and gaming variants of YouTube in the Media Parser.
Reduce repetition in the URL utility functions slightly.

Added 30 new parser test cases.
2019-05-24 09:39:24 +10:00
Azareal 515e607587 Mention, hashlink and URL Parser Rewrite Part 1.
Added 71 new test cases for the parser.
2019-05-22 14:45:07 +10:00
Azareal c57f176939 Yet more spammy domain bits. 2019-05-19 13:21:09 +10:00
Azareal 213cfd04f4 Don't forget this x.x 2019-05-19 13:15:00 +10:00
Azareal 423c790f39 Add more spammy domain bits. 2019-05-19 13:14:02 +10:00
Azareal a56ed113dd You can now filter the active memory pane by type.
Add excludes for the analytics language pane too.
Try to avoid rid queries when we already have the rids.
Use GetListByCanSee instead of GetList for preloads to increase the chances of getting something useful.
Provisionally extend topic preloading to the first three topic list pages.

Add the panel_statistics_memory_type_total phrase.
Add the panel_statistics_memory_type_stack phrase.
Add the panel_statistics_memory_type_heap phrase.
2019-05-19 11:01:11 +10:00
Azareal 8a719bd13d Added several more ForumStore tests.
Refactor ForumStore.Get to use ForumStore.Get as a fallback rather than implementing the fallback itself.
ForumStore.BypassGet now handles deleted forums correctly.
Added ErrNoDeleteReports to make it easier to check for that error.
2019-05-18 22:17:50 +10:00
Azareal 857d476ff0 ForumStore.Create now rejects blank names.
ForumStore.Get should now respond appropriately when a forum has been deleted.
Removed a bit of boilerplate in the ForumStore tests.

Added forumstore tests for forum deletion and trying to create a forum with a blank name.
2019-05-18 20:31:51 +10:00
Azareal bf0adeb8c6 Move SpammyDomainBits into common.go
Fix the little UI issues from adding the adjacent select in the referrer pane.
Add a few more spammy domain bits.
2019-05-18 11:18:19 +10:00
Azareal b44f7bc157 Hide spammy referrers by default.
Added the panel_statistics_spam_hide phrase.
Added the panel_statistics_spam_show phrase.
2019-05-18 10:33:35 +10:00
Azareal 182a5640eb Add the cache capacities to the debug page. 2019-05-17 20:38:46 +10:00
Azareal b9973719a5 Added a small reply cache.
Preloaded a small number of users and topics.
Use cache.Set instead of cache.Add in a few spots for topics to avoid issues with the counter falling out of sync with the cache length.
Embed Reply in ReplyUser instead of duplicating the same fields.
Add the missing AttachCount and ActionType fields to Reply.
Add the missing Poll field to TopicsRow.
Added the TopicUser.Replies method to better abstract the reply list generation logic.
Shortened some common.s to c.s
Moved memStuff out of the analytics memory panes and into analytics.js
Removed the temporary preStats fix for label overflow now that we have a better solution.
Added the panel_analytics_script_memory template to help de-dupe logic in the analytics memory panes.
Added the Topic method to TopicsRow.
Added the GetRidsForTopic method to help cache replies in a small set of scenarios.

Added the ReplyCache config.json setting.
Added the ReplyCacheCapacity config.json setting.

Added a parser test case.
Added more Reply and ReplyStore related test cases.
2019-05-17 18:40:41 +10:00
Azareal 9cd3cbadab Expanded upon the control panel debug page and improved the UI a bit.
Trying to de-dupe the phrase strings to avoid allocating as much memory and creating as many pointers.
Shortened topic.status_closed_aria slightly.
Moved some things that should have been in various panel.css' into those panel.css'
Fixed the MemUsed dashboard item on Cosora.

Added the bunit template function.
2019-05-13 19:17:44 +10:00
Azareal 30722e1013 Stop wol rebuild from firing so frequently. 2019-05-13 15:13:27 +10:00
Azareal c2f2dd7f10 Reduce the amount of data sent for alert resumes in preparation for moving resumes to the WebSockets endpoint.
Remove a bit of superfluous information from the avatar alt attributes.
Improved upon the meta store tests.
Move float: right; out of the footer and into the Tempra Simple and Shadow stylesheets.
Added a missing level label to Shadow.
2019-05-12 09:07:24 +10:00
Azareal f10fdcb40c Added the active memory analytics pane. More to come here.
Added the meta store.

Added the panel_menu_statistics_active_memory phrase.
Added the panel_statistics_active_memory_head phrase.

Added the panel_analytics_time_range_month template.

Added Go 1.12 to the Travis list.

Added the stack and heap columns to the memchunks table.
Added the createdAt column to the activity_stream table.
Added the meta table.

You will need to run the patcher / updater for this commit.
2019-05-09 16:58:55 +10:00
Azareal e76223224a Implemented periodic post IP purging for replies.
Update for MySQL now supports DateCutoff and DateOlderThan.
Added the DateOlderThan method to accUpdateBuilder.

Added the PostIPCutoff config setting.
2019-05-08 19:50:10 +10:00
Azareal 09aa0558ab Reduce the amount of data sent in alert payloads. 2019-05-07 12:33:33 +10:00
Azareal 839df17de3 Experimenting with speeding up the installer.
Added support for foreign keys to the MySQL adapter.
activity_stream_matches now has a foreign key to help enforce referential integrity.
Added the AddForeignKey method to the database adapters.
Shortened a couple of API bits to ever slow slightly reduce the lengths of the strings.

Fixed a phrase group I missed for logged out users in init.js
Fixed a bug where deleting a topic would break the alert list when there is an alert event relating to it.

You will need to run the updater / patcher for this commit.
2019-05-06 14:04:00 +10:00
Azareal 634b03936c Stop showing guests on WOL Context x.x 2019-05-04 07:49:21 +10:00
Azareal a1161e20f3 The rest of the Control Panel (exc. the Group Editor) now uses dyntmpl.
Improved the noavatar cacheability by constraining them in a range.
Improved the noavatar cacheability by serving a small subset from Gosora.
Improved the formatting of bytes in the memory analytics pane.
Static resources with checksums will now have their caches expire in a week rather than a day.

Tweaked the padding on the sub_heads on Nox.
Moved a block of CSS out of a template and into panel.css in Tempra Simple and Shadow.

Added the panel_themes_menus_items_suffix phrase.

Added the DisableNoavatarRange config setting.
Added the DisableDefaultNoavatar config setting.
2019-05-03 18:34:18 +10:00
Azareal a8e1076f7c Do proper averaging and collect more samples for the memory analytics pane.
Added an ETag for the alerts endpoint when you're not logged to save bandwidth.
The Page Manager now uses dyntmpl.
The Setting Manager now uses dyntmpl.
The Word Filter Manager now uses dyntmpl.
Fixed the padding on the noavatar alerts for Nox.

Tweaked the panel_word_filters_to phrase.
Tweaked the panel_statistics_memory_head phrase.
Added the panel_statistics_memory_chart_aria phrase.
Added the panel_statistics_memory_table_aria phrase.
Added the panel_statistics_memory_no_memory phrase.
2019-05-02 09:14:07 +10:00
Azareal 5dc238f196 Added Mem to the dashboard and added a historic process memory use analytics pane.
Added the memchunks table.
Eliminated some unnecessary indentation in the analytics templates.

Added the panel_menu_statistics_memory phrase.
Added the panel_dashboard_memused phrase.
Added the panel_dashboard_memused_desc phrase.
Added the panel_statistics_memory_head phrase.

You will need to run the updater / patcher for this commit.
2019-05-01 16:59:51 +10:00
Azareal c8948a778c Oops, need to generate a cached copy of each theme's lists in Hyperdrive.
Renamed common.getTheme to common.GetThemeByReq.
2019-04-29 22:23:17 +10:00