Project

General

Profile

« Previous | Next » 

Revision 2098

Added by darkviper almost 11 years ago

! activate class Translate for all addons in admin/ (except pages/)
! class.admin >> add translation of the current theme to Translate

View differences:

upload.php
23 23
    	require($config_file);
24 24
    }
25 25
}
26
if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
26
//if(!class_exists('admin', false)){ include(WB_PATH.'/framework/class.admin.php'); }
27
$oTrans = Translate::getInstance();
28
$oTrans->enableAddon('admin\\media');
27 29

  
28 30
$modulePath = dirname(__FILE__);
29 31

  
......
36 38
if( !$admin->checkFTAN() )
37 39
{
38 40
	$admin->print_header();
39
	$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'] );
41
	$admin->print_error($oTrans->MESSAGE_GENERIC_SECURITY_ACCESS );
40 42
}
41 43
// After check print the header
42 44
$admin->print_header();
......
55 57
// Check to see if target contains ../
56 58
if (!check_media_path($target, false))
57 59
{
58
	$admin->print_error($MESSAGE['MEDIA_TARGET_DOT_DOT_SLASH'] );
60
	$admin->print_error($oTrans->MESSAGE_MEDIA_TARGET_DOT_DOT_SLASH );
59 61
}
60 62

  
61 63
// Create relative path of the target location for the file
......
200 202
unset($list);
201 203

  
202 204
if($sum_files == 1) {
203
	$admin->print_success($sum_files.' '.$MESSAGE['MEDIA_SINGLE_UPLOADED'] );
205
	$admin->print_success($sum_files.' '.$oTrans->MESSAGE_MEDIA_SINGLE_UPLOADED );
204 206
} elseif($sum_files > 1) {
205
	$admin->print_success($sum_files.' '.$MESSAGE['MEDIA_UPLOADED'] );
207
	$admin->print_success($sum_files.' '.$oTrans->MESSAGE_MEDIA_UPLOADED );
206 208
} else {
207 209

  
208 210
	if(file_exists($relative.$filename)) {
209
    	$admin->print_error($MESSAGE['MEDIA_FILE_EXISTS'] );
211
    	$admin->print_error($oTrans->MESSAGE_MEDIA_FILE_EXISTS );
210 212
    } else {
211
    	$admin->print_error($MESSAGE['MEDIA_NO_FILE_UPLOADED'] );
213
    	$admin->print_error($oTrans->MESSAGE_MEDIA_NO_FILE_UPLOADED );
212 214
    }
213 215
}
214 216

  

Also available in: Unified diff