Merge branch 'cc-5709-airtime-analyzer-store-file-size-and-hash-in-db' into saas-store-file-size-and-hash-in-db
Conflicts: airtime_mvc/application/Bootstrap.php airtime_mvc/application/modules/rest/controllers/MediaController.php
This commit is contained in:
commit
c1086842d3
6 changed files with 54 additions and 4 deletions
20
airtime_mvc/application/common/FileDataHelper.php
Normal file
20
airtime_mvc/application/common/FileDataHelper.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: sourcefabric
|
||||
* Date: 17/02/15
|
||||
*/
|
||||
|
||||
class FileDataHelper {
|
||||
|
||||
/**
|
||||
* We want to throw out invalid data and process the upload successfully
|
||||
* at all costs, so check the data and sanitize it if necessary
|
||||
* @param array $data array containing new file metadata
|
||||
*/
|
||||
public static function sanitizeData(&$data) {
|
||||
// If the track number isn't numeric, this will return 0
|
||||
$data["track_number"] = intval($data["track_number"]);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue