[Vtigercrm-commits] [vtiger-commits] r6001 - in /vtigercrm/trunk: Smarty/templates/ include/js/ include/utils/ modules/Emails/ modules/Emails/language/ modules/Users/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon May 15 09:41:39 EDT 2006


Author: don
Date: Mon May 15 07:41:22 2006
New Revision: 6001

Log:
email issues has been fixed

Modified:
    vtigercrm/trunk/Smarty/templates/ComposeEmail.tpl
    vtigercrm/trunk/Smarty/templates/EmailContents.tpl
    vtigercrm/trunk/Smarty/templates/EmailDetails.tpl
    vtigercrm/trunk/Smarty/templates/Emails.tpl
    vtigercrm/trunk/include/js/Mail.js
    vtigercrm/trunk/include/utils/DetailViewUtils.php
    vtigercrm/trunk/modules/Emails/DetailView.php
    vtigercrm/trunk/modules/Emails/Email.js
    vtigercrm/trunk/modules/Emails/Email.php
    vtigercrm/trunk/modules/Emails/ListView.php
    vtigercrm/trunk/modules/Emails/Save.php
    vtigercrm/trunk/modules/Emails/language/en_us.lang.php
    vtigercrm/trunk/modules/Emails/mailsend.php
    vtigercrm/trunk/modules/Users/massdelete.php

Modified: vtigercrm/trunk/Smarty/templates/ComposeEmail.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/ComposeEmail.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/ComposeEmail.tpl Mon May 15 07:41:22 2006
@@ -38,6 +38,7 @@
 <input type="hidden" name="return_action" value="{$RETURN_ACTION}">
 <input type="hidden" name="return_viewname" value="{$RETURN_VIEWNAME}">
 <input type="hidden" name="popupaction" value="create">
+<input type="hidden" name="hidden_toid">
 <table class="small" border="0" cellpadding="0" cellspacing="0" width="100%">
 <tbody>
    <tr>
@@ -58,6 +59,7 @@
 	<td class="lvtCol" style="padding: 5px;" align="right"><b>{$MOD.LBL_TO}</b></td>
 	<td class="dvtCellLabel" style="padding: 5px;">
  		<input name="{$elements.2.0}" type="hidden" value="{$IDLISTS}">
+		<input type="hidden" name="saved_toid" value="{$TO_MAIL}">
 		<textarea id="parent_name" cols="70">{$TO_MAIL}</textarea>
 	</td>
 	<td class="dvtCellLabel" style="padding: 5px;" align="left">
@@ -69,7 +71,7 @@
 		&nbsp;
 		<span class="lvtCol" style="padding: 3px;">
 		<img src="{$IMAGE_PATH}select.gif" alt="Select" title="Select" LANGUAGE=javascript onclick='return window.open("index.php?module="+ document.EditView.parent_type.value +"&action=Popup&html=Popup_picker&form=HelpDeskEditView&popuptype=set_return_emails","test","width=600,height=400,resizable=1,scrollbars=1,top=150,left=200");' align="absmiddle" style='cursor:hand;cursor:pointer'>&nbsp;
-		</span><span class="lvtCol" style="padding: 3px;"><input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.parent_id.value=''; this.form.parent_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
+		</span><span class="lvtCol" style="padding: 3px;"><input type="image" src="{$IMAGE_PATH}clear_field.gif" alt="Clear" title="Clear" LANGUAGE=javascript onClick="this.form.parent_id.value=''; this.form.hidden_toid.value='';this.form.parent_name.value=''; return false;" align="absmiddle" style='cursor:hand;cursor:pointer'>
 		</span>
 	</td>
    </tr>

Modified: vtigercrm/trunk/Smarty/templates/EmailContents.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/EmailContents.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/EmailContents.tpl Mon May 15 07:41:22 2006
@@ -13,18 +13,18 @@
 	<table class="rssTable" cellspacing="0" cellpadding="0">
         <tr>
 			<th width="5%"><input type="checkbox"  name="selectall" onClick=toggleSelect(this.checked,"selected_id")></th>
