'app_base' => '',
'debug' => false,
'media_url' => '/media/',
+ 'media_url' => '/media/upload/',
'static_url' => '/static/',
'session_cookie_id' => 'sessionid',
'dir_permission' => 0777,
public static function getUploadPath()
{
- return IPF::get('upload_path', '/tmp');
+ return IPF::get('document_root') . getUploadUrl();
}
public static function getUploadUrl()
{
- return IPF::get('upload_url', '/media/upload');
+ return IPF::get('upload_url');
}
}
//print_r($dirtree);
}
-function IPF_Admin_Views_FileBrowser($request, $match){
+function IPF_Admin_Views_FileBrowser($request, $match)
+{
$ca = IPF_Admin_App::checkAdminAuth($request);
if ($ca!==true) return $ca;
if (substr($curr_dir, -1) == '/')
$curr_dir = substr($curr_dir, 0, strlen($curr_dir)-1);
- $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','');
+ $upload_path = IPF::getUploadPath();
+ $upload_url = IPF::getUploadUrl();
- $dir = $upload_path.$curr_dir;
+ $dir = $upload_path . $curr_dir;
$_dir = substr($dir, -1) !== DIRECTORY_SEPARATOR ? $dir.DIRECTORY_SEPARATOR : $dir;
if ($request->method=="GET"){
public function execute($sourceUrl, $directory, $root=null)
{
if ($root === null)
- $root = IPF::get('upload_path') . DIRECTORY_SEPARATOR;
+ $root = IPF::getUploadPath();
$destinationUrl = IPF_Utils::insertDirectory($sourceUrl, $directory);
$path = $root . $destinationUrl;
{
protected function setUp()
{
- $this->root = IPF::get('upload_path');
+ $this->root = IPF::getUploadPath();
IPF_Utils::removeDirectories($this->root . '/thumbs');
}
$set['tmp'] = $project_root . '/tmp';
-$set['upload_url'] = '/media/upload/';
-$set['upload_path'] = $project_root . '/htdocs/media/upload/';
-
$set['secret_key'] = '123456';
$set['debug'] = true;