Revision 1754
Added by Dietmar about 12 years ago
upgrade.php | ||
---|---|---|
21 | 21 |
throw new IllegalFileException(); |
22 | 22 |
} |
23 | 23 |
/* -------------------------------------------------------- */ |
24 |
|
|
25 | 24 |
$msg = ''; |
26 | 25 |
$sTable = TABLE_PREFIX.'mod_wysiwyg'; |
27 | 26 |
if(($sOldType = $database->getTableEngine($sTable))) { |
... | ... | |
33 | 32 |
} else { |
34 | 33 |
$msg .= $database->get_error().'<br />'; |
35 | 34 |
} |
35 |
|
|
36 |
$sql = 'ALTER TABLE `'.DB_NAME.'`.`'.$sTable.'` DROP PRIMARY KEY'; |
|
37 |
if(!$database->query($sql)) { |
|
38 |
$msg .= $database->get_error().'<br />'; |
|
39 |
} |
|
40 |
|
|
41 |
$sql = 'ALTER TABLE `'.$sTable.'` ADD `wysiwyg_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST'; |
|
42 |
if(!$database->query($sql)) { |
|
43 |
$msg .= $database->get_error().'<br />'; |
|
44 |
} |
|
45 |
|
|
36 | 46 |
// change internal absolute links into relative links |
37 | 47 |
$sTable = TABLE_PREFIX.'mod_wysiwyg'; |
38 | 48 |
$sql = 'UPDATE `'.$sTable.'` '; |
Also available in: Unified diff
search for ->page['root_parent'] == 0 in module and shoe_menu2 calls
page['root_parent'] has always the page_id from the first adding new page in level