From: Evan Prodromou Date: Mon, 22 Aug 2011 22:05:37 +0000 (-0400) Subject: Remove sequenceKey() since we now use Managed_DataObject X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=feb9030fb97fb08bb4ba0f8bdd7f2910d7a4b84a;p=quix0rs-gnu-social.git Remove sequenceKey() since we now use Managed_DataObject --- diff --git a/classes/Confirm_address.php b/classes/Confirm_address.php index 7f59cab430..056df836fc 100644 --- a/classes/Confirm_address.php +++ b/classes/Confirm_address.php @@ -26,9 +26,6 @@ class Confirm_address extends Managed_DataObject /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE - function sequenceKey() - { return array(false, false); } - public static function schemaDef() { return array( diff --git a/classes/File_oembed.php b/classes/File_oembed.php index 56afdde197..ae46e61bd4 100644 --- a/classes/File_oembed.php +++ b/classes/File_oembed.php @@ -79,11 +79,6 @@ class File_oembed extends Managed_DataObject ); } - function sequenceKey() - { - return array(false, false, false); - } - function _getOembed($url) { $parameters = array( 'maxwidth' => common_config('attachments', 'thumb_width'), diff --git a/classes/File_thumbnail.php b/classes/File_thumbnail.php index 1adcd91987..064b454e2d 100644 --- a/classes/File_thumbnail.php +++ b/classes/File_thumbnail.php @@ -63,11 +63,6 @@ class File_thumbnail extends Managed_DataObject ); } - function sequenceKey() - { - return array(false, false, false); - } - /** * Save oEmbed-provided thumbnail data * diff --git a/classes/Inbox.php b/classes/Inbox.php index 6ba40df224..c618ff7aca 100644 --- a/classes/Inbox.php +++ b/classes/Inbox.php @@ -61,11 +61,6 @@ class Inbox extends Managed_DataObject ); } - function sequenceKey() - { - return array(false, false, false); - } - /** * Create a new inbox from existing Notice_inbox stuff */ diff --git a/classes/Login_token.php b/classes/Login_token.php index 3733af66cf..7049c7c7fe 100644 --- a/classes/Login_token.php +++ b/classes/Login_token.php @@ -58,19 +58,6 @@ class Login_token extends Managed_DataObject const TIMEOUT = 120; // seconds after which to timeout the token - /* - DB_DataObject calculates the sequence key(s) by taking the first key returned by the keys() function. - In this case, the keys() function returns user_id as the first key. user_id is not a sequence, but - DB_DataObject's sequenceKey() will incorrectly think it is. Then, since the sequenceKey() is a numeric - type, but is not set to autoincrement in the database, DB_DataObject will create a _seq table and - manage the sequence itself. This is not the correct behavior for the user_id in this class. - So we override that incorrect behavior, and simply say there is no sequence key. - */ - function sequenceKey() - { - return array(false,false); - } - function makeNew($user) { $login_token = Login_token::staticGet('user_id', $user->id); diff --git a/classes/Remember_me.php b/classes/Remember_me.php index ceac155347..6523ad8174 100644 --- a/classes/Remember_me.php +++ b/classes/Remember_me.php @@ -23,11 +23,6 @@ class Remember_me extends Managed_DataObject /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE - function sequenceKey() - { - return array(false, false); - } - public static function schemaDef() { return array( diff --git a/classes/User_im_prefs.php b/classes/User_im_prefs.php index 00b4e65c15..cc9dea608d 100644 --- a/classes/User_im_prefs.php +++ b/classes/User_im_prefs.php @@ -80,19 +80,6 @@ class User_im_prefs extends Managed_DataObject ); } - /* - DB_DataObject calculates the sequence key(s) by taking the first key returned by the keys() function. - In this case, the keys() function returns user_id as the first key. user_id is not a sequence, but - DB_DataObject's sequenceKey() will incorrectly think it is. Then, since the sequenceKey() is a numeric - type, but is not set to autoincrement in the database, DB_DataObject will create a _seq table and - manage the sequence itself. This is not the correct behavior for the user_id in this class. - So we override that incorrect behavior, and simply say there is no sequence key. - */ - function sequenceKey() - { - return array(false,false); - } - /** * We have two compound keys with unique constraints: * (transport, user_id) which is our primary key, and