[TEP-COMMIT] CVS: admin/admin categories.php,1.146,1.147

cvs-OfajU3CKLf1/[email protected]
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
Update of /pack/cvsroots/oscommerce/admin/admin
In directory sunsite.dk:/tmp/cvs-serv12253

Modified Files:
	categories.php 
Log Message:
Fix bug 1450

Index: categories.php
===================================================================
RCS file: /pack/cvsroots/oscommerce/admin/admin/categories.php,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -d -r1.146 -r1.147
--- categories.php	2003/07/11 14:40:27	1.146
+++ categories.php	2004/02/14 19:29:44	1.147
@@ -310,15 +310,18 @@
         tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id . '&pID=' . $products_id));
         break;
       case 'new_product_preview':
+       if (!isset($HTTP_GET_VARS['read'])) {
+
 // copy image only if modified
-        $products_image = new upload('products_image');
-        $products_image->set_destination(DIR_FS_CATALOG_IMAGES);
-        if ($products_image->parse() && $products_image->save()) {
-          $products_image_name = $products_image->filename;
-        } else {
-          $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
-        }
-        break;
+          $products_image = new upload('products_image');
+          $products_image->set_destination(DIR_FS_CATALOG_IMAGES);
+          if ($products_image->parse() && $products_image->save()) {
+            $products_image_name = $products_image->filename;
+          } else {
+            $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
+          }
+          break;
+      }
     }
   }
 



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.