aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Apps.php42
-rw-r--r--Zotlabs/Lib/ThreadItem.php2
-rw-r--r--Zotlabs/Module/Network.php8
-rw-r--r--Zotlabs/Widget/Activity_filter.php10
4 files changed, 35 insertions, 27 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index d77a3fda2..7c4fc6eeb 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -551,7 +551,7 @@ class Apps {
'$app' => $papp,
'$icon' => $icon,
'$hosturl' => $hosturl,
- '$purchase' => (($papp['page'] && (! $installed)) ? t('Purchase') : ''),
+ '$purchase' => ((isset($papp['page']) && (! $installed)) ? t('Purchase') : ''),
'$installed' => $installed,
'$action_label' => (($hosturl && in_array($mode, ['view','install'])) ? $install_action : ''),
'$edit' => ((local_channel() && $installed && $mode == 'edit') ? t('Edit') : ''),
@@ -559,8 +559,8 @@ class Apps {
'$undelete' => ((local_channel() && $mode == 'edit') ? t('Undelete') : ''),
'$settings_url' => ((local_channel() && $installed && $mode == 'list') ? $papp['settings_url'] : ''),
'$deleted' => $papp['deleted'],
- '$feature' => (($papp['embed'] || $mode == 'edit') ? false : true),
- '$pin' => (($papp['embed'] || $mode == 'edit') ? false : true),
+ '$feature' => ((isset($papp['embed']) || $mode == 'edit') ? false : true),
+ '$pin' => ((isset($papp['embed']) || $mode == 'edit') ? false : true),
'$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true),
'$pinned' => ((strpos($papp['categories'], 'nav_pinned_app') === false) ? false : true),
'$navapps' => (($mode == 'nav') ? true : false),
@@ -1276,58 +1276,58 @@ class Apps {
$ret['type'] = 'personal';
- if($app['app_id'])
+ if(isset($app['app_id']))
$ret['guid'] = $app['app_id'];
- if($app['app_sig'])
+ if(isset($app['app_sig']))
$ret['sig'] = $app['app_sig'];
- if($app['app_author'])
+ if(isset($app['app_author']))
$ret['author'] = $app['app_author'];
- if($app['app_name'])
+ if(isset($app['app_name']))
$ret['name'] = $app['app_name'];
- if($app['app_desc'])
+ if(isset($app['app_desc']))
$ret['desc'] = $app['app_desc'];
- if($app['app_url'])
+ if(isset($app['app_url']))
$ret['url'] = $app['app_url'];
- if($app['app_photo'])
+ if(isset($app['app_photo']))
$ret['photo'] = $app['app_photo'];
- if($app['app_icon'])
+ if(isset($app['app_icon']))
$ret['icon'] = $app['app_icon'];
- if($app['app_version'])
+ if(isset($app['app_version']))
$ret['version'] = $app['app_version'];
- if($app['app_addr'])
+ if(isset($app['app_addr']))
$ret['addr'] = $app['app_addr'];
- if($app['app_price'])
+ if(isset($app['app_price']))
$ret['price'] = $app['app_price'];
- if($app['app_page'])
+ if(isset($app['app_page']))
$ret['page'] = $app['app_page'];
- if($app['app_requires'])
+ if(isset($app['app_requires']))
$ret['requires'] = $app['app_requires'];
- if($app['app_system'])
+ if(isset($app['app_system']))
$ret['system'] = $app['app_system'];
- if($app['app_options'])
+ if(isset($app['app_options']))
$ret['options'] = $app['app_options'];
- if($app['app_plugin'])
+ if(isset($app['app_plugin']))
$ret['plugin'] = trim($app['app_plugin']);
- if($app['app_deleted'])
+ if(isset($app['app_deleted']))
$ret['deleted'] = $app['app_deleted'];
- if($app['term']) {
+ if(isset($app['term'])) {
$s = '';
foreach($app['term'] as $t) {
if($s)
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 2fb07c1cb..c0d5c001b 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -43,7 +43,7 @@ class ThreadItem {
$observer = \App::get_observer();
// Prepare the children
- if($data['children']) {
+ if(isset($data['children'])) {
foreach($data['children'] as $item) {
/*
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 8a1b51a18..4f9450f2f 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -20,8 +20,10 @@ class Network extends \Zotlabs\Web\Controller {
return;
}
- if(in_array(substr($_GET['search'],0,1),[ '@', '!', '?']) || strpos($_GET['search'], 'https://') === 0)
- goaway(z_root() . '/search?f=&search=' . $_GET['search']);
+ $search = $_GET['search'] ?? '';
+
+ if(in_array(substr($search, 0, 1),[ '@', '!', '?']) || strpos($search, 'https://') === 0)
+ goaway(z_root() . '/search?f=&search=' . $search);
if(count($_GET) < 2) {
$network_options = get_pconfig(local_channel(),'system','network_page_default');
@@ -80,7 +82,7 @@ class Network extends \Zotlabs\Web\Controller {
break;
}
- $search = (($_GET['search']) ? $_GET['search'] : '');
+ $search = $_GET['search'] ?? '';
if($search) {
if(strpos($search,'#') === 0) {
$hashtags = substr($search,1);
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php
index 002a642cb..9200811b4 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -64,6 +64,8 @@ class Activity_filter {
);
if($groups) {
+ $group_active = '';
+
foreach($groups as $g) {
if(x($_GET,'gid')) {
$group_active = (($_GET['gid'] == $g['id']) ? 'active' : '');
@@ -95,6 +97,8 @@ class Activity_filter {
$channel = App::get_channel();
if($forums) {
+ $forum_active = '';
+
foreach($forums as $f) {
if(x($_GET,'pf') && x($_GET,'cid')) {
$forum_active = ((x($_GET,'pf') && $_GET['cid'] == $f['abook_id']) ? 'active' : '');
@@ -103,10 +107,10 @@ class Activity_filter {
$fsub[] = [
'label' => $f['xchan_name'],
'img' => $f['xchan_photo_s'],
- 'url' => (($f['private_forum']) ? $f['xchan_url'] . '/?f=&zid=' . $channel['xchan_addr'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']),
+ 'url' => ((isset($f['private_forum'])) ? $f['xchan_url'] . '/?f=&zid=' . $channel['xchan_addr'] : z_root() . '/' . $cmd . '/?f=&pf=1&cid=' . $f['abook_id']),
'sel' => $forum_active,
'title' => t('Show posts to this forum'),
- 'lock' => (($f['private_forum']) ? 'lock' : '')
+ 'lock' => ((isset($f['private_forum'])) ? 'lock' : '')
];
}
@@ -160,6 +164,8 @@ class Activity_filter {
);
if($terms) {
+ $file_active = '';
+
foreach($terms as $t) {
if(x($_GET,'file')) {
$file_active = (($_GET['file'] == $t['term']) ? 'active' : '');