Commit 2f91cb0d authored by mmn's avatar mmn

We should assume all verbs and such are their full URIs in our db

parent cb212ba4
......@@ -841,10 +841,8 @@ class Profile extends Managed_DataObject
$notices = new Notice();
$notices->profile_id = $this->getID();
$notices->whereAddIn('verb',
[ActivityUtils::resolveUri(ActivityVerb::POST, true), ActivityVerb::POST],
$notices->columnType('verb'));
$cnt = (int) $notices->count(); // we don't have to provide anything as Notice is key'd
$notices->verb = ActivityVerb::POST;
$cnt = (int) $notices->count('id'); // Not sure if I imagine this, but 'id' was faster than the defaulting 'uri'?
if (!empty($c)) {
$c->set(Cache::key('profile:notice_count:'.$this->getID()), $cnt);
......
......@@ -48,9 +48,9 @@ abstract class NoticeStream
public function __construct()
{
foreach ($this->selectVerbs as $key=>$val) {
// to avoid database inconsistency issues we select both relative and absolute verbs
$this->selectVerbs[ActivityUtils::resolveUri($key)] = $val;
$this->selectVerbs[ActivityUtils::resolveUri($key, true)] = $val;
// to avoid database inconsistency issues we can select both relative and absolute verbs
//$this->selectVerbs[ActivityUtils::resolveUri($key, true)] = $val;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment