-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from GregMage/update
fix onupdate.php
- Loading branch information
Showing
4 changed files
with
71 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Important information for updating a version below 2.0 !!! | ||
|
||
Step: | ||
|
||
1. Connect to your site and go to module administration. | ||
2. Delete the folder "modules/TDMDownloads" | ||
3. Copy the "tdmdownloads" folder (version greater than 2) to folder "modules/" | ||
4. Update the "tdmdownloads" module | ||
5. Go into the preferences of the module "tdmdownloads", choose "Max uploaded files size" and validate them. | ||
|
||
tdmdownloads is now up to date. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
/** | ||
* 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 | ||
* which is considered copyrighted (c) material of the original comment or credit authors. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* | ||
* @copyright Gregory Mage (Aka Mage) | ||
* @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) | ||
* @author Gregory Mage (Aka Mage) | ||
*/ | ||
|
||
/** | ||
* @param $val | ||
* @return float|int | ||
*/ | ||
function tdmdownloadsReturnBytes($val) | ||
{ | ||
switch (mb_substr($val, -1)) { | ||
case 'K': | ||
case 'k': | ||
return (int)$val * 1024; | ||
case 'M': | ||
case 'm': | ||
return (int)$val * 1048576; | ||
case 'G': | ||
case 'g': | ||
return (int)$val * 1073741824; | ||
default: | ||
return $val; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters