Macro Tests: refactored all macro tests to remove a very evil hack

for inserting macros into the config.  The new method is much cleaner
and uses the Config API.
Updated the docs for the RootTitle macro, both POD and online help.
This commit is contained in:
Colin Kuskie 2006-07-25 20:54:08 +00:00
parent cc61639232
commit f1159269a0
32 changed files with 245 additions and 132 deletions

View file

@ -1,10 +1,11 @@
package Macro_Config;
package WebGUI::Macro_Config;
sub insert_macro {
sub enable_macro {
my ($session, $nickname, $macroName) = @_;
my %macros = %{ $session->config->get('macros') };
$macros{$nickname} = $macroName;
$session->config->{_config}->{'macros'} = \%macros;
return '' if $macros{$nickname};
$session->config->addToHash("macros", $nickname, $macroName);
return $nickname;
}
1;