Commit Graph

139 Commits

Author SHA1 Message Date
Azareal 74e09efb63 Fixed a bug where it would use the wrong templates for Tempra Simple, Tempra Cursive, and Shadow
Likes are now done over AJAX.
Posts you have liked are now visually differentiated from those which you have not.
Added support for OR to the where parser.
|| and && now get translated to OR and AND in the where parser.
Added support for ( and ) in the where parser.
Added an adapter and builder method for getting the database version.
Multiple wheres can now be chained with the micro and accumulator builders.
Added the In method to the accumulator select builder.
Added the GetConn method to the builder.
/uploads/ files should now get cached properly.
Added more tooltips for topic titles and usernames.

Fixed a bug in the runners where old stale templates would be served.
Fixed a bug where liking topics didn't work.
Began moving the database initialisation logic out of {adapter}.go and into querygen.
Tweaked the alert direction to show the newest alerts rather than the oldest.
Tweaked the WS JS to have it handle messages more efficiently.
Partially fixed an issue where inline edited posts would lack newlines until the page is refreshed.
Used arrow functions in a few places in global.js to save a few characters.

Schema:
Added the liked, oldestItemLikedCreatedAt and lastLiked columns to the users table.
Added the createdAt column to the likes table.

MySQL Update Queries:
ALTER TABLE `users` ADD COLUMN `liked` INT NOT NULL DEFAULT '0' AFTER `topics`;
ALTER TABLE `users` ADD COLUMN `oldestItemLikedCreatedAt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `liked`;
ALTER TABLE `users` ADD COLUMN `lastLiked` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `oldestItemLikedCreatedAt`;
ALTER TABLE `likes` ADD COLUMN `createdAt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `sentBy`;
delete from `likes`;
delete from `activity_stream` where `event` = 'like';
delete from `activity_stream_matches` where `asid` not in(select `asid` from `activity_stream`);
update `topics` set `likeCount` = 0;
update `replies` set `likeCount` = 0;
2018-03-31 06:25:27 +01:00
Azareal 2b86a17478 Added more phrases for the notices.
Theme resources can now be restricted to logged in users to avoid wasting bandwidth.
The template building step is now a flag to gosora.exe / Gosora.

Added build_templates.bat for test and development purposes.
Added some extra error checks to the batch files.
Fixed a compile error in the installer.
Fixed a big data race in the template transpiler and cleaned up a few loose ends.
Renamed CTemplateSet.log() to CTemplateSet.detail() to bring it in line with the /common/ logging
Renamed CTemplateSet.logf() to CTemplateSet.detailf() to bring it in line with the /common/ logging
You can now override templates in /templates/ without overwriting them by adding a modified version of a template with the same name in /templates/overrides/
Added Go Git as a dependency.
Removed config.go from the repository, you need to rely on the installer to generate this now, or make one yourself based on the implementation of it in the installer.
Travis now does tests for Go 1.10

Began work on the upgrader.
2018-03-21 05:56:33 +00:00
Azareal b20e295375 Changed the defaultest default theme to Cosora... For now.
You need the ViewIPs permission to view IPs on logs now.
Added the leftOfNav and rightOfNav docks, more on this soon.
Added a max length for topic titles.
Added a max length for usernames.
Added none as a possible language for the language view counter.
We began adding the notice phrases.
Fixed a misnamed phrase which was spitting out placeholder text.
Localised unknown for the human language phrases.
Moved routeForums to routes.ForumList.
Moved routeRobotsTxt to routes.RobotsTxt.
Started tracking the views for routes.RobotsTxt.
Moved routeSitemapXml to routes.SitemapXml.
Started tracking the views for routes.SitemapXml.
Changed the fallback theme to Cosora.
Fixed changing the default theme to Cosora or Tempra Conflux.
Removed some redundant type definitions in template init.
Return ErrNoTitle instead of ErrNoBody when trying to create a topic with no title.
Moved some in-progress routes and helper functions for handling search engine crawlers to routes/api.go
2018-03-17 08:16:43 +00:00
Azareal 84dbe71bfc Use arrays for holding fragments rather than using a large number of micro variables.
Fixed a typo in a phrase.
Fixed a typo in a phrase name in Cosora.
Super mods can no longer see the group creation form or click on the groups in the Group Manager (which took them to a no permissions error).
Tweaked some of the uglier generated variables.
2018-03-12 04:52:47 +00:00
Azareal 3821e626ce Added support for phrases in CSS files.
Add support for phrases in template files.
Revamped every template to make them use phrases.
Revamped every CSS file to make them use phrases.

