Merge pull-request #2890
This commit is contained in:
commit
b6ea1ac9a4
|
|
@ -21,7 +21,7 @@ class ProjectFileController extends BaseController
|
|||
|
||||
$this->response->html($this->template->render('project_file/create', array(
|
||||
'project' => $project,
|
||||
'max_size' => $this->helper->text->phpToBytes(ini_get('upload_max_filesize')),
|
||||
'max_size' => $this->helper->text->phpToBytes(get_upload_max_size()),
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class TaskFileController extends BaseController
|
|||
|
||||
$this->response->html($this->template->render('task_file/create', array(
|
||||
'task' => $task,
|
||||
'max_size' => $this->helper->text->phpToBytes(ini_get('upload_max_filesize')),
|
||||
'max_size' => $this->helper->text->phpToBytes(get_upload_max_size()),
|
||||
)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class TaskImportController extends BaseController
|
|||
'project' => $project,
|
||||
'values' => $values,
|
||||
'errors' => $errors,
|
||||
'max_size' => ini_get('upload_max_filesize'),
|
||||
'max_size' => get_upload_max_size(),
|
||||
'delimiters' => Csv::getDelimiters(),
|
||||
'enclosures' => Csv::getEnclosures(),
|
||||
'title' => t('Import tasks from CSV file'),
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class UserImportController extends BaseController
|
|||
$this->response->html($this->template->render('user_import/show', array(
|
||||
'values' => $values,
|
||||
'errors' => $errors,
|
||||
'max_size' => ini_get('upload_max_filesize'),
|
||||
'max_size' => get_upload_max_size(),
|
||||
'delimiters' => Csv::getDelimiters(),
|
||||
'enclosures' => Csv::getEnclosures(),
|
||||
)));
|
||||
|
|
|
|||
|
|
@ -135,6 +135,16 @@ function build_app_version($ref, $commit_hash)
|
|||
return $version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get upload max size.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function get_upload_max_size()
|
||||
{
|
||||
return min(ini_get('upload_max_filesize'), ini_get('post_max_size'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate a string
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue