Revision 701
Added by thorn over 17 years ago
| upgrade-script.php | ||
|---|---|---|
| 231 | 231 |
`page_id` INT(11) NOT NULL DEFAULT '0', |
| 232 | 232 |
`target_page_id` INT(11) NOT NULL DEFAULT '0', |
| 233 | 233 |
`anchor` VARCHAR(255) NOT NULL DEFAULT '0' , |
| 234 |
`extern` VARCHAR(255) NOT NULL DEFAULT '' , |
|
| 234 | 235 |
PRIMARY KEY (`section_id`) |
| 235 | 236 |
) |
| 236 | 237 |
"); |
| ... | ... | |
| 321 | 322 |
if($query_pid = $database->query("SELECT page_id FROM $table_p WHERE page_id != '$page_id' AND link = '$link'")) {
|
| 322 | 323 |
$res = $query_pid->fetchRow(); |
| 323 | 324 |
$target_page_id = $res['page_id']; |
| 324 |
$database->query("INSERT INTO $table_mm (page_id, section_id, target_page_id, anchor) VALUES ('$page_id', '$section_id', '$target_page_id', '0')");
|
|
| 325 |
$extern = ''; |
|
| 326 |
if(strpos($link, '://') !== FALSE || strpos($link, 'mailto:') !== FALSE) {
|
|
| 327 |
$target_page_id=-1; |
|
| 328 |
$extern=addslashes($link); |
|
| 329 |
} |
|
| 330 |
$database->query("INSERT INTO $table_mm (page_id, section_id, target_page_id, anchor, extern) VALUES ('$page_id', '$section_id', '$target_page_id', '0', '$extern')");
|
|
| 325 | 331 |
echo (mysql_error()?'mySQL: '.mysql_error().'<br />':''); |
| 326 | 332 |
} |
| 327 | 333 |
} |
Also available in: Unified diff
updated upgrade-script (menulink)