Project

General

Profile

« Previous | Next » 

Revision 1503

Added by Dietmar almost 13 years ago

change sql statements to strict in module droplets
fix vars in compatibility mode for versions before 2.8.1 in frontend.functions.php

View differences:

backup_droplets.php
27 27
$admintool_link = ADMIN_URL .'/admintools/index.php';
28 28
$module_edit_link = ADMIN_URL .'/admintools/tool.php?tool=droplets';
29 29
$template_edit_link = ADMIN_URL .'/admintools/tool.php?tool=templateedit';
30
$sOverviewDroplets = $TEXT['LIST_OPTIONS'];
30 31

  
31 32
// protect from CSRF
32
$id = $admin->checkIDKEY('id', false, 'GET');
33
$id = intval($admin->checkIDKEY('id', false, 'GET'));
33 34
if (!$id or $id != 999) {
34 35
 $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $module_edit_link);
35
 exit();
36 36
}
37 37

  
38 38
?>
39 39
<h4 style="margin: 0; border-bottom: 1px solid #DDD; padding-bottom: 5px;">
40
	<a href="<?php echo $admintool_link;?>"><?php echo $HEADING['ADMINISTRATION_TOOLS']; ?></a>
40
	<a href="<?php echo $admintool_link;?>" title="<?php echo $HEADING['ADMINISTRATION_TOOLS']; ?>"><?php echo $HEADING['ADMINISTRATION_TOOLS']; ?></a>
41 41
	->
42
	<a href="<?php echo $module_edit_link;?>">Droplets</a>
42
	<a href="<?php echo $module_edit_link;?>" title="<?php echo $sOverviewDroplets ?>" alt="<?php echo $sOverviewDroplets ?>">Droplet Edit</a>
43 43
</h4>
44 44
<?php
45 45

  
......
47 47
$temp_file = '/modules/droplets/backup-droplets.zip';
48 48
// make the temporary working directory
49 49
mkdir($temp_dir);
50
$query_droplets = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_droplets ORDER BY modified_when DESC");
50
$sql  = 'SELECT * FROM `'.TABLE_PREFIX.'mod_droplets`  ';
51
$sql .= 'ORDER BY `modified_when` DESC';
52
$query_droplets = $database->query($sql);
51 53
while($droplet = $query_droplets->fetchRow()) {
52 54
	echo 'Saving: '.$droplet["name"].'.php<br />';
53 55
	$sFile = $temp_dir.$droplet["name"].'.php';
......
69 71
else {
70 72
	echo '<br /><br />Backup created - <a href="'.WB_URL.$temp_file.'">Download</a>';
71 73
}
74

  
72 75
delete_directory ( $temp_dir );
73
$admin->print_footer();
74 76

  
75 77
function delete_directory($dirname) {
76 78
    if (is_dir($dirname))
......
89 91
    rmdir($dirname);
90 92
    return true;
91 93
}
94

  
95
$admin->print_footer();

Also available in: Unified diff