ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
April 2009
----- 2025 -----
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
25 participants
476 discussions
Start a n
N
ew thread
[cgutman] 40431: - Fix a very old bug (since r11789) which causes miniport drivers that call NdisMTranferDataComplete to fail
by cgutman@svn.reactos.org
Author: cgutman Date: Thu Apr 9 23:43:16 2009 New Revision: 40431 URL:
http://svn.reactos.org/svn/reactos?rev=40431&view=rev
Log: - Fix a very old bug (since r11789) which causes miniport drivers that call NdisMTranferDataComplete to fail Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Thu Apr 9 23:43:16 2009 @@ -425,10 +425,11 @@ AdapterBinding = (PADAPTER_BINDING)Packet->Reserved[0]; KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); - (*AdapterBinding->ProtocolBinding->Chars.SendCompleteHandler)( + (*AdapterBinding->ProtocolBinding->Chars.TransferDataCompleteHandler)( AdapterBinding->NdisOpenBlock.ProtocolBindingContext, Packet, - Status); + Status, + BytesTransferred); KeLowerIrql(OldIrql); }
16 years, 1 month
1
0
0
0
[fireball] 40430: - Make it possible to assign drive letters to all partitions, not only to the first partition of a primary partition table. - Make AssignDriveLetters in partlist.c to actually assign drive letters to all partitions found (the list corresponds to how Windows 2003 install CD assign driver letters, but more investigation would not hurt). - Make CheckActiveBootPartition actually search for partition with a boot flag, instead of hardcoding it to partition 0 of disk 0. - Fix SetMount
by fireball@svn.reactos.org
Author: fireball Date: Thu Apr 9 22:59:28 2009 New Revision: 40430 URL:
http://svn.reactos.org/svn/reactos?rev=40430&view=rev
Log: - Make it possible to assign drive letters to all partitions, not only to the first partition of a primary partition table. - Make AssignDriveLetters in partlist.c to actually assign drive letters to all partitions found (the list corresponds to how Windows 2003 install CD assign driver letters, but more investigation would not hurt). - Make CheckActiveBootPartition actually search for partition with a boot flag, instead of hardcoding it to partition 0 of disk 0. - Fix SetMountedDeviceValues to take multiple partitions in a partition table into account. - Fix Select Partition, Format Partition, Check File System, Delete Partition interface page to take partition number into account. - IMPORTANT: Create/Delete partitions must not be used to repartition the harddrive! They can only be used to create/delete an initial primary partition on a clean harddisk. Modified: trunk/reactos/base/setup/usetup/interface/usetup.c trunk/reactos/base/setup/usetup/partlist.c trunk/reactos/base/setup/usetup/partlist.h Modified: trunk/reactos/base/setup/usetup/interface/usetup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
============================================================================== --- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Thu Apr 9 22:59:28 2009 @@ -1812,6 +1812,7 @@ ULONGLONG PartSize; PCHAR Unit; PCHAR PartType; + UCHAR PartNumber; if (PartitionList == NULL || PartitionList->CurrentDisk == NULL || @@ -1823,6 +1824,7 @@ DiskEntry = PartitionList->CurrentDisk; PartEntry = PartitionList->CurrentPartition; + PartNumber = PartitionList->CurrentPartitionNumber; MUIDisplayPage(DELETE_PARTITION_PAGE); @@ -1834,44 +1836,44 @@ } else if (PartEntry->Unpartitioned == FALSE) { - if ((PartEntry->PartInfo[0].PartitionType == PARTITION_FAT_12) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_FAT_16) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_HUGE) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_XINT13)) + if ((PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT_12) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT_16) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_HUGE) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_XINT13)) { PartType = "FAT"; } - else if ((PartEntry->PartInfo[0].PartitionType == PARTITION_FAT32) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_FAT32_XINT13)) + else if ((PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT32) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT32_XINT13)) { PartType = "FAT32"; } - else if (PartEntry->PartInfo[0].PartitionType == PARTITION_EXT2) + else if (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_EXT2) { PartType = "EXT2"; } - else if (PartEntry->PartInfo[0].PartitionType == PARTITION_IFS) + else if (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_IFS) { PartType = "NTFS"; /* FIXME: Not quite correct! */ } } #if 0 - if (PartEntry->PartInfo[0].PartitionLength.QuadPart >= 0x280000000LL) /* 10 GB */ - { - PartSize = (PartEntry->PartInfo[0].PartitionLength.QuadPart + (1 << 29)) >> 30; + if (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart >= 0x280000000LL) /* 10 GB */ + { + PartSize = (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart + (1 << 29)) >> 30; Unit = MUIGetString(STRING_GB); } else #endif - if (PartEntry->PartInfo[0].PartitionLength.QuadPart >= 0xA00000LL) /* 10 MB */ - { - PartSize = (PartEntry->PartInfo[0].PartitionLength.QuadPart + (1 << 19)) >> 20; + if (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart >= 0xA00000LL) /* 10 MB */ + { + PartSize = (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart + (1 << 19)) >> 20; Unit = MUIGetString(STRING_MB); } else { - PartSize = (PartEntry->PartInfo[0].PartitionLength.QuadPart + (1 << 9)) >> 10; + PartSize = (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart + (1 << 9)) >> 10; Unit = MUIGetString(STRING_KB); } @@ -1879,9 +1881,9 @@ { CONSOLE_PrintTextXY(6, 10, MUIGetString(STRING_HDDINFOUNK2), - (PartEntry->DriveLetter == 0) ? '-' : PartEntry->DriveLetter, - (PartEntry->DriveLetter == 0) ? '-' : ':', - PartEntry->PartInfo[0].PartitionType, + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : PartEntry->DriveLetter[PartNumber], + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : ':', + PartEntry->PartInfo[PartNumber].PartitionType, PartSize, Unit); } @@ -1889,8 +1891,8 @@ { CONSOLE_PrintTextXY(6, 10, " %c%c %s %I64u %s", - (PartEntry->DriveLetter == 0) ? '-' : PartEntry->DriveLetter, - (PartEntry->DriveLetter == 0) ? '-' : ':', + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : PartEntry->DriveLetter[PartNumber], + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : ':', PartType, PartSize, Unit); @@ -1972,6 +1974,7 @@ { PDISKENTRY DiskEntry; PPARTENTRY PartEntry; + UCHAR PartNumber; ULONGLONG DiskSize; ULONGLONG PartSize; PCHAR DiskUnit; @@ -1988,6 +1991,7 @@ DiskEntry = PartitionList->CurrentDisk; PartEntry = PartitionList->CurrentPartition; + PartNumber = PartitionList->CurrentPartitionNumber; /* adjust disk size */ if (DiskEntry->DiskSize >= 0x280000000ULL) /* 10 GB */ @@ -2002,39 +2006,39 @@ } /* adjust partition size */ - if (PartEntry->PartInfo[0].PartitionLength.QuadPart >= 0x280000000LL) /* 10 GB */ - { - PartSize = (PartEntry->PartInfo[0].PartitionLength.QuadPart + (1 << 29)) >> 30; + if (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart >= 0x280000000LL) /* 10 GB */ + { + PartSize = (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart + (1 << 29)) >> 30; PartUnit = MUIGetString(STRING_GB); } else { - PartSize = (PartEntry->PartInfo[0].PartitionLength.QuadPart + (1 << 19)) >> 20; + PartSize = (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart + (1 << 19)) >> 20; PartUnit = MUIGetString(STRING_MB); } /* adjust partition type */ - if ((PartEntry->PartInfo[0].PartitionType == PARTITION_FAT_12) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_FAT_16) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_HUGE) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_XINT13)) + if ((PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT_12) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT_16) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_HUGE) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_XINT13)) { PartType = "FAT"; } - else if ((PartEntry->PartInfo[0].PartitionType == PARTITION_FAT32) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_FAT32_XINT13)) + else if ((PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT32) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT32_XINT13)) { PartType = "FAT32"; } - else if (PartEntry->PartInfo[0].PartitionType == PARTITION_EXT2) + else if (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_EXT2) { PartType = "EXT2"; } - else if (PartEntry->PartInfo[0].PartitionType == PARTITION_IFS) + else if (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_IFS) { PartType = "NTFS"; /* FIXME: Not quite correct! */ } - else if (PartEntry->PartInfo[0].PartitionType == PARTITION_ENTRY_UNUSED) + else if (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_ENTRY_UNUSED) { PartType = MUIGetString(STRING_FORMATUNUSED); } @@ -2049,7 +2053,7 @@ #if 0 CONSOLE_PrintTextXY(8, 10, "Partition %lu (%I64u %s) %s of", - PartEntry->PartInfo[0].PartitionNumber, + PartEntry->PartInfo[PartNumber].PartitionNumber, PartSize, PartUnit, PartType); @@ -2082,9 +2086,9 @@ { CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDDINFOUNK4), - (PartEntry->DriveLetter == 0) ? '-' : PartEntry->DriveLetter, - (PartEntry->DriveLetter == 0) ? '-' : ':', - PartEntry->PartInfo[0].PartitionType, + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : PartEntry->DriveLetter[PartNumber], + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : ':', + PartEntry->PartInfo[PartNumber].PartitionType, PartSize, PartUnit); } @@ -2092,8 +2096,8 @@ { CONSOLE_PrintTextXY(8, 10, "%c%c %s %I64u %s", - (PartEntry->DriveLetter == 0) ? '-' : PartEntry->DriveLetter, - (PartEntry->DriveLetter == 0) ? '-' : ':', + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : PartEntry->DriveLetter[PartNumber], + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : ':', PartType, PartSize, PartUnit); @@ -2192,6 +2196,7 @@ WCHAR PathBuffer[MAX_PATH]; PDISKENTRY DiskEntry; PPARTENTRY PartEntry; + UCHAR PartNum; NTSTATUS Status; #ifndef NDEBUG @@ -2212,6 +2217,7 @@ DiskEntry = PartitionList->CurrentDisk; PartEntry = PartitionList->CurrentPartition; + PartNum = PartitionList->CurrentPartitionNumber; while(TRUE) { @@ -2234,53 +2240,53 @@ { CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT)); - if (PartEntry->PartInfo[0].PartitionType == PARTITION_ENTRY_UNUSED) + if (PartEntry->PartInfo[PartNum].PartitionType == PARTITION_ENTRY_UNUSED) { if (wcscmp(FileSystemList->Selected->FileSystem, L"FAT") == 0) { - if (PartEntry->PartInfo[0].PartitionLength.QuadPart < (4200LL * 1024LL)) + if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart < (4200LL * 1024LL)) { /* FAT12 CHS partition (disk is smaller than 4.1MB) */ - PartEntry->PartInfo[0].PartitionType = PARTITION_FAT_12; + PartEntry->PartInfo[PartNum].PartitionType = PARTITION_FAT_12; } - else if (PartEntry->PartInfo[0].StartingOffset.QuadPart < (1024LL * 255LL * 63LL * 512LL)) + else if (PartEntry->PartInfo[PartNum].StartingOffset.QuadPart < (1024LL * 255LL * 63LL * 512LL)) { /* Partition starts below the 8.4GB boundary ==> CHS partition */ - if (PartEntry->PartInfo[0].PartitionLength.QuadPart < (32LL * 1024LL * 1024LL)) + if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart < (32LL * 1024LL * 1024LL)) { /* FAT16 CHS partition (partiton size < 32MB) */ - PartEntry->PartInfo[0].PartitionType = PARTITION_FAT_16; + PartEntry->PartInfo[PartNum].PartitionType = PARTITION_FAT_16; } - else if (PartEntry->PartInfo[0].PartitionLength.QuadPart < (512LL * 1024LL * 1024LL)) + else if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart < (512LL * 1024LL * 1024LL)) { /* FAT16 CHS partition (partition size < 512MB) */ - PartEntry->PartInfo[0].PartitionType = PARTITION_HUGE; + PartEntry->PartInfo[PartNum].PartitionType = PARTITION_HUGE; } else { /* FAT32 CHS partition (partition size >= 512MB) */ - PartEntry->PartInfo[0].PartitionType = PARTITION_FAT32; + PartEntry->PartInfo[PartNum].PartitionType = PARTITION_FAT32; } } else { /* Partition starts above the 8.4GB boundary ==> LBA partition */ - if (PartEntry->PartInfo[0].PartitionLength.QuadPart < (512LL * 1024LL * 1024LL)) + if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart < (512LL * 1024LL * 1024LL)) { /* FAT16 LBA partition (partition size < 512MB) */ - PartEntry->PartInfo[0].PartitionType = PARTITION_XINT13; + PartEntry->PartInfo[PartNum].PartitionType = PARTITION_XINT13; } else { /* FAT32 LBA partition (partition size >= 512MB) */ - PartEntry->PartInfo[0].PartitionType = PARTITION_FAT32_XINT13; + PartEntry->PartInfo[PartNum].PartitionType = PARTITION_FAT32_XINT13; } } } else if (wcscmp(FileSystemList->Selected->FileSystem, L"EXT2") == 0) - PartEntry->PartInfo[0].PartitionType = PARTITION_EXT2; + PartEntry->PartInfo[PartNum].PartitionType = PARTITION_EXT2; else if (!FileSystemList->Selected->FormatFunc) return QUIT_PAGE; } @@ -2341,7 +2347,7 @@ swprintf (PathBuffer, L"\\Device\\Harddisk%lu\\Partition%lu", PartitionList->CurrentDisk->DiskNumber, - PartitionList->CurrentPartition->PartInfo[0].PartitionNumber); + PartitionList->CurrentPartition->PartInfo[PartNum].PartitionNumber); RtlCreateUnicodeString (&DestinationRootPath, PathBuffer); DPRINT ("DestinationRootPath: %wZ\n", &DestinationRootPath); @@ -2352,7 +2358,8 @@ swprintf (PathBuffer, L"\\Device\\Harddisk%lu\\Partition%lu", PartitionList->ActiveBootDisk->DiskNumber, - PartitionList->ActiveBootPartition->PartInfo[0].PartitionNumber); + PartitionList->ActiveBootPartition-> + PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionNumber); RtlCreateUnicodeString (&SystemRootPath, PathBuffer); DPRINT ("SystemRootPath: %wZ\n", &SystemRootPath); @@ -2376,8 +2383,8 @@ if (wcscmp(FileSystemList->Selected->FileSystem, L"FAT") == 0) { /* FIXME: Install boot code. This is a hack! */ - if ((PartEntry->PartInfo[0].PartitionType == PARTITION_FAT32_XINT13) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_FAT32)) + if ((PartEntry->PartInfo[PartNum].PartitionType == PARTITION_FAT32_XINT13) || + (PartEntry->PartInfo[PartNum].PartitionType == PARTITION_FAT32)) { wcscpy(PathBuffer, SourceRootPath.Buffer); wcscat(PathBuffer, L"\\loader\\fat32.bin"); @@ -2464,6 +2471,7 @@ WCHAR PathBuffer[MAX_PATH]; CHAR Buffer[MAX_PATH]; NTSTATUS Status; + UCHAR PartNum = PartitionList->CurrentPartitionNumber; /* FIXME: code duplicated in FormatPartitionPage */ /* Set DestinationRootPath */ @@ -2471,7 +2479,7 @@ swprintf(PathBuffer, L"\\Device\\Harddisk%lu\\Partition%lu", PartitionList->CurrentDisk->DiskNumber, - PartitionList->CurrentPartition->PartInfo[0].PartitionNumber); + PartitionList->CurrentPartition->PartInfo[PartNum].PartitionNumber); RtlCreateUnicodeString(&DestinationRootPath, PathBuffer); DPRINT("DestinationRootPath: %wZ\n", &DestinationRootPath); @@ -2480,7 +2488,7 @@ swprintf(PathBuffer, L"\\Device\\Harddisk%lu\\Partition%lu", PartitionList->ActiveBootDisk->DiskNumber, - PartitionList->ActiveBootPartition->PartInfo[0].PartitionNumber); + PartitionList->ActiveBootPartition->PartInfo[PartNum].PartitionNumber); RtlCreateUnicodeString(&SystemRootPath, PathBuffer); DPRINT("SystemRootPath: %wZ\n", &SystemRootPath); @@ -2544,7 +2552,7 @@ static PAGE_NUMBER -InstallDirectoryPage1(PWCHAR InstallDir, PDISKENTRY DiskEntry, PPARTENTRY PartEntry) +InstallDirectoryPage1(PWCHAR InstallDir, PDISKENTRY DiskEntry, PPARTENTRY PartEntry, UCHAR PartNum) { WCHAR PathBuffer[MAX_PATH]; @@ -2568,7 +2576,7 @@ swprintf(PathBuffer, L"multi(0)disk(0)rdisk(%lu)partition(%lu)", DiskEntry->BiosDiskNumber, - PartEntry->PartInfo[0].PartitionNumber); + PartEntry->PartInfo[PartNum].PartitionNumber); if (InstallDir[0] != L'\\') wcscat(PathBuffer, L"\\"); @@ -2624,7 +2632,7 @@ if (IsUnattendedSetup) { - return(InstallDirectoryPage1 (InstallDir, DiskEntry, PartEntry)); + return(InstallDirectoryPage1 (InstallDir, DiskEntry, PartEntry, PartitionList->CurrentPartitionNumber)); } while(TRUE) @@ -2641,7 +2649,7 @@ } else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */ { - return (InstallDirectoryPage1 (InstallDir, DiskEntry, PartEntry)); + return (InstallDirectoryPage1 (InstallDir, DiskEntry, PartEntry, PartitionList->CurrentPartitionNumber)); } else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x08) /* BACKSPACE */ { Modified: trunk/reactos/base/setup/usetup/partlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
============================================================================== --- trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] Thu Apr 9 22:59:28 2009 @@ -70,8 +70,9 @@ PDISKENTRY DiskEntry; PPARTENTRY PartEntry; PLIST_ENTRY Entry1; - PLIST_ENTRY Entry2; + //PLIST_ENTRY Entry2; CHAR Letter; + UCHAR i; Letter = 'C'; @@ -87,19 +88,25 @@ PARTENTRY, ListEntry); - PartEntry->DriveLetter = 0; - - if (PartEntry->Unpartitioned == FALSE && - !IsContainerPartition (PartEntry->PartInfo[0].PartitionType)) - { - if (IsRecognizedPartition (PartEntry->PartInfo[0].PartitionType) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_ENTRY_UNUSED && - PartEntry->PartInfo[0].PartitionLength.QuadPart != 0LL)) + for (i=0; i<3; i++) + PartEntry->DriveLetter[i] = 0; + + if (PartEntry->Unpartitioned == FALSE) + { + for (i=0; i<3; i++) { - if (Letter <= 'Z') + if (IsContainerPartition (PartEntry->PartInfo[i].PartitionType)) + continue; + + if (IsRecognizedPartition (PartEntry->PartInfo[i].PartitionType) || + (PartEntry->PartInfo[i].PartitionType == PARTITION_ENTRY_UNUSED && + PartEntry->PartInfo[i].PartitionLength.QuadPart != 0LL)) { - PartEntry->DriveLetter = Letter; - Letter++; + if (Letter <= 'Z') + { + PartEntry->DriveLetter[i] = Letter; + Letter++; + } } } } @@ -108,8 +115,8 @@ Entry1 = Entry1->Flink; } - /* Assign drive letters to logical drives */ +#if 0 Entry1 = List->DiskListHead.Flink; while (Entry1 != &List->DiskListHead) { @@ -148,6 +155,7 @@ Entry1 = Entry1->Flink; } +#endif } @@ -1197,8 +1205,8 @@ { sprintf (LineBuffer, MUIGetString(STRING_HDDINFOUNK5), - (PartEntry->DriveLetter == 0) ? '-' : PartEntry->DriveLetter, - (PartEntry->DriveLetter == 0) ? '-' : ':', + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : PartEntry->DriveLetter[PartNumber], + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : ':', PartEntry->PartInfo[PartNumber].PartitionType, PartSize.u.LowPart, Unit); @@ -1207,8 +1215,8 @@ { sprintf (LineBuffer, "%c%c %-24s %6lu %s", - (PartEntry->DriveLetter == 0) ? '-' : PartEntry->DriveLetter, - (PartEntry->DriveLetter == 0) ? '-' : ':', + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : PartEntry->DriveLetter[PartNumber], + (PartEntry->DriveLetter[PartNumber] == 0) ? '-' : ':', PartType, PartSize.u.LowPart, Unit); @@ -2294,12 +2302,15 @@ { PDISKENTRY DiskEntry; PPARTENTRY PartEntry; + PLIST_ENTRY ListEntry; + UCHAR i; /* Check for empty disk list */ if (IsListEmpty (&List->DiskListHead)) { List->ActiveBootDisk = NULL; List->ActiveBootPartition = NULL; + List->ActiveBootPartitionNumber = 0; return; } @@ -2321,6 +2332,7 @@ { List->ActiveBootDisk = NULL; List->ActiveBootPartition = NULL; + List->ActiveBootPartitionNumber = 0; return; } @@ -2338,11 +2350,50 @@ PartEntry->PartInfo[0].BootIndicator = TRUE; PartEntry->PartInfo[0].RewritePartition = TRUE; DiskEntry->Modified = TRUE; - } - - /* FIXME: Might be incorrect if partitions were created by Linux FDISK */ - List->ActiveBootDisk = DiskEntry; - List->ActiveBootPartition = PartEntry; + + /* FIXME: Might be incorrect if partitions were created by Linux FDISK */ + List->ActiveBootDisk = DiskEntry; + List->ActiveBootPartition = PartEntry; + + return; + } + + /* Disk is not new, scan all partitions to find a bootable one */ + List->ActiveBootDisk = NULL; + List->ActiveBootPartition = NULL; + List->ActiveBootPartitionNumber = 0; + + ListEntry = DiskEntry->PartListHead.Flink; + while (ListEntry != &DiskEntry->PartListHead) + { + PartEntry = CONTAINING_RECORD(ListEntry, + PARTENTRY, + ListEntry); + + /* Check if it's partitioned */ + if (!PartEntry->Unpartitioned) + { + /* Go through all of its 4 partitions */ + for (i=0; i<4; i++) + { + if (PartEntry->PartInfo[i].PartitionType != PARTITION_ENTRY_UNUSED && + PartEntry->PartInfo[i].BootIndicator) + { + /* Yes, we found it */ + List->ActiveBootDisk = DiskEntry; + List->ActiveBootPartition = PartEntry; + List->ActiveBootPartitionNumber = i; + + DPRINT1("Found bootable partition disk %d, drive letter %c\n", + DiskEntry->BiosDiskNumber, PartEntry->DriveLetter[i]); + + break; + } + } + } + /* Go to the next one */ + ListEntry = ListEntry->Flink; + } } @@ -2635,6 +2686,7 @@ PLIST_ENTRY Entry1, Entry2; PDISKENTRY DiskEntry; PPARTENTRY PartEntry; + UCHAR i; if (List == NULL) { @@ -2652,11 +2704,17 @@ while (Entry2 != &DiskEntry->PartListHead) { PartEntry = CONTAINING_RECORD(Entry2, PARTENTRY, ListEntry); - if (!PartEntry->Unpartitioned && PartEntry->DriveLetter) - { - if (!SetMountedDeviceValue(PartEntry->DriveLetter, DiskEntry->Signature, PartEntry->PartInfo[0].StartingOffset)) + if (!PartEntry->Unpartitioned) + { + for (i=0; i<4; i++) { - return FALSE; + if (PartEntry->DriveLetter[i]) + { + if (!SetMountedDeviceValue(PartEntry->DriveLetter[i], DiskEntry->Signature, PartEntry->PartInfo[i].StartingOffset)) + { + return FALSE; + } + } } } Entry2 = Entry2->Flink; Modified: trunk/reactos/base/setup/usetup/partlist.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
============================================================================== --- trunk/reactos/base/setup/usetup/partlist.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/partlist.h [iso-8859-1] Thu Apr 9 22:59:28 2009 @@ -43,7 +43,7 @@ { LIST_ENTRY ListEntry; - CHAR DriveLetter; + CHAR DriveLetter[4]; CHAR VolumeLabel[17]; CHAR FileSystemName[9]; @@ -136,6 +136,7 @@ PDISKENTRY ActiveBootDisk; PPARTENTRY ActiveBootPartition; + UCHAR ActiveBootPartitionNumber; LIST_ENTRY DiskListHead; LIST_ENTRY BiosDiskListHead;
16 years, 1 month
1
0
0
0
[dgoette] 367: * move breadcrumb into class structure * improve breadcrumb (get entry by version isn't implemented for now) * some minor fixes
by dgoette@svn.reactos.org
Author: dgoette Date: Thu Apr 9 19:02:43 2009 New Revision: 367 URL:
http://svn.reactos.org/svn/reactos?rev=367&view=rev
Log: * move breadcrumb into class structure * improve breadcrumb (get entry by version isn't implemented for now) * some minor fixes Added:
branches/danny-web/reactos.org/htdocs/compat/lib/view/Breadcrumb.class.php
(contents, props changed) - copied, changed from r366,
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php
Removed:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_menubar_sections…
Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group.php
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group_maintainer…
branches/danny-web/reactos.org/htdocs/compat/inc/comp/data/group_item_list.…
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_category.php
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_name.php
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_vendor.php
branches/danny-web/reactos.org/htdocs/compat/rsdb_config.php
Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group.php
[iso-8859-1] Thu Apr 9 19:02:43 2009 @@ -239,10 +239,10 @@ - $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(comp_id) FROM rsdb_item_comp WHERE comp_groupid = :group_id AND comp_visible = '1'"); + $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM rsdb_item_comp WHERE comp_groupid = :group_id AND comp_visible = '1'"); $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); $stmt->execute(); - $result_item_entry_records = $stmt->fetch(PDO::FETCH_ASSOC); + $result_item_entry_records = $stmt->fetch(PDO::FETCH_NUM); if ($result_item_entry_records[0] == 0) { @@ -274,10 +274,10 @@ <div id="versions" style="display: block"> <?php // Count the comp entries - $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(comp_id) FROM rsdb_item_comp WHERE comp_groupid = :group_id"); + $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM rsdb_item_comp WHERE comp_groupid = :group_id"); $stmt->bindParam('group_id',$result_page["grpentr_id"],PDO::PARAM_STR); $stmt->execute(); - $result_count_comp = $stmt->fetch(PDO::FETCH_ASSOC); + $result_count_comp = $stmt->fetch(PDO::FETCH_NUM); if ($result_count_comp[0]) { @@ -379,7 +379,7 @@ $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM rsdb_item_comp_testresults WHERE test_comp_id = :comp_id AND test_visible = '1'"); $stmt->bindParam('comp_id',$result_version_newest['comp_id'],PDO::PARAM_STR); $stmt->execute(); - $result_count_testentries = $stmt->fetch(PDO::FETCH_ASSOC); + $result_count_testentries = $stmt->fetch(PDO::FETCH_NUM); echo '<b><li><a href="'. $RSDB_intern_link_item.$result_version_newest['comp_id'] .'&item2=tests">Compatibility Tests</b>'; @@ -391,10 +391,10 @@ } ?> <?php - $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(fmsg_id) FROM rsdb_item_comp_forum WHERE fmsg_comp_id = :comp_id AND fmsg_visible = '1' ;"); + $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM rsdb_item_comp_forum WHERE fmsg_comp_id = :comp_id AND fmsg_visible = '1' ;"); $stmt->bindParam('comp_id',$result_version_newest['comp_id'],PDO::PARAM_STR); $stmt->execute(); - $result_count_forumentries = $stmt->fetch(PDO::FETCH_ASSOC); + $result_count_forumentries = $stmt->fetch(PDO::FETCH_NUM); if ($result_count_forumentries[0] > 0) { echo "<b>"; @@ -410,10 +410,10 @@ } ?> <?php - $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(media_id) FROM rsdb_object_media WHERE media_groupid = :group_id AND media_visible = '1'"); + $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM rsdb_object_media WHERE media_groupid = :group_id AND media_visible = '1'"); $stmt->bindParam('group_id',$result_version_newest['comp_media'],PDO::PARAM_STR); $stmt->execute(); - $result_count_screenshots = $stmt->fetch(); + $result_count_screenshots = $stmt->fetch(PDO::FETCH_NUM); if ($result_count_screenshots[0] > 0) { echo "<b>"; @@ -432,9 +432,9 @@ </ul> <br /> <?php - $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(bundle_id) FROM rsdb_group_bundles WHERE bundle_groupid = :group_id"); + $stmt=CDBConnection::getInstance()->prepare("SELECT COUNT(*) FROM rsdb_group_bundles WHERE bundle_groupid = :group_id"); $stmt->bindParam('group_id',$result_page["grpentr_id"],PDO::PARAM_STR); - $result_count_bundle = $stmt->fetch(); + $result_count_bundle = $stmt->fetch(PDO::FETCH_NUM); if (isset($_GET['group2']) && $_GET['group2'] != "" && $_GET['group2'] != "overview" || $result_count_bundle[0] != 0) { $temp_pic = mt_rand(1,$result_count_screenshots[0]); Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group_maintainer…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group_maintainer…
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/compat/inc/comp/comp_group_maintainer…
[iso-8859-1] Thu Apr 9 19:02:43 2009 @@ -82,7 +82,7 @@ // Edit application group data: if ($RSDB_TEMP_pmod == "ok" && $RSDB_SET_group != "" && $RSDB_TEMP_appgroup != "" && $RSDB_TEMP_description != "" && $RSDB_TEMP_category != "" && $RSDB_TEMP_vendor != "" && usrfunc_IsModerator($RSDB_intern_user_id)) { // Update group entry: - $stmt=CDBConnection::getInstance->prepare("UPDATE rsdb_groups SET grpentr_name = :new_name', grpentr_category = :new_category, grpentr_vendor = :new_vendor, grpentr_description = :new_description WHERE grpentr_id = :group_id"); + $stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_groups SET grpentr_name = :new_name, grpentr_category = :new_category, grpentr_vendor = :new_vendor, grpentr_description = :new_description WHERE grpentr_id = :group_id"); $stmt->bindParam('new_name',$RSDB_TEMP_appgroup,PDO::PARAM_STR); $stmt->bindParam('new_category',$RSDB_TEMP_category,PDO::PARAM_STR); $stmt->bindParam('new_vendor',$RSDB_TEMP_vendor,PDO::PARAM_STR); @@ -106,7 +106,7 @@ // Special request: if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_txtreq1 != "" && $RSDB_TEMP_txtreq2 != "" && usrfunc_IsModerator($RSDB_intern_user_id)) { - $stmt=CDBConnection::getInstance()->prepare("INSERT INTO rsdb_logs ( log_id, log_date, log_usrid, log_usrip, log_level, log_action, log_title, log_description, log_category, log_badusr, log_referrer, log_browseragent, log_read, log_taskdone_usr) VALUES ('', NOW(), :user_id, :ip, 'low', 'request', :title, :description, 'user_moderator', '0', :referrer, :user_agent, ';', '0');"; + $stmt=CDBConnection::getInstance()->prepare("INSERT INTO rsdb_logs ( log_id, log_date, log_usrid, log_usrip, log_level, log_action, log_title, log_description, log_category, log_badusr, log_referrer, log_browseragent, log_read, log_taskdone_usr) VALUES ('', NOW(), :user_id, :ip, 'low', 'request', :title, :description, 'user_moderator', '0', :referrer, :user_agent, ';', '0')"); $stmt->bindParam('user_id',$RSDB_intern_user_id,PDO::PARAM_STR); $stmt->bindParam('ip',$RSDB_ipaddr,PDO::PARAM_STR); $stmt->bindParam('title',$RSDB_TEMP_txtreq1,PDO::PARAM_STR); @@ -132,7 +132,7 @@ } if ($result_maintainer_group['grpentr_checked'] == "1" || $result_maintainer_group['grpentr_checked'] == "no") { if ($RSDB_TEMP_pmod == "ok" && $RSDB_TEMP_verified == "done" && usrfunc_IsModerator($RSDB_intern_user_id)) { - $stmt=CDBConnection::getInstance->prepare("UPDATE rsdb_groups SET grpentr_checked = :checked WHERE grpentr_id = :group_id"); + $stmt=CDBConnection::getInstance()->prepare("UPDATE rsdb_groups SET grpentr_checked = :checked WHERE grpentr_id = :group_id"); $stmt->bindParam('checked',$temp_verified,PDO::PARAM_STR); $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); $stmt->execute(); Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/comp/data/group_item_list.…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/compat/inc/comp/data/group_item_list.…
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/compat/inc/comp/data/group_item_list.…
[iso-8859-1] Thu Apr 9 19:02:43 2009 @@ -62,7 +62,7 @@ $RSDB_intern_TEMP_version_saved_a = ""; $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE comp_groupid = :group_id ORDER BY comp_osversion DESC"); $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->bindParam(); + $stmt->execute(); while($result_sortby_a = $stmt->fetch(PDO::FETCH_ASSOC)) { if ($result_sortby_a[$RSDB_intern_sortby_headline_field] != $RSDB_intern_TEMP_version_saved_a) { Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_category.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_category.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_category.php
[iso-8859-1] Thu Apr 9 19:02:43 2009 @@ -42,7 +42,17 @@ //echo "<h1>Browse by Category</h1>"; - include("inc/tree/tree_historybar.php"); + + // create breadcrumb + if (isset($_GET['item'])) { + new Breadcrumb(Breadcrumb::MODE_TREE, $_GET['item'], Breadcrumb::PARAM_VERSION); + } + elseif ($RSDB_SET_group) { + new Breadcrumb(Breadcrumb::MODE_TREE, $RSDB_SET_group, Breadcrumb::PARAM_ENTRY); + } + elseif (isset($_GET['cat'])) { + new Breadcrumb(Breadcrumb::MODE_TREE, $_GET['cat'], Breadcrumb::PARAM_CATEGORY); + } if (isset($_GET['item']) && $_GET['item'] != "") { include("inc/tree/tree_item.php"); @@ -57,15 +67,7 @@ } } else { - switch (@$_GET['cat2']) { - case "flat": // Flat Style - default: - include("inc/tree/tree_category_flat.php"); - break; - case "tree": // Tree Style include("inc/tree/tree_category_tree.php"); - break; - } include("inc/tree/tree_category_grouplist_1.php"); } } Removed:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php
(removed) @@ -1,566 +1,0 @@ -<?php - /* - RSDB - ReactOS Support Database - Copyright (C) 2005-2006 Klemens Friedl <frik85(a)reactos.org> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * ReactOS Support Database System - RSDB - * - * (c) by Klemens Friedl <frik85> - * - * 2005 - 2006 - */ - - - // To prevent hacking activity: - if ( !defined('RSDB') ) - { - die(" "); - } - - - - - - $RSDB_viewpage = true; - - if (isset($_GET['page']) && $_GET['page'] == "category") { -?> -<table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#5984C3"> - <tr> - <td> <font size="2">Browsing: </font><a href="<?php echo $RSDB_intern_link_category_cat."0"; - - if (empty($_GET['cat2']) || $_GET['cat2'] == 'flat') { - - } - else { - echo "&cat2=".htmlspecialchars(@$_GET['cat2']); - } - - ?>">Main</a><?php - $RSDB_TEMP_current_category = "Main"; - $RSDB_TEMP_current_category_desc = "Root directory of the tree."; - - if (!empty($_GET['cat'])) { - - if (isset($_GET['item']) && $_GET['item'] != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC"); - $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR); - $stmt->execute(); - $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_itempid['comp_groupid'] == "" || $result_itempid['comp_groupid'] == "0") { - //die(""); - //echo "die1"; - $RSDB_viewpage = false; - } - $RSDB_SET_group = $result_itempid['comp_groupid']; - } - if ($RSDB_SET_group != "" && $RSDB_viewpage != false) { - //echo "+++++".$RSDB_SET_group; - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp = '1' ORDER BY grpentr_name ASC") ; - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_groupid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_groupid['grpentr_category'] == "" || $result_groupid['grpentr_category'] == "0") { - //die(""); - //echo "die2"; - $RSDB_viewpage = false; - } - if ($RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp = '1'"); - $stmt->bindParam('cat_id',$result_groupid['grpentr_category'],PDO::PARAM_STR); - $stmt->execute(); - $result_category_treehistory_groupid=$stmt->fetch(PDO::FETCH_ASSOC); - - $RSDB_TEMP_cat_path = $result_category_treehistory_groupid['cat_path']; - $RSDB_TEMP_cat_id = $result_category_treehistory_groupid['cat_id']; - //$RSDB_TEMP_cat_current_level = $result_category_treehistory_groupid['cat_level']; - - $RSDB_TEMP_cat_current_level=1; - $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id; - //$RSDB_TEMP_cat_current_counter = $result_category_treehistory_groupid['cat_level']; - //$RSDB_TEMP_cat_treehist = $result_category_treehistory_groupid['cat_level']; - } - } - elseif ($RSDB_viewpage != false) { - //echo "hjall"; - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp = '1'"); - $stmt->bindParam('cat_id',@$_GET['cat'],PDO::PARAM_STR); - $stmt->execute(); - $result_category_treehistory=$stmt->fetch(PDO::FETCH_ASSOC); - - $RSDB_TEMP_cat_path = $result_category_treehistory['cat_path']; - $RSDB_TEMP_cat_id = $result_category_treehistory['cat_id']; - - $RSDB_TEMP_cat_current_level=1; - $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id; - } - if ($RSDB_viewpage != false) { - // echo "<p>"; - $RSDB_TEMP_cat_current_id_guess = $RSDB_TEMP_cat_current_id; - $RSDB_intern_catlevel=0; - - // count the levels -> current category level - for ($guesslevel=1; ; $guesslevel++) { - // echo $guesslevel."#"; - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp = '1'"); - $stmt->bindParam('cat_id',$RSDB_TEMP_cat_current_id_guess,PDO::PARAM_STR); - $stmt->execute(); - $result_category_tree_guesslevel=$stmt->fetch(PDO::FETCH_ASSOC); - // echo $result_category_tree_guesslevel['cat_name']; - $RSDB_TEMP_cat_current_id_guess = $result_category_tree_guesslevel['cat_path']; - - if (!$result_category_tree_guesslevel['cat_name']) { - // echo "ENDE:".($guesslevel-1); - $RSDB_intern_catlevel = ($guesslevel-1); - $RSDB_TEMP_cat_current_counter = $RSDB_intern_catlevel; - break; - } - } - // echo "<p>"; - - - for ($i=0; $i < $RSDB_intern_catlevel; $i++) { - // echo "<br>Ring0: ".$i." "; - for ($k=1; $k < ($RSDB_intern_catlevel+1-$i); $k++) { - // echo $k."|"; - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_categories WHERE cat_id = :cat_id AND `cat_visible` = '1' AND cat_comp = '1'"); - $stmt->bindParam('cat_id',$RSDB_TEMP_cat_current_id,PDO::PARAM_STR); - $stmt->execute(); - $result_category_tree_temp=$stmt->fetch(PDO::FETCH_ASSOC); - $RSDB_TEMP_cat_current_id = $result_category_tree_temp['cat_path']; - - // echo "K:".$k."|E:".($result_category_treehistory['cat_level']+1-$i); - if ($k == $RSDB_TEMP_cat_current_counter) { - $RSDB_TEMP_current_category = $result_category_tree_temp['cat_name']; - $RSDB_TEMP_current_category_desc = $result_category_tree_temp['cat_description']; - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_category_cat.$result_category_tree_temp['cat_id']; - if (!empty($_GET['cat2']) && $_GET['cat2'] != 'flat') { - echo "&cat2=".htmlentities(@$_GET['cat2']); - } - echo "'>".$result_category_tree_temp['cat_name']."</a>"; - } - } - $RSDB_TEMP_cat_current_counter--; - $k=1; - $RSDB_TEMP_cat_current_id=""; - $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id; - - } - //create_historybar($RSDB_TEMP_cat_path, $RSDB_TEMP_cat_id, $RSDB_TEMP_cat_current_level); - } - - if ($RSDB_SET_group != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp = '1' ORDER BY grpentr_name ASC"); - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC); - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_group.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>"; - } - if (isset($_GET['item']) && $_GET['item'] != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC"); - $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::PARAM_STR); - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_group.htmlspecialchars($_GET['item'])."'>".$result_current_group['comp_name']; - - echo " ["."ReactOS ".show_osversion($result_current_group['comp_osversion'])."]"; - - echo "</a>"; - } - - } - echo "</td></tr></table>"; - include('inc/tree/tree_menubar_sections.php'); - - if ($RSDB_SET_group == "" && isset($_GET['item']) && $_GET['item'] == "" && $RSDB_viewpage != false) { - echo "<h2>".$RSDB_TEMP_current_category."</h2>"; - echo "<p>".$RSDB_TEMP_current_category_desc."</p>"; - } - - if ($RSDB_viewpage != false) { - if ($RSDB_SET_group != "" || isset($_GET['item']) && $_GET['item'] != "") { - echo "<br />"; - } - else { - echo "<p align='center'>"; - if (isset($_GET['cat2']) && $_GET['cat2'] == 'flat') { - echo "<b>Flat Style</b> | <a href='".$RSDB_intern_link_category_cat.htmlspecialchars(@$_GET['cat'])."&cat2=tree'>Tree Style</a>"; - } - elseif (isset($_GET['cat2']) && $_GET['cat2'] == 'tree') { - echo "<a href='".$RSDB_intern_link_category_cat.htmlspecialchars(@$_GET['cat'])."&cat2=flat'>Flat Style</a> | <b>Tree Style</b>"; - } - echo "</p>"; - } - } - } -?> - - -<?php - if (isset($_GET['page']) && ($_GET['page'] == "name" || $_GET['page'] == "vendor")) { - if ($_GET['page'] == "name") { - if (isset($_GET['item']) && $_GET['item'] != "") { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC") ; - $stmt->bindParam('item_id',@$_GET['item'],PDO::PARAM_STR); - $stmt->execute(); - $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_itempid['comp_groupid'] == "" || $result_itempid['comp_groupid'] == "0") { - $RSDB_viewpage = false; - } - $RSDB_SET_group = $result_itempid['comp_groupid']; - } - if ($RSDB_SET_group != "") { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id ORDER BY grpentr_id ASC"); - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_groupid = $stmt->fetch(PDO::FETCH_ASSOC); - $RSDB_SET_letter = strtolower(substr($result_groupid['grpentr_name'], 0, 1)); - } - ?> - <table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#5984C3"> - <tr> - <td> <font size="2">Browsing: </font> <a href="<?php echo $RSDB_intern_link_name_letter_EX."all"; ?>"><?php - - if ($RSDB_SET_letter != "") { - echo ucfirst($RSDB_SET_letter); - } - else { - echo "All"; - } - - echo "</a>"; - - if (isset($_GET['item']) && $_GET['item'] != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance("SELECT * FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC"); - $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR); - $stmt->execute(); - $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_itempid['comp_groupid'] == "" || $result_itempid['comp_groupid'] == "0") { - //die(""); - $RSDB_viewpage = false; - } - $RSDB_SET_group = $result_itempid['comp_groupid']; - } - if ($RSDB_SET_group != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp = '1' ORDER BY grpentr_name ASC"); - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_current_group['grpentr_category'] == "" || $result_current_group['grpentr_category'] == "0") { - //die(""); - $RSDB_viewpage = false; - } - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_group.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>"; - } - if (isset($_GET['item']) && $_GET['item'] != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC"); - $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC); - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_item_EX.htmlspecialchars($_GET['item'])."'>".$result_current_group['comp_name']; - - echo " ["."ReactOS ".show_osversion($result_current_group['comp_osversion'])."]"; - - echo "</a>"; - } - - echo "</td></tr></table>"; - - } - elseif ($_GET['page'] == "vendor") { - - if (isset($_GET['vendor']) && $_GET['vendor'] != '') { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC"); - $stmt->bindParam('vendor_id',$_GET['vendor'],PDO::PARAM_STR); - $stmt->execute(); - $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_itempid['vendor_id'] == "" || $result_itempid['vendor_id'] == "0") { - $RSDB_viewpage = false; - } - $RSDB_SET_letter = strtolower(substr($result_itempid['vendor_name'], 0, 1)); - } - ?> - <table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#5984C3"> - <tr> - <td> <font size="2">Browsing: <a href="<?php echo $RSDB_intern_link_vendor_letter_EX.$RSDB_SET_letter; ?>"> - - <?php - - if ($RSDB_SET_letter != "") { - echo ucfirst($RSDB_SET_letter); - } - else { - echo "All"; - } - - echo "</a></font>"; - - if (isset($_GET['vendor']) && $_GET['vendor'] != '' && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC"); - $stmt->bindParam('vendor_id',$_GET['vendor'],PDO::PARAM_STR); - $stmt->execute(); - $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_itempid['vendor_id'] == "" || $result_itempid['vendor_id'] == "0") { - //die(""); - $RSDB_viewpage = false; - } - //$RSDB_SET_group = $result_itempid['vendor_id']; - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_vendor_id_EX.htmlspecialchars($_GET['vendor'])."'>".$result_itempid['vendor_name']."</a>"; - } - if ($RSDB_SET_group != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp = '1' ORDER BY grpentr_name ASC"); - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_current_group['grpentr_category'] == "" || $result_current_group['grpentr_category'] == "0") { - //die(""); - $RSDB_viewpage = false; - } - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_name_group_EX.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>"; - } - if (isset($_GET['item']) && $_GET['item'] != "" && $RSDB_viewpage != false) { - $stmt=CDBCOnnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC"); - $stmt->bindParam('group_id',@$_GET['vendor'],PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::PARAM_STR); - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_name_item_EX.htmlspecialchars($_GET['item'])."'>".$result_current_group['vendor_name']; - echo "</a>"; - } - - echo "</td></tr></table>"; - - } - - - - - include('inc/tree/tree_menubar_sections.php'); - - if (isset($_GET['page']) && $_GET['page'] == "name") { - $RSDB_TEMP_link_letter = $RSDB_intern_link_name_letter_EX; - } - elseif (isset($_GET['page']) && $_GET['page'] == "vendor") { - $RSDB_TEMP_link_letter = $RSDB_intern_link_vendor_letter_EX; - } - - if ($RSDB_viewpage != false) { - - echo '<p align="center">'; - - if ($RSDB_SET_letter == "all" || $RSDB_SET_letter == "") { - echo ' <b>All</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'all" class="letterbarlink">All</a> '; - } - - if ($RSDB_SET_letter == "a") { - echo ' <b>A</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'a" class="letterbarlink">A</a> '; - } - - if ($RSDB_SET_letter == "b") { - echo ' <b>B</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'b" class="letterbarlink">B</a> '; - } - - if ($RSDB_SET_letter == "c") { - echo ' <b>C</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'c" class="letterbarlink">C</a> '; - } - - if ($RSDB_SET_letter == "d") { - echo ' <b>D</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'d" class="letterbarlink">D</a> '; - } - - if ($RSDB_SET_letter == "e") { - echo ' <b>E</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'e" class="letterbarlink">E</a> '; - } - - if ($RSDB_SET_letter == "f") { - echo ' <b>F</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'f" class="letterbarlink">F</a> '; - } - - if ($RSDB_SET_letter == "g") { - echo ' <b>G</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'g" class="letterbarlink">G</a> '; - } - - if ($RSDB_SET_letter == "h") { - echo ' <b>H</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'h" class="letterbarlink">H</a> '; - } - - if ($RSDB_SET_letter == "i") { - echo ' <b>I</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'i" class="letterbarlink">I</a> '; - } - - if ($RSDB_SET_letter == "j") { - echo ' <b>J</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'j" class="letterbarlink">J</a> '; - } - - if ($RSDB_SET_letter == "k") { - echo ' <b>K</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'k" class="letterbarlink">K</a> '; - } - - if ($RSDB_SET_letter == "l") { - echo ' <b>L</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'l" class="letterbarlink">L</a> '; - } - - if ($RSDB_SET_letter == "m") { - echo ' <b>M</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'m" class="letterbarlink">M</a> '; - } - - if ($RSDB_SET_letter == "n") { - echo ' <b>N</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'n" class="letterbarlink">N</a> '; - } - - if ($RSDB_SET_letter == "o") { - echo ' <b>O</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'o" class="letterbarlink">O</a> '; - } - - if ($RSDB_SET_letter == "p") { - echo ' <b>P</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'p" class="letterbarlink">P</a> '; - } - - if ($RSDB_SET_letter == "q") { - echo ' <b>Q</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'q" class="letterbarlink">Q</a> '; - } - - if ($RSDB_SET_letter == "r") { - echo ' <b>R</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'r" class="letterbarlink">R</a> '; - } - - if ($RSDB_SET_letter == "s") { - echo ' <b>S</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'s" class="letterbarlink">S</a> '; - } - - if ($RSDB_SET_letter == "t") { - echo ' <b>T</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'t" class="letterbarlink">T</a> '; - } - - if ($RSDB_SET_letter == "u") { - echo ' <b>U</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'u" class="letterbarlink">U</a> '; - } - - if ($RSDB_SET_letter == "v") { - echo ' <b>V</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'v" class="letterbarlink">V</a> '; - } - - if ($RSDB_SET_letter == "w") { - echo ' <b>W</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'w" class="letterbarlink">W</a> '; - } - - if ($RSDB_SET_letter == "x") { - echo ' <b>X</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'x" class="letterbarlink">X</a> '; - } - - if ($RSDB_SET_letter == "y") { - echo ' <b>Y</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'y" class="letterbarlink">Y</a> '; - } - - if ($RSDB_SET_letter == "z") { - echo ' <b>Z</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'z" class="letterbarlink">Z</a> '; - } - - echo "</p><br />"; - - } - } - - if ($RSDB_viewpage == false) { - echo "<p>No related database entry found!</p>"; - } - - - //Message::show("Compatibility"); -?> Removed:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_menubar_sections…
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_menubar_sections…
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_menubar_sections…
(removed) @@ -1,86 +1,0 @@ -<?php - /* - RSDB - ReactOS Support Database - Copyright (C) 2005-2006 Klemens Friedl <frik85(a)reactos.org> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -/* - * ReactOS Support Database System - RSDB - * - * (c) by Klemens Friedl <frik85> - * - * 2005 - 2006 - */ - - - // To prevent hacking activity: - if ( !defined('RSDB') ) - { - die(" "); - } - -?> -<table width="100%" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td width="100%"> </td> - <td align="right" valign="top"> - <table width="380" border="0" cellpadding="0" cellspacing="0" bordercolor="#5984C3"> - <tr> - <td width="18" height="18"><img src="images/corner_sections.jpg" width="18" height="18"></td> - <td bgcolor="#5984C3"><div id="sectionMenu" align="center"><?php - - $RSDB_compare_string = ''; - - if (isset($_GET['cat']) && $_GET['cat'] != '' && isset($_GET['item']) && $_GET['item'] =="" && $RSDB_SET_group =="") { - if ($_GET['cat'] == 0) { - $result_count_group['cat_comp']=1; - } - else { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1'"); - $stmt->bindParam('cat_id',@htmlspecialchars(@$_GET['cat']),PDO::PARAM_STR); - $stmt->execute(); - $result_count_group = $stmt->fetch(PDO::FETCH_ASSOC); - } - $RSDB_compare_string = 'cat'; - } - else { - if (isset($_GET['item']) && $_GET['item'] != "") { - $result_count_group['item_comp']=1; - $RSDB_compare_string = 'item'; - } - elseif ($RSDB_SET_group != "") { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_id = :group_id AND grpentr_visible = '1'"); - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_count_group = $stmt->fetch(PDO::FETCH_ASSOC); - $RSDB_compare_string = 'grpentr'; - } - } - if ($result_count_group[$RSDB_compare_string."_comp"] == "1") { - echo '<a href="'. $RSDB_intern_link_db_view2 .'">'. $RSDB_langres['TEXT_compdb_short'] .'</a>'; - } - else { - echo '<font color="#cccccc"> '. $RSDB_langres['TEXT_compdb_short'] .' </font>'; - } - - - ?></div></td> - </tr> - </table> - </td> - </tr> -</table> Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_name.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_name.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_name.php
[iso-8859-1] Thu Apr 9 19:02:43 2009 @@ -43,7 +43,12 @@ //echo "<h1>Browse by Name</h1>"; - include("inc/tree/tree_historybar.php"); + if (isset($_GET['item'])) { + new Breadcrumb(Breadcrumb::MODE_INITIAL, $_GET['item'], Breadcrumb::PARAM_VERSION); + } + elseif (isset($_GET['group'])) { + new Breadcrumb(Breadcrumb::MODE_INITIAL, $RSDB_SET_group, Breadcrumb::PARAM_ENTRY); + } if (isset($_GET['item']) && $_GET['item'] != "") { include("inc/tree/tree_item.php"); Modified:
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_vendor.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_vendor.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_vendor.php
[iso-8859-1] Thu Apr 9 19:02:43 2009 @@ -42,7 +42,13 @@ //echo "<h1>Browse by Vendor</h1>"; - include("inc/tree/tree_historybar.php"); + if (isset($_GET['item'])) { + new Breadcrumb(Breadcrumb::MODE_VENDOR, $_GET['item'], Breadcrumb::PARAM_VERSION); + } + elseif (isset($_GET['group'])) { + new Breadcrumb(Breadcrumb::MODE_VENDOR, $RSDB_SET_group, Breadcrumb::PARAM_ENTRY); + } + if (isset($_GET['item']) && $_GET['item'] != '') { include("inc/tree/tree_item.php"); Copied:
branches/danny-web/reactos.org/htdocs/compat/lib/view/Breadcrumb.class.php
(from r366,
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php
) URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/compat/inc/tree/tree_historybar.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/compat/lib/view/Breadcrumb.class.php
[iso-8859-1] Thu Apr 9 19:02:43 2009 @@ -2,6 +2,7 @@ /* RSDB - ReactOS Support Database Copyright (C) 2005-2006 Klemens Friedl <frik85(a)reactos.org> + 2009 Danny Götte <dangerground(a)web.de> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,549 +19,257 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* - * ReactOS Support Database System - RSDB - * - * (c) by Klemens Friedl <frik85> - * - * 2005 - 2006 - */ - - - // To prevent hacking activity: - if ( !defined('RSDB') ) - { - die(" "); - } - - - - - - $RSDB_viewpage = true; - - if (isset($_GET['page']) && $_GET['page'] == "category") { -?> -<table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#5984C3"> - <tr> - <td> <font size="2">Browsing: </font><a href="<?php echo $RSDB_intern_link_category_cat."0"; - - if (empty($_GET['cat2']) || $_GET['cat2'] == 'flat') { - - } - else { - echo "&cat2=".htmlspecialchars(@$_GET['cat2']); - } - - ?>">Main</a><?php - $RSDB_TEMP_current_category = "Main"; - $RSDB_TEMP_current_category_desc = "Root directory of the tree."; - - if (!empty($_GET['cat'])) { - - if (isset($_GET['item']) && $_GET['item'] != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC"); - $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR); + +class Breadcrumb +{ + + + + const MODE_NONE = 0; // no breadcrumb + const MODE_INITIAL = 1; // show initial letter + const MODE_TREE = 2; // show hierarchical list + const MODE_VENDOR = 4; // show vendor + + const PARAM_UNKNOWN = 0; + const PARAM_CATEGORY = 1; + const PARAM_ENTRY = 2; + const PARAM_VERSION = 3; + const PARAM_VENDOR = 4; + + + + public function __construct( $mode = self::NONE, $param, $param_type = self::PARAM_UNKNOWN) + { + echo ' + <div style="clear: both;border: 2px solid gray;"> + <span style="float: left;">Browsing: </span> + <ul style="list-style-type: none;display: inline;">'; + + // needs entry + if ($mode & self::MODE_INITIAL) { + self::initial($param, $param_type); + } + + // needs entry or category + if ($mode & self::MODE_TREE) { + self::tree($param, $param_type); + } + + // needs vendor + if ($mode & self::MODE_VENDOR) { + self::vendor($param, $param_type); + } + + // get version data + if ($param > 0 && $param_type === self::PARAM_VERSION) { + $stmt=CDBConnection::getInstance()->prepare("SELECT comp_groupid, comp_id, comp_appversion, grpentr_name FROM rsdb_item_comp JOIN rsdb_groups ON grpentr_id=comp_group_id WHERE grpentr_visible = '1' AND comp_id = :item_id AND comp_visible='1'") ; + $stmt->bindParam('item_id',$param,PDO::PARAM_INT); + $stmt->execute(); + $version = $stmt->fetchOnce(PDO::FETCH_ASSOC); + $version_id = $version['comp_id']; + $version_name = $version['comp_appversion']; + $entry_id = $version['comp_groupid']; + } + + // get entry data + elseif ($param > 0 && $param_type === self::PARAM_ENTRY) { + $stmt=CDBConnection::getInstance()->prepare("SELECT grpentr_id, grpentr_category, grpentr_name FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id") ; + $stmt->bindParam('group_id',$param,PDO::PARAM_INT); + $stmt->execute(); + $group = $stmt->fetchOnce(PDO::FETCH_ASSOC); + $entry_id = $group['grpentr_id']; + $entry_name = $group['grpentr_name']; + } + + // show entry, if selected + if (isset($entry_id)) { + echo ' + <li style="float: left;padding-left: 10px;">→ <a href="'.$entry_id.'">'.htmlspecialchars($entry_name).'</a></li>'; + } + + // show entry, if selected + if (isset($version_id)) { + echo ' + <li style="float: left;padding-left: 10px;"> [<a href="'.$version_id.'">'.htmlspecialchars($version_name).'</a>] </li>'; + } + + echo ' + </ul> + <br style="clear: both;"/> + </div>'; + } // end of constructor + + + + private function tree( $param, $param_type ) + { + global $RSDB_intern_link_category_cat; + + $description = 'Root directory of the tree.'; + + // check if category exists and is visible + if ($param > 0 && $param_type === self::PARAM_CATEGORY) { + $stmt=CDBConnection::getInstance()->prepare("SELECT cat_id FROM rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1'"); + $stmt->bindParam('cat_id',$param,PDO::PARAM_INT); + $stmt->execute(); + $category_id = $stmt->fetchColumn(); + + if ($category_id === false) { + echo 'Unknown Category'; + return; + } + } + + // check if entry exists and is visible + elseif ($param > 0 && $param_type === self::PARAM_ENTRY) { + $stmt=CDBConnection::getInstance()->prepare("SELECT grpentr_id, grpentr_category, grpentr_name FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id") ; + $stmt->bindParam('group_id',$param,PDO::PARAM_INT); + $stmt->execute(); + $category_id = $stmt->fetchOnce(PDO::FETCH_ASSOC); + + if ($group === false) { + echo 'Unknown Group'; + return; + } + } + + // check if entry version exists and is visible + elseif ($param > 0 && $param_type === self::PARAM_VERSION) { + //@TODO + } + + // show root + echo ' + <li style="float: left;"><a href="'.$RSDB_intern_link_category_cat.'0">Root</a></li>'; + + if ($category_id === false) { + echo '<li>→ Unknown Category</li>'; + return; + } + + // show current path + $stmt=CDBConnection::getInstance()->prepare("SELECT cat_name, cat_id, cat_path FROM rsdb_categories WHERE cat_id=:cat_id"); + $stmt->bindParam('cat_id',$category_id,PDO::PARAM_INT); + $stmt->execute(); + + // get output in reversed order + $output = ''; + while ($category = $stmt->fetch(PDO::FETCH_ASSOC)) { + $output = ' + <li style="float: left;padding-left: 10px;">→ <a href="'.$RSDB_intern_link_category_cat.$category['cat_id'].'">'.htmlspecialchars($category['cat_name']).'</a></li>'.$output; + + if ($category['cat_path'] > 0) { + $stmt->bindParam('cat_id',$category['cat_path'],PDO::PARAM_INT); $stmt->execute(); - $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_itempid['comp_groupid'] == "" || $result_itempid['comp_groupid'] == "0") { - //die(""); - //echo "die1"; - $RSDB_viewpage = false; - } - $RSDB_SET_group = $result_itempid['comp_groupid']; - } - if ($RSDB_SET_group != "" && $RSDB_viewpage != false) { - //echo "+++++".$RSDB_SET_group; - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp = '1' ORDER BY grpentr_name ASC") ; - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_groupid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_groupid['grpentr_category'] == "" || $result_groupid['grpentr_category'] == "0") { - //die(""); - //echo "die2"; - $RSDB_viewpage = false; - } - if ($RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp = '1'"); - $stmt->bindParam('cat_id',$result_groupid['grpentr_category'],PDO::PARAM_STR); - $stmt->execute(); - $result_category_treehistory_groupid=$stmt->fetch(PDO::FETCH_ASSOC); - - $RSDB_TEMP_cat_path = $result_category_treehistory_groupid['cat_path']; - $RSDB_TEMP_cat_id = $result_category_treehistory_groupid['cat_id']; - //$RSDB_TEMP_cat_current_level = $result_category_treehistory_groupid['cat_level']; - - $RSDB_TEMP_cat_current_level=1; - $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id; - //$RSDB_TEMP_cat_current_counter = $result_category_treehistory_groupid['cat_level']; - //$RSDB_TEMP_cat_treehist = $result_category_treehistory_groupid['cat_level']; - } - } - elseif ($RSDB_viewpage != false) { - //echo "hjall"; - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp = '1'"); - $stmt->bindParam('cat_id',@$_GET['cat'],PDO::PARAM_STR); - $stmt->execute(); - $result_category_treehistory=$stmt->fetch(PDO::FETCH_ASSOC); - - $RSDB_TEMP_cat_path = $result_category_treehistory['cat_path']; - $RSDB_TEMP_cat_id = $result_category_treehistory['cat_id']; - - $RSDB_TEMP_cat_current_level=1; - $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id; - } - if ($RSDB_viewpage != false) { - // echo "<p>"; - $RSDB_TEMP_cat_current_id_guess = $RSDB_TEMP_cat_current_id; - $RSDB_intern_catlevel=0; - - // count the levels -> current category level - for ($guesslevel=1; ; $guesslevel++) { - // echo $guesslevel."#"; - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_categories WHERE cat_id = :cat_id AND cat_visible = '1' AND cat_comp = '1'"); - $stmt->bindParam('cat_id',$RSDB_TEMP_cat_current_id_guess,PDO::PARAM_STR); - $stmt->execute(); - $result_category_tree_guesslevel=$stmt->fetch(PDO::FETCH_ASSOC); - // echo $result_category_tree_guesslevel['cat_name']; - $RSDB_TEMP_cat_current_id_guess = $result_category_tree_guesslevel['cat_path']; - - if (!$result_category_tree_guesslevel['cat_name']) { - // echo "ENDE:".($guesslevel-1); - $RSDB_intern_catlevel = ($guesslevel-1); - $RSDB_TEMP_cat_current_counter = $RSDB_intern_catlevel; - break; - } - } - // echo "<p>"; - - - for ($i=0; $i < $RSDB_intern_catlevel; $i++) { - // echo "<br>Ring0: ".$i." "; - for ($k=1; $k < ($RSDB_intern_catlevel+1-$i); $k++) { - // echo $k."|"; - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_categories WHERE cat_id = :cat_id AND `cat_visible` = '1' AND cat_comp = '1'"); - $stmt->bindParam('cat_id',$RSDB_TEMP_cat_current_id,PDO::PARAM_STR); - $stmt->execute(); - $result_category_tree_temp=$stmt->fetch(PDO::FETCH_ASSOC); - $RSDB_TEMP_cat_current_id = $result_category_tree_temp['cat_path']; - - // echo "K:".$k."|E:".($result_category_treehistory['cat_level']+1-$i); - if ($k == $RSDB_TEMP_cat_current_counter) { - $RSDB_TEMP_current_category = $result_category_tree_temp['cat_name']; - $RSDB_TEMP_current_category_desc = $result_category_tree_temp['cat_description']; - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_category_cat.$result_category_tree_temp['cat_id']; - if (!empty($_GET['cat2']) && $_GET['cat2'] != 'flat') { - echo "&cat2=".htmlentities(@$_GET['cat2']); - } - echo "'>".$result_category_tree_temp['cat_name']."</a>"; - } - } - $RSDB_TEMP_cat_current_counter--; - $k=1; - $RSDB_TEMP_cat_current_id=""; - $RSDB_TEMP_cat_current_id = $RSDB_TEMP_cat_id; - - } - //create_historybar($RSDB_TEMP_cat_path, $RSDB_TEMP_cat_id, $RSDB_TEMP_cat_current_level); - } - - if ($RSDB_SET_group != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp = '1' ORDER BY grpentr_name ASC"); - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC); - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_group.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>"; - } - if (isset($_GET['item']) && $_GET['item'] != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC"); - $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::PARAM_STR); - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_group.htmlspecialchars($_GET['item'])."'>".$result_current_group['comp_name']; - - echo " ["."ReactOS ".show_osversion($result_current_group['comp_osversion'])."]"; - - echo "</a>"; - } - - } - echo "</td></tr></table>"; - include('inc/tree/tree_menubar_sections.php'); - - if ($RSDB_SET_group == "" && isset($_GET['item']) && $_GET['item'] == "" && $RSDB_viewpage != false) { - echo "<h2>".$RSDB_TEMP_current_category."</h2>"; - echo "<p>".$RSDB_TEMP_current_category_desc."</p>"; - } - - if ($RSDB_viewpage != false) { - if ($RSDB_SET_group != "" || isset($_GET['item']) && $_GET['item'] != "") { - echo "<br />"; - } - else { - echo "<p align='center'>"; - if (isset($_GET['cat2']) && $_GET['cat2'] == 'flat') { - echo "<b>Flat Style</b> | <a href='".$RSDB_intern_link_category_cat.htmlspecialchars(@$_GET['cat'])."&cat2=tree'>Tree Style</a>"; - } - elseif (isset($_GET['cat2']) && $_GET['cat2'] == 'tree') { - echo "<a href='".$RSDB_intern_link_category_cat.htmlspecialchars(@$_GET['cat'])."&cat2=flat'>Flat Style</a> | <b>Tree Style</b>"; - } - echo "</p>"; - } - } - } -?> - - -<?php - if (isset($_GET['page']) && ($_GET['page'] == "name" || $_GET['page'] == "vendor")) { - if ($_GET['page'] == "name") { - if (isset($_GET['item']) && $_GET['item'] != "") { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC") ; - $stmt->bindParam('item_id',@$_GET['item'],PDO::PARAM_STR); - $stmt->execute(); - $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_itempid['comp_groupid'] == "" || $result_itempid['comp_groupid'] == "0") { - $RSDB_viewpage = false; - } - $RSDB_SET_group = $result_itempid['comp_groupid']; - } - if ($RSDB_SET_group != "") { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id ORDER BY grpentr_id ASC"); - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_groupid = $stmt->fetch(PDO::FETCH_ASSOC); - $RSDB_SET_letter = strtolower(substr($result_groupid['grpentr_name'], 0, 1)); - } - ?> - <table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#5984C3"> - <tr> - <td> <font size="2">Browsing: </font> <a href="<?php echo $RSDB_intern_link_name_letter_EX."all"; ?>"><?php - - if ($RSDB_SET_letter != "") { - echo ucfirst($RSDB_SET_letter); - } - else { - echo "All"; - } - - echo "</a>"; - - if (isset($_GET['item']) && $_GET['item'] != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance("SELECT * FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC"); - $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR); - $stmt->execute(); - $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_itempid['comp_groupid'] == "" || $result_itempid['comp_groupid'] == "0") { - //die(""); - $RSDB_viewpage = false; - } - $RSDB_SET_group = $result_itempid['comp_groupid']; - } - if ($RSDB_SET_group != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp = '1' ORDER BY grpentr_name ASC"); - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_current_group['grpentr_category'] == "" || $result_current_group['grpentr_category'] == "0") { - //die(""); - $RSDB_viewpage = false; - } - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_group.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>"; - } - if (isset($_GET['item']) && $_GET['item'] != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id ORDER BY comp_name ASC"); - $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC); - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_item_EX.htmlspecialchars($_GET['item'])."'>".$result_current_group['comp_name']; - - echo " ["."ReactOS ".show_osversion($result_current_group['comp_osversion'])."]"; - - echo "</a>"; - } - - echo "</td></tr></table>"; - - } - elseif ($_GET['page'] == "vendor") { - - if (isset($_GET['vendor']) && $_GET['vendor'] != '') { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC"); - $stmt->bindParam('vendor_id',$_GET['vendor'],PDO::PARAM_STR); - $stmt->execute(); - $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_itempid['vendor_id'] == "" || $result_itempid['vendor_id'] == "0") { - $RSDB_viewpage = false; - } - $RSDB_SET_letter = strtolower(substr($result_itempid['vendor_name'], 0, 1)); - } - ?> - <table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#5984C3"> - <tr> - <td> <font size="2">Browsing: <a href="<?php echo $RSDB_intern_link_vendor_letter_EX.$RSDB_SET_letter; ?>"> - - <?php - - if ($RSDB_SET_letter != "") { - echo ucfirst($RSDB_SET_letter); - } - else { - echo "All"; - } - - echo "</a></font>"; - - if (isset($_GET['vendor']) && $_GET['vendor'] != '' && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC"); + } + } // end while + + echo $output; + } // end of member function tree + + + + private static function vendor( $param, $param_type ) + { + + if ($param > 0 && $param_type === self::PARAM_ENTRY) { + $stmt=CDBConnection::getInstance()->prepare("SELECT grpentr_vendor, grpentr_name FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id") ; + $stmt->bindParam('group_id',$param,PDO::PARAM_INT); + $stmt->execute(); + $vendor_id = $stmt->fetchColumn(); + + if ($vendor_id === false) { + echo 'Unknown Group'; + return; + } + } + + // check if entry version exists and is visible + elseif ($param > 0 && $param_type === self::PARAM_VERSION) { + //@TODO + } + + // no valid params + else { + echo 'Unknown parameter'; + return; + } + + if ($vendor_id) { + $stmt=CDBConnection::getInstance()->prepare("SELECT vendor_name FROM rsdb_item_vendor WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC"); $stmt->bindParam('vendor_id',$_GET['vendor'],PDO::PARAM_STR); $stmt->execute(); - $result_itempid = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_itempid['vendor_id'] == "" || $result_itempid['vendor_id'] == "0") { - //die(""); - $RSDB_viewpage = false; - } - //$RSDB_SET_group = $result_itempid['vendor_id']; - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_vendor_id_EX.htmlspecialchars($_GET['vendor'])."'>".$result_itempid['vendor_name']."</a>"; - } - if ($RSDB_SET_group != "" && $RSDB_viewpage != false) { - $stmt=CDBConnection::getInstance()->prepare("SELECT * FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id AND grpentr_comp = '1' ORDER BY grpentr_name ASC"); - $stmt->bindParam('group_id',$RSDB_SET_group,PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::FETCH_ASSOC); - if ($result_current_group['grpentr_category'] == "" || $result_current_group['grpentr_category'] == "0") { - //die(""); - $RSDB_viewpage = false; - } - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_name_group_EX.$RSDB_SET_group."'>".$result_current_group['grpentr_name']."</a>"; - } - if (isset($_GET['item']) && $_GET['item'] != "" && $RSDB_viewpage != false) { - $stmt=CDBCOnnection::getInstance()->prepare("SELECT * FROM rsdb_item_vendor WHERE vendor_id = :vendor_id ORDER BY vendor_name ASC"); - $stmt->bindParam('group_id',@$_GET['vendor'],PDO::PARAM_STR); - $stmt->execute(); - $result_current_group = $stmt->fetch(PDO::PARAM_STR); - echo " <font size='2'>→</font> <a href='".$RSDB_intern_link_name_item_EX.htmlspecialchars($_GET['item'])."'>".$result_current_group['vendor_name']; - echo "</a>"; - } - - echo "</td></tr></table>"; - - } - - - - - include('inc/tree/tree_menubar_sections.php'); - - if (isset($_GET['page']) && $_GET['page'] == "name") { - $RSDB_TEMP_link_letter = $RSDB_intern_link_name_letter_EX; - } - elseif (isset($_GET['page']) && $_GET['page'] == "vendor") { - $RSDB_TEMP_link_letter = $RSDB_intern_link_vendor_letter_EX; - } - - if ($RSDB_viewpage != false) { - - echo '<p align="center">'; - - if ($RSDB_SET_letter == "all" || $RSDB_SET_letter == "") { - echo ' <b>All</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'all" class="letterbarlink">All</a> '; - } - - if ($RSDB_SET_letter == "a") { - echo ' <b>A</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'a" class="letterbarlink">A</a> '; - } - - if ($RSDB_SET_letter == "b") { - echo ' <b>B</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'b" class="letterbarlink">B</a> '; - } - - if ($RSDB_SET_letter == "c") { - echo ' <b>C</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'c" class="letterbarlink">C</a> '; - } - - if ($RSDB_SET_letter == "d") { - echo ' <b>D</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'d" class="letterbarlink">D</a> '; - } - - if ($RSDB_SET_letter == "e") { - echo ' <b>E</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'e" class="letterbarlink">E</a> '; - } - - if ($RSDB_SET_letter == "f") { - echo ' <b>F</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'f" class="letterbarlink">F</a> '; - } - - if ($RSDB_SET_letter == "g") { - echo ' <b>G</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'g" class="letterbarlink">G</a> '; - } - - if ($RSDB_SET_letter == "h") { - echo ' <b>H</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'h" class="letterbarlink">H</a> '; - } - - if ($RSDB_SET_letter == "i") { - echo ' <b>I</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'i" class="letterbarlink">I</a> '; - } - - if ($RSDB_SET_letter == "j") { - echo ' <b>J</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'j" class="letterbarlink">J</a> '; - } - - if ($RSDB_SET_letter == "k") { - echo ' <b>K</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'k" class="letterbarlink">K</a> '; - } - - if ($RSDB_SET_letter == "l") { - echo ' <b>L</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'l" class="letterbarlink">L</a> '; - } - - if ($RSDB_SET_letter == "m") { - echo ' <b>M</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'m" class="letterbarlink">M</a> '; - } - - if ($RSDB_SET_letter == "n") { - echo ' <b>N</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'n" class="letterbarlink">N</a> '; - } - - if ($RSDB_SET_letter == "o") { - echo ' <b>O</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'o" class="letterbarlink">O</a> '; - } - - if ($RSDB_SET_letter == "p") { - echo ' <b>P</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'p" class="letterbarlink">P</a> '; - } - - if ($RSDB_SET_letter == "q") { - echo ' <b>Q</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'q" class="letterbarlink">Q</a> '; - } - - if ($RSDB_SET_letter == "r") { - echo ' <b>R</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'r" class="letterbarlink">R</a> '; - } - - if ($RSDB_SET_letter == "s") { - echo ' <b>S</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'s" class="letterbarlink">S</a> '; - } - - if ($RSDB_SET_letter == "t") { - echo ' <b>T</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'t" class="letterbarlink">T</a> '; - } - - if ($RSDB_SET_letter == "u") { - echo ' <b>U</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'u" class="letterbarlink">U</a> '; - } - - if ($RSDB_SET_letter == "v") { - echo ' <b>V</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'v" class="letterbarlink">V</a> '; - } - - if ($RSDB_SET_letter == "w") { - echo ' <b>W</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'w" class="letterbarlink">W</a> '; - } - - if ($RSDB_SET_letter == "x") { - echo ' <b>X</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'x" class="letterbarlink">X</a> '; - } - - if ($RSDB_SET_letter == "y") { - echo ' <b>Y</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'y" class="letterbarlink">Y</a> '; - } - - if ($RSDB_SET_letter == "z") { - echo ' <b>Z</b> '; - } - else { - echo ' <a href="'. $RSDB_TEMP_link_letter .'z" class="letterbarlink">Z</a> '; - } - - echo "</p><br />"; - - } - } - - if ($RSDB_viewpage == false) { - echo "<p>No related database entry found!</p>"; - } - - - //Message::show("Compatibility"); -?> + $vendor_name = $stmt->fetchColumn(); + if ($vendor === false) { + echo 'Unknown Vendor'; + return; + } + } + else { + echo 'Can\'t find Vendor'; + } + + echo '<li>'.$vendor_name.'</li>'; + } // end of member function vendor + + + + private static function initial( $param, $param_type ) + { + global $RSDB_intern_link_name_letter_EX; + + // get entry by version + if ($param > 0 && $param_type === self::PARAM_VERSION) { + $stmt=CDBConnection::getInstance()->prepare("SELECT comp_groupid FROM rsdb_item_comp WHERE comp_visible = '1' AND comp_id = :item_id") ; + $stmt->bindParam('item_id',$_GET['item'],PDO::PARAM_INT); + $stmt->execute(); + $group_id = $stmt->fetchColumn(); + + if ($group_id === false) { + echo 'Unknown Item'; + return; + } + $group_id = $result_itempid['comp_groupid']; + } + + // get first letter by entry + elseif ($param > 0 && $param_type === self::PARAM_ENTRY) { + $group_id = $param; + } + + // we need an entry to get the first char + if (isset($group_id)) { + $stmt=CDBConnection::getInstance()->prepare("SELECT UPPER(SUBSTRING(LTRIM(grpentr_name), 1, 1)) AS letter, grpentr_name FROM rsdb_groups WHERE grpentr_visible = '1' AND grpentr_id = :group_id"); + $stmt->bindParam('group_id',$group_id,PDO::PARAM_INT); + $stmt->execute(); + $group = $stmt->fetchOnce(PDO::FETCH_ASSOC); + $letter = $group['letter']; + } + else { + echo 'Unknown Entry'; + return; + } + + // number + if ($letter > 0) { + echo ' + <li style="float: left;"><a href="'.$RSDB_intern_link_name_letter_EX.strtolower($letter).'">#</a></li>'; + } + + // letter + elseif ($letter != '') { + echo ' + <li style="float: left;"><a href="'.$RSDB_intern_link_name_letter_EX.strtolower($letter).'">'.$letter.'</a></li>'; + } + + // Unknown letter + else { + echo ' + <li style="float: left;">Unknown</li>'; + } + } // end of member function initial + + + +} // end of Breadcrumb + Propchange:
branches/danny-web/reactos.org/htdocs/compat/lib/view/Breadcrumb.class.php
------------------------------------------------------------------------------ svn:mergeinfo = Modified:
branches/danny-web/reactos.org/htdocs/compat/rsdb_config.php
URL:
http://svn.reactos.org/svn/reactos/branches/danny-web/reactos.org/htdocs/co…
============================================================================== ---
branches/danny-web/reactos.org/htdocs/compat/rsdb_config.php
[iso-8859-1] (original) +++
branches/danny-web/reactos.org/htdocs/compat/rsdb_config.php
[iso-8859-1] Thu Apr 9 19:02:43 2009 @@ -70,17 +70,16 @@ // View $RSDB_intern_link_db_view = $RSDB_intern_index_php."?page=".htmlspecialchars(@$_GET['page']); - $RSDB_intern_link_db_view2 = $RSDB_intern_index_php."?page=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&cat2=".htmlspecialchars(@$_GET['cat2'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&vendor=".htmlspecialchars(@$_GET['vendor']).""; + $RSDB_intern_link_db_view2 = $RSDB_intern_index_php."?page=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&vendor=".htmlspecialchars(@$_GET['vendor']).""; // Category - $RSDB_intern_link_category_all = $RSDB_intern_link_db_sec.htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&cat2=".htmlspecialchars(@$_GET['cat2']); + $RSDB_intern_link_category_all = $RSDB_intern_link_db_sec.htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat']); - $RSDB_intern_link_category_cat = $RSDB_intern_link_db_sec.htmlspecialchars(@$_GET['page'])."&cat2=".htmlspecialchars(@$_GET['cat2'])."&cat="; - $RSDB_intern_link_category_cat2 = $RSDB_intern_link_db_sec.htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&cat2="; + $RSDB_intern_link_category_cat = $RSDB_intern_link_db_sec.htmlspecialchars(@$_GET['page'])."&cat="; - $RSDB_intern_link_category_EX = $RSDB_intern_link_db_sec."category&cat2=".htmlspecialchars(@$_GET['cat2'])."&cat="; - $RSDB_intern_link_cat_EX = $RSDB_intern_link_db_sec."category&cat2=".htmlspecialchars(@$_GET['cat2'])."&cat="; + $RSDB_intern_link_category_EX = $RSDB_intern_link_db_sec."category&cat="; + $RSDB_intern_link_cat_EX = $RSDB_intern_link_db_sec."category&cat="; $RSDB_intern_link_cat2_EX = $RSDB_intern_link_db_sec."category&cat="; @@ -151,10 +150,10 @@ // Language - $RSDB_intern_link_language = $RSDB_intern_index_php."?page=".htmlspecialchars(@$_GET['page'])."&sec=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&cat2=".htmlspecialchars(@$_GET['cat2'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&order=".$RSDB_SET_order."&filter=".$RSDB_SET_filter."&vendor=".htmlspecialchars(@$_GET['vendor'])."&lang="; + $RSDB_intern_link_language = $RSDB_intern_index_php."?page=".htmlspecialchars(@$_GET['page'])."&sec=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&order=".$RSDB_SET_order."&filter=".$RSDB_SET_filter."&vendor=".htmlspecialchars(@$_GET['vendor'])."&lang="; // Export - $RSDB_intern_link_export = $RSDB_intern_index_php."?page=dat&sec=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&cat2=".htmlspecialchars(@$_GET['cat2'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&order=".$RSDB_SET_order."&filter=".$RSDB_SET_filter."&vendor=".htmlspecialchars(@$_GET['vendor'])."&lang=".$rpm_lang."&export="; + $RSDB_intern_link_export = $RSDB_intern_index_php."?page=dat&sec=".htmlspecialchars(@$_GET['page'])."&cat=".htmlspecialchars(@$_GET['cat'])."&letter=".$RSDB_SET_letter."&group=".$RSDB_SET_group."&item=".htmlspecialchars(@$_GET['item'])."&order=".$RSDB_SET_order."&filter=".$RSDB_SET_filter."&vendor=".htmlspecialchars(@$_GET['vendor'])."&lang=".$rpm_lang."&export="; $RSDB_intern_link_export2 = $RSDB_intern_index_php."?page=dat&export=";
16 years, 1 month
1
0
0
0
[tkreuzer] 40429: Fix downloader progress bar, by using an ULONGLONG, so it doesn't overflow at ~40MB, instead up to 4GB downloads should work now.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Apr 9 18:20:24 2009 New Revision: 40429 URL:
http://svn.reactos.org/svn/reactos?rev=40429&view=rev
Log: Fix downloader progress bar, by using an ULONGLONG, so it doesn't overflow at ~40MB, instead up to 4GB downloads should work now. Modified: trunk/rosapps/applications/downloader/download.c Modified: trunk/rosapps/applications/downloader/download.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/downloader/do…
============================================================================== --- trunk/rosapps/applications/downloader/download.c [iso-8859-1] (original) +++ trunk/rosapps/applications/downloader/download.c [iso-8859-1] Thu Apr 9 18:20:24 2009 @@ -127,7 +127,7 @@ Item = GetDlgItem(This->hDialog, IDC_PROGRESS); if (NULL != Item && 0 != ulProgressMax) { - SendMessageW(Item, PBM_SETPOS, (ulProgress * 100) / ulProgressMax, 0); + SendMessageW(Item, PBM_SETPOS, ((ULONGLONG)ulProgress * 100) / ulProgressMax, 0); } Item = GetDlgItem(This->hDialog, IDC_STATUS);
16 years, 1 month
1
0
0
0
[fireball] 40428: - Recognize up to 4 partitions inside every primary partition table. However, installation will be performed to the first partition anyway.
by fireball@svn.reactos.org
Author: fireball Date: Thu Apr 9 16:42:09 2009 New Revision: 40428 URL:
http://svn.reactos.org/svn/reactos?rev=40428&view=rev
Log: - Recognize up to 4 partitions inside every primary partition table. However, installation will be performed to the first partition anyway. Modified: trunk/reactos/base/setup/usetup/partlist.c trunk/reactos/base/setup/usetup/partlist.h Modified: trunk/reactos/base/setup/usetup/partlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
============================================================================== --- trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] Thu Apr 9 16:42:09 2009 @@ -928,6 +928,7 @@ List->CurrentDisk = NULL; List->CurrentPartition = NULL; + List->CurrentPartitionNumber = 0; InitializeListHead (&List->DiskListHead); InitializeListHead (&List->BiosDiskListHead); @@ -984,6 +985,7 @@ { List->CurrentDisk = NULL; List->CurrentPartition = NULL; + List->CurrentPartitionNumber = 0; } else { @@ -995,6 +997,7 @@ if (IsListEmpty (&List->CurrentDisk->PartListHead)) { List->CurrentPartition = 0; + List->CurrentPartitionNumber = 0; } else { @@ -1002,6 +1005,7 @@ CONTAINING_RECORD (List->CurrentDisk->PartListHead.Flink, PARTENTRY, ListEntry); + List->CurrentPartitionNumber = 0; } } @@ -1091,7 +1095,8 @@ static VOID PrintPartitionData (PPARTLIST List, PDISKENTRY DiskEntry, - PPARTENTRY PartEntry) + PPARTENTRY PartEntry, + ULONG PartNumber) { CHAR LineBuffer[128]; COORD coPos; @@ -1147,44 +1152,44 @@ } else if (PartEntry->Unpartitioned == FALSE) { - if ((PartEntry->PartInfo[0].PartitionType == PARTITION_FAT_12) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_FAT_16) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_HUGE) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_XINT13)) + if ((PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT_12) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT_16) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_HUGE) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_XINT13)) { PartType = "FAT"; } - else if ((PartEntry->PartInfo[0].PartitionType == PARTITION_FAT32) || - (PartEntry->PartInfo[0].PartitionType == PARTITION_FAT32_XINT13)) + else if ((PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT32) || + (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_FAT32_XINT13)) { PartType = "FAT32"; } - else if (PartEntry->PartInfo[0].PartitionType == PARTITION_EXT2) + else if (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_EXT2) { PartType = "EXT2"; } - else if (PartEntry->PartInfo[0].PartitionType == PARTITION_IFS) + else if (PartEntry->PartInfo[PartNumber].PartitionType == PARTITION_IFS) { PartType = "NTFS"; /* FIXME: Not quite correct! */ } } #if 0 - if (PartEntry->PartInfo[0].PartitionLength.QuadPart >= 0x280000000LL) /* 10 GB */ - { - PartSize.QuadPart = (PartEntry->PartInfo[0].PartitionLength.QuadPart + (1 << 29)) >> 30; + if (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart >= 0x280000000LL) /* 10 GB */ + { + PartSize.QuadPart = (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart + (1 << 29)) >> 30; Unit = MUIGetString(STRING_GB); } else #endif - if (PartEntry->PartInfo[0].PartitionLength.QuadPart >= 0xA00000LL) /* 10 MB */ - { - PartSize.QuadPart = (PartEntry->PartInfo[0].PartitionLength.QuadPart + (1 << 19)) >> 20; + if (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart >= 0xA00000LL) /* 10 MB */ + { + PartSize.QuadPart = (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart + (1 << 19)) >> 20; Unit = MUIGetString(STRING_MB); } else { - PartSize.QuadPart = (PartEntry->PartInfo[0].PartitionLength.QuadPart + (1 << 9)) >> 10; + PartSize.QuadPart = (PartEntry->PartInfo[PartNumber].PartitionLength.QuadPart + (1 << 9)) >> 10; Unit = MUIGetString(STRING_KB); } @@ -1194,7 +1199,7 @@ MUIGetString(STRING_HDDINFOUNK5), (PartEntry->DriveLetter == 0) ? '-' : PartEntry->DriveLetter, (PartEntry->DriveLetter == 0) ? '-' : ':', - PartEntry->PartInfo[0].PartitionType, + PartEntry->PartInfo[PartNumber].PartitionType, PartSize.u.LowPart, Unit); } @@ -1211,7 +1216,8 @@ } Attribute = (List->CurrentDisk == DiskEntry && - List->CurrentPartition == PartEntry) ? + List->CurrentPartition == PartEntry && + List->CurrentPartitionNumber == PartNumber) ? FOREGROUND_BLUE | BACKGROUND_WHITE : FOREGROUND_WHITE | BACKGROUND_BLUE; @@ -1259,6 +1265,7 @@ USHORT Height; ULARGE_INTEGER DiskSize; PCHAR Unit; + ULONG i; Width = List->Right - List->Left - 1; Height = List->Bottom - List->Top - 2; @@ -1338,9 +1345,16 @@ LIST_FOR_EACH(PartEntry, &DiskEntry->PartListHead, PARTENTRY, ListEntry) { /* Print disk entry */ - PrintPartitionData (List, - DiskEntry, - PartEntry); + for (i=0; i<4; i++) + { + if (PartEntry->PartInfo[i].PartitionType != PARTITION_ENTRY_UNUSED) + { + PrintPartitionData (List, + DiskEntry, + PartEntry, + i); + } + } } /* Print separator line */ @@ -1589,6 +1603,7 @@ { List->CurrentDisk = DiskEntry; List->CurrentPartition = PartEntry; + List->CurrentPartitionNumber = i; DrawPartitionList (List); return TRUE; } @@ -1610,6 +1625,7 @@ PPARTENTRY PartEntry; PLIST_ENTRY Entry1; PLIST_ENTRY Entry2; + UCHAR i; /* Check for empty disks */ if (IsListEmpty (&List->DiskListHead)) @@ -1618,7 +1634,30 @@ /* Check for next usable entry on current disk */ if (List->CurrentPartition != NULL) { - Entry2 = List->CurrentPartition->ListEntry.Flink; + Entry2 = &List->CurrentPartition->ListEntry; + PartEntry = CONTAINING_RECORD (Entry2, PARTENTRY, ListEntry); + + /* Check if we can move inside primary partitions */ + for (i = List->CurrentPartitionNumber + 1; i < 4; i++) + { + if (PartEntry->PartInfo[i].PartitionType != PARTITION_ENTRY_UNUSED) + break; + } + + if (i == 4) + { + /* We're out of partitions in the current partition table. + Try to move to the next one if possible. */ + Entry2 = Entry2->Flink; + } + else + { + /* Just advance to the next partition */ + List->CurrentPartitionNumber = i; + DrawPartitionList (List); + return; + } + while (Entry2 != &List->CurrentDisk->PartListHead) { PartEntry = CONTAINING_RECORD (Entry2, PARTENTRY, ListEntry); @@ -1626,6 +1665,7 @@ // if (PartEntry->HidePartEntry == FALSE) { List->CurrentPartition = PartEntry; + List->CurrentPartitionNumber = 0; DrawPartitionList (List); return; } @@ -1650,6 +1690,7 @@ { List->CurrentDisk = DiskEntry; List->CurrentPartition = PartEntry; + List->CurrentPartitionNumber = 0; DrawPartitionList (List); return; } @@ -1670,6 +1711,7 @@ PPARTENTRY PartEntry; PLIST_ENTRY Entry1; PLIST_ENTRY Entry2; + UCHAR i; /* Check for empty disks */ if (IsListEmpty (&List->DiskListHead)) @@ -1678,7 +1720,28 @@ /* check for previous usable entry on current disk */ if (List->CurrentPartition != NULL) { - Entry2 = List->CurrentPartition->ListEntry.Blink; + Entry2 = &List->CurrentPartition->ListEntry; + PartEntry = CONTAINING_RECORD (Entry2, PARTENTRY, ListEntry); + + /* Check if we can move inside primary partitions */ + if (List->CurrentPartitionNumber > 0) + { + /* Find a previous partition */ + for (i = List->CurrentPartitionNumber - 1; i > 0; i--) + { + if (PartEntry->PartInfo[i].PartitionType != PARTITION_ENTRY_UNUSED) + break; + } + + /* Move to it and return */ + List->CurrentPartitionNumber = i; + DrawPartitionList (List); + return; + } + + /* Move to the previous entry */ + Entry2 = Entry2->Blink; + while (Entry2 != &List->CurrentDisk->PartListHead) { PartEntry = CONTAINING_RECORD (Entry2, PARTENTRY, ListEntry); @@ -1686,6 +1749,18 @@ // if (PartEntry->HidePartEntry == FALSE) { List->CurrentPartition = PartEntry; + + /* Find last existing partition in the table */ + for (i = 3; i > 0; i--) + { + if (PartEntry->PartInfo[i].PartitionType != PARTITION_ENTRY_UNUSED) + break; + } + + /* Move to it */ + List->CurrentPartitionNumber = i; + + /* Draw partition list and return */ DrawPartitionList (List); return; } @@ -1711,6 +1786,18 @@ { List->CurrentDisk = DiskEntry; List->CurrentPartition = PartEntry; + + /* Find last existing partition in the table */ + for (i = 3; i > 0; i--) + { + if (PartEntry->PartInfo[i].PartitionType != PARTITION_ENTRY_UNUSED) + break; + } + + /* Move to it */ + List->CurrentPartitionNumber = i; + + /* Draw partition list and return */ DrawPartitionList (List); return; } Modified: trunk/reactos/base/setup/usetup/partlist.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
============================================================================== --- trunk/reactos/base/setup/usetup/partlist.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/partlist.h [iso-8859-1] Thu Apr 9 16:42:09 2009 @@ -132,6 +132,7 @@ PDISKENTRY CurrentDisk; PPARTENTRY CurrentPartition; + UCHAR CurrentPartitionNumber; PDISKENTRY ActiveBootDisk; PPARTENTRY ActiveBootPartition;
16 years, 1 month
1
0
0
0
[gschneider] 40427: - REGION_AllocRgnWithHandle: allow creation of empty region - NtGdiExtCreateRegion: copy parameters in SEH, check them later without setting last error, loosen checks for zero requested regions (returns an empty region) - NtGdiGetRandomRgn: remove outdated comments and debug prints: DCs don't hold meta regions anymore - Fixes four gdi32 clipping winetests
by gschneider@svn.reactos.org
Author: gschneider Date: Thu Apr 9 16:16:51 2009 New Revision: 40427 URL:
http://svn.reactos.org/svn/reactos?rev=40427&view=rev
Log: - REGION_AllocRgnWithHandle: allow creation of empty region - NtGdiExtCreateRegion: copy parameters in SEH, check them later without setting last error, loosen checks for zero requested regions (returns an empty region) - NtGdiGetRandomRgn: remove outdated comments and debug prints: DCs don't hold meta regions anymore - Fixes four gdi32 clipping winetests Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Thu Apr 9 16:16:51 2009 @@ -2043,7 +2043,7 @@ hReg = pReg->BaseObject.hHmgr; - if (nReg == 1) + if (nReg == 0 || nReg == 1) { /* Testing shows that > 95% of all regions have only 1 rect. Including that here saves us from having to do another allocation */ @@ -2496,6 +2496,8 @@ HRGN hRgn; PROSRGNDATA Region; DWORD nCount = 0; + DWORD iType = 0; + DWORD dwSize = 0; NTSTATUS Status = STATUS_SUCCESS; MATRIX matrix; @@ -2504,14 +2506,8 @@ { ProbeForRead(RgnData, Count, 1); nCount = RgnData->rdh.nCount; - if (Count < sizeof(RGNDATAHEADER) + nCount * sizeof(RECT) || - nCount == 0 || - RgnData->rdh.iType != RDH_RECTANGLES || - RgnData->rdh.dwSize != sizeof(RGNDATAHEADER)) - { - Status = STATUS_INVALID_PARAMETER; - _SEH2_LEAVE; - } + iType = RgnData->rdh.iType; + dwSize = RgnData->rdh.dwSize; } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { @@ -2521,6 +2517,14 @@ if (!NT_SUCCESS(Status)) { SetLastNtError(Status); + return NULL; + } + + /* Check parameters, but don't set last error here */ + if (Count < sizeof(RGNDATAHEADER) + nCount * sizeof(RECT) || + iType != RDH_RECTANGLES || + dwSize != sizeof(RGNDATAHEADER)) + { return NULL; } @@ -2712,10 +2716,7 @@ if (pDC->dclevel.prgnMeta) hSrc = ((PROSRGNDATA)pDC->dclevel.prgnMeta)->BaseObject.hHmgr; break; case APIRGN: - DPRINT1("hMetaRgn not implemented\n"); - //hSrc = dc->hMetaClipRgn; - if (!hSrc) hSrc = pDC->rosdc.hClipRgn; - //if (!hSrc) rgn = dc->hMetaRgn; + hSrc = pDC->rosdc.hClipRgn; // if (pDC->prgnAPI) hSrc = ((PROSRGNDATA)pDC->prgnAPI)->BaseObject.hHmgr; // else if (pDC->dclevel.prgnClip) hSrc = ((PROSRGNDATA)pDC->dclevel.prgnClip)->BaseObject.hHmgr; // else if (pDC->dclevel.prgnMeta) hSrc = ((PROSRGNDATA)pDC->dclevel.prgnMeta)->BaseObject.hHmgr;
16 years, 1 month
1
0
0
0
[gschneider] 40426: - Fix the coordinate manipulation order for AlphaBlend, BitBlt, GradientFill, ExtTextOutW, PatBlt, StretchBltMask and TransparentBlt - The correct setting order is: calculation of base coordinates, conversion to device units, offset by dc origin; thanks to Timo for this hint - Misc: remove unused variable in BitBlt, fix a comment in PolyLine
by gschneider@svn.reactos.org
Author: gschneider Date: Thu Apr 9 04:40:37 2009 New Revision: 40426 URL:
http://svn.reactos.org/svn/reactos?rev=40426&view=rev
Log: - Fix the coordinate manipulation order for AlphaBlend, BitBlt, GradientFill, ExtTextOutW, PatBlt, StretchBltMask and TransparentBlt - The correct setting order is: calculation of base coordinates, conversion to device units, offset by dc origin; thanks to Timo for this hint - Misc: remove unused variable in BitBlt, fix a comment in PolyLine Modified: trunk/reactos/subsystems/win32/win32k/objects/bitblt.c trunk/reactos/subsystems/win32/win32k/objects/fillshap.c trunk/reactos/subsystems/win32/win32k/objects/freetype.c trunk/reactos/subsystems/win32/win32k/objects/line.c Modified: trunk/reactos/subsystems/win32/win32k/objects/bitblt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Thu Apr 9 04:40:37 2009 @@ -86,23 +86,27 @@ DCSrc = DCDest; } - /* Offset the destination and source by the origin of their DCs. */ - XOriginDest += DCDest->ptlDCOrig.x; - YOriginDest += DCDest->ptlDCOrig.y; - XOriginSrc += DCSrc->ptlDCOrig.x; - YOriginSrc += DCSrc->ptlDCOrig.y; - DestRect.left = XOriginDest; DestRect.top = YOriginDest; DestRect.right = XOriginDest + WidthDest; DestRect.bottom = YOriginDest + HeightDest; IntLPtoDP(DCDest, (LPPOINT)&DestRect, 2); + DestRect.left += DCDest->ptlDCOrig.x; + DestRect.top += DCDest->ptlDCOrig.y; + DestRect.right += DCDest->ptlDCOrig.x; + DestRect.bottom += DCDest->ptlDCOrig.y; + SourceRect.left = XOriginSrc; SourceRect.top = YOriginSrc; SourceRect.right = XOriginSrc + WidthSrc; SourceRect.bottom = YOriginSrc + HeightSrc; IntLPtoDP(DCSrc, (LPPOINT)&SourceRect, 2); + + SourceRect.left += DCSrc->ptlDCOrig.x; + SourceRect.top += DCSrc->ptlDCOrig.y; + SourceRect.right += DCSrc->ptlDCOrig.x; + SourceRect.bottom += DCSrc->ptlDCOrig.y; if (!DestRect.right || !DestRect.bottom || @@ -189,7 +193,7 @@ PDC_ATTR pdcattr = NULL; SURFACE *BitmapDest, *BitmapSrc = NULL; RECTL DestRect; - POINTL SourcePoint, BrushOrigin; + POINTL SourcePoint; BOOL Status = FALSE; XLATEOBJ *XlateObj = NULL; BOOL UsesSource = ROP3_USES_SOURCE(ROP); @@ -237,31 +241,27 @@ if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) DC_vUpdateFillBrush(DCDest); - /* Offset the destination and source by the origin of their DCs. */ - XDest += DCDest->ptlDCOrig.x; - YDest += DCDest->ptlDCOrig.y; - if (UsesSource) - { - XSrc += DCSrc->ptlDCOrig.x; - YSrc += DCSrc->ptlDCOrig.y; - } - DestRect.left = XDest; DestRect.top = YDest; DestRect.right = XDest+Width; DestRect.bottom = YDest+Height; - IntLPtoDP(DCDest, (LPPOINT)&DestRect, 2); + + DestRect.left += DCDest->ptlDCOrig.x; + DestRect.top += DCDest->ptlDCOrig.y; + DestRect.right += DCDest->ptlDCOrig.x; + DestRect.bottom += DCDest->ptlDCOrig.y; SourcePoint.x = XSrc; SourcePoint.y = YSrc; + if (UsesSource) { IntLPtoDP(DCSrc, (LPPOINT)&SourcePoint, 1); - } - - BrushOrigin.x = 0; - BrushOrigin.y = 0; + + SourcePoint.x += DCSrc->ptlDCOrig.x; + SourcePoint.y += DCSrc->ptlDCOrig.y; + } /* Determine surfaces to be used in the bitblt */ BitmapDest = SURFACE_LockSurface(DCDest->rosdc.hBitmap); @@ -387,12 +387,6 @@ return TRUE; } - /* Offset positions */ - xDst += DCDest->ptlDCOrig.x; - yDst += DCDest->ptlDCOrig.y; - xSrc += DCSrc->ptlDCOrig.x; - ySrc += DCSrc->ptlDCOrig.y; - BitmapDest = SURFACE_LockSurface(DCDest->rosdc.hBitmap); if (!BitmapDest) { @@ -444,17 +438,27 @@ /* Create the XLATE object to convert colors between source and destination */ XlateObj = (XLATEOBJ*)IntEngCreateXlate(PalDestMode, PalSrcMode, DestPalette, SourcePalette); - rcDest.left = xDst; - rcDest.top = yDst; - rcDest.right = rcDest.left + cxDst; + rcDest.left = xDst; + rcDest.top = yDst; + rcDest.right = rcDest.left + cxDst; rcDest.bottom = rcDest.top + cyDst; IntLPtoDP(DCDest, (LPPOINT)&rcDest, 2); - rcSrc.left = xSrc; - rcSrc.top = ySrc; - rcSrc.right = rcSrc.left + cxSrc; + rcDest.left += DCDest->ptlDCOrig.x; + rcDest.top += DCDest->ptlDCOrig.y; + rcDest.right += DCDest->ptlDCOrig.x; + rcDest.bottom += DCDest->ptlDCOrig.y; + + rcSrc.left = xSrc; + rcSrc.top = ySrc; + rcSrc.right = rcSrc.left + cxSrc; rcSrc.bottom = rcSrc.top + cySrc; IntLPtoDP(DCSrc, (LPPOINT)&rcSrc, 2); + + rcSrc.left += DCSrc->ptlDCOrig.x; + rcSrc.top += DCSrc->ptlDCOrig.y; + rcSrc.right += DCSrc->ptlDCOrig.x; + rcSrc.bottom += DCSrc->ptlDCOrig.y; Ret = IntEngTransparentBlt(&BitmapDest->SurfObj, &BitmapSrc->SurfObj, DCDest->rosdc.CombinedClip, XlateObj, &rcDest, &rcSrc, @@ -792,28 +796,30 @@ if (pdcattr->ulDirty_ & (DIRTY_FILL | DC_BRUSH_DIRTY)) DC_vUpdateFillBrush(DCDest); - /* Offset the destination and source by the origin of their DCs. */ - XOriginDest += DCDest->ptlDCOrig.x; - YOriginDest += DCDest->ptlDCOrig.y; - if (UsesSource) - { - XOriginSrc += DCSrc->ptlDCOrig.x; - YOriginSrc += DCSrc->ptlDCOrig.y; - } - DestRect.left = XOriginDest; DestRect.top = YOriginDest; DestRect.right = XOriginDest+WidthDest; DestRect.bottom = YOriginDest+HeightDest; IntLPtoDP(DCDest, (LPPOINT)&DestRect, 2); + DestRect.left += DCDest->ptlDCOrig.x; + DestRect.top += DCDest->ptlDCOrig.y; + DestRect.right += DCDest->ptlDCOrig.x; + DestRect.bottom += DCDest->ptlDCOrig.y; + SourceRect.left = XOriginSrc; SourceRect.top = YOriginSrc; SourceRect.right = XOriginSrc+WidthSrc; SourceRect.bottom = YOriginSrc+HeightSrc; + if (UsesSource) { IntLPtoDP(DCSrc, (LPPOINT)&SourceRect, 2); + + SourceRect.left += DCSrc->ptlDCOrig.x; + SourceRect.top += DCSrc->ptlDCOrig.y; + SourceRect.right += DCSrc->ptlDCOrig.x; + SourceRect.bottom += DCSrc->ptlDCOrig.y; } BrushOrigin.x = 0; @@ -972,27 +978,32 @@ { if (Width > 0) { - DestRect.left = XLeft + dc->ptlDCOrig.x; - DestRect.right = XLeft + Width + dc->ptlDCOrig.x; + DestRect.left = XLeft; + DestRect.right = XLeft + Width; } else { - DestRect.left = XLeft + Width + 1 + dc->ptlDCOrig.x; - DestRect.right = XLeft + dc->ptlDCOrig.x + 1; + DestRect.left = XLeft + Width + 1; + DestRect.right = XLeft + 1; } if (Height > 0) { - DestRect.top = YLeft + dc->ptlDCOrig.y; - DestRect.bottom = YLeft + Height + dc->ptlDCOrig.y; + DestRect.top = YLeft; + DestRect.bottom = YLeft + Height; } else { - DestRect.top = YLeft + Height + dc->ptlDCOrig.y + 1; - DestRect.bottom = YLeft + dc->ptlDCOrig.y + 1; + DestRect.top = YLeft + Height + 1; + DestRect.bottom = YLeft + 1; } IntLPtoDP(dc, (LPPOINT)&DestRect, 2); + + DestRect.left += dc->ptlDCOrig.x; + DestRect.top += dc->ptlDCOrig.y; + DestRect.right += dc->ptlDCOrig.x; + DestRect.bottom += dc->ptlDCOrig.y; BrushOrigin.x = BrushObj->ptOrigin.x + dc->ptlDCOrig.x; BrushOrigin.y = BrushObj->ptOrigin.y + dc->ptlDCOrig.y; Modified: trunk/reactos/subsystems/win32/win32k/objects/fillshap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/fillshap.c [iso-8859-1] Thu Apr 9 04:40:37 2009 @@ -904,15 +904,18 @@ Extent.top = min(Extent.top, (pVertex + i)->y); Extent.bottom = max(Extent.bottom, (pVertex + i)->y); } - - DitherOrg.x = dc->ptlDCOrig.x; - DitherOrg.y = dc->ptlDCOrig.y; + IntLPtoDP(dc, (LPPOINT)&Extent, 2); + + Extent.left += dc->ptlDCOrig.x; + Extent.right += dc->ptlDCOrig.x; + Extent.top += dc->ptlDCOrig.y; + Extent.bottom += dc->ptlDCOrig.y; + + DitherOrg.x = DitherOrg.y = 0; IntLPtoDP(dc, (LPPOINT)&DitherOrg, 1); - Extent.left += DitherOrg.x; - Extent.right += DitherOrg.x; - Extent.top += DitherOrg.y; - Extent.bottom += DitherOrg.y; + DitherOrg.x += dc->ptlDCOrig.x; + DitherOrg.y += dc->ptlDCOrig.y; psurf = SURFACE_LockSurface(dc->rosdc.hBitmap); /* FIXME - psurf can be NULL!!! Don't assert but handle this case gracefully! */ Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Thu Apr 9 04:40:37 2009 @@ -3234,11 +3234,18 @@ if ((fuOptions & ETO_OPAQUE) && lprc) { - DestRect.left = lprc->left + dc->ptlDCOrig.x; - DestRect.top = lprc->top + dc->ptlDCOrig.y; - DestRect.right = lprc->right + dc->ptlDCOrig.x; - DestRect.bottom = lprc->bottom + dc->ptlDCOrig.y; + DestRect.left = lprc->left; + DestRect.top = lprc->top; + DestRect.right = lprc->right; + DestRect.bottom = lprc->bottom; + IntLPtoDP(dc, (LPPOINT)&DestRect, 2); + + DestRect.left += dc->ptlDCOrig.x; + DestRect.top += dc->ptlDCOrig.y; + DestRect.right += dc->ptlDCOrig.x; + DestRect.bottom += dc->ptlDCOrig.y; + IntEngBitBlt( &psurf->SurfObj, NULL, Modified: trunk/reactos/subsystems/win32/win32k/objects/line.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] Thu Apr 9 04:40:37 2009 @@ -271,7 +271,7 @@ RtlCopyMemory(Points, pt, Count * sizeof(POINT)); IntLPtoDP(dc, Points, Count); - /* Offset the array of point by the dc->rosdc.DCOrg */ + /* Offset the array of points by the DC origin */ for (i = 0; i < Count; i++) { Points[i].x += dc->ptlDCOrig.x;
16 years, 1 month
1
0
0
0
[tkreuzer] 40425: IntChangeDisplaySettings: Save refresh frequency in the registry. Now it's possible to change display settings when using the VBox display driver.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Apr 9 03:15:35 2009 New Revision: 40425 URL:
http://svn.reactos.org/svn/reactos?rev=40425&view=rev
Log: IntChangeDisplaySettings: Save refresh frequency in the registry. Now it's possible to change display settings when using the VBox display driver. Modified: trunk/reactos/subsystems/win32/win32k/objects/device.c Modified: trunk/reactos/subsystems/win32/win32k/objects/device.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] Thu Apr 9 03:15:35 2009 @@ -1369,6 +1369,13 @@ Status = ZwSetValueKey(DevInstRegKey, &RegistryKey, 0, REG_DWORD, &NewValue, sizeof(NewValue)); } + if (NT_SUCCESS(Status) && DevMode->dmFields & DM_DISPLAYFREQUENCY) + { + RtlInitUnicodeString(&RegistryKey, L"DefaultSettings.VRefresh"); + NewValue = DevMode->dmDisplayFrequency; + Status = ZwSetValueKey(DevInstRegKey, &RegistryKey, 0, REG_DWORD, &NewValue, sizeof(NewValue)); + } + ZwClose(DevInstRegKey); if (NT_SUCCESS(Status)) Ret = DISP_CHANGE_RESTART;
16 years, 1 month
1
0
0
0
[tkreuzer] 40424: desk.cpl: update settings for dmDisplayFrequency, when changing the video mode
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Apr 9 03:08:02 2009 New Revision: 40424 URL:
http://svn.reactos.org/svn/reactos?rev=40424&view=rev
Log: desk.cpl: update settings for dmDisplayFrequency, when changing the video mode Modified: trunk/reactos/dll/cpl/desk/desk.h trunk/reactos/dll/cpl/desk/settings.c Modified: trunk/reactos/dll/cpl/desk/desk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/desk.h?rev=40…
============================================================================== --- trunk/reactos/dll/cpl/desk/desk.h [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/desk.h [iso-8859-1] Thu Apr 9 03:08:02 2009 @@ -67,6 +67,7 @@ DWORD dmBitsPerPel; DWORD dmPelsWidth; DWORD dmPelsHeight; + DWORD dmDisplayFrequency; } SETTINGS_ENTRY, *PSETTINGS_ENTRY; typedef struct _DISPLAY_DEVICE_ENTRY Modified: trunk/reactos/dll/cpl/desk/settings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/settings.c?re…
============================================================================== --- trunk/reactos/dll/cpl/desk/settings.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/settings.c [iso-8859-1] Thu Apr 9 03:08:02 2009 @@ -107,6 +107,7 @@ Current->dmPelsWidth = devmode.dmPelsWidth; Current->dmPelsHeight = devmode.dmPelsHeight; Current->dmBitsPerPel = devmode.dmBitsPerPel; + Current->dmDisplayFrequency = devmode.dmDisplayFrequency; while (Next != NULL && ( Next->dmPelsWidth < Current->dmPelsWidth || (Next->dmPelsWidth == Current->dmPelsWidth && Next->dmPelsHeight < Current->dmPelsHeight) || @@ -698,7 +699,8 @@ devmode.dmPelsWidth = pGlobalData->CurrentDisplayDevice->CurrentSettings->dmPelsWidth; devmode.dmPelsHeight = pGlobalData->CurrentDisplayDevice->CurrentSettings->dmPelsHeight; devmode.dmBitsPerPel = pGlobalData->CurrentDisplayDevice->CurrentSettings->dmBitsPerPel; - devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL; + devmode.dmDisplayFrequency = pGlobalData->CurrentDisplayDevice->CurrentSettings->dmDisplayFrequency; + devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY; rc = ChangeDisplaySettingsEx( pGlobalData->CurrentDisplayDevice->DeviceName, &devmode,
16 years, 1 month
1
0
0
0
[tkreuzer] 40423: Use vDbgPrintExWithPrefix in EngDebugPrint instead of using DbgPrint and always printing the address of the va_list plus random crap....
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Thu Apr 9 01:52:36 2009 New Revision: 40423 URL:
http://svn.reactos.org/svn/reactos?rev=40423&view=rev
Log: Use vDbgPrintExWithPrefix in EngDebugPrint instead of using DbgPrint and always printing the address of the va_list plus random crap.... Modified: trunk/reactos/subsystems/win32/win32k/eng/debug.c Modified: trunk/reactos/subsystems/win32/win32k/eng/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/debug.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/debug.c [iso-8859-1] Thu Apr 9 01:52:36 2009 @@ -40,8 +40,11 @@ PCHAR DebugMessage, va_list ap) { - DbgPrint(StandardPrefix); - DbgPrint(DebugMessage, ap); - DbgPrint("\n"); + vDbgPrintExWithPrefix(StandardPrefix, + -1, + DPFLTR_ERROR_LEVEL, + DebugMessage, + ap); } + /* EOF */
16 years, 1 month
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
48
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Results per page:
10
25
50
100
200