aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Channel.php2
-rw-r--r--Zotlabs/Module/Display.php2
-rw-r--r--Zotlabs/Module/Item.php6
-rw-r--r--Zotlabs/Module/Nojs.php8
-rw-r--r--Zotlabs/Module/Pconfig.php2
-rw-r--r--Zotlabs/Module/Pushcall.php19
-rw-r--r--Zotlabs/Module/Test.php38
-rw-r--r--Zotlabs/Module/Zcard.php107
-rw-r--r--Zotlabs/Web/CheckJS.php13
-rwxr-xr-xboot.php2
-rw-r--r--include/bb2diaspora.php34
-rw-r--r--include/notifier.php2
-rw-r--r--version.inc2
-rw-r--r--view/css/conversation.css4
-rw-r--r--view/js/autocomplete.js8
15 files changed, 61 insertions, 188 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index cae561266..36f13e775 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -57,7 +57,7 @@ function get($update = 0, $load = false) {
if($load)
$_SESSION['loadtime'] = datetime_convert();
- $checkjs = new \Zotlabs\Web\CheckJS();
+ $checkjs = new \Zotlabs\Web\CheckJS(1);
$category = $datequery = $datequery2 = '';
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index 3d24c6c9a..2a5a04a2a 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -10,7 +10,7 @@ class Display extends \Zotlabs\Web\Controller {
// logger("mod-display: update = $update load = $load");
- $checkjs = new \Zotlabs\Web\CheckJS();
+ $checkjs = new \Zotlabs\Web\CheckJS(1);
if($load)
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 58660a839..74fbeed67 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -984,9 +984,9 @@ class Item extends \Zotlabs\Web\Controller {
if(($parent) && ($parent != $post_id)) {
// Store the comment signature information in case we need to relay to Diaspora
- $ditem = $datarray;
- $ditem['author'] = $observer;
- store_diaspora_comment_sig($ditem,$channel,$parent_item, $post_id, (($walltowall_comment) ? 1 : 0));
+ //$ditem = $datarray;
+ //$ditem['author'] = $observer;
+ //store_diaspora_comment_sig($ditem,$channel,$parent_item, $post_id, (($walltowall_comment) ? 1 : 0));
}
else {
$r = q("select * from item where id = %d",
diff --git a/Zotlabs/Module/Nojs.php b/Zotlabs/Module/Nojs.php
index 5e48c5b5f..6fd6d8106 100644
--- a/Zotlabs/Module/Nojs.php
+++ b/Zotlabs/Module/Nojs.php
@@ -5,11 +5,11 @@ namespace Zotlabs\Module;
class Nojs extends \Zotlabs\Web\Controller {
function init() {
-
- setcookie('jsdisabled', 1, 0);
- $p = $_GET['query'];
+ $n = ((argc() > 1) ? intval(argv(1)) : 1);
+ setcookie('jsdisabled', $n, 0, '/');
+ $p = $_GET['redir'];
$hasq = strpos($p,'?');
- goaway(z_root() . (($p) ? '/' . $p : '') . (($hasq) ? '' : '?f=' ) . '&jsdisabled=1');
+ goaway(z_root() . (($p) ? '/' . $p : '') . (($hasq) ? '' : '?f=' ) . '&jsdisabled=' . $n);
}
}
diff --git a/Zotlabs/Module/Pconfig.php b/Zotlabs/Module/Pconfig.php
index 01899ffdb..b6264bddc 100644
--- a/Zotlabs/Module/Pconfig.php
+++ b/Zotlabs/Module/Pconfig.php
@@ -55,7 +55,7 @@ class Pconfig extends \Zotlabs\Web\Controller {
$content .= '<a href="pconfig/' . escape_tags(argv(1)) . '">pconfig[' . local_channel() . '][' . escape_tags(argv(1)) . ']</a>' . EOL . EOL;
$content .= '<a href="pconfig/' . escape_tags(argv(1)) . '/' . escape_tags(argv(2)) . '" >pconfig[' . local_channel() . '][' . escape_tags(argv(1)) . '][' . escape_tags(argv(2)) . ']</a> = ' . get_pconfig(local_channel(),escape_tags(argv(1)),escape_tags(argv(2))) . EOL;
- if(in_array(argv(2),disallowed_pconfig())) {
+ if(in_array(argv(2),$this->disallowed_pconfig())) {
notice( t('This setting requires special processing and editing has been blocked.') . EOL);
return $content;
}
diff --git a/Zotlabs/Module/Pushcall.php b/Zotlabs/Module/Pushcall.php
deleted file mode 100644
index c0b95159d..000000000
--- a/Zotlabs/Module/Pushcall.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-namespace Zotlabs\Module;
-
-
-class Pushcall extends \Zotlabs\Web\Controller {
-
- function init() {
- logger('pushcall: received');
-
- $xml = file_get_contents('php://input');
-
- logger('received: ' . $xml);
-
-
-
-
- killme();
- }
-}
diff --git a/Zotlabs/Module/Test.php b/Zotlabs/Module/Test.php
deleted file mode 100644
index ff14e4691..000000000
--- a/Zotlabs/Module/Test.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-namespace Zotlabs\Module;
-
-
-class Test extends \Zotlabs\Web\Controller {
-
- function get() {
-
- $s = '<XML>
- <post><profile>
- <diaspora_handle>macgirvin@diasp.org</diaspora_handle>
- <first_name>Mike</first_name>
- <last_name>Macgirvin</last_name>
- <image_url>https://diasp.org/uploads/images/thumb_large_d5f9b6384c91f532f280.jpg</image_url>
- <image_url_small>https://diasp.org/uploads/images/thumb_small_d5f9b6384c91f532f280.jpg</image_url_small>
- <image_url_medium>https://diasp.org/uploads/images/thumb_medium_d5f9b6384c91f532f280.jpg</image_url_medi\
- um>
- <birthday>1000-05-14</birthday>
- <gender/>
- <bio>Creator of Friendica, Redmatrix, and Hubzilla. </bio>
- <location>Australia</location>
- <searchable>true</searchable>
- <nsfw>false</nsfw>
- <tag_string>#redmatrix #hubzilla </tag_string>
- </profile></post>
- </XML>';
-
- $parsed_xml = xml2array($s,false,0,'tag');
-
- $o = print_r($parsed_xml,true);
- return $o;
-
-
- // fix_system_urls('http://hz.macgirvin.com',z_root());
-
- }
-
-}
diff --git a/Zotlabs/Module/Zcard.php b/Zotlabs/Module/Zcard.php
deleted file mode 100644
index b8967023e..000000000
--- a/Zotlabs/Module/Zcard.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-namespace Zotlabs\Module;
-
-
-
-class Zcard extends \Zotlabs\Web\Controller {
-
- function init() {
-
- /*
- if(argc() > 1)
- $which = argv(1);
- if(! $which)
- return;
-
-
- $arr = array();
- $arr['links'] = array();
-
- $r = q("select * from channel left join xchan on xchan_hash = channel_hash where channel_address = '%s' limit 1",
- dbesc($which)
- );
-
- if(! $which) {
- notice( t('Channel not found.' ) . EOL);
- return;
- }
-
- $channel = $r[0];
- $channel['channel_addr'] = $r[0]['channel_address'] . '@' . \App::get_hostname();
- $arr['chan'] = $channel;
-
- if(perm_is_allowed($channel['channel_id'],get_observer_hash(),'view_profile')) {
- $p = q("select * from profile where is_default = 1 and uid = %d limit 1",
- intval($channel['channel_id'])
- );
- }
- $profile = (($p) ? $p[0] : false);
-
- $r = q("select height, width, resource_id, scale, type from photo where uid = %d and scale >= %d and photo_usage = %d",
- intval($channel['channel_id']),
- intval(PHOTO_RES_COVER_1200),
- intval(PHOTO_COVER)
- );
-
- if($r) {
- foreach($r as $rr) {
- $arr['links'][] = array('rel' => 'cover_photo', 'type' => $rr['type'], 'width' => intval($rr['width']) , 'height' => intval($rr['height']), 'href' => z_root() . '/photo/' . $rr['resource_id'] . '-' . $rr['scale']);
- }
- }
-
- $arr['links'][] = array('rel' => 'profile_photo', 'type' => $channel['xchan_photo_mimetype'], 'width' => 300 , 'height' => 300, 'href' => $channel['xchan_photo_l']);
- $arr['links'][] = array('rel' => 'profile_photo', 'type' => $channel['xchan_photo_mimetype'], 'width' => 80 , 'height' => 80, 'href' => $channel['xchan_photo_m']);
- $arr['links'][] = array('rel' => 'profile_photo', 'type' => $channel['xchan_photo_mimetype'], 'width' => 48 , 'height' => 48, 'href' => $channel['xchan_photo_s']);
-
-
-
- $likers = q("select liker, xchan.* from likes left join xchan on liker = xchan_hash where channel_id = %d and target_type = '%s' and verb = '%s'",
- intval(\App::$profile['profile_uid']),
- dbesc(ACTIVITY_OBJ_PROFILE),
- dbesc(ACTIVITY_LIKE)
- );
- $profile['likers'] = array();
- $profile['like_count'] = count($likers);
- $profile['like_button_label'] = tt('Like','Likes',$profile['like_count'],'noun');
- if($likers) {
- foreach($likers as $l)
- $profile['likers'][] = array('name' => $l['xchan_name'],'url' => $l['xchan_url'], 'photo' => $l['xchan_photo_s']);
- }
-
- $arr['profile'] = $profile;
-
- logger('zcard: ' . print_r($arr,true));
-
- if(argc() > 2)
- \App::$data['zcard'] = $arr;
- else {
- echo json_encode($arr);
- killme();
-
- }
- */
- }
-
-
-
- function get() {
-
- $channel = channelx_by_nick(argv(1));
- if(! $channel)
- return;
-
- $o = get_zcard($channel,get_observer_hash(),array('width' => $_REQUEST['width'], 'height' => $_REQUEST['height']));
-
- // $o .= replace_macros(get_markup_template('zcard.tpl'),array(
- // '$scale' => $scale,
- // '$cover' => $cover,
- // '$pphoto' => $pphoto,
- // '$zcard' => $zcard,
- // '$size' => 'small'
- // ));
-
- return $o;
-
-
- }
-}
diff --git a/Zotlabs/Web/CheckJS.php b/Zotlabs/Web/CheckJS.php
index 3ad5fc1ed..5f9856a8c 100644
--- a/Zotlabs/Web/CheckJS.php
+++ b/Zotlabs/Web/CheckJS.php
@@ -10,14 +10,25 @@ class CheckJS {
function __construct($test = 0) {
if(intval($_REQUEST['jsdisabled']))
$this->jsdisabled = 1;
+ else
+ $this->jsdisabled = 0;
if(intval($_COOKIE['jsdisabled']))
$this->jsdisabled = 1;
+ else
+ $this->jsdisabled = 0;
if(! $this->jsdisabled) {
$page = urlencode(\App::$query_string);
if($test) {
- \App::$page['htmlhead'] .= "\r\n" . '<meta http-equiv="refresh" content="0; url=' . z_root() . '/nojs?f=&redir=' . $page . '">' . "\r\n";
+
+ if(! array_key_exists('jsdisabled',$_COOKIE)) {
+ \App::$page['htmlhead'] .= "\r\n" . '<script>document.cookie="jsdisabled=0; path=/"; var jsMatch = /\&jsdisabled=0/; if (!jsMatch.exec(location.href)) { location.href = "' . z_root() . '/nojs/0?f=&redir=' . $page . '" ; }</script>' . "\r\n";
+ /* emulate JS cookie if cookies are not accepted */
+ if (array_key_exists('jsdisabled',$_GET)) {
+ $_COOKIE['jsdisabled'] = $_GET['jsdisabled'];
+ }
+ }
}
else {
\App::$page['htmlhead'] .= "\r\n" . '<noscript><meta http-equiv="refresh" content="0; url=' . z_root() . '/nojs?f=&redir=' . $page . '"></noscript>' . "\r\n";
diff --git a/boot.php b/boot.php
index 385115be4..674e3731e 100755
--- a/boot.php
+++ b/boot.php
@@ -47,7 +47,7 @@ require_once('include/account.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')));
-define ( 'STD_VERSION', '1.4' );
+define ( 'STD_VERSION', '1.4.1' );
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1165 );
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 1ed57bfd4..9167cb5ad 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -270,7 +270,14 @@ function bb2dmention_callback($match) {
function bb2diaspora_itemwallwall(&$item) {
+ // We will provide wallwall (embedded author on the Diaspora side) if
+ // 1. It is a wall-to-wall post
+ // 2. A comment arrived which has no Diaspora signature info
+
+
+ $wallwall = false;
$author_exists = true;
+
if(! array_key_exists('author',$item)) {
$author_exists = false;
logger('bb2diaspora_itemwallwall: no author');
@@ -281,11 +288,21 @@ function bb2diaspora_itemwallwall(&$item) {
$item['author'] = $r[0];
}
- if(($item['mid'] == $item['parent_mid']) && ($item['author_xchan'] != $item['owner_xchan']) && (is_array($item['author']))) {
- logger('bb2diaspora_itemwallwall: author: ' . print_r($item['author'],true), LOGGER_DATA);
+ $has_meta = false;
+ if($item['diaspora_meta'] || get_iconfig($item,'diaspora','fields'))
+ $has_meta = true;
+
+ if($item['author_xchan'] != $item['owner_xchan']) {
+ if($item['mid'] == $item['parent_mid'])
+ $wallwall = true;
+ else {
+ if(! $has_meta) {
+ $wallwall = true;
+ }
+ }
}
- if(($item['mid'] == $item['parent_mid']) && ($item['author_xchan'] != $item['owner_xchan']) && (is_array($item['author'])) && $item['author']['xchan_url'] && $item['author']['xchan_name'] && $item['author']['xchan_photo_m']) {
+ if(($wallwall) && (is_array($item['author'])) && $item['author']['xchan_url'] && $item['author']['xchan_name'] && $item['author']['xchan_photo_m']) {
logger('bb2diaspora_itemwallwall: wall to wall post',LOGGER_DEBUG);
// post will come across with the owner's identity. Throw a preamble onto the post to indicate the true author.
$item['body'] = "\n\n"
@@ -301,7 +318,12 @@ function bb2diaspora_itemwallwall(&$item) {
}
-function bb2diaspora_itembody($item, $force_update = false) {
+function bb2diaspora_itembody($item, $force_update = false, $have_channel = false) {
+
+
+ if(! get_iconfig($item,'diaspora','fields')) {
+ $force_update = true;
+ }
$matches = array();
@@ -339,8 +361,8 @@ function bb2diaspora_itembody($item, $force_update = false) {
}
}
-
- bb2diaspora_itemwallwall($newitem);
+ if(! $have_channel)
+ bb2diaspora_itemwallwall($newitem);
$title = $newitem['title'];
$body = preg_replace('/\#\^http/i', 'http', $newitem['body']);
diff --git a/include/notifier.php b/include/notifier.php
index 628847d54..4435c7497 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -450,7 +450,6 @@ function notifier_run($argv, $argc){
'target_item' => $target_item,
'top_level_post' => $top_level_post,
'private' => $private,
- 'followup' => $followup,
'relay_to_owner' => $relay_to_owner,
'uplink' => $uplink,
'cmd' => $cmd,
@@ -547,7 +546,6 @@ function notifier_run($argv, $argc){
'hub' => $hub,
'top_level_post' => $top_level_post,
'private' => $private,
- 'followup' => $followup,
'relay_to_owner' => $relay_to_owner,
'uplink' => $uplink,
'cmd' => $cmd,
diff --git a/version.inc b/version.inc
index df01f864e..c414fb0fd 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2016-04-18.1370H
+2016-04-20.1372H
diff --git a/view/css/conversation.css b/view/css/conversation.css
index 5cbd5c896..0ecec039f 100644
--- a/view/css/conversation.css
+++ b/view/css/conversation.css
@@ -196,8 +196,10 @@ a.wall-item-name-link {
/* comment_item */
-.comment-edit-text-empty, .comment-edit-text-full {
+.comment-edit-text-empty,
+.comment-edit-text-full {
width: 100%;
+ display: inherit;
}
.comment-edit-text-empty {
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 59e3600b3..84cc075dc 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -147,6 +147,9 @@ function listNewLineAutocomplete(id) {
setCaretPosition(text, caretPos + 5);
return true;
}
+ else {
+ return false;
+ }
}
function string2bb(element) {
@@ -315,11 +318,12 @@ function string2bb(element) {
a.on('textComplete:select', function(e, value, strategy) { value; });
a.keypress(function(e){
- e.stopImmediatePropagation();
if (e.keyCode == 13) {
var x = listNewLineAutocomplete(this.id);
- if(x)
+ if(x) {
+ e.stopImmediatePropagation();
e.preventDefault();
+ }
}
});
};