|
|
|
|
@ -87,7 +87,7 @@ function define_course_keys($wantedCode, $prefix4all = "", $prefix4baseName = "" |
|
|
|
|
|
|
|
|
|
$course_table = Database :: get_main_table(TABLE_MAIN_COURSE); |
|
|
|
|
|
|
|
|
|
$wantedCode = strtr($wantedCode, "ÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ", "AAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy"); |
|
|
|
|
$wantedCode = strtr($wantedCode, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", "AAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy"); |
|
|
|
|
|
|
|
|
|
$wantedCode = ereg_replace("[^A-Z0-9]", "", strtoupper($wantedCode)); |
|
|
|
|
|
|
|
|
|
@ -929,7 +929,17 @@ function update_Db_course($courseDbName) |
|
|
|
|
{ |
|
|
|
|
error_log($sql,0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$sql = "ALTER TABLE `$TABLELPVIEW` ADD INDEX (lp_id) "; |
|
|
|
|
if(!api_sql_query($sql)) |
|
|
|
|
{ |
|
|
|
|
error_log($sql,0); |
|
|
|
|
} |
|
|
|
|
$sql = "ALTER TABLE `$TABLELPVIEW` ADD INDEX (user_id) "; |
|
|
|
|
if(!api_sql_query($sql)) |
|
|
|
|
{ |
|
|
|
|
error_log($sql,0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$sql = "CREATE TABLE IF NOT EXISTS `$TABLELPITEM` (" . |
|
|
|
|
"id int unsigned primary key auto_increment," . //unique ID from MySQL |
|
|
|
|
"lp_id int unsigned not null," . //lp_id from 'lp' |
|
|
|
|
@ -952,6 +962,11 @@ function update_Db_course($courseDbName) |
|
|
|
|
{ |
|
|
|
|
error_log($sql,0); |
|
|
|
|
} |
|
|
|
|
$sql = "ALTER TABLE `$TABLELPITEM` ADD INDEX (lp_id)"; |
|
|
|
|
if(!api_sql_query($sql)) |
|
|
|
|
{ |
|
|
|
|
error_log($sql,0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$sql = "CREATE TABLE IF NOT EXISTS `$TABLELPITEMVIEW` (" . |
|
|
|
|
"id bigint unsigned primary key auto_increment," . //unique ID |
|
|
|
|
@ -968,6 +983,16 @@ function update_Db_course($courseDbName) |
|
|
|
|
{ |
|
|
|
|
error_log($sql,0); |
|
|
|
|
} |
|
|
|
|
$sql = "ALTER TABLE `$TABLELPITEMVIEW` ADD INDEX (lp_item_id) "; |
|
|
|
|
if(!api_sql_query($sql)) |
|
|
|
|
{ |
|
|
|
|
error_log($sql,0); |
|
|
|
|
} |
|
|
|
|
$sql = "ALTER TABLE `$TABLELPITEMVIEW` ADD INDEX (lp_view_id) "; |
|
|
|
|
if(!api_sql_query($sql)) |
|
|
|
|
{ |
|
|
|
|
error_log($sql,0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$sql = "CREATE TABLE IF NOT EXISTS `$TABLELPIVINTERACTION`(" . |
|
|
|
|
"id bigint unsigned primary key auto_increment," . |
|
|
|
|
@ -986,6 +1011,11 @@ function update_Db_course($courseDbName) |
|
|
|
|
{ |
|
|
|
|
error_log($sql,0); |
|
|
|
|
} |
|
|
|
|
$sql = "ALTER TABLE `$TABLELPIVINTERACTION` ADD INDEX (lp_iv_id) "; |
|
|
|
|
if(!api_sql_query($sql)) |
|
|
|
|
{ |
|
|
|
|
error_log($sql,0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
----------------------------------------------------------- |
|
|
|
|
|