aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/admin.php2
-rw-r--r--mod/channel.php19
-rw-r--r--mod/cloud.php6
-rw-r--r--mod/connedit.php3
-rw-r--r--mod/dav.php6
-rwxr-xr-xmod/events.php2
-rw-r--r--mod/home.php2
-rw-r--r--mod/item.php21
-rw-r--r--mod/layouts.php2
-rwxr-xr-xmod/like.php10
-rw-r--r--mod/manage.php4
-rwxr-xr-xmod/mood.php3
-rw-r--r--mod/p.php5
-rw-r--r--mod/ping.php7
-rwxr-xr-xmod/poke.php3
-rwxr-xr-xmod/setup.php2
-rw-r--r--mod/siteinfo.php2
-rwxr-xr-xmod/subthread.php4
-rw-r--r--mod/tagger.php3
-rw-r--r--mod/thing.php3
20 files changed, 48 insertions, 61 deletions
diff --git a/mod/admin.php b/mod/admin.php
index 7b6a8b723..e84f155ed 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -1,7 +1,7 @@
<?php
/**
* @file mod/admin.php
- * @brief RedMatrix's admin controller.
+ * @brief Hubzilla's admin controller.
*
* Controller for the /admin/ area.
*/
diff --git a/mod/channel.php b/mod/channel.php
index 022def2a8..f33ba8072 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -166,21 +166,19 @@ function channel_content(&$a, $update = 0, $load = false) {
if(($update) && (! $load)) {
if ($mid) {
$r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d AND item_restrict = 0
- AND (item_flags & %d) > 0 $simple_update $sql_extra limit 1",
+ AND item_wall = 1 $simple_update $sql_extra limit 1",
dbesc($mid . '%'),
- intval($a->profile['profile_uid']),
- intval(ITEM_WALL)
+ intval($a->profile['profile_uid'])
);
} else {
$r = q("SELECT distinct parent AS `item_id`, created from item
left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
WHERE uid = %d AND item_restrict = 0
- AND (item_flags & %d) > 0 $simple_update
+ AND item_wall = 1 $simple_update
AND ((abook.abook_flags & %d) = 0 or abook.abook_flags is null)
$sql_extra
ORDER BY created DESC",
intval($a->profile['profile_uid']),
- intval(ITEM_WALL),
intval(ABOOK_FLAG_BLOCKED)
);
$_SESSION['loadtime'] = datetime_convert();
@@ -210,10 +208,9 @@ function channel_content(&$a, $update = 0, $load = false) {
if($load || ($_COOKIE['jsAvailable'] != 1)) {
if ($mid) {
$r = q("SELECT parent AS item_id from item where mid = '%s' and uid = %d AND item_restrict = 0
- AND (item_flags & %d)>0 $sql_extra limit 1",
+ AND item_wall = 1 $sql_extra limit 1",
dbesc($mid),
- intval($a->profile['profile_uid']),
- intval(ITEM_WALL)
+ intval($a->profile['profile_uid'])
);
if (! $r) {
notice( t('Permission denied.') . EOL);
@@ -223,12 +220,11 @@ function channel_content(&$a, $update = 0, $load = false) {
$r = q("SELECT distinct id AS item_id, created FROM item
left join abook on item.author_xchan = abook.abook_xchan
WHERE uid = %d AND item_restrict = 0
- AND (item_flags & %d)>0 and (item_flags & %d)>0
+ AND item_wall = 1 and (item_flags & %d)>0
AND ((abook.abook_flags & %d) = 0 or abook.abook_flags is null)
$sql_extra $sql_extra2
ORDER BY created DESC $pager_sql ",
intval($a->profile['profile_uid']),
- intval(ITEM_WALL),
intval(ITEM_THREAD_TOP),
intval(ABOOK_FLAG_BLOCKED)
);
@@ -339,8 +335,7 @@ function channel_content(&$a, $update = 0, $load = false) {
if($is_owner && $update_unseen) {
$r = q("UPDATE item SET item_unseen = 0 WHERE item_unseen = 1
- AND (item_flags & %d) > 0 AND uid = %d $update_unseen",
- intval(ITEM_WALL),
+ AND item_wall = 1 AND uid = %d $update_unseen",
intval(local_channel())
);
}
diff --git a/mod/cloud.php b/mod/cloud.php
index 4b5d45f97..defdc3451 100644
--- a/mod/cloud.php
+++ b/mod/cloud.php
@@ -1,13 +1,13 @@
<?php
/**
* @file mod/cloud.php
- * @brief Initialize RedMatrix's cloud (SabreDAV).
+ * @brief Initialize Hubzilla's cloud (SabreDAV).
*
* Module for accessing the DAV storage area.
*/
use Sabre\DAV;
-use RedMatrix\RedDAV;
+use Hubzilla\RedDAV;
// composer autoloader for SabreDAV
require_once('vendor/autoload.php');
@@ -126,7 +126,7 @@ function cloud_init(&$a) {
}
require_once('include/RedDAV/RedBrowser.php');
- // provide a directory view for the cloud in Red Matrix
+ // provide a directory view for the cloud in Hubzilla
$browser = new RedDAV\RedBrowser($auth);
$auth->setBrowserPlugin($browser);
diff --git a/mod/connedit.php b/mod/connedit.php
index 8ae1707ae..b346f3de0 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -240,7 +240,8 @@ function connedit_post(&$a) {
&& (intval(get_pconfig($channel['channel_id'],'system','post_newfriend')))) {
$xarr = array();
$xarr['verb'] = ACTIVITY_FRIEND;
- $xarr['item_flags'] = ITEM_WALL|ITEM_ORIGIN|ITEM_THREAD_TOP;
+ $xarr['item_flags'] = ITEM_ORIGIN|ITEM_THREAD_TOP;
+ $xarr['item_wall'] = 1;
$xarr['owner_xchan'] = $xarr['author_xchan'] = $channel['channel_hash'];
$xarr['allow_cid'] = $channel['channel_allow_cid'];
$xarr['allow_gid'] = $channel['channel_allow_gid'];
diff --git a/mod/dav.php b/mod/dav.php
index 2f811a7f0..2321aec75 100644
--- a/mod/dav.php
+++ b/mod/dav.php
@@ -1,13 +1,13 @@
<?php
/**
* @file mod/dav.php
- * @brief Initialize RedMatrix's cloud (SabreDAV).
+ * @brief Initialize Hubzilla's cloud (SabreDAV).
*
* Module for accessing the DAV storage area from a DAV client.
*/
use Sabre\DAV;
-use RedMatrix\RedDAV;
+use Hubzilla\RedDAV;
// composer autoloader for SabreDAV
require_once('vendor/autoload.php');
@@ -127,7 +127,7 @@ function dav_init(&$a) {
}
require_once('include/RedDAV/RedBrowser.php');
- // provide a directory view for the cloud in Red Matrix
+ // provide a directory view for the cloud in Hubzilla
$browser = new RedDAV\RedBrowser($auth);
$auth->setBrowserPlugin($browser);
diff --git a/mod/events.php b/mod/events.php
index 289ddfb15..ba7ef6b7d 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -415,7 +415,7 @@ function events_content(&$a) {
$last_date = $d;
// FIXME
- $edit = (($rr['item_flags'] & ITEM_WALL) ? array($a->get_baseurl().'/events/event/'.$rr['event_hash'],t('Edit event'),'','') : null);
+ $edit = ((intval($rr['item_wall'])) ? array($a->get_baseurl().'/events/event/'.$rr['event_hash'],t('Edit event'),'','') : null);
$drop = array($a->get_baseurl().'/events/drop/'.$rr['event_hash'],t('Delete event'),'','');
$title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8'));
diff --git a/mod/home.php b/mod/home.php
index 03133a217..1b941a639 100644
--- a/mod/home.php
+++ b/mod/home.php
@@ -190,7 +190,7 @@ function home_content(&$a, $update = 0, $load = false) {
if(get_config('system','site_firehose')) {
require_once('include/security.php');
- $uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and (item_flags & " . intval(ITEM_WALL) . " ) > 0 ";
+ $uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and item_wall = 1 ";
}
else {
$sys = get_sys_channel();
diff --git a/mod/item.php b/mod/item.php
index a732a9f81..4777dd5c0 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -295,7 +295,7 @@ function item_post(&$a) {
// For comments, We need to additionally look at the parent and see if it's a wall post that originated locally.
if($observer['xchan_name'] != $owner_xchan['xchan_name']) {
- if($parent_item && ($parent_item['item_flags'] & (ITEM_WALL|ITEM_ORIGIN)) == (ITEM_WALL|ITEM_ORIGIN)) {
+ if($parent_item && ($parent_item['item_flags'] & ITEM_ORIGIN) && intval($parent_item['item_wall'])) {
$walltowall_comment = true;
$walltowall = true;
}
@@ -658,9 +658,10 @@ function item_post(&$a) {
}
$item_unseen = 1;
-
+ $item_wall = 0;
+
if($post_type === 'wall' || $post_type === 'wall-comment')
- $item_flags = $item_flags | ITEM_WALL;
+ $item_wall = 1;
if($origin)
$item_flags = $item_flags | ITEM_ORIGIN;
@@ -731,6 +732,7 @@ function item_post(&$a) {
$datarray['deny_cid'] = $str_contact_deny;
$datarray['deny_gid'] = $str_group_deny;
$datarray['item_private'] = $private;
+ $datarray['item_wall'] = $item_wall;
$datarray['attach'] = $attachments;
$datarray['thr_parent'] = $thr_parent;
$datarray['postopts'] = $postopts;
@@ -790,14 +792,6 @@ function item_post(&$a) {
$datarray['item_flags'] = $datarray['item_flags'] | ITEM_VERIFIED;
}
}
-
- logger('Encrypting local storage');
- $key = get_config('system','pubkey');
- $datarray['item_flags'] = $datarray['item_flags'] | ITEM_OBSCURED;
- if($datarray['title'])
- $datarray['title'] = json_encode(crypto_encapsulate($datarray['title'],$key));
- if($datarray['body'])
- $datarray['body'] = json_encode(crypto_encapsulate($datarray['body'],$key));
}
if($orig_post) {
@@ -831,7 +825,7 @@ function item_post(&$a) {
// only send comment notification if this is a wall-to-wall comment,
// otherwise it will happen during delivery
- if(($datarray['owner_xchan'] != $datarray['author_xchan']) && ($parent_item['item_flags'] & ITEM_WALL)) {
+ if(($datarray['owner_xchan'] != $datarray['author_xchan']) && intval($parent_item['item_wall'])) {
notification(array(
'type' => NOTIFY_COMMENT,
'from_xchan' => $datarray['author_xchan'],
@@ -1093,8 +1087,7 @@ function item_check_service_class($channel_id,$iswebpage) {
);
}
else {
- $r = q("select count(id) as total from item where parent = id and item_restrict = 0 and (item_flags & %d) > 0 and uid = %d ",
- intval(ITEM_WALL),
+ $r = q("select count(id) as total from item where parent = id and item_restrict = 0 and item_wall = 1 and uid = %d ",
intval($channel_id)
);
}
diff --git a/mod/layouts.php b/mod/layouts.php
index 2e45362ba..70a09b134 100644
--- a/mod/layouts.php
+++ b/mod/layouts.php
@@ -99,7 +99,7 @@ function layouts_content(&$a) {
dbesc(argv(3))
);
if($r) {
- header('Content-type: application/x-redmatrix-layout');
+ header('Content-type: application/x-hubzilla-layout');
header('Content-disposition: attachment; filename="' . $r[0]['sid'] . '.pdl"');
echo json_encode($r);
killme();
diff --git a/mod/like.php b/mod/like.php
index e79ff5f48..226f0f62b 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -337,10 +337,11 @@ function like_content(&$a) {
}
$mid = item_message_id();
+ $item_wall = 0;
if($extended_like) {
- $item_flags = ITEM_THREAD_TOP|ITEM_ORIGIN|ITEM_WALL;
-
+ $item_flags = ITEM_THREAD_TOP|ITEM_ORIGIN;
+ $item_wall = 1;
}
else {
$post_type = (($item['resource_type'] === 'photo') ? t('photo') : t('status'));
@@ -376,8 +377,8 @@ function like_content(&$a) {
$post_type = 'comment';
$item_flags = ITEM_ORIGIN | ITEM_NOTSHOWN;
- if($item['item_flags'] & ITEM_WALL)
- $item_flags |= ITEM_WALL;
+ if(intval($item['item_wall']))
+ $item_wall = 1;
// if this was a linked photo and was hidden, unhide it.
@@ -437,6 +438,7 @@ function like_content(&$a) {
$arr['aid'] = (($extended_like) ? $ch[0]['channel_account_id'] : $owner_aid);
$arr['uid'] = $owner_uid;
$arr['item_flags'] = $item_flags;
+ $arr['item_wall'] = $item_wall;
$arr['parent_mid'] = (($extended_like) ? $mid : $item['mid']);
$arr['owner_xchan'] = (($extended_like) ? $ch[0]['xchan_hash'] : $thread_owner['xchan_hash']);
$arr['author_xchan'] = $observer['xchan_hash'];
diff --git a/mod/manage.php b/mod/manage.php
index 3712be6f1..de5f9c8ad 100644
--- a/mod/manage.php
+++ b/mod/manage.php
@@ -56,14 +56,14 @@ function manage_content(&$a) {
$channels[$x]['default_links'] = '1';
- $c = q("SELECT id, item_restrict, item_flags FROM item
+ $c = q("SELECT id, item_restrict, item_flags, item_wall FROM item
WHERE item_restrict = 0 and item_unseen = 1 and uid = %d",
intval($channels[$x]['channel_id'])
);
if($c) {
foreach ($c as $it) {
- if($it['item_flags'] & ITEM_WALL)
+ if(intval($it['item_wall']))
$channels[$x]['home'] ++;
else
$channels[$x]['network'] ++;
diff --git a/mod/mood.php b/mod/mood.php
index 7663b2632..4bb291182 100755
--- a/mod/mood.php
+++ b/mod/mood.php
@@ -61,7 +61,7 @@ function mood_init(&$a) {
$mid = item_message_id();
$action = sprintf( t('%1$s is %2$s','mood'), '[zrl=' . $poster['xchan_url'] . ']' . $poster['xchan_name'] . '[/zrl]' , $verbs[$verb]);
- $item_flags = ITEM_WALL|ITEM_ORIGIN;
+ $item_flags = ITEM_ORIGIN;
if(! $parent_mid)
$item_flags |= ITEM_THREAD_TOP;
@@ -72,6 +72,7 @@ function mood_init(&$a) {
$arr['mid'] = $mid;
$arr['parent_mid'] = (($parent_mid) ? $parent_mid : $mid);
$arr['item_flags'] = $item_flags;
+ $arr['item_wall'] = 1;
$arr['author_xchan'] = $poster['xchan_hash'];
$arr['owner_xchan'] = (($parent_mid) ? $r[0]['owner_xchan'] : $poster['xchan_hash']);
$arr['title'] = '';
diff --git a/mod/p.php b/mod/p.php
index 924fd7eba..4e411a17b 100644
--- a/mod/p.php
+++ b/mod/p.php
@@ -11,9 +11,8 @@ function p_init(&$a) {
$mid = str_replace('.xml','',argv(1));
- $r = q("select * from item where mid = '%s' and (item_flags & %d)>0 and item_private = 0 limit 1",
- dbesc($mid),
- intval(ITEM_WALL)
+ $r = q("select * from item where mid = '%s' and item_wall = 1 and item_private = 0 limit 1",
+ dbesc($mid)
);
diff --git a/mod/ping.php b/mod/ping.php
index b676726fe..181e4f80a 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -156,8 +156,7 @@ function ping_init(&$a) {
);
break;
case 'home':
- $r = q("update item set item_unseen = 0 where item_unseen = 1 and (item_flags & %d) > 0 and uid = %d",
- intval(ITEM_WALL),
+ $r = q("update item set item_unseen = 0 where item_unseen = 1 and item_wall = 1 and uid = %d",
intval(local_channel())
);
break;
@@ -282,7 +281,7 @@ function ping_init(&$a) {
if($r) {
xchan_query($r);
foreach($r as $item) {
- if((argv(1) === 'home') && (! ($item['item_flags'] & ITEM_WALL)))
+ if((argv(1) === 'home') && (! intval($item['item_wall'])))
continue;
$result[] = format_notification($item);
}
@@ -390,7 +389,7 @@ function ping_init(&$a) {
call_hooks('network_ping', $arr);
foreach ($r as $it) {
- if($it['item_flags'] & ITEM_WALL)
+ if(intval($it['item_wall']))
$result['home'] ++;
else
$result['network'] ++;
diff --git a/mod/poke.php b/mod/poke.php
index 6257a2821..517387453 100755
--- a/mod/poke.php
+++ b/mod/poke.php
@@ -87,10 +87,11 @@ function poke_init(&$a) {
$arr = array();
- $arr['item_flags'] = ITEM_WALL | ITEM_ORIGIN;
+ $arr['item_flags'] = ITEM_ORIGIN;
if($parent_item)
$arr['item_flags'] |= ITEM_THREAD_TOP;
+ $arr['item_wall'] = 1;
$arr['owner_xchan'] = (($parent_item) ? $parent_item['owner_xchan'] : $channel['channel_hash']);
$arr['parent_mid'] = (($parent_mid) ? $parent_mid : $mid);
$arr['title'] = '';
diff --git a/mod/setup.php b/mod/setup.php
index eba28a9bc..0dc032674 100755
--- a/mod/setup.php
+++ b/mod/setup.php
@@ -165,8 +165,6 @@ function setup_content(&$a) {
$wizard_status = "";
$install_title = t('$Projectname Server - Setup');
-
-
if(x($a->data,'db_conn_failed')) {
$install_wizard_pass = 2;
$wizard_status = t('Could not connect to database.');
diff --git a/mod/siteinfo.php b/mod/siteinfo.php
index 904228f13..1282e2f17 100644
--- a/mod/siteinfo.php
+++ b/mod/siteinfo.php
@@ -163,7 +163,7 @@ function siteinfo_content(&$a) {
'$web_location' => t('Running at web location') . ' ' . z_root(),
'$visit' => t('Please visit <a href="https://redmatrix.me">redmatrix.me</a> to learn more about $Projectname.'),
'$bug_text' => t('Bug reports and issues: please visit'),
- '$bug_link_url' => 'https://github.com/redmatrix/redmatrix/issues',
+ '$bug_link_url' => 'https://github.com/redmatrix/hubzilla/issues',
'$bug_link_text' => '$projectname issues',
'$contact' => t('Suggestions, praise, etc. - please email "redmatrix" at librelist - dot com'),
'$donate' => $donate,
diff --git a/mod/subthread.php b/mod/subthread.php
index eeb8f131d..bdb582a57 100755
--- a/mod/subthread.php
+++ b/mod/subthread.php
@@ -103,9 +103,6 @@ function subthread_content(&$a) {
$bodyverb = t('%1$s is following %2$s\'s %3$s');
$item_flags = ITEM_ORIGIN | ITEM_NOTSHOWN;
- if($item['item_flags'] & ITEM_WALL)
- $item_flags |= ITEM_WALL;
-
$arr = array();
@@ -113,6 +110,7 @@ function subthread_content(&$a) {
$arr['aid'] = $owner_aid;
$arr['uid'] = $owner_uid;
$arr['item_flags'] = $item_flags;
+ $arr['item_wall'] = $item['item_wall'];
$arr['parent'] = $item['id'];
$arr['parent_mid'] = $item['mid'];
$arr['thr_parent'] = $item['mid'];
diff --git a/mod/tagger.php b/mod/tagger.php
index aafad58cf..c32b55548 100644
--- a/mod/tagger.php
+++ b/mod/tagger.php
@@ -109,8 +109,7 @@ function tagger_content(&$a) {
$arr['item_flags'] = ITEM_ORIGIN;
- if($item['item_flags'] & ITEM_WALL)
- $arr['item_flags'] |= ITEM_WALL;
+ $arr['item_wall'] = $item['item_wall'];
$ulink = '[zrl=' . $channel['xchan_url'] . ']' . $channel['channel_name'] . '[/zrl]';
$alink = '[zrl=' . $item['xchan_url'] . ']' . $item['xchan_name'] . '[/zrl]';
diff --git a/mod/thing.php b/mod/thing.php
index c6b70fbb4..92fc82e53 100644
--- a/mod/thing.php
+++ b/mod/thing.php
@@ -177,7 +177,8 @@ function thing_init(&$a) {
$arr['owner_xchan'] = $channel['channel_hash'];
$arr['author_xchan'] = $channel['channel_hash'];
- $arr['item_flags'] = ITEM_ORIGIN|ITEM_WALL|ITEM_THREAD_TOP;
+ $arr['item_flags'] = ITEM_ORIGIN|ITEM_THREAD_TOP;
+ $arr['item_wall'] = 1;
$ulink = '[zrl=' . $channel['xchan_url'] . ']' . $channel['channel_name'] . '[/zrl]';
$plink = '[zrl=' . $term['url'] . ']' . $term['term'] . '[/zrl]';