Revize c478920d
Přidáno uživatelem Ondřej Fibich před asi 9 roky(ů)
application/helpers/valid.php | ||
---|---|---|
return preg_match ("/^[0-9]+(\.[0-9]+)?[k|M|G|T]?B$/", $str);
|
||
}
|
||
|
||
/**
|
||
* Checks whether string is valid for upload_max_filesize and
|
||
* post_max_size values
|
||
*
|
||
* @author David Raska
|
||
* @param string $str
|
||
* @return boolean
|
||
*/
|
||
public static function file_size($str)
|
||
{
|
||
return preg_match ("/^([1-9][0-9]*[k|M|G]?)$/i", $str);
|
||
}
|
||
|
||
/**
|
||
* Checks whether string is valid speed size (eg. in format 2M/8M)
|
||
*
|
Také k dispozici: Unified diff
Undo my stupid mistake (I have pushed issue-957 to master instead of develop). Do I have copied files from GitHub master and push them back..