From 20c0abf69d8af937ec9deefca811cc66a09da453 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 15:33:57 +0200 Subject: [PATCH 1/4] add missing attribute 'target' to converters this needs to be done when updating from 5.0.x to 5.1.x --- inc/inc.ClassSettings.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 6cd27fba2..3ec7ff2f7 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -843,7 +843,7 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "smtpPassword", $this->_smtpPassword); // XML Path: /configuration/advanced/display - $this->getXMLNode($xml, '/configuration', 'advanced'); + $advnode = $this->getXMLNode($xml, '/configuration', 'advanced'); $node = $this->getXMLNode($xml, '/configuration/advanced', 'display'); $this->setXMLAttributValue($node, "siteDefaultPage", $this->_siteDefaultPage); $this->setXMLAttributValue($node, "rootFolderID", $this->_rootFolderID); @@ -889,6 +889,12 @@ class Settings { /* {{{ */ $this->setXMLAttributValue($node, "maxExecutionTime", $this->_maxExecutionTime); $this->setXMLAttributValue($node, "cmdTimeout", $this->_cmdTimeout); + /* Check if there is still a converters list with a target attribute */ + $node = $xml->xpath('/configuration/advanced/converters[count(@*)=0]'); + if (count($node)>0) { + $this->setXMLAttributValue($node[0], 'target', 'fulltext'); + } + // XML Path: /configuration/advanced/converters foreach($this->_converters as $type=>$converters) { foreach($this->_converters[$type] as $mimeType => $cmd) { @@ -907,6 +913,10 @@ class Settings { /* {{{ */ } else { if(trim($cmd)) { $nodeParent = $xml->xpath('/configuration/advanced/converters[@target="'.$type.'"]'); + if(count($nodeParent) == 0) { + $nodeParent = array($advnode->addChild("converters")); + $this->setXMLAttributValue($nodeParent[0], 'target', $type); + } $node = $nodeParent[0]->addChild("converter"); $node[0] = $cmd; $this->setXMLAttributValue($node, 'mimeType', $mimeType); From 037646537b7371dbf586df6923135e61267838d4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 16:00:16 +0200 Subject: [PATCH 2/4] set version to 5.1.0, use btn instead of plain link --- install/install.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install.php b/install/install.php index 1e550d647..c09f667e8 100644 --- a/install/install.php +++ b/install/install.php @@ -118,7 +118,7 @@ function fileExistsInIncludePath($file) { /* {{{ */ * Load default settings + set */ define("SEEDDMS_INSTALL", "on"); -define("SEEDDMS_VERSION", "5.0.2"); +define("SEEDDMS_VERSION", "5.1.0"); require_once('../inc/inc.ClassSettings.php'); @@ -362,7 +362,7 @@ if ($action=="setSettings") { if(file_exists('update-'.$updatedir.'/update.txt')) { print "

Please read the comments on updating this version. Read now

"; } - print "

Run the update script.

"; + print "

Run the update script.

"; } } } else { From 35c8e5763338b2cae39a70e80e1a84dcbbb49238 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 16:00:46 +0200 Subject: [PATCH 3/4] don't drop old table tblUsers, just rename it dropping it, always issues an error 'database locked' --- install/update-5.1.0/update-sqlite3.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/update-5.1.0/update-sqlite3.sql b/install/update-5.1.0/update-sqlite3.sql index 6d136b90b..9ddf1f026 100644 --- a/install/update-5.1.0/update-sqlite3.sql +++ b/install/update-5.1.0/update-sqlite3.sql @@ -108,7 +108,7 @@ CREATE TABLE `new_tblUsers` ( INSERT INTO new_tblUsers SELECT * FROM tblUsers; -DROP TABLE tblUsers; +ALTER TABLE tblUsers RENAME TO old_tblUsers; ALTER TABLE new_tblUsers RENAME TO tblUsers; From d0ef7f42381326350b3ceb05da3327bd87ada3ed Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 21 Apr 2016 16:01:38 +0200 Subject: [PATCH 4/4] convert to bootstrap --- install/update.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install/update.php b/install/update.php index afc7e3e46..05fedca03 100644 --- a/install/update.php +++ b/install/update.php @@ -33,11 +33,13 @@ if (!file_exists($configDir."/ENABLE_INSTALL_TOOL")) { exit; } -$theme = "blue"; +$theme = "bootstrap"; require_once("../inc/inc.Language.php"); require_once("../inc/inc.ClassUI.php"); UI::htmlStartPage('Database update'); +UI::globalBanner(); +UI::contentStart(); UI::contentHeading("SeedDMS Installation for version ".$_GET['version']); UI::contentContainerStart(); @@ -77,7 +79,7 @@ if($rec = $res->fetch(PDO::FETCH_ASSOC)) { echo $query."
"; if(false === $db->exec($query)) { $e = $db->ErrorInfo(); - $errorMsg .= $e[2] . "
"; + $errorMsg .= $query.": ".$e[2] . "
"; } } } @@ -98,12 +100,13 @@ if($rec = $res->fetch(PDO::FETCH_ASSOC)) { } else { echo $errorMsg; } - echo "

Go back to installation and recheck.

"; + echo "

Go back to installation and recheck.

"; } else { echo "

Could not determine database schema version.

"; } $db = null; UI::contentContainerEnd(); +UI::contentEnd(); UI::htmlEndPage(); ?>