Changeset 13016

Show
Ignore:
Timestamp:
11/27/09 06:19:54 (4 months ago)
Author:
musavir
Message:

Modified By Bug Fix - SriPriya?
==============================

1. Fixed a issue where, Modified by information is was updated for a record, on delete or on restore.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • vtigercrm/branches/5.2.0/data/CRMEntity.php

    r12963 r13016  
    966966        */ 
    967967        function mark_deleted($id) { 
     968                global $current_user; 
    968969                $date_var = date('Y-m-d H:i:s'); 
    969                 $query = "UPDATE vtiger_crmentity set deleted=1,modifiedtime=? where crmid=?"; 
    970                 $this->db->pquery($query, array($this->db->formatDate($date_var, true),$id), true,"Error marking record deleted: "); 
     970                $query = "UPDATE vtiger_crmentity set deleted=1,modifiedtime=?,modifiedby=? where crmid=?"; 
     971                $this->db->pquery($query, array($this->db->formatDate($date_var, true),$current_user->id,$id), true,"Error marking record deleted: "); 
    971972        } 
    972973 
     
    12881289                $this->db->startTransaction();           
    12891290         
    1290                 $this->db->pquery('UPDATE vtiger_crmentity SET deleted=0 WHERE crmid = ?', array($id)); 
     1291                $date_var = date('Y-m-d H:i:s');  
     1292                $query = 'UPDATE vtiger_crmentity SET deleted=0,modifiedtime=?,modifiedby=? WHERE crmid = ?';  
     1293                $this->db->pquery($query, array($this->db->formatDate($date_var, true),$current_user->id,$id),true,"Error restoring records :" );  
    12911294                //Restore related entities/records 
    12921295                $this->restoreRelatedRecords($module,$id); 
  • vtigercrm/branches/5.2.0/modules/Invoice/Invoice.php

    r13015 r13016  
    2727require_once('include/utils/utils.php'); 
    2828require_once('user_privileges/default_module_view.php'); 
    29 require_once('modules/Emails/mail.php'); 
     29 
    3030// Account is used to store vtiger_account information. 
    3131class Invoice extends CRMEntity { 
     
    123123                //in ajax save we should not call this function, because this will delete all the existing product values 
    124124                if(isset($this->_recurring_mode) && $this->_recurring_mode == 'recurringinvoice_from_so' && isset($this->_salesorderid) && $this->_salesorderid!='') { 
     125                        // We are getting called from the RecurringInvoice cron service! 
    125126                        $this->createRecurringInvoiceFromSO(); 
    126                 } 
    127                  
    128                 else if(isset($_REQUEST)) { 
     127                         
     128                } else if(isset($_REQUEST)) { 
    129129                        if($_REQUEST['action'] != 'InvoiceAjax' && $_REQUEST['ajxaction'] != 'DETAILVIEW' && $_REQUEST['action'] != 'MassEditSave') 
    130130                        { 
     
    137137                // Update the currency id and the conversion rate for the invoice 
    138138                $update_query = "update vtiger_invoice set currency_id=?, conversion_rate=? where invoiceid=?"; 
     139                 
    139140                $update_params = array($this->column_fields['currency_id'], $this->column_fields['conversion_rate'], $this->id);  
    140141                $this->db->pquery($update_query, $update_params); 
  • vtigercrm/branches/5.2.0/modules/Invoice/Save.php

    r12876 r13016  
    2525require_once('include/logging.php'); 
    2626require_once('include/database/PearDatabase.php'); 
    27 include("modules/Emails/mail.php"); 
     27include_once("modules/Emails/mail.php"); 
    2828 
    2929$local_log =& LoggerManager::getLogger('index'); 
  • vtigercrm/branches/5.2.0/modules/Users/Users.php

    r13011 r13016  
    151151         
    152152        // This is the list of fields that are in the lists. 
    153         var $default_order_by = "depth"; 
     153        var $default_order_by = "user_name"; 
    154154        var $default_sort_order = 'ASC'; 
    155155