| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
| |
Concerts should show with upper case
|
|
|
|
| |
Also fix nonce checking.
|
|
|
|
|
|
| |
Also ensure that nonce checking is performed before both adding and
editing concerts, and escape concert data before outputing it in the
form.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Just to make sure it has a default value and is guaranteed initialized
befor it is being used.
|
| |
|
|
|
|
|
|
| |
Puts everything that belongs together into the same place. This means
the concerts table is getting a tad large, but let's refactor that
later.
|
| |
|
|
|
|
|
|
|
|
|
| |
Split into two functions, and drop the nesting of the ifs. Technically
the ifs didn't need to be nested in the first place, since each error
case would break the execution flow using `continue` anyways.
Throw parsing errors instead of having to keep pass all the state into
the function that only need to parse one line.
|
|
|
|
|
| |
- Lacking type info in venue.php
- Potentially dereference null-objects in giglog_admin_page.php
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
And fixup most whitespace issues while at it.
|
| | |
|
| |
| |
| |
| | |
giglog import fixes to catch errors and ignore old concerts
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
https://code.volse.net/wordpress/plugins/gigologadmin.git into andreaschanges
# Conflicts:
# composer.json
# composer.lock
# giglogadmin.php
|
| | |
| | |
| | |
| | |
| | | |
Currently just uses sample from iCalcreator docs, but shows how it can
be done, and how to hook it into WordPress.
|
| | | |
|
| |/ |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch does changes quite a bit of how things work under the hood.
It changes the filter settings from using POST to using query args in a
GET request instead.
This has some challenges:
1. The query args from the form will overwrite any query args in the
original URL, so we have to keep the query args that was passed in as
hidden fields in the form.
2. Since we try to keep the passed in query args, we need to filter out
the query args that we expect to set in the form, otherwise query
args that are dropped by the form will still be present as hidden
args.
Not too happy about how this works tbh, but at least it seems to work
reasonably well for now.
I've also renamed the args set by the form to make the URL a bit nicer,
i.e "city" instead of "selectcity" etc for the query arg keys.
I've also refactored quite a bit to make the code more manageable. Like
using the view helper to create the month selector, so it's consistent
with the others, and remembers it's selection. (I also simplified it to
simply list the months from jan to dec, instead of starting at the
current month. If it's important to keep the old behaviour I'll change
it back.)
There's a few problems still with this implementation.
1. It only works in the admin-section for now. Not sure why. Probably
because shortcodes...
2. In the admin section it gains the `cid` and `pid` query args that
should not be there. Not sure why.
3. If we change the filters while being on a page larger than the total
number of pages after the filter change, we stay on the page even if
it's not a valid page after the filter change. This should be trivial
to fix.
|
|
|
|
|
|
|
|
| |
The main render function was getting too large and difficult to work
with. Splitting it up a little to make it more manageable.
Also fix styling to make the pagination links fall on one line a bit
nicer.
|
|
|
|
|
|
| |
This allows querying the database for the count of concerts that will
match a given filter. Useful to find the total number of pages in a
pagination setting, for instance.
|
|
|
|
|
|
|
| |
There's potential vulnerabilities here still, and I'm unsure if
get_permalink() is entirely safe to use in this context. Seems to do the
right thing, but the docs for the function indicates it has some edge
cases.
|
| |
|
| |
|
| |
|
|
|
|
| |
added pagination to concert list
|
| |
|
| |
|
| |
|
|
|
|
| |
Added a paragraph to have a bit of space under filters
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch got a bit more involved than what was originally planned, but
since we're messing with the tables I decided to do it all right away.
- Moves the constraint definition to the CREATE TABLE statement for the
concerts table. This replaces the existing KEY definition that it had.
- Make sure the venues table is created before the concerts table so
that the above mentioned constraint definition works.
- Rename the tables. Use the wpdb-prefix and make the name a bit
prettier. This caused some changes in the Concert and Venue classes,
and for slightly silly reasons some test classes. The code actually
turned out better (for the most part), but some refactoring can still
be done. The column names remains unchanged for now.
|
|
|
|
|
|
|
|
| |
Since the date column has changed types, so has the representation in
the concert class.
We should really change the property in the Concert class be a proper
DateTime object.
|
|
|
|
| |
Was accidentally dropped during rewrite of base schema.
|
|
|
|
| |
versioning. First attempt
|
|
|
|
|
| |
Test that less privileged users don't see all the controls, and that no
controls are rendered on the public facing pages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we now have code that should be available, both on the public blog
and in the admin section, we need to be more graular when loading the
various parts of the plugin.
We still try to avoid loading admin-only parts for the public blog, but
allways load the parts that we need in either case. Also avoid running
the db migrations when running unit tests, as the schema is copied over
from the dev environment it just caues problems.
Finally, don't hardcode unit tests to always be in_admin, but rather
determine that for each test.
|