GFI sandbox import.

Replace Windows environment variables
%UserProfile% and %AllUsersProfile%.
pull/63/head
noud 2012-09-20 13:27:36 +02:00
parent 3199839286
commit 64a354678d
1 changed files with 7 additions and 1 deletions

View File

@ -1204,7 +1204,13 @@ class EventsController extends AppController {
if ($key == 'filename') $arrayItemKey = (string)$val;
if ($key == 'md5') $arrayItemValue = (string)$val;
}
$files[str_replace('C:\Users\John','%UserProfile%',$arrayItemKey)] = $arrayItemValue;
// replace Windows Environment Variables
$arrayItemKey = str_replace('C:\Users\John', '%UserProfile%', $arrayItemKey);
$arrayItemKey = str_replace('C:\Documents and Settings\James Cocks', '%UserProfile%', $arrayItemKey);
$arrayItemKey = str_replace('C:\DOCUME~1\JAMESC~1', '%UserProfile%', $arrayItemKey);
$arrayItemKey = str_replace('C:\Documents and Settings\All Users', '%AllUsersProfile%', $arrayItemKey);
$files[$arrayItemKey] = $arrayItemValue;
}
//$files = array_unique($files);