diff options
Diffstat (limited to 'boot.php')
-rwxr-xr-x | boot.php | 38 |
1 files changed, 35 insertions, 3 deletions
@@ -49,7 +49,7 @@ require_once('include/hubloc.php'); require_once('include/attach.php'); define ( 'PLATFORM_NAME', 'hubzilla' ); -define ( 'STD_VERSION', '2.7.3' ); +define ( 'STD_VERSION', '2.7.5' ); define ( 'ZOT_REVISION', '1.3' ); define ( 'DB_UPDATE_VERSION', 1196 ); @@ -72,8 +72,6 @@ define ( 'DIRECTORY_MODE_PRIMARY', 0x0001); // There can only be *one* prima define ( 'DIRECTORY_MODE_SECONDARY', 0x0002); // All other mirror directory servers define ( 'DIRECTORY_MODE_STANDALONE', 0x0100); // A detached (off the grid) hub with itself as directory server. -define ( 'ZOT6_COMPLIANT', 0x1000); - // We will look for upstream directories whenever me make contact // with other sites, but if this is a new installation and isn't // a standalone hub, we need to seed the service with a starting @@ -425,6 +423,7 @@ define ( 'TERM_THING', 7 ); define ( 'TERM_BOOKMARK', 8 ); define ( 'TERM_HIERARCHY', 9 ); define ( 'TERM_COMMUNITYTAG', 10 ); +define ( 'TERM_FORUM', 11 ); define ( 'TERM_OBJ_POST', 1 ); define ( 'TERM_OBJ_PHOTO', 2 ); @@ -456,6 +455,17 @@ define ( 'NAMESPACE_STATUSNET', 'http://status.net/schema/api/1/' ); define ( 'NAMESPACE_ATOM1', 'http://www.w3.org/2005/Atom' ); define ( 'NAMESPACE_YMEDIA', 'http://search.yahoo.com/mrss/' ); +// We should be using versioned jsonld contexts so that signatures will be slightly more reliable. +// Why signatures are unreliable by design is a problem nobody seems to care about +// "because it's a proposed W3C standard". . + +// Anyway, if you use versioned contexts, communication with Mastodon fails. Have not yet investigated +// the reason for the dependency but for the current time, use the standard non-versioned context. +//define ( 'ACTIVITYSTREAMS_JSONLD_REV', 'https://www.w3.org/ns/activitystreams-history/v1.8.jsonld' ); + +define ( 'ACTIVITYSTREAMS_JSONLD_REV', 'https://www.w3.org/ns/activitystreams' ); + +define ( 'ZOT_APSCHEMA_REV', '/apschema/v1.2' ); /** * activity stream defines */ @@ -487,6 +497,7 @@ define ( 'ACTIVITY_TAG', NAMESPACE_ACTIVITY_SCHEMA . 'tag' ); define ( 'ACTIVITY_SHARE', NAMESPACE_ACTIVITY_SCHEMA . 'share' ); define ( 'ACTIVITY_FAVORITE', NAMESPACE_ACTIVITY_SCHEMA . 'favorite' ); define ( 'ACTIVITY_CREATE', NAMESPACE_ACTIVITY_SCHEMA . 'create' ); +define ( 'ACTIVITY_DELETE', NAMESPACE_ACTIVITY_SCHEMA . 'delete' ); define ( 'ACTIVITY_WIN', NAMESPACE_ACTIVITY_SCHEMA . 'win' ); define ( 'ACTIVITY_LOSE', NAMESPACE_ACTIVITY_SCHEMA . 'lose' ); define ( 'ACTIVITY_TIE', NAMESPACE_ACTIVITY_SCHEMA . 'tie' ); @@ -780,6 +791,10 @@ class App { public static $is_tablet = false; public static $comanche; + + public static $channel_links; + + public static $category; // Allow themes to control internal parameters @@ -907,6 +922,9 @@ class App { * * There will always be one argument. If provided a naked domain * URL, self::$argv[0] is set to "home". + * + * If $argv[0] has a period in it, for example foo.json; rewrite + * to module = 'foo' and set $_REQUEST['module_format'] = 'json'; */ self::$argv = explode('/', self::$cmd); @@ -927,6 +945,7 @@ class App { self::$module = 'home'; } + /* * See if there is any page number information, and initialise * pagination @@ -1024,6 +1043,19 @@ class App { return self::$path; } + public static function get_channel_links() { + $s = ''; + $x = self::$channel_links; + if($x && is_array($x) && count($x)) { + foreach($x as $y) { + if($s) { + $s .= ','; + } + $s .= '<' . $y['url'] . '>; rel="' . $y['rel'] . '"; type="' . $y['type'] . '"'; + } + } + return $s; + } public static function set_account($acct) { self::$account = $acct; } |