Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Set flag that this is a parent file.
- const _JEXEC = 1;
- error_reporting(E_ALL | E_NOTICE);
- //error_reporting(E_ALL & ~E_NOTICE);
- ini_set('display_errors', 1);
- // Load system defines
- if (file_exists(dirname(__DIR__) . '/defines.php'))
- {
- require_once dirname(__DIR__) . '/defines.php';
- }
- if (!defined('_JDEFINES'))
- {
- define('JPATH_BASE', dirname(__DIR__));
- require_once JPATH_BASE . '/includes/defines.php';
- }
- require_once JPATH_LIBRARIES . '/import.legacy.php';
- require_once JPATH_LIBRARIES . '/cms.php';
- // Load the configuration
- require_once JPATH_CONFIGURATION . '/configuration.php';
- require_once JPATH_SITE . '/modules/gng/gng_shared.php';
- $myApp = JApplicationCli::getInstance('GNGEmailToGuideDownloader');
- $hostname = GNGParam::getParam('email', 'hostname');
- $username = GNGParam::getParam('email_account_guides', 'username');
- $password = GNGParam::getParam('email_account_guides', 'password');
- $myApp->initStream($hostname, $username, $password);
- $myApp->execute();
- //retrieves new guides@ email from the server, saves it in the DB and notifies the guide
- class GNGEmailToGuideDownloader extends GNGEmailDownloader
- {
- //downloads the emails from the stream and assigns them to a tour or inquiry
- public function loadEmails() {
- $filepath = JPATH_SITE . '/modules/gng/EmailReplyParser/Parser/EmailParser.php';
- if (file_exists($filepath)) {
- JLoader::register('EmailParser', $filepath);
- $parser = new EmailParser();
- }
- namespace EmailReplyParserParser;
- use EmailReplyParserEmail;
- use EmailReplyParserFragment;
- /**
- * @author William Durand <william.durand1@gmail.com>
- */
- class EmailParser
- {
- const QUOTE_REGEX = '/>+$/s';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement