oembed and thumbnail don't need sequences

This commit is contained in:
Evan Prodromou 2009-06-23 09:52:31 -07:00
parent 4d4d951531
commit e744eba7eb
2 changed files with 24 additions and 16 deletions

View File

@ -25,24 +25,24 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
* Table Definition for file_oembed * Table Definition for file_oembed
*/ */
class File_oembed extends Memcached_DataObject class File_oembed extends Memcached_DataObject
{ {
###START_AUTOCODE ###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */ /* the code below is auto generated do not remove the above tag */
public $__table = 'file_oembed'; // table name public $__table = 'file_oembed'; // table name
public $file_id; // int(4) primary_key not_null public $file_id; // int(4) primary_key not_null
public $version; // varchar(20) public $version; // varchar(20)
public $type; // varchar(20) public $type; // varchar(20)
public $provider; // varchar(50) public $provider; // varchar(50)
public $provider_url; // varchar(255) public $provider_url; // varchar(255)
public $width; // int(4) public $width; // int(4)
public $height; // int(4) public $height; // int(4)
public $html; // text() public $html; // text()
public $title; // varchar(255) public $title; // varchar(255)
public $author_name; // varchar(50) public $author_name; // varchar(50)
public $author_url; // varchar(255) public $author_url; // varchar(255)
public $url; // varchar(255) public $url; // varchar(255)
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */ /* Static get */
@ -51,6 +51,10 @@ class File_oembed extends Memcached_DataObject
/* the code above is auto generated do not remove the tag below */ /* the code above is auto generated do not remove the tag below */
###END_AUTOCODE ###END_AUTOCODE
function sequenceKey()
{
return array(false, false, false);
}
function _getOembed($url, $maxwidth = 500, $maxheight = 400, $format = 'json') { function _getOembed($url, $maxwidth = 500, $maxheight = 400, $format = 'json') {
$cmd = common_config('oohembed', 'endpoint') . '?url=' . urlencode($url); $cmd = common_config('oohembed', 'endpoint') . '?url=' . urlencode($url);
@ -84,4 +88,3 @@ class File_oembed extends Memcached_DataObject
} }
} }

View File

@ -25,7 +25,7 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
* Table Definition for file_thumbnail * Table Definition for file_thumbnail
*/ */
class File_thumbnail extends Memcached_DataObject class File_thumbnail extends Memcached_DataObject
{ {
###START_AUTOCODE ###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */ /* the code below is auto generated do not remove the above tag */
@ -33,8 +33,8 @@ class File_thumbnail extends Memcached_DataObject
public $__table = 'file_thumbnail'; // table name public $__table = 'file_thumbnail'; // table name
public $file_id; // int(4) primary_key not_null public $file_id; // int(4) primary_key not_null
public $url; // varchar(255) unique_key public $url; // varchar(255) unique_key
public $width; // int(4) public $width; // int(4)
public $height; // int(4) public $height; // int(4)
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */ /* Static get */
@ -43,6 +43,11 @@ class File_thumbnail extends Memcached_DataObject
/* the code above is auto generated do not remove the tag below */ /* the code above is auto generated do not remove the tag below */
###END_AUTOCODE ###END_AUTOCODE
function sequenceKey()
{
return array(false, false, false);
}
function saveNew($data, $file_id) { function saveNew($data, $file_id) {
$tn = new File_thumbnail; $tn = new File_thumbnail;
$tn->file_id = $file_id; $tn->file_id = $file_id;