Merge branch 'master' of https://github.com/redmatrix/hubzilla
This commit is contained in:
commit
2848f5dab4
4
app/grid.apd
Normal file
4
app/grid.apd
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
url: $baseurl/network
|
||||||
|
requires: local_channel
|
||||||
|
name: Grid
|
||||||
|
photo: $baseurl/images/hubzilla_logo_6.png
|
@ -1,4 +0,0 @@
|
|||||||
url: $baseurl/network
|
|
||||||
requires: local_channel
|
|
||||||
name: Matrix
|
|
||||||
photo: $baseurl/app/matrix.png
|
|
BIN
app/matrix.png
BIN
app/matrix.png
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB |
@ -130,7 +130,7 @@ function translate_system_apps(&$arr) {
|
|||||||
'Address Book' => t('Address Book'),
|
'Address Book' => t('Address Book'),
|
||||||
'Login' => t('Login'),
|
'Login' => t('Login'),
|
||||||
'Channel Manager' => t('Channel Manager'),
|
'Channel Manager' => t('Channel Manager'),
|
||||||
'Matrix' => t('Matrix'),
|
'Grid' => t('Grid'),
|
||||||
'Settings' => t('Settings'),
|
'Settings' => t('Settings'),
|
||||||
'Files' => t('Files'),
|
'Files' => t('Files'),
|
||||||
'Webpages' => t('Webpages'),
|
'Webpages' => t('Webpages'),
|
||||||
|
@ -1229,7 +1229,7 @@ function attach_delete($channel_id, $resource, $is_photo = 0) {
|
|||||||
$channel_address = (($c) ? $c[0]['channel_address'] : 'notfound');
|
$channel_address = (($c) ? $c[0]['channel_address'] : 'notfound');
|
||||||
$photo_sql = (($is_photo) ? " and is_photo = 1 " : '');
|
$photo_sql = (($is_photo) ? " and is_photo = 1 " : '');
|
||||||
|
|
||||||
$r = q("SELECT hash, flags, is_dir, folder FROM attach WHERE hash = '%s' AND uid = %d $photo_sql limit 1",
|
$r = q("SELECT hash, flags, is_dir, is_photo, folder FROM attach WHERE hash = '%s' AND uid = %d $photo_sql limit 1",
|
||||||
dbesc($resource),
|
dbesc($resource),
|
||||||
intval($channel_id)
|
intval($channel_id)
|
||||||
);
|
);
|
||||||
@ -1275,6 +1275,16 @@ function attach_delete($channel_id, $resource, $is_photo = 0) {
|
|||||||
intval($channel_id)
|
intval($channel_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if($r[0]['is_photo']) {
|
||||||
|
$x = q("select id, item_hidden from item where resource_id = '%s' and resource_type = 'photo' and uid = %d",
|
||||||
|
dbesc($resource),
|
||||||
|
intval($channel_id)
|
||||||
|
);
|
||||||
|
if($x) {
|
||||||
|
drop_item($x[0]['id'],false,(($x[0]['item_hidden']) ? DROPITEM_NORMAL : DROPITEM_PHASE1),true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// update the parent folder's lastmodified timestamp
|
// update the parent folder's lastmodified timestamp
|
||||||
$e = q("UPDATE attach SET edited = '%s' WHERE hash = '%s' AND uid = %d",
|
$e = q("UPDATE attach SET edited = '%s' WHERE hash = '%s' AND uid = %d",
|
||||||
dbesc(datetime_convert()),
|
dbesc(datetime_convert()),
|
||||||
|
@ -635,8 +635,12 @@ function identity_basic_export($channel_id, $items = false) {
|
|||||||
$r = q("select * from conv where uid = %d",
|
$r = q("select * from conv where uid = %d",
|
||||||
intval($channel_id)
|
intval($channel_id)
|
||||||
);
|
);
|
||||||
if($r)
|
if($r) {
|
||||||
|
for($x = 0; $x < count($r); $x ++) {
|
||||||
|
$r[$x]['subject'] = base64url_decode(str_rot47($r[$x]['subject']));
|
||||||
|
}
|
||||||
$ret['conv'] = $r;
|
$ret['conv'] = $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$r = q("select mail.*, conv.guid as conv_guid from mail left join conv on mail.convid = conv.id where mail.uid = %d",
|
$r = q("select mail.*, conv.guid as conv_guid from mail left join conv on mail.convid = conv.id where mail.uid = %d",
|
||||||
@ -645,17 +649,11 @@ function identity_basic_export($channel_id, $items = false) {
|
|||||||
if($r) {
|
if($r) {
|
||||||
$m = array();
|
$m = array();
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
|
$m[] = mail_encode($rr,true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
$ret['mail'] = $m;
|
$ret['mail'] = $m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d",
|
$r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d",
|
||||||
intval($channel_id)
|
intval($channel_id)
|
||||||
);
|
);
|
||||||
|
@ -790,7 +790,7 @@ function import_likes($channel,$likes) {
|
|||||||
if($r)
|
if($r)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
dbesc_array($config);
|
dbesc_array($like);
|
||||||
$r = dbq("INSERT INTO likes (`"
|
$r = dbq("INSERT INTO likes (`"
|
||||||
. implode("`, `", array_keys($like))
|
. implode("`, `", array_keys($like))
|
||||||
. "`) VALUES ('"
|
. "`) VALUES ('"
|
||||||
@ -800,6 +800,72 @@ function import_likes($channel,$likes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function import_conv($channel,$convs) {
|
||||||
|
if($channel && $convs) {
|
||||||
|
foreach($convs as $conv) {
|
||||||
|
if($conv['deleted']) {
|
||||||
|
q("delete from conv where guid = '%s' and uid = %d limit 1",
|
||||||
|
dbesc($conv['guid']),
|
||||||
|
intval($channel['channel_id'])
|
||||||
|
);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($conv['id']);
|
||||||
|
|
||||||
|
$conv['uid'] = $channel['channel_id'];
|
||||||
|
$conv['subject'] = str_rot47(base64url_encode($conv['subject']));
|
||||||
|
|
||||||
|
$r = q("select id from conv where guid = '%s' and uid = %d limit 1",
|
||||||
|
dbesc($conv['guid']),
|
||||||
|
intval($channel['channel_id'])
|
||||||
|
);
|
||||||
|
if($r)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
dbesc_array($conv);
|
||||||
|
$r = dbq("INSERT INTO conv (`"
|
||||||
|
. implode("`, `", array_keys($conv))
|
||||||
|
. "`) VALUES ('"
|
||||||
|
. implode("', '", array_values($conv))
|
||||||
|
. "')" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function import_mail($channel,$mails) {
|
||||||
|
if($channel && $mails) {
|
||||||
|
foreach($mails as $mail) {
|
||||||
|
if(array_key_exists('flags',$mail) && in_array('deleted',$mail['flags'])) {
|
||||||
|
q("delete from mail where mid = '%s' and uid = %d limit 1",
|
||||||
|
dbesc($mail['message_id']),
|
||||||
|
intval($channel['channel_id'])
|
||||||
|
);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$m = get_mail_elements($mail);
|
||||||
|
if(! $m)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if($mail['conv_guid']) {
|
||||||
|
$x = q("select id from conv where guid = '%s' and uid = %d limit 1",
|
||||||
|
dbesc($mail['conv_guid']),
|
||||||
|
intval($channel['channel_id'])
|
||||||
|
);
|
||||||
|
if($x) {
|
||||||
|
$m['convid'] = $x[0]['id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$m['aid'] = $channel['channel_account_id'];
|
||||||
|
$m['uid'] = $channel['channel_id'];
|
||||||
|
mail_store($m);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2211,7 +2211,7 @@ function handle_tag($a, &$body, &$access_tag, &$str_tags, $profile_uid, $tag, $d
|
|||||||
}
|
}
|
||||||
if($tag == '#getzot') {
|
if($tag == '#getzot') {
|
||||||
$basetag = 'getzot';
|
$basetag = 'getzot';
|
||||||
$url = 'https://redmatrix.me';
|
$url = 'http://hubzilla.org';
|
||||||
$newtag = '#[zrl=' . $url . ']' . $basetag . '[/zrl]';
|
$newtag = '#[zrl=' . $url . ']' . $basetag . '[/zrl]';
|
||||||
$body = str_replace($tag,$newtag,$body);
|
$body = str_replace($tag,$newtag,$body);
|
||||||
$replaced = true;
|
$replaced = true;
|
||||||
|
@ -3002,6 +3002,12 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
|
|||||||
if(array_key_exists('chatroom',$arr) && $arr['chatroom'])
|
if(array_key_exists('chatroom',$arr) && $arr['chatroom'])
|
||||||
sync_chatrooms($channel,$arr['chatroom']);
|
sync_chatrooms($channel,$arr['chatroom']);
|
||||||
|
|
||||||
|
if(array_key_exists('conv',$arr) && $arr['conv'])
|
||||||
|
import_conv($channel,$arr['conv']);
|
||||||
|
|
||||||
|
if(array_key_exists('mail',$arr) && $arr['mail'])
|
||||||
|
import_mail($channel,$arr['mail']);
|
||||||
|
|
||||||
if(array_key_exists('event',$arr) && $arr['event'])
|
if(array_key_exists('event',$arr) && $arr['event'])
|
||||||
sync_events($channel,$arr['event']);
|
sync_events($channel,$arr['event']);
|
||||||
|
|
||||||
|
@ -441,6 +441,12 @@ function import_post(&$a) {
|
|||||||
if(is_array($data['chatroom']))
|
if(is_array($data['chatroom']))
|
||||||
import_chatrooms($channel,$data['chatroom']);
|
import_chatrooms($channel,$data['chatroom']);
|
||||||
|
|
||||||
|
if(is_array($data['conv']))
|
||||||
|
import_conv($channel,$data['conv']);
|
||||||
|
|
||||||
|
if(is_array($data['mail']))
|
||||||
|
import_mail($channel,$data['mail']);
|
||||||
|
|
||||||
if(is_array($data['event']))
|
if(is_array($data['event']))
|
||||||
import_events($channel,$data['event']);
|
import_events($channel,$data['event']);
|
||||||
|
|
||||||
|
@ -149,8 +149,9 @@ function photos_post(&$a) {
|
|||||||
if($r) {
|
if($r) {
|
||||||
foreach($r as $i) {
|
foreach($r as $i) {
|
||||||
attach_delete($page_owner_uid, $i['resource_id'], 1 );
|
attach_delete($page_owner_uid, $i['resource_id'], 1 );
|
||||||
drop_item($i['id'],false,DROPITEM_PHASE1,true /* force removal of linked items */);
|
// This is now being done in attach_delete()
|
||||||
proc_run('php','include/notifier.php','drop',$i['id']);
|
// drop_item($i['id'],false,DROPITEM_PHASE1,true /* force removal of linked items */);
|
||||||
|
// proc_run('php','include/notifier.php','drop',$i['id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -982,13 +983,13 @@ function photos_content(&$a) {
|
|||||||
$likebuttons = '';
|
$likebuttons = '';
|
||||||
|
|
||||||
if($can_post || $can_comment) {
|
if($can_post || $can_comment) {
|
||||||
$likebuttons = replace_macros($like_tpl,array(
|
$likebuttons = array(
|
||||||
'$id' => $link_item['id'],
|
'id' => $link_item['id'],
|
||||||
'$likethis' => t("I like this \x28toggle\x29"),
|
'likethis' => t("I like this \x28toggle\x29"),
|
||||||
'$nolike' => t("I don't like this \x28toggle\x29"),
|
'nolike' => t("I don't like this \x28toggle\x29"),
|
||||||
'$share' => t('Share'),
|
'share' => t('Share'),
|
||||||
'$wait' => t('Please wait')
|
'wait' => t('Please wait')
|
||||||
));
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$comments = '';
|
$comments = '';
|
||||||
|
@ -165,7 +165,7 @@ function siteinfo_content(&$a) {
|
|||||||
'$loadavg_all' => $loadavg[0] . ', ' . $loadavg[1] . ', ' . $loadavg[2],
|
'$loadavg_all' => $loadavg[0] . ', ' . $loadavg[1] . ', ' . $loadavg[2],
|
||||||
'$commit' => $commit,
|
'$commit' => $commit,
|
||||||
'$web_location' => t('Running at web location') . ' ' . z_root(),
|
'$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.'),
|
'$visit' => t('Please visit <a href="http://hubzilla.org">hubzilla.org</a> to learn more about $Projectname.'),
|
||||||
'$bug_text' => t('Bug reports and issues: please visit'),
|
'$bug_text' => t('Bug reports and issues: please visit'),
|
||||||
'$bug_link_url' => 'https://github.com/redmatrix/hubzilla/issues',
|
'$bug_link_url' => 'https://github.com/redmatrix/hubzilla/issues',
|
||||||
'$bug_link_text' => t('$projectname issues'),
|
'$bug_link_text' => t('$projectname issues'),
|
||||||
|
@ -133,14 +133,14 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{if $likebuttons}}
|
{{if $likebuttons}}
|
||||||
<div class="photo-item-tools-right btn-group pull-right">
|
<div class="photo-item-tools-right btn-group pull-right">
|
||||||
<button type="button" class="btn btn-default btn-sm" onclick="dolike({{$id}},'like'); return false">
|
<button type="button" class="btn btn-default btn-sm" onclick="dolike({{$likebuttons.id}},'like'); return false">
|
||||||
<i class="icon-thumbs-up-alt" title="{{$likethis}}"></i>
|
<i class="icon-thumbs-up-alt" title="{{$likebuttons.likethis}}"></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-default btn-sm" onclick="dolike({{$id}},'dislike'); return false">
|
<button type="button" class="btn btn-default btn-sm" onclick="dolike({{$likebuttons.id}},'dislike'); return false">
|
||||||
<i class="icon-thumbs-down-alt" title="{{$nolike}}"></i>
|
<i class="icon-thumbs-down-alt" title="{{$likebuttons.nolike}}"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="like-rotator-{{$id}}" class="photo-like-rotator pull-right"></div>
|
<div id="like-rotator-{{$likebuttons.id}}" class="photo-like-rotator pull-right"></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user