aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Settings
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
committerMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
commitbafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch)
tree8929845be585b09d0f420621281c5531e1efad3e /Zotlabs/Module/Settings
parent6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff)
parentfdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff)
downloadvolse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.gz
volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.tar.bz2
volse-hubzilla-bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6.zip
Merge branch '5.0RC'5.0
Diffstat (limited to 'Zotlabs/Module/Settings')
-rw-r--r--Zotlabs/Module/Settings/Calendar.php3
-rw-r--r--Zotlabs/Module/Settings/Channel.php8
-rw-r--r--Zotlabs/Module/Settings/Channel_home.php4
-rw-r--r--Zotlabs/Module/Settings/Connections.php3
-rw-r--r--Zotlabs/Module/Settings/Conversation.php3
-rw-r--r--Zotlabs/Module/Settings/Directory.php3
-rw-r--r--Zotlabs/Module/Settings/Display.php13
-rw-r--r--Zotlabs/Module/Settings/Editor.php3
-rw-r--r--Zotlabs/Module/Settings/Events.php3
-rw-r--r--Zotlabs/Module/Settings/Featured.php3
-rw-r--r--Zotlabs/Module/Settings/Features.php4
-rw-r--r--Zotlabs/Module/Settings/Manage.php4
-rw-r--r--Zotlabs/Module/Settings/Network.php3
-rw-r--r--Zotlabs/Module/Settings/Photos.php3
-rw-r--r--Zotlabs/Module/Settings/Profiles.php4
15 files changed, 42 insertions, 22 deletions
diff --git a/Zotlabs/Module/Settings/Calendar.php b/Zotlabs/Module/Settings/Calendar.php
index 0298b412e..ab85eb450 100644
--- a/Zotlabs/Module/Settings/Calendar.php
+++ b/Zotlabs/Module/Settings/Calendar.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Calendar {
@@ -15,7 +16,7 @@ class Calendar {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index b0115d352..2eed1efc9 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -3,6 +3,7 @@
namespace Zotlabs\Module\Settings;
use Zotlabs\Lib\Apps;
+use Zotlabs\Lib\Libsync;
require_once('include/selectors.php');
@@ -273,10 +274,11 @@ class Channel {
}
if($name_change) {
- $r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s' where xchan_hash = '%s'",
+ // change name on all associated xchans by matching the url
+ $r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s' where xchan_url = '%s'",
dbesc($username),
dbesc(datetime_convert()),
- dbesc($channel['channel_hash'])
+ dbesc(z_root() . '/channel/' . $channel['channel_address'])
);
$r = q("update profile set fullname = '%s' where uid = %d and is_default = 1",
dbesc($username),
@@ -286,7 +288,7 @@ class Channel {
\Zotlabs\Daemon\Master::Summon(array('Directory',local_channel()));
- build_sync_packet();
+ Libsync::build_sync_packet();
if($email_changed && \App::$config['system']['register_policy'] == REGISTER_VERIFY) {
diff --git a/Zotlabs/Module/Settings/Channel_home.php b/Zotlabs/Module/Settings/Channel_home.php
index b6ecf4ff1..e8faa7fb2 100644
--- a/Zotlabs/Module/Settings/Channel_home.php
+++ b/Zotlabs/Module/Settings/Channel_home.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
+
require_once('include/menu.php');
class Channel_home {
@@ -24,7 +26,7 @@ class Channel_home {
$channel_menu = ((x($_POST['channel_menu'])) ? htmlspecialchars_decode(trim($_POST['channel_menu']),ENT_QUOTES) : '');
set_pconfig(local_channel(),'system','channel_menu',$channel_menu);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Connections.php b/Zotlabs/Module/Settings/Connections.php
index cac357791..4369deb27 100644
--- a/Zotlabs/Module/Settings/Connections.php
+++ b/Zotlabs/Module/Settings/Connections.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Connections {
@@ -15,7 +16,7 @@ class Connections {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Conversation.php b/Zotlabs/Module/Settings/Conversation.php
index 43e59a3c2..aa0ff6a7e 100644
--- a/Zotlabs/Module/Settings/Conversation.php
+++ b/Zotlabs/Module/Settings/Conversation.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Conversation {
@@ -15,7 +16,7 @@ class Conversation {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['aj']) {
if($_POST['auto_update'] == 1)
diff --git a/Zotlabs/Module/Settings/Directory.php b/Zotlabs/Module/Settings/Directory.php
index 13fe6eb79..d1dd0677e 100644
--- a/Zotlabs/Module/Settings/Directory.php
+++ b/Zotlabs/Module/Settings/Directory.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Directory {
@@ -15,7 +16,7 @@ class Directory {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Display.php b/Zotlabs/Module/Settings/Display.php
index 45d80e011..01ae8652a 100644
--- a/Zotlabs/Module/Settings/Display.php
+++ b/Zotlabs/Module/Settings/Display.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Display {
@@ -35,9 +36,9 @@ class Display {
if($browser_update < 10000)
$browser_update = 10000;
- $itemspage = ((x($_POST,'itemspage')) ? intval($_POST['itemspage']) : 20);
- if($itemspage > 100)
- $itemspage = 100;
+ $itemspage = ((x($_POST,'itemspage')) ? intval($_POST['itemspage']) : 10);
+ if($itemspage > 30)
+ $itemspage = 30;
set_pconfig(local_channel(),'system','preload_images',$preload_images);
@@ -78,7 +79,7 @@ class Display {
);
call_hooks('display_settings_post', $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
goaway(z_root() . '/settings/display' );
return; // NOTREACHED
}
@@ -158,7 +159,7 @@ class Display {
$browser_update = (($browser_update == 0) ? 80 : $browser_update / 1000); // default if not set: 40 seconds
$itemspage = intval(get_pconfig(local_channel(), 'system','itemspage'));
- $itemspage = (($itemspage > 0 && $itemspage < 101) ? $itemspage : 20); // default if not set: 20 items
+ $itemspage = (($itemspage > 0 && $itemspage <= 30) ? $itemspage : 10); // default if not set: 10 items
$nosmile = get_pconfig(local_channel(),'system','no_smilies');
$nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0
@@ -196,7 +197,7 @@ class Display {
'$preload_images' => array('preload_images', t("Preload images before rendering the page"), $preload_images, t("The subjective page load time will be longer but the page will be ready when displayed"), $yes_no),
'$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')),
- '$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')),
+ '$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 30 items')),
'$nosmile' => array('nosmile', t("Show emoticons (smilies) as images"), 1-intval($nosmile), '', $yes_no),
'$channel_menu' => [ 'channel_menu', t('Provide channel menu in navigation bar'), get_pconfig(local_channel(),'system','channel_menu',get_config('system','channel_menu',0)), t('Default: channel menu located in app menu'),$yes_no ],
'$manual_update' => array('manual_update', t('Manual conversation updates'), channel_manual_conv_update(local_channel()), t('Default is on, turning this off may increase screen jumping'), $yes_no),
diff --git a/Zotlabs/Module/Settings/Editor.php b/Zotlabs/Module/Settings/Editor.php
index 5e7a9473a..cf6dd2807 100644
--- a/Zotlabs/Module/Settings/Editor.php
+++ b/Zotlabs/Module/Settings/Editor.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Editor {
@@ -15,7 +16,7 @@ class Editor {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Events.php b/Zotlabs/Module/Settings/Events.php
index eb6dda99b..ab393c932 100644
--- a/Zotlabs/Module/Settings/Events.php
+++ b/Zotlabs/Module/Settings/Events.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Events {
@@ -15,7 +16,7 @@ class Events {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Featured.php b/Zotlabs/Module/Settings/Featured.php
index d5d740aff..d615e176c 100644
--- a/Zotlabs/Module/Settings/Featured.php
+++ b/Zotlabs/Module/Settings/Featured.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Featured {
@@ -10,7 +11,7 @@ class Featured {
call_hooks('feature_settings_post', $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
return;
}
diff --git a/Zotlabs/Module/Settings/Features.php b/Zotlabs/Module/Settings/Features.php
index 6a3ab104b..553ff0836 100644
--- a/Zotlabs/Module/Settings/Features.php
+++ b/Zotlabs/Module/Settings/Features.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
+
class Features {
@@ -19,7 +21,7 @@ class Features {
set_pconfig(local_channel(),'feature', $k, '');
}
}
- build_sync_packet();
+ Libsync::build_sync_packet();
return;
}
diff --git a/Zotlabs/Module/Settings/Manage.php b/Zotlabs/Module/Settings/Manage.php
index 9bae12022..cbc494cf8 100644
--- a/Zotlabs/Module/Settings/Manage.php
+++ b/Zotlabs/Module/Settings/Manage.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
+
class Manage {
@@ -15,7 +17,7 @@ class Manage {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Network.php b/Zotlabs/Module/Settings/Network.php
index ae02b06e9..9f5bdb2e5 100644
--- a/Zotlabs/Module/Settings/Network.php
+++ b/Zotlabs/Module/Settings/Network.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Network {
@@ -21,7 +22,7 @@ class Network {
set_pconfig(local_channel(),'system','network_divmore_height', $network_divmore_height);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Photos.php b/Zotlabs/Module/Settings/Photos.php
index 9edbaa929..8195d660b 100644
--- a/Zotlabs/Module/Settings/Photos.php
+++ b/Zotlabs/Module/Settings/Photos.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Photos {
@@ -15,7 +16,7 @@ class Photos {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Profiles.php b/Zotlabs/Module/Settings/Profiles.php
index fb6abf664..67b03e04f 100644
--- a/Zotlabs/Module/Settings/Profiles.php
+++ b/Zotlabs/Module/Settings/Profiles.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
+
require_once('include/selectors.php');
class Profiles {
@@ -19,7 +21,7 @@ class Profiles {
$profile_assign = ((x($_POST,'profile_assign')) ? notags(trim($_POST['profile_assign'])) : '');
set_pconfig(local_channel(),'system','profile_assign',$profile_assign);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);