Revision 331
Added by stefan over 18 years ago
trunk/wb/languages/EN.php | ||
---|---|---|
384 | 384 |
$TEXT['RESTORE'] = 'Restore'; |
385 | 385 |
$TEXT['BACKUP_DATABASE'] = 'Backup Database'; |
386 | 386 |
$TEXT['RESTORE_DATABASE'] = 'Restore Database'; |
387 |
$TEXT['BACKUP_ALL_TABLES'] = 'Backup all tables in database'; |
|
388 |
$TEXT['BACKUP_WB_SPECIFIC'] = 'Backup only WB-specific tables'; |
|
387 | 389 |
$TEXT['BACKUP_MEDIA'] = 'Backup Media'; |
388 | 390 |
$TEXT['RESTORE_MEDIA'] = 'Restore Media'; |
389 | 391 |
$TEXT['ADMINISTRATION_TOOL'] = 'Administration tool'; |
trunk/wb/modules/backup/tool.php | ||
---|---|---|
30 | 30 |
?> |
31 | 31 |
<br /> |
32 | 32 |
<form name="prompt" method="post" action="<?php echo WB_URL; ?>/modules/backup/backup-sql.php"> |
33 |
<input type="radio" checked="checked" name="tables" value="ALL"><?php echo $TEXT['BACKUP_ALL_TABLES']; ?><br> |
|
34 |
<input type="radio" name="tables" value="WB"><?php echo $TEXT['BACKUP_WB_SPECIFIC']; ?><br><br> |
|
33 | 35 |
<input type="submit" name="backup" value="<?php echo $TEXT['BACKUP_DATABASE']; ?>" onClick="javascript: if(!confirm('<?php echo $MESSAGE['GENERIC']['PLEASE_BE_PATIENT']; ?>')) { return false; }" /> |
34 | 36 |
</form> |
trunk/wb/modules/backup/backup-sql.php | ||
---|---|---|
30 | 30 |
if(!isset($_POST['backup'])){ |
31 | 31 |
header('Location: ../'); |
32 | 32 |
exit(0); |
33 |
} |
|
34 |
|
|
33 |
}
|
|
34 |
|
|
35 | 35 |
// Include config |
36 | 36 |
require_once('../../config.php'); |
37 | 37 |
|
... | ... | |
49 | 49 |
"\n"; |
50 | 50 |
|
51 | 51 |
// Get table names |
52 |
$result = $database->query("SHOW TABLES"); |
|
52 |
// Use this one for ALL tables in DB |
|
53 |
$query = "SHOW TABLES"; |
|
53 | 54 |
|
55 |
if ($_POST['tables']=='WB') { |
|
56 |
// Or use this to get ONLY wb tables |
|
57 |
$prefix=str_replace('_','\_',TABLE_PREFIX); |
|
58 |
$query = "SHOW TABLES LIKE '".$prefix."%'"; |
|
59 |
} |
|
60 |
|
|
61 |
$result = $database->query($query); |
|
62 |
|
|
54 | 63 |
// Loop through tables |
55 | 64 |
while($row = $result->fetchRow()) { |
56 | 65 |
//show sql query to rebuild the query |
Also available in: Unified diff
John: New option in backup tool - either export all tables in database or only WB specific.