mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Minor comment fixes.
This commit is contained in:
parent
529c882f18
commit
c0cd29b5de
3 changed files with 9 additions and 2 deletions
|
@ -447,7 +447,7 @@ function farm_inventory_query($asset_id, $time = REQUEST_TIME, $done = TRUE) {
|
|||
*/
|
||||
|
||||
// Ensure $asset_id is valid, because it will be used directly in the query
|
||||
// string. This is defensive code. See note about views_join_subquery above.
|
||||
// string. This is defensive code. See note about farm_log_query() above.
|
||||
if (!is_int($asset_id) || $asset_id < 0) {
|
||||
$asset_id = db_escape_field($asset_id);
|
||||
}
|
||||
|
|
|
@ -462,7 +462,7 @@ function farm_log_asset_query($asset_id, $time = REQUEST_TIME, $done = TRUE, $lo
|
|||
$query = farm_log_query($time, $done, $log_id_field);
|
||||
|
||||
// Ensure $asset_id is valid, because it will be used directly in the query
|
||||
// string. This is defensive code. See note about views_join_subquery above.
|
||||
// string. This is defensive code. See note about farm_log_query() above.
|
||||
if (!is_int($asset_id) || $asset_id < 0) {
|
||||
$asset_id = db_escape_field($asset_id);
|
||||
}
|
||||
|
|
|
@ -252,6 +252,13 @@ function farm_movement_asset_location(FarmAsset $asset, $time = REQUEST_TIME, $d
|
|||
*/
|
||||
function farm_movement_asset_latest_movement(FarmAsset $asset, $time = REQUEST_TIME, $done = TRUE) {
|
||||
|
||||
/**
|
||||
* Please read the comments in farm_movement_asset_movement_query() to
|
||||
* understand how this works, and to be aware of the limitations and
|
||||
* responsibilities we have in this function with regard to sanitizing query
|
||||
* inputs.
|
||||
*/
|
||||
|
||||
// If the asset doesn't have an ID (for instance if it is new and hasn't been
|
||||
// saved yet), bail.
|
||||
if (empty($asset->id)) {
|
||||
|
|
Loading…
Reference in a new issue