Skip to content

Commit

Permalink
some cs changes after #12396
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Oct 16, 2016
1 parent 99b57db commit c395bfc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
11 changes: 5 additions & 6 deletions administrator/components/com_media/views/images/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,11 @@
</div>
<div class="controls">
<input required type="file" id="upload-file" name="Filedata[]" multiple /><button class="btn btn-primary" id="upload-submit"><span class="icon-upload icon-white"></span> <?php echo JText::_('COM_MEDIA_START_UPLOAD'); ?></button>
<p class="help-block"><?php
$cMax = (int) $this->config->get('upload_maxsize');
$maxSize = JUtility::getMaxUploadSize($cMax . 'MB');

echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', JHtml::_('number.bytes', $maxSize));
?></p>
<p class="help-block">
<?php $cMax = (int) $this->config->get('upload_maxsize'); ?>
<?php $maxSize = JUtility::getMaxUploadSize($cMax . 'MB'); ?>
<?php echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', JHtml::_('number.bytes', $maxSize)); ?>
</p>
</div>
</div>
</fieldset>
Expand Down
11 changes: 5 additions & 6 deletions administrator/components/com_media/views/media/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,11 @@
<fieldset id="upload-noflash" class="actions">
<label for="upload-file" class="control-label"><?php echo JText::_('COM_MEDIA_UPLOAD_FILE'); ?></label>
<input required type="file" id="upload-file" name="Filedata[]" multiple /> <button class="btn btn-primary" id="upload-submit"><span class="icon-upload icon-white"></span> <?php echo JText::_('COM_MEDIA_START_UPLOAD'); ?></button>
<p class="help-block"><?php
$cMax = (int) $this->config->get('upload_maxsize');
$maxSize = JUtility::getMaxUploadSize($cMax . 'MB');

echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', JHtml::_('number.bytes', $maxSize));
?></p>
<p class="help-block">
<?php $cMax = (int) $this->config->get('upload_maxsize'); ?>
<?php $maxSize = JUtility::getMaxUploadSize($cMax . 'MB'); ?>
<?php echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', JHtml::_('number.bytes', $maxSize)); ?>
</p>
</fieldset>
<input class="update-folder" type="hidden" name="folder" id="folder" value="<?php echo $this->state->folder; ?>" />
<?php JFactory::getSession()->set('com_media.return_url', 'index.php?option=com_media'); ?>
Expand Down
6 changes: 3 additions & 3 deletions layouts/joomla/form/field/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
// Including fallback code for HTML5 non supported browsers.
JHtml::_('jquery.framework');
JHtml::_('script', 'system/html5fallback.js', false, true);

$maxSize = JHtml::_('number.bytes', JUtility::getMaxUploadSize());
?>
<input type="file"
name="<?php echo $name; ?>"
Expand All @@ -60,6 +62,4 @@
<?php echo $autofocus ? ' autofocus' : ''; ?>
<?php echo !empty($onchange) ? ' onchange="' . $onchange . '"' : ''; ?>
<?php echo $required ? ' required aria-required="true"' : ''; ?> /><br>
<?php
$maxSize = JHtml::_('number.bytes', JUtility::getMaxUploadSize());
echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', $maxSize);
<?php echo JText::sprintf('JGLOBAL_MAXIMUM_UPLOAD_SIZE_LIMIT', $maxSize); ?>
2 changes: 1 addition & 1 deletion libraries/joomla/utilities/utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static function parseAttributes($string)
*
* @return int Size in number of bytes
*
* @since __DEPLOY_VERSION__
* @since __DEPLOY_VERSION__
*/
public static function getMaxUploadSize($custom = null)
{
Expand Down

0 comments on commit c395bfc

Please sign in to comment.