From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qp55e-0006nn-51 for garchives@archives.gentoo.org; Thu, 04 Aug 2011 21:04:26 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F58B21C183; Thu, 4 Aug 2011 21:04:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id DE61621C183 for ; Thu, 4 Aug 2011 21:04:18 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 657CB2AC01D for ; Thu, 4 Aug 2011 21:04:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id B922B80040 for ; Thu, 4 Aug 2011 21:04:17 +0000 (UTC) From: "Liam McLoughlin" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Liam McLoughlin" Message-ID: <0b2091cc10ccb748adc89c58a19b367308f047c7.hexxeh@gentoo> Subject: [gentoo-commits] proj/gentoaster:webui commit in: web/ X-VCS-Repository: proj/gentoaster X-VCS-Files: web/index.php X-VCS-Directories: web/ X-VCS-Committer: hexxeh X-VCS-Committer-Name: Liam McLoughlin X-VCS-Revision: 0b2091cc10ccb748adc89c58a19b367308f047c7 Date: Thu, 4 Aug 2011 21:04:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: f4d36756cfb2c892e6758950bcaeecbe commit: 0b2091cc10ccb748adc89c58a19b367308f047c7 Author: Liam McLoughlin hexxeh net> AuthorDate: Thu Aug 4 21:04:00 2011 +0000 Commit: Liam McLoughlin hexxeh net> CommitDate: Thu Aug 4 21:04:00 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoaster.gi= t;a=3Dcommit;h=3D0b2091cc Fix simultaneous build detection, fix sorting on keyboard layouts --- web/index.php | 31 ++++++++++++++++++++----------- 1 files changed, 20 insertions(+), 11 deletions(-) diff --git a/web/index.php b/web/index.php index 4903bbb..dcaae6b 100644 --- a/web/index.php +++ b/web/index.php @@ -23,18 +23,23 @@ FILTER_VALIDATE_IP ); =20 - $query =3D "SELECT id, returncode ". + $query =3D "SELECT id, handle ". "FROM builds WHERE ipaddress =3D ?"; $stmt =3D $db->prepare($query); - $stmt->bind_param("sd", $ipaddress, $returncode); + $stmt->bind_param("s", $ipaddress); $stmt->execute(); $stmt->store_result(); =20 - if ($stmt->num_rows =3D=3D 1 && $returncode =3D=3D=3D null) = { - $stmt->bind_result($buildID); + if ($stmt->num_rows =3D=3D 1) { + $stmt->bind_result($buildID, $handle); $stmt->fetch(); - $url =3D "status.php?uuid=3D".$buildID."&simultaneou= s=3Dtrue"; - header("Location: ".$url); + $client =3D new GearmanClient(); + $client->addServer(); + $status =3D $client->jobStatus($handle); + if ($status[0]) { + $url =3D "status.php?uuid=3D".$buildID."&simulta= neous=3Dtrue"; + header("Location: ".$url); + } } $stmt->close(); } @@ -65,17 +70,21 @@ } $layoutLines =3D file(GENTOASTER_PATH."/res/keyboard.lst"); $keyboardOption =3D ""; + $layouts =3D array(); =20 foreach($layoutLines as $layout) { $layoutdata =3D explode("\t", $layout); - $keyboardOption .=3D "\n"; + $keyboardOption .=3D ">".trim($layoutName)."\n"; } - =20 - asort($layouts); ?> From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qs11Y-0004Ni-If for garchives@archives.gentoo.org; Fri, 12 Aug 2011 23:20:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 78DE921C3F9; Fri, 12 Aug 2011 23:18:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4BDC821C3F9 for ; Fri, 12 Aug 2011 23:18:01 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C8C6C1B4048 for ; Fri, 12 Aug 2011 23:18:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 264CB80042 for ; Fri, 12 Aug 2011 23:18:00 +0000 (UTC) From: "Liam McLoughlin" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Liam McLoughlin" Message-ID: <0b2091cc10ccb748adc89c58a19b367308f047c7.hexxeh@gentoo> Subject: [gentoo-commits] proj/gentoaster:master commit in: web/ X-VCS-Repository: proj/gentoaster X-VCS-Files: web/index.php X-VCS-Directories: web/ X-VCS-Committer: hexxeh X-VCS-Committer-Name: Liam McLoughlin X-VCS-Revision: 0b2091cc10ccb748adc89c58a19b367308f047c7 Date: Fri, 12 Aug 2011 23:18:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 8414ee5f94b8bbf5ca64fb439429f6eb Message-ID: <20110812231800.bIHnnlubbo9_AiOgPmEZ_8P4t76GsjK-W73_BuCFTgk@z> commit: 0b2091cc10ccb748adc89c58a19b367308f047c7 Author: Liam McLoughlin hexxeh net> AuthorDate: Thu Aug 4 21:04:00 2011 +0000 Commit: Liam McLoughlin hexxeh net> CommitDate: Thu Aug 4 21:04:00 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoaster.gi= t;a=3Dcommit;h=3D0b2091cc Fix simultaneous build detection, fix sorting on keyboard layouts --- web/index.php | 31 ++++++++++++++++++++----------- 1 files changed, 20 insertions(+), 11 deletions(-) diff --git a/web/index.php b/web/index.php index 4903bbb..dcaae6b 100644 --- a/web/index.php +++ b/web/index.php @@ -23,18 +23,23 @@ FILTER_VALIDATE_IP ); =20 - $query =3D "SELECT id, returncode ". + $query =3D "SELECT id, handle ". "FROM builds WHERE ipaddress =3D ?"; $stmt =3D $db->prepare($query); - $stmt->bind_param("sd", $ipaddress, $returncode); + $stmt->bind_param("s", $ipaddress); $stmt->execute(); $stmt->store_result(); =20 - if ($stmt->num_rows =3D=3D 1 && $returncode =3D=3D=3D null) = { - $stmt->bind_result($buildID); + if ($stmt->num_rows =3D=3D 1) { + $stmt->bind_result($buildID, $handle); $stmt->fetch(); - $url =3D "status.php?uuid=3D".$buildID."&simultaneou= s=3Dtrue"; - header("Location: ".$url); + $client =3D new GearmanClient(); + $client->addServer(); + $status =3D $client->jobStatus($handle); + if ($status[0]) { + $url =3D "status.php?uuid=3D".$buildID."&simulta= neous=3Dtrue"; + header("Location: ".$url); + } } $stmt->close(); } @@ -65,17 +70,21 @@ } $layoutLines =3D file(GENTOASTER_PATH."/res/keyboard.lst"); $keyboardOption =3D ""; + $layouts =3D array(); =20 foreach($layoutLines as $layout) { $layoutdata =3D explode("\t", $layout); - $keyboardOption .=3D "\n"; + $keyboardOption .=3D ">".trim($layoutName)."\n"; } - =20 - asort($layouts); ?>