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)
|
public function isTiming($type)
|
||||||
{
|
{
|
||||||
foreach ($this->updateTypes as $updateType)
|
return (isset($this->updateTypes[$type]) || array_key_exists($type, $this->updateTypes));
|
||||||
{
|
|
||||||
if ($updateType->isTiming($type))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -51,7 +51,7 @@ class Updater extends PluginTask
|
|||||||
{
|
{
|
||||||
if ($updateType->canTrigger())
|
if ($updateType->canTrigger())
|
||||||
{
|
{
|
||||||
array_push($updateTypes, $updateType);
|
$updateTypes[$updateType] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Call Event
|
//Call Event
|
||||||
|
Loading…
Reference in New Issue
Block a user