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 1QmF5a-00078B-CM for garchives@archives.gentoo.org; Thu, 28 Jul 2011 01:08:38 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2945D21C2EE; Thu, 28 Jul 2011 01:08:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id DE46221C2EE for ; Thu, 28 Jul 2011 01:08:14 +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 394C21BC014 for ; Thu, 28 Jul 2011 01:08:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id A1AE08003D for ; Thu, 28 Jul 2011 01:08:13 +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: <5bcf585222474363c28c9ad34360877968efcbce.hexxeh@gentoo> Subject: [gentoo-commits] proj/gentoaster:webui commit in: web/ X-VCS-Repository: proj/gentoaster X-VCS-Files: web/config.php web/index.php web/process.php X-VCS-Directories: web/ X-VCS-Committer: hexxeh X-VCS-Committer-Name: Liam McLoughlin X-VCS-Revision: 5bcf585222474363c28c9ad34360877968efcbce Date: Thu, 28 Jul 2011 01:08:13 +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: 09de024dcfdca9c279ed056cba5797ab Message-ID: <20110728010813.tzXyOW0MbTqK6R6NhZgm7rS4sCXpx9hPxQfP09w3qy0@z> commit: 5bcf585222474363c28c9ad34360877968efcbce Author: Liam McLoughlin hexxeh net> AuthorDate: Thu Jul 28 00:56:34 2011 +0000 Commit: Liam McLoughlin hexxeh net> CommitDate: Thu Jul 28 01:07:59 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gentoaster.gi= t;a=3Dcommit;h=3D5bcf5852 Adding USE, package USE, FEATURES and keywords to WebUI --- web/config.php | 12 ++++++++++++ web/index.php | 32 ++++++++++++++++++++++++++++++++ web/process.php | 17 ++++++++++------- 3 files changed, 54 insertions(+), 7 deletions(-) diff --git a/web/config.php b/web/config.php index 1d1cb2e..210d1db 100644 --- a/web/config.php +++ b/web/config.php @@ -11,6 +11,18 @@ =20 // What should we set as the default list of packages? define("DEFAULT_PACKAGES", "dhcpd"); + + // What should we set as the default list of packages? + define("DEFAULT_USE", ""); + =20 + // What should we set as the default list of packages? + define("DEFAULT_PACKAGE_USE", ""); + =20 + // What should we set as the default list of packages? + define("DEFAULT_FEATURES", "parallel-fetch userfetch userpriv getbin= pkg"); + =20 + // What should we set as the default list of packages? + define("DEFAULT_KEYWORDS", ""); =20 // What should we limit the virtual machine disk size to? define("MAX_DISK_SIZE", 16384); diff --git a/web/index.php b/web/index.php index 99b9cf0..55484d0 100644 --- a/web/index.php +++ b/web/index.php @@ -190,6 +190,38 @@ ?>
+
+

Expert

+ + +
+ +

+

Image format

=20 diff --git a/web/process.php b/web/process.php index a005319..e0bf38a 100644 --- a/web/process.php +++ b/web/process.php @@ -40,6 +40,8 @@ =20 function sanitize_shellarg($arg) { + $arg =3D str_replace("\r\n", " ", $arg); + $arg =3D str_replace("\n", " ", $arg); return escapeshellarg($arg); } $sfi =3D array("options" =3D> "sanitize_shellarg"); @@ -54,11 +56,12 @@ $password =3D filter_input(INPUT_POST, "password", FILTER_CALLBACK, = $sfi); $rootPass =3D filter_input(INPUT_POST, "rootpassword", FILTER_CALLBA= CK, $sfi); $packagesList =3D filter_input(INPUT_POST, "packages", FILTER_CALLBA= CK, $sfi); + $use =3D filter_input(INPUT_POST, "use", FILTER_CALLBACK, $sfi); + $puse =3D filter_input(INPUT_POST, "puse", FILTER_CALLBACK, $sfi); + $features =3D filter_input(INPUT_POST, "features", FILTER_CALLBACK, = $sfi); + $keywords =3D filter_input(INPUT_POST, "keywords", FILTER_CALLBACK, = $sfi); $outputFormat =3D filter_input(INPUT_POST, "format", FILTER_CALLBACK= , $sfi); =20 - $packagesList =3D str_replace("\r\n", " ", $packagesList); - $packagesList =3D str_replace("\n", " ", $packagesList); - $iniString =3D "[vmconfig] =20 BUILD_ID=3D'$buildID' @@ -70,10 +73,10 @@ HOSTNAME=3D$hostname ROOT_PASSWORD=3D$rootPass DEFAULT_USERNAME=3D$username DEFAULT_PASSWORD=3D$password -USE_FLAGS=3D'' -PACKAGE_USE=3D'' -FEATURES=3D'parallel-fetch userfetch userpriv getbinpkg' -PACKAGE_ACCEPT_KEYWORDS=3D'' +USE_FLAGS=3D'$use' +PACKAGE_USE=3D'$puse' +FEATURES=3D'$features' +PACKAGE_ACCEPT_KEYWORDS=3D'$keywords' PACKAGES_LIST=3D$packagesList OUTPUT_FORMAT=3D$outputFormat"; =20