Revision 2098
Added by darkviper almost 11 years ago
rename.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 |
$admin = new admin('Media', 'media', false); |
29 | 31 |
|
... | ... | |
47 | 49 |
|
48 | 50 |
// first Check to see if it contains .. |
49 | 51 |
if (!check_media_path($directory)) { |
50 |
$admin->print_error($MESSAGE['MEDIA_DIR_DOT_DOT_SLASH'],$rootlink, false);
|
|
52 |
$admin->print_error($oTrans->MESSAGE_MEDIA_DIR_DOT_DOT_SLASH, $rootlink, false);
|
|
51 | 53 |
} |
52 | 54 |
|
53 | 55 |
// Get the temp id |
54 | 56 |
$file_id = intval($admin->checkIDKEY('id', false, $_SERVER['REQUEST_METHOD'])); |
55 | 57 |
if (!$file_id) { |
56 |
$admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'],$dirlink, false);
|
|
58 |
$admin->print_error($oTrans->MESSAGE_GENERIC_SECURITY_ACCESS, $dirlink, false);
|
|
57 | 59 |
} |
58 | 60 |
|
59 | 61 |
// Get home folder not to show |
... | ... | |
105 | 107 |
} |
106 | 108 |
|
107 | 109 |
if(!isset($rename_file)) { |
108 |
$admin->print_error($MESSAGE['MEDIA_FILE_NOT_FOUND'], $dirlink, false);
|
|
110 |
$admin->print_error($oTrans->MESSAGE_MEDIA_FILE_NOT_FOUND, $dirlink, false);
|
|
109 | 111 |
} |
110 | 112 |
|
111 | 113 |
// Setup template object, parse vars to it, then parse it |
... | ... | |
114 | 116 |
$template->set_file('page', 'media_rename.htt'); |
115 | 117 |
$template->set_block('page', 'main_block', 'main'); |
116 | 118 |
//echo WB_PATH.'/media/'.$directory.'/'.$rename_file; |
119 |
$template->set_var($oTrans->getLangArray()); |
|
120 |
|
|
117 | 121 |
if($type == 'folder') { |
118 | 122 |
$template->set_var('DISPlAY_EXTENSION', 'hide'); |
119 | 123 |
$extension = ''; |
... | ... | |
139 | 143 |
'FTAN' => $admin->getFTAN() |
140 | 144 |
) |
141 | 145 |
); |
142 |
|
|
143 |
|
|
144 |
// Insert language text and messages |
|
145 |
$template->set_var(array( |
|
146 |
'TEXT_TO' => $TEXT['TO'], |
|
147 |
'TEXT_RENAME' => $TEXT['RENAME'], |
|
148 |
'TEXT_CANCEL' => $TEXT['CANCEL'], |
|
149 |
'TEXT_UP' => $TEXT['UP'], |
|
150 |
'TEXT_OVERWRITE_EXISTING' => $TEXT['OVERWRITE_EXISTING'] |
|
151 |
) |
|
152 |
); |
|
153 |
|
|
154 | 146 |
// Parse template object |
155 | 147 |
$template->parse('main', 'main_block', false); |
156 | 148 |
$template->pparse('output', 'page'); |
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