-			{foreach item=element from=$LISTHEADER}
-            <th>{$element}</th>
-			{/foreach}
+            <th width="65%">{$LISTHEADER.0}</th>
+            <th width="15%">{$LISTHEADER.1}</th>
+            <th width="15%">{$LISTHEADER.2}</th>
         </tr>
 		{foreach key=id item=row from=$LISTENTITY}
 	    <tr onmouseover="this.className='prvPrfHoverOn'" onmouseout="this.className='prvPrfHoverOff'">
 			<td>
 			<span><input type="checkbox" name="selected_id" value= '{$id}' onClick=toggleSelectAll(this.name,"selectall")>
 </span></td>
-			{foreach item=row_values from=$row}
-			<td><b>{$row_values}</b></td>
-			{/foreach}
+			<td><b>{$row.0}</b></td>
+			<td><b>{$row.1}</b></td>
+			<td><b>{$row.2}</b></td>
         </tr>
 		{/foreach}
     </table>

Modified: vtigercrm/trunk/Smarty/templates/EmailDetails.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/EmailDetails.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/EmailDetails.tpl Mon May 15 07:41:22 2006
@@ -14,19 +14,17 @@
     <td class="forwardBg">
   		<table width="100%"  border="0" cellspacing="0" cellpadding="0">
 		<tr>
-						{if $BLOCKS neq ''}
+		{if $BLOCKS neq ''}
 			<td width="75%">
-						  <input type="button" name="forward" value=" {$MOD.LBL_FORWARD_BUTTON} " class="classWebBtn" onClick=OpenCompose('{$ID}','forward')>&nbsp;
-						  <input type="button" name="Send" value=" {$MOD.LBL_SEND} " class="classWebBtn" onClick=OpenCompose('{$ID}','edit')>&nbsp;
-						{foreach item=row from=$BLOCKS}	
-						{foreach item=elements key=title from=$row}	
-						{if $title eq 'Attachment'}
-							{if $elements.value ne ''}
-								<input type="button" name="download" value=" {$MOD.LBL_DOWNLOAD_ATTCH_BUTTON} " class="classWebBtn" onclick="fnvshobj(this,'reportLay')"/>
-							{/if}
-						{/if}
-						{/foreach}
-						{/foreach}
+			  	<input type="button" name="forward" value=" {$MOD.LBL_FORWARD_BUTTON} " class="classWebBtn" onClick=OpenCompose('{$ID}','forward')>&nbsp;
+			  	<input type="button" name="Send" value=" {$MOD.LBL_SEND} " class="classWebBtn" onClick=OpenCompose('{$ID}','edit')>&nbsp;
+				{foreach item=row from=$BLOCKS}	
+				{foreach item=elements key=title from=$row}	
+					{if $title eq 'Attachment' && $elements.value != ''}
+						<input type="button" name="download" value=" {$MOD.LBL_DOWNLOAD_ATTCH_BUTTON} " class="classWebBtn" onclick="fnvshobj(this,'reportLay')"/>
+					{/if}
+				{/foreach}
+				{/foreach}
 			</td>
 						<td width="25%" align="right"><input type="button" name="Button" value=" {$APP.LBL_DELETE_BUTTON} "  class="classWebBtn" onClick="DeleteEmail('{$ID}')"/></td>
 						{else}
@@ -42,10 +40,10 @@
 	{foreach item=elements key=title from=$row}	
 		{if $title eq 'Subject'}
 		<table width="100%" border="0" cellpadding="0" cellspacing="0">
-	<tr><td width="20%" align="right"><b>{$MOD.LBL_TO}</b></td><td width="2%">&nbsp;</td><td>{$TO_MAIL}&nbsp;</td></tr>
-	<tr><td align="right">{$MOD.LBL_CC}</td><td>&nbsp;</td><td>&nbsp;{$CC_MAIL}</td></tr>
-	<tr><td align="right">{$MOD.LBL_BCC}</td><td>&nbsp;</td><td>&nbsp;{$BCC_MAIL}</td></tr>
-	<tr><td align="right"><b>{$MOD.LBL_SUBJECT}</b></td><td>&nbsp;</td><td>{$elements.value}</td></tr>
+	<tr><td width="20%" align="right" valign="top"><b>{$MOD.LBL_TO}</b></td><td width="2%">&nbsp;</td><td>{$TO_MAIL}&nbsp;</td></tr>
+	<tr><td align="right" valign="top">{$MOD.LBL_CC}</td><td>&nbsp;</td><td>{$CC_MAIL}&nbsp;</td></tr>
+	<tr><td align="right" valign="top">{$MOD.LBL_BCC}</td><td>&nbsp;</td><td>{$BCC_MAIL}&nbsp;</td></tr>
+	<tr><td align="right"><b>{$MOD.LBL_SUBJECT}</b></td><td>&nbsp;</td><td>{$elements.value}&nbsp;</td></tr>
 			<tr><td align="right" style="border-bottom:1px solid #666666;" colspan="3">&nbsp;</td></tr>
 		</table>
 		{elseif $title eq 'Description'}