Tweaked the contributing document.
We now use LogError instead of log.Fatal() in a few places to capture more stack traces.
Fixed the suffixes on the topic and post count pages, as they were saying views instead of posts / topics.
Split the paginator into it's own template.
Refactored the theme logic to defer loading the static files to a later stage.
Greatly improved the accessibility with a number of ARIA attributes in places where there were none.
Removed the edit-topic and page templates.
Renamed the panel-adminlogs template to panel_adminlogs.
Non-existent phrases used by transpiled templates should now be logged.
Fixed a bug where alertbox was plopped down multiple times on one page.
The phrase placeholders are more informative now.
Added the CurrentLanguagePackName and GetLanguagePackByName API functions.
Notices are now shown when you delete, update, or create a forum.
2018-03-11 09:33:49 +00:00
Azareal 5a8b994877 Added support for phrases in templates.
The language of the end-user is now tracked and presented in the Analytics Manager.
Profile owners now get alerts when someone posts on their profiles.

The login page is now transpiled, estimated to be sixty times faster.
The registration page is now transpiled, estimated to be sixty times faster.
The IP Search page is now transpiled, estimated to be sixty times faster.
The error pages are now transpiled, estimated to be sixty times faster.
The login page now uses phrases.
The registration page now uses phrases.
IP Search now uses phrases.
Renamed the ip-search template to ip_search.
Alerts are now held in an alertbox container div.
Added ids for the main container divs for the account manager sections.
Added an id to the main container for the topic list template.
Added an id to the main container for the forum list template.
Added an id to the main container for the forum template.
Added an avatar box CSS class for the avatar box in the account manager's avatar page.
Did a bit of renaming for a future refactor in the routes counter.
Did a bit of renaming for a future refactor in the operating system counter.
A notice is shown to the user now when their account is inactive.
The account activation status is now fetched by the user store.
We now track Slackbot.
You can now prepend strings to the start of router.DumpRequest request dumps to avoid tearing these bits of contextual data away from the bodies.
.action file extensions are now seen as suspicious by the router.
Moved routeWebsockets to common.RouteWebsockets for now.
Moved routeCreateReplySubmit to routes.CreateReplySubmit.
Moved alert.go into common.
Moved the WebSockets logic into common.
Escape strings a little earlier in the analytics routes and use integers instead of strings where possible.
We now show a success notification when you update a user via the User Manager.
Split the configuration properties off from CTemplateSet into CTemplateConfig.
Renamed some of the properties of CTemplateSet to make them easier to understand.
Removed some obsolete properties from CTemplateSet.
Did a bit of spring cleaning in the template transpiler to cut down on unneccessary lines and to reduce duplication.
Fixed a double else bug in ranges over maps in the template transpiler.
Split the minifiers off the main template transpilation file into their own file.
Refactored some of the routes which rely on alerts to use shared functions rather than having unique implementations in the routes themselves.

All Themes Except Cosora:
Refactored the opt nodes to make it easier to roll out bulk moderation.

Shadow:
Improved the notice CSS.
Tweaked the sticky border colour.

Cosora:
The theme JS file now uses strict mode.
Notices are shunted under rowhead with JS now, although this change might be reverted soon.
Added CSS for notices.
Fixed the padding under the avatar box in the account manager avatar page.

Schema:
Added the viewchunks_langs table.
2018-03-08 03:59:47 +00:00
Azareal 8ecc637ab9 Moved routeProfile to routes.ViewProfile.
Requests are now logged as one big chunk to help prevent them getting torn apart and improve log throughput.
Newlines are now stripped from dumped requests.
Prepared statement logging now only happens in debug mode for speedier server startups.
More suspicious request tracking is done outside of debug mode now.
Only log the initial message in plugin_markdown in debug mode.
Moved the CreateTopicSubmit attachment logging to super debug mode.
Removed a couple of unneccesary menu items from the Account Manager menu.
Hid the add friend option on the profiles for now.
Moved the remaining analytics results loops into a common function.
Only log the graph for the analytics routes in debug mode.

