"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "inc/commonitilvalidation.class.php" between
glpi-9.3.3.tgz and glpi-9.4.0.tgz

About: GLPI is an IT and asset management software (Information Resource Manager).

commonitilvalidation.class.php  (glpi-9.3.3.tgz):commonitilvalidation.class.php  (glpi-9.4.0.tgz)
skipping to change at line 530 skipping to change at line 530
$row = $DB->request([ $row = $DB->request([
'FROM' => static::getTable(), 'FROM' => static::getTable(),
'COUNT' => 'cpt', 'COUNT' => 'cpt',
'WHERE' => [ 'WHERE' => [
'status' => self::WAITING, 'status' => self::WAITING,
'users_id_validate' => $users_id 'users_id_validate' => $users_id
] ]
])->next(); ])->next();
if ($row['cpt']) { return $row['cpt'];
return $row['cpt'];
}
return false;
} }
/** /**
* Get the number of validations attached to an item having a specified statu s * Get the number of validations attached to an item having a specified statu s
* *
* @param integer $items_id item ID * @param integer $items_id item ID
* @param integer $status status * @param integer $status status
**/ **/
static function getTicketStatusNumber($items_id, $status) { static function getTicketStatusNumber($items_id, $status) {
global $DB; global $DB;
$row = $DB->request([ $row = $DB->request([
'FROM' => static::getTable(), 'FROM' => static::getTable(),
'COUNT' => 'cpt', 'COUNT' => 'cpt',
'WHERE' => [ 'WHERE' => [
static::$items_id => $items_id, static::$items_id => $items_id,
'status' => $status 'status' => $status
] ]
])->next(); ])->next();
if ($row['cpt']) { return $row['cpt'];
return $row['cpt'];
}
return false;
} }
/** /**
* Check if validation already exists * Check if validation already exists
* *
* @param $items_id integer item ID * @param $items_id integer item ID
* @param $users_id integer user ID * @param $users_id integer user ID
* *
* @since 0.85 * @since 0.85
* *
skipping to change at line 1327 skipping to change at line 1321
} }
$params['groups_id'] = 0; $params['groups_id'] = 0;
foreach ($options as $key => $val) { foreach ($options as $key => $val) {
$params[$key] = $val; $params[$key] = $val;
} }
$list = []; $list = [];
$restrict = []; $restrict = [];
$res = User::getSqlSearchResult (false, $params['right'], $params['entity' $res = User::getSqlSearchResult(false, $params['right'], $params['entity']
]); );
while ($data = $DB->fetch_assoc($res)) { while ($data = $res->next()) {
$list[] = $data['id']; $list[] = $data['id'];
} }
if (count($list) > 0) { if (count($list) > 0) {
$restrict = ['glpi_users.id' => $list]; $restrict = ['glpi_users.id' => $list];
} }
$users = Group_user::getGroupUsers($params['groups_id'], $restrict); $users = Group_user::getGroupUsers($params['groups_id'], $restrict);
return $users; return $users;
} }
 End of changes. 3 change blocks. 
11 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)