[geeklog-cvs] geeklog: Source code cosmetics (mostly whitespaces) - no change ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Oct 12 02:55:08 EDT 2008


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e99d95caff64
changeset: 6438:e99d95caff64
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun Oct 12 08:54:54 2008 +0200
description:
Source code cosmetics (mostly whitespaces) - no change in functionality

diffstat:

2 files changed, 58 insertions(+), 57 deletions(-)
system/classes/downloader.class.php |   87 +++++++++++++++++------------------
system/classes/upload.class.php     |   28 +++++------

diffs (299 lines):

diff -r 8daaba43629e -r e99d95caff64 system/classes/downloader.class.php
--- a/system/classes/downloader.class.php	Sun Oct 12 08:40:08 2008 +0200
+++ b/system/classes/downloader.class.php	Sun Oct 12 08:54:54 2008 +0200
@@ -32,8 +32,9 @@
 // $Id: downloader.class.php,v 1.15 2008/08/11 14:11:21 dhaun Exp $
 
 /**
-* This class allows you to download a file from outside the web tree.  Many hooks
-* around security and file types have been added for customization within any app
+* This class allows you to download a file from outside the web tree.  Many
+* hooks around security and file types have been added for customization within
+* any app.
 *
 * @author   Tony Bibbs
 *
@@ -85,7 +86,7 @@
     * @access private
     */
     var $_limitByIP;            // Boolean
-    
+
     /**
     * Constructor
     *
@@ -105,7 +106,7 @@
         $this->_setAvailableExtensions ();
 
     }
-    
+
     // PRIVATE METHODS
 
     /**
@@ -124,7 +125,7 @@
             $this->_logItem('Warning',$warningText);
         }
     }
-    
+
     /**
     * Adds an error that was encountered
     *
@@ -158,7 +159,7 @@
             $this->_logItem('Debug',$debugText);
         }
     }
-    
+
     /**
     * Logs an item to the log file
     *
@@ -181,7 +182,7 @@
         fclose($file);
         return true;
     }
-    
+
     /**
     * Defines superset of available Mime types.
     *
@@ -193,30 +194,30 @@
         if (sizeof($extensions) == 0) {
             $this->_availableMimeTypes = 
                 array(
-                    'tgz' => 'application/x-gzip-compressed',
-                    'gz' =>  'application/x-gzip-compressed',
-                    'zip' => 'application/x-zip-compresseed',
-                    'tar' => 'application/x-tar',
-                    'php' => 'text/plain',
+                    'tgz'  => 'application/x-gzip-compressed',
+                    'gz'   => 'application/x-gzip-compressed',
+                    'zip'  => 'application/x-zip-compresseed',
+                    'tar'  => 'application/x-tar',
+                    'php'  => 'text/plain',
                     'phps' => 'text/plain',
-                    'txt' => 'text/plain',
+                    'txt'  => 'text/plain',
                     'html' => 'text/html',
-                    'htm' => 'text/html',
-                    'bmp' => 'image/bmp',
-                    'ico' => 'image/bmp',
-                    'gif' => 'image/gif',
-                    'jpg' => 'image/jpeg',
+                    'htm'  => 'text/html',
+                    'bmp'  => 'image/bmp',
+                    'ico'  => 'image/bmp',
+                    'gif'  => 'image/gif',
+                    'jpg'  => 'image/jpeg',
                     'jpeg' => 'image/jpeg',
-                    'png' => 'image/png',
-                    'png' => 'image/x-png',
-                    'mp3' => 'audio/mpeg',
-                    'wav' => 'audio/wav',
-                    'pdf' => 'application/pdf',
-                    'swf' => 'application/x-shockwave-flash',
-                    'doc' => 'application/msword',
-                    'xls' => 'application/vnd.ms-excel',
-                    'exe' => 'application/octet-stream',
-                    'sql' => 'text/plain'
+                    'png'  => 'image/png',
+                    'png'  => 'image/x-png',
+                    'mp3'  => 'audio/mpeg',
+                    'wav'  => 'audio/wav',
+                    'pdf'  => 'application/pdf',
+                    'swf'  => 'application/x-shockwave-flash',
+                    'doc'  => 'application/msword',
+                    'xls'  => 'application/vnd.ms-excel',
+                    'exe'  => 'application/octet-stream',
+                    'sql'  => 'text/plain'
                 );
         } else {
             $this->_availableMimeTypes = $extensions;
@@ -227,9 +228,9 @@
             $this->_availableExtensions[] = $ext;
         }
     }
-    
+
     // Public Methods
-    
+
     /**
     * Extra security option that forces all attempts to upload a file to be done
     * so from a set of VERY specific IP's.  This is only good for those who are
@@ -250,7 +251,7 @@
             return false;
         }
     }
-    
+
     /**
     * Sets log file
     *
@@ -269,7 +270,7 @@
         $this->_logFile = $logFile;
         return true;
     }
-    
+
     /**
     * Enables/disables logging of errors and warnings
     *
@@ -298,7 +299,7 @@
     {
         return $this->_doLogging;
     }
-    
+
     /**
     * Will force the debug messages in this class to be
     * printed
@@ -316,7 +317,7 @@
             $this->_debug = false;
         }
     }
-    
+
     /**
     * This function will print any errors out.  This is useful in debugging
     *
@@ -341,7 +342,7 @@
             return $retval;
         }
     }
-    
+
     /**
     * This function will print any warnings out.  This is useful in debugging
     *
@@ -357,7 +358,7 @@
             }
         }
     }
-    
+
     /**
     * This function will print any debmug messages out.
     *
@@ -373,7 +374,7 @@
             }
         }
     }
-    
+
     /**
     * Returns if any errors have been encountered thus far
     *
@@ -388,7 +389,7 @@
             return false;
         }
     }
-    
+
     /**
     * Sets allowed mime types for this instance
     *
@@ -408,7 +409,7 @@
         }
         $this->_allowedExtensions = $validExtensions;
     }
-    
+
     /**
     * Gets allowed mime types for this instance
     *
@@ -419,7 +420,7 @@
     {
         return $this->_allowedExtensions;
     }
-    
+
     /**
     * Checks to see that mime type for current file is allowed for upload
     *
@@ -436,7 +437,7 @@
             return true;
         }
     }
-    
+
     /**
     * Sets file upload path
     *
@@ -460,7 +461,7 @@
         
         return true;
     }
-    
+
     /**
     * Returns directory to upload to
     *
@@ -471,7 +472,7 @@
     {
         return $this->_sourceDirectory;
     }
-    
+
     /**
     * Attempts to dowload a file
     *
diff -r 8daaba43629e -r e99d95caff64 system/classes/upload.class.php
--- a/system/classes/upload.class.php	Sun Oct 12 08:40:08 2008 +0200
+++ b/system/classes/upload.class.php	Sun Oct 12 08:54:54 2008 +0200
@@ -2,16 +2,16 @@
 
 /* Reminder: always indent with 4 spaces (no tabs). */
 // +---------------------------------------------------------------------------+
