From 8d60de5d4ecc7f6afdc755e5ba86bed01c2daece Mon Sep 17 00:00:00 2001 From: Paul Barrett Date: Fri, 6 Nov 2009 17:45:21 +0200 Subject: [PATCH] Added thumbnail seetings to data.sql and upgrade sql --- plugins/thumbnails/sql/upgradeto0.sql | 2 -- setup/wizard/steps/database.php | 16 ---------------- sql/mysql/install/data.sql | 3 ++- sql/mysql/upgrade/3.7.0/config_settings.sql | 5 ++++- 4 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 plugins/thumbnails/sql/upgradeto0.sql diff --git a/plugins/thumbnails/sql/upgradeto0.sql b/plugins/thumbnails/sql/upgradeto0.sql deleted file mode 100644 index 4c9c06d..0000000 --- a/plugins/thumbnails/sql/upgradeto0.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `config_settings` (group_name, display_name, description, item, value, default_value, type, options, can_edit) -VALUES ('externalBinary', 'convert', 'The path to the ImageMagick "convert" binary', 'convertPath', 'default', 'convert', 'string', NULL, 1); \ No newline at end of file diff --git a/setup/wizard/steps/database.php b/setup/wizard/steps/database.php index 1d0a18f..6a7f8c4 100644 --- a/setup/wizard/steps/database.php +++ b/setup/wizard/steps/database.php @@ -790,22 +790,6 @@ class database extends Step // continue without attempting to set the path if we can't find the file in the specified location if (!file_exists(SYSTEM_ROOT . $bin[1])) continue; - // thumbnails is a special case, being a plugin which won't have an entry on a new installation - if ($displayName == 'convert') { - // check if there is an entry, if not, insert and continue to next loop, else continue to update statement - $query = 'SELECT id FROM config_settings WHERE display_name = "' . $displayName . '"'; - $this->util->dbUtilities->query($query); - $result = $this->util->dbUtilities->fetchAssoc(); - if (is_null($result)) { - $query = "INSERT INTO `config_settings` " - . "(group_name, display_name, description, item, value, default_value, type, options, can_edit) " - . "VALUES ('" . $bin[0] . "', 'convert', 'The path to the ImageMagick \"convert\" binary', 'convertPath', " - . "'" . str_replace('\\', '\\\\', SYSTEM_ROOT . $bin[1]) . "', 'convert', 'string', NULL, 1);"; - $this->util->dbUtilities->query($query); - continue; - } - } - $updateBin = 'UPDATE config_settings c SET c.value = "'. str_replace('\\', '\\\\', SYSTEM_ROOT . $bin[1]) . '" ' . 'where c.group_name = "' . $bin[0] . '" and c.display_name = "'.$displayName.'";'; $this->util->dbUtilities->query($updateBin); diff --git a/sql/mysql/install/data.sql b/sql/mysql/install/data.sql index 5cb4c0b..a13b574 100644 --- a/sql/mysql/install/data.sql +++ b/sql/mysql/install/data.sql @@ -290,7 +290,8 @@ INSERT INTO `config_settings` VALUES (115, 'ldapAuthentication', 'Allow Moving Users in LDAP/AD', 'Moving users around within the LDAP or Active Directory structure will cause failed logins for these users. When this setting is enabled, a failed login will trigger a search for the user using their sAMAccountName setting and update their authentication details.', 'enableLdapUpdate', 'default', 'false', 'boolean', NULL, 1), (116, 'export', 'Use External Zip Binary', 'Utilises the external zip binary for compressing archives. The default is to use the PEAR archive class.', 'useBinary', 'default', 'true', 'boolean', NULL, 0), (117, 'export', 'Use Bulk Download Queue', 'The bulk download can be large and can prevent normal browsing. The download queue performs the bulk downloads in the background.', 'useDownloadQueue', 'default', 'true', 'boolean', NULL, 1), -(118, 'urls', 'Internal Var Directory', 'The path to the internal var directory that must sit within the web root', 'internalVarDirectory', 'default', '${fileSystemRoot}/var', 'string', NULL, 0); +(118, 'urls', 'Internal Var Directory', 'The path to the internal var directory that must sit within the web root', 'internalVarDirectory', 'default', '${fileSystemRoot}/var', 'string', NULL, 0), +(119, 'urls', 'PDF Directoy', 'The path for storing the generated PDF Documents', 'pdfDirectory', 'default', '${varDirectory}/Pdf', 'string', '', 1); /*!40000 ALTER TABLE `config_settings` ENABLE KEYS */; UNLOCK TABLES; diff --git a/sql/mysql/upgrade/3.7.0/config_settings.sql b/sql/mysql/upgrade/3.7.0/config_settings.sql index 2f92edb..185fafb 100644 --- a/sql/mysql/upgrade/3.7.0/config_settings.sql +++ b/sql/mysql/upgrade/3.7.0/config_settings.sql @@ -1,2 +1,5 @@ INSERT INTO `config_settings` (group_name, display_name, description, item, value, default_value, type, options, can_edit) -VALUES ('urls', 'Internal Var Directory', 'The path to the internal var directory that must sit within the web root', 'internalVarDirectory', 'default', '${fileSystemRoot}/var', 'string', NULL, 0); \ No newline at end of file +VALUES ('urls', 'Internal Var Directory', 'The path to the internal var directory that must sit within the web root', 'internalVarDirectory', 'default', '${fileSystemRoot}/var', 'string', NULL, 0); + +INSERT INTO `config_settings` (group_name, display_name, description, item, value, default_value, type, options, can_edit) +VALUES ('urls', 'PDF Directoy', 'The path for storing the generated PDF Documents', 'pdfDirectory', 'default', '${varDirectory}/Pdf', 'string', '', 1); \ No newline at end of file -- libgit2 0.21.4