[geeklog-cvs] geeklog-1.3/public_html getimage.php,1.2,1.3

tony at geeklog.net tony at geeklog.net
Tue Jan 6 23:23:22 EST 2004


Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory geeklog_prod:/tmp/cvs-serv11601

Modified Files:
	getimage.php 
Log Message:
now has a show mode which is used to display the original image saved to an article (this is used in the case resizing is enabled).

Index: getimage.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/getimage.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** getimage.php	7 Jan 2004 01:34:10 -0000	1.2
--- getimage.php	7 Jan 2004 04:23:20 -0000	1.3
***************
*** 75,78 ****
--- 75,79 ----
  // Set the path properly
  switch ($mode) {
+     case 'show':
      case 'articles':
          $downloader->setPath($_CONF['path_images'] . 'articles/');
***************
*** 91,95 ****
  // Let's see if we don't have a legit file.  If not bail
  if (is_file($downloader->getPath() . $image)) {
!     $downloader->downloadFile($image);
  } else {
      COM_errorLog('File, ' . $downloader->getPath() . $image . ', was not found in getimage.php');
--- 92,100 ----
  // Let's see if we don't have a legit file.  If not bail
  if (is_file($downloader->getPath() . $image)) {
!     if ($mode == 'show') {
!         echo '<html><body><img src="' . $_CONF['site_url'] . '/getimage.php?mode=articles&image=' . $image . '" /></body></html>';
!     } else {
!         $downloader->downloadFile($image);
!     }
  } else {
      COM_errorLog('File, ' . $downloader->getPath() . $image . ', was not found in getimage.php');





More information about the geeklog-cvs mailing list