Switched updateTypes to use the key instead of the value.
Signed-off-by: Aaron Brock <TheMineBench@gmail.com>
This commit is contained in:
parent
085f9f16ca
commit
7b73f73561
@ -30,14 +30,6 @@ class UpdateEvent extends Event
|
||||
|
||||
public function isTiming($type)
|
||||
{
|
||||
foreach ($this->updateTypes as $updateType)
|
||||
{
|
||||
if ($updateType->isTiming($type))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return (isset($this->updateTypes[$type]) || array_key_exists($type, $this->updateTypes));
|
||||
}
|
||||
}
|
@ -51,7 +51,7 @@ class Updater extends PluginTask
|
||||
{
|
||||
if ($updateType->canTrigger())
|
||||
{
|
||||
array_push($updateTypes, $updateType);
|
||||
$updateTypes[$updateType] = 1;
|
||||
}
|
||||
}
|
||||
//Call Event
|
||||
|
Loading…
Reference in New Issue
Block a user