<script type="text/javascript">
var curr_dir = '{$curr_dir}';
-var upload_url = '{$UPLOAD_URL}';
+var upload_url = '{$upload_url}';
var admin_media_url = '{$ADMIN_MEDIA_URL}';
{literal}
function click_file(filename, image, w, h){
if ($ca!==true) return $ca;
$curr_dir = urldecode(substr($match[1],1));
- $dir = IPF::get('upload_path').$curr_dir;
+ $upload_path = IPF::get('editor_upload_path','');
+ if ($upload_path=='')
+ $upload_path = IPF::get('upload_path','');
+ $upload_url = IPF::get('editor_upload_url','');
+ if ($upload_url=='')
+ $upload_url = IPF::get('upload_url','');
+
+ $dir = $upload_path.$curr_dir;
if ($request->method=="GET"){
if (@$request->GET['delete']){
$files = array();
if ($dh = @opendir($dir)) {
while (($file = readdir($dh)) !== false) {
- if ($file=='.')
+ if ($file=='.')
continue;
if (($curr_dir=='') && ($file=='..'))
continue;
'dirs' => $dirs,
'files' => $files,
'path' => $path,
+ 'upload_url' => $upload_url,
'curr_dir' => $curr_dir,
);
return IPF_Shortcuts::RenderToResponse('admin/filebrowser.html', $context, $request);