cvs: pear /PEAR_Frontend_Web WebInstaller.php /PEAR_Frontend_Web/Frontend Web.php /PEAR_Frontend_Web/Frontend/Web userDialog.tpl.html
| From: | Greg Beaver | Date: | Sun, 06 Feb 2005 21:27:11 +0000 |
| Subject: | cvs: pear /PEAR_Frontend_Web WebInstaller.php /PEAR_Frontend_Web/Frontend Web.php /PEAR_Frontend_Web/Frontend/Web userDialog.tpl.html | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-29157@lists.php.net to get a copy of this message | ||
cellog Sun Feb 6 16:27:11 2005 EDT
Modified files:
/pear/PEAR_Frontend_Web WebInstaller.php
/pear/PEAR_Frontend_Web/Frontend Web.php
/pear/PEAR_Frontend_Web/Frontend/Web userDialog.tpl.html
Log:
reimplement post-install scripts, as separate run-scripts command. This will not be visible until
the CLI version is proven stable
http://cvs.php.net/diff.php/pear/PEAR_Frontend_Web/WebInstaller.php?r1=1.31&r2=1.32&ty=u Index: pear/PEAR_Frontend_Web/WebInstaller.php diff -u pear/PEAR_Frontend_Web/WebInstaller.php:1.31 pear/PEAR_Frontend_Web/WebInstaller.php:1.32 --- pear/PEAR_Frontend_Web/WebInstaller.php:1.31 Mon Jan 31 01:07:38 2005 +++ pear/PEAR_Frontend_Web/WebInstaller.php Sun Feb 6 16:27:10 2005 @@ -17,7 +17,7 @@ | Pierre-Alain Joye <pajoye@php.net> | +----------------------------------------------------------------------+ - $Id: WebInstaller.php,v 1.31 2005/01/31 06:07:38 cellog Exp $ + $Id: WebInstaller.php,v 1.32 2005/02/06 21:27:10 cellog Exp $ */ define('PEAR_Frontend_Web',1); @session_start(); @@ -166,33 +166,11 @@ } Header("Location: ".$URL); exit; - case 'installscript' : - if (!isset($_SESSION['_PEAR_Frontend_Web_Script'])) { - return PEAR::raiseError('ERROR: install scripts can only be called from installation'); - } - include_once $_SESSION['_PEAR_Frontend_Web_ScriptFile']; - $oldscript = $_SESSION['_PEAR_Frontend_Web_Script']; - $script = new $_SESSION['_PEAR_Frontend_Web_ScriptClass']; - require_once 'PEAR/PackageFile/v2.php'; - $pkgfile = &new PEAR_PackageFile_v2; - $pkgfile->setConfig($config); - $pkgfile->fromArray($_SESSION['_PEAR_Frontend_Web_ScriptPkgFile']); - foreach (get_object_vars($oldscript) as $name => $val) { - $script->$name = $val; - } - $script->init($config, $ui); - if (method_exists($script, '__wakeup')) { - $script->__wakeup(); - } - $xml = $_SESSION['_PEAR_Frontend_Web_Xml']; - $installtype = $_SESSION['_PEAR_Frontend_Web_Installtype']; - $ui->_installScript = true; - $ui->startSession(); - $ui->runInstallScript($xml, $script, $installtype, $pkgfile); - $ui->finishOutput($pkgfile->getPackage() . ' Install Script', - array('link' => $URL . - '?command=remote-info&pkg='.$pkgfile->getPackage(), - 'text' => 'Click for ' .$pkgfile->getPackage() . ' Information')); + case 'run-scripts' : + $command = $_GET["command"]; + $params = array($_GET["pkg"]); + $cmd = PEAR_Command::factory($command, $config); + $ok = $cmd->run($command, $opts, $params); exit; case 'remote-info': $command = $_GET["command"]; http://cvs.php.net/diff.php/pear/PEAR_Frontend_Web/Frontend/Web.php?r1=1.28&r2=1.29&ty=u Index: pear/PEAR_Frontend_Web/Frontend/Web.php diff -u pear/PEAR_Frontend_Web/Frontend/Web.php:1.28 pear/PEAR_Frontend_Web/Frontend/Web.php:1.29 --- pear/PEAR_Frontend_Web/Frontend/Web.php:1.28 Mon Jan 31 01:07:26 2005 +++ pear/PEAR_Frontend_Web/Frontend/Web.php Sun Feb 6 16:27:11 2005 @@ -16,7 +16,7 @@ | Author: Christian Dickmann <dickmann@php.net> | +----------------------------------------------------------------------+ - $Id: Web.php,v 1.28 2005/01/31 06:07:26 cellog Exp $ + $Id: Web.php,v 1.29 2005/02/06 21:27:11 cellog Exp $ */ require_once "PEAR/Frontend.php"; @@ -793,6 +793,9 @@ function startSession() { if ($this->_installScript) { + if (!isset($_SESSION['_PEAR_Frontend_Web_SavedOutput'])) { + $_SESSION['_PEAR_Frontend_Web_SavedOutput'] = array(); + } $this->_savedOutput = $_SESSION['_PEAR_Frontend_Web_SavedOutput']; } else { $this->_savedOutput = array(); @@ -816,37 +819,71 @@ } $tpl->show(); } + + /** + * @param array An array of PEAR_Task_Postinstallscript objects (or related scripts) + * @param PEAR_PackageFile_v2 + */ + function runPostinstallScripts(&$scripts, $pkg) + { + if (!isset($_SESSION['_PEAR_Frontend_Web_Scripts'])) { + $saves = array(); + foreach ($scripts as $i => $task) { + $saves[$i] = (array) $task->_obj; + } + $_SESSION['_PEAR_Frontend_Web_Scripts'] = $saves; + $nonsession = true; + } else { + $nonsession = false; + } + foreach ($scripts as $i => $task) { + if (!isset($_SESSION['_PEAR_Frontend_Web_ScriptIndex'])) { + $_SESSION['_PEAR_Frontend_Web_ScriptIndex'] = $i; + } + if ($i != $_SESSION['_PEAR_Frontend_Web_ScriptIndex']) { + continue; + } + if (!$nonsession) { + // restore values from previous sessions to the install script + foreach ($_SESSION['_PEAR_Frontend_Web_Scripts'][$i] as $name => $val) { + if ($name{0} == '_') { + // only public variables will be restored + continue; + } + $scripts[$i]->_obj->$name = $val; + } + } + $this->_installScript = true; + $this->startSession(); + $this->runInstallScript($scripts[$i]->_params, $scripts[$i]->_obj, $pkg); + $saves = $scripts; + foreach ($saves as $i => $task) { + $saves[$i] = (array) $task->_obj; + } + $_SESSION['_PEAR_Frontend_Web_Scripts'] = $saves; + unset($_SESSION['_PEAR_Frontend_Web_ScriptIndex']); + } + $this->_installScript = false; + unset($_SESSION['_PEAR_Frontend_Web_Scripts']); + $this->finishOutput($pkg->getPackage() . ' Install Script', + array('link' => $GLOBALS['URL'] . + '?command=remote-info&pkg='.$pkg->getPackage(), + 'text' => 'Click for ' .$pkg->getPackage() . ' Information')); + } + /** * @param array $xml contents of postinstallscript tag * @param object $script post-installation script - * @param string $installtype install|upgrade * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 $pkg * @param string $contents contents of the install script */ - function runInstallScript($xml, &$script, $installtype, $pkg, $contents = null) + function runInstallScript($xml, &$script, &$pkg) { - if (!isset($_SESSION['_PEAR_Frontend_Web_Script'])) { - $_SESSION['_PEAR_Frontend_Web_SavedOutput'] = array(); - $_SESSION['_PEAR_Frontend_Web_ScriptFile'] = $contents; - $_SESSION['_PEAR_Frontend_Web_Script'] = $script; - $_SESSION['_PEAR_Frontend_Web_ScriptPkgFile'] = $pkg->toArray(); - $_SESSION['_PEAR_Frontend_Web_ScriptClass'] = get_class($script); - $_SESSION['_PEAR_Frontend_Web_Xml'] = $xml; - $_SESSION['_PEAR_Frontend_Web_Installtype'] = $installtype; + if (!isset($_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases'])) { $_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases'] = array(); - $URL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; - $URL .= '?command=installscript'; - if (isset($_GET['redirect'])) { - $URL .= '&redirect=' . $_GET['redirect']; - } - if (isset($_GET['pkg'])) { - $URL .= '&pkg=' . $_GET['pkg']; - } - header ('Location: ' . $URL); - exit; } if (!is_array($xml) || !isset($xml['paramgroup'])) { - $script->run(array(), '_default', $installtype); + $script->run(array(), '_default'); } else { if (!isset($xml['paramgroup'][0])) { $xml['paramgroup'][0] = array($xml['paramgroup']); @@ -902,18 +939,17 @@ $_SESSION['_PEAR_Frontend_Web_ScriptSection'] = $i; $answers = $this->confirmDialog($group['param'], $pkg->getPackage()); if ($answers) { - array_unshift($_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases'], $group['id']); - if (!$script->run($answers, $group['id'], $installtype)) { + array_unshift($_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases'], + $group['id']); + if (!$script->run($answers, $group['id'])) { $script->run($_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases'], - '_undoOnError', $installtype); + '_undoOnError'); $this->_clearScriptSession(); - $this->_installScript = false; return; } } else { - $script->run(array(), '_undoOnError', $installtype); + $script->run(array(), '_undoOnError'); $this->_clearScriptSession(); - $this->_installScript = false; return; } $lastgroup = $group; @@ -922,19 +958,12 @@ } } $this->_clearScriptSession(); - $this->_installScript = false; } function _clearScriptSession() { unset($_SESSION['_PEAR_Frontend_Web_answers']); unset($_SESSION['_PEAR_Frontend_Web_ScriptSection']); - unset($_SESSION['_PEAR_Frontend_Web_Script']); - unset($_SESSION['_PEAR_Frontend_Web_ScriptFile']); - unset($_SESSION['_PEAR_Frontend_Web_ScriptPkgFile']); - unset($_SESSION['_PEAR_Frontend_Web_ScriptClass']); - unset($_SESSION['_PEAR_Frontend_Web_Xml']); - unset($_SESSION['_PEAR_Frontend_Web_Installtype']); unset($_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases']); } @@ -964,7 +993,8 @@ $_SERVER['REQUEST_METHOD'] = ''; } $title = !$attempt ? $pkg . ' Install Script Input' : 'Please fill in all values'; - $answers = $this->userDialog('installscript', $prompts, $types, $answers, $title); + $answers = $this->userDialog('run-scripts', $prompts, $types, $answers, $title, '', + array('pkg' => $pkg)); if ($answers === false) { return false; } @@ -986,13 +1016,15 @@ * to be the same like in $prompts * @param string $title (optional) title of the page * @param string $icon (optional) iconhandle for this page + * @param array $extra (optional) extra parameters to put in the form action * * @access public * * @return array input sended by the user */ - function userDialog($command, $prompts, $types = array(), $defaults = array(), $title = '', $icon = '') + function userDialog($command, $prompts, $types = array(), $defaults = array(), $title = '', + $icon = '', $extra = array()) { // If this is an POST Request, we can return the userinput if (isset($_GET["command"]) && $_GET["command"]==$command @@ -1025,6 +1057,14 @@ $tpl = $this->_initTemplate("userDialog.tpl.html", $title, $icon); $tpl->setVariable("Command", $command); + $extrap = ''; + if (count($extra)) { + $extrap = '&'; + foreach ($extra as $name => $value) { + $extrap .= urlencode($name) . '=' . urlencode($value); + } + } + $tpl->setVariable("extra", $extrap); if (isset($this->_data[$command])) { $tpl->setVariable("Headline", nl2br($this->_data[$command])); } @@ -1051,7 +1091,7 @@ $tpl->parseCurrentBlock(); } } - if ($command == 'installscript') { + if ($command == 'run-scripts') { $tpl->setVariable("cancel", '<input type="submit" value="Cancel" name="cancel">'); } $tpl->show(); http://cvs.php.net/diff.php/pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html?r1=1.6&r2=1.7&ty=u Index: pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html diff -u pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html:1.6 pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html:1.7 --- pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html:1.6 Mon Jan 31 01:07:57 2005 +++ pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html Sun Feb 6 16:27:11 2005 @@ -1,7 +1,7 @@ <!-- INCLUDE header.inc.tpl.html --> <!-- INCLUDE top.inc.tpl.html --> {Headline} - <form action="{InstallerURL}?command={Command}" method="post"> + <form action="{InstallerURL}?command={Command}{extra}" method="post"> <TABLE border="0"> <!-- BEGIN InputField --> <TR>
http://cvs.php.net/diff.php/pear/PEAR_Frontend_Web/WebInstaller.php?r1=1.31&r2=1.32&ty=u Index: pear/PEAR_Frontend_Web/WebInstaller.php diff -u pear/PEAR_Frontend_Web/WebInstaller.php:1.31 pear/PEAR_Frontend_Web/WebInstaller.php:1.32 --- pear/PEAR_Frontend_Web/WebInstaller.php:1.31 Mon Jan 31 01:07:38 2005 +++ pear/PEAR_Frontend_Web/WebInstaller.php Sun Feb 6 16:27:10 2005 @@ -17,7 +17,7 @@ | Pierre-Alain Joye <pajoye@php.net> | +----------------------------------------------------------------------+ - $Id: WebInstaller.php,v 1.31 2005/01/31 06:07:38 cellog Exp $ + $Id: WebInstaller.php,v 1.32 2005/02/06 21:27:10 cellog Exp $ */ define('PEAR_Frontend_Web',1); @session_start(); @@ -166,33 +166,11 @@ } Header("Location: ".$URL); exit; - case 'installscript' : - if (!isset($_SESSION['_PEAR_Frontend_Web_Script'])) { - return PEAR::raiseError('ERROR: install scripts can only be called from installation'); - } - include_once $_SESSION['_PEAR_Frontend_Web_ScriptFile']; - $oldscript = $_SESSION['_PEAR_Frontend_Web_Script']; - $script = new $_SESSION['_PEAR_Frontend_Web_ScriptClass']; - require_once 'PEAR/PackageFile/v2.php'; - $pkgfile = &new PEAR_PackageFile_v2; - $pkgfile->setConfig($config); - $pkgfile->fromArray($_SESSION['_PEAR_Frontend_Web_ScriptPkgFile']); - foreach (get_object_vars($oldscript) as $name => $val) { - $script->$name = $val; - } - $script->init($config, $ui); - if (method_exists($script, '__wakeup')) { - $script->__wakeup(); - } - $xml = $_SESSION['_PEAR_Frontend_Web_Xml']; - $installtype = $_SESSION['_PEAR_Frontend_Web_Installtype']; - $ui->_installScript = true; - $ui->startSession(); - $ui->runInstallScript($xml, $script, $installtype, $pkgfile); - $ui->finishOutput($pkgfile->getPackage() . ' Install Script', - array('link' => $URL . - '?command=remote-info&pkg='.$pkgfile->getPackage(), - 'text' => 'Click for ' .$pkgfile->getPackage() . ' Information')); + case 'run-scripts' : + $command = $_GET["command"]; + $params = array($_GET["pkg"]); + $cmd = PEAR_Command::factory($command, $config); + $ok = $cmd->run($command, $opts, $params); exit; case 'remote-info': $command = $_GET["command"]; http://cvs.php.net/diff.php/pear/PEAR_Frontend_Web/Frontend/Web.php?r1=1.28&r2=1.29&ty=u Index: pear/PEAR_Frontend_Web/Frontend/Web.php diff -u pear/PEAR_Frontend_Web/Frontend/Web.php:1.28 pear/PEAR_Frontend_Web/Frontend/Web.php:1.29 --- pear/PEAR_Frontend_Web/Frontend/Web.php:1.28 Mon Jan 31 01:07:26 2005 +++ pear/PEAR_Frontend_Web/Frontend/Web.php Sun Feb 6 16:27:11 2005 @@ -16,7 +16,7 @@ | Author: Christian Dickmann <dickmann@php.net> | +----------------------------------------------------------------------+ - $Id: Web.php,v 1.28 2005/01/31 06:07:26 cellog Exp $ + $Id: Web.php,v 1.29 2005/02/06 21:27:11 cellog Exp $ */ require_once "PEAR/Frontend.php"; @@ -793,6 +793,9 @@ function startSession() { if ($this->_installScript) { + if (!isset($_SESSION['_PEAR_Frontend_Web_SavedOutput'])) { + $_SESSION['_PEAR_Frontend_Web_SavedOutput'] = array(); + } $this->_savedOutput = $_SESSION['_PEAR_Frontend_Web_SavedOutput']; } else { $this->_savedOutput = array(); @@ -816,37 +819,71 @@ } $tpl->show(); } + + /** + * @param array An array of PEAR_Task_Postinstallscript objects (or related scripts) + * @param PEAR_PackageFile_v2 + */ + function runPostinstallScripts(&$scripts, $pkg) + { + if (!isset($_SESSION['_PEAR_Frontend_Web_Scripts'])) { + $saves = array(); + foreach ($scripts as $i => $task) { + $saves[$i] = (array) $task->_obj; + } + $_SESSION['_PEAR_Frontend_Web_Scripts'] = $saves; + $nonsession = true; + } else { + $nonsession = false; + } + foreach ($scripts as $i => $task) { + if (!isset($_SESSION['_PEAR_Frontend_Web_ScriptIndex'])) { + $_SESSION['_PEAR_Frontend_Web_ScriptIndex'] = $i; + } + if ($i != $_SESSION['_PEAR_Frontend_Web_ScriptIndex']) { + continue; + } + if (!$nonsession) { + // restore values from previous sessions to the install script + foreach ($_SESSION['_PEAR_Frontend_Web_Scripts'][$i] as $name => $val) { + if ($name{0} == '_') { + // only public variables will be restored + continue; + } + $scripts[$i]->_obj->$name = $val; + } + } + $this->_installScript = true; + $this->startSession(); + $this->runInstallScript($scripts[$i]->_params, $scripts[$i]->_obj, $pkg); + $saves = $scripts; + foreach ($saves as $i => $task) { + $saves[$i] = (array) $task->_obj; + } + $_SESSION['_PEAR_Frontend_Web_Scripts'] = $saves; + unset($_SESSION['_PEAR_Frontend_Web_ScriptIndex']); + } + $this->_installScript = false; + unset($_SESSION['_PEAR_Frontend_Web_Scripts']); + $this->finishOutput($pkg->getPackage() . ' Install Script', + array('link' => $GLOBALS['URL'] . + '?command=remote-info&pkg='.$pkg->getPackage(), + 'text' => 'Click for ' .$pkg->getPackage() . ' Information')); + } + /** * @param array $xml contents of postinstallscript tag * @param object $script post-installation script - * @param string $installtype install|upgrade * @param PEAR_PackageFile_v1|PEAR_PackageFile_v2 $pkg * @param string $contents contents of the install script */ - function runInstallScript($xml, &$script, $installtype, $pkg, $contents = null) + function runInstallScript($xml, &$script, &$pkg) { - if (!isset($_SESSION['_PEAR_Frontend_Web_Script'])) { - $_SESSION['_PEAR_Frontend_Web_SavedOutput'] = array(); - $_SESSION['_PEAR_Frontend_Web_ScriptFile'] = $contents; - $_SESSION['_PEAR_Frontend_Web_Script'] = $script; - $_SESSION['_PEAR_Frontend_Web_ScriptPkgFile'] = $pkg->toArray(); - $_SESSION['_PEAR_Frontend_Web_ScriptClass'] = get_class($script); - $_SESSION['_PEAR_Frontend_Web_Xml'] = $xml; - $_SESSION['_PEAR_Frontend_Web_Installtype'] = $installtype; + if (!isset($_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases'])) { $_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases'] = array(); - $URL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; - $URL .= '?command=installscript'; - if (isset($_GET['redirect'])) { - $URL .= '&redirect=' . $_GET['redirect']; - } - if (isset($_GET['pkg'])) { - $URL .= '&pkg=' . $_GET['pkg']; - } - header ('Location: ' . $URL); - exit; } if (!is_array($xml) || !isset($xml['paramgroup'])) { - $script->run(array(), '_default', $installtype); + $script->run(array(), '_default'); } else { if (!isset($xml['paramgroup'][0])) { $xml['paramgroup'][0] = array($xml['paramgroup']); @@ -902,18 +939,17 @@ $_SESSION['_PEAR_Frontend_Web_ScriptSection'] = $i; $answers = $this->confirmDialog($group['param'], $pkg->getPackage()); if ($answers) { - array_unshift($_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases'], $group['id']); - if (!$script->run($answers, $group['id'], $installtype)) { + array_unshift($_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases'], + $group['id']); + if (!$script->run($answers, $group['id'])) { $script->run($_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases'], - '_undoOnError', $installtype); + '_undoOnError'); $this->_clearScriptSession(); - $this->_installScript = false; return; } } else { - $script->run(array(), '_undoOnError', $installtype); + $script->run(array(), '_undoOnError'); $this->_clearScriptSession(); - $this->_installScript = false; return; } $lastgroup = $group; @@ -922,19 +958,12 @@ } } $this->_clearScriptSession(); - $this->_installScript = false; } function _clearScriptSession() { unset($_SESSION['_PEAR_Frontend_Web_answers']); unset($_SESSION['_PEAR_Frontend_Web_ScriptSection']); - unset($_SESSION['_PEAR_Frontend_Web_Script']); - unset($_SESSION['_PEAR_Frontend_Web_ScriptFile']); - unset($_SESSION['_PEAR_Frontend_Web_ScriptPkgFile']); - unset($_SESSION['_PEAR_Frontend_Web_ScriptClass']); - unset($_SESSION['_PEAR_Frontend_Web_Xml']); - unset($_SESSION['_PEAR_Frontend_Web_Installtype']); unset($_SESSION['_PEAR_Frontend_Web_ScriptCompletedPhases']); } @@ -964,7 +993,8 @@ $_SERVER['REQUEST_METHOD'] = ''; } $title = !$attempt ? $pkg . ' Install Script Input' : 'Please fill in all values'; - $answers = $this->userDialog('installscript', $prompts, $types, $answers, $title); + $answers = $this->userDialog('run-scripts', $prompts, $types, $answers, $title, '', + array('pkg' => $pkg)); if ($answers === false) { return false; } @@ -986,13 +1016,15 @@ * to be the same like in $prompts * @param string $title (optional) title of the page * @param string $icon (optional) iconhandle for this page + * @param array $extra (optional) extra parameters to put in the form action * * @access public * * @return array input sended by the user */ - function userDialog($command, $prompts, $types = array(), $defaults = array(), $title = '', $icon = '') + function userDialog($command, $prompts, $types = array(), $defaults = array(), $title = '', + $icon = '', $extra = array()) { // If this is an POST Request, we can return the userinput if (isset($_GET["command"]) && $_GET["command"]==$command @@ -1025,6 +1057,14 @@ $tpl = $this->_initTemplate("userDialog.tpl.html", $title, $icon); $tpl->setVariable("Command", $command); + $extrap = ''; + if (count($extra)) { + $extrap = '&'; + foreach ($extra as $name => $value) { + $extrap .= urlencode($name) . '=' . urlencode($value); + } + } + $tpl->setVariable("extra", $extrap); if (isset($this->_data[$command])) { $tpl->setVariable("Headline", nl2br($this->_data[$command])); } @@ -1051,7 +1091,7 @@ $tpl->parseCurrentBlock(); } } - if ($command == 'installscript') { + if ($command == 'run-scripts') { $tpl->setVariable("cancel", '<input type="submit" value="Cancel" name="cancel">'); } $tpl->show(); http://cvs.php.net/diff.php/pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html?r1=1.6&r2=1.7&ty=u Index: pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html diff -u pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html:1.6 pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html:1.7 --- pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html:1.6 Mon Jan 31 01:07:57 2005 +++ pear/PEAR_Frontend_Web/Frontend/Web/userDialog.tpl.html Sun Feb 6 16:27:11 2005 @@ -1,7 +1,7 @@ <!-- INCLUDE header.inc.tpl.html --> <!-- INCLUDE top.inc.tpl.html --> {Headline} - <form action="{InstallerURL}?command={Command}" method="post"> + <form action="{InstallerURL}?command={Command}{extra}" method="post"> <TABLE border="0"> <!-- BEGIN InputField --> <TR>