phpBMS

Changeset 559 for trunk/phpbms/install

Show
Ignore:
Timestamp:
06/02/09 17:03:56 (3 years ago)
Author:
brieb
Message:
  • fixed saved searches and sorts to use uuids
  • fixed snapshot uuid mishaps
  • fixed tablecolumns insert/updates not working
Location:
trunk/phpbms/install
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/install/createtables.sql

    r557 r559  
    274274  sqlclause text, 
    275275  type char(3) NOT NULL default 'SCH', 
    276   roleid varchar(64) NOT NULL, 
     276  roleid varchar(64), 
    277277  PRIMARY KEY  (id), 
    278278  KEY tabledefid (tabledefid), 
  • trunk/phpbms/install/generateuuids.php

    r553 r559  
    110110        //$this->updateFields("tabledefs", array("moduleid"=>$this->moduleList, "editroleid"=>$this->roleList, "addroleid"=>$this->roleList, "searchroleid"=>$this->roleList, "advsearchroleid"=>$this->roleList, "viewsqlroleid"=>$this->roleList)); 
    111111        //$this->updateFields("tablesearchablefields", array("tabledefid"=>$this->tabledefList)); 
     112        //$this->updateFields("usersearches", array("tabledefid"=>$this->tabledefList, "userid"=>$this->userList, "roleid"=>$this->roleList)); 
     113 
     114        $this->updateMenuLinks(); 
     115 
     116        // ====== 
     117        // This stuff probably won't be needed as they will be done during the update 
     118        //$this->updateFields("widgets", array("moduleid"=>$this->moduleList, "roleid"=>$this->roleList)); 
    112119 
    113120        return $this->returnJSON(true, "UUID's Generated"); 
     
    175182                "; 
    176183 
    177 //echo $updatestatement."<br />"; 
     184                $updatestatement."<br />"; 
    178185                $this->db->query($updatestatement); 
    179186 
     
    230237 
    231238 
     239    function updateMenuLinks(){ 
     240 
     241        $querystatement = " 
     242            SELECT 
     243                `id`, 
     244                `link` 
     245            FROM 
     246                `menu` 
     247            WHERE 
     248                `link` LIKE 'search.php?id=%'"; 
     249 
     250        $queryresult = $this->db->query($querystatement); 
     251 
     252        while($therecord = $this->db->fetchArray($queryresult)){ 
     253 
     254            $id = substr($therecord["link"], 14); 
     255 
     256            $updatestatement = " 
     257                UPDATE 
     258                    `menu` 
     259                SET 
     260                    `link` = 'search.php?id=".urlencode($this->tabledefList[$id])."' 
     261                WHERE 
     262                    `id` = ".$therecord["id"]; 
     263 
     264            $this->db->query($updatestatement); 
     265 
     266        }//endwhile 
     267 
     268 
     269    }//end function updateMenuLinks 
     270 
     271 
    232272}//end class updateAjax 
    233273 
  • trunk/phpbms/install/updatev0.98.sql

    r557 r559  
    228228    ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`, 
    229229    MODIFY `tabledefid` VARCHAR(64) NOT NULL, 
     230    MODIFY `roleid` VARCHAR(64), 
    230231    MODIFY `userid` VARCHAR(64) NOT NULL; 
    231232--end usersearches ALTER-- 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.