summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/laconica.spec15
-rw-r--r--scripts/pingqueuehandler.php4
-rwxr-xr-xscripts/synctwitterfriends.php35
-rwxr-xr-xscripts/update_pot.sh2
4 files changed, 41 insertions, 15 deletions
diff --git a/scripts/laconica.spec b/scripts/laconica.spec
index 5f0ed5fa9..331e10671 100644
--- a/scripts/laconica.spec
+++ b/scripts/laconica.spec
@@ -1,11 +1,14 @@
+# 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: 0.7.2
+Version: %{LACVER}
Release: 1%{?dist}
License: GAGPL v3 or later
-Source: laconica-0.7.2.tar.gz
+Source: laconica-%{version}.tar.gz
Group: Applications/Internet
Summary: Laconica, the Open Source microblogging platform
BuildArch: noarch
@@ -49,6 +52,8 @@ 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/"
@@ -74,6 +79,12 @@ rm -rf %buildroot
%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.
diff --git a/scripts/pingqueuehandler.php b/scripts/pingqueuehandler.php
index 55a266e4a..ada6ecdba 100644
--- a/scripts/pingqueuehandler.php
+++ b/scripts/pingqueuehandler.php
@@ -34,7 +34,7 @@ require_once(INSTALLDIR . '/lib/queuehandler.php');
set_error_handler('common_error_handler');
class PingQueueHandler extends QueueHandler {
-
+
function transport() {
return 'ping';
}
@@ -47,7 +47,7 @@ class PingQueueHandler extends QueueHandler {
function handle_notice($notice) {
return ping_broadcast_notice($notice);
}
-
+
function finish() {
}
}
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/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