winehq.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
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2007
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
844 discussions
Start a n
N
ew thread
Chris Peterson : comctl32: treeview: Message sequencing tests.
by Alexandre Julliard
12 Mar '07
12 Mar '07
Module: wine Branch: master Commit: ee2804fda5874eb5d7f3972e19a22b86e1b4953e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee2804fda5874eb5d7f3972e1…
Author: Chris Peterson <Chrisp(a)ucla.edu> Date: Fri Mar 9 12:12:18 2007 -0800 comctl32: treeview: Message sequencing tests. --- dlls/comctl32/tests/treeview.c | 280 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 265 insertions(+), 15 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ee2804fda5874eb5d7f39…
1
0
0
0
appdb/. appdbStats.php viewScreenshots.php
by WineHQ
11 Mar '07
11 Mar '07
ChangeSet ID: 30956 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/03/11 17:42:29 Modified files: . : appdbStats.php viewScreenshots.php Log message: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Replace references to getNumberOfImages() Patch:
http://cvs.winehq.org/patch.py?id=30956
Old revision New revision Changes Path 1.12 1.13 +2 -2 appdb/appdbStats.php 1.8 1.9 +5 -2 appdb/viewScreenshots.php Index: appdb/appdbStats.php diff -u -p appdb/appdbStats.php:1.12 appdb/appdbStats.php:1.13 --- appdb/appdbStats.php:1.12 11 Mar 2007 22:42:29 -0000 +++ appdb/appdbStats.php 11 Mar 2007 22:42:29 -0000 @@ -73,8 +73,8 @@ echo "</tr>\n\n"; /* Display the number of images */ echo "<tr class=color4>\n"; -echo " <td>Images:</td>\n"; -echo " <td>".getNumberOfImages()."</td>\n"; +echo " <td>Screenshots:</td>\n"; +echo " <td>".appData::objectGetEntriesCount(false)."</td>\n"; echo "</tr>\n\n"; echo "</table>\n\n"; Index: appdb/viewScreenshots.php diff -u -p appdb/viewScreenshots.php:1.8 appdb/viewScreenshots.php:1.9 --- appdb/viewScreenshots.php:1.8 11 Mar 2007 22:42:29 -0000 +++ appdb/viewScreenshots.php 11 Mar 2007 22:42:29 -0000 @@ -22,7 +22,7 @@ if($aClean['iPage']) $currentPage = $aClean['iPage']; $ItemsPerPage = min($ItemsPerPage,100); -$totalPages = ceil(getNumberOfImages()/$ItemsPerPage); +$totalPages = ceil(appData::objectGetEntriesCount(false)/$ItemsPerPage); $currentPage = min($currentPage,$totalPages); $offset = (($currentPage-1) * $ItemsPerPage); @@ -58,7 +58,10 @@ echo "</center>"; /* query for all of the Screenshots in assending order */ $Ids = query_parameters("SELECT * from appData - WHERE type = 'image' + WHERE + type = 'screenshot' + AND + queued = 'false' ORDER BY id ASC LIMIT ?, ?", $offset, $ItemsPerPage); $c = 1;
1
0
0
0
appdb/include appData.php
by WineHQ
11 Mar '07
11 Mar '07
ChangeSet ID: 30955 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/03/11 15:40:11 Modified files: include : appData.php Log message: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Fix appData's objectGetEntries*() Patch:
http://cvs.winehq.org/patch.py?id=30955
Old revision New revision Changes Path 1.5 1.6 +108 -55 appdb/include/appData.php
1
0
0
0
appdb/include maintainer.php sidebar_admin.php
by WineHQ
11 Mar '07
11 Mar '07
ChangeSet ID: 30954 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/03/11 15:39:02 Modified files: include : maintainer.php sidebar_admin.php Log message: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com>, Chris Morgan <cmorgan(a)alum.wpi.edu> Fix queued maintainer sql with missing join causing millions of rows to be generated by a relatively simple sql statement Patch:
http://cvs.winehq.org/patch.py?id=30954
Old revision New revision Changes Path 1.27 1.28 +23 -9 appdb/include/maintainer.php 1.29 1.30 +1 -1 appdb/include/sidebar_admin.php Index: appdb/include/maintainer.php diff -u -p appdb/include/maintainer.php:1.27 appdb/include/maintainer.php:1.28 --- appdb/include/maintainer.php:1.27 11 Mar 2007 20:39: 2 -0000 +++ appdb/include/maintainer.php 11 Mar 2007 20:39: 2 -0000 @@ -270,19 +270,33 @@ class maintainer return $aAppsMaintained; } - function getQueuedMaintainerCount() + function objectGetEntriesCount($bQueued) { /* Excluding requests for queued apps and versions, as these are handled automatically. One SELECT for super maintainers, one for maintainers. */ - $sQuery = "SELECT COUNT(DISTINCT maintainerId) as queued_maintainers FROM - appMaintainers, appFamily, appVersion - WHERE appMaintainers.queued='true' AND ((appFamily.appId = - appMaintainers.appId AND appFamily.queued = 'false' AND - appMaintainers.versionId = '') OR ( - appVersion.versionId = appMaintainers.versionId - AND appVersion.queued = 'false'))"; + $sQuery = "SELECT COUNT(DISTINCT maintainerId) as queued_maintainers FROM + appMaintainers, appFamily, appVersion WHERE + appMaintainers.queued = '?' + AND + appFamily.appId = appVersion.appId + AND + ( + ( + appFamily.appId = appMaintainers.appId + AND + appFamily.queued = 'false' + AND + appMaintainers.versionId = '' + ) + OR + ( + appVersion.versionId = appMaintainers.versionId + AND + appVersion.queued = 'false' + ) + )"; - if(!($hResult = query_parameters($sQuery))) + if(!($hResult = query_parameters($sQuery, $bQueued ? "true" : "false"))) return FALSE; $oRow = mysql_fetch_object($hResult); Index: appdb/include/sidebar_admin.php diff -u -p appdb/include/sidebar_admin.php:1.29 appdb/include/sidebar_admin.php:1.30 --- appdb/include/sidebar_admin.php:1.29 11 Mar 2007 20:39: 2 -0000 +++ appdb/include/sidebar_admin.php 11 Mar 2007 20:39: 2 -0000 @@ -21,7 +21,7 @@ function global_admin_menu() { "screenshot").")", BASE."objectManager.php?sClass=screenshot&bIsQueue=true&sTitle=". "Screenshot%20Queue"); - $g->add("View Maintainer Queue (".Maintainer::getQueuedMaintainerCount().")", + $g->add("View Maintainer Queue (".Maintainer::objectGetEntriesCount(true).")", BASE."objectManager.php?sClass=maintainer&bIsQueue=true&sTitle=". "Maintainer%20Queue"); $g->add("View Maintainer Entries (".Maintainer::getMaintainerCount().")",
1
0
0
0
appdb/include util.php
by WineHQ
11 Mar '07
11 Mar '07
ChangeSet ID: 30953 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/03/11 15:05:40 Modified files: include : util.php Log message: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Top 10 list, query for data type 'screenshot', not 'image' Patch:
http://cvs.winehq.org/patch.py?id=30953
Old revision New revision Changes Path 1.82 1.83 +1 -1 appdb/include/util.php Index: appdb/include/util.php diff -u -p appdb/include/util.php:1.82 appdb/include/util.php:1.83 --- appdb/include/util.php:1.82 11 Mar 2007 20: 5:40 -0000 +++ appdb/include/util.php 11 Mar 2007 20: 5:40 -0000 @@ -295,7 +295,7 @@ function outputTopXRowAppsFromRating($sR FROM appVersion, appData WHERE appVersion.maintainer_rating = '$sRating' AND appVersion.versionId = appData.versionId - AND appData.type = 'image' + AND appData.type = 'screenshot' AND appData.queued = 'false'"; /* make sure we exclude any apps we've already output */
1
0
0
0
appdb/include appData.php screenshot.php sideb ...
by WineHQ
11 Mar '07
11 Mar '07
ChangeSet ID: 30952 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/03/10 21:07:43 Modified files: include : appData.php screenshot.php sidebar_admin.php sidebar_maintainer_admin.php Log message: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Use object manager to process screenshot queue. Temporary fix for mysql overloading by limiting screenshot processing to submitters. Patch:
http://cvs.winehq.org/patch.py?id=30952
Old revision New revision Changes Path 1.4 1.5 +137 -5 appdb/include/appData.php 1.55 1.56 +35 -0 appdb/include/screenshot.php 1.28 1.29 +11 -5 appdb/include/sidebar_admin.php 1.2 1.3 +7 -3 appdb/include/sidebar_maintainer_admin.php
1
0
0
0
appdb/tables appdb_tables.sql
by WineHQ
11 Mar '07
11 Mar '07
ChangeSet ID: 30951 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/03/10 19:38:00 Modified files: tables : appdb_tables.sql Log message: Chris Morgan <cmorgan(a)alum.wpi.edu> Update appData table type field enum to reflect changing from 'image' to 'screenshot' Patch:
http://cvs.winehq.org/patch.py?id=30951
Old revision New revision Changes Path 1.30 1.31 +1 -1 appdb/tables/appdb_tables.sql Index: appdb/tables/appdb_tables.sql diff -u -p appdb/tables/appdb_tables.sql:1.30 appdb/tables/appdb_tables.sql:1.31 --- appdb/tables/appdb_tables.sql:1.30 11 Mar 2007 1:38: 1 -0000 +++ appdb/tables/appdb_tables.sql 11 Mar 2007 1:38: 1 -0000 @@ -134,7 +134,7 @@ create table appData ( id int not null auto_increment, appId int not null, versionId int default 0, - type enum('image', 'url', 'bug','downloadurl'), + type enum('screenshot', 'url', 'bug','downloadurl'), description text, url varchar(255) default NULL, submitTime timestamp(14) NOT NULL,
1
0
0
0
appdb/ admin/adminAppDataQueue.php admin/admin ...
by WineHQ
10 Mar '07
10 Mar '07
ChangeSet ID: 30950 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/03/10 17:31:47 Modified files: admin : adminAppDataQueue.php adminScreenshots.php include : screenshot.php util.php Log message: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Rename appData type 'image' to 'screenshot' Patch:
http://cvs.winehq.org/patch.py?id=30950
Old revision New revision Changes Path 1.31 1.32 +4 -4 appdb/admin/adminAppDataQueue.php 1.17 1.18 +3 -3 appdb/admin/adminScreenshots.php 1.54 1.55 +7 -7 appdb/include/screenshot.php 1.81 1.82 +0 -8 appdb/include/util.php Index: appdb/admin/adminAppDataQueue.php diff -u -p appdb/admin/adminAppDataQueue.php:1.31 appdb/admin/adminAppDataQueue.php:1.32 --- appdb/admin/adminAppDataQueue.php:1.31 10 Mar 2007 23:31:47 -0000 +++ appdb/admin/adminAppDataQueue.php 10 Mar 2007 23:31:47 -0000 @@ -106,10 +106,10 @@ if (!$aClean['iId']) echo '<td><textarea name="sDescription" rows=10 cols=35>'.stripslashes($obj_row->description).'</textarea></td></tr>',"\n"; //data - if($obj_row->type == "image") + if($obj_row->type == "screenshot") { $oScreenshot = new Screenshot($obj_row->id); - echo '<tr valign=top><td class=color0><b>Submited image</b></td>',"\n"; + echo '<tr valign=top><td class=color0><b>Submited screenshot</b></td>',"\n"; echo '<td>'; $imgSRC = '<img width="'.$oScreenshot->get_thumbnail_width().'" height="'.$oScreenshot->get_thumbnail_height().'" src="../appimage.php?bQueued=true&iId='.$obj_row->id.'" />'; // generate random tag for popup window @@ -152,7 +152,7 @@ if (!$aClean['iId']) $statusMessage = ""; $goodtogo = 0; - if($obj_row->type == "image") + if($obj_row->type == "screenshot") { $oScreenshot = new Screenshot($obj_row->id); $oScreenshot->unQueue(); @@ -186,7 +186,7 @@ if (!$aClean['iId']) util_redirect_and_exit(apidb_fullurl("admin/adminAppDataQueue.php")); } elseif ($aClean['sReject']) { - if($obj_row->type == "image") + if($obj_row->type == "screenshot") { $oScreenshot = new Screenshot($obj_row->id); $oScreenshot->delete(); Index: appdb/admin/adminScreenshots.php diff -u -p appdb/admin/adminScreenshots.php:1.17 appdb/admin/adminScreenshots.php:1.18 --- appdb/admin/adminScreenshots.php:1.17 10 Mar 2007 23:31:47 -0000 +++ appdb/admin/adminScreenshots.php 10 Mar 2007 23:31:47 -0000 @@ -35,7 +35,7 @@ apidb_header("Screenshots"); // regenerate all screenshots if($aClean['sRegenerate']) { - $sQuery = "SELECT id FROM appData WHERE type = 'image'"; + $sQuery = "SELECT id FROM appData WHERE type = 'screenshot'"; $hResult = query_parameters($sQuery); while($oRow = mysql_fetch_object($hResult)) { @@ -64,7 +64,7 @@ if($aClean['iPage']) $currentPage = $aClean['iPage']; $ItemsPerPage = min($ItemsPerPage,100); -$totalPages = ceil(getNumberOfImages()/$ItemsPerPage); +$totalPages = ceil(appData::objectGetEntriesCount("all", "screenshot")/$ItemsPerPage); $currentPage = min($currentPage,$totalPages); $offset = (($currentPage-1) * $ItemsPerPage); @@ -100,7 +100,7 @@ echo "</center>"; /* query for all of the Screenshots in assending order */ $Ids = query_parameters("SELECT * from appData - WHERE type = 'image' + WHERE type = 'screenshot' ORDER BY id ASC LIMIT ?, ?", $offset, $ItemsPerPage); $c = 1; echo "<div align=center><table><tr>\n"; Index: appdb/include/screenshot.php diff -u -p appdb/include/screenshot.php:1.54 appdb/include/screenshot.php:1.55 --- appdb/include/screenshot.php:1.54 10 Mar 2007 23:31:47 -0000 +++ appdb/include/screenshot.php 10 Mar 2007 23:31:47 -0000 @@ -36,7 +36,7 @@ class Screenshot { FROM appData, appVersion WHERE appData.versionId = appVersion.versionId AND id = '?' - AND type = 'image'", $iScreenshotId); + AND type = 'screenshot'", $iScreenshotId); if($hResult) { $oRow = mysql_fetch_object($hResult); @@ -73,7 +73,7 @@ class Screenshot { $hResult = query_parameters("INSERT INTO appData (versionId, type, description, queued, submitterId) ". "VALUES('?', '?', '?', '?', '?')", - $iVersionId, "image", $sDescription, $this->bQueued?"true":"false", + $iVersionId, "screenshot", $sDescription, $this->bQueued?"true":"false", $_SESSION['current']->iUserId); if($hResult) { @@ -190,7 +190,7 @@ class Screenshot { */ function setDescription($sDescription) { - if($hResult = query_parameters("UPDATE id SET description = '?' WHERE id = '?' AND type = 'image'", + if($hResult = query_parameters("UPDATE id SET description = '?' WHERE id = '?' AND type = 'screenshot'", $sDescription, $this->iScreenshotId)) $this->sDescription = $sDescription; } @@ -392,7 +392,7 @@ class Screenshot { FROM appData, appVersion WHERE appData.versionId = appVersion.versionId AND appVersion.appId = '?' - AND type = 'image' + AND type = 'screenshot' AND appData.queued = 'false' ORDER BY rand", $iAppId); } else if ($iVersionId) // we want a random screenshot for this version @@ -400,7 +400,7 @@ class Screenshot { $hResult = query_parameters("SELECT id, description, RAND() AS rand FROM appData WHERE versionId = '?' - AND type = 'image' + AND type = 'screenshot' AND queued = 'false' ORDER BY rand", $iVersionId); } @@ -457,7 +457,7 @@ class Screenshot { $hResult = query_parameters("SELECT appData.*, appVersion.appId as appId FROM appData, appVersion WHERE appVersion.versionId = appData.versionId - AND type = 'image' + AND type = 'screenshot' AND appVersion.appId = '?' AND appData.queued = '?'", $iAppId, $bQueued); } @@ -469,7 +469,7 @@ class Screenshot { $hResult = query_parameters("SELECT appData.*, appVersion.appId as appId FROM appData, appVersion WHERE appVersion.versionId = appData.versionId - AND type = 'image' + AND type = 'screenshot' AND appData.versionId = '?' AND appData.queued = '?'", $iVersionId, $bQueued); } else Index: appdb/include/util.php diff -u -p appdb/include/util.php:1.81 appdb/include/util.php:1.82 --- appdb/include/util.php:1.81 10 Mar 2007 23:31:47 -0000 +++ appdb/include/util.php 10 Mar 2007 23:31:47 -0000 @@ -221,14 +221,6 @@ function getNumberOfAppFamilies() return $oRow->num_appfamilies; } -/* Get the number of images in the database */ -function getNumberOfImages() -{ - $hResult = query_parameters("SELECT count(*) as num_images FROM appData WHERE type='image';"); - $oRow = mysql_fetch_object($hResult); - return $oRow->num_images; -} - /* Get the number of queued bug links in the database */ function getNumberOfQueuedBugLinks() {
1
0
0
0
appdb/include appData.php sidebar_admin.php si ...
by WineHQ
10 Mar '07
10 Mar '07
ChangeSet ID: 30949 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/03/10 15:21:10 Modified files: include : appData.php sidebar_admin.php sidebar_maintainer_admin.php user.php Log message: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Add and use appData::objectGetEntriesCount() Patch:
http://cvs.winehq.org/patch.py?id=30949
Old revision New revision Changes Path 1.3 1.4 +76 -0 appdb/include/appData.php 1.27 1.28 +3 -3 appdb/include/sidebar_admin.php 1.1 1.2 +1 -1 appdb/include/sidebar_maintainer_admin.php 1.83 1.84 +1 -9 appdb/include/user.php Index: appdb/include/appData.php diff -u -p appdb/include/appData.php:1.3 appdb/include/appData.php:1.4 --- appdb/include/appData.php:1.3 10 Mar 2007 21:21:10 -0000 +++ appdb/include/appData.php 10 Mar 2007 21:21:10 -0000 @@ -72,6 +72,82 @@ class appData return $hResult; } + + function objectGetEntriesCount($sQueued, $sType = null) + { + if(($sQueued == "true" || $sQueued == "all") && !appData::canEdit($sType)) + return FALSE; + + if(($sQueued == "true" || $sQueued == "all") && + !$_SESSION['current']->hasPriv("admin")) + { + $sQuery = "SELECT COUNT(DISTINCT id) as count FROM appData, appMaintainers, + appVersion, appFamily + WHERE appMaintainers.userId = '?' AND + ((((appMaintainers.appId = appFamily.appId) OR appMaintainers.appId = + appVersion.appId) AND + appMaintainers.superMaintainer = '1' AND (appData.appId = + appMaintainers.appId OR (appData.versionId = appVersion.versionId + AND appVersion.appId = appMaintainers.appId)) + ) OR (appMaintainers.superMaintainer = '0' AND appMaintainers.versionId = + appVersion.versionId AND appMaintainers.versionId = appData.versionId)) + AND appVersion.queued = 'false' AND + appFamily.queued = 'false'"; + + if($sQueued == "true") + $sQuery .= " AND appData.queued = 'true'"; + + if($sType) + { + $sQuery = " AND type = '?'"; + $hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, + $sType); + } else { + $hResult = query_parameters($sQuery, $_SESSION['current']->iUserId); + } + } else + { + $sQuery = "SELECT COUNT(DISTINCT id) as count FROM appData, + appFamily, appVersion + WHERE ((appData.appId = appFamily.appId) OR (appData.versionId = + appVersion.versionId)) AND appVersion.queued = 'false' AND + appFamily.queued = 'false'"; + + if($sQueued == "true" || $sQueued == "false") + $sQuery .= " AND appData.queued = '$sQueued'"; + + if($sType) + { + $sQuery .= " AND type = '?'"; + $hResult = query_parameters($sQuery,$sType); + } else + $hResult = query_parameters($sQuery); + } + + if(!$hResult) + return FALSE; + + if(!$oRow = mysql_fetch_object($hResult)) + return FALSE; + + return $oRow->count; + } + + function canEdit($sType = null) + { + if($sType) + { + $oObject = new $sType(); + return $oObject->canEdit(); + } else + { + if($_SESSION['current']->hasPriv("admin") || + maintainer::isUserMaintainer($_SESSION['current'])) + return TRUE; + else + return FALSE; + } + } } ?> Index: appdb/include/sidebar_admin.php diff -u -p appdb/include/sidebar_admin.php:1.27 appdb/include/sidebar_admin.php:1.28 --- appdb/include/sidebar_admin.php:1.27 10 Mar 2007 21:21:10 -0000 +++ appdb/include/sidebar_admin.php 10 Mar 2007 21:21:10 -0000 @@ -8,14 +8,14 @@ require_once(BASE."include/distribution. function global_admin_menu() { $g = new htmlmenu("Global Admin"); - + $g->add("Add Category", BASE."admin/addCategory.php"); $g->add("Add Vendor", BASE."objectManager.php?sClass=vendor&bQueue=". "false&sAction=add&sTitle=Add%20Vendor"); - + $g->addmisc(" "); $g->add("View App Queue (".$_SESSION['current']->getQueuedAppCount()."/".$_SESSION['current']->getQueuedVersionCount().")", BASE."admin/adminAppQueue.php"); - $g->add("View App Data Queue (".$_SESSION['current']->getQueuedAppDataCount().")", + $g->add("View App Data Queue (".appData::objectGetEntriesCount("true").")", BASE."admin/adminAppDataQueue.php"); $g->add("View Maintainer Queue (".Maintainer::getQueuedMaintainerCount().")", BASE."objectManager.php?sClass=maintainer&bIsQueue=true&sTitle=Maintainer%20Queue"); Index: appdb/include/sidebar_maintainer_admin.php diff -u -p appdb/include/sidebar_maintainer_admin.php:1.1 appdb/include/sidebar_maintainer_admin.php:1.2 --- appdb/include/sidebar_maintainer_admin.php:1.1 10 Mar 2007 21:21:10 -0000 +++ appdb/include/sidebar_maintainer_admin.php 10 Mar 2007 21:21:10 -0000 @@ -8,7 +8,7 @@ function global_maintainer_admin_menu() $g = new htmlmenu("Maintainer Admin"); $g->add("View App Queue (".$_SESSION['current']->getQueuedVersionCount().")", BASE."admin/adminAppQueue.php"); - $g->add("View App Data Queue (".$_SESSION['current']->getQueuedAppDataCount().")", BASE."admin/adminAppDataQueue.php"); + $g->add("View App Data Queue (".appData::objectGetEntriesCount("true").")", BASE."admin/adminAppDataQueue.php"); $g->done(); } Index: appdb/include/user.php diff -u -p appdb/include/user.php:1.83 appdb/include/user.php:1.84 --- appdb/include/user.php:1.83 10 Mar 2007 21:21:11 -0000 +++ appdb/include/user.php 10 Mar 2007 21:21:11 -0000 @@ -299,15 +299,6 @@ class User { return $oRow->queued_versions - $this->getQueuedAppCount(); } - - /* get the number of queued appdata */ - function getQueuedAppDataCount() - { - $hResult = $this->getAppDataQuery(0, true, false); - $oRow = mysql_fetch_object($hResult); - return $oRow->queued_appdata; - } - function addPriv($sPriv) { if(!$this->isLoggedIn() || !$sPriv) @@ -682,6 +673,7 @@ class User { function get_notify_email_address_list($iAppId = null, $iVersionId = null) { $aUserId = array(); + $sRetval = ""; /* * Retrieve version maintainers.
1
0
0
0
appdb/include user.php
by WineHQ
10 Mar '07
10 Mar '07
ChangeSet ID: 30948 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/03/09 21:37:15 Modified files: include : user.php Log message: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Don't try to email admins multiple times Patch:
http://cvs.winehq.org/patch.py?id=30948
Old revision New revision Changes Path 1.82 1.83 +8 -19 appdb/include/user.php Index: appdb/include/user.php diff -u -p appdb/include/user.php:1.82 appdb/include/user.php:1.83 --- appdb/include/user.php:1.82 10 Mar 2007 3:37:15 -0000 +++ appdb/include/user.php 10 Mar 2007 3:37:15 -0000 @@ -682,8 +682,6 @@ class User { function get_notify_email_address_list($iAppId = null, $iVersionId = null) { $aUserId = array(); - $c = 0; - $retval = ""; /* * Retrieve version maintainers. @@ -695,10 +693,7 @@ class User { if(mysql_num_rows($hResult) > 0) { while($oRow = mysql_fetch_object($hResult)) - { - $aUserId[$c] = array($oRow->userId); - $c++; - } + $aUserId[] = $oRow->userId; } } @@ -731,10 +726,7 @@ class User { if(mysql_num_rows($hResult) > 0) { while($oRow = mysql_fetch_object($hResult)) - { - $aUserId[$c] = array($oRow->userId); - $c++; - } + $aUserId[] = $oRow->userId; } } @@ -751,26 +743,23 @@ class User { // if we didn't find this entry in the $aUserId // array then we should add it if($i === false) - { - $aUserId[$c] = array($oRow->userid); - $c++; - } + $aUserId[] = $oRow->userid; } } // go through the email entries and only add the emails for the users // that want to receive it - if ($c > 0) + if (sizeof($aUserId) > 0) { - while(list($index, list($userIdValue)) = each($aUserId)) + foreach($aUserId as $iUserId) { - $oUser = new User($userIdValue); + $oUser = new User($iUserId); if ($oUser->wantsEmail()) - $retval .= $oUser->sEmail." "; + $sRetval .= $oUser->sEmail." "; } } - return $retval; + return $sRetval; }
1
0
0
0
← Newer
1
...
54
55
56
57
58
59
60
...
85
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Results per page:
10
25
50
100
200