Switched updateTypes to use the key instead of the value.

Signed-off-by: Aaron Brock <TheMineBench@gmail.com>
This commit is contained in:
Aaron Brock 2015-07-05 03:58:46 -04:00
parent 085f9f16ca
commit 7b73f73561
3 changed files with 3 additions and 11 deletions

View File

@ -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));
}
}

View File

@ -51,7 +51,7 @@ class Updater extends PluginTask
{
if ($updateType->canTrigger())
{
array_push($updateTypes, $updateType);
$updateTypes[$updateType] = 1;
}
}
//Call Event