Skip to content

Commit 9212242

Browse files
committed
- Added database users and directive snippets to global search.
1 parent a8014df commit 9212242

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

interface/web/admin/form/directive_snippets.tform.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
Hint:
3030
The ID field of the database table is not part of the datafield definition.
3131
The ID field must be always auto incement (int or bigint).
32+
33+
Search:
34+
- searchable = 1 or searchable = 2 include the field in the search
35+
- searchable = 1: this field will be the title of the search result
36+
- searchable = 2: this field will be included in the description of the search result
3237
3338
3439
*/
@@ -69,21 +74,24 @@
6974
'default' => '',
7075
'value' => '',
7176
'width' => '30',
72-
'maxlength' => '255'
77+
'maxlength' => '255',
78+
'searchable' => 1
7379
),
7480
'type' => array (
7581
'datatype' => 'VARCHAR',
7682
'formtype' => 'SELECT',
7783
'default' => '',
7884
'value' => array('apache' => 'Apache','nginx' => 'nginx','php' => 'PHP'),
85+
'searchable' => 2
7986
),
8087
'snippet' => array (
8188
'datatype' => 'TEXT',
8289
'formtype' => 'TEXT',
8390
'default' => '',
8491
'value' => '',
8592
'width' => '30',
86-
'maxlength' => '255'
93+
'maxlength' => '255',
94+
'searchable' => 2
8795
),
8896
'active' => array (
8997
'datatype' => 'VARCHAR',

interface/web/dashboard/ajax_get_json.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@
8888
*/
8989
$result[] = _search('sites', 'database');
9090

91+
// database users
92+
$result[] = _search('sites', 'database_user');
93+
9194
// email domains
9295
$result[] = _search('mail', 'mail_domain');
9396

@@ -132,6 +135,9 @@
132135

133136
// virtual machines ip addresses
134137
$result[] = _search('vm', 'openvz_ip');
138+
139+
// directive snippets
140+
$result[] = _search('admin', 'directive_snippets');
135141

136142
$json = $app->functions->json_encode($result);
137143
}

interface/web/js/jquery.ispconfigsearch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2012, ISPConfig UG
2+
Copyright (c) 2012, ISPConfig UG (haftungsbeschränkt)
33
All rights reserved.
44
55
Redistribution and use in source and binary forms, with or without modification,

interface/web/sites/form/database_user.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
'value' => '',
9090
'width' => '30',
9191
'maxlength' => '255',
92-
'searchable' => 2
92+
'searchable' => 1
9393
),
9494
'database_password' => array (
9595
'datatype' => 'VARCHAR',

0 commit comments

Comments
 (0)