[geeklog-cvs] Geeklog-1.x/system/classes story.class.php, 1.35, 1.36

Dirk Haun dhaun at qs1489.pair.com
Sat Aug 16 14:07:12 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/system/classes
In directory qs1489.pair.com:/tmp/cvs-serv99848/system/classes

Modified Files:
	story.class.php 
Log Message:
Check that an unscaled image exists before adding a link to it


Index: story.class.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/system/classes/story.class.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** story.class.php	14 Aug 2008 16:52:01 -0000	1.35
--- story.class.php	16 Aug 2008 18:07:09 -0000	1.36
***************
*** 1038,1046 ****
                          }
  
!                         // And finally, replace the [imagex_mode] tags with the image and it's
!                         // hyperlink:
!                         $lLink_url = $lFilename_large_URL;
!                         $lLink_attr = array('title' => $LANG24[57]);
  
                          $intro = str_replace($norm,  COM_createLink($img_noalign,   $lLink_url, $lLink_attr), $intro);
                          $body  = str_replace($norm,  COM_createLink($img_noalign,   $lLink_url, $lLink_attr), $body);
--- 1038,1053 ----
                          }
  
!                         // And finally, replace the [imageX_mode] tags with the
!                         // image and its hyperlink (only when the large image
!                         // actually exists)
!                         $lLink_url  = '';
!                         $lLink_attr = '';
!                         if (file_exists($lFilename_large_complete)) {
!                             $lLink_url = $lFilename_large_URL;
!                             $lLink_attr = array('title' => $LANG24[57]);
!                         }
!                     }
  
+                     if (!empty($lLink_url)) {
                          $intro = str_replace($norm,  COM_createLink($img_noalign,   $lLink_url, $lLink_attr), $intro);
                          $body  = str_replace($norm,  COM_createLink($img_noalign,   $lLink_url, $lLink_attr), $body);




More information about the geeklog-cvs mailing list