Profiler/Caching

* redirect to search for subjects without cache, instead of hanging on an empty profile
 * todo: fix properly
This commit is contained in:
Sarjuuk
2022-06-10 16:10:33 +02:00
parent 117ab617b6
commit 47da18b717
2 changed files with 10 additions and 7 deletions

View File

@@ -340,7 +340,7 @@ class ProfileListFilter extends Filter
// table key differs between remote and local :< // table key differs between remote and local :<
$k = $this->useLocalList ? 'p' : 'c'; $k = $this->useLocalList ? 'p' : 'c';
// name [str] - the table is case sensitive. Since i down't want to destroy indizes, lets alter the search terms // name [str] - the table is case sensitive. Since i don't want to destroy indizes, lets alter the search terms
if (!empty($_v['na'])) if (!empty($_v['na']))
{ {
$lower = $this->modularizeString([$k.'.name'], Util::lower($_v['na']), !empty($_v['ex']) && $_v['ex'] == 'on', true); $lower = $this->modularizeString([$k.'.name'], Util::lower($_v['na']), !empty($_v['ex']) && $_v['ex'] == 'on', true);

View File

@@ -230,7 +230,7 @@ class ProfilePage extends GenericPage
private function handleIncompleteData($params, $guid) private function handleIncompleteData($params, $guid)
{ {
if ($this->mode == CACHE_TYPE_TOOLTIP) // enable tooltip display with basic data we just added if ($this->mode == CACHE_TYPE_TOOLTIP) // enable tooltip display with basic data we just added
{ {
$this->subject = new LocalProfileList(array(['id', $this->subjectGUID]), ['sv' => $params[1]]); $this->subject = new LocalProfileList(array(['id', $this->subjectGUID]), ['sv' => $params[1]]);
if ($this->subject->error) if ($this->subject->error)
@@ -238,15 +238,18 @@ class ProfilePage extends GenericPage
$this->profile = $params; $this->profile = $params;
} }
else // display empty page and queue status else // display empty page and queue status
{ {
$this->mode = CACHE_TYPE_NONE; $this->mode = CACHE_TYPE_NONE;
// queue full fetch // queue full fetch
$newId = Profiler::scheduleResync(Type::PROFILE, $this->realmId, $guid); if ($newId = Profiler::scheduleResync(Type::PROFILE, $this->realmId, $guid))
{
$this->doResync = ['profile', $newId]; $this->doResync = ['profile', $newId];
$this->initialSync(); $this->initialSync();
}
else // todo: base info should have been created in __construct .. why are we here..?
header('Location: ?profiles='.$params[0].'.'.$params[1].'&filter=na='.Util::ucFirst($this->subjectName).';ex=on');
} }
} }
} }