Index: image.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/image.module,v
retrieving revision 1.99
diff -u -F^function -r1.99 image.module
--- image.module	25 Jan 2004 17:52:47 -0000	1.99
+++ image.module	29 Jan 2004 01:04:08 -0000
@@ -465,7 +470,7 @@ function image_validate(&$node) {
       }
 
       // Check File Size
-      if ($errortxt = _check_filesize_limits($temp_file)) {
+      if ($errortxt = _check_filesize_limits($temp_file, $node->personal)) {
         $error["image"] = theme("error", $errortxt);
       }
       else {
@@ -1001,7 +1043,7 @@ function _image_strip_name($filename) {
   return strtolower(preg_replace("/[^A-Za-z0-9\.\-\+\/_]/","",$filename));
 }
 
-function _check_filesize_limits($image_file) {
+function _check_filesize_limits($image_file, $personal = 0) {
   global $user;
   $user_images = db_fetch_object(db_query("SELECT COUNT(*) AS c, SUM(i.filesize) AS size FROM {image} i, {node} n WHERE i.personal = 1 AND i.nid = n.nid AND n.uid = ".$user->uid));
 
@@ -1015,13 +1057,13 @@ function _check_filesize_limits($image_f
     $max_num = variable_get("image_personal_gallery_max_num", "50");
   }
 
-  if ($user_images->c >= $max_num) {
+  if ($user_images->c >= $max_num && $personal) {
     $error = t("You can have at most %a images in your gallery.", array("%a" => $max_num));
   }
 
   else {
     $max_kb = variable_get("image_gallery_max_kb", "1000") * 1000;
-    if (($user_images->size + $fsize) > $max_kb) {
+    if (($user_images->size + $fsize) > $max_kb && $personal) {
       $error = t("You have %a kb for your gallery.", array("%a" => $max_kb));
     }
 
