Skip to content

Commit

Permalink
Merge pull request #27300 from eileenmcnaughton/mailing_archive
Browse files Browse the repository at this point in the history
Unconditionally assign smarty variable
  • Loading branch information
colemanw authored Sep 5, 2023
2 parents 390189a + 4a27340 commit c29a31f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CRM/Mailing/Page/Browse.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ public function preProcess() {
if (CRM_Core_Permission::check('access CiviMail')) {
$archiveLinks = TRUE;
}
if ($archiveLinks == TRUE) {
$this->assign('archiveLinks', $archiveLinks);
}
$this->assign('archiveLinks', $archiveLinks ?? FALSE);
}

/**
* Run this page (figure out the action needed and perform it).
*
* @throws \CRM_Core_Exception
*/
public function run() {
$this->preProcess();
Expand All @@ -122,19 +122,19 @@ public function run() {
= CRM_Utils_Request::retrieve('sortByCharacter', 'String', $this);

// CRM-11920 "all" should set sortByCharacter to null, not empty string
if (strtolower($this->_sortByCharacter ?: '') == 'all' || !empty($_POST)) {
if (strtolower($this->_sortByCharacter ?: '') === 'all' || !empty($_POST)) {
$this->_sortByCharacter = NULL;
$this->set('sortByCharacter', NULL);
}

if (($newArgs[3] ?? NULL) == 'unscheduled') {
if (($newArgs[3] ?? NULL) === 'unscheduled') {
$this->_unscheduled = TRUE;
}
$this->set('unscheduled', $this->_unscheduled);

$this->set('archived', $this->isArchived($newArgs));

if (($newArgs[3] ?? NULL) == 'scheduled') {
if (($newArgs[3] ?? NULL) === 'scheduled') {
$this->_scheduled = TRUE;
}
$this->set('scheduled', $this->_scheduled);
Expand Down Expand Up @@ -243,7 +243,7 @@ public function run() {
if ($this->get('sms')) {
$urlParams .= '&sms=1';
}
if (($newArgs[3] ?? NULL) == 'unscheduled') {
if (($newArgs[3] ?? NULL) === 'unscheduled') {
$urlString .= '/unscheduled';
$urlParams .= '&scheduled=false';
$this->assign('unscheduled', TRUE);
Expand Down

0 comments on commit c29a31f

Please sign in to comment.