diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 4 | ||||
-rw-r--r-- | Zotlabs/Update/_1245.php | 29 |
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; + } + + } + +} |