diff options
author | Zach Copley <zach@status.net> | 2009-11-08 11:17:08 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-01-05 23:16:58 -0800 |
commit | 3209544b30776dc64b5d21c5725028d9d6016e2f (patch) | |
tree | a03f7750c617ead4f795f0a014d6f84b00113a55 /plugins/RSSCloud | |
parent | 8980bebcb38eaaca934141b1828e243609577a51 (diff) |
Fixed DB_DataObject to return the right keys info for a compound
key & fix ini output
Diffstat (limited to 'plugins/RSSCloud')
-rw-r--r-- | plugins/RSSCloud/RSSCloudSubscription.php | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/plugins/RSSCloud/RSSCloudSubscription.php b/plugins/RSSCloud/RSSCloudSubscription.php index 0b102e2e6..881e07165 100644 --- a/plugins/RSSCloud/RSSCloudSubscription.php +++ b/plugins/RSSCloud/RSSCloudSubscription.php @@ -40,27 +40,25 @@ class RSSCloudSubscription extends Memcached_DataObject { function table() { - global $_DB_DATAOBJECT; - $dbtype = $_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5]->dsn['phptype']; - $cols = array( - 'subscribed' => DB_DATAOBJECT_INT, - 'url' => DB_DATAOBJECT_STR, - 'failures' => DB_DATAOBJECT_INT, - 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME, - 'modified' => ($dbtype == 'mysql') ? - DB_DATAOBJECT_MYSQLTIMESTAMP : - DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME - ); + $db = $this->getDatabaseConnection(); + $dbtype = $db->phptype; + $cols = array('subscribed' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL, + 'url' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL, + 'failures' => DB_DATAOBJECT_INT, + 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL, + 'modified' => ($dbtype == 'mysql' || $dbtype == 'mysqli') ? + DB_DATAOBJECT_MYSQLTIMESTAMP + DB_DATAOBJECT_NOTNULL : + DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + ); - // common_debug(var_export($cols, true)); return $cols; } function keys() { - return array('subscribed', 'url'); + return array('subscribed' => 'N', 'url' => 'N'); } static function getSubscription($subscribed, $url) |