mostly cosmetic
This commit is contained in:
parent
033935c194
commit
c1fb819d34
25
boot.php
25
boot.php
|
@ -8,6 +8,8 @@ define ( 'DFRN_PROTOCOL_VERSION', '2.0');
|
|||
define ( 'EOL', "<br />\r\n" );
|
||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||
|
||||
// registration policy
|
||||
|
||||
define ( 'REGISTER_CLOSED', 0 );
|
||||
define ( 'REGISTER_APPROVE', 1 );
|
||||
define ( 'REGISTER_OPEN', 2 );
|
||||
|
@ -18,10 +20,12 @@ define ( 'REL_VIP', 1);
|
|||
define ( 'REL_FAN', 2);
|
||||
define ( 'REL_BUD', 3);
|
||||
|
||||
// Maximum number of "people who like (or don't like) this" we will list by name
|
||||
// Maximum number of "people who like (or don't like) this"
|
||||
// that we will list by name
|
||||
|
||||
define ( 'MAX_LIKERS', 75);
|
||||
|
||||
// email notification options
|
||||
|
||||
define ( 'NOTIFY_INTRO', 0x0001 );
|
||||
define ( 'NOTIFY_CONFIRM', 0x0002 );
|
||||
|
@ -29,6 +33,8 @@ define ( 'NOTIFY_WALL', 0x0004 );
|
|||
define ( 'NOTIFY_COMMENT', 0x0008 );
|
||||
define ( 'NOTIFY_MAIL', 0x0010 );
|
||||
|
||||
// various namespaces we may need to parse
|
||||
|
||||
define ( 'NAMESPACE_DFRN' , 'http://purl.org/macgirvin/dfrn/1.0' );
|
||||
define ( 'NAMESPACE_THREAD' , 'http://purl.org/syndication/thread/1.0' );
|
||||
define ( 'NAMESPACE_TOMB' , 'http://purl.org/atompub/tombstones/1.0' );
|
||||
|
@ -37,6 +43,8 @@ define ( 'NAMESPACE_ACTIVITY_SCHEMA', 'http://activitystrea.ms/schema/1.0/');
|
|||
define ( 'NAMESPACE_SALMON_ME', 'http://salmon-protocol.org/ns/magic-env');
|
||||
define ( 'NAMESPACE_OSTATUSSUB', 'http://ostatus.org/schema/1.0/subscribe');
|
||||
|
||||
// activity stream defines
|
||||
|
||||
define ( 'ACTIVITY_LIKE', NAMESPACE_ACTIVITY_SCHEMA . 'like' );
|
||||
define ( 'ACTIVITY_DISLIKE', NAMESPACE_DFRN . '/dislike' );
|
||||
define ( 'ACTIVITY_OBJ_HEART', NAMESPACE_DFRN . '/heart' );
|
||||
|
@ -52,6 +60,8 @@ define ( 'ACTIVITY_OBJ_PHOTO', NAMESPACE_ACTIVITY_SCHEMA . 'photo' );
|
|||
define ( 'ACTIVITY_OBJ_P_PHOTO', NAMESPACE_ACTIVITY_SCHEMA . 'profile-photo' );
|
||||
define ( 'ACTIVITY_OBJ_ALBUM', NAMESPACE_ACTIVITY_SCHEMA . 'photo-album' );
|
||||
|
||||
// item weight for query ordering
|
||||
|
||||
define ( 'GRAVITY_PARENT', 0);
|
||||
define ( 'GRAVITY_LIKE', 3);
|
||||
define ( 'GRAVITY_COMMENT', 6);
|
||||
|
@ -284,7 +294,7 @@ function replace_macros($s,$r) {
|
|||
}}
|
||||
|
||||
|
||||
// load string tranlsation table for alternate language
|
||||
// load string translation table for alternate language
|
||||
|
||||
if(! function_exists('load_translation_table')) {
|
||||
function load_translation_table($lang) {
|
||||
|
@ -400,6 +410,7 @@ function escape_tags($string) {
|
|||
|
||||
// wrapper for adding a login box. If $register == true provide a registration
|
||||
// link. This will most always depend on the value of $a->config['register_policy'].
|
||||
// returns the complete html for inserting into the page
|
||||
|
||||
if(! function_exists('login')) {
|
||||
function login($register = false) {
|
||||
|
@ -521,7 +532,7 @@ function xml_status($st, $message = '') {
|
|||
killme();
|
||||
}}
|
||||
|
||||
// Returns the uid of locally logged on user or false.
|
||||
// Returns the uid of locally logged in user or false.
|
||||
|
||||
if(! function_exists('local_user')) {
|
||||
function local_user() {
|
||||
|
@ -835,10 +846,13 @@ function convert_xml_element_to_array($xml_element, &$recursion_depth=0) {
|
|||
}}
|
||||
|
||||
// Given an email style address, perform webfinger lookup and
|
||||
// return the resulting DFRN profile URL.
|
||||
// return the resulting DFRN profile URL, or if no DFRN profile URL
|
||||
// is located, returns an OStatus subscription template (prefixed
|
||||
// with the string 'stat:' to identify it as on OStatus template).
|
||||
// If this isn't an email style address just return $s.
|
||||
// Return an empty string if email-style addresses but webfinger fails,
|
||||
// or if the resultant personal XRD doesn't contain a DFRN profile.
|
||||
// or if the resultant personal XRD doesn't contain a supported
|
||||
// subscription/friend-request attribute.
|
||||
|
||||
if(! function_exists('webfinger_dfrn')) {
|
||||
function webfinger_dfrn($s) {
|
||||
|
@ -853,7 +867,6 @@ function webfinger_dfrn($s) {
|
|||
foreach($links as $link)
|
||||
if($link['@attributes']['rel'] === NAMESPACE_OSTATUSSUB)
|
||||
return 'stat:' . $link['@attributes']['template'];
|
||||
|
||||
}
|
||||
return '';
|
||||
}}
|
||||
|
|
|
@ -25,7 +25,7 @@ function redir_init(&$a) {
|
|||
intval($_SESSION['uid']),
|
||||
dbesc($dfrn_id),
|
||||
intval(time() + 45));
|
||||
goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id . '&type=profile');
|
||||
|
||||
goaway ($r[0]['poll'] . '?dfrn_id=' . $dfrn_id
|
||||
. '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile');
|
||||
|
||||
}
|
Loading…
Reference in a new issue