Index: /trunk/admin/batch_manager_global.php
===================================================================
--- /trunk/admin/batch_manager_global.php	(revision 10453)
+++ /trunk/admin/batch_manager_global.php	(revision 10454)
@@ -44,4 +44,10 @@
 }
 
+// User cache must not be regenerated during simultaneous ajax requests
+if (!isset($user['need_update']) or !$user['need_update'])
+{
+  getuserdata($user['id'], true);
+}
+
 // +-----------------------------------------------------------------------+
 // | Check Access and exit when user status is not ok                      |
@@ -410,10 +416,25 @@
 
     if ($_POST['regenerateError'] != '0')
-      array_push($page['warnings'], sprintf(l10n('%s thumbnails have been regenerated'), $_POST['regenerateError']));
-
+      array_push($page['warnings'], sprintf(l10n('%s thumbnails can not be regenerated'), $_POST['regenerateError']));
+
+    $update_fields = array('thumb_maxwidth', 'thumb_maxheight', 'thumb_quality');
+  }
+
+  if ('regenerateWebsize' == $action)
+  {
+    if ($_POST['regenerateSuccess'] != '0')
+      array_push($page['infos'], sprintf(l10n('%s photos have been regenerated'), $_POST['regenerateSuccess']));
+
+    if ($_POST['regenerateError'] != '0')
+      array_push($page['warnings'], sprintf(l10n('%s photos can not be regenerated'), $_POST['regenerateError']));
+
+    $update_fields = array('websize_maxwidth', 'websize_maxheight', 'websize_quality');
+  }
+
+  if (!empty($update_fields))
+  {
     // Update configuration
-    $fields = array('thumb_maxwidth', 'thumb_maxheight', 'thumb_quality');
     $updates = array();
-    foreach ($fields as $field)
+    foreach ($update_fields as $field)
     {
       $value = null;
@@ -451,9 +472,4 @@
         );
     }
-    function regenerateThumbnails_prefilter($content, $smarty)
-    {
-      return str_replace('{$thumbnail.TN_SRC}', '{$thumbnail.TN_SRC}?rand='.md5(uniqid(rand(), true)), $content);
-    }
-    $template->set_prefilter('batch_manager_global', 'regenerateThumbnails_prefilter');
     $template->delete_compiled_templates();
   }
@@ -784,4 +800,10 @@
   );
 
+function regenerateThumbnails_prefilter($content, $smarty)
+{
+  return str_replace('{$thumbnail.TN_SRC}', '{$thumbnail.TN_SRC}?rand='.md5(uniqid(rand(), true)), $content);
+}
+$template->set_prefilter('batch_manager_global', 'regenerateThumbnails_prefilter');
+
 trigger_action('loc_end_element_set_global');
 
Index: /trunk/admin/themes/default/template/batch_manager_global.tpl
===================================================================
--- /trunk/admin/themes/default/template/batch_manager_global.tpl	(revision 10453)
+++ /trunk/admin/themes/default/template/batch_manager_global.tpl	(revision 10454)
@@ -36,11 +36,6 @@
 var selectedMessage_all = "{'All %d photos are selected'|@translate}";
 var regenerateThumbnailsMessage = "{'Thumbnails generation in progress...'|@translate}";
+var regenerateWebsizeMessage = "{'Photos generation in progress...'|@translate}";
 {literal}
