Commit 8fee98b30fd0e55c83d5cd26c9178011f29d1e46
1 parent
9e1abfea
KTS-3696
"Add a config option to disable the bulk import" Fixed. Added the new config option. KTS-3697 "Add a config option to disable the database version check on login" Fixed. Added the new option. Committed by: Megan Watson Reviewed by: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@9307 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
4 changed files
with
24 additions
and
7 deletions
lib/session/Session.inc
| ... | ... | @@ -218,12 +218,16 @@ class Session { |
| 218 | 218 | header("Cache-Control: must-revalidate"); |
| 219 | 219 | header("Expires: " . gmdate("D, d M Y H:i:s", time() - 3600) . " GMT"); |
| 220 | 220 | $sessionID = session_id(); |
| 221 | - $version = KTUtil::getSystemSetting('databaseVersion'); | |
| 222 | 221 | |
| 223 | - if ($default->systemVersion != $version) { | |
| 224 | - if (KTLOG_CACHE) $default->log->info("Session::verify : Database not upgraded"); | |
| 225 | - $_SESSION['errormessage']['login'] = sprintf(_kt('Database incompatibility error: <br> Please ensure that you have completed the database upgrade procedure. <br> Please <a href=%s>click here</a> to complete.'),'setup/upgrade.php'); | |
| 226 | - return PEAR::raiseError($_SESSION['errormessage']['login']); | |
| 222 | + if($default->dbversioncompare){ | |
| 223 | + // Compare the system version and the database version to determine if the database needs to be upgraded. | |
| 224 | + $version = KTUtil::getSystemSetting('databaseVersion'); | |
| 225 | + | |
| 226 | + if ($default->systemVersion != $version) { | |
| 227 | + if (KTLOG_CACHE) $default->log->info("Session::verify : Database not upgraded"); | |
| 228 | + $_SESSION['errormessage']['login'] = sprintf(_kt('Database incompatibility error: <br> Please ensure that you have completed the database upgrade procedure. <br> Please <a href=%s>click here</a> to complete.'),'setup/upgrade.php'); | |
| 229 | + return PEAR::raiseError($_SESSION['errormessage']['login']); | |
| 230 | + } | |
| 227 | 231 | } |
| 228 | 232 | |
| 229 | 233 | if (empty($sessionID)) { | ... | ... |
plugins/ktcore/folder/BulkImport.php
| ... | ... | @@ -59,6 +59,11 @@ class KTBulkImportFolderAction extends KTFolderAction { |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | function getInfo() { |
| 62 | + global $default; | |
| 63 | + if($default->disableBulkImport){ | |
| 64 | + return null; | |
| 65 | + } | |
| 66 | + | |
| 62 | 67 | if (!Permission::userIsSystemAdministrator($this->oUser->getId())) { |
| 63 | 68 | return null; |
| 64 | 69 | ... | ... |
sql/mysql/install/data.sql
| ... | ... | @@ -270,7 +270,9 @@ INSERT INTO `config_settings` VALUES |
| 270 | 270 | (96, 'KnowledgeTree', 'Redirect To Browse View: Exceptions', 'Specifies that, when \'Redirect To Browse\' is set to \'True\' all users, except for the users listed in the text field below are redirected to the Browse view on log in. The users listed for this setting are directed to the KnowledgeTree Dashboard. To define exceptions, add user names in the text field as follows, e.g. admin, joebloggs, etc.', 'redirectToBrowseExceptions', '', '', '', NULL, 1), |
| 271 | 271 | (97, 'session', 'Allow Automatic Sign In', 'Defines whether to automatically create a user account on first login for any user who does not yet exist in the system. Default is \'False\'.', 'allowAutoSignup', 'default', 'false', 'boolean', '', 1), |
| 272 | 272 | (98, 'ldapAuthentication', 'Create Groups Automatically', 'Defines whether to allow LDAP groups to be created automatically. Default is \'False\'.', 'autoGroupCreation', 'default', 'false', 'boolean', '', 1), |
| 273 | -(99, 'browse', 'Truncate Document and Folder Titles in Browse View', 'Defines the length of the document or folder title displayed in the browse view.', 'titleCharLength', 'default', '40', 'numeric_string', '', 1); | |
| 273 | +(99, 'browse', 'Truncate Document and Folder Titles in Browse View', 'Defines the length of the document or folder title displayed in the browse view.', 'titleCharLength', 'default', '40', 'numeric_string', '', 1), | |
| 274 | +(100, 'import', 'Disable Bulk Import', 'Disable the bulk import plugin', 'disableBulkImport', 'default', 'false', 'string', NULL, 1), | |
| 275 | +(101, 'session', 'Enable version check', 'Compares the system version with the database version to determine if a database upgrade is needed.','dbversioncompare', 'default', 'true', 'boolean', NULL, 0); | |
| 274 | 276 | /*!40000 ALTER TABLE `config_settings` ENABLE KEYS */; |
| 275 | 277 | UNLOCK TABLES; |
| 276 | 278 | ... | ... |
sql/mysql/upgrade/3.5.3/length_config_setting.sql
| 1 | 1 | INSERT INTO `config_settings` (group_name, display_name, description, item, value, default_value, type, options, can_edit) VALUES |
| 2 | + | |
| 2 | 3 | ('browse', 'Truncate Document and Folder Titles in Browse View', 'Defines the length of the document or folder title displayed in the |
| 3 | -browse view.', 'titleCharLength', 'default', '40', 'numeric_string', '', 1); | |
| 4 | 4 | \ No newline at end of file |
| 5 | +browse view.', 'titleCharLength', 'default', '40', 'numeric_string', '', 1), | |
| 6 | + | |
| 7 | +('import', 'Disable Bulk Import', 'Disable the bulk import plugin', 'disableBulkImport', 'default', 'false', 'string', NULL, 1), | |
| 8 | + | |
| 9 | +('session', 'Enable version check', 'Compares the system version with the database version to determine if a database upgrade is needed.', | |
| 10 | +'dbversioncompare', 'default', 'true', 'boolean', NULL, 0); | |
| 5 | 11 | \ No newline at end of file | ... | ... |