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 1886
1886
9930 DNS
1887
1887
1888
1888
9940 Is allowed to manage saved searches
1889
+ 9941 Ungroup results
1889
1890
1890
1891
9950 Notifications
1891
1892
9951 Please check that the notification configuration has been set correctly, otherwise sending reports through notifications will not work
1920
1921
9990 Download SNMP Subnets List
1921
1922
9991 Generate SNMP files
1922
1923
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 1881
1881
9930 DNS
1882
1882
1883
1883
9940 Est autorisé à gérer les recherches sauvegardées
1884
+ 9941 Dégrouper le résultat
1884
1885
1885
1886
9950 Notifications
1886
1887
9951 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 289
289
}
290
290
291
291
if (!empty ($ _SESSION ['OCS ' ]['multi_search ' ])){
292
+ $ checked = "" ;
293
+
294
+ if (isset ($ protectedPost ["groupby_search " ])) {
295
+ $ checked = "checked " ;
296
+ }
297
+
292
298
?>
293
299
294
300
<div class="col-sm-12">
295
301
<input name="onglet" type="hidden" value="COMPUTERS">
296
302
<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/>
297
306
<input type="submit" class="btn btn-success" value="<?php echo $ l ->g (13 ) ?> ">
298
307
</div>
299
308
322
331
323
332
if ((isset ($ protectedPost ['search_ok ' ]) || isset ($ protectedGet ['prov ' ]) || isset ($ protectedGet ['fields ' ])) && $ isValid && !isset ($ protectedPost ['table_select ' ]) && !isset ($ protectedPost ['columns_select ' ])){
324
333
unset($ _SESSION ['OCS ' ]['SEARCH_SQL_GROUP ' ]);
334
+
335
+ $ groupby = true ;
336
+
337
+ if (isset ($ protectedPost ["groupby_search " ])) {
338
+ $ groupby = false ;
339
+ }
340
+
325
341
/**
326
342
* Generate Search fields
327
343
*/
328
- $ search ->generateSearchQuery ($ _SESSION ['OCS ' ]['multi_search ' ]);
344
+ $ search ->generateSearchQuery ($ _SESSION ['OCS ' ]['multi_search ' ], $ groupby );
329
345
$ sql = $ search ->baseQuery .$ search ->searchQuery .$ search ->columnsQueryConditions ;
330
346
331
347
$ _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)
318
318
* @param Array $sessData
319
319
* @return void
320
320
*/
321
- public function generateSearchQuery ($ sessData ){
321
+ public function generateSearchQuery ($ sessData, $ groupby = true ){
322
322
323
323
new AccountinfoSearch ();
324
324
$ this ->pushBaseQueryForTable ("hardware " , null );
@@ -579,7 +579,10 @@ public function generateSearchQuery($sessData){
579
579
$ this ->columnsQueryConditions .= " AND " . $ lockResult ;
580
580
}
581
581
582
- $ this ->columnsQueryConditions .= " GROUP BY hardware.id " ;
582
+ if ($ groupby ) {
583
+ $ this ->columnsQueryConditions .= " GROUP BY hardware.id " ;
584
+ }
585
+
583
586
$ this ->baseQuery = substr ($ this ->baseQuery , 0 , -1 );
584
587
}
585
588
You can’t perform that action at this time.
0 commit comments