{
array_push($this->stack, $name);
if (isset($this->$tag))
{
$this->$tag->_data = "";
}
switch ($name)
{
case 'CATEGORY':
if (isset($attrs['REF']))
{
$this->update_sites[] = array('type' => 'collection', 'location' => $attrs['REF'], 'update_site_id' => $this->updateSiteId);
}
else
{
$this->pop_parent = 1;
}
break;
case 'EXTENSION':
$update->set('update_site_id', $this->updateSiteId);
foreach ($this->updatecols as $col)
{
if (!array_key_exists($col, $attrs))
{
$attrs[$col] = '';
if ($col == 'CLIENT')
{
$attrs[$col] = 'site';
}
}
}
$client = JApplicationHelper::getClientInfo($attrs['CLIENT'], 1);
if (isset($client->id))
{
$attrs['CLIENT_ID'] = $client->id;
}
foreach ($attrs as $key => $attr)
{
$values[strtolower($key)] = $attr;
}
$ver = new JVersion;
if (!isset($values['targetplatform']))
{
$values['targetplatform'] = $product;
}
if (!isset($values['targetplatformversion']))
{
$values['targetplatformversion'] = $ver->RELEASE;
}
if ($product == $values['targetplatform'] && preg_match('/' . $values['targetplatformversion'] . '/', $ver->RELEASE))
{
$update->bind($values);
$this->updates[] = $update;
}
break;
}
}