Browse Source

infrastructure for personalised @ tags (no UI/settings form yet), allow own comments through statusnet connector

pull/1/head
Friendika 10 years ago
parent
commit
a33edb0042
7 changed files with 19 additions and 9 deletions
  1. +4
    -1
      addon/statusnet/statusnet.php
  2. +2
    -2
      boot.php
  3. +1
    -0
      database.sql
  4. +2
    -1
      mod/item.php
  5. +2
    -1
      mod/photos.php
  6. +6
    -2
      update.php
  7. +2
    -2
      zot.txt

+ 4
- 1
addon/statusnet/statusnet.php View File

@ -355,7 +355,10 @@ function statusnet_post_hook(&$a,&$b) {
logger('StatusNet post invoked');
if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (!$b['parent']) ) {
if((local_user()) && (local_user() == $b['uid']) && (! $b['private'])) {
// mike 2-9-11 there was a restriction to only allow this for top level posts
// now relaxed so should allow one's own comments to be forwarded through the connector as well.
// Status.Net is not considered a private network
if($b['prvnets'])


+ 2
- 2
boot.php View File

@ -7,9 +7,9 @@ require_once('include/text.php');
require_once("include/pgettext.php");
define ( 'FRIENDIKA_VERSION', '2.2.1089' );
define ( 'FRIENDIKA_VERSION', '2.2.1090' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1084 );
define ( 'DB_UPDATE_VERSION', 1085 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );


+ 1
- 0
database.sql View File

@ -58,6 +58,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
`network` char(255) NOT NULL,
`name` char(255) NOT NULL,
`nick` char(255) NOT NULL,
`attag` char(255) NOT NULL,
`photo` text NOT NULL,
`thumb` text NOT NULL,
`micro` text NOT NULL,


+ 2
- 1
mod/item.php View File

@ -404,7 +404,8 @@ function item_post(&$a) {
);
}
else {
$r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1",
$r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1",
dbesc($name),
dbesc($name),
intval($profile_uid)
);


+ 2
- 1
mod/photos.php View File

@ -414,7 +414,8 @@ function photos_post(&$a) {
);
}
else {
$r = q("SELECT * FROM `contact` WHERE `nick` = '%s' AND `uid` = %d LIMIT 1",
$r = q("SELECT * FROM `contact` WHERE `attag` = '%s' OR `nick` = '%s' AND `uid` = %d ORDER BY `attag` DESC LIMIT 1",
dbesc($name),
dbesc($name),
intval($page_owner_uid)
);


+ 6
- 2
update.php View File

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1084 );
define( 'UPDATE_VERSION' , 1085 );
/**
*
@ -706,4 +706,8 @@ function update_1083() {
`contact` INT NOT NULL
) ENGINE = MYISAM ;");
}
}
function update_1084() {
q("ALTER TABLE `contact` ADD `attag` CHAR( 255 ) NOT NULL AFTER `nick` ");
}

+ 2
- 2
zot.txt View File

@ -114,7 +114,7 @@ listed in the To:, Cc:, or Bcc: addresses matches the webfinger address of
the "owner" of the endpoint.
3. The current endpoint is a bulk delivery endpoint. The bulk delivery
ednpoint is defined elsewhere in this document. The bulk delivery agent
endpoint is defined elsewhere in this document. The bulk delivery agent
will deliver to all local addresses found in the address lists.
zot:sig
@ -243,7 +243,7 @@ and allow authenticated browsing to other resources on the website.
Only authentication via OpenID is defined in this version of the specification.
This can be used to provide access control to any web resource to any
This can be used to provide access control of any web resource to any
webfinger identity on the internet.
*********


Loading…
Cancel
Save