diff options
author | Eudyptula <eitan@mosenkis.net> | 2009-08-14 11:42:02 -0400 |
---|---|---|
committer | Eudyptula <eitan@mosenkis.net> | 2009-08-14 11:42:02 -0400 |
commit | 53eb7629d4cb33f62da5fe232bf2019e1a54d4f9 (patch) | |
tree | 4c40d2ef78dfd1564934612ee81df596ec3e350b /shared/classes | |
parent | Create sql_row_with_flags class, make user, build, configuration subclasses o... (diff) | |
download | ingenue-53eb7629d4cb33f62da5fe232bf2019e1a54d4f9.tar.gz ingenue-53eb7629d4cb33f62da5fe232bf2019e1a54d4f9.tar.bz2 ingenue-53eb7629d4cb33f62da5fe232bf2019e1a54d4f9.zip |
Quick hack to move bundler selection out of Gentoo module and make it a build-time option; drop 'failed' column from builds and use flags instead
Diffstat (limited to 'shared/classes')
-rw-r--r-- | shared/classes/build.php | 17 | ||||
-rw-r--r-- | shared/classes/configuration.php | 3 |
2 files changed, 10 insertions, 10 deletions
diff --git a/shared/classes/build.php b/shared/classes/build.php index 6ba6798..2484bf0 100644 --- a/shared/classes/build.php +++ b/shared/classes/build.php @@ -25,6 +25,11 @@ class sql_build extends conf_build_common { 'not_null' => true, 'default' => '' ), + 'bundler' => array ( + 'type' => 'VARCHAR', + 'length' => 255, + 'not_null' => true + ), 'flags' => array ( 'type' => 'VARCHAR', 'length' => 255, @@ -49,12 +54,6 @@ class sql_build extends conf_build_common { 'length' => 4, 'unsigned' => true ), - 'failed' => array ( - 'type' => 'ENUM', - 'length' => '\'false\',\'true\'', - 'not_null' => true, - 'default' => 'false' - ), 'ctime' => array ( 'type' => 'INT', 'length' => 10, @@ -77,7 +76,7 @@ class sql_build extends conf_build_common { $format='D j M Y G:i:s T'; $perms=!$this->has_flag('p') || owner_or_admin($this->id); $html='<div class="build"><span class="name">'.(isset($this->name) && strlen($this->name)?htmlentities($this->name):'Unnamed Build').'</span> '; - if ($this->failed == 'true') + if ($this->has_flag('f')) $html.='<span class="status failed">[failed]</span> '; $links=array(); switch ($this->status) { @@ -121,7 +120,7 @@ class sql_build extends conf_build_common { $html.='<span class="status failed">[UNKNOWN STATUS: '.$this->status.']</span>'; } if ($perms) { - if ($this->status == 'canceled' || $this->status == 'queued' || $this->status == 'complete' || $this->failed == 'true') + if ($this->status == 'canceled' || $this->status == 'queued' || $this->status == 'complete' || $this->has_flag('f')) $links['Delete']="build/$this->id/delete"; elseif ($this->status != 'cancel') $links['Cancel']="build/$this->id/cancel"; @@ -259,7 +258,7 @@ class sql_build extends conf_build_common { return $result; } private function failed() { - $this->failed='true'; + $this->set_flag('f'); $this->finish=time(); $this->write(); } diff --git a/shared/classes/configuration.php b/shared/classes/configuration.php index 4d7ac60..062bb73 100644 --- a/shared/classes/configuration.php +++ b/shared/classes/configuration.php @@ -37,7 +37,7 @@ class sql_configuration extends conf_build_common { 'default' => 0 ) ); - public function build($name=null) { + public function build($name, $bundler) { $module=new module($this->module); for ($i=1; $i<=$module->numsteps; $i++) { $step=new wizard_step($this, $i); @@ -51,6 +51,7 @@ class sql_configuration extends conf_build_common { $build->init(); $build->name=$name; $build->module=$this->module; + $build->bundler=$bundler; $build->flags=$this->flags; $opts=$this->get_opts(); $opts['configuration']=$this->id; |