Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
6942c715d0
File diff suppressed because one or more lines are too long
27
doc/roadmapv4.bb
Normal file
27
doc/roadmapv4.bb
Normal file
@ -0,0 +1,27 @@
|
||||
[h1]Project Roadmap V4[/h1]
|
||||
|
||||
[h2]Hubzilla 2.0 - code name "Universal Thunder"[/h2]
|
||||
|
||||
[h3]Project Core Development[/h3]
|
||||
|
||||
Goals/Highlights:
|
||||
|
||||
|
||||
Focus on visual website design tools, widgets, and sharing mechanisms
|
||||
|
||||
App organisation.
|
||||
|
||||
Conversion of core application to a composer format living under the namespace "Zotlabs"
|
||||
|
||||
Conversion of Modules to a more general purpose Controllers layout with DB/memory based
|
||||
controller routing as opposed to filesystem routing.
|
||||
|
||||
Conversion of core Zot Protocol to a class library
|
||||
|
||||
Abstraction of nomadic identity so that sending/receiving to/from singleton networks to/from any clone works flawlessly - [b]provided[/b] the clone physically connected to that singleton identity is up.
|
||||
|
||||
[h3]Community Development[/h3]
|
||||
|
||||
CalDAV/CardDAV
|
||||
|
||||
E-Commerce
|
@ -570,7 +570,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
|
||||
$urlchars = '[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,\@]';
|
||||
|
||||
if (strpos($Text,'http') !== false) {
|
||||
$Text = preg_replace("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" target="_newwin" >$2</a>', $Text);
|
||||
$Text = preg_replace("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" target="_blank" >$2</a>', $Text);
|
||||
}
|
||||
|
||||
if (strpos($Text,'[/share]') !== false) {
|
||||
@ -582,21 +582,21 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
|
||||
}
|
||||
}
|
||||
if (strpos($Text,'[/url]') !== false) {
|
||||
$Text = preg_replace("/\#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_newwin" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\#\^\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_newwin" >$2</a>', $Text);
|
||||
$Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_newwin" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="_newwin" >$2</a>', $Text);
|
||||
$Text = preg_replace("/\#\^\[url\]([$URLSearchString]*)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_blank" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\#\^\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<span class="bookmark-identifier">#^</span><a class="bookmark" href="$1" target="_blank" >$2</a>', $Text);
|
||||
$Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="_blank" >$2</a>', $Text);
|
||||
}
|
||||
if (strpos($Text,'[/zrl]') !== false) {
|
||||
$Text = preg_replace("/\#\^\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_newwin" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\#\^\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_newwin" >$2</a>', $Text);
|
||||
$Text = preg_replace("/\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_newwin" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_newwin" >$2</a>', $Text);
|
||||
$Text = preg_replace("/\#\^\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_blank" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\#\^\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<span class="bookmark-identifier">#^</span><a class="zrl bookmark" href="$1" target="_blank" >$2</a>', $Text);
|
||||
$Text = preg_replace("/\[zrl\]([$URLSearchString]*)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_blank" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[zrl\=([$URLSearchString]*)\](.*?)\[\/zrl\]/ism", '<a class="zrl" href="$1" target="_blank" >$2</a>', $Text);
|
||||
}
|
||||
// Perform MAIL Search
|
||||
if (strpos($Text,'[/mail]') !== false) {
|
||||
$Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1" target="_newwin" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1" target="_newwin" >$2</a>', $Text);
|
||||
$Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1" target="_blank" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '<a href="mailto:$1" target="_blank" >$2</a>', $Text);
|
||||
}
|
||||
|
||||
|
||||
@ -886,17 +886,17 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
|
||||
|
||||
// if video couldn't be embedded, link to it instead.
|
||||
if (strpos($Text,'[/video]') !== false) {
|
||||
$Text = preg_replace("/\[video\](.*?)\[\/video\]/", '<a href="$1" target="_newwin" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[video\](.*?)\[\/video\]/", '<a href="$1" target="_blank" >$1</a>', $Text);
|
||||
}
|
||||
if (strpos($Text,'[/audio]') !== false) {
|
||||
$Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<a href="$1" target="_newwin" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<a href="$1" target="_blank" >$1</a>', $Text);
|
||||
}
|
||||
|
||||
if (strpos($Text,'[/zvideo]') !== false) {
|
||||
$Text = preg_replace("/\[zvideo\](.*?)\[\/zvideo\]/", '<a class="zid" href="$1" target="_newwin" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[zvideo\](.*?)\[\/zvideo\]/", '<a class="zid" href="$1" target="_blank" >$1</a>', $Text);
|
||||
}
|
||||
if (strpos($Text,'[/zaudio]') !== false) {
|
||||
$Text = preg_replace("/\[zaudio\](.*?)\[\/zaudio\]/", '<a class="zid" href="$1" target="_newwin" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[zaudio\](.*?)\[\/zaudio\]/", '<a class="zid" href="$1" target="_blank" >$1</a>', $Text);
|
||||
}
|
||||
|
||||
if ($tryoembed){
|
||||
@ -905,7 +905,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $cache = false)
|
||||
}
|
||||
} else {
|
||||
if (strpos($Text,'[/iframe]') !== false) {
|
||||
$Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '<a href="$1" target="_newwin" >$1</a>', $Text);
|
||||
$Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '<a href="$1" target="_blank" >$1</a>', $Text);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1689,3 +1689,14 @@ function get_channel_default_perms($uid) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
function profiles_build_sync($channel_id) {
|
||||
|
||||
$r = q("select * from profile where uid = %d",
|
||||
intval($channel_id)
|
||||
);
|
||||
if($r) {
|
||||
build_sync_packet($channel_id,array('profile' => $r));
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php /** @file */
|
||||
|
||||
function system_down() {
|
||||
header('HTTP/1.0 503 Service Unavailable');
|
||||
echo <<< EOT
|
||||
<html>
|
||||
<head><title>System Unavailable</title></head>
|
||||
|
@ -1403,13 +1403,13 @@ function prepare_body(&$item,$attach = false) {
|
||||
|
||||
// if original photo width is <= 640px prepend it to item body
|
||||
if($object['link'][0]['width'] && $object['link'][0]['width'] <= 640) {
|
||||
$s = '<div class="inline-photo-item-wrapper"><a href="' . zid(rawurldecode($object['id'])) . '" target="_newwin"><img class="inline-photo-item" style="max-width:' . $object['link'][0]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][0]['href'])) . '"></a></div>' . $s;
|
||||
$s = '<div class="inline-photo-item-wrapper"><a href="' . zid(rawurldecode($object['id'])) . '" target="_blank"><img class="inline-photo-item" style="max-width:' . $object['link'][0]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][0]['href'])) . '"></a></div>' . $s;
|
||||
}
|
||||
|
||||
// if original photo width is > 640px make it a cover photo
|
||||
if($object['link'][0]['width'] && $object['link'][0]['width'] > 640) {
|
||||
$scale = ((($object['link'][1]['width'] == 1024) || ($object['link'][1]['height'] == 1024)) ? 1 : 0);
|
||||
$photo = '<a href="' . zid(rawurldecode($object['id'])) . '" target="_newwin"><img style="max-width:' . $object['link'][$scale]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][$scale]['href'])) . '"></a>';
|
||||
$photo = '<a href="' . zid(rawurldecode($object['id'])) . '" target="_blank"><img style="max-width:' . $object['link'][$scale]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][$scale]['href'])) . '"></a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,10 +36,8 @@ require_once('include/dba/dba_driver.php');
|
||||
|
||||
if(! $a->install) {
|
||||
$db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type, $a->install);
|
||||
if(! $db->connected){
|
||||
header('HTTP/1.0 520 Unknown Error');
|
||||
// TODO: much friendlier error message
|
||||
die("Database error, contact admin.");
|
||||
if(! $db->connected) {
|
||||
system_unavailable();
|
||||
}
|
||||
|
||||
unset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);
|
||||
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
require_once('include/photo/photo_driver.php');
|
||||
require_once('include/identity.php');
|
||||
|
||||
/* @brief Function for sync'ing permissions of profile-photos and their profile
|
||||
*
|
||||
@ -195,6 +196,8 @@ function profile_photo_post(&$a) {
|
||||
);
|
||||
}
|
||||
|
||||
profiles_build_sync(local_channel());
|
||||
|
||||
// We'll set the updated profile-photo timestamp even if it isn't the default profile,
|
||||
// so that browsers will do a cache update unconditionally
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
require_once('include/identity.php');
|
||||
|
||||
function profiles_init(&$a) {
|
||||
|
||||
@ -37,6 +38,12 @@ function profiles_init(&$a) {
|
||||
if($r)
|
||||
info( t('Profile deleted.') . EOL);
|
||||
|
||||
// @fixme this is a much more complicated sync - add any changed abook entries and
|
||||
// also add deleted flag to profile structure
|
||||
// profiles_build_sync is just here as a placeholder - it doesn't work at all here
|
||||
|
||||
// profiles_build_sync(local_channel());
|
||||
|
||||
goaway($a->get_baseurl(true) . '/profiles');
|
||||
return; // NOTREACHED
|
||||
}
|
||||
@ -118,7 +125,10 @@ function profiles_init(&$a) {
|
||||
dbesc($name)
|
||||
);
|
||||
info( t('New profile created.') . EOL);
|
||||
if(count($r3) == 1)
|
||||
|
||||
profiles_build_sync(local_channel());
|
||||
|
||||
if(($r3) && (count($r3) == 1))
|
||||
goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']);
|
||||
|
||||
goaway($a->get_baseurl(true) . '/profiles');
|
||||
@ -193,7 +203,6 @@ function profiles_post(&$a) {
|
||||
|
||||
$namechanged = false;
|
||||
|
||||
call_hooks('profile_post', $_POST);
|
||||
|
||||
// import from json export file.
|
||||
// Only import fields that are allowed on this hub
|
||||
@ -220,6 +229,7 @@ function profiles_post(&$a) {
|
||||
}
|
||||
}
|
||||
|
||||
call_hooks('profile_post', $_POST);
|
||||
|
||||
|
||||
if((argc() > 1) && (argv(1) !== "new") && intval(argv(1))) {
|
||||
@ -564,8 +574,6 @@ function profiles_post(&$a) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function profiles_content(&$a) {
|
||||
|
||||
$o = '';
|
||||
|
Reference in New Issue
Block a user