Modified: vtigercrm/trunk/Smarty/templates/Emails.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/Emails.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/Emails.tpl Mon May 15 07:41:22 2006
@@ -33,20 +33,7 @@
 	ajaxObj.process("index.php?",urlstring);
 {rdelim}
 {literal}
-function DeleteEmail(id)
-{
-	if(confirm("Are you sure you want to delete ?"))
-	{	
-		show("status");
-		var ajaxObj = new Ajax(ajaxDelResponse);
-		var urlstring ="module=Users&action=massdelete&return_module=Emails&idlist="+id;
-	   	ajaxObj.process("index.php?",urlstring);
-	}
-	else
-	{
-		return false;
-	}
-}
+
 function ajaxDelResponse(response)
 {
 	hide("status");
@@ -59,6 +46,8 @@
 function ShowFolders(folderid)
 {ldelim}
     var ajaxObj = new Ajax(ajaxSaveResponse);
+	gFolderid = folderid;
+	getObj('search_text').value = '';
 	switch(folderid)
 	{ldelim}
 		case 1:
@@ -168,9 +157,12 @@
 											<td width="25%"><input type="button" name="Button2" value=" {$APP.LBL_DELETE_BUTTON}"  class="classWebBtn" onClick="return massDelete();"/> &nbsp;
 											</td>
 											<td width="75%" align="right">
-							<font color="#000000">{$APP.LBL_SEARCH}</font>&nbsp;<input type="text" name="srch" class="importBox" />&nbsp;
-											<select name="optionSel" class="importBox"><option selected>in Subject</option></select>&nbsp;
-							<input type="button" name="find" value=" {$APP.LBL_FIND_BUTTON} " class="classWebBtn" />
+							<font color="#000000">{$APP.LBL_SEARCH}</font>&nbsp;<input type="text" name="search_text" id="search_text" class="importBox" onkeyUp="Searchfn();">&nbsp;
+											<select name="search_field" id="search_field" onChange="Searchfn();" class="importBox">
+											<option value='subject'>{$MOD.LBL_IN_SUBJECT}</option>
+											<option value='user_name'>{$MOD.LBL_IN_SENDER}</option>
+											<option value='join'>{$MOD.LBL_IN_SUBJECT_OR_SENDER}</option>
+											</select>&nbsp;
 											</td>
 										</tr>
 									</table>
@@ -232,6 +224,6 @@
 			url = 'index.php?module=Emails&action=EmailsAjax&file=EditView&record='+id+'&forward=true';
 			break;
 		{rdelim}
-	openPopUp('xComposeEmail',this,url,'createemailWin',775,652,'menubar=no,toolbar=no,location=no,status=no,resizable=no');
+	openPopUp('xComposeEmail',this,url,'createemailWin',797,652,'menubar=no,toolbar=no,location=no,status=no,resizable=no');
 {rdelim}
 </script>

Modified: vtigercrm/trunk/include/js/Mail.js
==============================================================================
--- vtigercrm/trunk/include/js/Mail.js (original)
+++ vtigercrm/trunk/include/js/Mail.js Mon May 15 07:41:22 2006
@@ -103,6 +103,7 @@
 	{
 		window.opener.document.EditView.parent_id.value = window.opener.document.EditView.parent_id.value+entity_id+'@'+email_id+'|';
 		window.opener.document.EditView.parent_name.value = window.opener.document.EditView.parent_name.value+parentname+'<'+emailadd+'>; ';
+		window.opener.document.EditView.hidden_toid.value = emailadd+','+window.opener.document.EditView.hidden_toid.value;
 		window.close();
 	}else
 	{

Modified: vtigercrm/trunk/include/utils/DetailViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/DetailViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/DetailViewUtils.php Mon May 15 07:41:22 2006
@@ -258,8 +258,10 @@
 
 		//This is added to strip the crmid and _ from the file name and show the original filename
 		$org_filename = ltrim($col_fields[$fieldname],$col_fields['record_id'].'_');
-                $custfldval = '<a href = "index.php?module=uploads&action=downloadfile&return_module='.$col_fields['record_module'].'&fileid='.$attachmentid.'&entityid='.$col_fields['record_id'].'">'.$org_filename.'</a>';
-
+		if($org_filename != '')
+        	$custfldval = '<a href = "index.php?module=uploads&action=downloadfile&return_module='.$col_fields['record_module'].'&fileid='.$attachmentid.'&entityid='.$col_fields['record_id'].'">'.$org_filename.'</a>';
+		else
+			$custfldval = '';
 		$label_fld[] =$mod_strings[$fieldlabel];
 
 		$label_fld[] =$custfldval;

Modified: vtigercrm/trunk/modules/Emails/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/DetailView.php (original)
+++ vtigercrm/trunk/modules/Emails/DetailView.php Mon May 15 07:41:22 2006
@@ -45,10 +45,10 @@
 	$query = 'select from_email,to_email,cc_email,bcc_email from emaildetails where emailid ='.$focus->id;
 	$result = $adb->query($query);
     $smarty->assign('FROM_MAIL',$adb->query_result($result,0,'from_email'));	
-	$to_email = ereg_replace('###',',',$adb->query_result($result,0,'to_email'));
+	$to_email = ereg_replace('###',', ',$adb->query_result($result,0,'to_email'));
     $smarty->assign('TO_MAIL',$to_email);	
-    $smarty->assign('CC_MAIL',ereg_replace('###',',',$adb->query_result($result,0,'cc_email')));	
-    $smarty->assign('BCC_MAIL',ereg_replace('###',',',$adb->query_result($result,0,'bcc_email')));	
+    $smarty->assign('CC_MAIL',ereg_replace('###',', ',$adb->query_result($result,0,'cc_email')));	
+    $smarty->assign('BCC_MAIL',ereg_replace('###',', ',$adb->query_result($result,0,'bcc_email')));	
 	if($focus->column_fields['name'] != '')
 	        $focus->name = $focus->column_fields['name'];		
 	else

Modified: vtigercrm/trunk/modules/Emails/Email.js
==============================================================================
--- vtigercrm/trunk/modules/Emails/Email.js (original)
+++ vtigercrm/trunk/modules/Emails/Email.js Mon May 15 07:41:22 2006
@@ -8,18 +8,9 @@
  * All Rights Reserved.
  ********************************************************************************/
 
-
-function showDefaultCustomView(selectView)
-{
-		show("status");
-		var ajaxObj = new Ajax(ajaxSaveResponse);
-		var viewName = selectView.options[selectView.options.selectedIndex].value;
-		var urlstring ="module=Emails&action=EmailsAjax&file=ListView&ajax=true&viewname="+viewName;
-	    ajaxObj.process("index.php?",urlstring);
-}
+var gFolderid = 1;
 function massDelete()
 {
-
         x = document.massdelete.selected_id.length;
         idstring = "";
         if ( x == undefined)
@@ -27,7 +18,7 @@
 
                 if (document.massdelete.selected_id.checked)
                 {
-                        idstring = document.massdelete.selected_id.value+':';
+                        idstring = document.massdelete.selected_id.value;
 						xx = 1;
                 }
                 else
@@ -59,9 +50,10 @@
         }
 		if(confirm("Are you sure you want to delete the selected "+xx+" records ?"))
 		{	
+			getObj('search_text').value = '';
 			show("status");
 			var ajaxObj = new Ajax(ajaxSaveResponse);
-			var urlstring ="module=Users&action=massdelete&return_module=Emails&idlist="+idstring;
+			var urlstring ="module=Users&action=massdelete&folderid="+gFolderid+"&return_module=Emails&idlist="+idstring;
 		    ajaxObj.process("index.php?",urlstring);
 		}
 		else
@@ -69,4 +61,27 @@
 			return false;
 		}
 }
