Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
Properly test connection to db for ezdfs clustered setups
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Mar 28, 2012
1 parent fde3a76 commit 6f9f7b6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions classes/ezsnmpdstatushandler.php
Expand Up @@ -403,6 +403,25 @@ function get( $oid )
$ok = 1;
}
}
else if ( $clusterhandler == 'eZDFSFileHandler' )
{
// This is even worse: we have no right to know if db connection is ok.
// So we replicate some code here...
$dbbackend = eZExtension::getHandlerClass(
new ezpExtensionOptions(
array( 'iniFile' => 'file.ini',
'iniSection' => 'eZDFSClusteringSettings',
'iniVariable' => 'DBBackend' ) ) );
try
{
$dbbackend->_connect();
$ok = 1;
}
catch ( exception $e )
{
$ok = 0;
}
}
else
{
$ok = -1;
Expand Down
1 change: 1 addition & 0 deletions doc/changelogs/0.5/CHANGELOG-0.5-to-0.5.1
Expand Up @@ -5,5 +5,6 @@ Changes from 0.5 to 0.5.1 - released 2012-03-xx

* Bugfixes:
- Add the missing config files to make the extension show up in the "Setup" left col menu
- Connection to cluster db was not tested for ezdfs cluster setups

* Misc changes

0 comments on commit 6f9f7b6

Please sign in to comment.