Every Theme:
Added CSS for the Don't have an Account link on the Login Page.

Cosora:
Fixed the header CSS on mobile.
The header CSS now covers optheads on mobile.
Revamped the profile comment UI.

Shadow:
Added CSS for sticky topics.

Tempra Simple:
Button CSS now applies to type=submit inputs.
Fixed the IP Search CSS.

Tempra Conflux:
Button CSS now applies to type=submit inputs.
Fixed the IP Search CSS.

Tempra Cursive (Deprecated):
Button CSS now applies to type=submit inputs.
2018-02-26 09:07:00 +00:00
Azareal 0879f56893 Added per-forum analytics.
Added one week as a time range option.

Moved routeForum to routes.ViewForum
Renamed form_vars to formVars.
Moved the analytics chart JS into it's own file.
Changed the header text on the requests chart from Views to Requests.
Added simple hooks to global.js
Moved some of the in funcname prints to debug mode.
De-duplicated some of the back-end analytics logic.
2018-02-22 02:27:17 +00:00
Azareal 60964868d4 Moved the counters to their own package.
De-duped some of the logging code.
Added per-route state to the not found errors.
Exported debugDetail, debugDetailf, debugLog, and debugLogf.
Tweaked the padding on Tempra Simple.
Added panel submenus to Tempra Conflux.
Added Chart CSS to Tempra Conflux.
Fixed the padding and margins for the Control Panel in Cosora.
Made Cosora's Control Panel a little more tablet friendly.
Added the rowmsg CSS class to better style message rows.
Removed the repetitive guard code for the pre-render hooks.
Removed the repetitive guard code for the string-string hooks.
We now capture views for routes.StaticFile
Added the move action to the moderation logs.

Added the viewchunks_forums table.
Began work on Per-forum Views.
I probably missed a few things in this changelog.
2018-02-19 04:26:01 +00:00
Azareal be47066770 General:
Added better pagination to /forum/{id}
Fixed the ordering of the elements in the pagesets.
Added hooks to the task system.
Reduced the amount of boilerplate for RunVhook and RunVhookNoReturn.
Added RunVhookNeedHook to allow plugin developers to add custom content types to the report system.
Added BulkGetMap to the DefaultPollStore.
Renamed the MultiServer config setting to ServerCount and made it an integer.
Don't cache topic lists for empty groups.
Don't load replies for topics without any.

Tempra Simple:
Added chart and submenu CSS.
Improved the input and select CSS.
Fixed the pageset CSS.
Fixed the poll input CSS.

Tempra Conflux:
Fixed the quick reply button CSS.
Hid the avatar in the quick reply area.
Added the poll CSS.
Fixed the pageset CSS.

Shadow:
Fixed the time range selector CSS.
Fixed the poll input CSS.
2018-02-15 13:15:27 +00:00
Azareal fa065bc584 /topics/ (the default index) is now over 25 times faster than before.
Change the length of the ticks for referrer tracking.
Fixed a bug in Shadow and Tempra Simple where the polls would appear when they shouldn't.
Added styling to Shadow for Control Panel Sub-menus.
Fixed the ridiculously wide attachment images on Cosora.
The analytics pages should no longer be treated as the dashboard style-wise.
The installer now works again.
Tests now run again, as do the benchmarks.
Refactored the topic list logic, and moved the route portion into the routes package.
Fixed an inverted comparison in the referrer logic.
Added friendly text for Mac operating systems to the english language pack.
Removed two obsolete prepared statements.
Fixed three race conditions in the database adapters.
Potentially sped up the topic page by 20%
Added several new benchmarks and refactored the others.
Removed a redundant prepared statement in user.go

