Re: SIGMA and preserve_data

From: Date: Sat, 12 Mar 2005 16:24:57 +0000
Subject: Re: SIGMA and preserve_data
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17995@lists.php.net to get a copy of this message
Sorry, I don't know anything about this package, but there is an unmatched square bracket below. HTH? Ray ----- Original Message ----- From: "Alexey Borzov" <borz_off@cs.msu.su> To: "Mario Gzuk" <mariogzuk@technikz.de> Cc: <pear-general@lists.php.net> Sent: Saturday, March 12, 2005 8:03 AM Subject: Re: [PEAR] SIGMA and preserve_data
Hi, Mario Gzuk wrote:
Are you doing the setOption() call before or after setVariable()? It will have no effect after setVariable().
---SNIP---- $template =& new HTML_Template_Sigma('.'); $template->loadTemplateFile('modules/software/templates/new_software.html'); $template->setOption('preserve_data',true); $template->setCallbackFunction('lang', 'sigma_setlang'); $template->setCallbackFunction('link', 'sigma_createlink'); $software=db_selectID('unattended_software',$id); if ($software!=false) { $template->setVariable(array('id'=>$software['id'], 'software'=>$software['software'], 'regkey'=>$software['regkey')
                                               ^
(Missing square bracket?)
} ---SNAP--- if now the regkey has the value \\HKLM\...\{092714hlnsdsaw29724} the last part {092714hlnsdsaw29724} will not be shown.
The following minimal code <?php require_once 'HTML/Template/Sigma.php'; $tpl =& new HTML_Template_Sigma(); $tpl->setTemplate('This is the key: {regkey}'); $tpl->setOption('preserve_data', true); $tpl->setVariable('regkey', '\\\\HKLM\\...\\{092714hlnsdsaw29724}'); $tpl->show(); ?> works as expected, displaying This is the key: \\HKLM\...\{092714hlnsdsaw29724} Your example is not self-contained, therefore I suspect that there are some errors in the parts of the code you decided not to show. -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pear.general (#17995) next »