Skip to content

Commit

Permalink
PHP 8.2: No longer use deprecated ${var}
Browse files Browse the repository at this point in the history
  • Loading branch information
julmud committed Jan 9, 2025
1 parent dadca80 commit b6a4808
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
26 changes: 13 additions & 13 deletions TestFonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@ function TestConfiguration(&$fontnames) {
echo "The directories in that location are:$eoln";
DisplayFilesInDir($jpgraphlocation, '', 'dir');
if (!is_dir($jpgraphlocation.'fonts')) {
echo "Sadly, there is no ${jpgraphlocation}fonts directory, so likely no fonts.$eoln";
echo "Sadly, there is no {$jpgraphlocation}fonts directory, so likely no fonts.$eoln";
}
else {
echo "The directories in ${jpgraphlocation}fonts are:$eoln";
echo "The directories in {$jpgraphlocation}fonts are:$eoln";
DisplayFilesInDir($jpgraphlocation.'fonts/', '', 'dir');
if (!is_dir($jpgraphlocation.'fonts/truetype')) {
echo "Sadly, there is no ${jpgraphlocation}fonts/truetype directory, so likely no fonts.$eoln";
echo "Sadly, there is no {$jpgraphlocation}fonts/truetype directory, so likely no fonts.$eoln";
}
else {
echo "TrueType fonts available in ${jpgraphlocation}fonts/truetype are:$eoln";
echo "TrueType fonts available in {$jpgraphlocation}fonts/truetype are:$eoln";
$num = DisplayFilesInDir($jpgraphlocation.'fonts/truetype/', 'ttf');
echo "for a total of $num fonts$eoln";
$TryJpGraph = true;
Expand All @@ -238,34 +238,34 @@ function TestConfiguration(&$fontnames) {
}
}

echo "${eoln}/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\/\\$eoln";
echo "{$eoln}/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\/\\$eoln";
echo "Testing ImageTTFBBox() calls with the current configuration$eoln";
$FontsSucceeded = TestConfiguration($fontnames);
$numsystem = count($FontsSucceeded);
if ($TryJpGraph) {
echo "${eoln}/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\/\\$eoln";
echo "Testing ImageTTFBBox() calls using ${jpgraphlocation}fonts/truetype in the fontpath$eoln";
$gdfp = @putenv("GDFONTPATH=${jpgraphlocation}fonts/truetype");
echo "{$eoln}/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\/\\$eoln";
echo "Testing ImageTTFBBox() calls using {$jpgraphlocation}fonts/truetype in the fontpath$eoln";
$gdfp = @putenv("GDFONTPATH={$jpgraphlocation}fonts/truetype");
if ($gdfp === false)
echo "The putenv() call to set the path indicates that it FAILED$eoln";
$FontsSucceeded = TestConfiguration($fontnames);
$numjpgraph = count($FontsSucceeded);
if ($numsystem != $numjpgraph)
echo "Current configuration: $numsystem fonts available${eoln}JpGraph configuration: $numjpgraph fonts available$eoln";
echo "Current configuration: $numsystem fonts available{$eoln}JpGraph configuration: $numjpgraph fonts available$eoln";
if ($numjpgraph > $numsystem)
echo "${eoln}Consider setting \$GDFontPathOverride = '${jpgraphlocation}fonts/truetype'; in your $localsiteconfig$eoln";
echo "{$eoln}Consider setting \$GDFontPathOverride = '{$jpgraphlocation}fonts/truetype'; in your $localsiteconfig$eoln";
}
if (isset($GDFontPathOverride) && $GDFPOGood) {
echo "${eoln}/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\/\\$eoln";
echo "{$eoln}/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\/\\$eoln";
echo "Testing ImageTTFBBox() calls using $GDFontPathOverride in the fontpath$eoln";
$gdfp = @putenv("GDFONTPATH=$GDFontPathOverride");
if ($gdfp === false)
echo "The putenv() call to set the path indicates that it FAILED$eoln";
$FontsSucceeded = TestConfiguration($fontnames);
$numgdfpo = count($FontsSucceeded);
if ($numsystem != $gdfpo)
echo "Current configuration: $numsystem fonts available${eoln}\$GDFontPathOverride configuration: $gdfpo fonts available$eoln";
echo "Current configuration: $numsystem fonts available{$eoln}\$GDFontPathOverride configuration: $gdfpo fonts available$eoln";
if ($numjpgraph > $numsystem)
echo "${eoln}Consider setting \$GDFontPathOverride = '${jpgraphlocation}fonts/truetype'; in your $localsiteconfig$eoln";
echo "{$eoln}Consider setting \$GDFontPathOverride = '{$jpgraphlocation}fonts/truetype'; in your $localsiteconfig$eoln";
}
exit;
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2038,12 +2038,12 @@ function ProcessChildrenOf($boxparent, &$sql, &$numthispage, &$secondcol, &$thir
if ($oldtype != $credit['credittype']) {
$GroupIndent = false;
$oldtype = $credit['credittype'];
$ind = ($outerind == 0)? '': " style=\"padding-left:${outerind}px\"";
$ind = ($outerind == 0)? '': " style=\"padding-left:{$outerind}px\"";
$dvd['p_credits'] .= '<tr style="font-weight:bold"><td colspan=3'.$ind.'>'
.$lang[strtoupper(str_replace(' ','',$oldtype))].'</td></tr>';
}
$xx = ($GroupIndent == 0)? $outerind: $outerind+20;
$ind = ($xx == 0)? '': " style=\"padding-left:${xx}px\"";
$ind = ($xx == 0)? '': " style=\"padding-left:{$xx}px\"";

$credit['oc'] = "window.open('popup.php?acttype=CREDIT&amp;fullname=$credit[caid]',"
."'Actors',$ActorWindowSettings); return false;";
Expand Down Expand Up @@ -2105,7 +2105,7 @@ function ProcessChildrenOf($boxparent, &$sql, &$numthispage, &$secondcol, &$thir
$outerind = 20;
}
else if ($credit['caid'] == -2) {
$ind = ($outerind == 0)? '': " style=\"padding-left:${outerind}px\"";
$ind = ($outerind == 0)? '': " style=\"padding-left:{$outerind}px\"";
$dvd['p_credits'] .= "<tr><td$ind colspan=4 class=\"GroupDivider\">$credit[creditedas]</td></tr>\n";
$GroupIndent = true;
}
Expand Down
2 changes: 1 addition & 1 deletion processskin.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function header_vars($param) {
$retval .= "\tvar DP_ProgramDatabaseName = \"$dbname.$table_prefix\";\r\n";
$retval .= "\tvar DP_ProgramPathDatabase = \"$dbhost\";\r\n";
$retval .= "\tvar DP_ProgramPathImages = \"$base$img_webpath\";\r\n";
$retval .= "\tvar DP_ProgramPathThumbnails = \"$base${img_webpath}$thumbnails/\";\r\n";
$retval .= "\tvar DP_ProgramPathThumbnails = \"$base{$img_webpath}$thumbnails/\";\r\n";
$retval .= "\tvar DP_ProgramPathLayouts = \"{$base}skins/\";\r\n";
$retval .= "\tvar DP_ProgramPathReports = \"$base\";\r\n";
$retval .= "\tvar DP_ProgramPathTemp = \"$base$imagecachedir\";\r\n";
Expand Down

0 comments on commit b6a4808

Please sign in to comment.