-
+function DeleteEmail(id)
+{
+	if(confirm("Are you sure you want to delete ?"))
+	{	
+		getObj('search_text').value = '';
+		show("status");
+		var ajaxObj = new Ajax(ajaxDelResponse);
+		var urlstring ="module=Users&action=massdelete&return_module=Emails&folderid="+gFolderid+"&idlist="+id;
+	   	ajaxObj.process("index.php?",urlstring);
+	}
+	else
+	{
+		return false;
+	}
+}
+function Searchfn()
+{
+	var osearch_field = document.getElementById('search_field');
+	var search_field = osearch_field.options[osearch_field.options.selectedIndex].value;
+	var search_text = document.getElementById('search_text').value;
+	var ajaxObj = new Ajax(ajaxSaveResponse);
+	var urlstring ="module=Emails&action=EmailsAjax&ajax=true&file=ListView&folderid="+gFolderid+"&search=true&search_field="+search_field+"&search_text="+search_text;
+    ajaxObj.process("index.php?",urlstring);
+}

Modified: vtigercrm/trunk/modules/Emails/Email.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/Email.php (original)
+++ vtigercrm/trunk/modules/Emails/Email.php Mon May 15 07:41:22 2006
@@ -71,7 +71,7 @@
 
 	var $column_fields = Array();
 