-var queuedManagerThumbnails = $.manageAjax.create('queued', { 
-	queue: true,  
-	cacheResponse: false,
-	maxRequests: 3
-});
-
 function str_repeat(i, m) {
         for (var o = []; m > 0; o[--m] = i);
@@ -328,53 +323,76 @@
 
   jQuery('#applyAction').click(function() {
-    if (jQuery('[name="selectAction"]').val() == 'regenerateThumbnails') {
-      if (elements.length != 0)
-        return true;
-
-      if (jQuery('input[name="setSelected"]').attr('checked'))
-        elements = all_elements;
-      else
-        jQuery('input[name="selection[]"]').each(function() {
-          if (jQuery(this).attr('checked')) {
-            elements.push(jQuery(this).val());
-          }
-        });
-
+    if (elements.length != 0)
+    {
+      return true;
+    }
+    else if (jQuery('[name="selectAction"]').val() == 'regenerateThumbnails')
+    {
+      type = 'thumbnail';
+      maxRequests = 3;
       maxwidth = jQuery('input[name="thumb_maxwidth"]').val();
       maxheight = jQuery('input[name="thumb_maxheight"]').val();
-      progressBar_max = elements.length;
-      todo = 0;
-
-      jQuery('#thumb_config').hide();
-      jQuery('#applyActionBlock').hide();
-      jQuery('select[name="selectAction"]').hide();
-      jQuery('#regenerationMsg').show();
-      jQuery('#regenerationText').html(regenerateThumbnailsMessage);
-      jQuery('#progressBar').progressBar(0, {
-        max: progressBar_max,
-        textFormat: 'fraction',
-        boxImage: 'themes/default/images/progressbar.gif',
-        barImage: 'themes/default/images/progressbg_orange.gif'
+      regenerationText = regenerateThumbnailsMessage;
+    }
+    else if(jQuery('[name="selectAction"]').val() == 'regenerateWebsize')
+    {
+      type = 'websize';
+      maxRequests = 1;
+      maxwidth = jQuery('input[name="websize_maxwidth"]').val();
+      maxheight = jQuery('input[name="websize_maxheight"]').val();
+      regenerationText = regenerateWebsizeMessage;
+    }
+    else return true;
+
+    jQuery('.bulkAction').hide();
+    jQuery('#regenerationText').html(regenerationText);
+
+    var queuedManager = jQuery.manageAjax.create('queued', { 
+      queue: true,  
+      cacheResponse: false,
+      maxRequests: maxRequests
+    });
+
+    if (jQuery('input[name="setSelected"]').attr('checked'))
+      elements = all_elements;
+    else
+      jQuery('input[name="selection[]"]').each(function() {
+        if (jQuery(this).attr('checked')) {
+          elements.push(jQuery(this).val());
+        }
       });
 
-      for (i=0;i<elements.length;i++) {
-        queuedManagerThumbnails.add({
-          type: 'GET', 
-          url: 'ws.php', 
-          data: {
-            method: 'pwg.images.resize',
-            type: 'thumbnail',
-            maxwidth: maxwidth,
-            maxheight: maxheight,
-            image_id: elements[i],
-            format: 'json'
-          },
-          dataType: 'json',
-          success: ( function(data) { progress(++todo, progressBar_max, data['result']) }),
-          error: ( function(data) { progress(++todo, progressBar_max, false) })
-        });
-      }
-      return false;
-    }
+    progressBar_max = elements.length;
+    todo = 0;
+
+    jQuery('#applyActionBlock').hide();
+    jQuery('select[name="selectAction"]').hide();
+    jQuery('#regenerationMsg').show();
+    
+    jQuery('#progressBar').progressBar(0, {
+      max: progressBar_max,
+      textFormat: 'fraction',
+      boxImage: 'themes/default/images/progressbar.gif',
+      barImage: 'themes/default/images/progressbg_orange.gif'
+    });
+
+    for (i=0;i<elements.length;i++) {
+      queuedManager.add({
+        type: 'GET', 
+        url: 'ws.php', 
+        data: {
+          method: 'pwg.images.resize',
+          type: type,
+          maxwidth: maxwidth,
+          maxheight: maxheight,
+          image_id: elements[i],
+          format: 'json'
+        },
+        dataType: 'json',
+        success: ( function(data) { progress(++todo, progressBar_max, data['result']) }),
+        error: ( function(data) { progress(++todo, progressBar_max, false) })
+      });
+    }
+    return false;
   });
 
@@ -553,4 +571,5 @@
   {/if}
       <option value="regenerateThumbnails">{'Regenerate Thumbnails'|@translate}</option>
+      <option value="regenerateWebsize">{'Regenerate Websize Photos'|@translate}</option>
   {if !empty($element_set_global_plugins_actions)}
     {foreach from=$element_set_global_plugins_actions item=action}
@@ -641,5 +660,5 @@
     <!-- regenerate thumbnails -->
     <div id="action_regenerateThumbnails" class="bulkAction">
-      <table style="margin-left:20px;" id="thumb_config">
+      <table style="margin-left:20px;">
         <tr>
           <th>{'Maximum Width'|@translate}</th>
@@ -657,6 +676,29 @@
     </div>
 
+    <!-- regenerate websize -->
+    <div id="action_regenerateWebsize" class="bulkAction">
+      <p>
+        <img src="admin/themes/default/icon/warning.png" alt="!" style="vertical-align:middle;">
+        {'Only photos with HD can be regenerated!'|@translate}
+      </p>
+
+      <table style="margin:10px 20px;">
+        <tr>
+          <th>{'Maximum Width'|@translate}</th>
+          <td><input type="text" name="websize_maxwidth" value="{$upload_form_settings.websize_maxwidth}" size="4" maxlength="4"> {'pixels'|@translate}</td>
+        </tr>
+        <tr>
+          <th>{'Maximum Height'|@translate}</th>
+          <td><input type="text" name="websize_maxheight" value="{$upload_form_settings.websize_maxheight}" size="4" maxlength="4"> {'pixels'|@translate}</td>
+        </tr>
+        <tr>
+          <th>{'Image Quality'|@translate}</th>
+          <td><input type="text" name="websize_quality" value="{$upload_form_settings.websize_quality}" size="3" maxlength="3"> %</td>
+        </tr>
+      </table>
+    </div>
+
     <!-- progress bar -->
-    <div id="regenerationMsg" style="display:none;">
+    <div id="regenerationMsg" class="bulkAction">
       <p id="regenerationText" style="margin-bottom:10px;"></p>
       <span class="progressBar" id="progressBar"></span>
Index: /trunk/include/ws_functions.inc.php
===================================================================
--- /trunk/include/ws_functions.inc.php	(revision 10453)
+++ /trunk/include/ws_functions.inc.php	(revision 10454)
@@ -2727,4 +2727,9 @@
       false
       );
+
+    $conf['use_exif'] = false;
+    $conf['use_iptc'] = false;
+    update_metadata(array($image['id'] => $image['path']));
+
     return true;
   }
