From 4b57f2321a409d0ae4564187655442eea5bbea20 Mon Sep 17 00:00:00 2001 From: Julian Egelstaff Date: Sun, 20 Oct 2024 14:20:49 -0400 Subject: [PATCH] Patch bug fixes --- modules/formulize/admin/formindex.php | 7 ++++++- modules/formulize/class/forms.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/formulize/admin/formindex.php b/modules/formulize/admin/formindex.php index f9e73073d..1ee5a7127 100644 --- a/modules/formulize/admin/formindex.php +++ b/modules/formulize/admin/formindex.php @@ -729,6 +729,7 @@ function patch40() { // copy the contents of custom_code to code // then renmove custom_code $files = scandir(XOOPS_ROOT_PATH.'/modules/formulize/custom_code'); + mkdir(XOOPS_ROOT_PATH.'/modules/formulize/code'); foreach ($files as $file) { if ($file !== '.' && $file !== '..') { $sourceFile = XOOPS_ROOT_PATH.'/modules/formulize/custom_code/'.$file; @@ -802,7 +803,11 @@ function patch40() { exit("Error detecting procedures to convert to files. SQL dump:
".$formProceduresSQL."
".$xoopsDB->error()."
Please contact info@formulize.org for assistance."); } - $customButtonCodeSQL = "SELECT `screen_handle`, `customactions` FROM ".$xoopsDB->prefix('formulize_screen_listofentries')." WHERE customactions LIKE '%\"custom_code\";%' OR customactions LIKE '%\"custom_html\";%'"; + $customButtonCodeSQL = "SELECT s.`screen_handle`, l.`customactions` + FROM ".$xoopsDB->prefix('formulize_screen_listofentries')." AS l + LEFT JOIN ".$xoopsDB->prefix('formulize_screen')." AS s + ON l.sid = s.sid + WHERE l.customactions LIKE '%\"custom_code\";%' OR customactions LIKE '%\"custom_html\";%'"; if($res = $xoopsDB->query($customButtonCodeSQL)) { // loop through the results... while($record = $xoopsDB->fetchArray($res)) { diff --git a/modules/formulize/class/forms.php b/modules/formulize/class/forms.php index 00fa98681..9ccdbf5ac 100755 --- a/modules/formulize/class/forms.php +++ b/modules/formulize/class/forms.php @@ -519,7 +519,7 @@ public function getVar($key, $format = 's') { OR $key == 'on_delete' OR $key == 'custom_edit_check') { $contents = ''; - if(is_numeric($this->getVar('fid'))) { + if(is_numeric($this->getVar('id_form'))) { $form_handle = $this->getVar('form_handle'); $filename=XOOPS_ROOT_PATH."/modules/formulize/code/".$key."_".$form_handle.".php"; if(file_exists($filename)) {