Skip to content

Commit

Permalink
Fix #23 (${} string interpolation syntax is deprecated)
Browse files Browse the repository at this point in the history
We are careful not to replace the variable variables (never a good idea
to use this "feature"), nor the special `preg_replace()` syntax (which
is not deprecated).
  • Loading branch information
cmb69 committed Jan 30, 2023
1 parent 60a6c4b commit ee03383
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions includes/calendar.php
Expand Up @@ -780,7 +780,7 @@ function easter_date($year) {
} else $zindex = '';

if($columns) $o .= '<td class="months_in_columns">'."\n";
$o .= "<table class='${size}calendar_main'$zindex>\n";
$o .= "<table class='{$size}calendar_main'$zindex>\n";

// 1st row: headline with month and year (year only if needed)
//============================================================
Expand Down Expand Up @@ -950,7 +950,7 @@ function easter_date($year) {

$x = $calendar_cf['dont_underline_longevents']? '2':'';

$showtoday = $i == $today ? " ${size}calendar_today" : '';
$showtoday = $i == $today ? " {$size}calendar_today" : '';
$shortevent = $i == $shortevent ? " calendar_shortevent" : '';
$startevent = $i == $startevent ? " calendar_startevent$x" : '';
$midevent = $i == $midevent ? " calendar_midevent$x" : '';
Expand All @@ -959,7 +959,7 @@ function easter_date($year) {
$startevent3 = $i == $startevent3 ? " calendar_startevent3" : '';
$midevent3 = $i == $midevent3 ? " calendar_midevent3" : '';
$endevent3 = $i == $endevent3 ? " calendar_endevent3" : '';
$birthday = $i == $birthday ? " ${size}calendar_birthday" : '';
$birthday = $i == $birthday ? " {$size}calendar_birthday" : '';
$holiday = $i == $holiday ? " calendar_holiday" : '';


Expand Down
2 changes: 1 addition & 1 deletion includes/calendarconfig.php
Expand Up @@ -508,7 +508,7 @@ function openedit(button,hidearea,clicktext,reclicktext,displaytype,antihidearea
for ($i = 0;$i <=50 ;$i++ ) {
$selected = '';
if($i.'px' == $dayspacing) {$selected = ' selected'; $j = 1;}
$spacingvalues_select .= "<option value='${i}px' $selected>${i}px</option>\n";
$spacingvalues_select .= "<option value='{$i}px' $selected>{$i}px</option>\n";
}
$preselect = $j? '' : '<option value="'.$dayspacing.'" selected>' . $dayspacing . '</option>';
if($bordercollapse=='collapse' || !$dayspacing) $preselect = "<option value='0px' selected>0px</option>\n";
Expand Down

0 comments on commit ee03383

Please sign in to comment.