aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Follow.php18
-rw-r--r--Zotlabs/Module/Wfinger.php3
-rw-r--r--Zotlabs/Update/_1205.php11
-rw-r--r--Zotlabs/Update/_1207.php24
-rw-r--r--Zotlabs/Widget/Newmember.php4
-rwxr-xr-xboot.php7
-rw-r--r--include/event.php22
-rw-r--r--include/follow.php15
-rw-r--r--view/php/theme_init.php2
-rw-r--r--view/tpl/generic_addon_settings.tpl4
-rwxr-xr-xview/tpl/settings.tpl16
-rwxr-xr-xview/tpl/settings_addons.tpl2
-rwxr-xr-xview/tpl/settings_display.tpl12
-rwxr-xr-xview/tpl/settings_features.tpl4
14 files changed, 111 insertions, 33 deletions
diff --git a/Zotlabs/Module/Follow.php b/Zotlabs/Module/Follow.php
index d8a86d0ce..04ac746cb 100644
--- a/Zotlabs/Module/Follow.php
+++ b/Zotlabs/Module/Follow.php
@@ -17,15 +17,20 @@ class Follow extends \Zotlabs\Web\Controller {
$url = notags(trim($_REQUEST['url']));
$return_url = $_SESSION['return_url'];
$confirm = intval($_REQUEST['confirm']);
-
+ $interactive = (($_REQUEST['interactive']) ? intval($_REQUEST['interactive']) : 1);
$channel = \App::get_channel();
- $result = new_contact($uid,$url,$channel,true,$confirm);
+ $result = new_contact($uid,$url,$channel,$interactive,$confirm);
if($result['success'] == false) {
if($result['message'])
notice($result['message']);
- goaway($return_url);
+ if($interactive) {
+ goaway($return_url);
+ }
+ else {
+ json_return_and_die($result);
+ }
}
info( t('Channel added.') . EOL);
@@ -53,7 +58,12 @@ class Follow extends \Zotlabs\Web\Controller {
if(($can_view_stream) || ($result['abook']['xchan_network'] === 'rss'))
\Zotlabs\Daemon\Master::Summon(array('Onepoll',$result['abook']['abook_id']));
- goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1');
+ if($interactive) {
+ goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1');
+ }
+ else {
+ json_return_and_die([ 'success' => true ]);
+ }
}
diff --git a/Zotlabs/Module/Wfinger.php b/Zotlabs/Module/Wfinger.php
index 753721d27..81d4beaed 100644
--- a/Zotlabs/Module/Wfinger.php
+++ b/Zotlabs/Module/Wfinger.php
@@ -123,7 +123,8 @@ class Wfinger extends \Zotlabs\Web\Controller {
$result['properties'] = [
'http://webfinger.net/ns/name' => $r[0]['channel_name'],
'http://xmlns.com/foaf/0.1/name' => $r[0]['channel_name'],
- 'https://w3id.org/security/v1#publicKeyPem' => $r[0]['xchan_pubkey']
+ 'https://w3id.org/security/v1#publicKeyPem' => $r[0]['xchan_pubkey'],
+ 'http://purl.org/zot/federation' => 'zot'
];
foreach($aliases as $alias)
diff --git a/Zotlabs/Update/_1205.php b/Zotlabs/Update/_1205.php
index 5384f183e..968833726 100644
--- a/Zotlabs/Update/_1205.php
+++ b/Zotlabs/Update/_1205.php
@@ -7,6 +7,17 @@ class _1205 {
function run() {
if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+
+ q("ALTER TABLE item DROP INDEX title");
+ q("ALTER TABLE item DROP INDEX body");
+ q("ALTER TABLE item DROP INDEX allow_cid");
+ q("ALTER TABLE item DROP INDEX allow_gid");
+ q("ALTER TABLE item DROP INDEX deny_cid");
+ q("ALTER TABLE item DROP INDEX deny_gid");
+ q("ALTER TABLE item DROP INDEX item_flags");
+ q("ALTER TABLE item DROP INDEX item_restrict");
+ q("ALTER TABLE item DROP INDEX aid");
+
$r = q("ALTER TABLE item
DROP INDEX item_private,
ADD INDEX uid_item_private (uid, item_private),
diff --git a/Zotlabs/Update/_1207.php b/Zotlabs/Update/_1207.php
new file mode 100644
index 000000000..f53bc46ae
--- /dev/null
+++ b/Zotlabs/Update/_1207.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1207 {
+
+ function run() {
+
+ if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+ $r = q("ALTER TABLE item
+ DROP INDEX resource_type
+ ");
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+ }
+ else {
+ return UPDATE_SUCCESS;
+ }
+
+ }
+
+}
diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php
index 898942ccc..0279f339f 100644
--- a/Zotlabs/Widget/Newmember.php
+++ b/Zotlabs/Widget/Newmember.php
@@ -39,7 +39,7 @@ class Newmember {
t('Find and Connect with others'),
[
- 'directory' => t('View the channel directory'),
+ 'directory' => t('View the directory'),
'suggest' => t('View friend suggestions'),
'connections' => t('Manage your connections'),
],
@@ -64,7 +64,7 @@ class Newmember {
// hack to put this in the correct spot of the array
if($site_firehose || $net_firehose) {
- $options[5]['pubstream'] = t('View public stream. Warning: not moderated');
+ $options[5]['pubstream'] = t('View public stream');
}
$o = replace_macros(get_markup_template('new_member.tpl'), [
diff --git a/boot.php b/boot.php
index 534503966..5d6bb2ebe 100755
--- a/boot.php
+++ b/boot.php
@@ -50,10 +50,11 @@ require_once('include/attach.php');
require_once('include/bbcode.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
-define ( 'STD_VERSION', '3.3.1' );
-define ( 'ZOT_REVISION', '1.3' );
+define ( 'STD_VERSION', '3.3.2' );
+define ( 'ZOT_REVISION', '6.0a' );
-define ( 'DB_UPDATE_VERSION', 1206 );
+
+define ( 'DB_UPDATE_VERSION', 1207 );
define ( 'PROJECT_BASE', __DIR__ );
diff --git a/include/event.php b/include/event.php
index 1077a3c64..84a16e8be 100644
--- a/include/event.php
+++ b/include/event.php
@@ -1322,3 +1322,25 @@ function translate_type($type) {
return [$type, t('Other') . ' (' . $type . ')'];
}
}
+
+
+function cal_store_lowlevel($arr) {
+
+ $store = [
+ 'cal_aid' => ((array_key_exists('cal_aid',$arr)) ? $arr['cal_aid'] : 0),
+ 'cal_uid' => ((array_key_exists('cal_uid',$arr)) ? $arr['cal_uid'] : 0),
+ 'cal_hash' => ((array_key_exists('cal_hash',$arr)) ? $arr['cal_hash'] : ''),
+ 'cal_name' => ((array_key_exists('cal_name',$arr)) ? $arr['cal_name'] : ''),
+ 'uri' => ((array_key_exists('uri',$arr)) ? $arr['uri'] : ''),
+ 'logname' => ((array_key_exists('logname',$arr)) ? $arr['logname'] : ''),
+ 'pass' => ((array_key_exists('pass',$arr)) ? $arr['pass'] : ''),
+ 'ctag' => ((array_key_exists('ctag',$arr)) ? $arr['ctag'] : ''),
+ 'synctoken' => ((array_key_exists('synctoken',$arr)) ? $arr['synctoken'] : ''),
+ 'cal_types' => ((array_key_exists('cal_types',$arr)) ? $arr['cal_types'] : ''),
+ ];
+
+ return create_table_from_array('cal', $store);
+
+}
+
+
diff --git a/include/follow.php b/include/follow.php
index 0843802c5..a63fe66ea 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -88,9 +88,18 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
// Premium channel, set confirm before callback to avoid recursion
- if(array_key_exists('connect_url',$j) && ($interactive) && (! $confirm))
- goaway(zid($j['connect_url']));
-
+ if(array_key_exists('connect_url',$j) && (! $confirm)) {
+ if($interactive) {
+ goaway(zid($j['connect_url']));
+ }
+ else {
+ $result['message'] = t('Premium channel - please visit:') . ' ' . zid($j['connect_url']);
+ logger('mod_follow: ' . $result['message']);
+ return $result;
+ }
+ }
+
+
// do we have an xchan and hubloc?
// If not, create them.
diff --git a/view/php/theme_init.php b/view/php/theme_init.php
index 1e066c570..f2c46da28 100644
--- a/view/php/theme_init.php
+++ b/view/php/theme_init.php
@@ -15,7 +15,7 @@ head_add_js('jquery.js');
head_add_js('/library/justifiedGallery/jquery.justifiedGallery.min.js');
head_add_js('/library/sprintf.js/dist/sprintf.min.js');
-head_add_js('jquery.textinputs.js');
+//head_add_js('jquery.textinputs.js');
head_add_js('autocomplete.js');
head_add_js('/library/jquery-textcomplete/jquery.textcomplete.js');
diff --git a/view/tpl/generic_addon_settings.tpl b/view/tpl/generic_addon_settings.tpl
index bf39b2aea..57028237a 100644
--- a/view/tpl/generic_addon_settings.tpl
+++ b/view/tpl/generic_addon_settings.tpl
@@ -1,12 +1,12 @@
<div class="panel">
<div class="section-subtitle-wrapper" role="tab" id="{{$addon.0}}-settings">
<h3>
- <a title="{{$addon.2}}" data-toggle="collapse" data-parent="#settings" href="#{{$addon.0}}-settings-content" aria-controls="{{$addon.0}}-settings-content">
+ <a title="{{$addon.2}}" data-toggle="collapse" data-target="#{{$addon.0}}-settings-content" href="#" aria-controls="{{$addon.0}}-settings-content">
{{$addon.1}}
</a>
</h3>
</div>
- <div id="{{$addon.0}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$addon.0}}-settings">
+ <div id="{{$addon.0}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$addon.0}}-settings" data-parent="#settings">
<div class="section-content-tools-wrapper">
{{$content}}
{{if $addon.0}}
diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl
index 0f42a6e8a..130dc6918 100755
--- a/view/tpl/settings.tpl
+++ b/view/tpl/settings.tpl
@@ -11,12 +11,12 @@
<div class="panel">
<div class="section-subtitle-wrapper" role="tab" id="basic-settings">
<h3>
- <a data-toggle="collapse" data-parent="#settings" href="#basic-settings-collapse">
+ <a data-toggle="collapse" data-target="#basic-settings-collapse" href="#">
{{$h_basic}}
</a>
</h3>
</div>
- <div id="basic-settings-collapse" class="collapse show" role="tabpanel" aria-labelledby="basic-settings">
+ <div id="basic-settings-collapse" class="collapse show" role="tabpanel" aria-labelledby="basic-settings" data-parent="#settings">
<div class="section-content-tools-wrapper">
{{include file="field_input.tpl" field=$username}}
{{include file="field_select_grouped.tpl" field=$timezone}}
@@ -37,12 +37,12 @@
<div class="panel">
<div class="section-subtitle-wrapper" role="tab" id="privacy-settings">
<h3>
- <a data-toggle="collapse" data-parent="#settings" href="#privacy-settings-collapse">
+ <a data-toggle="collapse" data-target="#privacy-settings-collapse" href="#">
{{$h_prv}}
</a>
</h3>
</div>
- <div id="privacy-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="privacy-settings">
+ <div id="privacy-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="privacy-settings" data-parent="#settings">
<div class="section-content-tools-wrapper">
{{include file="field_select_grouped.tpl" field=$role}}
<div id="advanced-perm" style="display:{{if $permissions_set}}none{{else}}block{{/if}};">
@@ -96,12 +96,12 @@
<div class="panel">
<div class="section-subtitle-wrapper" role="tab" id="notification-settings">
<h3>
- <a data-toggle="collapse" data-parent="#settings" href="#notification-settings-collapse">
+ <a data-toggle="collapse" data-target="#notification-settings-collapse" href="#">
{{$h_not}}
</a>
</h3>
</div>
- <div id="notification-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="notification-settings">
+ <div id="notification-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="notification-settings" data-parent="#settings">
<div class="section-content-tools-wrapper">
<div id="settings-notifications">
@@ -160,12 +160,12 @@
<div class="panel">
<div class="section-subtitle-wrapper" role="tab" id="miscellaneous-settings">
<h3>
- <a data-toggle="collapse" data-parent="#settings" href="#miscellaneous-settings-collapse" aria-expanded="true" aria-controls="miscellaneous-settings-collapse">
+ <a data-toggle="collapse" data-target="#miscellaneous-settings-collapse" href="#" aria-expanded="true" aria-controls="miscellaneous-settings-collapse">
{{$lbl_misc}}
</a>
</h3>
</div>
- <div id="miscellaneous-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="miscellaneous-settings">
+ <div id="miscellaneous-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="miscellaneous-settings" data-parent="#settings" >
<div class="section-content-tools-wrapper">
{{if $profselect}}
<label for="contact-profile-selector">{{$profseltxt}}</label>
diff --git a/view/tpl/settings_addons.tpl b/view/tpl/settings_addons.tpl
index 2a925f1f7..27cfa238a 100755
--- a/view/tpl/settings_addons.tpl
+++ b/view/tpl/settings_addons.tpl
@@ -1,8 +1,8 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
- <div class="descriptive-text pull-right">{{$descrip}}</div>
<h2>{{$title}}</h2>
</div>
+ <div class="section-content-info-wrapper">{{$descrip}}</div>
<form action="settings/featured" method="post" autocomplete="off">
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
<div class="panel-group" id="settings" role="tablist">
diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl
index b0751eb5f..7600038ea 100755
--- a/view/tpl/settings_display.tpl
+++ b/view/tpl/settings_display.tpl
@@ -10,12 +10,12 @@
<div class="panel">
<div class="section-subtitle-wrapper" role="tab" id="theme-settings-title">
<h3>
- <a data-toggle="collapse" data-parent="#settings" href="#theme-settings-content" aria-expanded="true" aria-controls="theme-settings-content">
+ <a data-toggle="collapse" data-target="#theme-settings-content" href="#" aria-expanded="true" aria-controls="theme-settings-content">
{{$d_tset}}
</a>
</h3>
</div>
- <div id="theme-settings-content" class="collapse show" role="tabpanel" aria-labelledby="theme-settings">
+ <div id="theme-settings-content" class="collapse show" role="tabpanel" aria-labelledby="theme-settings" data-parent="#settings" >
<div class="section-content-tools-wrapper">
{{if $theme}}
{{include file="field_themeselect.tpl" field=$theme}}
@@ -33,12 +33,12 @@
<div class="panel">
<div class="section-subtitle-wrapper" role="tab" id="custom-settings-title">
<h3>
- <a data-toggle="collapse" data-parent="#settings" href="#custom-settings-content" aria-expanded="true" aria-controls="custom-settings-content">
+ <a data-toggle="collapse" data-target="#custom-settings-content" href="" aria-expanded="true" aria-controls="custom-settings-content">
{{$d_ctset}}
</a>
</h3>
</div>
- <div id="custom-settings-content" class="collapse{{if !$theme}} in{{/if}}" role="tabpanel" aria-labelledby="custom-settings">
+ <div id="custom-settings-content" class="collapse{{if !$theme}} in{{/if}}" role="tabpanel" aria-labelledby="custom-settings" data-parent="#settings" >
<div class="section-content-tools-wrapper">
{{if $theme_config}}
{{$theme_config}}
@@ -49,12 +49,12 @@
<div class="panel">
<div class="section-subtitle-wrapper" role="tab" id="content-settings-title">
<h3>
- <a data-toggle="collapse" data-parent="#settings" href="#content-settings-content" aria-expanded="true" aria-controls="content-settings-content">
+ <a data-toggle="collapse" data-target="#content-settings-content" href="" aria-expanded="true" aria-controls="content-settings-content">
{{$d_cset}}
</a>
</h3>
</div>
- <div id="content-settings-content" class="collapse{{if !$theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="content-settings">
+ <div id="content-settings-content" class="collapse{{if !$theme && !$theme_config}} in{{/if}}" role="tabpanel" aria-labelledby="content-settings" data-parent="#settings">
<div class="section-content-wrapper">
{{include file="field_input.tpl" field=$ajaxint}}
{{include file="field_input.tpl" field=$itemspage}}
diff --git a/view/tpl/settings_features.tpl b/view/tpl/settings_features.tpl
index dfe049a7a..f8c162e17 100755
--- a/view/tpl/settings_features.tpl
+++ b/view/tpl/settings_features.tpl
@@ -9,12 +9,12 @@
<div class="panel">
<div class="section-subtitle-wrapper" role="tab" id="{{$g}}-settings-title">
<h3>
- <a data-toggle="collapse" data-parent="#settings" href="#{{$g}}-settings-content" aria-expanded="true" aria-controls="{{$g}}-settings-collapse">
+ <a data-toggle="collapse" data-target="#{{$g}}-settings-content" href="#" aria-expanded="true" aria-controls="{{$g}}-settings-collapse">
{{$f.0}}
</a>
</h3>
</div>
- <div id="{{$g}}-settings-content" class="collapse{{if $g == 'general'}} show{{/if}}" role="tabpanel" aria-labelledby="{{$g}}-settings-title">
+ <div id="{{$g}}-settings-content" class="collapse{{if $g == 'general'}} show{{/if}}" role="tabpanel" aria-labelledby="{{$g}}-settings-title" data-parent="#settings">
<div class="section-content-tools-wrapper">
{{foreach $f.1 as $fcat}}
{{include file="field_checkbox.tpl" field=$fcat}}