[evolvis-commits] r12555: Apply patch [#2713] Misc fixes for attachement.php (forum)

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Feb 28 01:45:57 CET 2011


Author: mirabilos
Date: 2011-02-28 01:45:56 +0100 (Mon, 28 Feb 2011)
New Revision: 12555

Modified:
   trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/attachment.php
Log:
Apply patch [#2713] Misc fixes for attachement.php (forum)

Modified: trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/attachment.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/attachment.php	2011-02-28 00:45:51 UTC (rev 12554)
+++ trunk/gforge_base/evolvisforge-5.1/gforge/www/forum/attachment.php	2011-02-28 00:45:56 UTC (rev 12555)
@@ -129,7 +129,7 @@
 			$fm = new ForumMessage($f,$msg_id,false,false);
 			$am->SetForumMsg($fm);
 			$attach = getUploadedFile("attachment1");
-			if ($attachid==0) {
+			if ($attachid) {
 				//update existing one
 				$attachok = $am->attach($attach,$group_id,$attachid,$msg_id);
 				if ($attachok!=false) {
@@ -138,7 +138,7 @@
 				}
 			} else {
 				//add new one
-				$attachok = $am->attach($attach,$group_id,$attachid);
+				$attachok = $am->attach($attach,$group_id,$attachid, $msg_id);
 				if ($attachok!=false) {
 					$fm->fetchData($msg_id);
 					$fm->sendAttachNotice($attachok);
@@ -198,8 +198,6 @@
 
 $last = gmdate('D, d M Y H:i:s', db_result($res,0,'dateline'));
 header('X-Powered-By:');
-header('Cache-control: max-age=31536000');
-header('Expires: ' . gmdate("D, d M Y H:i:s", time() + 31536000) . ' GMT');
 header('Last-Modified: ' . $last . ' GMT');
 header('ETag: "' . db_result($res,0,'attachmentid') . '"');
 



More information about the evolvis-commits mailing list