aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Apps.php6
-rw-r--r--Zotlabs/Module/Settings/Connections.php2
-rw-r--r--Zotlabs/Module/Settings/Editor.php120
-rw-r--r--Zotlabs/Module/Settings/Network.php2
4 files changed, 128 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 905a20ee0..010947467 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -388,9 +388,10 @@ class Apps {
// This will catch somebody clicking on a system "available" app that hasn't had the path macros replaced
// and they are allowed to see the app
- if(strpos($papp['url'],'$baseurl') || strpos($papp['url'],'$nick') || strpos($papp['photo'],'$baseurl') || strpos($papp['photo'],'$nick')) {
+ if(strpos($papp['url'],'$baseurl') !== false || strpos($papp['url'],'$nick') !== false || strpos($papp['photo'],'$baseurl') !== false || strpos($papp['photo'],'$nick') !== false) {
$view_channel = local_channel();
if(! $view_channel) {
+
$sys = get_sys_channel();
$view_channel = $sys['channel_id'];
}
@@ -523,7 +524,8 @@ class Apps {
'$add' => t('Add to app-tray'),
'$remove' => t('Remove from app-tray'),
'$add_nav' => t('Pin to navbar'),
- '$remove_nav' => t('Unpin from navbar')
+ '$remove_nav' => t('Unpin from navbar'),
+ '$rpath' => z_root() . '/apps'
));
}
diff --git a/Zotlabs/Module/Settings/Connections.php b/Zotlabs/Module/Settings/Connections.php
index 361d86ccb..425409502 100644
--- a/Zotlabs/Module/Settings/Connections.php
+++ b/Zotlabs/Module/Settings/Connections.php
@@ -19,10 +19,12 @@ class Connections {
function get() {
$features = self::get_features();
+ $rpath = (($_GET['rpath']) ? $_GET['rpath'] : '');
$tpl = get_markup_template("settings_module.tpl");
$o .= replace_macros($tpl, array(
+ '$rpath' => $rpath,
'$action_url' => 'settings/connections',
'$form_security_token' => get_form_security_token("settings_connections"),
'$title' => t('Connections Settings'),
diff --git a/Zotlabs/Module/Settings/Editor.php b/Zotlabs/Module/Settings/Editor.php
new file mode 100644
index 000000000..a87f31fe7
--- /dev/null
+++ b/Zotlabs/Module/Settings/Editor.php
@@ -0,0 +1,120 @@
+<?php
+
+namespace Zotlabs\Module\Settings;
+
+
+class Editor {
+
+ function post() {
+ check_form_security_token_redirectOnErr('/settings/editor', 'settings_editor');
+
+ $features = self::get_features();
+
+ process_features_post(local_channel(), $features, $_POST);
+
+ build_sync_packet();
+ return;
+ }
+
+ function get() {
+
+ $features = self::get_features();
+ $rpath = (($_GET['rpath']) ? $_GET['rpath'] : '');
+
+ $tpl = get_markup_template("settings_module.tpl");
+
+ $o .= replace_macros($tpl, array(
+ '$rpath' => $rpath,
+ '$action_url' => 'settings/editor',
+ '$form_security_token' => get_form_security_token("settings_editor"),
+ '$title' => t('Editor Settings'),
+ '$features' => process_features_get(local_channel(), $features),
+ '$submit' => t('Submit')
+ ));
+
+ return $o;
+ }
+
+ function get_features() {
+ $arr = [
+
+ [
+ 'large_photos',
+ t('Large Photos'),
+ t('Include large (1024px) photo thumbnails in posts. If not enabled, use small (640px) photo thumbnails'),
+ false,
+ get_config('feature_lock','large_photos'),
+ ],
+
+ [
+ //TODO: This should be its own app
+ 'channel_sources',
+ t('Channel Sources'),
+ t('Automatically import channel content from other channels or feeds'),
+ false,
+ get_config('feature_lock','channel_sources'),
+ ],
+
+ [
+ 'content_encrypt',
+ t('Even More Encryption'),
+ t('Allow optional encryption of content end-to-end with a shared secret key'),
+ false,
+ get_config('feature_lock','content_encrypt'),
+ ],
+
+ [
+ 'consensus_tools',
+ t('Enable Voting Tools'),
+ t('Provide a class of post which others can vote on'),
+ false,
+ get_config('feature_lock','consensus_tools'),
+ ],
+
+ [
+ 'disable_comments',
+ t('Disable Comments'),
+ t('Provide the option to disable comments for a post'),
+ false,
+ get_config('feature_lock','disable_comments'),
+ ],
+
+ [
+ 'delayed_posting',
+ t('Delayed Posting'),
+ t('Allow posts to be published at a later date'),
+ false,
+ get_config('feature_lock','delayed_posting'),
+ ],
+
+ [
+ 'content_expire',
+ t('Content Expiration'),
+ t('Remove posts/comments and/or private messages at a future time'),
+ false,
+ get_config('feature_lock','content_expire'),
+ ],
+
+ [
+ 'suppress_duplicates',
+ t('Suppress Duplicate Posts/Comments'),
+ t('Prevent posts with identical content to be published with less than two minutes in between submissions.'),
+ true,
+ get_config('feature_lock','suppress_duplicates'),
+ ],
+
+ [
+ 'auto_save_draft',
+ t('Auto-save drafts of posts and comments'),
+ t('Automatically saves post and comment drafts in local browser storage to help prevent accidental loss of compositions'),
+ true,
+ get_config('feature_lock','auto_save_draft'),
+ ]
+
+ ];
+
+ return $arr;
+
+ }
+
+}
diff --git a/Zotlabs/Module/Settings/Network.php b/Zotlabs/Module/Settings/Network.php
index 1e39121c8..a2e606565 100644
--- a/Zotlabs/Module/Settings/Network.php
+++ b/Zotlabs/Module/Settings/Network.php
@@ -19,10 +19,12 @@ class Network {
function get() {
$features = self::get_features();
+ $rpath = (($_GET['rpath']) ? $_GET['rpath'] : '');
$tpl = get_markup_template("settings_module.tpl");
$o .= replace_macros($tpl, array(
+ '$rpath' => $rpath,
'$action_url' => 'settings/network',
'$form_security_token' => get_form_security_token("settings_network"),
'$title' => t('Activity Settings'),