We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

View | Details | Raw Unified | Return to bug 6667 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +7 lines)
Line     Link Here 
0
-- a/classes/install/Installer.inc.php
0
++ b/classes/install/Installer.inc.php
 Lines 290-299   class Installer { Link Here 
290
	function updateVersion() {
290
	function updateVersion() {
291
		if ($this->newVersion->compare($this->currentVersion) > 0) {
291
		if ($this->newVersion->compare($this->currentVersion) > 0) {
292
			if ($this->getParam('manualInstall')) {
292
			if ($this->getParam('manualInstall')) {
293
				// Mark old version as no longer current
294
				$this->executeSQL(sprintf('UPDATE versions SET current = 0 WHERE product = %s', $this->dbconn->qstr($this->currentVersion->getProduct())));
295
293
				// FIXME Would be better to have a mode where $dbconn->execute() saves the query
296
				// FIXME Would be better to have a mode where $dbconn->execute() saves the query
294
				return $this->executeSQL(sprintf('INSERT INTO versions (major, minor, revision, build, date_installed, current, product_type, product, product_class_name, lazy_load, sitewide) VALUES (%d, %d, %d, %d, NOW(), 1, %s, %s, %s, %d, %d)', $this->newVersion->getMajor(), $this->newVersion->getMinor(), $this->newVersion->getRevision(), $this->newVersion->getBuild(), $this->dbconn->qstr($this->newVersion->getProductType()), $this->dbconn->qstr($this->newVersion->getProduct()), $this->dbconn->qstr($this->newVersion->getProductClassName()), ($this->newVersion->getLazyLoad()?1:0), ($this->newVersion->getSitewide()?1:0)));
297
				return $this->executeSQL(sprintf('INSERT INTO versions (major, minor, revision, build, date_installed, current, product_type, product, product_class_name, lazy_load, sitewide) VALUES (%d, %d, %d, %d, NOW(), 1, %s, %s, %s, %d, %d)', $this->newVersion->getMajor(), $this->newVersion->getMinor(), $this->newVersion->getRevision(), $this->newVersion->getBuild(), $this->dbconn->qstr($this->newVersion->getProductType()), $this->dbconn->qstr($this->newVersion->getProduct()), $this->dbconn->qstr($this->newVersion->getProductClassName()), ($this->newVersion->getLazyLoad()?1:0), ($this->newVersion->getSitewide()?1:0)));
295
			} else {
298
			} else {
296
				$versionDao =& DAORegistry::getDAO('VersionDAO');
299
				$versionDao =& DAORegistry::getDAO('VersionDAO');
300
				// Mark old version as no longer current
301
				$versionDao->disableVersion($this->currentVersion->getProduct());
302
297
				if (!$versionDao->insertVersion($this->newVersion)) {
303
				if (!$versionDao->insertVersion($this->newVersion)) {
298
					return false;
304
					return false;
299
				}
305
				}

Return to bug 6667