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); 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 "<p>Please read the comments on updating this version. <a href=\"update-".$updatedir."/update.txt\" target=\"_blank\">Read now</a></p>"; } - print "<p>Run the <a href=\"update.php?version=".$updatedir."\">update script</a>.</p>"; + print "<p><a href=\"update.php?version=".$updatedir."\" class=\"btn btn-primary\">Run the update script</a>.</p>"; } } } else { 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; 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."<br />"; if(false === $db->exec($query)) { $e = $db->ErrorInfo(); - $errorMsg .= $e[2] . "<br/>"; + $errorMsg .= $query.": ".$e[2] . "<br/>"; } } } @@ -98,12 +100,13 @@ if($rec = $res->fetch(PDO::FETCH_ASSOC)) { } else { echo $errorMsg; } - echo "<p><a href=\"install.php\">Go back to installation and recheck.</a></p>"; + echo "<p><a href=\"install.php\" class=\"btn btn-primary\">Go back to installation and recheck.</a></p>"; } else { echo "<p>Could not determine database schema version.</p>"; } $db = null; UI::contentContainerEnd(); +UI::contentEnd(); UI::htmlEndPage(); ?>