File tree Expand file tree Collapse file tree 4 files changed +25
-4
lines changed
main_sections/ms_multi_search Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 188618869930 DNS
18871887
188818889940 Is allowed to manage saved searches
1889+ 9941 Ungroup results
18891890
189018919950 Notifications
189118929951 Please check that the notification configuration has been set correctly, otherwise sending reports through notifications will not work
192019219990 Download SNMP Subnets List
192119229991 Generate SNMP files
19221923
1923- 10000 Failed to update account info fields: quotes are not allowed in administrative values
1924+ 10000 Failed to update account info fields: quotes are not allowed in administrative values
Original file line number Diff line number Diff line change 188118819930 DNS
18821882
188318839940 Est autorisé à gérer les recherches sauvegardées
1884+ 9941 Dégrouper le résultat
18841885
188518869950 Notifications
188618879951 Veuillez vérifier que les notifications ont été correctement configurées pour que l'envoi des rapports fonctionne
Original file line number Diff line number Diff line change 289289 }
290290
291291 if (!empty ($ _SESSION ['OCS ' ]['multi_search ' ])){
292+ $ checked = "" ;
293+
294+ if (isset ($ protectedPost ["groupby_search " ])) {
295+ $ checked = "checked " ;
296+ }
297+
292298 ?>
293299
294300 <div class="col-sm-12">
295301 <input name="onglet" type="hidden" value="COMPUTERS">
296302 <input id="search_ok" name="search_ok" type="hidden" value="OK">
303+ <div>
304+ <input style="display:initial;width:20px;height:14px;" type="checkbox" name="groupby_search" value="0" id="groupby_search" class="form-control" <?php echo $ checked ?> ><?php echo $ l ->g (9941 ) ?>
305+ </div><br/>
297306 <input type="submit" class="btn btn-success" value="<?php echo $ l ->g (13 ) ?> ">
298307 </div>
299308
322331
323332 if ((isset ($ protectedPost ['search_ok ' ]) || isset ($ protectedGet ['prov ' ]) || isset ($ protectedGet ['fields ' ])) && $ isValid && !isset ($ protectedPost ['table_select ' ]) && !isset ($ protectedPost ['columns_select ' ])){
324333 unset($ _SESSION ['OCS ' ]['SEARCH_SQL_GROUP ' ]);
334+
335+ $ groupby = true ;
336+
337+ if (isset ($ protectedPost ["groupby_search " ])) {
338+ $ groupby = false ;
339+ }
340+
325341 /**
326342 * Generate Search fields
327343 */
328- $ search ->generateSearchQuery ($ _SESSION ['OCS ' ]['multi_search ' ]);
344+ $ search ->generateSearchQuery ($ _SESSION ['OCS ' ]['multi_search ' ], $ groupby );
329345 $ sql = $ search ->baseQuery .$ search ->searchQuery .$ search ->columnsQueryConditions ;
330346
331347 $ _SESSION ['OCS ' ]['multi_search_query ' ] = $ sql ;
Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ public function getFieldUniqId($uniqid, $tableName)
318318 * @param Array $sessData
319319 * @return void
320320 */
321- public function generateSearchQuery ($ sessData ){
321+ public function generateSearchQuery ($ sessData, $ groupby = true ){
322322
323323 new AccountinfoSearch ();
324324 $ this ->pushBaseQueryForTable ("hardware " , null );
@@ -579,7 +579,10 @@ public function generateSearchQuery($sessData){
579579 $ this ->columnsQueryConditions .= " AND " . $ lockResult ;
580580 }
581581
582- $ this ->columnsQueryConditions .= " GROUP BY hardware.id " ;
582+ if ($ groupby ) {
583+ $ this ->columnsQueryConditions .= " GROUP BY hardware.id " ;
584+ }
585+
583586 $ this ->baseQuery = substr ($ this ->baseQuery , 0 , -1 );
584587 }
585588
You can’t perform that action at this time.
0 commit comments