remove codeigniter
This commit is contained in:
@@ -74,7 +74,7 @@ class WhatsappGroupMembership extends BaseModel
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* Methods (CI-compatible behavior)
|
||||
* Methods (legacy-compatible behavior)
|
||||
* ============================================================
|
||||
*/
|
||||
|
||||
@@ -118,7 +118,7 @@ class WhatsappGroupMembership extends BaseModel
|
||||
* Upsert membership row for a specific subject and class/term.
|
||||
* Returns the row ID.
|
||||
*
|
||||
* Matches CI logic:
|
||||
* Matches legacy logic:
|
||||
* - Key is (class_section_id, school_year, subject_type, subject_id) plus semester if provided.
|
||||
* - If semester is blank, we update most recent row for that key and keep its semester.
|
||||
* - If verifiedBy provided, set verified_by + verified_at.
|
||||
@@ -165,7 +165,7 @@ class WhatsappGroupMembership extends BaseModel
|
||||
return (int) $row->id;
|
||||
}
|
||||
|
||||
// Semester blank => match CI behavior: find most recent row for the key (without semester filter).
|
||||
// Semester blank => match legacy behavior: find most recent row for the key (without semester filter).
|
||||
$existing = static::query()
|
||||
->where('class_section_id', $classSectionId)
|
||||
->where('school_year', $year)
|
||||
@@ -176,7 +176,7 @@ class WhatsappGroupMembership extends BaseModel
|
||||
->first();
|
||||
|
||||
if ($existing) {
|
||||
// Keep semester from the existing row if present (CI behavior).
|
||||
// Keep semester from the existing row if present (legacy behavior).
|
||||
if (!empty($existing->semester)) {
|
||||
$payload['semester'] = (string) $existing->semester;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user