Index: inline.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/inline/inline.module,v
retrieving revision 1.20
diff -u -r1.20 inline.module
--- inline.module	6 Feb 2007 10:34:05 -0000	1.20
+++ inline.module	6 Feb 2007 11:34:34 -0000
@@ -138,8 +138,8 @@
       // only nodes with our inline filter in the format may be altered
       foreach (filter_list_format($node->format) as $filter) {
         if ($filter->module == 'inline') {
-          $node->teaser = _inline_substitute_tags($node, 'teaser');
-          $node->body = _inline_substitute_tags($node, 'body');
+          $node->teaser = _inline_substitute_tags($node, 'teaser', $op);
+          $node->body = _inline_substitute_tags($node, 'body', $op);
           break;
         }
       }
@@ -269,7 +269,7 @@
   return $node;
 }
 
-function _inline_substitute_tags(&$node, $field) {
+function _inline_substitute_tags(&$node, $field, $op = NULL) {
   if (preg_match_all("/\[(inline|file|attachment):([^=\\]]+)=?([^\\]]*)?\]/i", $node->$field, $match)) {
     foreach ($match[2] as $key => $value) {
       // fetch file object
@@ -282,7 +282,7 @@
       $replace = "";
       if ($file->fid != NULL) {
         //decide if we should show a link or an img tag
-        if (_inline_decide_img_tag($file)) {
+        if (_inline_decide_img_tag($file, $op)) {
           $replace = theme('inline_img', $file);
         }
         else {
@@ -334,7 +334,7 @@
  * @param $file a file object
  * @return TRUE in case an img tag should be generated
  */
-function _inline_decide_img_tag($file) {
+function _inline_decide_img_tag($file, $op) {
   $inlined = array('jpg', 'jpeg', 'pjpeg', 'gif', 'png');
   $mime = array_pop(explode('/', $file->filemime));
   if (in_array($mime, $inlined)) {
@@ -351,6 +351,9 @@
     if (($width && $height) && ($width <= $maxwidth && $height <= $maxheight)) {
       return TRUE;
     }
+    else if ($op == 'prepare') {
+      drupal_set_message(t('%filename exceeds inline image display dimensions.', array('%filename' => $file->filename)));
+    }
   }
   return FALSE;
 }
