Compare commits

...

8 Commits
5.2 ... 5.2.2

Author SHA1 Message Date
Mario
f94b046333 changelog
(cherry picked from commit 5e8e6dc458)
2021-02-13 21:23:04 +01:00
Mario
9751efb709 version 5.2.2 2021-02-13 21:17:13 +01:00
Mario
7b2f53cc69 fix ping_site() issue
(cherry picked from commit 22e0175ab7)
2021-02-13 21:15:49 +01:00
Mario
254e30bea1 version 5.2.1 2021-01-16 10:33:46 +01:00
Mario
a16692eeb0 changelog
(cherry picked from commit 485a232ae6)
2021-01-16 10:33:13 +01:00
Mario
d3f8118874 wrong logic
(cherry picked from commit 0d544e2294)
2021-01-16 10:18:29 +01:00
Mario
cb3131a166 also check for zot6
(cherry picked from commit 3bcb322156)
2021-01-16 10:14:16 +01:00
Mario
3105f514e4 make attach_upgrade() catch entries where only display_path is missing
(cherry picked from commit 42812078c5)
2021-01-16 10:13:43 +01:00
6 changed files with 84 additions and 56 deletions

View File

@@ -1,3 +1,13 @@
Hubzilla 5.2.2 (2021-02-13)
- Fix issue with ping_site()
Hubzilla 5.2.1 (2021-01-16)
- Fix attach_upgrade() to catch all broken entries in attach
- Fix collect_recipients() public policy filter for zot6
- Fix leaking of duplicate tasks in queueworker addon_common
Hubzilla 5.2 (2021-01-13)
- Use libzotdir for directory
- Streamline usage of channel url for keyId

View File

@@ -3143,6 +3143,11 @@ class Libzot {
);
}
// this site obviously isn't dead because they are trying to communicate with us.
q("update site set site_dead = 0 where site_dead = 1 and site_url = '%s' ",
dbesc($hub['hubloc_url'])
);
return $hub['hubloc_url'];
}

View File

