Skip to content
Snippets Groups Projects

Fixes #1278 Api review comments are been addressed

Merged Uma requested to merge uma.s/vtigercrm:api_review_Comments into master
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -1571,11 +1571,11 @@ class Vtiger_Functions {
$query = "SELECT attachmentsid FROM vtiger_seattachmentsrel WHERE crmid = ?";
$result = $adb->pquery($query, array($crmid));
$noofrows = $adb->num_rows($result);
if ($adb->num_rows($result) > 1) {
if ($noofrows > 1) {
for ($i = 0; $i < $noofrows; $i++) {
$attachmentIds[] = vtws_getId($WsEntityId,$adb->query_result($result, $i, 'attachmentsid'));
}
} else if($adb->num_rows($result) > 0 && $adb->num_rows($result) == 1){
} else if($noofrows > 0){
$attachmentIds[] = vtws_getId($WsEntityId, $adb->query_result($result, 0, 'attachmentsid'));
}
}
Loading