summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/Forward.php3
-rw-r--r--db/08to09_pg.sql18
-rw-r--r--db/statusnet_pg.sql18
-rw-r--r--lib/language.php2
4 files changed, 39 insertions, 2 deletions
diff --git a/classes/Forward.php b/classes/Forward.php
index e9b83a58b..09b2d6a4e 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();
diff --git a/db/08to09_pg.sql b/db/08to09_pg.sql
index 0bd47dea5..4f8281bc3 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'*/,
@@ -69,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 81b329d1e..6bcc27885 100644
--- a/db/statusnet_pg.sql
+++ b/db/statusnet_pg.sql
@@ -572,6 +572,18 @@ 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'*/,
@@ -581,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)
+);
diff --git a/lib/language.php b/lib/language.php
index ab46f1a65..916cee7ed 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);