Merge branch 'master' into refacuring/protocol_handler
authorRoland Haeder <roland@mxchange.org>
Sun, 11 Jan 2015 20:55:35 +0000 (21:55 +0100)
committerRoland Haeder <roland@mxchange.org>
Sun, 11 Jan 2015 20:55:44 +0000 (21:55 +0100)
Now with latest "core".

Signed-off-by: Roland Haeder <roland@mxchange.org>
Conflicts:
application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php
core

1  2 
application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php
core

index 7063492b0bd2c96f037c6cbaa84c3e00fa1d23fa,80d029b8057dea449cecf6f92fcf439a11c2b6bc..395ae5685f76fa288c2b312936c041c43e7eb3d5
@@@ -87,16 -103,12 +87,16 @@@ class CrawlerUploadedListUrlSource exte
                } // END - if
  
                // Read next entry
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE [' . __METHOD__ . ':' . __LINE__ . ']: this->csvFileImported=' . print_r($this->csvFileImported, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE [' . __METHOD__ . ':' . __LINE__ . ']: this->csvFileImported=' . print_r($this->csvFileImported, TRUE));
                $directoryEntry = $this->getDirectoryInstance()->readDirectoryExcept(array_merge(array('.htaccess', '.', '..'), $this->csvFileImported));
  
 -              // The read entry has not to be empty and extension must be '.csv'
 +              // Debug message
 +              /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE[' . __METHOD__ . ':' . __LINE__ . '] directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry);
 +
 +              // Is it empty or wrong file extension?
                if ((empty($directoryEntry)) || (substr($directoryEntry, -4, 4) != '.csv')) {
                        // Skip further processing
 +                      /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CRAWLER-SOURCE[' . __METHOD__ . ':' . __LINE__ . '] directoryEntry(' . strlen($directoryEntry) . ')=' . $directoryEntry . ' - SKIPPED!');
                        return FALSE;
                } // END - if
  
                return TRUE;
        }
  
 +      /**
 +       * Creates an instance of this class
 +       *
 +       * @return      $sourceInstance         An instance of a Source class
 +       */
 +      public final static function createCrawlerUploadedListUrlSource () {
 +              // Get new instance
 +              $sourceInstance = new CrawlerUploadedListUrlSource();
 +
 +              // Init source
 +              $sourceInstance->initSource('crawler', 'uploaded_list');
 +
 +              // Return the prepared instance
 +              return $sourceInstance;
 +      }
 +
+       /**
+        * Checks whether a CSV file has been loaded (added to the stack)
+        *
+        * @return      $isLoaded       Whether a CSV file has been loaded
+        */
+       private function isCsvFileAdded () {
+               // Check whether the stacker is not empty
+               $isLoaded = (($this->getStackSourceInstance()->isStackInitialized(self::STACK_NAME_CSV_FILE)) && (!$this->getStackSourceInstance()->isStackEmpty(self::STACK_NAME_CSV_FILE)));
+               // Return the result
+               return $isLoaded;
+       }
        /**
         * Initializes the import of the CSV file which is being processed by other task
         *
diff --cc core
index 75c9f46a844e78f1adeb6de63f2efe539f8e1d34,7c82fc25abc53c41e45953f4c3d9f50ed982b75c..3288f03df9e42997670846535cc0390f080599e5
--- 1/core
--- 2/core
+++ b/core
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit 75c9f46a844e78f1adeb6de63f2efe539f8e1d34
 -Subproject commit 7c82fc25abc53c41e45953f4c3d9f50ed982b75c
++Subproject commit 3288f03df9e42997670846535cc0390f080599e5