Skip to content

Commit

Permalink
fixup! Deal with some MariaDB strict options.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajparsons committed Jan 4, 2024
1 parent a19a204 commit 9a47a84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/Divisions.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function getRecentDebatesWithDivisions($number = 20, $majors = null) {
# section/subsection bodies to construct a debate title
$q = $this->db->query(
"SELECT min(eps.body) as section_body, min(epss.body) as subsection_body,
min(ss.gid) as debate_gid, min(h.gid), min(h.hdate), min(h.major), count(h.gid) AS c
min(ss.gid) as debate_gid, min(h.gid), min(h.hdate) as hdate, min(h.major) as hmajor, count(h.gid) AS c
FROM hansard h, hansard ss, epobject eps, epobject epss
WHERE h.section_id = eps.epobject_id
AND h.subsection_id = epss.epobject_id
Expand All @@ -161,9 +161,9 @@ public function getRecentDebatesWithDivisions($number = 20, $majors = null) {
$debate_gid = fix_gid_from_db($debate['debate_gid']);
$anchor = '';
if ($debate['c'] == 1) {
$anchor = '#g' . gid_to_anchor(fix_gid_from_db($debate['gid']));
$anchor = '#g' . gid_to_anchor(fix_gid_from_db($debate['debate_gid']));
}
$url = new Url($hansardmajors[$debate['major']]['page']);
$url = new Url($hansardmajors[$debate['hmajor']]['page']);
$url->insert(array('gid' => $debate_gid));
$debates[] = [
'url' => $url->generate() . $anchor,
Expand Down

0 comments on commit 9a47a84

Please sign in to comment.