mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-01 03:27:43 +08:00
Update demo plugin
This commit is contained in:
parent
a28d8f4e04
commit
e4e26d799c
2 changed files with 3 additions and 3 deletions
|
@ -16,9 +16,9 @@ class DemoStorage extends \RainLoop\Providers\Storage\FileStorage
|
|||
\MailSo\Base\Utils::RecRmDir("{$this->sDataPath}/demo");
|
||||
}
|
||||
|
||||
$sDataPath .= '/' . static::fixName(\RainLoop\Utils::GetConnectionToken());
|
||||
$sDataPath .= '/' . \RainLoop\Utils::fixName(\RainLoop\Utils::GetConnectionToken());
|
||||
\is_dir($sDataPath) || \mkdir($sDataPath, 0700, true);
|
||||
|
||||
return $sDataPath . '/' . ($sKey ? static::fixName($sKey) : '');
|
||||
return $sDataPath . '/' . ($sKey ? \RainLoop\Utils::fixName($sKey) : '');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ class Utils
|
|||
* Replace control characters, ampersand, spaces and reserved characters (based on Win95 VFAT)
|
||||
* en.wikipedia.org/wiki/Filename#Reserved_characters_and_words
|
||||
*/
|
||||
public static function fixName($filename)
|
||||
public static function fixName(string $filename) : string
|
||||
{
|
||||
return \preg_replace('#[|\\\\?*<":>+\\[\\]/&\\s\\pC]#su', '-', $filename);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue