X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=blobdiff_plain;f=uploader.php;h=0badb1ac91acce01eb9ff29febc47ad8eb6c206a;hp=a793385c9f17c120d9355b7285846af181d836cc;hb=fe9a487e1b5ed0700481aee4609055dc6c47505d;hpb=23dfbcc20fc6d20fb5be211e5af50cdcb8565c8e diff --git a/uploader.php b/uploader.php index a793385..0badb1a 100644 --- a/uploader.php +++ b/uploader.php @@ -51,17 +51,17 @@ function uploader($progress_url = '') { } $html = new tem(); - $html->load('code/wfpl/uploader/uploader.html'); + $html->load(__DIR__.'/'.'uploader/uploader.html'); $html->set('filename', $filename); $html->set('host', $GLOBALS['wfpl_uploader_host']); $html->set('port', $GLOBALS['wfpl_uploader_port']); $html->show('main'); $html = $html->get('main'); - $css = read_whole_file('code/wfpl/uploader/uploader.css'); + $css = read_whole_file(__DIR__.'/'.'uploader/uploader.css'); $javascript = new tem(); - $javascript->load('code/wfpl/uploader/progress.js'); + $javascript->load(__DIR__.'/'.'uploader/progress.js'); $javascript->set('url', $progress_url); $javascript = $javascript->run(); @@ -80,7 +80,7 @@ function uploader_move($tmp_filename, $filename) { # start a daemon to accept file uploads and give progress indicators # if the port is used (eg if the daemon is already running) this will do nothing. function uploader_daemon_start($port) { - exec(path_to('tcpserver') . " -q -R -H -llocalhost 0 $port " . path_to('perl') . ' code/wfpl/uploader/daemon.pl ' . $GLOBALS['wfpl_uploader_path'] . ' >/dev/null 2>/dev/null < /dev/null &'); + exec(path_to('tcpserver') . " -q -R -H -llocalhost 0 $port " . path_to('perl') . ' lib/wfpl/uploader/daemon.pl ' . $GLOBALS['wfpl_uploader_path'] . ' >/dev/null 2>/dev/null < /dev/null &'); } /* call this to respond to the javascript async request for progress on the upload */