summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEudyptula <eitan@mosenkis.net>2009-07-06 16:08:33 -0400
committerEudyptula <eitan@mosenkis.net>2009-07-06 16:08:33 -0400
commit8142c45b618eaa99f3380c2e0714e95d87e14ee2 (patch)
treeec1461d218b966307dd0239dbf362888ed600b55 /frontend
parentAdd javascript-based searching to package adding stage (diff)
downloadingenue-8142c45b618eaa99f3380c2e0714e95d87e14ee2.tar.gz
ingenue-8142c45b618eaa99f3380c2e0714e95d87e14ee2.tar.bz2
ingenue-8142c45b618eaa99f3380c2e0714e95d87e14ee2.zip
Stored all data from Packages files in the db to allow frontend/backend separation; created script to update db cache of available packages; renamed profiles -> gentoo_profiles for proper modularity
Diffstat (limited to 'frontend')
-rw-r--r--frontend/modules/gentoo/step1.php8
-rw-r--r--frontend/modules/gentoo/step2.php4
2 files changed, 6 insertions, 6 deletions
diff --git a/frontend/modules/gentoo/step1.php b/frontend/modules/gentoo/step1.php
index aeb0a9e..20899bb 100644
--- a/frontend/modules/gentoo/step1.php
+++ b/frontend/modules/gentoo/step1.php
@@ -6,10 +6,10 @@ function gentoo_body_step1() {
global $S;
$configuration=&$S['wizard.configuration'];
//$opts=$configuration->get_configopts(); // TODO use this to set selected="selected" on the current profile
- echo 'Profile: <select name="pkgdir">';
- $r=$S['pdo']->query('SELECT * FROM `profiles` WHERE `flags` NOT LIKE "%d%"'); // d for disabled
+ echo 'Profile: <select name="profileid">';
+ $r=$S['pdo']->query('SELECT * FROM `gentoo_profiles` WHERE `flags` NOT LIKE "%d%"'); // d for disabled
while ($profile=$r->fetch(PDO::FETCH_ASSOC)) {
- $profile=new sql_profile($profile);
+ $profile=new sql_gentoo_profile($profile);
$display=$profile->name?$profile->name:($profile->pkgdir?$profile->pkgdir:'/');
echo '<option value="'.$profile->id.'">'.htmlentities($display).'</option>';
}
@@ -17,7 +17,7 @@ function gentoo_body_step1() {
}
function gentoo_process_step1() {
global $S, $request;
- $profile=new sql_profile($request['pkgdir']);
+ $profile=new sql_gentoo_profile($request['profileid']);
$profileopt=new sql_configopt($S['wizard.configuration']->id, 'profile', $profile->id);
$profileopt->write();
}
diff --git a/frontend/modules/gentoo/step2.php b/frontend/modules/gentoo/step2.php
index e94e978..c800a5d 100644
--- a/frontend/modules/gentoo/step2.php
+++ b/frontend/modules/gentoo/step2.php
@@ -107,7 +107,7 @@ function gentoo_body_step2() {
global $S;
$configuration=&$S['wizard.configuration'];
$opts=$configuration->get_configopts();
- $profile=new sql_profile($opts['profile']);
+ $profile=new sql_gentoo_profile($opts['profile']);
$bcs=$profile->get_packages();
echo 'Search packages: <input id="psearch" onkeyup="packagesearch(this)" /> <a href="javascript:var e=document.getElementById(\'psearch\'); e.value=\'\'; e.onkeyup()">Clear</a>';
echo '<div id="plist"><div id="zero" style="display: none">'.print_error('No results found.').'</div>';
@@ -119,7 +119,7 @@ function gentoo_body_step2() {
foreach ($packages as $name => $vers) {
foreach ($vers as $ver => $attrs) {
$safename=htmlentities("$bc$lc/$name-$ver");
- echo '<div class="pkg'.($attrs['masked']?' masked':'').'"><input id="p'.$i.'" type="checkbox" name="expkgs['.$safename.']" /><label class="pd" for="p'.$i++.'">'.htmlentities("$name-$ver").' - '.htmlentities($attrs['description']).($attrs['masked']?' [MASKED]':'').'</label></div>'."\n";
+ echo '<div class="pkg'.($attrs['masked']?' masked':'').'"><input id="p'.$i.'" type="checkbox" name="expkgs['.$safename.']" /><label class="pd" for="p'.$i++.'">'.htmlentities("$name-$ver").' - '.htmlentities($attrs['desc']).($attrs['masked']?' [MASKED]':'').'</label></div>'."\n";
}
}
echo '</div>'."\n";