]> git.mxchange.org Git - core.git/blobdiff - inc/classes/middleware/compressor/class_CompressorChannel.php
Fixed some stuff + added debug lines.
[core.git] / inc / classes / middleware / compressor / class_CompressorChannel.php
index 8ca26e13ada068b1b91871062b2095eeaaa74384..ba7bbfa58d1f3dad3b56d8a294365e43f3cf4d7d 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * Middleware class for selecting the right compressor channel
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2013 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -57,10 +57,13 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
                                $compressorInstance->getConfigInstance()->getConfigEntry('compressor_base_path');
 
                        // Get a directory pointer
-                       $dirPointer = FrameworkDirectoryPointer::createFrameworkDirectoryPointer($baseDir);
+                       $directoryInstance = ObjectFactory::createObjectByConfiguredName('directory_class', array($baseDir));
+
+                       // Read all directories but no sub directories, .htaccess files and NullCompressor class
+                       while ($directoryEntry = $directoryInstance->readDirectoryExcept(array('.htaccess', 'class_NullCompressor.php'))) {
+                               // Debug message
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('COMPRESSOR[' . __METHOD__ . ':' . __LINE__ . ']: directoryEntry=' . $directoryEntry);
 
-                       // Read all directories but no sub directories
-                       while ($directoryEntry = $dirPointer->readDirectoryExcept(array('..', '.', '.htaccess', '.svn', 'class_NullCompressor.php'))) {
                                // Is this a class file?
                                if ((substr($directoryEntry, 0, 6) == 'class_') && (substr($directoryEntry, -4, 4) == '.php')) {
                                        /* Get the compressor's name. That's why you must name
@@ -87,7 +90,7 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
                        } // END - while
 
                        // Close the directory
-                       $dirPointer->closeDirectory();
+                       $directoryInstance->closeDirectory();
                } // END - if
 
                // Check again if there is a compressor