diff options
author | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2009-04-10 14:25:25 +0200 |
---|---|---|
committer | Tobias Diekershoff <tobias.diekershoff@gmx.net> | 2009-04-10 14:25:25 +0200 |
commit | 4277a6818c6ac66158dfba3b94bdc1b2eb06b594 (patch) | |
tree | 99149b95d0bd0bfaac4b2ad3d646e8cc1da7f51a /scripts | |
parent | d1bf8b2143f597d9d1b1e7ff472532c596200011 (diff) | |
parent | 6cdc2ff444b8c76a3cdc5b8c6e9e7e7539d9b6cc (diff) |
Merge branch '0.7.x' of git://gitorious.org/laconica/dev into 0.7.x
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/laconica.spec | 15 | ||||
-rwxr-xr-x | scripts/synctwitterfriends.php | 35 |
2 files changed, 38 insertions, 12 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/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); - - |