[Vtigercrm-commits] [vtiger-commits] r10173 - in /vtigercrm/branches/5.0.3: Smarty/templates/RelatedListContents.tpl modules/uploads/add2db.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Feb 12 04:41:36 EST 2007
Author: saraj
Date: Mon Feb 12 02:41:29 2007
New Revision: 10173
Log:
save button not shown after error message. Fixes #2869
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/RelatedListContents.tpl
vtigercrm/branches/5.0.3/modules/uploads/add2db.php
Modified: vtigercrm/branches/5.0.3/Smarty/templates/RelatedListContents.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/RelatedListContents.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/RelatedListContents.tpl Mon Feb 12 02:41:29 2007
@@ -105,7 +105,7 @@
{elseif $header eq 'Attachments'}
<input title="{$APP.LBL_ADD_NEW} {$APP.Note}" accessyKey="F" class="crmbutton small create" onclick="this.form.action.value='EditView'; this.form.return_action.value='{$return_modname}'; this.form.module.value='Notes'" type="submit" name="button" value="{$APP.LBL_ADD_NEW} {$APP.Note}">
<input type="hidden" name="fileid">
- <input title="{$APP.LBL_ADD_NEW} {$APP.LBL_ATTACHMENT}" accessyKey="F" class="crmbutton small create" onclick="window.open('index.php?module=uploads&action=uploadsAjax&file=upload&return_action={$return_modname}&return_module={$MODULE}&return_id={$ID}','Attachments','width=500,height=300');" type="button" name="button" value="{$APP.LBL_ADD_NEW} {$APP.LBL_ATTACHMENT}"></td>
+ <input title="{$APP.LBL_ADD_NEW} {$APP.LBL_ATTACHMENT}" accessyKey="F" class="crmbutton small create" onclick="window.open('index.php?module=uploads&action=uploadsAjax&file=upload&return_action={$return_modname}&return_module={$MODULE}&return_id={$ID}','Attachments','width=500,height=370');" type="button" name="button" value="{$APP.LBL_ADD_NEW} {$APP.LBL_ATTACHMENT}"></td>
{elseif $header eq 'Quotes'}
<input title="{$APP.LBL_ADD_NEW} {$APP.Quote}" accessyKey="F" class="crmbutton small create" onclick="this.form.action.value='EditView';this.form.module.value='Quotes'" type="submit" name="button" value="{$APP.LBL_ADD_NEW} {$APP.Quote}"></td>
{elseif $header eq 'Invoice'}
Modified: vtigercrm/branches/5.0.3/modules/uploads/add2db.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/uploads/add2db.php (original)
+++ vtigercrm/branches/5.0.3/modules/uploads/add2db.php Mon Feb 12 02:41:29 2007
@@ -22,7 +22,6 @@
//fix for space in file name.
$_FILES['filename']['name'] = preg_replace('/\s+/', '_', $_FILES['filename']['name']);
-
// Arbitrary File Upload Vulnerability fix - Philip
$binFile = $_FILES['filename']['name'];
@@ -100,7 +99,6 @@
# DG 19 June 2006
# Strip out single quotes from filenames
$filename = preg_replace('/\'/', '', $filename);
-
$sql = "insert into vtiger_attachments values(";
$sql .= $current_id.",'".$filename."','".$description."','".$filetype."','".$upload_filepath."')";
$result = $adb->query($sql);
@@ -129,8 +127,7 @@
<li><font color='red'>Invalid file OR</font>
<li><font color='red'>File has no data</font>
</ul></B></font> <br>" ;
- echo $errormessage;
- include "upload.php";
+ header("Location: index.php?module=uploads&action=uploadsAjax&msg=true&file=upload&errormessage=".$errormessage);
}
}
else
More information about the vtigercrm-commits
mailing list