navigation  interaction  search

 other resources

Changeset 370

Show
Ignore:
Timestamp:
12/03/07 10:26:25
Author:
brieb
Message:
  • Fixed colon substitution problem with invoice line items.
  • Attempted fix of escaping characters correctly.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phpbms/include/common_functions.php

    r369 r370  
    489489 
    490490function addSlashesToArray($thearray){ 
    491         if(get_magic_quotes_runtime() || get_magic_quotes_gpc()) 
     491 
     492        //This function prepares an array for SQL manipulation. 
     493         
     494        if(get_magic_quotes_runtime() || get_magic_quotes_gpc()){ 
     495         
    492496                foreach ($thearray as $key=>$value)  
    493497                        if(is_array($value)) 
    494498                                $thearray[$key]= addSlashesToArray($value); 
    495499                        else 
    496                                 $thearray[$key] = stripslashes($value); 
    497          
    498         foreach ($thearray as $key=>$value) 
    499                 if(!is_array($value)) 
    500                         $thearray[$key] = mysql_real_escape_string($value); 
     500                                $thearray[$key] = mysql_real_escape_string(stripslashes($value)); 
     501                                 
     502        } else   
     503                foreach ($thearray as $key=>$value) 
     504                        if(is_array($value)) 
     505                                $thearray[$key]= addSlashesToArray($value);                              
     506                        else 
     507                                $thearray[$key] = mysql_real_escape_string($value); 
    501508         
    502509        return $thearray; 
    503 
     510         
     511}//end function 
     512 
    504513 
    505514function htmlQuotes($string){ 
  • trunk/phpbms/modules/bms/javascript/invoice.js

    r367 r370  
    779779                         
    780780                        thelist +=      productid.value + "::" +  
    781                                                 memo.value.replace(/[(::)(;;)]/g,"-") + "::" + 
     781                                                memo.value.replace(/::|;;/g,"-") + "::" + 
    782782                                                taxable.value + "::" + 
    783783                                                unitweight.value + "::" + 
Copyright © 2006-2007 Kreotek, LLC. All Rights reserved.