phpBMS

Changeset 710 for trunk/phpbms/include

Show
Ignore:
Timestamp:
01/04/10 13:22:31 (2 years ago)
Author:
nate
Message:
  • Changed imports to incorporate changes made to tables.php (as a result of uuids).
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/include/imports.php

    r704 r710  
    108108                //DO NOT CALL IN TRANSACTION 
    109109                function _storeTempCSV($fileName){ 
    110  
     110                         
    111111                        $querystatement = " 
    112112                                INSERT INTO 
    113113                                        `files` 
    114114                                        ( 
     115                                                `uuid`, 
    115116                                                `name`, 
    116117                                                `description`, 
     
    124125                                        VALUES 
    125126                                        ( 
     127                                                '".uuid(getUuidPrefix($this->table->db, "tbld:80b4f38d-b957-bced-c0a0-ed08a0db6475"))."', 
    126128                                                'temporary', 
    127129                                                'This is a temporary import file', 
    128130                                                '".$this->_getFile($fileName)."', 
    129131                                                'phpbms/temp', 
    130                                                 '-100', 
     132                                                'Admin', 
    131133                                                NOW(), 
    132134                                                '".$_SESSION["userinfo"]["id"]."', 
     
    253255                                                if($rowFieldNum == $fieldNum){ 
    254256                                                        $verify = $this->table->verifyVariables($trimmedRowData); 
    255                                                         if(!count($verify)) 
    256                                                                 $theid = $this->table->insertRecord($trimmedRowData, NULL, true); 
     257                                                        if(!count($verify)){ 
     258                                                                $createdby = NULL; 
     259                                                                $overrideID = true; 
     260                                                                $replace = false; 
     261                                                                if(!isset($trimmedRowData["uuid"])){ 
     262                                                                        $useUuid = true; 
     263                                                                        $thereturn = $this->table->insertRecord($trimmedRowData, $createdby, $overrideID, $replace, $useUuid); 
     264                                                                        $theid = $thereturn["id"]; 
     265                                                                }else{ 
     266                                                                        $useUuid = false; 
     267                                                                        $thereturn = $this->table->insertRecord($trimmedRowData, $createdby, $overrideID, $replace, $useUuid); 
     268                                                                        $theid = $thereturn; 
     269                                                                } 
     270                                                        }//end if 
    257271                                                }else 
    258272                                                        $this->error .= '<li> incorrect amount of fields for line number '.$rowNum.'.</li>'; 
     
    476490                                        <input id="cancelButton<?php echo $ids?>" name="command" type="submit" value="cancel" class="Buttons" <?php if($ids==1) {?>accesskey="x" <?php }?> title="(access key+x)" /> 
    477491                                        <?php }else{?> 
    478                                         <input type="submit" class="Buttons" value="import" name="command" id="import<?php echo $ids?>" title="commit" <?php echo ($numberOfRecords? '':'disabled="disabled"') ?>/> 
    479                                         <input type="submit" class="Buttons" value="cancel" name="command" id="cancelButton<?php echo $ids?>" title="rollback"/> 
     492                                        <input type="submit" class="Buttons" value="import" name="command" id="import<?php echo $ids?>" title="commit" <?php if($ids==1) {?>accesskey="i"<?php }?> <?php echo ($numberOfRecords? '':'disabled="disabled"') ?>/> 
     493                                        <input type="submit" class="Buttons" value="cancel" name="command" id="cancelButton<?php echo $ids?>" <?php if($ids==1) {?>accesskey="x"<?php }?> title="rollback"/> 
    480494                                        <?php }//end if ?> 
    481495                                </div><?php 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.