Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
isp
ISPConfig 3
Commits
7d6bc86f
Commit
7d6bc86f
authored
Jan 19, 2018
by
iMZ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update aps_guicontroller.inc.php - fixed lookup for dbserver of client
parent
2552b4ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
interface/lib/classes/aps_guicontroller.inc.php
interface/lib/classes/aps_guicontroller.inc.php
+15
-1
No files found.
interface/lib/classes/aps_guicontroller.inc.php
View file @
7d6bc86f
...
...
@@ -260,13 +260,27 @@ class ApsGUIController extends ApsBase
$webserver_config
=
$app
->
getconf
->
get_server_config
(
$app
->
functions
->
intval
(
$websrv
[
'server_id'
]),
'server'
);
$mysql_db_remote_ips
=
$webserver_config
[
'ip_address'
];
}
else
{
// Changing column lookup from default_dbserver to db_servers
$client
=
$app
->
db
->
queryOneRecord
(
"SELECT db_servers FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?"
,
$websrv
[
'sys_groupid'
]);
if
(
is_array
(
$client
)
&&
$client
[
'db_servers'
]
>
0
&&
$client
[
'db_servers'
]
!=
$websrv
[
'server_id'
])
{
$mysql_db_server_id
=
$app
->
functions
->
intval
(
$client
[
'db_servers'
]);
$dbserver_config
=
$web_config
=
$app
->
getconf
->
get_server_config
(
$app
->
functions
->
intval
(
$mysql_db_server_id
),
'server'
);
$settings
[
'main_database_host'
]
=
$dbserver_config
[
'ip_address'
];
$mysql_db_remote_access
=
'y'
;
$webserver_config
=
$app
->
getconf
->
get_server_config
(
$app
->
functions
->
intval
(
$websrv
[
'server_id'
]),
'server'
);
$mysql_db_remote_ips
=
$webserver_config
[
'ip_address'
];
}
else
{
// Really nothing to do if reach this point :)
return
false
;
}
/* I left this in place for a fallback that should NEVER! happen.
* if we reach this point it means that there is NO default db server for the client
* AND the webserver has NO db service enabled.
* We have to abort the aps installation here... so I added a return false
* although this does not present any error message to the user.
*/
return
false
;
//
return false;
/*$mysql_db_server_id = $websrv['server_id'];
$settings['main_database_host'] = 'localhost';
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment