diff options
author | Eudyptula <eitan@mosenkis.net> | 2009-08-04 17:58:55 -0400 |
---|---|---|
committer | Eudyptula <eitan@mosenkis.net> | 2009-08-04 17:58:55 -0400 |
commit | d3da989d3e2d2cb03cdc4bd2e23783f716ef5035 (patch) | |
tree | 2f9f8c413d2800a3f72282dec0f86170a00ff4f6 /frontend/classes/wizard.php | |
parent | Add visibility column to builds, configurations (diff) | |
download | ingenue-d3da989d3e2d2cb03cdc4bd2e23783f716ef5035.tar.gz ingenue-d3da989d3e2d2cb03cdc4bd2e23783f716ef5035.tar.bz2 ingenue-d3da989d3e2d2cb03cdc4bd2e23783f716ef5035.zip |
Widespread cleanup - moved $conf, $death into $S; $S is given as arg to init_x() and body_x(); $request removed in favor of $_REQUEST; query() replaces $S[pdo]->query(); etc.
Diffstat (limited to 'frontend/classes/wizard.php')
-rw-r--r-- | frontend/classes/wizard.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/frontend/classes/wizard.php b/frontend/classes/wizard.php index 4d0d7b7..de37e72 100644 --- a/frontend/classes/wizard.php +++ b/frontend/classes/wizard.php @@ -1,6 +1,6 @@ <?php class wizard_step { - var $configuration, $module, $step, $title, $next, $data=array(); + public $configuration, $module, $step, $title, $next, $data=array(); function __construct(&$c, $step, $noload=false) { $this->configuration=&$c; $this->module=new module($c->module); @@ -16,13 +16,13 @@ class wizard_step { $this->next=isset($next)?$next:($this->step == $this->module->numsteps?null:$step+1); } public function output($rw=true) { - global $conf; + global $S; echo "<div class=\"wizard\" id=\"step$this->step\">"; if ($rw) echo '<form action="'.url('config/'.$this->configuration->id).'" method="post"><a style="float: right" href="'.url('config/'.$this->configuration->id.'/status').'">Status</a>'; if ($rw) { echo '<h3>Step '.$this->step.': '.$this->title."</h3>\n"; - $scale=$conf['progressbar_width']/$this->module->numsteps; + $scale=$S['conf']['progressbar_width']/$this->module->numsteps; echo '<img src="'.url('images/full.gif').'" style="border-left: 1px solid black; border-top: 1px solid black; border-bottom: 1px solid black; width: '.$this->step*$scale.'px; height: 15px" /><img src="'.url('images/empty.gif').'" style="border-right: 1px solid black; border-top: 1px solid black; border-bottom: 1px solid black; width: '.(count($this->module->steps)-$this->step)*$scale.'px; height: 15px" /><br/>'."\n"; $this->echo_buttons(); } @@ -43,8 +43,7 @@ class wizard_step { echo '</div>'."\n"; } public function process() { - global $request; - if (!isset($request['wizard_submit'][$this->step])) { + if (!isset($_REQUEST['wizard_submit'][$this->step])) { return $this->step; } $result=$this->next; @@ -91,9 +90,6 @@ class wizard_step { private function layered_checkbox_array($optname, $htmlname, $label, &$array, $delim=' ', $metadata) { $this->data[]=array(new layered_checkbox_array($htmlname, $label, $array, $delim, $metadata), $optname); } - private function query($q) { - return $GLOBALS['S']['pdo']->query($q); - } private function set_opt($opt, $val) { return $this->configuration->set_opt($opt, $val); } |