From: <var...@us...> - 2024-02-27 09:00:23
|
Revision: 11080 http://sourceforge.net/p/phpwiki/code/11080 Author: vargenau Date: 2024-02-27 09:00:21 +0000 (Tue, 27 Feb 2024) Log Message: ----------- Deprecated: Using ${var} in strings is deprecated, use {$var} instead Modified Paths: -------------- trunk/lib/InlineParser.php trunk/lib/WikiTheme.php trunk/lib/config.php trunk/lib/mimelib.php trunk/lib/plugin/AppendText.php trunk/lib/stdlib.php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2024-02-27 08:33:44 UTC (rev 11079) +++ trunk/lib/InlineParser.php 2024-02-27 09:00:21 UTC (rev 11080) @@ -789,23 +789,23 @@ $b = "\\* (?! \\*)"; $tt = "= (?! =)"; - $any = "(?: ${i}|${b}|${tt})"; // any of the three. + $any = "(?: {$i}|{$b}|{$tt})"; // any of the three. // Any of [_*=] is okay if preceded by space or one of [-"'/:] - $start[] = "(?<= \\s|^|[-\"'\\/:]) ${any}"; + $start[] = "(?<= \\s|^|[-\"'\\/:]) {$any}"; // _ or * is okay after = as long as not immediately followed by = - $start[] = "(?<= =) (?: ${i}|${b}) (?! =)"; + $start[] = "(?<= =) (?: {$i}|{$b}) (?! =)"; // etc... - $start[] = "(?<= _) (?: ${b}|${tt}) (?! _)"; - $start[] = "(?<= \\*) (?: ${i}|${tt}) (?! \\*)"; + $start[] = "(?<= _) (?: {$b}|{$tt}) (?! _)"; + $start[] = "(?<= \\*) (?: {$i}|{$tt}) (?! \\*)"; // any delimiter okay after an opening brace ( [{<(] ) // as long as it's not immediately followed by the matching closing // brace. - $start[] = "(?<= { ) ${any} (?! } )"; - $start[] = "(?<= < ) ${any} (?! > )"; - $start[] = "(?<= \\( ) ${any} (?! \\) )"; + $start[] = "(?<= { ) {$any} (?! } )"; + $start[] = "(?<= < ) {$any} (?! > )"; + $start[] = "(?<= \\( ) {$any} (?! \\) )"; $start = "(?:" . join('|', $start) . ")"; Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2024-02-27 08:33:44 UTC (rev 11079) +++ trunk/lib/WikiTheme.php 2024-02-27 09:00:21 UTC (rev 11080) @@ -675,7 +675,7 @@ public function getFormatter($type, $format) { - $method = strtolower("get${type}Formatter"); + $method = strtolower("get{$type}Formatter"); if (method_exists($this, $method)) { return $this->{$method}($format); } Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2024-02-27 08:33:44 UTC (rev 11079) +++ trunk/lib/config.php 2024-02-27 09:00:21 UTC (rev 11080) @@ -127,7 +127,7 @@ $requri = preg_replace('/\?.*$/', '', $GLOBALS['HTTP_SERVER_VARS']['REQUEST_URI']); $requri = preg_quote($requri, '%'); - return preg_match("%^${requri}[^/]*$%", $GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']); + return preg_match("%^{$requri}[^/]*$%", $GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']); } function getUploadFilePath() Modified: trunk/lib/mimelib.php =================================================================== --- trunk/lib/mimelib.php 2024-02-27 08:33:44 UTC (rev 11079) +++ trunk/lib/mimelib.php 2024-02-27 09:00:21 UTC (rev 11080) @@ -101,7 +101,7 @@ $sep = "\r\n--$boundary\r\n"; - return $head . $sep . implode($sep, $parts) . "\r\n--${boundary}--\r\n"; + return $head . $sep . implode($sep, $parts) . "\r\n--{$boundary}--\r\n"; } /** Modified: trunk/lib/plugin/AppendText.php =================================================================== --- trunk/lib/plugin/AppendText.php 2024-02-27 08:33:44 UTC (rev 11079) +++ trunk/lib/plugin/AppendText.php 2024-02-27 09:00:21 UTC (rev 11080) @@ -125,9 +125,9 @@ if (!empty($args['before'])) { $before = preg_quote($args['before'], "/"); // Insert before - $newtext = preg_match("/\n${before}/", $oldtext) + $newtext = preg_match("/\n{$before}/", $oldtext) ? preg_replace( - "/(\n${before})/", + "/(\n{$before})/", "\n" . preg_quote($text, "/") . "\\1", $oldtext ) @@ -135,9 +135,9 @@ } elseif (!empty($args['after'])) { // Insert after $after = preg_quote($args['after'], "/"); - $newtext = preg_match("/\n${after}/", $oldtext) + $newtext = preg_match("/\n{$after}/", $oldtext) ? preg_replace( - "/(\n${after})/", + "/(\n{$after})/", "\\1\n" . preg_quote($text, "/"), $oldtext ) Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2024-02-27 08:33:44 UTC (rev 11079) +++ trunk/lib/stdlib.php 2024-02-27 09:00:21 UTC (rev 11080) @@ -1118,10 +1118,10 @@ // capitalized words. switch ($GLOBALS['LANG']) { case 'en': - $RE[] = "/(?<= |${sep}|^)([AI])([[:upper:]][[:lower:]])/"; + $RE[] = "/(?<= |{$sep}|^)([AI])([[:upper:]][[:lower:]])/"; break; case 'fr': - $RE[] = "/(?<= |${sep}|^)([À])([[:upper:]][[:lower:]])/"; + $RE[] = "/(?<= |{$sep}|^)([À])([[:upper:]][[:lower:]])/"; break; } // Split at underscore @@ -1130,8 +1130,8 @@ // Split numerals from following letters. $RE[] = '/(\d)([[:alpha:]])/'; // Split at subpage separators. TBD in WikiTheme.php - $RE[] = "/([^${sep}]+)(${sep})/"; - $RE[] = "/(${sep})([^${sep}]+)/"; + $RE[] = "/([^{$sep}]+)({$sep})/"; + $RE[] = "/({$sep})([^{$sep}]+)/"; foreach ($RE as $key) { $RE[$key] = $key; @@ -1316,7 +1316,7 @@ return false; } - $time = strtotime("$mday $mon $year ${hh}:${mm}:${ss} GMT"); + $time = strtotime("$mday $mon $year {$hh}:{$mm}:{$ss} GMT"); if ($time == -1) { return false; } // failed This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |