From: <ok...@us...> - 2003-01-05 18:44:49
|
Update of /cvsroot/xoops/xoops2/modules/system/admin/themes In directory sc8-pr-cvs1:/tmp/cvs-serv23666/modules/system/admin/themes Modified Files: main.php Log Message: fix for addslashes problem Index: main.php =================================================================== RCS file: /cvsroot/xoops/xoops2/modules/system/admin/themes/main.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.php 2 Jan 2003 20:15:30 -0000 1.1 --- main.php 5 Jan 2003 18:44:46 -0000 1.2 *************** *** 673,677 **** } else { $fp = @fopen($uploader->getSavedDestination(), 'rb'); ! $image->setVar('imgsetimg_body', addslashes(@fread($fp, filesize($uploader->getSavedDestination())))); @fclose($fp); if ($themeset != $xoopsConfig['default_theme']) { --- 673,677 ---- } else { $fp = @fopen($uploader->getSavedDestination(), 'rb'); ! $image->setVar('imgsetimg_body', @fread($fp, filesize($uploader->getSavedDestination())), true); @fclose($fp); if ($themeset != $xoopsConfig['default_theme']) { *************** *** 745,749 **** $err[] = 'Could not read '.$uploader->getSavedFileName(); } else { ! $image->setVar('imgsetimg_body', addslashes(@fread($fp, filesize($uploader->getSavedDestination())))); @fclose($fp); if ($themeset != $xoopsConfig['default_theme']) { --- 745,749 ---- $err[] = 'Could not read '.$uploader->getSavedFileName(); } else { ! $image->setVar('imgsetimg_body', @fread($fp, filesize($uploader->getSavedDestination())), true); @fclose($fp); if ($themeset != $xoopsConfig['default_theme']) { *************** *** 914,918 **** $fsource = @fread($fp, filesize($uploader->getSavedDestination())); @fclose($fp); ! $tpl->setVar('tpl_source', addslashes($fsource)); @unlink($uploader->getSavedDestination()); if (!$tplfile_handler->insert($tpl)) { --- 914,918 ---- $fsource = @fread($fp, filesize($uploader->getSavedDestination())); @fclose($fp); ! $tpl->setVar('tpl_source', $fsource, true); @unlink($uploader->getSavedDestination()); if (!$tplfile_handler->insert($tpl)) { *************** *** 976,980 **** $fsource = @fread($fp, filesize($uploader->getSavedDestination())); @fclose($fp); ! $tpl->setVar('tpl_source', addslashes($fsource)); @unlink($uploader->getSavedDestination()); $newid = $tplfile_handler->insert($tpl); --- 976,980 ---- $fsource = @fread($fp, filesize($uploader->getSavedDestination())); @fclose($fp); ! $tpl->setVar('tpl_source', $fsource, true); @unlink($uploader->getSavedDestination()); $newid = $tplfile_handler->insert($tpl); *************** *** 1345,1349 **** $newtpl->setVar('tpl_id', 0); $newtpl->setVar('tpl_themeset', $themeset_name); ! $newtpl->setVar('tpl_source', addslashes($info['file'])); $newtpl->setVar('tpl_lastmodified', time()); if (!$tplfile_handler->insert($newtpl)) { --- 1345,1349 ---- $newtpl->setVar('tpl_id', 0); $newtpl->setVar('tpl_themeset', $themeset_name); ! $newtpl->setVar('tpl_source', $info['file'], true); $newtpl->setVar('tpl_lastmodified', time()); if (!$tplfile_handler->insert($newtpl)) { *************** *** 1376,1380 **** $image->setVar('imgsetimg_file', $themeimages[$i]['name']); $image->setVar('imgsetimg_imgset', $newimgsetid); ! $image->setVar('imgsetimg_body', addslashes($themeimages[$i]['content'])); $newimgid = $image_handler->insert($image); if (!$newimgid) { --- 1376,1380 ---- $image->setVar('imgsetimg_file', $themeimages[$i]['name']); $image->setVar('imgsetimg_imgset', $newimgsetid); ! $image->setVar('imgsetimg_body', $themeimages[$i]['content'], true); $newimgid = $image_handler->insert($image); if (!$newimgid) { *************** *** 1480,1484 **** $fsource = @fread($fp, filesize($uploader->getSavedDestination())); @fclose($fp); ! $tpl->setVar('tpl_source', addslashes($fsource)); @unlink($uploader->getSavedDestination()); $newid = $tplfile_handler->insert($tpl); --- 1480,1484 ---- $fsource = @fread($fp, filesize($uploader->getSavedDestination())); @fclose($fp); ! $tpl->setVar('tpl_source', $fsource, true); @unlink($uploader->getSavedDestination()); $newid = $tplfile_handler->insert($tpl); |