-// | Geeklog 1.4                                                               |
+// | Geeklog 1.5                                                               |
 // +---------------------------------------------------------------------------+
 // | upload.class.php                                                          |
 // |                                                                           |
 // | Geeklog file upload class library.                                        |
 // +---------------------------------------------------------------------------+
-// | Copyright (C) 2002-2006 by the following authors:                         |
+// | Copyright (C) 2002-2008 by the following authors:                         |
 // |                                                                           |
-// | Authors: Tony Bibbs       - tony at tonybibbs.com                            |
-// |          Dirk Haun        - dirk at haun-online.de                           |
+// | Authors: Tony Bibbs       - tony AT tonybibbs DOT com                     |
+// |          Dirk Haun        - dirk AT haun-online DOT de                    |
 // +---------------------------------------------------------------------------+
 // |                                                                           |
 // | This program is free software; you can redistribute it and/or             |
@@ -259,23 +259,23 @@
             $this->_availableMimeTypes =
             array(
                 'application/x-gzip-compressed'     => '.tar.gz,.tgz',
-                'application/x-zip-compressed'         => '.zip',
-                'application/x-tar'                    => '.tar',
+                'application/x-zip-compressed'      => '.zip',
+                'application/x-tar'                 => '.tar',
                 'text/plain'                        => '.phps,.txt,.inc',
-                'text/html'                            => '.html,.htm',
+                'text/html'                         => '.html,.htm',
                 'image/bmp'                         => '.bmp,.ico',
                 'image/gif'                         => '.gif',
-                'image/pjpeg'                        => '.jpg,.jpeg',
+                'image/pjpeg'                       => '.jpg,.jpeg',
                 'image/jpeg'                        => '.jpg,.jpeg',
-                'image/png'                            => '.png',
-                'image/x-png'                        => '.png',
+                'image/png'                         => '.png',
+                'image/x-png'                       => '.png',
                 'audio/mpeg'                        => '.mp3',
-                'audio/wav'                            => '.wav',
-                'application/pdf'                    => '.pdf',
+                'audio/wav'                         => '.wav',
+                'application/pdf'                   => '.pdf',
                 'application/x-shockwave-flash'     => '.swf',
                 'application/msword'                => '.doc',
-                'application/vnd.ms-excel'            => '.xls',
-                'application/octet-stream'            => '.fla,.psd'
+                'application/vnd.ms-excel'          => '.xls',
+                'application/octet-stream'          => '.fla,.psd'
             );
         } else {
             $this->_availableMimeTypes = $mimeTypes;



More information about the geeklog-cvs mailing list