Added reviseID as a primary key to the revisions table.
The user_count column was added to the users_groups table, but it's unknown if it will stay.
2018-02-10 15:07:21 +00:00
Azareal 1ac47bfdfd Added referrer analytics. You can now see what site a visitor has come from.
Added the viewchunks_referrers table.
2018-02-05 10:29:13 +00:00
Azareal 2455e951aa We now have analytics for the operating systems used by users.
Route view bumping logs have been moved from regular debug mode to super debug to reduce the amount of noise.
Added user friendly agent names.
Reduced the amount of logging outside of debug mode.
We now track Mobile Safari and the Samsung Browser.
We now track SeznamBot, TwitterBot, and Discourse's Bot.
We now track Trident.
UAs are now filtered to reduce the amount of bad activity.
Added more bad phrases for bad routes.

Added the viewchunks_systems table.
Began work on referrer tracking.
2018-02-04 08:15:20 +00:00
Azareal 017bce9c09 Replaced the user agent parser with a faster and more flexible one.
More progress on poll posts.

Improved the poll UI on the other themes.
De-duplicated some avatar logic.
Added Exec() to accInsertBuilder.
Moved routeOverview to routes.Overview
Moved routeCustomPage to routes.CustomPage
Moved routeTopicID to routes.ViewTopic
Moved routeLogin to routes.AccountLogin
Moved routeRegister to routes.AccountRegister
Moved routeLoginSubmit to routes.AccountLoginSubmit
Moved routeRegisterSubmit to routes.AccountRegisterSubmit
We now track the Android Chrome user agent.
We now track the UCBrowser user agent.
We now track the zgrab user agent.
Fixed a few cases where Googlebot wasn't tracked properly.
Moved routeStatic to routes.StaticFile
2018-02-03 05:47:14 +00:00
Azareal 0c26b5a8da You can now view the results of polls.
Added the polls_options table.
We now spell suspicious correctly.
www URLs are now redirected to non-www URLs.
2018-01-28 14:30:24 +00:00
Azareal 9efed8c0bc Added support for polls, minus the results UI, we're planning to have a nice little chart for this.
Refactored the request logging logic into it's own function.
2018-01-27 07:30:44 +00:00
Azareal ed57052092 Fix some urgent SEO issues. 2018-01-26 07:57:53 +00:00
Azareal 1bd3d7d104 We now show requests to non-existent routes on the Route Analytics Page.
The filter now catches more odd requests for statistical purposes.

More progress on poll posts.
Dropped the polls_voters table and added the polls_votes one. The two have different definitions.
2018-01-26 05:53:34 +00:00
Azareal 59754b489d Block requests without known hosts for security reasons.
We now track stats for Uptimebot.
We now track stats for malformed requests.
Added json as a valid column type.

Continued work on poll posts.
Added the polls table.
Added the polls_voters table.
Added the poll column to the topics table.
Changed the type of the poll column on the replies table from boolean to int.
2018-01-25 04:57:33 +00:00
Azareal a7fec11170 IP Search now searches profile replies.
Added the subscription and attachment stores.

Refactored the routes to use the new subscription and attachment stores.
Fixed up the buttons on the profile comments for Cosora.
Made various enhancements to Cosora.
Renamed routePanel to routePanelDashboard.
Changed routeCreateTopicSubmit into an upload action and moved it into /routes/topic.go and refactored some of the redundant bits away.
2018-01-22 08:15:45 +00:00
Azareal 2997135e80 Added proper pagination to the topic list.
Fixed two existence checks.
Tweaked the profile CSS for Cosora.
Added the TopicByReplyID function.
Split off the profile logic from Reply into ProfileReply.
Moved various hard-coded bits in the profile reply routes into ProfileReply.
Moved four reply routes into /routes/reply.go
Moved six topic routes into /routes/topic.go
We should now capture more suspicious activity.

Changed the definition of the revisions table.
2018-01-20 06:50:29 +00:00
Azareal a66bab7c51 Added the global topic counter and associated graphs.
Wildcards should work properly in robots.txt now
Fixed the padding on the registration and login pages for Cosora.
Moved the Websockets route into the new router.
We now log more suspicious requests.

