Changeset 26 for lists/SystemListItem.php
- Timestamp:
- Dec 4, 2008, 12:31:09 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lists/SystemListItem.php
r23 r26 3 3 class ListSystemListItem 4 4 { 5 function RebuildOrder() 6 { 7 global $Database; 8 9 $Database->query('UPDATE SystemListItem AS Table1 SET Sequence = (SELECT COUNT(*) FROM (SELECT * FROM SystemListItem) AS Table2 WHERE (Table1.ItemId = Table2.ItemId) AND ((Table2.Sequence < Table1.Sequence) OR ((Table1.Sequence = Table2.Sequence) AND (Table2.Id < Table1.Id))))'); 10 } 11 5 12 function OnAdd($Parameters) 6 13 { … … 16 23 $Database->query('ALTER TABLE `'.$DbRow2['TableName'].'` ADD `'.$Parameters['Name'].'` '.$DbRow['DbDataType'].' NOT NULL ;'); 17 24 //echo($Database->LastQuery); 25 26 $this->RebuildOrder(); 27 } 28 29 function OnEdit($Parameters) 30 { 31 $this->RebuildOrder(); 32 } 33 34 function OnDelete($Parameters) 35 { 36 $this->RebuildOrder(); 18 37 } 19 38 }
Note:
See TracChangeset
for help on using the changeset viewer.