summaryrefslogtreecommitdiff
path: root/plugins/YammerImport
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-13 15:37:54 -0700
committerBrion Vibber <brion@pobox.com>2010-10-13 15:37:54 -0700
commit22047f6412811cb340aee6ba49d15257581b5aa9 (patch)
treee673cc89d1518992ac515be2af86e8f787438520 /plugins/YammerImport
parent3cd03ee6ecb029ce0c27ddd6b3af92d888e1f58f (diff)
parent6c77d86b7f39c35eac0fcc3f13c0beba3e694318 (diff)
Merge branch '0.9.x' into twitstream
Diffstat (limited to 'plugins/YammerImport')
-rw-r--r--plugins/YammerImport/lib/yammerimporter.php27
-rw-r--r--plugins/YammerImport/locale/YammerImport.pot2
-rw-r--r--plugins/YammerImport/locale/fr/LC_MESSAGES/YammerImport.po20
3 files changed, 27 insertions, 22 deletions
diff --git a/plugins/YammerImport/lib/yammerimporter.php b/plugins/YammerImport/lib/yammerimporter.php
index 80cbcff8e..93bc96d52 100644
--- a/plugins/YammerImport/lib/yammerimporter.php
+++ b/plugins/YammerImport/lib/yammerimporter.php
@@ -436,18 +436,23 @@ class YammerImporter
// @fixme this should be better encapsulated
// ripped from oauthstore.php (for old OMB client)
$temp_filename = tempnam(sys_get_temp_dir(), 'listener_avatar');
- if (!copy($url, $temp_filename)) {
- throw new ServerException(sprintf(_m("Unable to fetch avatar from %s."), $url));
- }
+ try {
+ if (!copy($url, $temp_filename)) {
+ throw new ServerException(sprintf(_m("Unable to fetch avatar from %s."), $url));
+ }
- $id = $dest->id;
- // @fixme should we be using different ids?
- $imagefile = new ImageFile($id, $temp_filename);
- $filename = Avatar::filename($id,
- image_type_to_extension($imagefile->type),
- null,
- common_timestamp());
- rename($temp_filename, Avatar::path($filename));
+ $id = $dest->id;
+ // @fixme should we be using different ids?
+ $imagefile = new ImageFile($id, $temp_filename);
+ $filename = Avatar::filename($id,
+ image_type_to_extension($imagefile->type),
+ null,
+ common_timestamp());
+ rename($temp_filename, Avatar::path($filename));
+ } catch (Exception $e) {
+ unlink($temp_filename);
+ throw $e;
+ }
// @fixme hardcoded chmod is lame, but seems to be necessary to
// keep from accidentally saving images from command-line (queues)
// that can't be read from web server, which causes hard-to-notice
diff --git a/plugins/YammerImport/locale/YammerImport.pot b/plugins/YammerImport/locale/YammerImport.pot
index 053834cde..7dd976069 100644
--- a/plugins/YammerImport/locale/YammerImport.pot
+++ b/plugins/YammerImport/locale/YammerImport.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-10-03 19:53+0000\n"
+"POT-Creation-Date: 2010-10-09 14:04+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/plugins/YammerImport/locale/fr/LC_MESSAGES/YammerImport.po b/plugins/YammerImport/locale/fr/LC_MESSAGES/YammerImport.po
index d26c5128a..cc8c92b50 100644
--- a/plugins/YammerImport/locale/fr/LC_MESSAGES/YammerImport.po
+++ b/plugins/YammerImport/locale/fr/LC_MESSAGES/YammerImport.po
@@ -9,13 +9,13 @@ msgid ""
msgstr ""
"Project-Id-Version: StatusNet - YammerImport\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-10-03 19:53+0000\n"
-"PO-Revision-Date: 2010-10-03 19:57:40+0000\n"
+"POT-Creation-Date: 2010-10-09 14:04+0000\n"
+"PO-Revision-Date: 2010-10-09 14:08:43+0000\n"
"Language-Team: French <http://translatewiki.net/wiki/Portal:fr>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-POT-Import-Date: 2010-10-01 20:39:57+0000\n"
-"X-Generator: MediaWiki 1.17alpha (r74231); Translate extension (2010-09-17)\n"
+"X-POT-Import-Date: 2010-10-04 23:11:54+0000\n"
+"X-Generator: MediaWiki 1.17alpha (r74529); Translate extension (2010-09-17)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: fr\n"
"X-Message-Group: #out-statusnet-plugin-yammerimport\n"
@@ -241,24 +241,24 @@ msgstr "Attente..."
#: lib/yammerprogressform.php:146
msgid "Reset import state"
-msgstr ""
+msgstr "Réinitialiser l’état de l’import"
#: lib/yammerprogressform.php:151
msgid "Pause import"
-msgstr ""
+msgstr "Mettre l’import en pause"
#: lib/yammerprogressform.php:160
#, php-format
msgid "Encountered error \"%s\""
-msgstr ""
+msgstr "L’erreur « %s » est survenue"
#: lib/yammerprogressform.php:162
msgid "Paused"
-msgstr ""
+msgstr "En pause"
#: lib/yammerprogressform.php:165
msgid "Abort import"
-msgstr ""
+msgstr "Abandonner l’import"
#: actions/yammeradminpanel.php:45
msgid "Yammer Import"
@@ -279,4 +279,4 @@ msgstr ""
#: actions/yammeradminpanel.php:102
msgid "Paused from admin panel."
-msgstr ""
+msgstr "Mis en pause depuis le panneau d’administration"