diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/SearchMonkey-MrH.0.txt | 1 | ||||
-rw-r--r-- | scripts/SearchMonkey-Om3.0.txt | 1 | ||||
-rw-r--r-- | scripts/SearchMonkey-yQP.0.txt | 1 | ||||
-rwxr-xr-x | scripts/facebookqueuehandler.php | 71 | ||||
-rw-r--r-- | scripts/laconica.spec | 98 | ||||
-rw-r--r-- | scripts/pingqueuehandler.php | 64 | ||||
-rwxr-xr-x | scripts/rebuilddb_psql.sh | 34 | ||||
-rwxr-xr-x | scripts/sitemap.php | 3 | ||||
-rwxr-xr-x | scripts/startdaemons.sh | 3 | ||||
-rwxr-xr-x | scripts/stopdaemons.sh | 31 | ||||
-rwxr-xr-x | scripts/synctwitterfriends.php | 35 | ||||
-rwxr-xr-x | scripts/twitterqueuehandler.php | 71 | ||||
-rwxr-xr-x | scripts/update_facebook.php | 141 | ||||
-rwxr-xr-x | scripts/update_pot.sh | 2 | ||||
-rwxr-xr-x | scripts/xmppdaemon.php | 2 |
15 files changed, 394 insertions, 164 deletions
diff --git a/scripts/SearchMonkey-MrH.0.txt b/scripts/SearchMonkey-MrH.0.txt new file mode 100644 index 000000000..34191d90a --- /dev/null +++ b/scripts/SearchMonkey-MrH.0.txt @@ -0,0 +1 @@ +b2.PXYLSJBuLkZnUQ7H.2gOSSTbVllQM_XyN0ya4sO9CNt5uBUATEGyKd3LkkR0QXTSduKb7xj7Bp1TX6.8XdIDsOVVuXe.3HPnPLtSacZm66.NLY3JGhJv1MfGvcJU42YEQiUvpAhZRe46E.lv38ZPzxvhjjAmGFyFv8UNuhdw6sNIlTwBdct3k1GKA1YSEeVJ_xLiAVa8IaU_XG8PlxMovsBPePOry8__.aAp5loHtmqX6vEVu3lcHEn5NvSZ502QoWkK_20Y.6oja.Fqqxtr6eli_AQXaVzWWDEu_D4_rDV9Mz_.EC8KzXKo.YdUaWQfS9akqNm1v54wTNM4ZDegsbKnaNUR7J0OYgzpzcPj4L57yWKFm7k2af.v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Vi0BJ7zIJVYAU8UXqJqPKKN.qH4A941m8jG7trm9NBrsRIkyCJBE5W1UVZ4x4sBDSuJMT_UCYCyn_qsjHkYpJOaYt44c7PT5U_S8oVUUe0qtuvmQ5DK.cZAU1hdw9fINikie3yGxO66lWRPtmM1rqTHwEHqaJXkn4mnRhQmHE.pqB.N_Byir3AiezaA2EGi6Z7.G99XrOjxJ0tIyim39AkoPZbeWqVlLDL.4AGCzPLQyndMClwWJdjcHBaSrxGGL1OpZ9cGA6w1zLD_6uyP4gK2pGTGxvOk4TFqrpc07eX7j6agiBfkUzYykXSm_JYDVZqiivMwKVEynFsX24erN0kd379wr_QI8Ov2nfXudbZn9EY1bhmupuAtMqpW.dNGk7YJ3AD31zrfz2KcZjdQuLkTYwqW4zI3YEI0jFqk0WYXSUmCNRzbdvmoZI1kAWRw2COuUnYeMfoTiMeJGgUd.g--
\ No newline at end of file diff --git a/scripts/SearchMonkey-Om3.0.txt b/scripts/SearchMonkey-Om3.0.txt new file mode 100644 index 000000000..6f8840962 --- /dev/null +++ b/scripts/SearchMonkey-Om3.0.txt @@ -0,0 +1 @@ +WJofugbSJAtzh.lFcHxO_WHM64iJd7qHJFbsqC9VLnpiqoBxdbE0iwoKozxZC331Svk6O9Un9jonWUrQeTndGO8hldPlxqGdFdbl6OjoucDGG_h6qBw3Ugnbethbyuew1qOaUr6ItfU4Pe9O2GtUj2KbqxZpUAvMeiS20hykHbIZ8n_1.fl.fTToLiJn58zcLc1_ryM0f5jbkIGwmGX_SG6isGJRzC4.BiNmntpJ5ZCKa80e7oUH9S6NlM5SEmXoA3zhuzkbBxF_fKLendcC7EafnTT34MbgD5s4uwTyubSBJvdmBu.mWSO9xrnojM903Vo8h3.UdG.id1LmFrj4xxd24IQqZM2v4zOfl8ugF8ChHaIzp82A1AOuk0ulkqKgiALia6bsZMbKdPZtlu_HGrF06tCt5VGvu5f0ZgjRk_kOlP_f_oppyVKRWzZpSH9GryOpoqJA2vlxgEH2BvZqaaUYEmaYJ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mGXz50KkG4Xovzkw0ueuWlJ2vozPUf9CkJ1mlOA4jwuFLMrQZmN04aXyR3ZWFN8pdSVITI0ADqNr9OGacCra.emTRIWdBLEj18kp39vhlR6BpxI2V0FQjC_27n2hkDUNAUNFaJ1Q84OO2mgzZnPXcN7NYz57W3lB_mMVUtKngnRlTNWn1sFdN6.WFQ1szScjtpFa68NBv5pLUOvKy49VWjn14uS4aUoDL_fbMi9tGw0tlrMEr74fm5hJNwPX1QKd3cy0jqDHLIpZTb1aNxIz_KU4XIJ2wx0gZZQH2zV7eTxsrozzo3J0TtiQC6pPOqbnsRF1TuX1..DV5LzUdKX0TUXyO8x0710.EF4z6pim0HuVKzV2VBKmG6qtzpIRCKzVk14lx2E9YkJTQusU9qZnw9Ixu_YL0Ue_4LachvurMZDYTIRcSyd4St3TmtZswmeLPS6Md6NtHwxQEy.RVLhuCmliiZcw9hB.CH6v0UX1i9E6r_FZyboWtnzX42mZDrJR4n1u2nGFzYwJrDN_kJ3uHKs4EoV9ESEd5AojHDWSkOs4lKbyRlYwhGrHgB25mZ2xRdBtkHMDupYisNjOJ.QEIXzpK291wKHWTL.VdeTOLqGxsthxoR7AOdnzalMIuUItxagzB14Gw2eZ5PcIZvcgO9C4BouZW4SAg0D0Xhmd4A0MW0an7NqzXM4VDVg6WMgeBHqL54yfHjK4oMkwDUQTvqNH13AKINKbtr5t5JJzfpSN0fmfysA1Z1PdkJROhFkyH1_ZXcoMJp2XbYSk6ZXm69U4j4QCYe_vmkp3NM802bMpohywJRxYstmfIxinJukmZOEiSClAk1MhRGVlj60w8ggV29QYa_pdqUjTm0DwYZQF1Z_NVkhVXVv7bQMpRQJPIMwf3TggPPHVAMA1tk0OdPFOCx1207E-
\ No newline at end of file diff --git a/scripts/SearchMonkey-yQP.0.txt b/scripts/SearchMonkey-yQP.0.txt new file mode 100644 index 000000000..dcfc31ad1 --- /dev/null +++ b/scripts/SearchMonkey-yQP.0.txt @@ -0,0 +1 @@ +8Yd1y.bSJBPj3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ZXtEaKKGgdQB.fYXUyuKH0ptXqj1YCl1g1KWo3.AwndjDy0PE8ZYCaCjz.EyXqx.8bvfJycccGRw5RVU74aydE0DRCC3vF6VI9qbPWK89HNTMWxPSSTHdChY6yAhNsc5UhDwsAmhZ_UIYynZ8AM_oCS232.einbw9fYI4X6yZm_fD60DJ1FsBweU9ivf3Y4X2ucLFY8xPp_8SxZ5UtaP67TKflzMYjuvhGXAUF9.1u8ZKJGOliFmMxIwJ7lPJs93HfZgLN2eyH6F.rZjREeyd0fbsRzZ_vMEs4fx6sX4eIGVoyVFpO5b11kxnBqlKnATI_nw1.exkl5sQj00clwphsecXiVLaDFCEjG94ve_1cw2foqQUoX6pUfqr_hSSpnacdacPclbxWPehuN5LpjMso_5b4v.rj4s9VtzRqxovBinIgBdTFAH560aN5f7wuN5ZZT_BT5aCFNwQBYoDfCTaU9jw3aaXU29vEJmYZcvC9WCpU0RTntciGlx8rIbagu7cUGrYFvLbU2ZekazCMklPO5Sno_z5zzxLnTpFxesNoreOj7M3Cp1RHKUmqAog04bYC9kPFvH_q.jF2g507LEN3nPL9EJUx460UG_o4HRQOhDi2YrmrHk.gLZECgnMwCN770fhL
\ No newline at end of file diff --git a/scripts/facebookqueuehandler.php b/scripts/facebookqueuehandler.php new file mode 100755 index 000000000..c6859cb21 --- /dev/null +++ b/scripts/facebookqueuehandler.php @@ -0,0 +1,71 @@ +#!/usr/bin/env php +<?php +/* + * Laconica - a distributed open-source microblogging tool + * Copyright (C) 2008, Controlez-Vous, 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +# Abort if called from a web server +if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { + print "This script must be run from the command line\n"; + exit(); +} + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); +define('LACONICA', true); + +require_once(INSTALLDIR . '/lib/common.php'); +require_once(INSTALLDIR . '/lib/facebookutil.php'); +require_once(INSTALLDIR . '/lib/queuehandler.php'); + +set_error_handler('common_error_handler'); + +class FacebookQueueHandler extends QueueHandler +{ + + function transport() + { + return 'facebook'; + } + + function start() + { + $this->log(LOG_INFO, "INITIALIZE"); + return true; + } + + function handle_notice($notice) + { + return facebookBroadcastNotice($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 FacebookQueueHandler($id); + +$handler->runOnce(); diff --git a/scripts/laconica.spec b/scripts/laconica.spec new file mode 100644 index 000000000..331e10671 --- /dev/null +++ b/scripts/laconica.spec @@ -0,0 +1,98 @@ +# This version needs to match the tarball and unpacked directory name. +%define LACVER 0.7.3 + +BuildRequires: php-pear +BuildRequires: httpd-devel + +Name: laconica +Version: %{LACVER} +Release: 1%{?dist} +License: GAGPL v3 or later +Source: laconica-%{version}.tar.gz +Group: Applications/Internet +Summary: Laconica, the Open Source microblogging platform +BuildArch: noarch + +Requires: httpd +Requires: php >= 5 +Requires: php-pear-Mail-Mime +Requires: php-curl +Requires: php-mysql +Requires: php-mbstring +Requires: php-gettext +Requires: php-xml +Requires: php-gd + +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%define apache_serverroot %(/usr/sbin/apxs -q DATADIR) +%define apache_sysconfdir %(/usr/sbin/apxs -q SYSCONFDIR) +%define wwwpath %{apache_serverroot}/%{name} +%define confpath %{_sysconfdir}/%{name} + +%description +From the ABOUT file: Laconica (pronounced "luh-KAWN-ih-kuh") is a Free +and Open Source microblogging platform. It helps people in a +community, company or group to exchange short (140 character) messages +over the Web. Users can choose which people to "follow" and receive +only their friends' or colleagues' status messages. It provides a +similar service to sites like Twitter, Jaiku, and Plurk. + + +%prep +%setup -q + +%build + + +%install +mkdir -p %{buildroot}%{wwwpath} +cp -a * %{buildroot}%{wwwpath} + +mkdir -p %{buildroot}%{_datadir}/laconica +cp -a db %{buildroot}%{_datadir}/laconica/db + +mkdir -p %{buildroot}%{_datadir}/laconica/avatar + +mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d +cat > %{buildroot}%{_sysconfdir}/httpd/conf.d/laconica.conf <<"EOF" +Alias /laconica/ "/var/www/laconica/" + +<Directory "/var/www/laconica"> + Options Indexes FollowSymLinks + AllowOverride All + Order allow,deny + Allow from all +</Directory> +EOF + +%clean +rm -rf %buildroot + +%files +%defattr(-,root,root) +%dir %{wwwpath} +%{wwwpath}/* +%{_datadir}/laconica/* +%attr(-,apache,apache) %dir %{_datadir}/laconica/avatar +%doc COPYING README doc-src/* +%config(noreplace) %{_sysconfdir}/httpd/conf.d/laconica.conf + +%changelog +* Wed Apr 03 2009 Zach Copley <zach@controlyourself.ca> - 0.7.3 +- Changed version number to 0.7.3. + +* Fri Mar 13 2009 Ken Sedgwick <ksedgwic@bonsai.com> - 0.7.2.1-1 +- Factored laconica version to the first line of the file. + +* Wed Mar 03 2009 Zach Copley <zach@controlyourself.ca> - 0.7.2 +- Changed version number to 0.7.2. + +* Sat Feb 28 2009 Ken Sedgwick <ken@bonsai.com> - 0.7.1-1 +- Modified RPM for Fedora. + +* Thu Feb 13 2009 tuukka.pasanen@ilmi.fi +- packaged laconica version 0.7.1 + +* Wed Feb 04 2009 tuukka.pasanen@ilmi.fi +- packaged laconica version 0.7.0 using the buildservice spec file wizard diff --git a/scripts/pingqueuehandler.php b/scripts/pingqueuehandler.php new file mode 100644 index 000000000..ada6ecdba --- /dev/null +++ b/scripts/pingqueuehandler.php @@ -0,0 +1,64 @@ +#!/usr/bin/env php +<?php +/* + * Laconica - a distributed open-source microblogging tool + * Copyright (C) 2008, Controlez-Vous, 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +# Abort if called from a web server +if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { + print "This script must be run from the command line\n"; + exit(); +} + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); +define('LACONICA', true); + +require_once(INSTALLDIR . '/lib/common.php'); +require_once(INSTALLDIR . '/lib/ping.php'); +require_once(INSTALLDIR . '/lib/queuehandler.php'); + +set_error_handler('common_error_handler'); + +class PingQueueHandler extends QueueHandler { + + function transport() { + return 'ping'; + } + + function start() { + $this->log(LOG_INFO, "INITIALIZE"); + return true; + } + + function handle_notice($notice) { + return ping_broadcast_notice($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 PingQueueHandler($id); + +$handler->runOnce(); diff --git a/scripts/rebuilddb_psql.sh b/scripts/rebuilddb_psql.sh new file mode 100755 index 000000000..ac169c205 --- /dev/null +++ b/scripts/rebuilddb_psql.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# ******************************* WARNING ********************************* +# Do not run this script until you have read and understood the information +# below, AND backed up your database. Failure to observe these instructions +# may result in losing all the data in your database. +# +# This script is used to upgrade Laconica's PostgreSQL database to the +# latest version. It does the following: +# +# 1. Dumps the existing data to /tmp/rebuilddb_psql.sql +# 2. Clears out the objects (tables, etc) in the database schema +# 3. Reconstructs the database schema using the latest script +# 4. Restores the data dumped in step 1 +# +# You MUST run this script as the 'postgres' user. +# You MUST be able to write to /tmp/rebuilddb_psql.sql +# You MUST specify the laconica database user and database name on the +# command line, e.g. ./rebuilddb_psql.sh myuser mydbname +# + +user=$1 +DB=$2 + +cd `dirname $0` + +pg_dump -a -D --disable-trigger $DB > /tmp/rebuilddb_psql.sql +psql -c "drop schema public cascade; create schema public;" $DB +psql -c "grant all privileges on schema public to $user;" $DB +psql $DB < ../db/laconica_pg.sql +psql $DB < /tmp/rebuilddb_psql.sql +for tab in `psql -c '\dts' $DB -tA | cut -d\| -f2`; do + psql -c "ALTER TABLE \"$tab\" OWNER TO $user;" $DB +done diff --git a/scripts/sitemap.php b/scripts/sitemap.php index 51a9bbd75..39eb859bb 100755 --- a/scripts/sitemap.php +++ b/scripts/sitemap.php @@ -61,7 +61,8 @@ function standard_map() ) ); - $docs = array('about', 'faq', 'contact', 'im', 'openid', 'openmublog', 'privacy', 'source'); + $docs = array('about', 'faq', 'contact', 'im', 'openid', 'openmublog', + 'privacy', 'source', 'badge'); foreach($docs as $title) { $standard_map_urls .= url( diff --git a/scripts/startdaemons.sh b/scripts/startdaemons.sh index 685bd938f..c3729761d 100755 --- a/scripts/startdaemons.sh +++ b/scripts/startdaemons.sh @@ -23,7 +23,8 @@ DIR=`dirname $0` for f in xmppdaemon.php jabberqueuehandler.php publicqueuehandler.php \ - xmppconfirmhandler.php smsqueuehandler.php ombqueuehandler.php; do + xmppconfirmhandler.php smsqueuehandler.php ombqueuehandler.php \ + twitterqueuehandler.php facebookqueuehandler.php pingqueuehandler.php; do echo -n "Starting $f..."; php $DIR/$f diff --git a/scripts/stopdaemons.sh b/scripts/stopdaemons.sh index 08e1d4714..2bb8f9ecb 100755 --- a/scripts/stopdaemons.sh +++ b/scripts/stopdaemons.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Laconica - a distributed open-source microblogging tool @@ -23,19 +23,30 @@ SDIR=`dirname $0` DIR=`php $SDIR/getpiddir.php` -for f in jabberhandler ombhandler publichandler smshandler \ - xmppconfirmhandler xmppdaemon; do +for f in jabberhandler ombhandler publichandler smshandler pinghandler \ + xmppconfirmhandler xmppdaemon twitterhandler facebookhandler ; do FILES="$DIR/$f.*.pid" for ff in "$FILES" ; do - echo -n "Stopping $f..." - PID=`cat $ff` - kill -3 $PID - if kill -9 $PID ; then - echo "DONE." - else - echo "FAILED." + PID=`cat $ff 2>/dev/null` + if [ -n "$PID" ] ; then + echo -n "Stopping $f ($PID)..." + if kill -3 $PID 2>/dev/null ; then + count=0 + while kill -0 $PID 2>/dev/null ; do + sleep 1 + count=$(($count + 1)) + if [ $count -gt 5 ]; then break; fi + done + if kill -9 $PID 2>/dev/null ; then + echo "FORCIBLY TERMINATED" + else + echo "STOPPED CLEANLY" + fi + else + echo "NOT FOUND" + fi fi rm -f $ff done diff --git a/scripts/synctwitterfriends.php b/scripts/synctwitterfriends.php index 0ce34c2ae..794301f0f 100755 --- a/scripts/synctwitterfriends.php +++ b/scripts/synctwitterfriends.php @@ -18,7 +18,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -# Abort if called from a web server +// Abort if called from a web server if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { print "This script must be run from the command line\n"; exit(); @@ -27,11 +27,16 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('LACONICA', true); +// Uncomment this to get useful console output +//define('SCRIPT_DEBUG', true); + require_once(INSTALLDIR . '/lib/common.php'); $flink = new Foreign_link(); $flink->service = 1; // Twitter -$flink->find(); +$cnt = $flink->find(); + +print "Updating Twitter friends subscriptions for $cnt users.\n"; while ($flink->fetch()) { @@ -39,20 +44,30 @@ while ($flink->fetch()) { $user = User::staticGet($flink->user_id); - print "Updating Twitter friends for user $user->nickname ($user->id)\n"; + if (empty($user)) { + common_log(LOG_WARNING, "Unmatched user for ID " . $flink->user_id); + print "Unmatched user for ID $flink->user_id\n"; + continue; + } + + print "Updating Twitter friends for $user->nickname (Laconica ID: $user->id)... "; $fuser = $flink->getForeignUser(); - $result = save_twitter_friends($user, $fuser->id, $fuser->nickname, $flink->credentials); + if (empty($fuser)) { + common_log(LOG_WARNING, "Unmatched user for ID " . $flink->user_id); + print "Unmatched user for ID $flink->user_id\n"; + continue; + } - if ($result == false) { - print "Problems updating Twitter friends! Check the log.\n"; - exit(1); + $result = save_twitter_friends($user, $fuser->id, + $fuser->nickname, $flink->credentials); + if (defined('SCRIPT_DEBUG')) { + print "\nDONE\n"; + } else { + print "DONE\n"; } } - } exit(0); - - diff --git a/scripts/twitterqueuehandler.php b/scripts/twitterqueuehandler.php new file mode 100755 index 000000000..7da4f1e20 --- /dev/null +++ b/scripts/twitterqueuehandler.php @@ -0,0 +1,71 @@ +#!/usr/bin/env php +<?php +/* + * Laconica - a distributed open-source microblogging tool + * Copyright (C) 2008, Controlez-Vous, 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +# Abort if called from a web server +if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { + print "This script must be run from the command line\n"; + exit(); +} + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); +define('LACONICA', true); + +require_once(INSTALLDIR . '/lib/common.php'); +require_once(INSTALLDIR . '/lib/twitter.php'); +require_once(INSTALLDIR . '/lib/queuehandler.php'); + +set_error_handler('common_error_handler'); + +class TwitterQueueHandler extends QueueHandler +{ + + function transport() + { + return 'twitter'; + } + + function start() + { + $this->log(LOG_INFO, "INITIALIZE"); + return true; + } + + function handle_notice($notice) + { + return broadcast_twitter($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 TwitterQueueHandler($id); + +$handler->runOnce(); diff --git a/scripts/update_facebook.php b/scripts/update_facebook.php deleted file mode 100755 index 60e10417f..000000000 --- a/scripts/update_facebook.php +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env php -<?php -/* - * Laconica - a distributed open-source microblogging tool - * Copyright (C) 2008, Controlez-Vous, 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 - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -# Abort if called from a web server -if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { - print "This script must be run from the command line\n"; - exit(); -} - -define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -define('LACONICA', true); - -require_once INSTALLDIR . '/lib/common.php'; -require_once INSTALLDIR . '/lib/facebookutil.php'; - -// For storing the last run date-time -$last_updated_file = INSTALLDIR . '/scripts/facebook_last_updated'; - -// Lock file name -$lock_file = INSTALLDIR . '/scripts/update_facebook.lock'; - -// Make sure only one copy of the script is running at a time -$lock_file = @fopen($lock_file, "w+"); -if (!flock( $lock_file, LOCK_EX | LOCK_NB, &$wouldblock) || $wouldblock) { - die("Can't open lock file. Script already running?\n"); -} - -$facebook = getFacebook(); -$current_time = time(); -$since = getLastUpdated(); -updateLastUpdated($current_time); -$notice = getFacebookNotices($since); -$cnt = 0; - -while($notice->fetch()) { - - $flink = Foreign_link::getByUserID($notice->profile_id, FACEBOOK_SERVICE); - $user = $flink->getUser(); - $fbuid = $flink->foreign_id; - - if (!userCanUpdate($fbuid)) { - continue; - } - - $prefix = $facebook->api_client->data_getUserPreference(FACEBOOK_NOTICE_PREFIX, $fbuid); - $content = "$prefix $notice->content"; - - if (($flink->noticesync & FOREIGN_NOTICE_SEND) == FOREIGN_NOTICE_SEND) { - - // If it's not a reply, or if the user WANTS to send replies... - if (!preg_match('/@[a-zA-Z0-9_]{1,15}\b/u', $content) || - (($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY) == FOREIGN_NOTICE_SEND_REPLY)) { - - // Avoid a Loop - if ($notice->source != 'Facebook') { - - try { - $facebook->api_client->users_setStatus($content, - $fbuid, false, true); - updateProfileBox($facebook, $flink, $notice); - $cnt++; - } catch(FacebookRestClientException $e) { - print "Couldn't sent notice $notice->id!\n"; - print $e->getMessage(); - - // Remove flink? - } - } - } - } -} - -if ($cnt > 0) { - print date('r', $current_time) . - ": Found $cnt new notices for Facebook since last run at " . - date('r', $since) . "\n"; -} - -fclose($lock_file); -exit(0); - - -function userCanUpdate($fbuid) { - - global $facebook; - - $result = false; - - try { - $result = $facebook->api_client->users_hasAppPermission('status_update', $fbuid); - } catch(FacebookRestClientException $e){ - print_r($e); - } - - return $result; -} - -function getLastUpdated(){ - global $last_updated_file, $current_time; - $last = $current_time; - - if (file_exists($last_updated_file) && - ($file = fopen($last_updated_file, 'r'))) { - $last = fgets($file); - } else { - print "$last_updated_file doesn't exit. Trying to create it...\n"; - $file = fopen($last_updated_file, 'w+') or - die("Can't open $last_updated_file for writing!\n"); - print 'Success. Using current time (' . date('r', $last) . - ") to look for new notices.\n"; - } - - fclose($file); - return $last; -} - -function updateLastUpdated($time){ - global $last_updated_file; - $file = fopen($last_updated_file, 'w') or - die("Can't open $last_updated_file for writing!"); - fwrite($file, $time); - fclose($file); -} - diff --git a/scripts/update_pot.sh b/scripts/update_pot.sh index f3526d514..a7f5e4d3a 100755 --- a/scripts/update_pot.sh +++ b/scripts/update_pot.sh @@ -1,3 +1,3 @@ cd `dirname $0` cd .. -xgettext --from-code=UTF-8 --default-domain=laconica --output=locale/laconica.pot --language=PHP --join-existing actions/*.php classes/*.php lib/*.php scripts/*.php +xgettext --from-code=UTF-8 --default-domain=laconica --output=locale/laconica.po --language=PHP --join-existing actions/*.php classes/*.php lib/*.php scripts/*.php diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php index 01fe8914f..ef3f8c63d 100755 --- a/scripts/xmppdaemon.php +++ b/scripts/xmppdaemon.php @@ -208,6 +208,8 @@ class XMPPDaemon extends Daemon { if (preg_match('/[\[\(]?[Aa]uto[-\s]?[Rr]e(ply|sponse)[\]\)]/', $txt)) { return true; + } else if (preg_match('/^System: Message wasn\'t delivered. Offline storage size was exceeded.$/', $txt)) { + return true; } else { return false; } |