| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Added CSS and extra fromatting to table
|
|
|
|
| |
Added order by concert date in concert list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We originally had a more specified query, but simplified it to:
SELECT * FROM wpg_concerts LEFT JOIN wpg_venues ON ...;
But since both the concerts table and the venues table has a column id,
the concert id would be overwritten with the venue id. MySQL/MariaDB
does not allow columns with the same name in multiple tables when using
unqualified column names in the query.
So we need to be more explicit again.
I was hoping that the following would work:
SELECT wpg_concerts.*, wpg_venues.* FROM .... ;
I think MySQL/MariaDB would handle that, but now since php turns the
result into an array, where each key must be unique, this again
overwrites the concert id with the venue id.
So thus a more verbose specification of the columns was necessary.
|
| |
|
|
|
|
|
|
| |
As a user can only be assigned to one role at the time, we remove the
current user from any role that they may have when clearing the
assignment.
|
| |
|
|
|
|
|
| |
This will trip up any existing records in the db, but that should not
matter, since we're changing how this entire stuff works now.
|
| |
|
| |
|
| |
|
|
|
|
| |
Also make sure we explicitly set the venue attribute in the constructor.
|
| |
|
| |
|
| |
|
|
|
|
| |
There's no need to have a separate table (concertlogs) for these fields.
|
| |
|
| |
|
|
|
|
|
| |
Reduce to one find_concerts function taking a filter to limit the
selection.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The previous changes required the full venue data to be included in the
constructor. This patch ensures that we handle the old case, where only
the venue id was passed in.
We still should get the full concert object including the venue name and
city back.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the concert a full object containing all relevant info, while
we can still segment the data in the db.
Instead of this:
$concert = GiglogAdmin_Concert::get($concert_id);
$venue = GiglogAdmin_Venue::get($concert->venue());
echo "{$concert->name()} @ {$venue->name()} : {$concert->cdate()}"
You can now do:
$concert = GiglogAdmin_Concert::get($concert_id);
echo "{$concert->name()} @ {$concert->venue()->name()} : {$concert->cdate()}"
And yeah, renamed Concert::find_cid() to Concert::get() and changed it's
semantics somewhat. It now either returns the given concert if it
exists, or NULL if it does not. Simpler function; simpler to use.
|
| |
|
| |
|
|
|
|
| |
Added test to create duplicate concert with varied cases in string
|
|
|
|
|
|
|
|
|
|
| |
Restructure the method a bit, drop the `c`prefix on variables, rename
the variable to hold the created concert, and use object notation to
pass the attributes to the constructor.
Also rename the method `get` to `find`, the only call site was the
`create` method. Drop the unnecessary method `check_duplicate`. Just use
`find` instead.
|
|
|
|
|
|
| |
We probably need some better error handling here. There's a myriad of
reasons why this call could fail, and we might need to communicate the
failure reason somewhere.
|
| |
|
|\ |
|
| |
| |
| |
| | |
Modified so that band is no longer in use
|
|/ |
|
| |
|
|
|
|
| |
Refactored band
|
|
|
|
| |
Run `reuse lint` to verify that all material is licensed.
|
|
|
|
|
| |
Also allow it to default initialize when passing no args. Not entirely
sure about making this interface public.
|
|
|
|
| |
Adjustments in admin page and import gigs to use the above adjustments
|
| |
|
|
|
|
| |
GiglogAdmin_Concert
|
| |
|
|
|
|
| |
Made form for concert both functional to edit existing concert or add new concert
|
| |
|
|
Moves all database operations to separate classes for each type of
object, bands, venues and concerts. This makes the logic cleaner, and
concentrates the db related code to logically distinct parts of the
code.
This means we no longer need the global access to the $wpdb object from
the processing code.
|