-	var $sortby_fields = Array('subject');
+	var $sortby_fields = Array();
 
 	//Added these variables which are used as default order by and sortorder in ListView
 	var $default_order_by = 'subject';

Modified: vtigercrm/trunk/modules/Emails/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/ListView.php (original)
+++ vtigercrm/trunk/modules/Emails/ListView.php Mon May 15 07:41:22 2006
@@ -129,21 +129,19 @@
 	$smarty->assign("ALL", 'All');
 }
 
-if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
-{
-	$where=Search($currentModule);
-	// we have a query
-	$url_string .="&query=true";
-	if (isset($_REQUEST['subject'])) $name = $_REQUEST['subject'];
-	if (isset($_REQUEST['contactname'])) $contactname = $_REQUEST['contactname'];
-	if(isset($_REQUEST['current_user_only'])) $current_user_only = $_REQUEST['current_user_only'];
-
-	$log->info("Here is the where clause for the list view: $where");
-}
-
 global $email_title;
 $display_title = $mod_strings['LBL_LIST_FORM_TITLE'];
 if($email_title)$display_title = $email_title;
+
+//to get the search field if exists
+if(isset($_REQUEST['search']) && $_REQUEST['search'] != '' && $_REQUEST['search_text'] != '')
+{
+	if($_REQUEST['search_field'] != 'join')
+		$where = $_REQUEST['search_field'].' like "%'.$_REQUEST['search_text'].'%"';	
+	else
+		$where = '(subject like "%'.$_REQUEST['search_text'].'%" OR users.user_name like "%'.$_REQUEST['search_text'].'%")';	
+}
+
 
 //Retreive the list from Database
 //<<<<<<<<<customview>>>>>>>>>

Modified: vtigercrm/trunk/modules/Emails/Save.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/Save.php (original)
+++ vtigercrm/trunk/modules/Emails/Save.php Mon May 15 07:41:22 2006
@@ -156,10 +156,20 @@
 $email_id = $return_id;
 $query = 'select emailid from emaildetails where emailid ='.$email_id;
 $result = $adb->query($query);
+if(isset($_REQUEST["hidden_toid"]) && $_REQUEST["hidden_toid"]!='')
+	$all_to_ids = ereg_replace(",","###",$_REQUEST["hidden_toid"]);
+if(isset($_REQUEST["saved_toid"]) && $_REQUEST["saved_toid"]!='')
+	$all_to_ids .= ereg_replace(",","###",$_REQUEST["saved_toid"]);
+	
+$all_cc_ids = ereg_replace(",","###",$_REQUEST["ccmail"]);
+$all_bcc_ids = ereg_replace(",","###",$_REQUEST["bccmail"]);
 if($adb->num_rows($result) > 0)
