mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Less code to get the max post size from php.ini :)
This commit is contained in:
@@ -106,10 +106,7 @@ class adif extends CI_Controller {
|
||||
{
|
||||
$data['error'] = $this->upload->display_errors();
|
||||
|
||||
$max_upload = min(ini_get('post_max_size'), ini_get('upload_max_filesize'));
|
||||
$max_upload = str_replace('M', '', $max_upload);
|
||||
|
||||
$data['max_upload'] = $max_upload * 1024;
|
||||
$data['max_upload'] = ini_get('upload_max_filesize');
|
||||
|
||||
$this->load->view('interface_assets/header', $data);
|
||||
$this->load->view('adif/import');
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<button type="submit" class="btn btn-primary mb-2" value="Upload">Upload</button>
|
||||
</form>
|
||||
|
||||
<p><span class="badge badge-warning">Warning</span> Maximum file upload size is <?php echo $max_upload; ?> MB.</p>
|
||||
<p><span class="badge badge-warning">Warning</span> Maximum file upload size is <?php echo $max_upload; ?>B.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user