connect() public method

Try to connect the resource based on supplied parameter.
public connect ( $host = null ) : boolean | PEAR_Error
return boolean | PEAR_Error
Example #1
0
}

if (!$g_user->hasPermission('CommentModerate')) {
	camp_html_add_msg(getGS("You do not have the right to moderate comments." ));
?>
<script type="text/javascript">
window.close();
window.opener.location.reload();
</script>
<?php
	exit;
}

if (SystemPref::Get("UseDBReplication") == 'Y') {
    $dbReplicationObj = new DbReplication();
    $connectedToOnlineServer = $dbReplicationObj->connect();
    if ($connectedToOnlineServer == false) {
        camp_html_add_msg(getGS("Comments Disabled: you are either offline or not able to reach the Online server"));
?>
<script type="text/javascript">
window.close();
window.opener.location.reload();
</script>
<?php
		exit;
    }
}

if (!isset($connectedToOnlineServer)
        || $connectedToOnlineServer == true) {
	$f_comment_id = Input::Get("f_comment_id", "int");