Merge branch 'master' of github.com:krstn/scattport

This commit is contained in:
Karsten Heiken
2011-11-28 15:22:13 +01:00
4 changed files with 19 additions and 1 deletions

View File

@@ -9,6 +9,7 @@
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/uploads/.*
RewriteRule ^(.*)$ index.php?/$1 [L] RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule> </IfModule>

View File

@@ -0,0 +1,15 @@
<?php defined('BASEPATH') || exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Directory into which the results are uploaded
|--------------------------------------------------------------------------
|
| When a client made a calculation, he uploads the results to a directory
| on this server.
|
| This has to be the base directory, i.e. the ftp-user's home directory.
*/
$config['ftp_base'] = '/var/scattportd';
/* End of file scattport.php */
/* Location: ./application/config/scattport.php */

View File

@@ -37,6 +37,8 @@ class Xmlrpc extends MY_Controller {
$this->load->library('xmlrpc'); $this->load->library('xmlrpc');
$this->load->library('xmlrpcs'); $this->load->library('xmlrpcs');
$this->load->config('scattport');
$this->load->model('server'); $this->load->model('server');
$this->session->sess_destroy(); $this->session->sess_destroy();
@@ -156,7 +158,7 @@ class Xmlrpc extends MY_Controller {
$project = $this->project->getById($experiment['project_id']); $project = $this->project->getById($experiment['project_id']);
if($files_uploaded) { if($files_uploaded) {
foreach (glob("/tmp/sp_incoming/" . $job_id . "/*") as $filename) { foreach (glob($this->config->item('ftp_base') ."/incoming/" . $job_id . "/*") as $filename) {
$job_dir = FCPATH . 'uploads/' . $experiment['project_id'] . '/' . $experiment['id']; $job_dir = FCPATH . 'uploads/' . $experiment['project_id'] . '/' . $experiment['id'];
$directories = explode("/", $job_dir); $directories = explode("/", $job_dir);
$dir_tmp = '/'; $dir_tmp = '/';

0
favicon.ico Normal file
View File