From 28d02ec8cdd0278c802c8fee30acddecca9ca01f Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Wed, 17 Jun 2009 16:44:33 -0400 Subject: Make oohembed endpoint configurable. --- classes/File_oembed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/File_oembed.php') diff --git a/classes/File_oembed.php b/classes/File_oembed.php index f1b2cb13c..6bf972f8f 100644 --- a/classes/File_oembed.php +++ b/classes/File_oembed.php @@ -53,7 +53,7 @@ class File_oembed extends Memcached_DataObject function _getOembed($url, $maxwidth = 500, $maxheight = 400, $format = 'json') { - $cmd = 'http://oohembed.com/oohembed/?url=' . urlencode($url); + $cmd = common_config('oohembed', 'endpoint') . '?url=' . urlencode($url); if (is_int($maxwidth)) $cmd .= "&maxwidth=$maxwidth"; if (is_int($maxheight)) $cmd .= "&maxheight=$maxheight"; if (is_string($format)) $cmd .= "&format=$format"; -- cgit v1.2.3-54-g00ecf From 793a6a1155996a7bcdc068fc891e7063934bdb19 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sat, 20 Jun 2009 16:00:04 -0700 Subject: change Controlez-Vous to Control Yourself --- actions/accesstoken.php | 2 +- actions/all.php | 2 +- actions/allrss.php | 2 +- actions/api.php | 2 +- actions/avatarbynickname.php | 2 +- actions/block.php | 2 +- actions/disfavor.php | 2 +- actions/doc.php | 2 +- actions/facebookhome.php | 2 +- actions/facebookinvite.php | 2 +- actions/facebooklogin.php | 2 +- actions/facebookremove.php | 2 +- actions/facebooksettings.php | 2 +- actions/favor.php | 2 +- actions/favoritesrss.php | 2 +- actions/file.php | 2 +- actions/finishopenidlogin.php | 2 +- actions/finishremotesubscribe.php | 2 +- actions/foaf.php | 2 +- actions/groupblock.php | 2 +- actions/groupsearch.php | 2 +- actions/groupunblock.php | 2 +- actions/invite.php | 2 +- actions/logout.php | 2 +- actions/makeadmin.php | 2 +- actions/microsummary.php | 2 +- actions/noticesearch.php | 2 +- actions/noticesearchrss.php | 2 +- actions/nudge.php | 2 +- actions/openidlogin.php | 2 +- actions/opensearch.php | 2 +- actions/peoplesearch.php | 2 +- actions/postnotice.php | 2 +- actions/publicrss.php | 2 +- actions/publicxrds.php | 2 +- actions/recoverpassword.php | 2 +- actions/remotesubscribe.php | 2 +- actions/repliesrss.php | 2 +- actions/requesttoken.php | 2 +- actions/subedit.php | 2 +- actions/subscribe.php | 2 +- actions/sup.php | 2 +- actions/tag.php | 2 +- actions/tagother.php | 2 +- actions/tagrss.php | 2 +- actions/twitapiaccount.php | 2 +- actions/twitapiblocks.php | 2 +- actions/twitapidirect_messages.php | 2 +- actions/twitapifavorites.php | 2 +- actions/twitapifriendships.php | 2 +- actions/twitapihelp.php | 2 +- actions/twitapinotifications.php | 2 +- actions/twitapistatuses.php | 2 +- actions/twitapiusers.php | 2 +- actions/unblock.php | 2 +- actions/unsubscribe.php | 2 +- actions/updateprofile.php | 2 +- actions/userauthorization.php | 2 +- actions/userbyid.php | 2 +- actions/userrss.php | 2 +- actions/xrds.php | 2 +- classes/File.php | 2 +- classes/File_oembed.php | 2 +- classes/File_redirection.php | 2 +- classes/File_thumbnail.php | 2 +- classes/File_to_post.php | 2 +- classes/Group_block.php | 2 +- classes/Memcached_DataObject.php | 2 +- classes/Notice.php | 2 +- classes/Notice_tag.php | 2 +- classes/Profile.php | 2 +- classes/Profile_block.php | 2 +- classes/Remote_profile.php | 2 +- classes/Subscription.php | 2 +- index.php | 2 +- install.php | 2 +- lib/Shorturl_api.php | 2 +- lib/arraywrapper.php | 2 +- lib/channel.php | 2 +- lib/clienterroraction.php | 2 +- lib/command.php | 2 +- lib/commandinterpreter.php | 2 +- lib/common.php | 2 +- lib/daemon.php | 2 +- lib/dberroraction.php | 2 +- lib/error.php | 2 +- lib/facebookutil.php | 2 +- lib/galleryaction.php | 2 +- lib/oauthstore.php | 2 +- lib/omb.php | 2 +- lib/openid.php | 2 +- lib/peoplesearchresults.php | 2 +- lib/queuehandler.php | 2 +- lib/search_engines.php | 2 +- lib/searchaction.php | 2 +- lib/servererroraction.php | 2 +- lib/subs.php | 2 +- lib/twitter.php | 2 +- lib/twitterapi.php | 2 +- lib/util.php | 2 +- lib/xmppqueuehandler.php | 2 +- scripts/enjitqueuehandler.php | 2 +- scripts/facebookqueuehandler.php | 2 +- scripts/fixup_hashtags.php | 2 +- scripts/fixup_inboxes.php | 2 +- scripts/fixup_notices_rendered.php | 2 +- scripts/fixup_replies.php | 2 +- scripts/getpiddir.php | 2 +- scripts/getvaliddaemons.php | 2 +- scripts/inbox_users.php | 2 +- scripts/jabberqueuehandler.php | 2 +- scripts/maildaemon.php | 2 +- scripts/ombqueuehandler.php | 2 +- scripts/pingqueuehandler.php | 2 +- scripts/publicqueuehandler.php | 2 +- scripts/setpassword.php | 2 +- scripts/smsqueuehandler.php | 2 +- scripts/sphinx-cron.sh | 2 +- scripts/sphinx-indexer.sh | 2 +- scripts/startdaemons.sh | 2 +- scripts/stopdaemons.sh | 2 +- scripts/synctwitterfriends.php | 2 +- scripts/twitterqueuehandler.php | 2 +- scripts/twitterstatusfetcher.php | 2 +- scripts/uncache_users.php | 2 +- scripts/xmppconfirmhandler.php | 2 +- scripts/xmppdaemon.php | 2 +- 127 files changed, 127 insertions(+), 127 deletions(-) (limited to 'classes/File_oembed.php') diff --git a/actions/accesstoken.php b/actions/accesstoken.php index 46b43c702..01aa77574 100644 --- a/actions/accesstoken.php +++ b/actions/accesstoken.php @@ -12,7 +12,7 @@ * @link http://laconi.ca/ * * Laconica - a distributed open-source microblogging tool - * Copyright (C) 2008, Controlez-Vous, Inc. + * Copyright (C) 2008, Control Yourself, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/actions/all.php b/actions/all.php index 80fc9d54b..f436fabd1 100644 --- a/actions/all.php +++ b/actions/all.php @@ -1,7 +1,7 @@ Date: Sat, 20 Jun 2009 16:12:55 -0700 Subject: Update copyright dates in files modified in 2009 --- actions/accesstoken.php | 2 +- actions/all.php | 2 +- actions/allrss.php | 2 +- actions/api.php | 2 +- actions/avatarbynickname.php | 2 +- actions/block.php | 2 +- actions/disfavor.php | 2 +- actions/doc.php | 2 +- actions/facebookhome.php | 2 +- actions/facebookinvite.php | 2 +- actions/facebooklogin.php | 2 +- actions/facebookremove.php | 2 +- actions/facebooksettings.php | 2 +- actions/favor.php | 2 +- actions/favoritesrss.php | 2 +- actions/file.php | 2 +- actions/finishopenidlogin.php | 2 +- actions/finishremotesubscribe.php | 2 +- actions/foaf.php | 2 +- actions/groupblock.php | 2 +- actions/groupsearch.php | 2 +- actions/groupunblock.php | 2 +- actions/invite.php | 2 +- actions/logout.php | 2 +- actions/makeadmin.php | 2 +- actions/microsummary.php | 2 +- actions/noticesearch.php | 2 +- actions/noticesearchrss.php | 2 +- actions/nudge.php | 2 +- actions/openidlogin.php | 2 +- actions/opensearch.php | 2 +- actions/peoplesearch.php | 2 +- actions/postnotice.php | 2 +- actions/publicrss.php | 2 +- actions/publicxrds.php | 2 +- actions/recoverpassword.php | 2 +- actions/remotesubscribe.php | 2 +- actions/repliesrss.php | 2 +- actions/requesttoken.php | 2 +- actions/subedit.php | 2 +- actions/subscribe.php | 2 +- actions/sup.php | 2 +- actions/tag.php | 2 +- actions/tagother.php | 2 +- actions/tagrss.php | 2 +- actions/twitapiaccount.php | 2 +- actions/twitapiblocks.php | 2 +- actions/twitapidirect_messages.php | 2 +- actions/twitapifavorites.php | 2 +- actions/twitapifriendships.php | 2 +- actions/twitapihelp.php | 2 +- actions/twitapinotifications.php | 2 +- actions/twitapistatuses.php | 2 +- actions/twitapiusers.php | 2 +- actions/unblock.php | 2 +- actions/unsubscribe.php | 2 +- actions/updateprofile.php | 2 +- actions/userauthorization.php | 2 +- actions/userbyid.php | 2 +- actions/userrss.php | 2 +- actions/xrds.php | 2 +- classes/File.php | 2 +- classes/File_oembed.php | 2 +- classes/File_redirection.php | 2 +- classes/File_thumbnail.php | 2 +- classes/File_to_post.php | 2 +- classes/Group_block.php | 2 +- classes/Memcached_DataObject.php | 2 +- classes/Notice.php | 2 +- classes/Notice_tag.php | 2 +- classes/Profile.php | 2 +- classes/Profile_block.php | 2 +- classes/Remote_profile.php | 2 +- classes/Subscription.php | 2 +- index.php | 2 +- lib/Shorturl_api.php | 2 +- lib/arraywrapper.php | 2 +- lib/channel.php | 2 +- lib/clienterroraction.php | 2 +- lib/command.php | 2 +- lib/commandinterpreter.php | 2 +- lib/common.php | 2 +- lib/daemon.php | 2 +- lib/dberroraction.php | 2 +- lib/error.php | 2 +- lib/facebookutil.php | 2 +- lib/galleryaction.php | 2 +- lib/oauthstore.php | 2 +- lib/omb.php | 2 +- lib/openid.php | 2 +- lib/peoplesearchresults.php | 2 +- lib/queuehandler.php | 2 +- lib/search_engines.php | 2 +- lib/searchaction.php | 2 +- lib/servererroraction.php | 2 +- lib/subs.php | 2 +- lib/twitter.php | 2 +- lib/twitterapi.php | 2 +- lib/util.php | 2 +- lib/xmppqueuehandler.php | 2 +- scripts/enjitqueuehandler.php | 2 +- scripts/facebookqueuehandler.php | 2 +- scripts/fixup_hashtags.php | 2 +- scripts/fixup_inboxes.php | 2 +- scripts/fixup_notices_rendered.php | 2 +- scripts/fixup_replies.php | 2 +- scripts/getpiddir.php | 2 +- scripts/getvaliddaemons.php | 2 +- scripts/inbox_users.php | 2 +- scripts/jabberqueuehandler.php | 2 +- scripts/maildaemon.php | 2 +- scripts/ombqueuehandler.php | 2 +- scripts/pingqueuehandler.php | 2 +- scripts/publicqueuehandler.php | 2 +- scripts/setpassword.php | 2 +- scripts/smsqueuehandler.php | 2 +- scripts/sphinx-cron.sh | 2 +- scripts/sphinx-indexer.sh | 2 +- scripts/startdaemons.sh | 2 +- scripts/stopdaemons.sh | 2 +- scripts/synctwitterfriends.php | 2 +- scripts/twitterqueuehandler.php | 2 +- scripts/twitterstatusfetcher.php | 2 +- scripts/uncache_users.php | 2 +- scripts/xmppconfirmhandler.php | 2 +- scripts/xmppdaemon.php | 2 +- 126 files changed, 126 insertions(+), 126 deletions(-) (limited to 'classes/File_oembed.php') diff --git a/actions/accesstoken.php b/actions/accesstoken.php index 01aa77574..2a8cd1713 100644 --- a/actions/accesstoken.php +++ b/actions/accesstoken.php @@ -12,7 +12,7 @@ * @link http://laconi.ca/ * * Laconica - a distributed open-source microblogging tool - * Copyright (C) 2008, Control Yourself, Inc. + * Copyright (C) 2008, 2009, Control Yourself, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by diff --git a/actions/all.php b/actions/all.php index f436fabd1..f06ead2a8 100644 --- a/actions/all.php +++ b/actions/all.php @@ -1,7 +1,7 @@ Date: Mon, 22 Jun 2009 14:19:41 -0700 Subject: Database changes for file tables Some minor database changes for file tables. Namely: * Added a timestamp to all tables * Added a filename column for local files * Change some tables that had unnecessary auto-increment primary keys when they had another unique column that should act as the primary key * Change engine from MyISAM to InnoDB for a couple of files. Also, rebuilt the DB_DataObject files for all these tables. --- classes/File.php | 10 ++++++---- classes/File_oembed.php | 10 +++++----- classes/File_redirection.php | 10 +++++----- classes/File_thumbnail.php | 8 ++++---- classes/File_to_post.php | 6 +++--- classes/laconica.ini | 30 +++++++++++++++++------------- db/laconica.sql | 31 ++++++++++++++++++------------- 7 files changed, 58 insertions(+), 47 deletions(-) (limited to 'classes/File_oembed.php') diff --git a/classes/File.php b/classes/File.php index 890536035..800041d5d 100644 --- a/classes/File.php +++ b/classes/File.php @@ -36,13 +36,15 @@ class File extends Memcached_DataObject /* the code below is auto generated do not remove the above tag */ public $__table = 'file'; // table name - public $id; // int(11) not_null primary_key group_by + public $id; // int(4) primary_key not_null public $url; // varchar(255) unique_key public $mimetype; // varchar(50) - public $size; // int(11) group_by + public $size; // int(4) public $title; // varchar(255) - public $date; // int(11) group_by - public $protected; // int(1) group_by + public $date; // int(4) + public $protected; // int(4) + public $filename; // varchar(255) + public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('File',$k,$v); } diff --git a/classes/File_oembed.php b/classes/File_oembed.php index 2e8e851cd..f9ca14e3c 100644 --- a/classes/File_oembed.php +++ b/classes/File_oembed.php @@ -31,19 +31,19 @@ class File_oembed extends Memcached_DataObject /* the code below is auto generated do not remove the above tag */ public $__table = 'file_oembed'; // table name - public $id; // int(11) not_null primary_key group_by - public $file_id; // int(11) unique_key group_by + public $file_id; // int(4) primary_key not_null public $version; // varchar(20) public $type; // varchar(20) public $provider; // varchar(50) public $provider_url; // varchar(255) - public $width; // int(11) group_by - public $height; // int(11) group_by - public $html; // blob(65535) blob + public $width; // int(4) + public $height; // int(4) + public $html; // text() public $title; // varchar(255) public $author_name; // varchar(50) public $author_url; // varchar(255) public $url; // varchar(255) + public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('File_oembed',$k,$v); } diff --git a/classes/File_redirection.php b/classes/File_redirection.php index 0d6e2a700..13f02f8e5 100644 --- a/classes/File_redirection.php +++ b/classes/File_redirection.php @@ -36,11 +36,11 @@ class File_redirection extends Memcached_DataObject /* the code below is auto generated do not remove the above tag */ public $__table = 'file_redirection'; // table name - public $id; // int(11) not_null primary_key group_by - public $url; // varchar(255) unique_key - public $file_id; // int(11) group_by - public $redirections; // int(11) group_by - public $httpcode; // int(11) group_by + public $url; // varchar(255) primary_key not_null + public $file_id; // int(4) + public $redirections; // int(4) + public $httpcode; // int(4) + public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('File_redirection',$k,$v); } diff --git a/classes/File_thumbnail.php b/classes/File_thumbnail.php index 2908549da..40d85b258 100644 --- a/classes/File_thumbnail.php +++ b/classes/File_thumbnail.php @@ -31,11 +31,11 @@ class File_thumbnail extends Memcached_DataObject /* the code below is auto generated do not remove the above tag */ public $__table = 'file_thumbnail'; // table name - public $id; // int(11) not_null primary_key group_by - public $file_id; // int(11) unique_key group_by + public $file_id; // int(4) primary_key not_null public $url; // varchar(255) unique_key - public $width; // int(11) group_by - public $height; // int(11) group_by + public $width; // int(4) + public $height; // int(4) + public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('File_thumbnail',$k,$v); } diff --git a/classes/File_to_post.php b/classes/File_to_post.php index 9362faaae..bb5f4e6e4 100644 --- a/classes/File_to_post.php +++ b/classes/File_to_post.php @@ -31,9 +31,9 @@ class File_to_post extends Memcached_DataObject /* the code below is auto generated do not remove the above tag */ public $__table = 'file_to_post'; // table name - public $id; // int(11) not_null primary_key group_by - public $file_id; // int(11) multiple_key group_by - public $post_id; // int(11) group_by + public $file_id; // int(4) primary_key not_null + public $post_id; // int(4) primary_key not_null + public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('File_to_post',$k,$v); } diff --git a/classes/laconica.ini b/classes/laconica.ini index 5ced15885..7e9b2b791 100755 --- a/classes/laconica.ini +++ b/classes/laconica.ini @@ -68,13 +68,14 @@ size = 1 title = 2 date = 1 protected = 1 +filename = 2 +modified = 384 [file__keys] id = N [file_oembed] -id = 129 -file_id = 1 +file_id = 129 version = 2 type = 2 provider = 2 @@ -86,37 +87,40 @@ title = 2 author_name = 2 author_url = 2 url = 2 +modified = 384 [file_oembed__keys] -id = N +file_id = K [file_redirection] -id = 129 -url = 2 +url = 130 file_id = 1 redirections = 1 httpcode = 1 +modified = 384 [file_redirection__keys] -id = N +url = K [file_thumbnail] -id = 129 -file_id = 1 +file_id = 129 url = 2 width = 1 height = 1 +modified = 384 [file_thumbnail__keys] -id = N +file_id = K +url = U [file_to_post] -id = 129 -file_id = 1 -post_id = 1 +file_id = 129 +post_id = 129 +modified = 384 [file_to_post__keys] -id = N +file_id = K +post_id = K [foreign_link] user_id = 129 diff --git a/db/laconica.sql b/db/laconica.sql index 8d1d47d38..95796d5cc 100644 --- a/db/laconica.sql +++ b/db/laconica.sql @@ -431,6 +431,7 @@ create table group_inbox ( ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; create table file ( + id integer primary key auto_increment, url varchar(255) comment 'destination URL after following redirections', mimetype varchar(50) comment 'mime type of resource', @@ -438,13 +439,15 @@ create table file ( title varchar(255) comment 'title of resource when available', date integer(11) comment 'date of resource according to http query', protected integer(1) comment 'true when URL is private (needs login)', + filename varchar(255) comment 'if a local file, name of the file', + + modified timestamp comment 'date this record was modified', unique(url) -) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci; +) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci; create table file_oembed ( - id integer primary key auto_increment, - file_id integer comment 'oEmbed for that URL/file' references file (id), + file_id integer primary key comment 'oEmbed for that URL/file' references file (id), version varchar(20) comment 'oEmbed spec. version', type varchar(20) comment 'oEmbed type: photo, video, link, rich', provider varchar(50) comment 'name of this oEmbed provider', @@ -456,37 +459,39 @@ create table file_oembed ( author_name varchar(50) comment 'author name for this oEmbed resource', author_url varchar(255) comment 'author URL for this oEmbed resource', url varchar(255) comment 'URL for this oEmbed resource when applicable (photo, link)', + modified timestamp comment 'date this record was modified' - unique(file_id) -) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci; +) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci; create table file_redirection ( - id integer primary key auto_increment, - url varchar(255) comment 'short URL (or any other kind of redirect) for file (id)', + + url varchar(255) primary key comment 'short URL (or any other kind of redirect) for file (id)', file_id integer comment 'short URL for what URL/file' references file (id), redirections integer comment 'redirect count', httpcode integer comment 'HTTP status code (20x, 30x, etc.)', + modified timestamp comment 'date this record was modified' - unique(url) ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; create table file_thumbnail ( - id integer primary key auto_increment, - file_id integer comment 'thumbnail for what URL/file' references file (id), + + file_id integer primary key comment 'thumbnail for what URL/file' references file (id), url varchar(255) comment 'URL of thumbnail', width integer comment 'width of thumbnail', height integer comment 'height of thumbnail', + modified timestamp comment 'date this record was modified', - unique(file_id), unique(url) ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; create table file_to_post ( - id integer primary key auto_increment, + file_id integer comment 'id of URL/file' references file (id), post_id integer comment 'id of the notice it belongs to' references notice (id), + modified timestamp comment 'date this record was modified', + + constraint primary key (file_id, post_id) - unique(file_id, post_id) ) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin; create table design ( -- cgit v1.2.3-54-g00ecf From 2e9fc34d4f6483ad08e6e5a1b778ee096cb6a5c1 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 22 Jun 2009 14:24:40 -0700 Subject: change staticGet() from DB_DataObject to Memcached_DataObject for file classes --- classes/File.php | 2 +- classes/File_oembed.php | 2 +- classes/File_redirection.php | 2 +- classes/File_thumbnail.php | 2 +- classes/File_to_post.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'classes/File_oembed.php') diff --git a/classes/File.php b/classes/File.php index 800041d5d..47af1c550 100644 --- a/classes/File.php +++ b/classes/File.php @@ -47,7 +47,7 @@ class File extends Memcached_DataObject public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ - function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('File',$k,$v); } + function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('File',$k,$v); } /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE diff --git a/classes/File_oembed.php b/classes/File_oembed.php index f9ca14e3c..51ee57b29 100644 --- a/classes/File_oembed.php +++ b/classes/File_oembed.php @@ -46,7 +46,7 @@ class File_oembed extends Memcached_DataObject public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ - function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('File_oembed',$k,$v); } + function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('File_oembed',$k,$v); } /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE diff --git a/classes/File_redirection.php b/classes/File_redirection.php index 13f02f8e5..edd915c1e 100644 --- a/classes/File_redirection.php +++ b/classes/File_redirection.php @@ -43,7 +43,7 @@ class File_redirection extends Memcached_DataObject public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ - function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('File_redirection',$k,$v); } + function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('File_redirection',$k,$v); } /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE diff --git a/classes/File_thumbnail.php b/classes/File_thumbnail.php index 40d85b258..21dcad571 100644 --- a/classes/File_thumbnail.php +++ b/classes/File_thumbnail.php @@ -38,7 +38,7 @@ class File_thumbnail extends Memcached_DataObject public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ - function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('File_thumbnail',$k,$v); } + function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('File_thumbnail',$k,$v); } /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE diff --git a/classes/File_to_post.php b/classes/File_to_post.php index bb5f4e6e4..db0a8d216 100644 --- a/classes/File_to_post.php +++ b/classes/File_to_post.php @@ -36,7 +36,7 @@ class File_to_post extends Memcached_DataObject public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ - function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('File_to_post',$k,$v); } + function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('File_to_post',$k,$v); } /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE -- cgit v1.2.3-54-g00ecf From e744eba7ebf6f2b057bfd45a9f3b3c4626017c50 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 23 Jun 2009 09:52:31 -0700 Subject: oembed and thumbnail don't need sequences --- classes/File_oembed.php | 29 ++++++++++++++++------------- classes/File_thumbnail.php | 11 ++++++++--- 2 files changed, 24 insertions(+), 16 deletions(-) (limited to 'classes/File_oembed.php') diff --git a/classes/File_oembed.php b/classes/File_oembed.php index 51ee57b29..69230e4a4 100644 --- a/classes/File_oembed.php +++ b/classes/File_oembed.php @@ -25,24 +25,24 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; * Table Definition for file_oembed */ -class File_oembed extends Memcached_DataObject +class File_oembed extends Memcached_DataObject { ###START_AUTOCODE /* the code below is auto generated do not remove the above tag */ public $__table = 'file_oembed'; // table name public $file_id; // int(4) primary_key not_null - public $version; // varchar(20) - public $type; // varchar(20) - public $provider; // varchar(50) - public $provider_url; // varchar(255) - public $width; // int(4) - public $height; // int(4) - public $html; // text() - public $title; // varchar(255) - public $author_name; // varchar(50) - public $author_url; // varchar(255) - public $url; // varchar(255) + public $version; // varchar(20) + public $type; // varchar(20) + public $provider; // varchar(50) + public $provider_url; // varchar(255) + public $width; // int(4) + public $height; // int(4) + public $html; // text() + public $title; // varchar(255) + public $author_name; // varchar(50) + public $author_url; // varchar(255) + public $url; // varchar(255) public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ @@ -51,6 +51,10 @@ class File_oembed extends Memcached_DataObject /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE + function sequenceKey() + { + return array(false, false, false); + } function _getOembed($url, $maxwidth = 500, $maxheight = 400, $format = 'json') { $cmd = common_config('oohembed', 'endpoint') . '?url=' . urlencode($url); @@ -84,4 +88,3 @@ class File_oembed extends Memcached_DataObject } } - diff --git a/classes/File_thumbnail.php b/classes/File_thumbnail.php index 21dcad571..44b92a2fa 100644 --- a/classes/File_thumbnail.php +++ b/classes/File_thumbnail.php @@ -25,7 +25,7 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; * Table Definition for file_thumbnail */ -class File_thumbnail extends Memcached_DataObject +class File_thumbnail extends Memcached_DataObject { ###START_AUTOCODE /* 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 $file_id; // int(4) primary_key not_null public $url; // varchar(255) unique_key - public $width; // int(4) - public $height; // int(4) + public $width; // int(4) + public $height; // int(4) public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP /* Static get */ @@ -43,6 +43,11 @@ class File_thumbnail extends Memcached_DataObject /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE + function sequenceKey() + { + return array(false, false, false); + } + function saveNew($data, $file_id) { $tn = new File_thumbnail; $tn->file_id = $file_id; -- cgit v1.2.3-54-g00ecf