[geeklog-cvs] geeklog-1.3/public_html/admin story.php,1.97,1.98

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Sun Jul 6 09:56:01 EDT 2003


Update of /usr/cvs/geeklog/geeklog-1.3/public_html/admin
In directory internal.geeklog.net:/tmp/cvs-serv13959

Modified Files:
	story.php 
Log Message:
Don't emit errors when we fail to delete images from stories - only log the problem in error.log but continue anyway.


Index: story.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/story.php,v
retrieving revision 1.97
retrieving revision 1.98
diff -C2 -d -r1.97 -r1.98
*** story.php	6 Jul 2003 09:34:32 -0000	1.97
--- story.php	6 Jul 2003 13:55:58 -0000	1.98
***************
*** 788,794 ****
              $ai_filename = DB_getItem ($_TABLES['article_images'],'ai_filename',                    "ai_sid = '$sid' AND ai_img_num = " . key ($delete));
              $curfile = $_CONF['path_html'] . 'images/articles/' . $ai_filename;
!             if (!unlink($curfile)) {
                  echo COM_errorLog("Unable to delete image $curfile. Please check file permissions");
-                 exit;
              }
  
--- 788,793 ----
              $ai_filename = DB_getItem ($_TABLES['article_images'],'ai_filename',                    "ai_sid = '$sid' AND ai_img_num = " . key ($delete));
              $curfile = $_CONF['path_html'] . 'images/articles/' . $ai_filename;
!             if (!@unlink($curfile)) {
                  echo COM_errorLog("Unable to delete image $curfile. Please check file permissions");
              }
  
***************
*** 799,805 ****
                                        . $lFilename_large;
              if (file_exists ($lFilename_large_complete)) {
!                 if (!unlink ($lFilename_large_complete)) {
                      echo COM_errorLog ('Unable to remove the following image from the article: ' . $lFilename_large_complete);
-                     exit;
                  }
              }
--- 798,803 ----
                                        . $lFilename_large;
              if (file_exists ($lFilename_large_complete)) {
!                 if (!@unlink ($lFilename_large_complete)) {
                      echo COM_errorLog ('Unable to remove the following image from the article: ' . $lFilename_large_complete);
                  }
              }
***************
*** 808,812 ****
              next($delete);
          }
!         
          // OK, let's upload any pictures with the article
          if (DB_count($_TABLES['article_images'], 'ai_sid', $sid) > 0) {
--- 806,810 ----
              next($delete);
          }
! 
          // OK, let's upload any pictures with the article
          if (DB_count($_TABLES['article_images'], 'ai_sid', $sid) > 0) {
***************
*** 941,947 ****
              $A = DB_fetchArray($result);
              $filename = $_CONF['path_html'] . 'images/articles/' . $A['ai_filename'];
!             if (!unlink($filename)) {
                  echo COM_errorLog('Unable to remove the following image from the article: ' . $filename);
-                 exit;
              }
  
--- 939,944 ----
              $A = DB_fetchArray($result);
              $filename = $_CONF['path_html'] . 'images/articles/' . $A['ai_filename'];
!             if (!@unlink($filename)) {
                  echo COM_errorLog('Unable to remove the following image from the article: ' . $filename);
              }
  
***************
*** 952,958 ****
                                        . $lFilename_large;
              if (file_exists ($lFilename_large_complete)) {
!                 if (!unlink ($lFilename_large_complete)) {
                      echo COM_errorLog ('Unable to remove the following image from the article: ' . $lFilename_large_complete);
-                     exit;
                  }
              }
--- 949,954 ----
                                        . $lFilename_large;
              if (file_exists ($lFilename_large_complete)) {
!                 if (!@unlink ($lFilename_large_complete)) {
                      echo COM_errorLog ('Unable to remove the following image from the article: ' . $lFilename_large_complete);
                  }
              }





More information about the geeklog-cvs mailing list