Project

General

Profile

« Previous | Next » 

Revision 1041

Added by Matthias almost 15 years ago

- Fixed some minor bugs in argos_theme (Thanks to Argos)

- Fixed bugs in admin additons for argos_theme (Thanks to Argos)

View differences:

upload.php
33 33

  
34 34
// Print admin header
35 35
require('../../config.php');
36
include_once('resize_img.php');
37
include_once('parameters.php');
38

  
36 39
require_once(WB_PATH.'/framework/class.admin.php');
37 40
require_once(WB_PATH.'/include/pclzip/pclzip.lib.php');	// Required to unzip file.
38 41
$admin = new admin('Media', 'media_upload');
......
47 50

  
48 51
// Create relative path of the target location for the file
49 52
$relative = WB_PATH.$target.'/';
53
$resizepath = str_replace('/','_',$target);
50 54

  
51 55
// Find out whether we should replace files or give an error
52 56
if($admin->get_post('overwrite') != '') {
......
95 99
					change_mode($relative.$filename);
96 100
				}
97 101
			}
102
			
103
			if(file_exists($relative.$filename)) {
104
				if ($pathsettings[$resizepath]['width'] || $pathsettings[$resizepath]['height'] ) {
105
					$rimg=new RESIZEIMAGE($relative.$filename);
106
					$rimg->resize_limitwh($pathsettings[$resizepath]['width'],$pathsettings[$resizepath]['height'],$relative.$filename);
107
					$rimg->close();
108
				}
109
			}
110
				
98 111
			// store file name of first file for possible unzip action
99 112
			if ($count == 1) {
100 113
				$filename1 = $relative . $filename;

Also available in: Unified diff