diff options
Diffstat (limited to 'frontend/pages/configurations/manager.php')
-rw-r--r-- | frontend/pages/configurations/manager.php | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/frontend/pages/configurations/manager.php b/frontend/pages/configurations/manager.php index 928ad67..e29ab88 100644 --- a/frontend/pages/configurations/manager.php +++ b/frontend/pages/configurations/manager.php @@ -7,13 +7,14 @@ function init_configurations_manager(&$S) { } function body_configurations_manager(&$S) { echo '<h3>Configurations Manager</h3>'; - if (isset($_REQUEST['build']) && isset($_REQUEST['configuration'])) { + if (isset($_REQUEST['build'], $_REQUEST['configuration'])) { $c=new sql_configuration($_REQUEST['configuration']); - if ($c->owner!=$S['user']->id) { + if (!owner_or_admin($c->owner)) { echo print_error('You do not have permission to build this configuration.'); } else { $name=isset($_REQUEST['name'])?$_REQUEST['name']:null; - $build=$c->build($name); + $bundler=isset($_REQUEST['bundler'])?$_REQUEST['bundler']:'tbz2'; + $build=$c->build($name, $bundler); if (is_object($build)) echo print_success('Submitted for build - <a href="'.url("build/$build->id").'">Logs</a>'); else @@ -60,6 +61,27 @@ function body_configurations_manager(&$S) { } echo "</td></tr>\n"; } - echo '</table>'.($ready?'Name (optional): <input name="name" /> <input type="submit" name="build" value="Build" />':'').'</form>'; + echo '</table>'; + if ($ready) { + echo 'Name (optional): <input name="name" /><br/> + Bundler: <select name="bundler"> + <option value="tbz2">Tar/Bzip2</option> + <option value="tgz">Tar/Gzip</option> + <option value="installcd">Install CD with Tar/Bzip2</option> + <option value="livecd">LiveCD</option> + <option value="ext2">ext2</option> + <option value="jffs2">jffs2</option> + </select><br/> + <input type="submit" name="build" value="Build" />'; + } + echo '</form>'; + /*$this->select('bundler', 'bundler', 'Image type', array( + 'tgz' => 'Tar/Gzip', + 'tbz2' => 'Tar/Bzip2', + 'installcd' => 'Installer CD with Tar/Bzip2', + 'livecd' => 'LiveCD', + 'ext2' => 'ext2', + 'jffs2' => 'jffs2' + ));*/ } ?> |