Create style class GlossaryLink, link, IntLink.
{
global $ilDB;
$set = $ilDB->query("SELECT * FROM object_data WHERE type = 'sty'");
while ($rec = $ilDB->fetchAssoc($set))
{
$set2 = $ilDB->query("SELECT * FROM style_char WHERE ".
"style_id = ".$ilDB->quote($rec["obj_id"], "integer")." AND ".
"characteristic = ".$ilDB->quote($a_class, "text")." AND ".
"type = ".$ilDB->quote($a_type, "text"));
if (!$ilDB->fetchAssoc($set2))
{
$q = "INSERT INTO style_char (style_id, type, characteristic, hide)".
" VALUES (".
$ilDB->quote($rec["obj_id"], "integer").",".
$ilDB->quote($a_type, "text").",".
$ilDB->quote($a_class, "text").",".
$ilDB->quote($a_hide, "integer").")";
$ilDB->manipulate($q);
$set3 = $ilDB->query("SELECT * FROM style_parameter WHERE ".
"style_id = ".$ilDB->quote($rec["obj_id"], "integer")." AND ".
"type = ".$ilDB->quote($a_type, "text")." AND ".
"class = ".$ilDB->quote($a_orig_class, "text")." AND ".
"tag = ".$ilDB->quote($a_tag, "text")
);
while ($rec3 = $ilDB->fetchAssoc($set3))
{
$spid = $ilDB->nextId("style_parameter");
$q = "INSERT INTO style_parameter (id, style_id, type, class, tag, parameter, value)".
" VALUES (".
$ilDB->quote($spid, "integer").",".
$ilDB->quote($rec["obj_id"], "integer").",".
$ilDB->quote($rec3["type"], "text").",".
$ilDB->quote($a_class, "text").",".
$ilDB->quote($a_tag, "text").",".
$ilDB->quote($rec3["parameter"], "text").",".
$ilDB->quote($rec3["value"], "text").
")";
$ilDB->manipulate($q);
}
}
}
}