Revision 2098
Added by darkviper over 11 years ago
| create.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 |
// Include the WB functions file |
| 28 | 30 |
if(!function_exists('directory_list')) { require(WB_PATH.'/framework/functions.php'); }
|
| 29 | 31 |
|
| ... | ... | |
| 37 | 39 |
// Check to see if name or target contains ../ |
| 38 | 40 |
if(strstr($name, '..')) {
|
| 39 | 41 |
$admin->print_header(); |
| 40 |
$admin->print_error($MESSAGE['MEDIA_NAME_DOT_DOT_SLASH']);
|
|
| 42 |
$admin->print_error($oTrans->MESSAGE_MEDIA_NAME_DOT_DOT_SLASH);
|
|
| 41 | 43 |
} |
| 42 | 44 |
|
| 43 | 45 |
// Remove bad characters |
| ... | ... | |
| 50 | 52 |
if (!$admin->checkFTAN()) |
| 51 | 53 |
{
|
| 52 | 54 |
$admin->print_header(); |
| 53 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS']);
|
|
| 55 |
$admin->print_error($oTrans->MESSAGE_GENERIC_SECURITY_ACCESS);
|
|
| 54 | 56 |
} |
| 55 | 57 |
// After check print the header |
| 56 | 58 |
$admin->print_header(); |
| 57 | 59 |
|
| 58 | 60 |
if (!check_media_path($target, false)) {
|
| 59 |
$admin->print_error($MESSAGE['MEDIA_TARGET_DOT_DOT_SLASH']);
|
|
| 61 |
$admin->print_error($oTrans->MESSAGE_MEDIA_TARGET_DOT_DOT_SLASH);
|
|
| 60 | 62 |
} |
| 61 | 63 |
|
| 62 | 64 |
// Create relative path of the new dir name |
| ... | ... | |
| 64 | 66 |
|
| 65 | 67 |
// Check to see if the folder already exists |
| 66 | 68 |
if(file_exists($directory)) {
|
| 67 |
$admin->print_error($MESSAGE['MEDIA_DIR_EXISTS']);
|
|
| 69 |
$admin->print_error($oTrans->MESSAGE_MEDIA_DIR_EXISTS);
|
|
| 68 | 70 |
} |
| 69 | 71 |
|
| 70 | 72 |
if ( sizeof(createFolderProtectFile( $directory )) ) |
| 71 | 73 |
{
|
| 72 |
$admin->print_error($MESSAGE['MEDIA_DIR_NOT_MADE']);
|
|
| 74 |
$admin->print_error($oTrans->MESSAGE_MEDIA_DIR_NOT_MADE);
|
|
| 73 | 75 |
} else {
|
| 74 | 76 |
$usedFiles = array(); |
| 75 | 77 |
// feature freeze |
| 76 | 78 |
// require_once(ADMIN_PATH.'/media/dse.php'); |
| 77 |
$admin->print_success($MESSAGE['MEDIA_DIR_MADE']);
|
|
| 79 |
$admin->print_success($oTrans->MESSAGE_MEDIA_DIR_MADE);
|
|
| 78 | 80 |
} |
| 79 | 81 |
|
| 80 | 82 |
// Print admin |
Also available in: Unified diff
! activate class Translate for all addons in admin/ (except pages/)
! class.admin >> add translation of the current theme to Translate