Started moving routes into /routes/
Added the topicchunks table.
2018-01-18 12:31:25 +00:00
Azareal 0416b1ed91 Fixed the Cosora Alerts CSS.
Fixed the topic edit input CSS.
You can now filter the time range of the routes list.
You can now filter the time range of the agents list.
Renamed operations.log to ops.log
Moved the account routes into the new router.
Log suspicious requests.
Removed some duplicated code in the control panel routes.
Fixed a bug in the User Editor where the Administrator group didn't show up.
Users are now force logged out when an admin changes their password.
2018-01-17 11:13:08 +00:00
Azareal 2436d9a6fa You can now bulk move topics from one forum to another.
We now track the User Agent for Cloudflare Always On.
2018-01-15 08:24:18 +00:00
Azareal 4bfa48a926 More exoskeletons and routes being moved around. 2018-01-14 14:27:10 +00:00
Azareal 9a3d8425e0 Added the post counter and the associated Control Panel graph.
Renamed the pre_render_panel_analytics hook to pre_render_panel_analytics_views.
Added a details table to the route graphs.
Moved the /topic/ and /reply/ routes to the router generator and hardened them.
Made some of the route names more consistent.
We now track IPs in odd situations in debug mode.
Fixed a bug where people could post on non-existent profiles.

Continued work on topic move.
Added the postchunks table.
2018-01-14 12:03:20 +00:00
Azareal 90a20d5b05 You can now filter views by one month.
More debug logging.
More progress with Topic Moving.
2018-01-12 10:22:28 +00:00
Azareal 5ba7aa74f7 Renamed the pre_render_panel_mod_log pre-render hook to pre_render_panel_modlogs.
Added the half-second task type, you'll why later ;)
Reduced the amount of code duplication in the panel routes (saved a hundred lines).
Added the two day time range option for graphs.
We now track the discord, lynx and blank user agents.
Renamed some template files for consistency and to help stamp out some duplicate code.

Began work on topic move.
2018-01-11 08:03:17 +00:00
Azareal 25074b58b2 Added a time graph for individual user agents.
We now have an Advanced Forum Permissions Editor providing more granular control over permissions.
Tweaked the button CSS and some other bits and pieces.
Added a details section to the View Count Graph.
Renamed a few template files for the sake of consistency and for an upcoming refactor.
Unknown user agents are now logged in debug mode.
Added GetCopy() to the forum permissions store.
Fixed a crash bug in the forum deletion action.
Refactored the permissions list in the group permissions editor.
2018-01-10 03:32:48 +00:00
Azareal a25ee29197 We now track global user agent stats and have a currently simple Control Panel interface for that.
Fixed a possible out of bounds panic in DefaultRouteViewCounter.Bump()
2018-01-09 07:39:29 +00:00
Azareal c7aec90612 You can now filter analytics graphs by a day, twelve hours and six hours.
Added a X-XSS-Protection header.
Fixed some Group Editor CSS for Cosora.
2018-01-08 08:53:51 +00:00
Azareal d0b6559df9 Added view graphs for the individual routes.
Made some minor improvements to Cosora.
2018-01-05 22:47:13 +00:00
Azareal e259a575e9 Added some basic route statistics to the Control Panel.
Fixed the direction of the labels on the views graph.
2018-01-04 10:23:33 +00:00
Azareal dcfcd08248 Added the views graph to the Control Panel.
Added support for strikethrough and underline HTML.
Added DateCutoff to the Accumulator Select Builder for MySQL.
2018-01-03 07:46:18 +00:00
Azareal 547254c4a1 Added Chartist as a dependency.
Fixed a XSS exploit.
Centralised the post escaping logic.

Began work on the Analytics UI.
2017-12-30 05:47:46 +00:00
Azareal ac9623ab6b Moved the tree counter node into it's own experimental area.
Added ItemList microdata to /forum/, /forums/, and /topics.
Moved the meta description for /forums/ to the right place.

