I have a problem with the following subroutine(s).. my problem is that
default.config is being returned even though a config file for the site exists
I have other sites that don't exhibit this behaviour and I am puzzled as to
why this one account has a problem,
of course its the one I need to modify.
This is a support portal and services something like 30 different accounts
,
some of these accounts have livechat some do not, the config file controls
whether or not the live chat displays.
the xml itself exists in SQL as well
as statically on the site and gets recreated if deleted by the sql, yes it has
been changed on the sql right now the data push from the sql is not working
either
ex subroutine 1..
sub getConfig { #This is for site/account specific options my $str = ""; my $xml = xmlFileData("Config",$Session->{'usrSystem'}.".config.xm +l","getConfig()"); if (!$xml) { $xml = xmlFileData<br>("Config","_default.config.xml","getConfig( +)"); } { $xml =~ /<system>(.*?)<\/system>/s; $str .= $1; } { $xml =~ /<account id="$Session->{'usrAccount'}"> (.*?)<\/account>/s; $str .= $1; } return $str; }
My other subroutine..
sub config { my $str = "<config>"; my $browser = $Request->ServerVariables("HTTP_USER_AGENT")->item() +; SWITCH: { if ($browser =~ /MSIE/) { $browser = "MSIE"; last SWITCH; } if ($browser =~ /Firefox/) { $browser = "FireFox"; last SWITCH; } } $str .= "<system>$Session->{'usrSystem'}</system>"; $str .= "<account>$Session->{'usrAccount'}</account>"; $str .= "<password>$Session->{'usrPassword'}</password>"; $str .= "<browser>$browser</browser>"; $str .= "<mode>$Session->{'mode'}</mode>"; $str .= "<codeBase>$Session->{'version'}</codeBase>"; $str .= "<usersOnline>".$Application->{'currentUserCount'}."</user +sOnline>"; # if($Session->{'trainingDelegate'}) # { # $str .= "<trainingDelegate>True</trainingDelegate>"; # } if ($Session->{'acrobatVersion'} >= $Session->{'minAcrobatVersion' +} || $Request->ServerVariables("HTTP_USER_AGENT")->item() =~ /Mac/) { $str .= "<acrobatReaderFound version=\"".$Session->{'acrobatVers +ion'}."\"/>\n"; } else { $str .= "<acrobatReaderNotFound/>"; ### chat pulls from here #### } if (getConfig() =~ /(<includeLiveHelp.*?)\/>/s) { $str .= $1." system=\"".$Session->{'usrSystem'}."\" account=\"".$Session->{'usrAccount'}."\" username=\"".$Session->{'usrID'}."\" password=\"".$Session->{'usrP +assword'}."\"/>"; } $str .= "</config>"; return $str; }
Sorry if the format is a little messy I am new here :)
In reply to problems with xml data being returned by grashoper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |