aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/ThreadItem.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-03-24 09:58:21 +0000
committerMario <mario@mariovavti.com>2024-03-24 09:58:21 +0000
commit0dc959d9fe40bddce5e99b8162bb0e770fc28ed9 (patch)
tree4ad4413b0c00d1a478111b031d9de46218f31a89 /Zotlabs/Lib/ThreadItem.php
parentacc1834b0dc4804703610101fa95a3375649bc45 (diff)
downloadvolse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.gz
volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.tar.bz2
volse-hubzilla-0dc959d9fe40bddce5e99b8162bb0e770fc28ed9.zip
Deprecate *_config() functions in core.
Diffstat (limited to 'Zotlabs/Lib/ThreadItem.php')
-rw-r--r--Zotlabs/Lib/ThreadItem.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 8f364e945..290a7b0c2 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -3,8 +3,9 @@
namespace Zotlabs\Lib;
use App;
-use Zotlabs\Lib\Apps;
use Zotlabs\Access\AccessList;
+use Zotlabs\Lib\Apps;
+use Zotlabs\Lib\Config;
require_once('include/text.php');
@@ -41,7 +42,7 @@ class ThreadItem {
$this->data = $data;
$this->toplevel = ($this->get_id() == $this->get_data_value('parent'));
- $this->threaded = get_config('system','thread_allow');
+ $this->threaded = Config::Get('system','thread_allow');
$observer = \App::get_observer();
@@ -70,7 +71,7 @@ class ThreadItem {
// allow a site to configure the order and content of the reaction emoji list
if($this->toplevel) {
- $x = get_config('system','reactions');
+ $x = Config::Get('system','reactions');
if($x && is_array($x) && count($x)) {
$this->reactions = $x;
}
@@ -347,12 +348,12 @@ class ThreadItem {
$dreport = '';
- $keep_reports = intval(get_config('system','expire_delivery_reports'));
+ $keep_reports = intval(Config::Get('system','expire_delivery_reports'));
if($keep_reports === 0)
$keep_reports = 10;
$dreport_link = '';
- if((intval($item['item_type']) == ITEM_TYPE_POST) && (! get_config('system','disable_dreport')) && strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0) {
+ if((intval($item['item_type']) == ITEM_TYPE_POST) && (! Config::Get('system','disable_dreport')) && strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0) {
$dreport = t('Delivery Report');
$dreport_link = '?mid=' . $item['mid'];
}
@@ -397,7 +398,7 @@ class ThreadItem {
$json_mids = json_encode($mids);
// Pinned item processing
- $allowed_type = (in_array($item['item_type'], get_config('system', 'pin_types', [ ITEM_TYPE_POST ])) ? true : false);
+ $allowed_type = (in_array($item['item_type'], Config::Get('system', 'pin_types', [ ITEM_TYPE_POST ])) ? true : false);
$pinned_items = ($allowed_type ? get_pconfig($item['uid'], 'pinned', $item['item_type'], []) : []);
$pinned = ((!empty($pinned_items) && in_array($midb64, $pinned_items)) ? true : false);
@@ -549,7 +550,7 @@ class ThreadItem {
$result['children'] = array();
$nb_children = count($children);
- $visible_comments = get_config('system','expanded_comments');
+ $visible_comments = Config::Get('system','expanded_comments');
if($visible_comments === false)
$visible_comments = 3;
@@ -826,7 +827,7 @@ class ThreadItem {
*/
private function get_comment_box() {
- if(!$this->is_toplevel() && !get_config('system','thread_allow')) {
+ if(!$this->is_toplevel() && !Config::Get('system','thread_allow')) {
return '';
}