Commit 8d60de5d4ecc7f6afdc755e5ba86bed01c2daece

Authored by Paul Barrett
1 parent b18b567e

Added thumbnail seetings to data.sql and upgrade sql

Committed by: Paul Barrett

Reviewed by: Megan Watson
plugins/thumbnails/sql/upgradeto0.sql deleted
1   -INSERT INTO `config_settings` (group_name, display_name, description, item, value, default_value, type, options, can_edit)
2   -VALUES ('externalBinary', 'convert', 'The path to the ImageMagick "convert" binary', 'convertPath', 'default', 'convert', 'string', NULL, 1);
3 0 \ No newline at end of file
setup/wizard/steps/database.php
... ... @@ -790,22 +790,6 @@ class database extends Step
790 790 // continue without attempting to set the path if we can't find the file in the specified location
791 791 if (!file_exists(SYSTEM_ROOT . $bin[1])) continue;
792 792  
793   - // thumbnails is a special case, being a plugin which won't have an entry on a new installation
794   - if ($displayName == 'convert') {
795   - // check if there is an entry, if not, insert and continue to next loop, else continue to update statement
796   - $query = 'SELECT id FROM config_settings WHERE display_name = "' . $displayName . '"';
797   - $this->util->dbUtilities->query($query);
798   - $result = $this->util->dbUtilities->fetchAssoc();
799   - if (is_null($result)) {
800   - $query = "INSERT INTO `config_settings` "
801   - . "(group_name, display_name, description, item, value, default_value, type, options, can_edit) "
802   - . "VALUES ('" . $bin[0] . "', 'convert', 'The path to the ImageMagick \"convert\" binary', 'convertPath', "
803   - . "'" . str_replace('\\', '\\\\', SYSTEM_ROOT . $bin[1]) . "', 'convert', 'string', NULL, 1);";
804   - $this->util->dbUtilities->query($query);
805   - continue;
806   - }
807   - }
808   -
809 793 $updateBin = 'UPDATE config_settings c SET c.value = "'. str_replace('\\', '\\\\', SYSTEM_ROOT . $bin[1]) . '" '
810 794 . 'where c.group_name = "' . $bin[0] . '" and c.display_name = "'.$displayName.'";';
811 795 $this->util->dbUtilities->query($updateBin);
... ...
sql/mysql/install/data.sql
... ... @@ -290,7 +290,8 @@ INSERT INTO `config_settings` VALUES
290 290 (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),
291 291 (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),
292 292 (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),
293   -(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);
  293 +(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),
  294 +(119, 'urls', 'PDF Directoy', 'The path for storing the generated PDF Documents', 'pdfDirectory', 'default', '${varDirectory}/Pdf', 'string', '', 1);
294 295 /*!40000 ALTER TABLE `config_settings` ENABLE KEYS */;
295 296 UNLOCK TABLES;
296 297  
... ...
sql/mysql/upgrade/3.7.0/config_settings.sql
1 1 INSERT INTO `config_settings` (group_name, display_name, description, item, value, default_value, type, options, can_edit)
2   -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);
3 2 \ No newline at end of file
  3 +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);
  4 +
  5 +INSERT INTO `config_settings` (group_name, display_name, description, item, value, default_value, type, options, can_edit)
  6 +VALUES ('urls', 'PDF Directoy', 'The path for storing the generated PDF Documents', 'pdfDirectory', 'default', '${varDirectory}/Pdf', 'string', '', 1);
4 7 \ No newline at end of file
... ...