summaryrefslogtreecommitdiff
path: root/plugins/YammerImport/lib/yammerimporter.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-09-23 17:55:13 -0700
committerBrion Vibber <brion@pobox.com>2010-09-23 17:55:13 -0700
commitbdd8a587e7b9f64fb0d3a39b851dde3f9cb562ab (patch)
tree4d4958dc83661aec9ffb9f437373c65a82c2099a /plugins/YammerImport/lib/yammerimporter.php
parentdd414db9ea71ca7b2d0fca901d51931557bde6bd (diff)
Ok, command-line workflow for YammerImportPlugin seems to mostly work, at least on tiny test site :D
Diffstat (limited to 'plugins/YammerImport/lib/yammerimporter.php')
-rw-r--r--plugins/YammerImport/lib/yammerimporter.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/YammerImport/lib/yammerimporter.php b/plugins/YammerImport/lib/yammerimporter.php
index b1d2815b9..0425b8b04 100644
--- a/plugins/YammerImport/lib/yammerimporter.php
+++ b/plugins/YammerImport/lib/yammerimporter.php
@@ -327,17 +327,20 @@ class YammerImporter
private function findImportedUser($origId)
{
- return Yammer_user::staticGet('id', $origId);
+ $map = Yammer_user::staticGet('id', $origId);
+ return $map ? $map->user_id : null;
}
private function findImportedGroup($origId)
{
- return Yammer_group::staticGet('id', $origId);
+ $map = Yammer_group::staticGet('id', $origId);
+ return $map ? $map->group_id : null;
}
private function findImportedNotice($origId)
{
- return Yammer_notice::staticGet('id', $origId);
+ $map = Yammer_notice::staticGet('id', $origId);
+ return $map ? $map->notice_id : null;
}
private function recordImportedUser($origId, $userId)
@@ -370,7 +373,7 @@ class YammerImporter
// Blaaaaaarf!
$known = array('Pacific Time (US & Canada)' => 'America/Los_Angeles',
'Eastern Time (US & Canada)' => 'America/New_York');
- if (array_key_exists($known, $tz)) {
+ if (array_key_exists($tz, $known)) {
return $known[$tz];
} else {
return false;