aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam McLoughlin <hexxeh@hexxeh.net>2011-07-24 03:10:52 +0100
committerLiam McLoughlin <hexxeh@hexxeh.net>2011-07-24 03:34:15 +0100
commitbc79e5240cd4544c9f953c48ecafdf4693bd1d64 (patch)
treebc892a47d623cb16459dc60a8e4e890351ad0a0d /client.php
parentUse config file, defines to control settings, more Zend standards work (diff)
downloadgentoaster-bc79e5240cd4544c9f953c48ecafdf4693bd1d64.tar.gz
gentoaster-bc79e5240cd4544c9f953c48ecafdf4693bd1d64.tar.bz2
gentoaster-bc79e5240cd4544c9f953c48ecafdf4693bd1d64.zip
Adding RECAPTCHA, more standards work
Diffstat (limited to 'client.php')
-rw-r--r--client.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/client.php b/client.php
index ce4bc1f..e2284b4 100644
--- a/client.php
+++ b/client.php
@@ -3,7 +3,11 @@
// Gentoaster build daemon client
// Licensed under GPL v3, see COPYING file
- if(!isset($argv[1])) die("No config file provided\n");
+ require_once "config.php";
+
+ if (!isset($argv[1])) {
+ die("No config file provided\n");
+ }
$client= new GearmanClient();
$client->addServer();
@@ -17,9 +21,11 @@
echo "Job sent, handle was ".$handle." - hash ".$handlehash."\n";
- $db = mysql_connect("localhost", "gentoaster", "");
- if(!$db) die("Could not connect to database ".mysql_error());
- mysql_select_db("gentoaster");
+ $db = mysql_connect(MYSQL_HOSTNAME, MYSQL_USERNAME, MYSQL_PASSWORD);
+ if (!$db) {
+ die("Could not connect to database ".mysql_error());
+ }
+ mysql_select_db(MYSQL_DATABASE);
$query = "INSERT INTO builds (id, handle)".
." VALUES('".$handlehash."','".$handle."')";
mysql_query($query);