summaryrefslogtreecommitdiff
path: root/plugins/YammerImport/classes/Yammer_state.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-28 07:44:24 -0700
commit8f438da254defa35d9e066fb29947da208d14319 (patch)
treea768c0be8268b60691e734b30f20b1a94396dd26 /plugins/YammerImport/classes/Yammer_state.php
parentae507b04856804acb41256a00a9cd2c8e7136c96 (diff)
Ok, command-line workflow for YammerImportPlugin seems to mostly work, at least on tiny test site :D
Diffstat (limited to 'plugins/YammerImport/classes/Yammer_state.php')
-rw-r--r--plugins/YammerImport/classes/Yammer_state.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/plugins/YammerImport/classes/Yammer_state.php b/plugins/YammerImport/classes/Yammer_state.php
index 0174ead15..2f1fd7780 100644
--- a/plugins/YammerImport/classes/Yammer_state.php
+++ b/plugins/YammerImport/classes/Yammer_state.php
@@ -36,7 +36,6 @@ class Yammer_state extends Memcached_DataObject
public $__table = 'yammer_state'; // table name
public $id; // int primary_key not_null
public $state; // import state key
- public $request_token; // oauth request token; clear when auth is complete.
public $oauth_token; // actual oauth token! clear when import is done?
public $oauth_secret; // actual oauth secret! clear when import is done?
public $users_page; // last page of users we've fetched
@@ -47,6 +46,23 @@ class Yammer_state extends Memcached_DataObject
public $modified; // datetime
/**
+ * Get an instance by key
+ *
+ * This is a utility method to get a single instance with a given key value.
+ *
+ * @param string $k Key to use to lookup
+ * @param mixed $v Value to lookup
+ *
+ * @return Yammer_state object found, or null for no hits
+ *
+ */
+
+ function staticGet($k, $v=null)
+ {
+ return Memcached_DataObject::staticGet('Yammer_state', $k, $v);
+ }
+
+ /**
* Return schema definition to set this table up in onCheckSchema
*/
static function schemaDef()
@@ -54,7 +70,6 @@ class Yammer_state extends Memcached_DataObject
return array(new ColumnDef('id', 'int', null,
false, 'PRI'),
new ColumnDef('state', 'text'),
- new ColumnDef('request_token', 'text'),
new ColumnDef('oauth_token', 'text'),
new ColumnDef('oauth_secret', 'text'),
new ColumnDef('users_page', 'int'),
@@ -78,7 +93,6 @@ class Yammer_state extends Memcached_DataObject
{
return array('id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
'state' => DB_DATAOBJECT_STR,
- 'request_token' => DB_DATAOBJECT_STR,
'oauth_token' => DB_DATAOBJECT_STR,
'oauth_secret' => DB_DATAOBJECT_STR,
'users_page' => DB_DATAOBJECT_INT,