We are now having an account type and are publishing it
This commit is contained in:
parent
196eb6009f
commit
d632d282cd
9 changed files with 77 additions and 32 deletions
|
@ -499,6 +499,7 @@ function db_definition() {
|
|||
"writable" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||
"forum" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||
"prv" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||
"contact-type" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"),
|
||||
"hidden" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||
"archive" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||
"pending" => array("type" => "tinyint(1)", "not null" => "1", "default" => "1"),
|
||||
|
@ -1402,6 +1403,7 @@ function db_definition() {
|
|||
"cntunkmail" => array("type" => "int(11)", "not null" => "1", "default" => "10"),
|
||||
"notify-flags" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "65535"),
|
||||
"page-flags" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"),
|
||||
"account-type" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"),
|
||||
"prvnets" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
|
||||
"pwdreset" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
|
||||
"maxreq" => array("type" => "int(11)", "not null" => "1", "default" => "10"),
|
||||
|
|
|
@ -178,7 +178,7 @@ function delivery_run(&$argv, &$argc){
|
|||
|
||||
$r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`,
|
||||
`user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`,
|
||||
`user`.`page-flags`, `user`.`prvnets`
|
||||
`user`.`page-flags`, `user`.`account-type`, `user`.`prvnets`
|
||||
FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
|
||||
WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
|
||||
intval($uid)
|
||||
|
|
|
@ -98,9 +98,9 @@ class dfrn {
|
|||
|
||||
$sql_extra = " AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' ";
|
||||
|
||||
$r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags`
|
||||
$r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags`, `user`.`account-type`
|
||||
FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
|
||||
WHERE `contact`.`self` = 1 AND `user`.`nickname` = '%s' LIMIT 1",
|
||||
WHERE `contact`.`self` AND `user`.`nickname` = '%s' LIMIT 1",
|
||||
dbesc($owner_nick)
|
||||
);
|
||||
|
||||
|
@ -440,9 +440,13 @@ class dfrn {
|
|||
xml::add_element($doc, $root, "link", "", $attributes);
|
||||
}
|
||||
|
||||
// For backward compatibility we keep this element
|
||||
if ($owner['page-flags'] == PAGE_COMMUNITY)
|
||||
xml::add_element($doc, $root, "dfrn:community", 1);
|
||||
|
||||
// The former element is replaced by this one
|
||||
xml::add_element($doc, $root, "dfrn:account_type", $owner["account-type"]);
|
||||
|
||||
/// @todo We need a way to transmit the different page flags like "PAGE_PRVGROUP"
|
||||
|
||||
xml::add_element($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME));
|
||||
|
|
|
@ -134,7 +134,7 @@ function notifier_run(&$argv, &$argc){
|
|||
} elseif($cmd === 'removeme') {
|
||||
$r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`,
|
||||
`user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`,
|
||||
`user`.`page-flags`, `user`.`prvnets`, `user`.`guid`
|
||||
`user`.`page-flags`, `user`.`prvnets`, `user`.`account-type`, `user`.`guid`
|
||||
FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
|
||||
WHERE `contact`.`uid` = %d AND `contact`.`self` LIMIT 1",
|
||||
intval($item_id));
|
||||
|
@ -204,7 +204,7 @@ function notifier_run(&$argv, &$argc){
|
|||
|
||||
$r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`,
|
||||
`user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`,
|
||||
`user`.`page-flags`, `user`.`prvnets`
|
||||
`user`.`page-flags`, `user`.`prvnets`, `user`.`account-type`
|
||||
FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
|
||||
WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
|
||||
intval($uid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue