]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.8.x' into cmdline
authorEvan Prodromou <evan@controlyourself.ca>
Mon, 22 Jun 2009 21:51:17 +0000 (14:51 -0700)
committerEvan Prodromou <evan@controlyourself.ca>
Mon, 22 Jun 2009 21:51:17 +0000 (14:51 -0700)
14 files changed:
1  2 
lib/common.php
scripts/enjitqueuehandler.php
scripts/facebookqueuehandler.php
scripts/jabberqueuehandler.php
scripts/maildaemon.php
scripts/ombqueuehandler.php
scripts/pingqueuehandler.php
scripts/publicqueuehandler.php
scripts/smsqueuehandler.php
scripts/synctwitterfriends.php
scripts/twitterqueuehandler.php
scripts/twitterstatusfetcher.php
scripts/xmppconfirmhandler.php
scripts/xmppdaemon.php

diff --combined lib/common.php
index 17eed71cdbea165774769e6272ad3bcdb26193ab,0333030e1d8753025a92e46c0cc5bc4fa1e4b121..a8c7634f6231b050a2e4b47421c846f7a3d54723
@@@ -1,7 -1,7 +1,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -67,25 -67,14 +67,25 @@@ function _sn_to_path($sn
      return $p;
  }
  
 -// try to figure out where we are
 -
 -$_server = array_key_exists('SERVER_NAME', $_SERVER) ?
 -  strtolower($_SERVER['SERVER_NAME']) :
 -  null;
 -$_path = array_key_exists('SCRIPT_NAME', $_SERVER) ?
 -  _sn_to_path($_SERVER['SCRIPT_NAME']) :
 -  null;
 +// try to figure out where we are. $server and $path
 +// can be set by including module, else we guess based
 +// on HTTP info.
 +
 +if (isset($server)) {
 +    $_server = $server;
 +} else {
 +    $_server = array_key_exists('SERVER_NAME', $_SERVER) ?
 +      strtolower($_SERVER['SERVER_NAME']) :
 +    null;
 +}
 +
 +if (isset($path)) {
 +    $_path = $path;
 +} else {
 +    $_path = array_key_exists('SCRIPT_NAME', $_SERVER) ?
 +      _sn_to_path($_SERVER['SCRIPT_NAME']) :
 +    null;
 +}
  
  // default configuration, overwritten in config.php
  
@@@ -94,7 -83,6 +94,6 @@@ $config 
          array('name' => 'Just another Laconica microblog',
                'server' => $_server,
                'theme' => 'default',
-               'skin' => 'default',
                'design' =>
                array('backgroundcolor' => '#F0F2F5',
                      'contentcolor' => '#FFFFFF',
                'blacklist' => array(),
                'autosource' => array()),
          'theme' =>
-         array('server' => null),
+         array('server' => null,
+               'dir' => null,
+               'path'=> null),
          'throttle' =>
          array('enabled' => false, // whether to throttle edits; false by default
                'count' => 20, // number of allowed messages in timespan
          ),
          'group' =>
          array('maxaliases' => 3),
-         'oohembed' => array('endpoint' => 'http://oohembed.com/oohembed/')
+         'oohembed' => array('endpoint' => 'http://oohembed.com/oohembed/'),
+         'search' =>
+         array('type' => 'fulltext'),
          );
  
  $config['db'] = &PEAR::getStaticProperty('DB_DataObject','options');
index 37fef0b04d794c67b504fb47c4326d08bd133191,c28bbe01d911de507ad9022d9ccd28efd40f039e..15ab3a4270d969f9bbd13c1ad708124b1feeac6e
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/mail.php');
  require_once(INSTALLDIR . '/lib/queuehandler.php');
@@@ -40,6 -35,7 +40,6 @@@ set_error_handler('common_error_handler
  
  class EnjitQueueHandler extends QueueHandler
  {
 -    
      function transport()
      {
          return 'enjit';
@@@ -64,6 -60,7 +64,6 @@@
                      return "skipped";
                  }
  
 -
                  #
                  # Build an Atom message from the notice
                  #
@@@ -96,8 -93,8 +96,8 @@@
          $ch   = curl_init();
  
          curl_setopt($ch, CURLOPT_URL, $url);
 - 
 -                curl_setopt($ch, CURLOPT_HEADER, 1); 
 +
 +                curl_setopt($ch, CURLOPT_HEADER, 1);
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
          curl_setopt($ch, CURLOPT_POST, 1) ;
          curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
                  #
          # curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
          # curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
 -                # curl_setopt($ch, CURLOPT_VERBOSE, 1); 
 +                # curl_setopt($ch, CURLOPT_VERBOSE, 1);
  
          $result = curl_exec($ch);
  
  
                  return $code;
      }
 -    
  
  }
  