-	$query = 'update emaildetails set idlists='.$_REQUEST["parent_id"].' where emailid = '.$email_id;
-else
-	$query = 'insert into emaildetails values ('.$email_id.',"","","","","","'.$_REQUEST["parent_id"].'","SAVED")';
+{
+	$query = 'update emaildetails set to_email="'.$all_to_ids.'",cc_email="'.$all_cc_ids.'",bcc_email="'.$all_bcc_ids.'",idlists="'.$_REQUEST["parent_id"].'" where emailid = '.$email_id;
+}else
+{
+	$query = 'insert into emaildetails values ('.$email_id.',"","'.$all_to_ids.'","'.$all_cc_ids.'","'.$all_bcc_ids.'","","'.$_REQUEST["parent_id"].'","SAVED")';
+}
 $adb->query($query);	
 $focus->retrieve_entity_info($return_id,"Emails");
 

Modified: vtigercrm/trunk/modules/Emails/language/en_us.lang.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/language/en_us.lang.php (original)
+++ vtigercrm/trunk/modules/Emails/language/en_us.lang.php Mon May 15 07:41:22 2006
@@ -137,6 +137,9 @@
 'LBL_ALLMAILS'=>'All Mails',
 'LBL_TO_USERS'=>'To Users',
 'LBL_TO'=>'To:',
+'LBL_IN_SUBJECT'=>'in Subject',
+'LBL_IN_SENDER'=>'in Sender',
+'LBL_IN_SUBJECT_OR_SENDER'=>'in Subject or Sender',
 );
 
 ?>

Modified: vtigercrm/trunk/modules/Emails/mailsend.php
==============================================================================
--- vtigercrm/trunk/modules/Emails/mailsend.php (original)
+++ vtigercrm/trunk/modules/Emails/mailsend.php Mon May 15 07:41:22 2006
@@ -73,7 +73,8 @@
 {
 	$mail_status = send_mail('Emails',$to_email,$current_user->user_name,'',$_REQUEST['subject'],$_REQUEST['description'],$cc,$bcc,'all',$focus->id);
 	
-	$query = 'update emaildetails set cc_email="'.ereg_replace(',','###',$cc).'",bcc_email="'.ereg_replace(',','###',$bcc).'",assigned_user_email="'.$to_email.'",email_flag="SENT" where emailid='.$focus->id;
+	$query = 'update emaildetails set email_flag ="SENT" where emailid='.$focus->id;
+	$adb->query($query);
 	//set the errorheader1 to 1 if the mail has not been sent to the assigned to user
 	if($mail_status != 1)//when mail send fails
 	{
@@ -88,7 +89,6 @@
 	}
 	else
 	{
-		$adb->query($query);
 		$mail_status_str = $to_email."=".$mail_status."&&&";
 	}
 }
@@ -179,9 +179,6 @@
 	$date_var = date('Ymd');
 	$query = 'update activity set date_start ='.$date_var.' where activityid = '.$returnid;
 	$adb->query($query);
-	$toemails = implode('###',$all_to_emailids);
-	$query = 'update emaildetails set email_flag="SENT",to_email="'.$toemails.'" where emailid='.$focus->id;
-	$adb->query($query);
 }
 //The following function call is used to parse and form a encoded error message and then pass to result page
 $mail_error_str = getMailErrorString($mail_status_str);

Modified: vtigercrm/trunk/modules/Users/massdelete.php
==============================================================================
--- vtigercrm/trunk/modules/Users/massdelete.php (original)
+++ vtigercrm/trunk/modules/Users/massdelete.php Mon May 15 07:41:22 2006
@@ -21,7 +21,6 @@
 $returnmodule=$_REQUEST['return_module'];
 //split the string and store in an array
 $storearray = explode(";",$idlist);
-
 $ids_list = array();
 foreach($storearray as $id)
 {
@@ -48,11 +47,24 @@
 {
 	$smod = "&smodule=".$_REQUEST['smodule'];
 }
-if($returnmodule!='Faq')
+if($returnmodule == 'Emails')
+{
+	if(isset($_REQUEST['folderid']) && $_REQUEST['folderid'] != '')
+	{
+		$folderid = $_REQUEST['folderid'];
+	}else
+	{
+		$folderid = 1;
+	}
+	header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&folderid=".$folderid."&ajax=delete&file=ListView");
+}
+elseif($returnmodule!='Faq')
 {
 	header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&ajax=delete&file=ListView&viewname=".$viewid);
 }
 else
+{
 	header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&ajax=delete&file=ListView");
+}
 ?>
 





More information about the vtigercrm-commits mailing list