Began revamping the Control Panel menu.
2017-12-27 23:38:37 +00:00
Azareal e919812ee2 Added support for meta descriptions. You can configure this from the Control Panel's Setting Manager.
Added tests for forum creation.
2017-12-25 06:12:19 +00:00
Azareal 964d219407 Added support for per-topic view counters.
Added support for shutdown tasks.
View counters are now saved on graceful shutdown.
Dynamic routes are now tracked by the route view counter.
The uploads route should now be tracked by the route view counter.
Added a WYSIWYG Editor to the profiles for Cosora.
2017-12-24 22:08:35 +00:00
Azareal c7df616f5b Profiles are less broken now.
Renamed RouteViewCounterImpl to DefaultRouteViewCounter.
Added the bot_routes.go file and moved routeRobotsTxt into it.
Added /report/ to robots.txt to stop Googlebot going there.

Began work on the sitemaps. I plan to move the routes into their own package, but I don't want to break too many things right now.
2017-12-24 07:38:46 +00:00
Azareal bdbd80319f Made some minor tweaks.
The DefaultRoute parameter in the configuration struct is now a string.
Fixed a few mismatched HTML tags.
Added the profile_comments_row template.
Added more alt attributes for images and associated title=""s in a few places.
Connections should now be closed properly.
Custom Pages no longer have a .html file extension in their URLs.
We now track route views for the default route and the custom page route.

Began work on cleaning up the profiles on Cosora.
2017-12-22 03:32:23 +00:00
Azareal 10a0c62823 The Cosora Theme is almost complete and is being rolled out on the site to demo it.
We now track the views on a per-route basis. We have plans for an admin UI for this, global views, etc. which will come in a future commit.

The local error JSON is now properly formed.
Fixed an outdated line in topic.go which was using the old cache system.
We now use fuzzy dates for relative times between three months ago and a year ago.
Added the super admin middleware and the associated tests.
Added the route column to the viewchunks table.
Added more alt attributes to images.
Added a few missing ARIA attributes.

Began refactoring the route generator to use text/template instead of generating everything procedurally.
Began work on per-topic view counts.
2017-12-19 03:53:13 +00:00
Azareal abfe0a472a Made a huge amount of progress on the Cosora Theme in the Control Panel, it's almost ready for deployment.
Added the view counter, it currently collects data without exposing it to the admin.

Added an API for scheduling tasks which run once every second and once every fifteen minutes.
Added a generated map containing all the routes with the function names as keys.
Added the request counter to the generated router.
Added more ARIA Labels and moved various bits and pieces into the CSS files for flexibility.
Removed a bunch of redundant avatar checks in the templates.
Improved the mobile friendliness of Cosora.
Fixed various issues in the other themes.
Refactored the file listener.
Gosora now resyncs newly created theme files not just modified ones.
Gosora now resyncs renamed theme files not just modified ones.
2017-12-10 03:43:30 +00:00
Azareal 0e9cebfa47 Overhauled the widget system. You can now specify more complex logic for where a widget can show up and you can now place widgets in the footer.
Added fsnotify as a dependency, we'll be using it, Rez, and Riot (maybe) soon.
Removed the intercept_build_widgets vhook.
You can now pass an ID to BlankReply() for mocking replies or whatever else you want to do with this.
Added the dock template function for widget docks.
Added the logf internal function to the template transpiler and did some minor clean-up.
Removed the Sidebars property from theme.json and added the more general Docks one.
Improved the footer and the associated CSS.
Added the about widget, previously the AboutSegment feature.
Removed the about_segment_title and about_segment_body settings.
Gosora now exits when it receives the appropriate OS signal.
Refactored the modlogs route.

