BUG 15012 "When creating a dynaform with the character..." SOLVED

- When creating a dynaform with the character "&", the field handlers not working.
- Problema resuelto, el problema que se teníera lo siguiente cuando se utiliza el "&" en el tílo de un dynaform,
  cuando se enviaba los datos via GET, el "&" lo interpretaba como un separador de variables y esto ocasionaba la
  division de los datos que se enviaba.	Se valida los datos enviados via GET codificáolos y al recibir estos datos
  se los decodifica.
This commit is contained in:
Luis Fernando Saisa Lopez
2014-06-10 09:57:44 -04:00
parent 7c7c5b0fcc
commit f0721fdb03
2 changed files with 10 additions and 2 deletions

View File

@@ -131,10 +131,12 @@ class dynaformEditor extends WebResource
{
global $G_PUBLISH;
$script = '';
/* Start Block: Load (Create if doesn't exist) the xmlform */
$Parameters = array('SYS_LANG' => SYS_LANG, 'URL' => G::encrypt($this->file, URL_KEY), 'DYN_UID' => $this->dyn_uid, 'PRO_UID' => $this->pro_uid, 'DYNAFORM_NAME' => $this->dyn_title, 'FILE' => $this->file, 'DYN_EDITOR' => $this->dyn_editor
);
$_SESSION['Current_Dynafom']['Parameters'] = $Parameters;
$XmlEditor = array('URL' => G::encrypt($this->file, URL_KEY), 'XML' => '' //$openDoc->getXml()
);
$JSEditor = array('URL' => G::encrypt($this->file, URL_KEY)
@@ -237,7 +239,11 @@ class dynaformEditor extends WebResource
leimnud.event.add(window,"load",function(){ loadEditor(); });
');
$oHeadPublisher->addScriptCode(' var jsMeta;var __usernameLogged__ = "' . (isset($_SESSION['USR_USERNAME']) ? $_SESSION['USR_USERNAME'] : '') . '";var SYS_LANG = "' . SYS_LANG . '";var __DYN_UID__ = "' . $this->dyn_uid . '";');
$oHeadPublisher->addScriptCode('var dynaformEditorParams = \'' . serialize($Parameters) . '\';');
$arrayParameterAux = $Parameters;
$arrayParameterAux["DYNAFORM_NAME"] = base64_encode($arrayParameterAux["DYNAFORM_NAME"]);
$oHeadPublisher->addScriptCode('var dynaformEditorParams = \'' . serialize($arrayParameterAux) . '\';');
G::RenderPage("publish", 'blank');
}

View File

@@ -2,7 +2,9 @@
$response = new stdclass();
$response->status = isset($_SESSION['USER_LOGGED']);
if (isset($_REQUEST['dynaformEditorParams'])) {
$_SESSION['Current_Dynafom']['Parameters'] = unserialize(stripslashes(utf8_decode(rawurldecode($_REQUEST["dynaformEditorParams"]))));
$arrayParameterAux = unserialize(rawurldecode($_REQUEST["dynaformEditorParams"]));
$arrayParameterAux["DYNAFORM_NAME"] = base64_decode($arrayParameterAux["DYNAFORM_NAME"]);
$_SESSION["Current_Dynafom"]["Parameters"] = $arrayParameterAux;
if (isset($_REQUEST['DYN_UID'])) {
$dynaform = new dynaform();