phpBMS

Changeset 698 for trunk

Show
Ignore:
Timestamp:
12/31/09 16:28:12 (2 years ago)
Author:
nate
Message:
  • Removed unused function in bms/install/update.php
  • Fixed aritem relatedid update in generateuuids.php
  • Fixed sql statement in aritems.php
Location:
trunk/phpbms
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/install/generateuuids.php

    r659 r698  
    5151    var $tabledefList; 
    5252    var $moduleList; 
     53    var $receiptList; 
     54    var $invoiceList; 
    5355 
    5456 
     
    116118 
    117119            $this->aritemList = $this->generateUUIDList("aritems"); 
    118             $this->recieptList = $this->generateUUIDList("reciepts"); 
     120            $this->receiptList = $this->generateUUIDList("receipts"); 
    119121            $this->productsList = $this->generateUUIDList("products"); 
    120122            $this->addressList = $this->generateUUIDList("addresses"); 
     
    211213            $this->updateFields("aritems", array("clientid"=>$this->clientList)); 
    212214            $this->updateFields("prerequisites", array("parentid"=>$this->productList, "childid"=>$this->productList)); 
    213             $this->updateAritems("clientemailprojects", array("userid"=>$this->userList)); 
     215            $this->updateFields("clientemailprojects", array("userid"=>$this->userList)); 
    214216 
    215217            //we would have to run this if their were addresses associated with other records 
     
    459461 
    460462                case "credit": 
    461  
    462463                    $oldRelatedid = $therecord["relatedid"]; 
    463464                    $updatestatement = " 
     
    465466                            `aritems` 
    466467                        SET 
    467                             `relatedid`='".$this->recieptList[$oldRelatedid]."' 
     468                            `relatedid`='".$this->receiptList[$oldRelatedid]."' 
    468469                        WHERE 
    469470                            `relatedid` = '".$oldRelatedid."' 
     
    482483                            `aritems` 
    483484                        SET 
    484                             `relatedid`='".$this->recieptList[$oldRelatedid]."' 
     485                            `relatedid`='".$this->invoiceList[$oldRelatedid]."' 
    485486                        WHERE 
    486487                            `relatedid` = '".$oldRelatedid."' 
  • trunk/phpbms/modules/bms/include/aritems.php

    r610 r698  
    121121                        if($this->aritem["type"] == "deposit") 
    122122                                $querystatement.=" 
    123                                         AND receipts.uuid != ".mysql_real_escape_string($this->aritem["relatedid"]); 
     123                                        AND receipts.uuid != '".mysql_real_escape_string($this->aritem["relatedid"])."'"; 
    124124 
    125125                        $querystatement.= 
  • trunk/phpbms/modules/bms/install/update.php

    r547 r698  
    447447        }//end function v098UpdatePostingSession 
    448448 
    449         /** 
    450          * function v098UpdateProducts 
    451          * Updates the categoryid field from the category's id to uuid. 
    452          */ 
    453  
    454         function v098UpdateProducts() { 
    455  
    456                 $querystatement = " 
    457                         SELECT 
    458                                 `id`, 
    459                                 `uuid` 
    460                         FROM 
    461                                 `productcategories` 
    462                         "; 
    463  
    464                 $queryresult = $this->db->query($querystatement); 
    465  
    466                 while($therecord = $this->db->fetchArray($queryresult)){ 
    467  
    468                         $id = $therecord["id"]; 
    469                         $uuid = $therecord["uuid"]; 
    470  
    471                         $updatestatement = " 
    472                                 UPDATE 
    473                                         `products` 
    474                                 SET 
    475                                         `categoryid`='".$uuid."' 
    476                                 WHERE 
    477                                         `categoryid`='".$id."' 
    478                                 "; 
    479  
    480                         $this->db->query($updatestatement); 
    481  
    482                 }//end while 
    483  
    484         }//end method --v098UpdateProducts00 
    485  
    486449}//end class updateBMS 
    487450 
  • trunk/phpbms/modules/bms/install/updatev0.98.sql

    r695 r698  
    750750--end tablegroupings UPDATE-- 
    751751--tableoptions DELETE-- 
    752 DELETE FROM `tableoptions WHERE `name`='massEmail'; 
     752DELETE FROM `tableoptions` WHERE `name`='massEmail'; 
    753753--end tableoptions DELETe 
    754754--tableoptions INSERT-- 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.