mkdir($dir, 0777, true);
}
$dest = $dir . $fname;
+ $this->_rmSymLink($dest);
move_uploaded_file($infos['tmp_name'], $dest);
if (stripos($dir, 'commerce') === false) {
switch (strtolower(files::getExtension($dest))) {
$orig = str_replace('.svg', '.o.svg', $dest);
rename($dest, $orig);
$png = str_replace('.svg', '.png', $dest);
+ $this->_rmSymLink($orig);
+ $this->_rmSymLink($dest);
+ $this->_rmSymLink($png);
`/usr/local/bin/svgcleaner $orig $dest`;
if (!file_exists($dest)) {
copy($orig, $dest);
}
}
+ protected function _rmSymLink($path)
+ {
+ if (file_exists($path) && is_link($path)) {
+ unlink($path);
+ }
+ }
+
public function testDocuments()
{
global $core;
public static function isFarmUser()
{
global $core;
- $farmTesters = [1, 2, 3, 5];
+ $farmTesters = [1, 2, 3, 5, 446, 4135];
if (!$core->user) {
return false;
}