From b139be6caf39628834ca34f5f7e58c1e08a3ebf3 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 9 Dec 2009 13:09:38 +1300 Subject: [PATCH 1/4] added missing table: location_namespace --- db/08to09_pg.sql | 10 ++++++++++ db/statusnet_pg.sql | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql index 0bd47dea56..ee590b52f9 100644 --- a/db/08to09_pg.sql +++ b/db/08to09_pg.sql @@ -39,6 +39,16 @@ create table profile_role ( ); +create table location_namespace ( + + id integer /*comment 'identity for this namespace'*/, + description text /* comment 'description of the namespace'*/ , + created integer not null /*comment 'date the record was created*/ , + /* modified timestamp comment 'date this record was modified',*/ + primary key (id) + +); + create table login_token ( user_id integer not null /* comment 'user owning this token'*/ references "user" (id), token char(32) not null /* comment 'token useable for logging in'*/, diff --git a/db/statusnet_pg.sql b/db/statusnet_pg.sql index 81b329d1e5..92546c814d 100644 --- a/db/statusnet_pg.sql +++ b/db/statusnet_pg.sql @@ -572,6 +572,16 @@ create table profile_role ( ); +create table location_namespace ( + + id integer /*comment 'identity for this namespace'*/, + description text /* comment 'description of the namespace'*/ , + created integer not null /*comment 'date the record was created*/ , + /* modified timestamp comment 'date this record was modified',*/ + primary key (id) + +); + create table login_token ( user_id integer not null /* comment 'user owning this token'*/ references "user" (id), token char(32) not null /* comment 'token useable for logging in'*/, From 3e9c2d779a3d3e014e8900060c3a2632d9e7f138 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 9 Dec 2009 13:12:29 +1300 Subject: [PATCH 2/4] add missing table "forward" --- db/08to09_pg.sql | 8 ++++++++ db/statusnet_pg.sql | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql index ee590b52f9..4f8281bc3e 100644 --- a/db/08to09_pg.sql +++ b/db/08to09_pg.sql @@ -79,3 +79,11 @@ ALTER TABLE profile ADD COLUMN lat decimal(10,7) /*comment 'latitude'*/ ; ALTER TABLE profile ADD COLUMN lon decimal(10,7) /*comment 'longitude'*/; ALTER TABLE profile ADD COLUMN location_id integer /* comment 'location id if possible'*/; ALTER TABLE profile ADD COLUMN location_ns integer /* comment 'namespace for location'*/; + +CREATE TABLE forward ( + profile_id integer not null /*comment 'profile who forwarded the notice'*/ references profile (id), + notice_id integer not null /*comment 'notice they forwarded'*/ references notice (id), + created timestamp not null /*comment 'date this record was created'*/ DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (profile_id, notice_id) +); + diff --git a/db/statusnet_pg.sql b/db/statusnet_pg.sql index 92546c814d..6bcc278859 100644 --- a/db/statusnet_pg.sql +++ b/db/statusnet_pg.sql @@ -582,6 +582,8 @@ create table location_namespace ( ); + + create table login_token ( user_id integer not null /* comment 'user owning this token'*/ references "user" (id), token char(32) not null /* comment 'token useable for logging in'*/, @@ -591,3 +593,9 @@ create table login_token ( primary key (user_id) ); +CREATE TABLE forward ( + profile_id integer not null /*comment 'profile who forwarded the notice'*/ references profile (id), + notice_id integer not null /*comment 'notice they forwarded'*/ references notice (id), + created timestamp not null /*comment 'date this record was created'*/ DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (profile_id, notice_id) +); From 789378838b9a3ad6bff906d70c8316527aed9e98 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 9 Dec 2009 13:26:59 +1300 Subject: [PATCH 3/4] that pesky table named user - now quoted --- classes/Forward.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/Forward.php b/classes/Forward.php index e9b83a58bf..09b2d6a4ee 100644 --- a/classes/Forward.php +++ b/classes/Forward.php @@ -77,7 +77,8 @@ class Forward extends Memcached_DataObject $user = new User(); - $user->query('SELECT user.* FROM user JOIN subscription ON user.id = subscription.subscriber '. + $usertable = common_database_tablename('user'); + $user->query("SELECT $usertable.* FROM $usertable INNER JOIN subscription ON $usertable.id = subscription.subscriber ". 'WHERE subscription.subscribed = '.$this->profile_id); $ni = array(); From 2f59f0ddb5cc6030671af7e751e0ae85e4751497 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 8 Dec 2009 17:35:27 -0800 Subject: [PATCH 4/4] Compat fix for PHP 5.2.4 -- drop unneeded new param to debug_backtrace(), caused error spew on older PHP (introduced PHP 5.2.5) Fix for regression in 4b5e977a7b1c390555d880d3dc7f8b8c6744646c --- lib/language.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/language.php b/lib/language.php index ab46f1a656..916cee7ed4 100644 --- a/lib/language.php +++ b/lib/language.php @@ -153,7 +153,7 @@ if (!function_exists('npgettext')) { */ function _m($msg/*, ...*/) { - $domain = _mdomain(debug_backtrace(false)); + $domain = _mdomain(debug_backtrace()); $args = func_get_args(); switch(count($args)) { case 1: return dgettext($domain, $msg);