([^\\/]+[.]properties) # $3 file name
 $/ix';
           $plugin_name_string = preg_replace($pattern, '$1', $file_name);
           $dir_name_string = preg_replace($pattern, '$2', $file_name);
           $file_name_string = preg_replace($pattern, '$3', $file_name);
           # remove optional source dir, e.g. 'src' or 'src_ant'
           $pos = stripos($dir_name_string, 'org/');
           if ($pos !== false) {
               $dir_name_string = substr($dir_name_string, $pos);
           }
           $pos = strripos($dir_name_string, 'com/');
           if ($pos !== false) {
               $dir_name_string = substr($dir_name_string, $pos);
           }
           $file_name = $plugin_name_string . "/" . $dir_name_string . $file_name_string;
           $file_id = File::getFileID($file_name, $myrow_maps['project_id'], $myrow_maps['version']);
           $properties_file_count = $properties_file_count + 1;
           # Match plugin exclude list
           $match = false;
           foreach ($patterns as $pattern) {
               if (preg_match($pattern, $file_name)) {
                   $match = true;
                   break;
               }
           }
           if (!$match) {
               if ($file_id > 0 && $files[$file_id] != null) {
                   # Existing file
                   $file = $files[$file_id];
                   $file->is_active = 1;
                   unset($files[$file_id]);
     chdir($temp_unzip_dir . $plugin_id);
     exec("unzip -o -q {$temp_site_dir}{$jar_name}");
 }
 # Collect properties file names
 $properties_file_names = array();
 chdir($temp_unzip_dir);
 exec("find . -name *.properties", $properties_file_names);
 sort($properties_file_names);
 # Parse each properties file
 echo "Start processing properties files in project {$project_id} version {$version}...\n";
 echo "  Update site location: {$site_url}\n";
 foreach ($properties_file_names as $properties_file_name) {
     # Remove "./" from beginning of properties file name
     $properties_file_name = substr($properties_file_name, 2);
     $plugin_id = substr($properties_file_name, 0, strpos($properties_file_name, "/"));
     $file_id = File::getFileID($properties_file_name, $project_id, $version);
     # Match plugin exclude list
     $match = false;
     foreach ($patterns as $pattern) {
         if (preg_match($pattern, $properties_file_name)) {
             $match = true;
             break;
         }
     }
     if (!$match) {
         if ($file_id > 0 && $files[$file_id] != null) {
             # Existing file
             $file = $files[$file_id];
             $file->is_active = 1;
             unset($files[$file_id]);
         } else {