More progress on the theme in the Control Panel.
2017-11-29 02:34:02 +00:00
Azareal 381ce3083a Added the AboutSegment feature, you can see this in use on Cosora, it's a little raw right now, but I'm planning to polish it in the next commit.
Refactored the code to use switches instead of if blocks in some places.
Refactored the Dashboard to make it easier to add icons to it like I did with Cosora.
You can now use maps in transpiled templates.
Made progress on Cosora's footer.
Swapped out the ThemeName property in the HeaderVars struct for a more general and flexible Theme property.
Added the colstack CSS class to make it easier to style the layouts for the Control Panel and profile.
Renamed the FStore variable to Forums.
Renamed the Fpstore variable to FPStore.
Renamed the Gstore variable to Groups.
Split the MemoryTopicStore into DefaultTopicStore and MemoryTopicCache.
Split the MemoryUserStore into DefaultUserStore and MemoryUserCache.
Removed the NullUserStore, SQLUserStore, and SQLTopicStore.
Added the NullTopicCache and NullUserCache.
Moved the Reload method out of the TopicCache interface and into the TopicStore one.
Moved the Reload method out of the UserCache interface and into the UserStore one.
Added the SetCache and GetCache methods to the TopicStore and UserStore.
Added the BypassGetAll method to the WordFilterMap type.
Renamed routePanelSetting to routePanelSettingEdit.
Renamed routePanelSettingEdit to routePanelSettingEditSubmit.
Moved the page titles into the english language pack.
Split main() into main and afterDBInit to avoid code duplication in general_test.go
Added the ReqIsJson method so that we don't have to sniff the headers every time.
Added the LogStore interface.
Added the SQLModLogStore and the SQLAdminLogStore.
Refactored the phrase system to use getPhrasePlaceholder instead of hard-coding the string to return in a bunch of functions.
Removed a redundant rank check.
Added the GuildStore to plugin_guilds.
Added the about_segment_title and about_segment_body settings.
Refactored the setting system to use predefined errors to make it easier for an upstream caller to filter out sensitive error messages as opposed to safe errors.
Added the BypassGetAll method to the SettingMap type.
Added the Update method to the SettingMap type.
BulkGet is now exposed via the MemoryUserCache.
Refactored more logs in the template transpiler to reduce the amount of indentation.
Refactored the tests to take up fewer lines.
Further improved the Cosora theme's colours, padding, and profiles.
Added styling for the Control Panel Dashboard to the Cosora Theme.
Reduced the amount of code duplication in the installer query generator and opened the door to certain types of auto-migrations.
Refactored the Control Panel Dashboard to reduce the amount of code duplication.
Refactored the modlog route to reduce the amount of code duplication and string concatenation.
2017-11-23 05:37:08 +00:00
Azareal 8d0479f4b2 Renamed setting.go to settings.go
Added the BypassGet method to SettingMap and refactored the Control Panel to use it.
Refactored the query builder.

More work on Cosora.
2017-11-13 09:23:43 +00:00
Azareal f1c418bd13 Refactored the routing logic.
Continued refactoring the prequeries.
Continued work on the profiles.
Moved more logic out of the routes.
2017-11-12 07:18:25 +00:00
Azareal f8e892da20 Added the Rez Image Resizer as a dependency to be used later.
Is Codebeat fixed now?
Fixed a data race in PreRoute and refactored away the duplicate IP Address loads.
Renamed some of the variables in the query generator.
Slight bit more progress on Cosora.
2017-11-10 00:16:15 +00:00
Azareal 34ca7de946 Added the Not method to the router generator.
Refactored the router generator.

Added the NoBanned and NoSessionMismatch middlewares.
Removed some of the implicit returns.
Refactored some of the routes and their associated stores.
Added more Codebeat exclusions.
Added the AddReply method to *Topic.
Added the Like method to *Topic.
MemberOnly now emits a LoginRequired error rather than a generic NoPermissions error.

Made progress with Cosora, this time with the profile system.
2017-11-08 07:28:33 +00:00
Azareal 569b424ac8 Did a bit of refactoring on the template system.
Refactored the ReplyStore.
Added the Create method to the ProfileReplyStore.
Fixed a potential issue with the topics and replies generated by the installer.
Refactored the accumulator.
Refactored global.js

Added more tests.
2017-11-06 16:24:45 +00:00
Azareal d0ffc4be78 Refactored a few bits and pieces.
Added Riot as a dependency, I'm still deciding over whether to use this or Bleve.
Tweaked the topic view for Cosora.
Fixed a crash bug in the group creator.
Moved a few things from permissions.go into the ForumPermsStore, more to come here!
Added more tests.
Refactored the MySQL Query Generator.
Refactored the BBCode Parser.
Moved the presets into the Phrase System.
2017-11-05 01:04:57 +00:00