ChangeSet ID: 15387 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner@wine.codeweavers.com 2005/01/11 20:44:49 Modified files: include : util.php Log message: Jonathan Ernst - deleted closedb(), openbugzilladb(), closebugzilladb() which are not used anymore - make make_bugzilla_version_list() use the new query_bugzilladb() function Patch: http://cvs.winehq.org/patch.py?id=15387 Old revision New revision Changes Path 1.15 1.16 +2 -49 appdb/include/util.php Index: appdb/include/util.php diff -u -p appdb/include/util.php:1.15 appdb/include/util.php:1.16 --- appdb/include/util.php:1.15 Mon May 20 05:33:36 2013 +++ appdb/include/util.php Mon May 20 05:33:36 2013 @@ -22,16 +22,6 @@ function opendb() return $dbcon; } -function closedb() -{ - global $dbcon, $dbref; - - if(--$dbref) - return; - - mysql_close($dbcon); -} - function build_urlarg($vars) { $arr = array(); @@ -122,51 +112,15 @@ function get_xml_tag ($file, $mode = nul } /* bugzilla functions */ - -function openbugzilladb() -{ - global $dbcon, $dbref; - - $dbref++; - - if($dbcon) - return $dbcon; - - $dbcon = mysql_connect(BUGZILLA_DBHOST, BUGZILLA_DBUSER, BUGZILLA_DBPASS); - if(!$dbcon) - { - echo "An error occurred: ".mysql_error()."

\n"; - exit; - } - mysql_select_db(BUGZILLA_DB); - return $dbcon; -} - -function closebugzilladb() -{ - global $dbcon, $dbref; - - if(--$dbref) - return; - - mysql_close($adbcon); -} - function make_bugzilla_version_list($varname, $cvalue) { $table = BUGZILLA_DB.".versions"; $where = "WHERE product_id=".BUGZILLA_PRODUCT_ID; $query = "SELECT value FROM $table $where ORDER BY value"; - openbugzilladb(); - - $result = mysql_query($query); + $result = query_bugzilladb($query); + if(!$result) return; - if(!$result) - { - closebugzilladb(); - return; // Oops - } echo "\n"; - closebugzilladb(); } function make_maintainer_rating_list($varname, $cvalue)