index c24a22596400172493ed75a876fd4364f2300a7d,a505e8ecc64c6fd3d68532b0ea0a408d08d42883..f9123db8ce8c7b9ee141b777685a26490469bdb9
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/facebookutil.php');
  require_once(INSTALLDIR . '/lib/queuehandler.php');
@@@ -40,12 -35,12 +40,12 @@@ set_error_handler('common_error_handler
  
  class FacebookQueueHandler extends QueueHandler
  {
 -    
 +
      function transport()
      {
          return 'facebook';
      }
 -    
 +
      function start()
      {
          $this->log(LOG_INFO, "INITIALIZE");
@@@ -56,7 -51,7 +56,7 @@@
      {
          return facebookBroadcastNotice($notice);
      }
 -    
 +
      function finish()
      {
      }
index 454c67f7be497f3c06c38765fd0d79032a063b71,130be6e0475201f84a986ce89cd72940f9ff68b5..b848442fd1d9a39bcc3a8f8f9e03bcd15dfe69f9
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/jabber.php');
  require_once(INSTALLDIR . '/lib/xmppqueuehandler.php');
diff --combined scripts/maildaemon.php
index 0b9ab0debaf74f700fede997842c2d3999c79b0a,ccc1eef52fecf18fff3218b7e05db77d7b645ee8..dc3ab0b56e746d605c27db3d56fbf188ca184e4a
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 1) ? $argv[1] : null;
 +$path   = ($argc > 2) ? $argv[2] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/mail.php');
  require_once('Mail/mimeDecode.php');
@@@ -41,6 -36,7 +41,6 @@@
  
  class MailerDaemon
  {
 -
      function __construct()
      {
      }
index 6abc6d7f1e2c768e96c7fa492c516b9d006dc3af,5fe7cf01df1cfa0cd0baf39145e450402eb535aa..4c5890f57c8d5aeb671602b26c4c225ba0539d53
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/omb.php');
  require_once(INSTALLDIR . '/lib/queuehandler.php');
@@@ -40,12 -35,12 +40,12 @@@ set_error_handler('common_error_handler
  
  class OmbQueueHandler extends QueueHandler
  {
 -    
 +
      function transport()
      {
          return 'omb';
      }
 -    
 +
      function start()
      {
          $this->log(LOG_INFO, "INITIALIZE");
@@@ -61,7 -56,7 +61,7 @@@
              return omb_broadcast_remote_subscribers($notice);
          }
      }
 -    
 +
      function finish()
      {
      }
index 372c550f5d8bb0f8f75030ab28ad56af89e5c1ba,f57752cd2d2e7bb0c57b130433bd5dd0bcd8f596..84ef9be277de25b8b9cee60a1f0fec45720eeacf
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/ping.php');
  require_once(INSTALLDIR . '/lib/queuehandler.php');
index 7e09454d1ae8a78354477ae6e7401cce651aef28,c0452cbee13ad7dd7260538d7825e2a672164147..017174ed8a0b1774ea88675fbfdcd0da2664c699
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/jabber.php');
  require_once(INSTALLDIR . '/lib/xmppqueuehandler.php');
@@@ -40,12 -35,12 +40,12 @@@ set_error_handler('common_error_handler
  
  class PublicQueueHandler extends XmppQueueHandler
  {
 -    
 +
      function transport()
      {
          return 'public';
      }
 -    
 +
      function handle_notice($notice)
      {
          try {
index ed6dbd2ad317381bf5d5a46745471ef1bb64bd72,631719aa2186aab6f58510ce4a362ee2f40b91e8..0366d4c4ca62d24caf7754934cb74bcaf35ec105
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/mail.php');
  require_once(INSTALLDIR . '/lib/queuehandler.php');
@@@ -40,7 -35,7 +40,7 @@@ set_error_handler('common_error_handler
  
  class SmsQueueHandler extends QueueHandler
  {
 -    
 +
      function transport()
      {
          return 'sms';
@@@ -56,7 -51,7 +56,7 @@@
      {
          return mail_broadcast_notice_sms($notice);
      }
 -    
 +
      function finish()
      {
      }
index dea3f97006be7b5e5418e86cedf0deaf2804c33c,8a338f1b4a78a082acc8566c1b796236041a8831..7f418894e68fa505fdd629cf0811c373b799901f
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -30,11 -30,6 +30,11 @@@ define('LACONICA', true)
  // Uncomment this to get useful console output
  //define('SCRIPT_DEBUG', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 1) ? $argv[1] : null;
 +$path   = ($argc > 2) ? $argv[2] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  
  // Make a lockfile
index 8c8a59d6a92bb962f7da24181b03654cf88323fc,6089b5c7db2a4bbd76d9c79967a432bad406fbf7..d6fb17cc8b3954b632bc71e7b1e4b8db2454f933
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/twitter.php');
  require_once(INSTALLDIR . '/lib/queuehandler.php');
@@@ -40,12 -35,12 +40,12 @@@ set_error_handler('common_error_handler
  
  class TwitterQueueHandler extends QueueHandler
  {
 -    
 +
      function transport()
      {
          return 'twitter';
      }
 -    
 +
      function start()
      {
          $this->log(LOG_INFO, "INITIALIZE");
@@@ -56,7 -51,7 +56,7 @@@
      {
          return broadcast_twitter($notice);
      }
 -    
 +
      function finish()
      {
      }
index 2863207b0a393c2e8908176ff5e4ca6f1fcd1563,442435be16692eb23a9427024343a1d0392c2b19..c18261b5b9d28a6e878dfd63d35ee370f9739ee5
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /**
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -33,12 -33,7 +33,12 @@@ define('MAXCHILDREN', 2)
  define('POLL_INTERVAL', 60); // in seconds
  
  // Uncomment this to get useful logging
 -define('SCRIPT_DEBUG', true);
 +// define('SCRIPT_DEBUG', true);
 +
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
  
  require_once INSTALLDIR . '/lib/common.php';
  require_once INSTALLDIR . '/lib/daemon.php';
index fee902320c7dc856ae4d6991cd70c628ac311732,1fa361a36b8a300c178e0f741675f1db4311bc8e..217481d658827af8758558dd962401fa38f75df1
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/jabber.php');
  require_once(INSTALLDIR . '/lib/xmppqueuehandler.php');
@@@ -44,12 -39,12 +44,12 @@@ class XmppConfirmHandler extends XmppQu
  {
  
      var $_id = 'confirm';
 -    
 +
      function class_name()
      {
          return 'XmppConfirmHandler';
      }
 -    
 +
      function run()
      {
          if (!$this->start()) {
diff --combined scripts/xmppdaemon.php
index 468a163d2755ba7d413715c8ede9387e5fcfa735,528df5d2fc8423fd854f0153d45c2e1780522cac..0f98becdac510860f497b9055c94bb97104e50a9
@@@ -2,7 -2,7 +2,7 @@@
  <?php
  /*
   * Laconica - a distributed open-source microblogging tool
-  * Copyright (C) 2008, Controlez-Vous, Inc.
+  * Copyright (C) 2008, 2009, Control Yourself, Inc.
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the GNU Affero General Public License as published by
@@@ -27,11 -27,6 +27,11 @@@ if (isset($_SERVER) && array_key_exists
  define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
  define('LACONICA', true);
  
 +// Preset the server at the command line
 +
 +$server = ($argc > 2) ? $argv[2] : null;
 +$path   = ($argc > 3) ? $argv[3] : null;
 +
  require_once(INSTALLDIR . '/lib/common.php');
  require_once(INSTALLDIR . '/lib/jabber.php');
  require_once(INSTALLDIR . '/lib/daemon.php');
@@@ -44,6 -39,7 +44,6 @@@ set_error_handler('common_error_handler
  
  class XMPPDaemon extends Daemon
  {
 -
      function XMPPDaemon($resource=null)
      {
          static $attrs = array('server', 'port', 'user', 'password', 'host');