From: <ok...@us...> - 2003-01-05 18:40:17
|
Update of /cvsroot/xoops/xoops2/modules/system/admin/modulesadmin In directory sc8-pr-cvs1:/tmp/cvs-serv22195/modules/system/admin/modulesadmin Modified Files: main.php modulesadmin.php Log Message: fixed module install bug Index: main.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/system/admin/modulesadmin/main.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.php 2 Jan 2003 20:11:49 -0000 1.1 --- main.php 5 Jan 2003 18:40:14 -0000 1.2 *************** *** 289,297 **** } } ! $tplfile->setVar('tpl_source', addslashes($tpldata)); $tplfile->setVar('tpl_module', $dirname); $tplfile->setVar('tpl_themeset', 'default'); ! $tplfile->setVar('tpl_file', $tpl['file']); ! $tplfile->setVar('tpl_desc', addslashes($tpl['description'])); $newid = $tplfile_handler->insert($tplfile); if (!$newid) { --- 289,297 ---- } } ! $tplfile->setVar('tpl_source', $tpldata, true); $tplfile->setVar('tpl_module', $dirname); $tplfile->setVar('tpl_themeset', 'default'); ! $tplfile->setVar('tpl_file', $tpl['file'], true); ! $tplfile->setVar('tpl_desc', $tpl['description'], true); $newid = $tplfile_handler->insert($tplfile); if (!$newid) { *************** *** 355,360 **** $tplfile =& $tplfile_handler->find('default', 'block', $fblock['bid']); if (is_array($tplfile)) { ! $tplfile[0]->setVar('tpl_source', addslashes($content)); ! $tplfile[0]->setVar('tpl_desc', addslashes($blocks[$i]['description'])); $tplfile[0]->setVar('tpl_lastmodified', time()); $tplfile[0]->setVar('tpl_lastimported', time()); --- 355,360 ---- $tplfile =& $tplfile_handler->find('default', 'block', $fblock['bid']); if (is_array($tplfile)) { ! $tplfile[0]->setVar('tpl_source', $content, true); ! $tplfile[0]->setVar('tpl_desc', $blocks[$i]['description'], true); $tplfile[0]->setVar('tpl_lastmodified', time()); $tplfile[0]->setVar('tpl_lastimported', time()); *************** *** 391,401 **** $tplfile->setVar('tpl_module', $dirname); $tplfile->setVar('tpl_refid', $newbid); ! $tplfile->setVar('tpl_source', addslashes($content)); $tplfile->setVar('tpl_themeset', 'default'); ! $tplfile->setVar('tpl_file', $blocks[$i]['template']); $tplfile->setVar('tpl_type', 'block'); $tplfile->setVar('tpl_lastimported', time()); $tplfile->setVar('tpl_lastmodified', time()); ! $tplfile->setVar('tpl_desc', addslashes($blocks[$i]['description'])); $newid = $tplfile_handler->insert($tplfile); if (!$newid) { --- 391,401 ---- $tplfile->setVar('tpl_module', $dirname); $tplfile->setVar('tpl_refid', $newbid); ! $tplfile->setVar('tpl_source', $content, true); $tplfile->setVar('tpl_themeset', 'default'); ! $tplfile->setVar('tpl_file', $blocks[$i]['template'], true); $tplfile->setVar('tpl_type', 'block'); $tplfile->setVar('tpl_lastimported', time()); $tplfile->setVar('tpl_lastmodified', time()); ! $tplfile->setVar('tpl_desc', $blocks[$i]['description'], true); $newid = $tplfile_handler->insert($tplfile); if (!$newid) { Index: modulesadmin.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/system/admin/modulesadmin/modulesadmin.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** modulesadmin.php 2 Jan 2003 20:11:49 -0000 1.1 --- modulesadmin.php 5 Jan 2003 18:40:14 -0000 1.2 *************** *** 234,243 **** $tplfile =& $tplfile_handler->create(); $tpldata =& xoops_module_gettemplate($dirname, $tpl['file']); ! $tplfile->setVar('tpl_source', addslashes($tpldata)); $tplfile->setVar('tpl_refid', $newmid); $tplfile->setVar('tpl_themeset', 'default'); $tplfile->setVar('tpl_file', $tpl['file']); ! $tplfile->setVar('tpl_desc', addslashes($tpl['description'])); $tplfile->setVar('tpl_module', $dirname); $tplfile->setVar('tpl_lastmodified', time()); --- 234,243 ---- $tplfile =& $tplfile_handler->create(); $tpldata =& xoops_module_gettemplate($dirname, $tpl['file']); ! $tplfile->setVar('tpl_source', $tpldata, true); $tplfile->setVar('tpl_refid', $newmid); $tplfile->setVar('tpl_themeset', 'default'); $tplfile->setVar('tpl_file', $tpl['file']); ! $tplfile->setVar('tpl_desc', $tpl['description'], true); $tplfile->setVar('tpl_module', $dirname); $tplfile->setVar('tpl_lastmodified', time()); *************** *** 299,308 **** $tplfile =& $tplfile_handler->create(); $tplfile->setVar('tpl_refid', $newbid); ! $tplfile->setVar('tpl_source', addslashes($content)); $tplfile->setVar('tpl_themeset', 'default'); $tplfile->setVar('tpl_file', $block['template']); $tplfile->setVar('tpl_module', $dirname); $tplfile->setVar('tpl_type', 'block'); ! $tplfile->setVar('tpl_desc', addslashes($block['description'])); $tplfile->setVar('tpl_lastimported', time()); $tplfile->setVar('tpl_lastmodified', time()); --- 299,308 ---- $tplfile =& $tplfile_handler->create(); $tplfile->setVar('tpl_refid', $newbid); ! $tplfile->setVar('tpl_source', $content, true); $tplfile->setVar('tpl_themeset', 'default'); $tplfile->setVar('tpl_file', $block['template']); $tplfile->setVar('tpl_module', $dirname); $tplfile->setVar('tpl_type', 'block'); ! $tplfile->setVar('tpl_desc', $block['description'], true); $tplfile->setVar('tpl_lastimported', time()); $tplfile->setVar('tpl_lastmodified', time()); *************** *** 336,344 **** $confobj->setVar('conf_catid', 0); $confobj->setVar('conf_name', $config['name']); ! $confobj->setVar('conf_title', $config['title']); ! $confobj->setVar('conf_desc', $config['description']); $confobj->setVar('conf_formtype', $config['formtype']); $confobj->setVar('conf_valuetype', $config['valuetype']); ! $confobj->setVar('conf_value', $config['default']); $confobj->setVar('conf_order', $order); $confop_msgs = ''; --- 336,344 ---- $confobj->setVar('conf_catid', 0); $confobj->setVar('conf_name', $config['name']); ! $confobj->setVar('conf_title', $config['title'], true); ! $confobj->setVar('conf_desc', $config['description'], true); $confobj->setVar('conf_formtype', $config['formtype']); $confobj->setVar('conf_valuetype', $config['valuetype']); ! $confobj->setVar('conf_value', $config['default'], true); $confobj->setVar('conf_order', $order); $confop_msgs = ''; *************** *** 346,351 **** foreach ($config['options'] as $key => $value) { $confop =& $config_handler->createConfigOption(); ! $confop->setVar('confop_name', $key); ! $confop->setVar('confop_value', $value); $confobj->setConfOptions($confop); $confop_msgs .= '<br /> Config option added. Name: <b>'.$key.'</b> Value: <b>'.$value.'</b>'; --- 346,351 ---- foreach ($config['options'] as $key => $value) { $confop =& $config_handler->createConfigOption(); ! $confop->setVar('confop_name', $key, true); ! $confop->setVar('confop_value', $value, true); $confobj->setConfOptions($confop); $confop_msgs .= '<br /> Config option added. Name: <b>'.$key.'</b> Value: <b>'.$value.'</b>'; |