Minor code cleanups.
authoreileen <emcnaughton@wikimedia.org>
Wed, 28 Nov 2018 04:13:17 +0000 (17:13 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 28 Nov 2018 04:23:47 +0000 (17:23 +1300)
Removes an instance where  is instantiated using the old & pattern and
fixes a non-quoted word in a template which causes notices under some configs

CRM/Core/Session.php
templates/CRM/Event/Page/UserDashboard.tpl

index 632a9e14ab9a632b767d571f5cdff72ff2167ef9..f618c8d3a1a0ded7e5a1b463dc1f6bacc2110faf 100644 (file)
@@ -114,9 +114,8 @@ class CRM_Core_Session {
         if ($isRead) {
           return;
         }
-        $config =& CRM_Core_Config::singleton();
         // FIXME: This belongs in CRM_Utils_System_*
-        if ($config->userSystem->is_drupal && function_exists('drupal_session_start')) {
+        if (CRM_Core_Config::singleton()->userSystem->is_drupal && function_exists('drupal_session_start')) {
           // https://issues.civicrm.org/jira/browse/CRM-14356
           if (!(isset($GLOBALS['lazy_session']) && $GLOBALS['lazy_session'] == TRUE)) {
             drupal_session_start();
index d0a0fb6b6328c0e1643370819c1ab089b1118210..8ded5d96a529fdfe42b3621c0cc4ce3229b63e56 100644 (file)
@@ -40,7 +40,7 @@
                 </tr>
                 {counter start=0 skip=1 print=false}
                 {foreach from=$event_rows item=row}
-                    <tr id='rowid{$row.participant_id}' class=" crm-event-participant-id_{$row.participant_id} {cycle values="odd-row,even-row"}{if $row.status eq Cancelled} disabled{/if}">
+                    <tr id='rowid{$row.participant_id}' class=" crm-event-participant-id_{$row.participant_id} {cycle values="odd-row,even-row"}{if $row.status eq 'Cancelled'} disabled{/if}">
                        <td class="crm-participant-event-id_{$row.event_id}"><a href="{crmURL p='civicrm/event/info' q="reset=1&id=`$row.event_id`&context=dashboard"}">{$row.event_title}</a></td>
                        <td class="crm-participant-event_start_date">
                             {$row.event_start_date|crmDate}
@@ -73,4 +73,4 @@
     {/if}
 </div>
 {crmRegion name="crm-event-userdashboard-post"}
-{/crmRegion}
\ No newline at end of file
+{/crmRegion}