This commit is contained in:
Mario Vavti 2015-10-31 12:04:20 +01:00
commit d6d96e8c89
5 changed files with 671 additions and 560 deletions

View file

@ -133,7 +133,15 @@ This document assumes you're an administrator.
How long to cache photos, in seconds. Default is 86400 (1 day). How long to cache photos, in seconds. Default is 86400 (1 day).
Longer time increases performance, but it also means it takes longer for changed permissions to apply. Longer time increases performance, but it also means it takes longer for changed permissions to apply.
[b]system > poco_rating_enable[/b] [b]system > poco_rating_enable[/b]
Distributed reputation reporting and data collection may be disabled. If your site does not participate in distributed reputation you will also not be able to make use of the data from your connections on other sites. By default and in the absence of any setting it is enabled. Individual members can opt out by restricting who can see their connections or by not providing any reputation information for their connections. Distributed reputation reporting and data collection may be disabled. If your site does not participate in distributed reputation you will also not be able to make use of the data from your connections on other sites. By default and in the absence of any setting it is enabled. Individual members can opt out by restricting who can see their connections or by not providing any reputation information for their connections.
[b]Directory config[/b]
[b]directory > safemode[/b]
0 or 1.
[b]directory > globaldir[/b]
0 or 1. Default 0. If you visit the directory on a site you'll just see the members of that site by default. You have to go through an extra step to see the people in the rest of the network; and by doing so there's a clear delineation that these people *aren't* members of that site but of a larger network.
[b]directory > pubforums[/b]
0 or 1. Public forums *should* be default 0.
#include doc/macros/main_footer.bb; #include doc/macros/main_footer.bb;

View file

@ -3455,6 +3455,7 @@ function post_is_importable($item,$abook) {
$text = prepare_text($item['body'],$item['mimetype']); $text = prepare_text($item['body'],$item['mimetype']);
$text = html2plain($text); $text = html2plain($text);
$lang = null; $lang = null;
if((strpos($abook['abook_incl'],'lang=') !== false) || (strpos($abook['abook_excl'],'lang=') !== false)) { if((strpos($abook['abook_incl'],'lang=') !== false) || (strpos($abook['abook_excl'],'lang=') !== false)) {

70
mod/fhublocs.php Normal file
View file

@ -0,0 +1,70 @@
<?php
require_once('include/zot.php');
require_once('include/crypto.php');
/* fix missing or damaged hublocs */
function fhublocs_content(&$a) {
if(! is_site_admin())
return;
$o = '';
$r = q("select * from channel where channel_removed = 0");
if($r) {
foreach($r as $rr) {
$primary_address = '';
$x = zot_get_hublocs($rr['channel_hash']);
if($x) {
$o .= 'Hubloc exists for ' . $rr['channel_name'] . EOL;
continue;
}
$y = q("select xchan_addr from xchan where xchan_hash = '%s' limit 1",
dbesc($rr['channel_hash'])
);
if($y)
$primary_address = $y[0]['xchan_addr'];
$hub_address = $rr['channel']['channel_address'] . '@' . get_app()->get_hostname();
$primary = (($hub_address === $primary_address) ? 1 : 0);
if(! $y)
$primary = 1;
$m = q("delete from hubloc where hubloc_hash = '%s' and hubloc_url = '%s' ",
dbesc($rr['channel_hash']),
dbesc(z_root())
);
// Create a verified hub location pointing to this site.
$h = q("insert into hubloc ( hubloc_guid, hubloc_guid_sig, hubloc_hash, hubloc_addr, hubloc_primary, hubloc_url, hubloc_url_sig, hubloc_host, hubloc_callback, hubloc_sitekey, hubloc_network )
values ( '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s' )",
dbesc($rr['channel_guid']),
dbesc($rr['channel_guid_sig']),
dbesc($rr['channel_hash']),
dbesc($rr['channel_address'] . '@' . get_app()->get_hostname()),
intval($primary),
dbesc(z_root()),
dbesc(base64url_encode(rsa_sign(z_root(),$rr['channel_prvkey']))),
dbesc(get_app()->get_hostname()),
dbesc(z_root() . '/post'),
dbesc(get_config('system','pubkey')),
dbesc('zot')
);
if($h)
$o . 'local hubloc created for ' . $rr['channel_name'] . EOL;
else
$o .= 'DB update failed for ' . $rr['channel_name'] . EOL;
}
return $o;
}
}

File diff suppressed because it is too large Load diff

View file

@ -1 +1 @@
2015-10-29.1200 2015-10-30.1201