Skip to content

Commit

Permalink
Fix xoops_version function
Browse files Browse the repository at this point in the history
  • Loading branch information
GregMage committed Jan 31, 2019
1 parent aba7923 commit 43b4467
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions include/xoops_version.inc.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* tdmdownload
* tdmdownloads
*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
Expand All @@ -18,7 +18,7 @@
* @param $val
* @return float|int
*/
function returnBytes($val)
function tdmdownloadsReturnBytes($val)
{
switch (mb_substr($val, -1)) {
case 'K':
Expand Down
7 changes: 2 additions & 5 deletions xoops_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,6 @@
'default' => 0,
];

//xoops_load('xoopseditorhandler');
//$editorHandler = \XoopsEditorHandler::getInstance();

$modversion['config'][] = [
'name' => 'editor',
'title' => '_MI_TDMDOWNLOADS_FORM_OPTIONS',
Expand Down Expand Up @@ -537,8 +534,8 @@
];

include_once 'include/xoops_version.inc.php';
$iniPostMaxSize = returnBytes(ini_get('post_max_size'));
$iniUploadMaxFileSize = returnBytes(ini_get('upload_max_filesize'));
$iniPostMaxSize = tdmdownloadsReturnBytes(ini_get('post_max_size'));
$iniUploadMaxFileSize = tdmdownloadsReturnBytes(ini_get('upload_max_filesize'));
$maxSize = min($iniPostMaxSize, $iniUploadMaxFileSize);
if ($maxSize > 10000 * 1048576) {
$increment = 500;
Expand Down

0 comments on commit 43b4467

Please sign in to comment.