fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [6755] API: pdf seems to work for IE without redirect


From: Sigurd Nes
Subject: [Fmsystem-commits] [6755] API: pdf seems to work for IE without redirect ( fixing clear cache in case not)
Date: Wed, 12 Jan 2011 12:46:05 +0000

Revision: 6755
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6755
Author:   sigurdne
Date:     2011-01-12 12:46:05 +0000 (Wed, 12 Jan 2011)
Log Message:
-----------
API: pdf seems to work for IE without redirect (fixing clear cache in case not)

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.pdf.inc.php

Modified: trunk/phpgwapi/inc/class.pdf.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.pdf.inc.php        2011-01-12 12:44:52 UTC (rev 
6754)
+++ trunk/phpgwapi/inc/class.pdf.inc.php        2011-01-12 12:46:05 UTC (rev 
6755)
@@ -51,7 +51,8 @@
                {       
                        $browser = createObject('phpgwapi.browser');
 
-                       if($browser->BROWSER_AGENT != 'IE')
+//                     if($browser->BROWSER_AGENT != 'IE')
+                       if(true)
                        {
                                $size = strlen($document);
                                $browser->content_header($document_name 
.'.pdf','application/pdf', $size);
@@ -104,14 +105,14 @@
                 */
                protected function _clear_cache($dir)
                {
-                       $min_ctime = 60 * 60;
+                       $min_ctime = time() - (60*60);
                        $dir = new DirectoryIterator($dir);
-                       foreach ( $dir as $file )
+                       foreach ( $dir as $fileinfo )
                        {
-                               if ( preg_match('/^PDF_/', $file)
-                                       && $file->getCTime() < $min_ctime )
+                               if ( preg_match('/^PDF_/', 
$fileinfo->getFilename())
+                                       && $fileinfo->getCTime() < $min_ctime )
                                {
-                                       unlink($file);
+                                       unlink($fileinfo->getPathname());
                                }
                        }
                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]