-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow selecting forums in addition to Index and Everywhere #149
Merged
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
12b1b3a
Migrate old index/everywhere data to new locations data
iMattPro 05194bb
Update ACP to use new locations
iMattPro a4fe5bc
Update displaying based on locations
iMattPro 3fe6160
Use “index” for index to issues with 0 from the request forum ids
iMattPro 9725c24
We need a custom twig function to check if number is numeric
iMattPro 655c5a4
Fix tests
iMattPro 86859a3
Use -1 for index only
iMattPro 63f6c33
No longer need a twig extension
iMattPro b24adf9
Refactor some stuff
iMattPro a88163b
Fix camelcases
iMattPro b614a25
Add some testing of locations
iMattPro df5a38f
Use a class constant for index only value of -1
iMattPro 878791c
Support large forum selections
iMattPro 035c0ba
Use a more robust json_decode
iMattPro 62c77e8
Move some variables outside of loop
iMattPro a17a0c6
Some language clean up
iMattPro 12936d3
Use sql transactions for looped queries in migration
iMattPro 370dfe0
Use the proper key for the index in the location selector
iMattPro 58f54e0
Handle protected forums better
iMattPro c59c643
Refactor logic for protected forums
iMattPro 40874a6
Replace static vars with class properties
iMattPro 03d6d32
Merge if statements
iMattPro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does
{% set ... in ... %}
construction work? Couldn't find it in docs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set
defines a new variable. https://twig.symfony.com/doc/2.x/tags/set.htmlin
is like in array https://twig.symfony.com/doc/2.x/templates.html#containment-operatorThis is creating a boolean variable: true if index is in the array of locations, false if not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I see what do they mean individually but just curious how would it work together. So it adds
has_index
element intoba.LOCATIONS
array?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it creates a new twig template variable called
has_index
that is true whenba.LOCATIONS
contains-1
which is then used in the next few linesThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's same as doing: