]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/smsqueuehandler.php
Twitter-compatible API - removed debugging statement
[quix0rs-gnu-social.git] / scripts / smsqueuehandler.php
index f6738053b79da563bf0b31277a3e1007a8a16661..8f0d02d9b67f76e35b17add1357de82e8e867f23 100755 (executable)
@@ -28,7 +28,7 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
 define('LACONICA', true);
 
 require_once(INSTALLDIR . '/lib/common.php');
-require_once(INSTALLDIR . '/lib/omb.php');
+require_once(INSTALLDIR . '/lib/mail.php');
 require_once(INSTALLDIR . '/lib/queuehandler.php');
 
 set_error_handler('common_error_handler');
@@ -36,29 +36,29 @@ set_error_handler('common_error_handler');
 class SmsQueueHandler extends QueueHandler {
        
        function transport() {
-               return 'omb';
+               return 'sms';
        }
 
        function start() {
+               $this->log(LOG_INFO, "INITIALIZE");
                return true;
        }
 
        function handle_notice($notice) {
-               mail_broadcast_notice_sms($notice);
+               return mail_broadcast_notice_sms($notice);
        }
        
        function finish() {
        }
 }
 
+ini_set("max_execution_time", "0");
+ini_set("max_input_time", "0");
+set_time_limit(0);
 mb_internal_encoding('UTF-8');
 
 $id = ($argc > 1) ? $argv[1] : NULL;
 
 $handler = new SmsQueueHandler($id);
 
-if ($handler->start()) {
-       $handler->handle_queue();
-}
-
-$handler->finish();
+$handler->runOnce();