aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-05-08 08:43:00 +0000
committerMario <mario@mariovavti.com>2021-05-08 08:43:00 +0000
commit09cfc979e4bbdd272f7852b75d02366780358c6e (patch)
treeda163b73080226479fdbb203c0ee4e4a04efd782 /Zotlabs
parent36a814b03ec11d25aa5eb4e02e6dfc50e2c8c6b3 (diff)
parent954d06bdb7c8ef9f73f799eec72fcbd8bbc56b9f (diff)
downloadvolse-hubzilla-09cfc979e4bbdd272f7852b75d02366780358c6e.tar.gz
volse-hubzilla-09cfc979e4bbdd272f7852b75d02366780358c6e.tar.bz2
volse-hubzilla-09cfc979e4bbdd272f7852b75d02366780358c6e.zip
Merge branch 'dev' into 5.6RC
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php4
-rw-r--r--Zotlabs/Update/_1245.php29
2 files changed, 31 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index e036c7b1e..6e8344def 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -132,8 +132,8 @@ class Activity {
}
static function fetch_profile($x) {
- $r = q("select * from xchan where xchan_url like '%s' limit 1",
- dbesc($x['id'] . '/%')
+ $r = q("select * from xchan where xchan_url = '%s' limit 1",
+ dbesc($x['id'])
);
if (!$r) {
$r = q("select * from xchan where xchan_hash = '%s' limit 1",
diff --git a/Zotlabs/Update/_1245.php b/Zotlabs/Update/_1245.php
new file mode 100644
index 000000000..8212fde08
--- /dev/null
+++ b/Zotlabs/Update/_1245.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1245 {
+
+ function run() {
+
+ if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+ return UPDATE_SUCCESS;
+ }
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
+ q("START TRANSACTION");
+
+ $r = dbq("create index hubloc_hash on hubloc (hubloc_hash)");
+
+ if($r) {
+ q("COMMIT");
+ return UPDATE_SUCCESS;
+ }
+
+ q("ROLLBACK");
+ return UPDATE_FAILED;
+ }
+
+ }
+
+}