@@ -1,100 +1,114 @@
<?php
namespace Zotlabs\Module;
use App;
use Zotlabs\Lib\Libzot;
use Zotlabs\Web\Controller;
use Zotlabs\Web\HTTPSig;
require_once('include/items.php');
require_once('include/conversation.php');
class Home extends \Zotlabs\Web\Controller {
class Home extends Controller {
function init() {
$ret = array();
call_hooks('home_init',$ret);
$ret = [];
call_hooks('home_init', $ret);
if (Libzot::is_zot_request()) {
$key = get_config('system', 'prvkey');
$ret = json_encode(Libzot::site_info());
$headers = ['Content-Type' => 'application/x-zot+json', 'Digest' => HTTPSig::generate_digest_header($ret)];
$headers['(request-target)'] = strtolower($_SERVER['REQUEST_METHOD']) . ' ' . $_SERVER['REQUEST_URI'];
$h = HTTPSig::create_sig($headers, $key, z_root());
HTTPSig::set_headers($h);
echo $ret;
killme();
}
$splash = ((argc() > 1 && argv(1) === 'splash') ? true : false);
$channel = \App::get_channel();
if(local_channel() && $channel && $channel['xchan_url'] && ! $splash) {
$channel = App::get_channel();
if (local_channel() && $channel && $channel['xchan_url'] && !$splash) {
$dest = (($ret['startpage']) ? $ret['startpage'] : '');
if(! $dest)
$dest = get_config('system','startpage');
if(! $dest)
if (!$dest)
$dest = get_config('system', 'startpage');
if (!$dest)
$dest = z_root() . '/network';
goaway($dest);
}
if(remote_channel() && (! $splash) && $_SESSION['atoken']) {
if (remote_channel() && (!$splash) && $_SESSION['atoken']) {
$r = q("select * from atoken where atoken_id = %d",
intval($_SESSION['atoken'])
);
if($r) {
if ($r) {
$x = channelx_by_n($r[0]['atoken_uid']);
if($x) {
if ($x) {
goaway(z_root() . '/channel/' . $x['channel_address']);
}
}
}
}
if(get_account_id() && ! $splash) {
if (get_account_id() && !$splash) {
goaway(z_root() . '/new_channel');
}
}
function get($update = 0, $load = false) {
$o = '';
if(x($_SESSION,'theme'))
if (x($_SESSION, 'theme'))
unset($_SESSION['theme']);
if(x($_SESSION,'mobile_theme'))
if (x($_SESSION, 'mobile_theme'))
unset($_SESSION['mobile_theme']);
$splash = ((argc() > 1 && argv(1) === 'splash') ? true : false);
call_hooks('home_content',$o);
if($o)
call_hooks('home_content', $o);
if ($o)
return $o;
$frontpage = get_config('system','frontpage');
if($frontpage) {
if(strpos($frontpage,'include:') !== false) {
$file = trim(str_replace('include:' , '', $frontpage));
if(file_exists($file)) {
\App::$page['template'] = 'full';
\App::$page['title'] = t('$Projectname');
$o .= file_get_contents($file);
$frontpage = get_config('system', 'frontpage');
if ($frontpage) {
if (strpos($frontpage, 'include:') !== false) {
$file = trim(str_replace('include:', '', $frontpage));
if (file_exists($file)) {
App::$page['template'] = 'full';
App::$page['title'] = t('$Projectname');
$o .= file_get_contents($file);
return $o;
}
}
if(strpos($frontpage,'http') !== 0)
if (strpos($frontpage, 'http') !== 0)
$frontpage = z_root() . '/' . $frontpage;
if(intval(get_config('system','mirror_frontpage'))) {
if (intval(get_config('system', 'mirror_frontpage'))) {
$o = '<html><head><title>' . t('$Projectname') . '</title></head><body style="margin: 0; padding: 0; border: none;" ><iframe src="' . $frontpage . '" width="100%" height="100%" style="margin: 0; padding: 0; border: none;" ></iframe></body></html>';
echo $o;
killme();
}
goaway($frontpage);
}
$sitename = get_config('system','sitename');
if($sitename)
$o .= '<h1 class="home-welcome">' . sprintf( t('Welcome to %s') ,$sitename) . '</h1>';
$loginbox = get_config('system','login_on_homepage');
if(intval($loginbox) || $loginbox === false)
$sitename = get_config('system', 'sitename');
if ($sitename)
$o .= '<h1 class="home-welcome">' . sprintf(t('Welcome to %s'), $sitename) . '</h1>';
$loginbox = get_config('system', 'login_on_homepage');
if (intval($loginbox) || $loginbox === false)
$o .= login(true);
return $o;
}
}

View File

@@ -50,7 +50,7 @@ require_once('include/attach.php');
require_once('include/bbcode.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'STD_VERSION', '5.2' );
define ( 'STD_VERSION', '5.2.2' );
define ( 'ZOT_REVISION', '6.0' );
define ( 'DB_UPDATE_VERSION', 1240 );

View File

@@ -3064,8 +3064,7 @@ function attach_syspaths($channel_id,$attach_hash) {
function attach_upgrade() {
$r = q("select id, uid, hash from attach where os_path = '' and display_path = '' limit 100");
$r = q("SELECT id, uid, hash FROM attach WHERE os_path = '' OR display_path = '' LIMIT 100");
if($r) {
foreach($r as $rv) {
$x = attach_syspaths($rv['uid'],$rv['hash']);

View File

@@ -130,7 +130,7 @@ function collect_recipients($item, &$private_envelope,$include_groups = true) {
case 'sit':
case 'any':
case 'con':
if($rr['xchan_network'] != 'zot')
if(!in_array($rr['xchan_network'], ['zot6', 'zot']))
break;
case 'pub':
case '':