aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-10-23 14:56:41 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-10-23 14:56:41 +0200
commit8f4c3a2f88d3770e6cfebaa61671f54fa17a34e1 (patch)
tree2f95124f88bcd7d568f86d53f420190ae56e2178 /include
parente2ae8f0c4d83060b2606f03b1c86d040c3161f18 (diff)
parente530476e6c5d2319f3a0a09dfe73ec181e923325 (diff)
downloadvolse-hubzilla-8f4c3a2f88d3770e6cfebaa61671f54fa17a34e1.tar.gz
volse-hubzilla-8f4c3a2f88d3770e6cfebaa61671f54fa17a34e1.tar.bz2
volse-hubzilla-8f4c3a2f88d3770e6cfebaa61671f54fa17a34e1.zip
Merge branch 'dev' into make-db-upgrade-static-method
Diffstat (limited to 'include')
-rw-r--r--include/attach.php35
-rw-r--r--include/features.php10
-rw-r--r--include/items.php13
3 files changed, 13 insertions, 45 deletions
diff --git a/include/attach.php b/include/attach.php
index 654c9990d..2ee3401f6 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -2933,41 +2933,6 @@ function attach_syspaths($channel_id,$attach_hash) {
return [ 'os_path' => $os_path, 'path' => $path ];
}
-/**
- * in earlier releases we did not fill in os_path and display_path in the attach DB structure.
- * (It was not needed or used). Going forward we intend to make use of these fields.
- * A cron task checks for empty values (as older attachments may have arrived at our site
- * in a clone operation) and executes attach_syspaths() to generate these field values and correct
- * the attach table entry. The operation is limited to 100 DB entries at a time so as not to
- * overload the system in any cron run. Eventually it will catch up with old attach structures
- * and switch into maintenance mode to correct any that might arrive in clone packets from older
- * sites.
- */
-
-
-
-function attach_upgrade() {
- $r = q("SELECT id, uid, hash FROM attach WHERE os_path = '' OR display_path = '' LIMIT 100");
- if($r) {
- foreach($r as $rv) {
- $x = attach_syspaths($rv['uid'],$rv['hash']);
- if($x) {
- q("update attach set os_path = '%s', display_path = '%s' where id = %d",
- dbesc($x['os_path']),
- dbesc($x['path']),
- intval($rv['id'])
- );
- q("update photo set os_path = '%s', display_path = '%s' where uid = %d and resource_id = '%s'",
- dbesc($x['os_path']),
- dbesc($x['path']),
- intval($rv['uid']),
- dbesc($rv['hash'])
- );
- }
- }
- }
-}
-
/**
* Chunked uploader for integration with the blueimp jquery-uploader
diff --git a/include/features.php b/include/features.php
index d527f60e6..65ead6604 100644
--- a/include/features.php
+++ b/include/features.php
@@ -170,12 +170,20 @@ function get_features($filtered = true, $level = (-1)) {
[
'star_posts',
t('Star Posts'),
- t('Ability to mark special posts with a star indicator'),
+ t('Ability to mark conversations with a star'),
false,
Config::Get('feature_lock','star_posts'),
],
[
+ 'filing',
+ t('File Posts'),
+ t('Ability to file posts'),
+ false,
+ Config::Get('feature_lock','filing'),
+ ],
+
+ [
'reply_to',
t('Reply on comment'),
t('Ability to reply on selected comment'),
diff --git a/include/items.php b/include/items.php
index 876c20099..423d626ad 100644
--- a/include/items.php
+++ b/include/items.php
@@ -5112,25 +5112,19 @@ function copy_of_pubitem($channel,$mid) {
return $item[0];
}
-
- $r = q("select * from item where parent_mid = (select parent_mid from item where mid = '%s' and uid = %d ) order by id ",
+ $r = q("select * from item where parent_mid = (select parent_mid from item where mid = '%s' and uid = %d) and uid = %d order by id ",
dbesc($mid),
+ intval($syschan['channel_id']),
intval($syschan['channel_id'])
);
if($r) {
$items = fetch_post_tags($r,true);
foreach($items as $rv) {
- $d = q("select id from item where mid = '%s' and uid = %d limit 1",
- dbesc($rv['mid']),
- intval($channel['channel_id'])
- );
- if($d) {
- continue;
- }
unset($rv['id']);
unset($rv['parent']);
+
$rv['aid'] = $channel['channel_account_id'];
$rv['uid'] = $channel['channel_id'];
$rv['item_wall'] = 0;
@@ -5143,5 +5137,6 @@ function copy_of_pubitem($channel,$mid) {
}
}
+
return $result;
}