-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathupdater.php
44 lines (37 loc) · 1.19 KB
/
updater.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?
if(IsModuleInstalled('coffeediz.startbootstraplandingpage'))
{
if (is_dir(dirname(__FILE__).'/install/components'))
$updater->CopyFiles("install/components", "components/");
if (is_dir(dirname(__FILE__).'/install/js'))
$updater->CopyFiles("install/js", "js/coffeediz.startbootstraplandingpage/");
}
/*
//
// Sample database update
//
if($updater->CanUpdateDatabase())
{
if($updater->TableExists("b_iblock_element_property"))
{
if(!$DB->IndexExists("b_iblock_element_property", array("VALUE_NUM", "IBLOCK_PROPERTY_ID")))
{
$updater->Query(array(
"MySQL" => "CREATE INDEX ix_iblock_element_prop_num ON b_iblock_element_property(VALUE_NUM, IBLOCK_PROPERTY_ID)",
"MSSQL" => "CREATE INDEX IX_B_IBLOCK_ELEMENT_PROPERTY_4 ON B_IBLOCK_ELEMENT_PROPERTY(VALUE_NUM, IBLOCK_PROPERTY_ID)",
"Oracle" => "CREATE INDEX IX_IBLOCK_ELEMENT_PROP_NUM ON B_IBLOCK_ELEMENT_PROPERTY(VALUE_NUM, IBLOCK_PROPERTY_ID)",
));
}
}
if($updater->TableExists("b_iblock_property"))
{
if(!$DB->IndexExists("b_iblock_property", array("UPPER(\"CODE\")")))
{
$updater->Query(array(
"Oracle" => "CREATE INDEX ix_iblock_property_2 ON B_IBLOCK_PROPERTY(UPPER(CODE))",
));
}
}
}
*/
?>