Minor - removing unsued condition

1.9.x
Julio Montoya 10 years ago
parent afbd8f39d8
commit 79f3e123bf
  1. 8
      main/inc/lib/main_api.lib.php

@ -3401,13 +3401,15 @@ function api_item_property_update(
if (is_null($to_user_id) && is_null($to_group_id)) {
$to_group_id = 0;
}
$to_filter = null;
if (!is_null($to_user_id)) {
// Set filter to intended user.
$to_filter = " AND to_user_id= '$to_user_id' $condition_session";
$to_filter = " AND to_user_id= '$to_user_id' ";
} else {
// Set filter to intended group.
if (($to_group_id != 0) && $to_group_id == strval(intval($to_group_id))) {
$to_filter = " AND to_group_id = '$to_group_id' $condition_session";
$to_filter = " AND to_group_id = '$to_group_id' ";
}
}
@ -3462,6 +3464,7 @@ function api_item_property_update(
ref = '$item_id' AND
id_session = '$session_id'";
$rs = Database::query($sql);
if (Database::num_rows($rs) > 0) {
$sql = "UPDATE $TABLE_ITEMPROPERTY
SET
@ -3522,7 +3525,6 @@ function api_item_property_update(
default : // The item will be added or updated.
$set_type = ", lastedit_type='$lastedit_type' ";
$visibility = '1';
//$filter .= $to_filter; already added
$sql = "UPDATE $TABLE_ITEMPROPERTY
SET
lastedit_date = '$time',

Loading…
Cancel
Save