added support for reading from replicated databases

This commit is contained in:
JT Smith 2004-07-09 21:10:58 +00:00
parent c39e7dc7b0
commit 7648c6c13f
24 changed files with 87 additions and 48 deletions

View file

@ -198,7 +198,7 @@ sub processReplacements {
$content =~ s/\Q$searchFor/$replaceWith/gs;
}
} else {
my $sth = WebGUI::SQL->read("select searchFor,replaceWith from replacements");
my $sth = WebGUI::SQL->read("select searchFor,replaceWith from replacements",WebGUI::SQL->getSlave);
while (my ($searchFor,$replaceWith) = $sth->array) {
$session{replacements}{$searchFor} = $replaceWith;
$content =~ s/\Q$searchFor/$replaceWith/gs;