diff options
author | zotlabs <mike@macgirvin.com> | 2018-09-10 22:11:26 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-09-10 22:11:26 -0700 |
commit | adc164b825c3b9e322921f2da9d1baf178b04cd3 (patch) | |
tree | fa5e805e53e7661ad936873e1a66017ad9dcd6a9 /Zotlabs/Module/Display.php | |
parent | be3b6304742a6c39d73674b1f7422c029e7cd804 (diff) | |
parent | c6abe87ec2e08fc38ff9c505ac2000d52d45c228 (diff) | |
download | volse-hubzilla-adc164b825c3b9e322921f2da9d1baf178b04cd3.tar.gz volse-hubzilla-adc164b825c3b9e322921f2da9d1baf178b04cd3.tar.bz2 volse-hubzilla-adc164b825c3b9e322921f2da9d1baf178b04cd3.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'Zotlabs/Module/Display.php')
-rw-r--r-- | Zotlabs/Module/Display.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php index bdaed0933..1d21b64ac 100644 --- a/Zotlabs/Module/Display.php +++ b/Zotlabs/Module/Display.php @@ -12,8 +12,9 @@ class Display extends \Zotlabs\Web\Controller { function get($update = 0, $load = false) { - $module_format = 'html'; + $noscript_content = get_config('system', 'noscript_content', '1'); + $module_format = 'html'; if(argc() > 1) { $module_format = substr(argv(1),strrpos(argv(1),'.') + 1); @@ -251,7 +252,7 @@ class Display extends \Zotlabs\Web\Controller { $sql_extra = public_permissions_sql($observer_hash); - if((! $update) || ($load)) { + if($noscript_content || $load) { $r = null; @@ -367,7 +368,12 @@ class Display extends \Zotlabs\Web\Controller { } else { $o .= '<noscript>'; - $o .= conversation($items, 'display', $update, 'traditional'); + if($noscript_content) { + $o .= conversation($items, 'display', $update, 'traditional'); + } + else { + $o .= '<div class="section-content-warning-wrapper">' . t('You must enable javascript for your browser to be able to view this content.') . '</div>'; + } $o .= '</noscript>'; if ($items[0]['title']) @@ -429,7 +435,7 @@ class Display extends \Zotlabs\Web\Controller { $o .= '<div id="content-complete"></div>'; - if(((! $update) || ($load)) && (! $items)) { + if((($update && $load) || $noscript_content) && (! $items)) { $r = q("SELECT id, item_deleted FROM item WHERE mid = '%s' LIMIT 1", dbesc($item_hash) |