phpBMS

Changeset 715 for trunk

Show
Ignore:
Timestamp:
01/05/10 16:08:01 (2 years ago)
Author:
brieb
Message:
  • Oh dear, we forgot to explicitly set the base modules uuid. This would have caused lots of headaches in the future.
Location:
trunk/phpbms/install
Files:
2 modified

Legend:

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

    r703 r715  
    195195                                  ); 
    196196            $this->updateFields("invoices", $invoiceArray); 
    197              
     197 
    198198            $clientArray = array( 
    199199                                "taxareaid"         =>$this->taxList, 
     
    288288 
    289289        $queryresult = $this->db->query($querystatement); 
    290          
     290 
    291291        $initialClause = ""; 
    292          
     292 
    293293        $tablestatement = " 
    294294            SHOW FIELDS FROM 
     
    299299                `field` = 'modifieddate' 
    300300        "; 
    301          
     301 
    302302        $tableresult = $this->db->query($tablestatement); 
    303303 
     
    305305        while($tablerecord = $this->db->fetchArray($tableresult)) 
    306306            switch($tablerecord["Field"]){ 
    307                  
     307 
    308308                case "modifieddate": 
    309309                case "stamp": 
    310310                    $initialClause .= ", `".$tablerecord["Field"]."` = `".$tablerecord["Field"]."`"; 
    311311                    break; 
    312                  
     312 
    313313                default: 
    314314                    break; 
    315315            }//end switch 
    316              
     316 
    317317        while($therecord = $this->db->fetchArray($queryresult)){ 
    318318 
     
    323323                if(strpos($therecord[$key],":") === false) 
    324324                    $updateClause .= ", `".$key."` = '".$value[$therecord[$key]]."'"; 
    325              
     325 
    326326            if($updateClause){ 
    327327 
     
    336336                        `id` = ".$therecord["id"]." 
    337337                "; 
    338                  
     338 
    339339                $this->db->query($updatestatement); 
    340340 
     
    348348    /** 
    349349      *  function creatUUIDs 
    350       *   
     350      * 
    351351      *  Gives randomly created uuids to a table with $tabledefuuid (keeping 
    352352      *  the prefix in the tabledef consistent). 
    353       *   
     353      * 
    354354      *  @param string $tabledefuuid 
    355355      */ 
    356      
     356 
    357357    function createUUIDs($tabledefuuid){ 
    358358 
  • trunk/phpbms/install/updatev0.98.sql

    r714 r715  
    9797    ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
    9898--end modules ALTER-- 
     99UPDATE `modules` SET `uuid`='mod:29873ee8-c12a-e3f6-9010-4cd24174ffd7' WHERE `id`='1'; 
    99100--notes ALTER-- 
    100101ALTER TABLE `notes` ENGINE=INNODB; 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.