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
November 2016
----- 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
2 participants
465 discussions
Start a n
N
ew thread
Jeremy Newman : update appdb to the new style winehq layout
by Jeremy Newman
21 Nov '16
21 Nov '16
Module: appdb Branch: master Commit: 164f5bf0b09135c83243f4cb38c0eec7ae4e3899 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=164f5bf0b09135c83243f4cb…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Wed Nov 16 09:47:57 2016 -0600 update appdb to the new style winehq layout * html5, bootstrap, fontawesome * made alert boxes hidable via click, and they float above content * moved sidebar outside of content well, and moved it into header.php --- include/appdb.php | 46 ------- include/footer.php | 8 +- include/header.php | 96 ++++++++++--- styles.css | 395 ++++++++++++++++++++++++++++++----------------------- utils.js | 3 + 5 files changed, 305 insertions(+), 243 deletions(-) Diff:
http://source.winehq.org/git/appdb.git/?a=commitdiff;h=164f5bf0b09135c83243…
1
0
0
0
Jeremy Newman : remove stray div tag
by Jeremy Newman
21 Nov '16
21 Nov '16
Module: appdb Branch: master Commit: 61c69075d60c12e216ac2a13af5a83f3a1a5cebb URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=61c69075d60c12e216ac2a13…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Wed Nov 16 09:47:09 2016 -0600 remove stray div tag --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 0ef4ae1..6fe93e3 100644 --- a/index.php +++ b/index.php @@ -12,10 +12,10 @@ require("path.php"); require(BASE."include/incl.php"); apidb_header("Wine Application Database"); + ?> <img style="float:right;" src="images/appdb_montage.jpg" width=391 height=266 alt="Wine AppDB"> -<div class='default_container'> <h1>Welcome</h1> <p>This is the Wine Application Database (AppDB). Here you can get information on application
1
0
0
0
Jeremy Newman : each menu block is a ul
by Jeremy Newman
21 Nov '16
21 Nov '16
Module: appdb Branch: master Commit: 137606e6b945ffe2de33fbab14103ed69935841b URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=137606e6b945ffe2de33fbab…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Wed Nov 16 09:46:14 2016 -0600 each menu block is a ul note: not sure why a oTable call was here, so removed it --- include/htmlmenu.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/htmlmenu.php b/include/htmlmenu.php index 3bb9222..4ad542b 100644 --- a/include/htmlmenu.php +++ b/include/htmlmenu.php @@ -10,14 +10,13 @@ class htmlmenu { if (!empty($form)) echo "<form action=\"$form\" method=\"post\">\n"; + echo '<ul>'; echo '<li class="top"><p>'.$name.'</p></li>'; } // add a table row public function add($sName, $shUrl = null, $sAlign = "left") { - $oTableRow = new TableRow(); - if($shUrl) { echo "<li><p><a href=\"{$shUrl}\">{$sName}</a></p></li>\n"; @@ -37,8 +36,7 @@ class htmlmenu // menu complete public function done($form = null) { - echo '<li class="bot"></li>'; - + echo '</ul>'; if (!empty($form)) echo "</form>\n"; }
1
0
0
0
Jeremy Newman : remove old design images, will load directly from main site in new deisgn
by Jeremy Newman
21 Nov '16
21 Nov '16
Module: appdb Branch: master Commit: db6ddc55db28b3ad1385b8ca4647f978c137e1b6 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=db6ddc55db28b3ad1385b8ca…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Wed Nov 16 08:57:27 2016 -0600 remove old design images, will load directly from main site in new deisgn --- images/bg.jpg | Bin 86167 -> 0 bytes images/cw_logo_sm.png | Bin 4383 -> 0 bytes images/side_menu_bg.png | Bin 226 -> 0 bytes images/side_menu_bot.png | Bin 564 -> 0 bytes images/side_menu_top.png | Bin 3287 -> 0 bytes images/tab_h.png | Bin 584 -> 0 bytes images/tab_s.png | Bin 614 -> 0 bytes images/tab_u.png | Bin 616 -> 0 bytes images/winehq_logo_glass_sm.png | Bin 14291 -> 0 bytes images/winehq_logo_text.png | Bin 6870 -> 0 bytes 10 files changed, 0 insertions(+), 0 deletions(-) diff --git a/images/bg.jpg b/images/bg.jpg deleted file mode 100644 index 16bb0b5..0000000 Binary files a/images/bg.jpg and /dev/null differ diff --git a/images/cw_logo_sm.png b/images/cw_logo_sm.png deleted file mode 100644 index 3099535..0000000 Binary files a/images/cw_logo_sm.png and /dev/null differ diff --git a/images/side_menu_bg.png b/images/side_menu_bg.png deleted file mode 100644 index c8cbcc0..0000000 Binary files a/images/side_menu_bg.png and /dev/null differ diff --git a/images/side_menu_bot.png b/images/side_menu_bot.png deleted file mode 100644 index 8bc9b5d..0000000 Binary files a/images/side_menu_bot.png and /dev/null differ diff --git a/images/side_menu_top.png b/images/side_menu_top.png deleted file mode 100644 index 047c4c0..0000000 Binary files a/images/side_menu_top.png and /dev/null differ diff --git a/images/tab_h.png b/images/tab_h.png deleted file mode 100644 index 59620cd..0000000 Binary files a/images/tab_h.png and /dev/null differ diff --git a/images/tab_s.png b/images/tab_s.png deleted file mode 100644 index 54d367b..0000000 Binary files a/images/tab_s.png and /dev/null differ diff --git a/images/tab_u.png b/images/tab_u.png deleted file mode 100644 index ff84b7a..0000000 Binary files a/images/tab_u.png and /dev/null differ diff --git a/images/winehq_logo_glass_sm.png b/images/winehq_logo_glass_sm.png deleted file mode 100644 index 949334b..0000000 Binary files a/images/winehq_logo_glass_sm.png and /dev/null differ diff --git a/images/winehq_logo_text.png b/images/winehq_logo_text.png deleted file mode 100644 index 29b6ecb..0000000 Binary files a/images/winehq_logo_text.png and /dev/null differ
1
0
0
0
Jeremy Newman : change all mysql_ functions over to internal query_ functions
by Jeremy Newman
21 Nov '16
21 Nov '16
Module: appdb Branch: master Commit: fa21b07b91de814b3feb2fc2ba8428dc2420820d URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=fa21b07b91de814b3feb2fc2…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Tue Nov 15 14:16:13 2016 -0600 change all mysql_ functions over to internal query_ functions --- admin.php | 26 +++++++++++++------------- admin/editBundle.php | 2 +- cron/cleanup.php | 14 +++++++------- include/application.php | 6 +++--- include/bugs.php | 6 ++++-- include/category.php | 2 +- include/comment.php | 12 ++++++------ include/commonReply.php | 6 +++--- include/db_filter.php | 6 +++--- include/db_filter_ui.php | 2 +- include/distribution.php | 2 +- include/maintainer.php | 10 +++++----- include/maintainerView.php | 6 +++--- include/note.php | 4 ++-- include/objectManager.php | 6 +++--- include/tag.php | 16 ++++++++-------- include/tag_Note.php | 4 ++-- include/testData.php | 6 +++--- include/user.php | 2 +- include/util.php | 2 +- include/version.php | 16 ++++++++-------- include/vote.php | 18 +++++++++--------- unit_test/test_om_objects.php | 4 ++-- 23 files changed, 90 insertions(+), 88 deletions(-) Diff:
http://source.winehq.org/git/appdb.git/?a=commitdiff;h=fa21b07b91de814b3feb…
1
0
0
0
Jeremy Newman : change over to mysqli db interface as mysql_ is deprecated
by Jeremy Newman
21 Nov '16
21 Nov '16
Module: appdb Branch: master Commit: b851f940b9e3d139fbe19a199283aaaeac4dff91 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=b851f940b9e3d139fbe19a19…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Tue Nov 15 14:15:06 2016 -0600 change over to mysqli db interface as mysql_ is deprecated --- include/query.php | 94 ++++++++++++++++++++++++------------------------------- 1 file changed, 41 insertions(+), 53 deletions(-) diff --git a/include/query.php b/include/query.php index 39b9d76..a4b82d8 100644 --- a/include/query.php +++ b/include/query.php @@ -23,10 +23,9 @@ function query_appdb($sQuery, $sComment="") if(!is_resource($hAppdbLink)) { // The last argument makes sure we are really opening a new connection - $hAppdbLink = mysql_connect(APPS_DBHOST, APPS_DBUSER, APPS_DBPASS, true); + $hAppdbLink = new mysqli(APPS_DBHOST, APPS_DBUSER, APPS_DBPASS, APPS_DB); if(!$hAppdbLink) query_error($sQuery, $sComment, $hAppdbLink); - mysql_select_db(APPS_DB, $hAppdbLink); } $iRetries = 2; @@ -35,13 +34,12 @@ function query_appdb($sQuery, $sComment="") /* as a deadlock isn't really a failure */ while($iRetries) { - $hResult = mysql_query($sQuery, $hAppdbLink); + $hResult = $hAppdbLink->query($sQuery); if(!$hResult) { /* if this error isn't a deadlock OR if it is a deadlock and we've */ /* run out of retries, report the error */ - $iErrno = mysql_errno($hAppdbLink); - if(($iErrno != MYSQL_DEADLOCK_ERRNO) || (($iErrno == MYSQL_DEADLOCK_ERRNO) && ($iRetries <= 0))) + if(($hAppdbLink->errno != MYSQL_DEADLOCK_ERRNO) || (($hAppdbLink->errno == MYSQL_DEADLOCK_ERRNO) && ($iRetries <= 0))) { query_error($sQuery, $sComment, $hAppdbLink); return $hResult; @@ -68,19 +66,18 @@ function query_bugzilladb($sQuery, $sComment="") if(!is_resource($hBugzillaLink)) { // The last argument makes sure we are really opening a new connection - $hBugzillaLink = mysql_connect(BUGZILLA_DBHOST, BUGZILLA_DBUSER, BUGZILLA_DBPASS, true); + $hBugzillaLink = new mysqli(BUGZILLA_DBHOST, BUGZILLA_DBUSER, BUGZILLA_DBPASS, BUGZILLA_DB); if(!$hBugzillaLink) return; - mysql_select_db(BUGZILLA_DB, $hBugzillaLink); // Tell MySQL to return UTF8-encoded results $sQueryAskingForUtf8Results = "SET SESSION CHARACTER_SET_RESULTS = 'utf8'"; - if (!mysql_query($sQueryAskingForUtf8Results, $hBugzillaLink)) + if (!$hBugzillaLink->query($sQueryAskingForUtf8Results)) { query_error($sQueryAskingForUtf8Results, "", $hBugzillaLink); } } - $hResult = mysql_query($sQuery, $hBugzillaLink); + $hResult = $hBugzillaLink->query($sQuery); if(!$hResult) query_error($sQuery, $sComment, $hBugzillaLink); return $hResult; @@ -89,7 +86,6 @@ function query_bugzilladb($sQuery, $sComment="") /* * Wildcard Rules * SCALAR (?) => 'original string quoted' - * OPAQUE (&) => 'string from file quoted' * MISC (~) => original string (left 'as-is') * * NOTE: These rules convienently match those for Pear DB @@ -100,9 +96,10 @@ function query_bugzilladb($sQuery, $sComment="") *
http://us3.php.net/manual/en/function.mysql-query.php#53400
* * Modified by CMM 20060622 + * Modified by JWN 20161115 * - * Values are mysql_real_escape_string()'d to prevent against injection attacks - * See
http://php.net/mysql_real_escape_string
for more information about why this is the case + * Values are $hAppdbLink->real_escape_string()'d to prevent against injection attacks + * See
http://php.net/$hAppdbLink-
>real_escape_string for more information about why this is the case * * Usage: * $hResult = query_parameters("Select * from mytable where userid = '?'", @@ -117,16 +114,16 @@ function query_parameters() { global $hAppdbLink; - if(!is_resource($hAppdbLink)) + if(empty($hAppdbLink) or !is_resource($hAppdbLink)) { - // The last argument makes sure we are really opening a new connection - $hAppdbLink = mysql_connect(APPS_DBHOST, APPS_DBUSER, APPS_DBPASS, true) or die('Database error, please try again soon: '.mysql_error()); - mysql_select_db(APPS_DB, $hAppdbLink); + $hAppdbLink = new mysqli(APPS_DBHOST, APPS_DBUSER, APPS_DBPASS, APPS_DB); + if (!$hAppdbLink) + query_error('', 'Database connection failed!', $hAppdbLink); } $aData = func_get_args(); $sQuery = $aData[0]; - $aTokens = preg_split("/[&?~]/", $sQuery); /* NOTE: no need to escape characters inside of [] in regex */ + $aTokens = preg_split("/[?~]/", $sQuery); /* NOTE: no need to escape characters inside of [] in regex */ $sPreparedquery = $aTokens[0]; $iCount = strlen($aTokens[0]); @@ -138,23 +135,8 @@ function query_parameters() { $char = substr($sQuery, $iCount, 1); $iCount += (strlen($aTokens[$i])+1); - if ($char == "&") - { - $fp = @fopen($aData[$i], 'r'); - $pdata = ""; - if ($fp) - { - while (($sBuf = fread($fp, 4096)) != false) - { - $pdata .= $sBuf; - } - fclose($fp); - } - } else - { - $pdata = &$aData[$i]; - } - $sPreparedquery .= ($char != "~" ? mysql_real_escape_string($pdata) : $pdata); + $pdata = &$aData[$i]; + $sPreparedquery .= ($char != "~" ? $hAppdbLink->real_escape_string($pdata) : $pdata); $sPreparedquery .= $aTokens[$i]; } @@ -163,38 +145,35 @@ function query_parameters() function query_error($sQuery, $sComment, $hLink) { - error_log("Query: '".$sQuery."' ". - "mysql_errno(): '".mysql_errno($hLink)."' ". - "mysql_error(): '".mysql_error($hLink)."' ". - "comment: '".$sComment."'"); - trigger_error("Database Error: '".mysql_error($hLink)."' ", E_USER_ERROR); + error_log("Query: '".$sQuery."' $hLink->errno: '".$hLink->errno."' comment: '".$sComment."'"); + trigger_error("Database Error: {$hLink->error} Comment: {$sComment}", E_USER_ERROR); } function query_fetch_row($hResult) { - return mysql_fetch_row($hResult); + return $hResult->fetch_row(); } function query_fetch_object($hResult) { - return mysql_fetch_object($hResult); + return $hResult->fetch_object(); } function query_appdb_insert_id() { global $hAppdbLink; - return mysql_insert_id($hAppdbLink); + return $hAppdbLink->insert_id; } function query_bugzilla_insert_id() { global $hBugzillaLink; - return mysql_insert_id($hBugzillaLink); + return $hAppdbLink->insert_id; } function query_num_rows($hResult) { - return mysql_num_rows($hResult); + return $hResult->num_rows; } function query_escape_string($sString) @@ -204,38 +183,47 @@ function query_escape_string($sString) if(!is_resource($hAppdbLink)) { // The last argument makes sure we are really opening a new connection - $hAppdbLink = mysql_connect(APPS_DBHOST, APPS_DBUSER, APPS_DBPASS, true); + $hAppdbLink = new mysqli(APPS_DBHOST, APPS_DBUSER, APPS_DBPASS, APPS_DB); if(!$hAppdbLink) - die("Database error, please try again soon."); - mysql_select_db(APPS_DB, $hAppdbLink); + query_error('', 'Database connection failed!', $hAppdbLink); } - return mysql_real_escape_string($sString, $hAppdbLink); + return $hAppdbLink->real_escape_string($sString); } function query_field_type($hResult, $iFieldOffset) { - return mysql_field_type($hResult, $iFieldOffset); + $finfo = $hResult->fetch_field_direct($iFieldOffset); + return $finfo->type; } function query_field_name($hResult, $iFieldOffset) { - return mysql_field_name($hResult, $iFieldOffset); + $finfo = $hResult->fetch_field_direct($iFieldOffset); + return $finfo->name; } function query_field_len($hResult, $ifieldOffset) { - return mysql_field_len($hResult, $iFieldOffset); + $finfo = $hResult->fetch_field_direct($iFieldOffset); + return $finfo->max_length; } function query_field_flags($hResult, $iFieldOffset) { - return mysql_field_flags($hResult, $iFieldOffset); + $finfo = $hResult->fetch_field_direct($iFieldOffset); + return $finfo->flags; } function query_fetch_field($hResult, $iFieldOffset) { - return mysql_fetch_field($hResult, $iFieldOffset); + return $hResult->fetch_field_direct($iFieldOffset); +} + +function query_get_server_info() +{ + global $hAppdbLink; + return $hAppdbLink->server_info; } ?>
1
0
0
0
Jeremy Newman : rewrite javascript handlers for jquery, and merge files, cleanup
by Jeremy Newman
21 Nov '16
21 Nov '16
Module: appdb Branch: master Commit: 9c186b30f360ee3e65b697c7d0381f745bcfa609 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=9c186b30f360ee3e65b697c7…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Tue Nov 15 12:18:22 2016 -0600 rewrite javascript handlers for jquery, and merge files, cleanup --- scripts.js | 120 -------------------------------------------------- utils.js | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 127 insertions(+), 139 deletions(-) diff --git a/scripts.js b/scripts.js deleted file mode 100644 index 524489d..0000000 --- a/scripts.js +++ /dev/null @@ -1,120 +0,0 @@ -function openWin(fileToOpen,nameOfWindow,width,height) { - myWindow = window.open("",nameOfWindow,"menubar=no,scrollbars=yes,status=no,width="+width+",height="+height); - myWindow.document.open(); - myWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'); - myWindow.document.write('<html><head><title>Screenshot Viewer</title>') - myWindow.document.write('<style type="text/css">'); - myWindow.document.write('body { margin: 0; padding: 0; background-color: lightgrey; }'); - myWindow.document.write('img { border: 0; }'); - myWindow.document.write('p { display: inline; }'); - myWindow.document.write('</style></head><body>'); - myWindow.document.write('<a onclick="self.close();" href=""><img src="'+ fileToOpen +'" alt="Screenshot"></a>'); - myWindow.document.write('</body></html>'); - myWindow.document.close(); -} - -function deleteURL(text, url) { - if (confirm(text)) { - self.location = url; - } -} - -function ChangeTr(tableRow, bRowActive, sHighlightColor, sInactiveColor, - sTextDecorationHighlight, sTextDecorationInactive) -{ - if (bRowActive) - { - tableRow.style.backgroundColor = sHighlightColor; - tableRow.style.cursor = "hand"; - tableRow.style.textDecoration = sTextDecorationHighlight; - } - else - { - tableRow.style.backgroundColor = sInactiveColor; - tableRow.style.cursor = "pointer"; - tableRow.style.textDecoration = sTextDecorationInactive; - } -} - -function DoNav(sUrl) -{ - document.location.href = sUrl; -} - -/** - * commentId is the uniquely identifying comment id from the database. - * It is also used as the div id for the comment body. - */ -function showComment(commentid) -{ - elem = $(commentid); - if(elem.visible() && !elem.empty()) - { - elem.hide(); - } - else - { - // Cache the contents of the comment body so we don't need to hit db again. - if(elem.empty()) - { - new Ajax.Updater(commentid, 'comment_body.php', { - method: 'get', - parameters: { - iCommentId: commentid - } - }); - } - elem.show(); - } -} -/* provide a hint to the user about the selected rating */ -var ratingdesc=[ - "", - " Works flawlessly out of the box - no problems ", - " Works flawlessly with DLL overrides, third party software or other settings ", - " Works excellently for normal use;works fine in singleplayer but not multi ", - " Works but has issues for normal use ", - " Does not run or cannot be installed with Wine " - ]; -var ratingstyle =[ - "", - "platinum", - "gold", - "silver", - "bronze", - "garbage" - ]; -function showHint(o){ - if(o) - { - $('hint').innerHTML=ratingdesc[o.selectedIndex]; - $w($('hint').className).map( function(x){ $('hint').removeClassName(x); }) - $('hint').addClassName(ratingstyle[o.selectedIndex]); - } -} -/* too many people still call Wine "WINE" */ -function bind_tolowerWINE() -{ - [ - $('app_editor'), - $('version_editor'), - $('Test1'), - $('Test2'), - $('Test3'), - $('extra_comments')].map( function(x) - { - if(x) - { - x.observe('change', tolowerWINE); - } - }); -} -function tolowerWINE(o) - { - o.element().value = o.element().value.replace(/WINE([^A-Z]+)|(WINE)$/g,"Wine$1"); - } -/* executed when document is ready */ -document.observe("dom:loaded", function() { - showHint($('ratingSelect')); - bind_tolowerWINE(); - }); diff --git a/utils.js b/utils.js index 24d5806..099e61a 100644 --- a/utils.js +++ b/utils.js @@ -1,23 +1,131 @@ /* - Misc JavaScipt for WineHQ -*/ - -// include a file from js scripts dir -function include_dom (script_filename) { - var html_doc = document.getElementsByTagName('head').item(0); - var js = document.createElement('script'); - js.setAttribute('language', 'javascript'); - js.setAttribute('type', 'text/javascript'); - js.setAttribute('src', script_filename); - html_doc.appendChild(js); - return false; -} + * Misc JavaScipt for WineHQ Application Database + */ + +// welcome +console.log('Welcome to the %cWineHQ%c AppDB', + 'color: #490708; font-size: 48pt; font-style: italic; font-weight: bold;', + 'color: #95493A; font-size: 48pt; font-style: italic; font-weight: bold;'); + +// execute on when document ready +$(document).ready(function() +{ + // rating hints + (function() + { + var ratingdesc=[ + "", + " Works flawlessly out of the box - no problems ", + " Works flawlessly with DLL overrides, third party software or other settings ", + " Works excellently for normal use;works fine in singleplayer but not multi ", + " Works but has issues for normal use ", + " Does not run or cannot be installed with Wine " + ]; + var ratingstyle =[ + "", + "platinum", + "gold", + "silver", + "bronze", + "garbage" + ]; + var changeRatingSelect = function() + { + var sel = $("#ratingSelect").prop('selectedIndex'); + $("#hint").attr('class', ''); + $("#hint").html(ratingdesc[sel]); + $("#hint").addClass(ratingstyle[sel]); + }; + $("#ratingSelect").change(function(){changeRatingSelect()}); + changeRatingSelect(); + })(); + + // load nested forum comment + $('.showComment').each(function() + { + $(this).click(function(e) + { + e.preventDefault(); + var id = $(this).data('id'); + $("#comment-"+id).html('<i class="fa fa-spinner fa-spin fa-fw"></a>'); + $.get('comment_body.php', {iCommentId: id}, function(comment) + { + $("#comment-"+id).html(comment); + }); + }); + }); -// load and execute jquery IE6 PNG fix -include_dom("/jquery.pngfix.js"); -jQuery(function($) { - $("img[@src$=png]").pngfix(); /* all img tags with .png extension */ - $("#tabs li").pngfix(); /* top tabs li backgrounds */ + // debug log clicker + $("div#dlogt").toggleClick( + function() + { + $('div#dlogp').slideDown(); + }, + function() + { + $('div#dlogp').slideUp(); + }); }); -// done +/* + * jQuery old style toggle replacement + * this useful object was removed in jquery 1.9 + */ +$.fn.toggleClick = function(){ + var functions = arguments ; + return this.click(function(){ + var iteration = $(this).data('iteration') || 0; + functions[iteration].apply(this, arguments); + iteration = (iteration + 1) % functions.length ; + $(this).data('iteration', iteration); + }); +}; + +// open Window (FIXME: replace with an inline screenshot viewer) +function openWin(fileToOpen,nameOfWindow,width,height) { + myWindow = window.open("",nameOfWindow,"menubar=no,scrollbars=yes,status=no,width="+width+",height="+height); + myWindow.document.open(); + myWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">'); + myWindow.document.write('<html><head><title>Screenshot Viewer</title>') + myWindow.document.write('<style type="text/css">'); + myWindow.document.write('body { margin: 0; padding: 0; background-color: lightgrey; }'); + myWindow.document.write('img { border: 0; }'); + myWindow.document.write('p { display: inline; }'); + myWindow.document.write('</style></head><body>'); + myWindow.document.write('<a onclick="self.close();" href=""><img src="'+ fileToOpen +'" alt="Screenshot"></a>'); + myWindow.document.write('</body></html>'); + myWindow.document.close(); +} + +// confirmation message (FIXME: replace with jquery utils: dialog) +function deleteURL(text, url) { + if (confirm(text)) { + self.location = url; + } +} + +// row color change +function ChangeTr(tableRow, bRowActive, sHighlightColor, sInactiveColor, + sTextDecorationHighlight, sTextDecorationInactive) +{ + if (bRowActive) + { + tableRow.style.backgroundColor = sHighlightColor; + tableRow.style.cursor = "hand"; + tableRow.style.textDecoration = sTextDecorationHighlight; + } + else + { + tableRow.style.backgroundColor = sInactiveColor; + tableRow.style.cursor = "pointer"; + tableRow.style.textDecoration = sTextDecorationInactive; + } +} + +// doNav +function DoNav(sUrl) +{ + document.location.href = sUrl; +} + +// done \ No newline at end of file
1
0
0
0
Jeremy Newman : fail to error page on bad query, use debug log and error handler
by Jeremy Newman
21 Nov '16
21 Nov '16
Module: appdb Branch: master Commit: 6c49ce5cce4949a9570c8ee9285df2a03b6fdfd0 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=6c49ce5cce4949a9570c8ee9…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Tue Nov 15 12:17:44 2016 -0600 fail to error page on bad query, use debug log and error handler --- include/query.php | 91 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 44 deletions(-) diff --git a/include/query.php b/include/query.php index 7b02e79..39b9d76 100644 --- a/include/query.php +++ b/include/query.php @@ -1,19 +1,31 @@ <?php +/*************************************************/ +/* Application Database DB Query Functions */ +/*************************************************/ + +// AppDB connection link $hAppdbLink = null; + +// bugs connection link $hBugzillaLink = null; +// set DEADLOCK define("MYSQL_DEADLOCK_ERRNO", 1213); function query_appdb($sQuery, $sComment="") { global $hAppdbLink; + // log query + appdb_debug("query_appdb -> {$sQuery}"); + + // if not connected, connect if(!is_resource($hAppdbLink)) { // The last argument makes sure we are really opening a new connection $hAppdbLink = mysql_connect(APPS_DBHOST, APPS_DBUSER, APPS_DBPASS, true); if(!$hAppdbLink) - die("Database error, please try again soon."); + query_error($sQuery, $sComment, $hAppdbLink); mysql_select_db(APPS_DB, $hAppdbLink); } @@ -45,6 +57,35 @@ function query_appdb($sQuery, $sComment="") return NULL; } +function query_bugzilladb($sQuery, $sComment="") +{ + global $hBugzillaLink; + + // log query + appdb_debug("query_bugzilladb -> {$sQuery}"); + + // if not connected, connect + if(!is_resource($hBugzillaLink)) + { + // The last argument makes sure we are really opening a new connection + $hBugzillaLink = mysql_connect(BUGZILLA_DBHOST, BUGZILLA_DBUSER, BUGZILLA_DBPASS, true); + if(!$hBugzillaLink) + return; + mysql_select_db(BUGZILLA_DB, $hBugzillaLink); + // Tell MySQL to return UTF8-encoded results + $sQueryAskingForUtf8Results = "SET SESSION CHARACTER_SET_RESULTS = 'utf8'"; + if (!mysql_query($sQueryAskingForUtf8Results, $hBugzillaLink)) + { + query_error($sQueryAskingForUtf8Results, "", $hBugzillaLink); + } + } + + $hResult = mysql_query($sQuery, $hBugzillaLink); + if(!$hResult) + query_error($sQuery, $sComment, $hBugzillaLink); + return $hResult; +} + /* * Wildcard Rules * SCALAR (?) => 'original string quoted' @@ -120,51 +161,13 @@ function query_parameters() return query_appdb($sPreparedquery); } -function query_bugzilladb($sQuery,$sComment="") -{ - global $hBugzillaLink; - - if(!is_resource($hBugzillaLink)) - { - // The last argument makes sure we are really opening a new connection - $hBugzillaLink = mysql_connect(BUGZILLA_DBHOST, BUGZILLA_DBUSER, BUGZILLA_DBPASS, true); - if(!$hBugzillaLink) return; - mysql_select_db(BUGZILLA_DB, $hBugzillaLink); - // Tell MySQL to return UTF8-encoded results - $sQueryAskingForUtf8Results = "SET SESSION CHARACTER_SET_RESULTS = 'utf8'"; - if (!mysql_query($sQueryAskingForUtf8Results, $hBugzillaLink)) - { - query_error($sQueryAskingForUtf8Results, "", $hBugzillaLink); - } - } - - $hResult = mysql_query($sQuery, $hBugzillaLink); - if(!$hResult) query_error($sQuery, $sComment, $hBugzillaLink); - return $hResult; -} - - function query_error($sQuery, $sComment, $hLink) { - static $bInQueryError = false; - - // if we are already reporting an error we can't report it again - // as that indicates that error reporting itself produced an error - if($bInQueryError) - return; - - // record that we are inside of this function, we don't want to recurse - $bInQueryError = true; - - error_log::log_error(ERROR_SQL, "Query: '".$sQuery."' ". - "mysql_errno(): '".mysql_errno($hLink)."' ". - "mysql_error(): '".mysql_error($hLink)."' ". - "comment: '".$sComment."'"); - - $sStatusMessage = "<p><b>An internal error has occurred and has been logged and reported to appdb admins</b></p>"; - addmsg($sStatusMessage); - - $bInQueryError = false; // clear variable upon exit + error_log("Query: '".$sQuery."' ". + "mysql_errno(): '".mysql_errno($hLink)."' ". + "mysql_error(): '".mysql_error($hLink)."' ". + "comment: '".$sComment."'"); + trigger_error("Database Error: '".mysql_error($hLink)."' ", E_USER_ERROR); } function query_fetch_row($hResult)
1
0
0
0
Jeremy Newman : move appdb specific functions to appdb.php, cleanup
by Jeremy Newman
21 Nov '16
21 Nov '16
Module: appdb Branch: master Commit: 52340938a0d42d199943af22ecdc4b43d7de14e3 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=52340938a0d42d199943af22…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Tue Nov 15 12:15:59 2016 -0600 move appdb specific functions to appdb.php, cleanup * add error handing routines * add debug log * merge some one time used functions --- include/appdb.php | 344 ++++++++++++++++++++++++++++++++++++++++++++++++++---- include/incl.php | 292 +++++---------------------------------------- 2 files changed, 350 insertions(+), 286 deletions(-) Diff:
http://source.winehq.org/git/appdb.git/?a=commitdiff;h=52340938a0d42d199943…
1
0
0
0
Jeremy Newman : beginnings of HTML5 code and updating design
by Jeremy Newman
21 Nov '16
21 Nov '16
Module: appdb Branch: master Commit: 55907147328d2c6d38e15d3f1e4d0d34dfd90bf0 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=55907147328d2c6d38e15d3f…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Tue Nov 15 12:14:41 2016 -0600 beginnings of HTML5 code and updating design --- include/header.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/include/header.php b/include/header.php index 014a8c4..ff01e3b 100644 --- a/include/header.php +++ b/include/header.php @@ -2,28 +2,31 @@ /*********************************/ /* Application Database - Header */ /*********************************/ -?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> +?><!doctype html> +<html lang="en"> <head> <title>WineHQ <?php echo $title; ?></title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> - <meta HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT"> - <meta HTTP-EQUIV="Pragma" CONTENT="no-cache"> + + <meta charset="utf-8"> <meta name="description" content="Open Source Software for running Windows applications on other operating systems."> <meta name="keywords" content="windows, linux, macintosh, solaris, freebsd"> <meta name="robots" content="index, follow"> <meta name="copyright" content="Copyright
WineHQ.org
All Rights Reserved."> <meta name="language" content="English"> <meta name="revisit-after" content="1"> + + <link href="
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> + <link rel="stylesheet" href="
https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css
"> + <link rel="stylesheet" href="
https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css
" type="text/css" media="all"> <link rel="stylesheet" href="<?php echo BASE; ?>styles.css" type="text/css" media="screen"> - <script language="JavaScript" src="<?php echo BASE; ?>jquery.js" type="text/javascript"></script> - <script language="JavaScript" src="<?php echo BASE; ?>utils.js" type="text/javascript"></script> <link rel="stylesheet" href="<?php echo BASE; ?>apidb.css" type="text/css"> <link rel="stylesheet" href="<?php echo BASE; ?>application.css" type="text/css"> - <script type="text/javascript" - src="//ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"></script> - <script src="<?php echo BASE; ?>scripts.js" type="text/javascript"></script> - <link rel="icon" type="image/png" href="<?php echo BASE; ?>images/winehq_logo_16.png"> + + <script src="
https://code.jquery.com/jquery-2.2.3.min.js
" type="text/javascript"></script> + <script src="
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js
" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script> + <script src="
https://code.jquery.com/ui/1.11.4/jquery-ui.min.js
" type="text/javascript"></script> + <script src="<?php echo BASE; ?>utils.js"></script> + <link rel="shortcut icon" type="image/png" href="<?php echo BASE; ?>images/winehq_logo_16.png"> <link title="AppDB" type="application/opensearchdescription+xml" rel="search" href="<?php echo BASE; ?>opensearch.xml"> </head>
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
47
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
Results per page:
10
25
50
100
200