diff --git a/config/config.ini b/config/config.ini index 46ce257..2ea7ab5 100644 --- a/config/config.ini +++ b/config/config.ini @@ -73,33 +73,13 @@ useNewDashboard = default ; Defaults to /usr/share/file/magic magicDatabase = default -; The interval in seconds between each iteration of the scheduler -schedulerInterval = 30 - -[dashboard] -; Display the "Your Checked-out Documents" dashlet even when empty. -; Defaults to false -alwaysShowYCOD = default - [storage] ; By default uses KTOnDiskHashedStorageManager ; manager = KTOnDiskHashedStorageManager manager = default [ui] -;OEM application name -;appName = ACME -; Enable Morph -;morphEnabled = 1 -; Morph Theme -;morphTo = blue -; add the logo of your company to the site's appearance. -; this logo MUST be 50px tall, and on a white background. -companyLogo = ${rootUrl}/resources/companylogo.png -; the logo's width in pixels -companyLogoWidth = 313px -; ALT text - for accessibility purposes. -companyLogoTitle = ACME Corporation + ; Main logo ;mainLogo = ${rootUrl}/resources/oemlogo.png ; the logo's width in pixels @@ -119,75 +99,18 @@ companyLogoTitle = ACME Corporation ; ieGIF = true ieGIF = default -; do not restrict to searches (e.g. always show_all) on users and groups pages. -; alwaysShowAll = false -alwaysShowAll = default - ; Set to true to automatically refresh the page after the session would ; have expired. automaticRefresh = default -; use a condensed admin ui -condensedAdminUI = default - -; allow "open" from downloads. Changing this to "true" will prevent (most) -; browsers from giving users the "open" option. -; fakeMimetype = false -fakeMimetype = default - ; "dot" command location dot = dot -; sort the metadata fields alphabetically -metadata_sort = true - -[i18n] -; Default language for the interface -defaultLanguage = en -; If your language doesn't have distinguishable words (usually, doesn't -; have a space character), set useLike to true to use a search that can -; deal with this, but which is slower. -useLike = default - [tweaks] ; If you want to enable PHP error logging to the log/php_error_log ; file, change the following to true phpErrorLogFile = false -; Whether to browse to the user's (first) unit when first going to the -; browse section -browseToUnitFolder = default - -; Whether bulk operations should generate a transaction notice on each -; item, or only on the folder. Default of "false" indicates that only -; the folder transaction should occur. -noisyBulkOperations = false - -[email] -; email settings -emailServer = none -emailPort = default - -; do you need auth to connect to SMTP? -emailAuthentication = false -emailUsername = username -emailPassword = password - -emailFrom = kt@example.org -emailFromName = KnowledgeTree Document Management System -; Set to true to allow users to send attachments from the document -; management system -allowAttachment = default -; Set to true to allow users to send to any email address, as opposed to -; only users of the system -allowEmailAddresses = default -; Set to true to always send email from the emailFrom address listed -; above, even if there is an identifiable sending user -sendAsSystem = default -; Set to true to only allow users to send emails to those in the same -; groups as them -onlyOwnGroups = default - [urls] ; directories varDirectory = ${fileSystemRoot}/var @@ -196,11 +119,6 @@ documentRoot = ${varDirectory}/Documents uiDirectory = ${fileSystemRoot}/presentation/lookAndFeel/knowledgeTree tmpDirectory = ${varDirectory}/tmp - -; urls -graphicsUrl = ${rootUrl}/graphics -uiUrl = ${rootUrl}/presentation/lookAndFeel/knowledgeTree - ;dedicated feed url ;dedicatedrsstitle = RSS Feed Title ;dedicatedrssurl = @@ -208,202 +126,22 @@ uiUrl = ${rootUrl}/presentation/lookAndFeel/knowledgeTree ; files stopwordsFile = ${fileSystemRoot}/config/stopwords.txt -[webservice] -; Directory to which all uploads via webservices are persisted before moving into the repository -uploadDirectory = ${varDirectory}/uploads - -; Url which is sent to clients via web service calls so they can then download file via HTTP GET -downloadUrl = ${rootUrl}/ktwebservice/download.php - -; Period indicating how long a file should be retained in the uploads directory. -uploadExpiry = 30 - -; Period indicating how long a download link will be available -downloadExpiry = 30 - -; Random text used to construct a hash. This can be customised on installations so there is less chance of overlap between installations. -randomKeyText = bkdfjhg23yskjdhf2iu - -; Validating session counts can interfere with access. It is best to leave this disabled, unless very strict access is required. -validateSessionCount = false - -; If the document type is invalid when adding a document, we can be tollerant and just default to the Default document type. -useDefaultDocumentTypeIfInvalid = true - -; The web service debugging if the logLevel is set to DEBUG. We can set the value to 4 or 5 to get more verbose web service logging. -; Level 4 logs the name of functions being accessed. Level 5 logs the SOAP XML requests and responses. -debug = false - [session] -; session timeout (in seconds) -sessionTimeout = 1200 - -; by default, do not auto-login users as anonymous. -; set this to true if you UNDERSTAND the security system that KT -; uses, and have sensibly applied the roles "Everyone" and "Authenticated Users". -allowAnonymousLogin = false ; Set to true to force sessions to come from the same IP address ; ipTracking = false -[import] -; unzip command - will use execSearchPath to find if the path to the -; binary is not given -unzip = unzip - [export] -; zip command - will use execSearchPath to find if the path to the -; binary is not given -zip = zip ; encoding to use in bulk export plugin ; default is set to UTF-8 ; encoding = cp1252 encoding = default -[externalBinary] -; The following are external binaries that may be used by various parts of knowledgeTree. -xls2csv = xls2csv -pdftotext = pdftotext -catppt = catppt -pstotext = pstotext -catdoc = catdoc -antiword = antiword -python = python -java = java -php = php -df = df - -[search] -; The number of results per page -; defaults to 25 -resultsPerPage = default - -; The format in which to display the results -; options are searchengine or browseview -; defaults to searchengine -resultsDisplayFormat = default - -; The date format used when making queries using widgets -; defaults to Y-m-d -dateFormat = default - -[browse] -; The document info box / preview is activated by mousing over or clicking on the icon -; Options: mouse-over (default); onclick -previewActivation = default - -[indexer] -; The core indexing class -;coreClass=PHPLuceneIndexer -coreClass=JavaXMLRPCLuceneIndexer - -; The number of documents to be indexed in a cron session -; defaults to 20 -batchDocuments = default - -; The number of documents to be migrated in a cron session -; defaults to 500 -batchMigrateDocuments = default - -; The location of the lucene indexes -luceneDirectory=${varDirectory}/indexes - -; The url for the Java Lucene Server. This should match up the the Lucene Server configuration. -; Defaults to http://127.0.0.1:8875 -javaLuceneURL = default - -[openoffice] -; The host on which open office is installed -; defaults to 127.0.0.1 -host = default - -; The port on which open office is listening -; defaults to 8100 -port = default - -[user_prefs] -; minimum password length on password-setting -passwordLength = 6 - -; apply the minimum password length to admin while creating / editing accounts? -; default is set to "false" meaning that admins can create users with shorter passwords. -restrictAdminPasswords = default - -; restrict users from accessing their preferences menus? -restrictPreferences = false - - -; This is configuration for the built-in authentication provider -[builtinauth] -; -; This would force users that use the built-in authentication provider -; to have to change their passwords every 30 days. -; -; password_change_interval = 30 - [cache] ; ; enable/disable the cache and set the cache location ; cacheEnabled = true cacheDirectory = ${varDirectory}/cache -cachePlugins = true - -[KTWebDAVSettings] -; This section is for KTWebDAV only -; _LOTS_ of debug info will be logged if the following is "on" -debug = off -; To allow write access to WebDAV clients set safe mode to "off" below -safemode = on - -[BaobabSettings] -; This section is for Baobab only -; _LOTS_ of debug info will be logged if the following is "on" -debug = off -; To allow write access to WebDAV clients set safe mode to "off" below -safemode = on - -[backup] -; Identify location of kt-backup for database backups. -;backupDirectory=c:/kt-backups -;backupDirectory=/tmp/kt-backups - -; Identify the location of the mysql.exe and mysqldump.exe -;mysqlDirectory=c:/program files/ktdms/mysql/bin - -[clientToolPolicies] -;These two settings control whether or not the client is prompted for metadata when a -;document is added to knowledgetree via KTtools. They default to true. -explorerMetadataCapture = true -officeMetadataCapture = true -;These settings govern whether reasons are asked for in KTtools -captureReasonsDelete = true -captureReasonsCheckin = true -captureReasonsCheckout = true -captureReasonsCancelCheckout = true -captureReasonsCopyInKT = true -captureReasonsMoveInKT = true -;This setting governs whether the password can be stored on the client. -allowRememberPassword = true - -; settings for the Disk Usage dashlet -[DiskUsage] -; When free space in a mount point is less than this percentage, -; the disk usage dashlet will will highlight the mount in ORANGE -warningThreshold=10 - -; When free space in a mount point is less than this percentage, -; the disk usage dashlet will will highlight the mount in RED -urgentThreshold=5 - -[CustomErrorMessages] -;Turn custom error messages on or off here. -customerrormessages=on -;name or url of custom error page. -customerrorpagepath=customerrorpage.php -;Turn custom error handler on or off. -;The custom error handler will log any non php errors caught -;by the custom error handler if it is turned on. -;Php errors are always logged by php itself. -customerrorhandler=on +cachePlugins = true \ No newline at end of file diff --git a/config/dmsDefaults.php b/config/dmsDefaults.php index 37c3ad0..3a45e33 100644 --- a/config/dmsDefaults.php +++ b/config/dmsDefaults.php @@ -100,14 +100,39 @@ if (!defined('PATH_SEPARATOR')) { require_once(KT_LIB_DIR . '/Log.inc'); require_once(KT_LIB_DIR . '/validation/customerror.php'); + + +// {{{ prependPath() +function prependPath ($path) { + + $include_path = ini_get('include_path'); + ini_set('include_path', $path . PATH_SEPARATOR . $include_path); +} +// }}} + +prependPath(KT_DIR . '/thirdparty/ZendFramework/library'); +prependPath(KT_DIR . '/thirdparty/pear'); +prependPath(KT_DIR . '/thirdparty/Smarty'); +prependPath(KT_DIR . '/thirdparty/simpletest'); +prependPath(KT_DIR . '/thirdparty/xmlrpc-2.2/lib'); +prependPath(KT_DIR . '/ktapi'); +prependPath(KT_DIR . '/search2'); +require_once('PEAR.php'); + +// Give everyone access to legacy PHP functions +require_once(KT_LIB_DIR . '/util/legacy.inc'); + +// Give everyone access to KTUtil utility functions +require_once(KT_LIB_DIR . '/util/ktutil.inc'); + +require_once(KT_LIB_DIR . '/ktentity.inc'); + +require_once(KT_LIB_DIR . '/config/config.inc.php'); +require_once(KT_DIR . '/search2/indexing/indexerCore.inc.php'); + // {{{ KTInit class KTInit { - // {{{ prependPath() - function prependPath ($path) { - $include_path = ini_get('include_path'); - ini_set('include_path', $path . PATH_SEPARATOR . $include_path); - } - // }}} + // {{{ setupLogging() function setupLogging () { global $default; @@ -177,51 +202,7 @@ class KTInit { } // }}} - // {{{ setupDB() - function setupDB () { - global $default; - - require_once('DB.php'); - - // DBCompat allows phplib API compatibility - require_once(KT_LIB_DIR . '/database/dbcompat.inc'); - $default->db = new DBCompat; - - // DBUtil is the preferred database abstraction - require_once(KT_LIB_DIR . '/database/dbutil.inc'); - - // KTEntity is the database-backed base class - require_once(KT_LIB_DIR . '/ktentity.inc'); - - $oKTConfig =& KTConfig::getSingleton(); - - $prefix = defined('USE_DB_ADMIN_USER')?'Admin':''; - - $dsn = array( - 'phptype' => $oKTConfig->get('db/dbType'), - 'username' => $oKTConfig->get("db/db{$prefix}User"), - 'password' => $oKTConfig->get("db/db{$prefix}Pass"), - 'hostspec' => $oKTConfig->get('db/dbHost'), - 'database' => $oKTConfig->get('db/dbName'), - 'port' => $oKTConfig->get('db/dbPort'), - ); - - $options = array( - 'debug' => 2, - 'portability' => DB_PORTABILITY_ERRORS, - 'seqname_format' => 'zseq_%s', - ); - - $default->_db = &DB::connect($dsn, $options); - if (PEAR::isError($default->_db)) { - $this->handleInitError($default->_db); - // returns only in checkup - return $default->_db; - } - $default->_db->setFetchMode(DB_FETCHMODE_ASSOC); - - } - /// }}} + // {{{ cleanGlobals() function cleanGlobals () { @@ -390,29 +371,29 @@ class KTInit { // }}} -function catchFatalErrors() -{ - - $CustomErrorPage = KTCustomErrorViewer::getCustomErrorRedirectPage(); - if($CustomErrorPage != '0') + function catchFatalErrors() { - ini_set('display_errors','On'); - $phperror='>>
- '; - ini_set('error_append_string',$phperror); + + $CustomErrorPage = KTCustomErrorViewer::getCustomErrorRedirectPage(); + if($CustomErrorPage != '0') + { + ini_set('display_errors','On'); + $phperror='>>
+ '; + ini_set('error_append_string',$phperror); + } + } -} - // {{{ guessRootUrl() @@ -446,6 +427,26 @@ function catchFatalErrors() } // }}} + // {{{ getDynamicConfigSettings + //This function gets the intial config settings which can only be resolved by using php + function getDynamicConfigSettings() + { + $oKTConfig =& KTConfig::getSingleton(); + + $oKTConfig->setdefaultns('KnowledgeTree', 'fileSystemRoot', KT_DIR); + $oKTConfig->setdefaultns('KnowledgeTree', 'serverName', KTUtil::arrayGet($_SERVER, 'HTTP_HOST', 'localhost')); + $oKTConfig->setdefaultns('KnowledgeTree', 'sslEnabled', 0); + if (array_key_exists('HTTPS', $_SERVER)) { + if (strtolower($_SERVER['HTTPS']) === 'on') { + $oKTConfig->setdefaultns('KnowledgeTree', 'sslEnabled', 1); + } + } + $oKTConfig->setdefaultns('KnowledgeTree', 'rootUrl', $this->guessRootUrl()); + $oKTConfig->setdefaultns('KnowledgeTree', 'execSearchPath', $_SERVER['PATH']); + $oKTConfig->setdefaultns('KnowledgeTree', 'magicDatabase', KTInit::detectMagicFile()); + } + // }}} + // {{{ initConfig function initConfig() { global $default; @@ -477,166 +478,21 @@ function catchFatalErrors() } } +/* if ($use_cache) { $oKTConfig =& KTConfig::getSingleton(); $oKTConfig->loadCache($cache_file); - // checking flatns as it should be more complete - if (empty($oKTConfig->flatns)) { - $use_cache = false; + foreach ($oKTConfig->flat as $k => $v) { + $default->$k = $oKTConfig->get($k); } - else { - foreach ($oKTConfig->flat as $k => $v) { - $default->$k = $oKTConfig->get($k); - } - } - } - - if (!$use_cache) { - $oKTConfig =& KTConfig::getSingleton(); - - $oKTConfig->setdefaultns('ui', 'appName', 'KnowledgeTree'); - $oKTConfig->setdefaultns('KnowledgeTree', 'fileSystemRoot', KT_DIR); - $oKTConfig->setdefaultns('KnowledgeTree', 'serverName', KTUtil::arrayGet($_SERVER, 'HTTP_HOST', 'localhost')); - $oKTConfig->setdefaultns('KnowledgeTree', 'sslEnabled', false); - if (array_key_exists('HTTPS', $_SERVER)) { - if (strtolower($_SERVER['HTTPS']) === 'on') { - $oKTConfig->setdefaultns('KnowledgeTree', 'sslEnabled', true); - } - } - $oKTConfig->setdefaultns('KnowledgeTree', 'useNewDashboard', true); - $oKTConfig->setdefaultns('KnowledgeTree', 'rootUrl', $this->guessRootUrl()); - $oKTConfig->setdefaultns('KnowledgeTree', 'execSearchPath', $_SERVER['PATH']); - $oKTConfig->setdefaultns('KnowledgeTree', 'pathInfoSupport', false); - $oKTConfig->setdefaultns('KnowledgeTree', 'magicDatabase', KTInit::detectMagicFile()); - $oKTConfig->setdefaultns('KnowledgeTree', 'schedulerInterval', 30); - - $oKTConfig->setdefaultns('dashboard', 'alwaysShowYCOD', true); - - $oKTConfig->setdefaultns('storage', 'manager', 'KTOnDiskHashedStorageManager'); - $oKTConfig->setdefaultns('config', 'useDatabaseConfiguration', false); - - $oKTConfig->setdefaultns('urls', 'varDirectory', '${fileSystemRoot}/var'); - $oKTConfig->setdefaultns('urls', 'logDirectory', '${varDirectory}/log'); - $oKTConfig->setdefaultns('urls', 'documentRoot', '${varDirectory}/Documents'); - $oKTConfig->setdefaultns('urls', 'uiDirectory', '${fileSystemRoot}/presentation/lookAndFeel/knowledgeTree'); - $oKTConfig->setdefaultns('urls', 'tmpDirectory', '${varDirectory}/tmp'); - $oKTConfig->setdefaultns('urls', 'graphicsUrl', '${rootUrl}/graphics'); - $oKTConfig->setdefaultns('urls', 'uiUrl', '${rootUrl}/presentation/lookAndFeel/knowledgeTree'); - $oKTConfig->setdefaultns('urls', 'stopwordsFile', '${fileSystemRoot}/config/stopwords.txt'); - - $oKTConfig->setdefaultns('tweaks', 'browseToUnitFolder', false); - $oKTConfig->setdefaultns('tweaks', 'genericMetaDataRequired', true); - $oKTConfig->setdefaultns('tweaks', 'phpErrorLogFile', false); - $oKTConfig->setdefaultns('tweaks', 'developmentWindowLog', false); - $oKTConfig->setdefaultns('tweaks', 'noisyBulkOperations', false); - - $oKTConfig->setdefaultns('email', 'emailServer', 'none'); - $oKTConfig->setdefaultns('email', 'emailPort', ''); - $oKTConfig->setdefaultns('email', 'emailAuthentication', false); - $oKTConfig->setdefaultns('email', 'emailUsername', 'username'); - $oKTConfig->setdefaultns('email', 'emailPassword', 'password'); - $oKTConfig->setdefaultns('email', 'emailFrom', 'kt@example.org'); - $oKTConfig->setdefaultns('email', 'emailFromName', 'KnowledgeTree Document Management System'); - $oKTConfig->setdefaultns('email', 'allowAttachment', false); - $oKTConfig->setdefaultns('email', 'allowEmailAddresses', false); - $oKTConfig->setdefaultns('email', 'sendAsSystem', false); - $oKTConfig->setdefaultns('email', 'onlyOwnGroups', false); - - $oKTConfig->setdefaultns('user_prefs', 'passwordLength', 6); - $oKTConfig->setdefaultns('user_prefs', 'restrictAdminPasswords', false); - $oKTConfig->setdefaultns('user_prefs', 'restrictPreferences', false); - - $oKTConfig->setdefaultns('session', 'sessionTimeout', 1200); - $oKTConfig->setdefaultns('session', 'allowAnonymousLogin', false); - - $oKTConfig->setdefaultns('ui', 'companyLogo', '${rootUrl}/resources/companylogo.png'); - $oKTConfig->setdefaultns('ui', 'companyLogoWidth', '313px'); - $oKTConfig->setdefaultns('ui', 'companyLogoTitle', 'ACME Corporation'); - $oKTConfig->setdefaultns('ui', 'ieGIF', true); - $oKTConfig->setdefaultns('ui', 'alwaysShowAll', false); - $oKTConfig->setdefaultns('ui', 'automaticRefresh', false); - $oKTConfig->setdefaultns('ui', 'condensedAdminUI', false); - $oKTConfig->setdefaultns('ui', 'fakeMimetype', false); - $oKTConfig->setdefaultns('ui', 'dot', 'dot'); - $oKTConfig->setdefaultns('ui', 'metadata_sort', true); - - $oKTConfig->setdefaultns('i18n', 'useLike', false); - - $oKTConfig->setdefaultns(null, 'logLevel', 'INFO'); - $oKTConfig->setdefaultns('import', 'unzip', 'unzip'); - $oKTConfig->setdefaultns('export', 'zip', 'zip'); - $oKTConfig->setdefaultns('export', 'encoding', 'UTF-8'); - - $oKTConfig->setdefaultns('externalBinary', 'xls2csv', 'xls2csv'); - $oKTConfig->setdefaultns('externalBinary', 'pdftotext', 'pdftotext'); - $oKTConfig->setdefaultns('externalBinary', 'catppt', 'catppt'); - $oKTConfig->setdefaultns('externalBinary', 'pstotext', 'pstotext'); - $oKTConfig->setdefaultns('externalBinary', 'catdoc', 'catdoc'); - $oKTConfig->setdefaultns('externalBinary', 'antiword', 'antiword'); - $oKTConfig->setdefaultns('externalBinary', 'python', 'python'); - $oKTConfig->setdefaultns('externalBinary', 'java', 'java'); - $oKTConfig->setdefaultns('externalBinary', 'php', 'php'); - $oKTConfig->setdefaultns('externalBinary', 'df', 'df'); - - $oKTConfig->setdefaultns('cache', 'cacheDirectory', '${varDirectory}/cache'); - $oKTConfig->setdefaultns('cache', 'cacheEnabled', 'false'); - $oKTConfig->setdefaultns('cache', 'proxyCacheDirectory', '${varDirectory}/proxies'); - $oKTConfig->setdefaultns('cache', 'proxyCacheEnabled', 'true'); - $oKTConfig->setdefaultns('cache', 'cachePlugins', 'true'); - - $oKTConfig->setdefaultns('KTWebDAVSettings', 'debug', 'off'); - $oKTConfig->setdefaultns('KTWebDAVSettings', 'safemode', 'on'); - - $oKTConfig->setdefaultns('BaobabSettings', 'debug', 'off'); - $oKTConfig->setdefaultns('BaobabSettings', 'safemode', 'on'); - - $oKTConfig->setdefaultns('search', 'searchBasePath', KT_DIR . '/search2'); - $oKTConfig->setdefaultns('search', 'fieldsPath', '${searchBasePath}/search/fields'); - $oKTConfig->setdefaultns('search', 'resultsDisplayFormat', 'searchengine'); - $oKTConfig->setdefaultns('search', 'resultsPerPage', 25); - $oKTConfig->setdefaultns('search', 'dateFormat', 'Y-m-d'); - - $oKTConfig->setdefaultns('browse', 'previewActivation', 'mouse-over'); - - $oKTConfig->setdefaultns('indexer', 'coreClass', 'JavaXMLRPCLuceneIndexer'); - $oKTConfig->setdefaultns('indexer', 'batchDocuments', 20); - $oKTConfig->setdefaultns('indexer', 'batchMigrateDocuments', 500); - $oKTConfig->setdefaultns('indexer', 'indexingBasePath', '${searchBasePath}/indexing'); - $oKTConfig->setdefaultns('indexer', 'luceneDirectory', '${varDirectory}/indexes'); - $oKTConfig->setdefaultns('indexer', 'extractorPath', '${indexingBasePath}/extractors'); - $oKTConfig->setdefaultns('indexer', 'extractorHookPath', '${indexingBasePath}/extractorHooks'); - $oKTConfig->setdefaultns('indexer', 'javaLuceneURL', 'http://127.0.0.1:8875'); - - $oKTConfig->setdefaultns('openoffice', 'host', '127.0.0.1'); - $oKTConfig->setdefaultns('openoffice', 'port', 8100); - - $oKTConfig->setdefaultns('webservice', 'uploadDirectory', '${varDirectory}/uploads'); - $oKTConfig->setdefaultns('webservice', 'downloadUrl', '${rootUrl}/ktwebservice/download.php'); - $oKTConfig->setdefaultns('webservice', 'uploadExpiry', '30'); - $oKTConfig->setdefaultns('webservice', 'downloadExpiry', '30'); - $oKTConfig->setdefaultns('webservice', 'randomKeyText', 'bkdfjhg23yskjdhf2iu'); - $oKTConfig->setdefaultns('webservice', 'validateSessionCount', false); - $oKTConfig->setdefaultns('webservice', 'useDefaultDocumentTypeIfInvalid', true); - $oKTConfig->setdefaultns('webservice', 'debug', false); - - $oKTConfig->setdefaultns('clientToolPolicies', 'explorerMetadataCapture', true); - $oKTConfig->setdefaultns('clientToolPolicies', 'officeMetadataCapture', true); - $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsDelete', true); - $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsCheckin', true); - $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsCheckout', true); - $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsCancelCheckout', true); - $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsCopyInKT', true); - $oKTConfig->setdefaultns('clientToolPolicies', 'captureReasonsMoveInKT', true); - $oKTConfig->setdefaultns('clientToolPolicies', 'allowRememberPassword', true); - - $oKTConfig->setdefaultns('DiskUsage', 'warningThreshold', 10); - $oKTConfig->setdefaultns('DiskUsage', 'urgentThreshold', 5); - - $res = $this->readConfig(); + } else { + //fail safe will be put here + + if (PEAR::isError($res)) { return $res; } - $oKTConfig =& KTConfig::getSingleton(); + //$oKTConfig =& KTConfig::getSingleton(); @touch($cache_file); if ($store_cache && is_writable($cache_file)) { $oKTConfig->createCache($cache_file); @@ -644,42 +500,11 @@ function catchFatalErrors() } +*/ } // }}} - // {{{ readConfig - function readConfig () { - global $default; - $oKTConfig =& KTConfig::getSingleton(); - $sConfigFile = trim(file_get_contents(KT_DIR . '/config/config-path')); - if (KTUtil::isAbsolutePath($sConfigFile)) { - $res = $oKTConfig->loadFile($sConfigFile); - } else { - $res = $oKTConfig->loadFile(sprintf('%s/%s', KT_DIR, $sConfigFile)); - } - - if (PEAR::isError($res)) { - $this->handleInitError($res); - // returns only in checkup - return $res; - } - - foreach (array_keys($oKTConfig->flat) as $k) { - $v = $oKTConfig->get($k); - if ($v === 'default') { - continue; - } - if ($v === 'false') { - $v = false; - - } - if ($v === 'true') { - $v = true; - } - $default->$k = $v; - } - } - // }}} + // {{{ initTesting function initTesting() { @@ -705,37 +530,41 @@ function catchFatalErrors() } // }}} -$KTInit = new KTInit(); -$KTInit->prependPath(KT_DIR . '/thirdparty/ZendFramework/library'); -$KTInit->prependPath(KT_DIR . '/thirdparty/pear'); -$KTInit->prependPath(KT_DIR . '/thirdparty/Smarty'); -$KTInit->prependPath(KT_DIR . '/thirdparty/simpletest'); -$KTInit->prependPath(KT_DIR . '/thirdparty/xmlrpc-2.2/lib'); -$KTInit->prependPath(KT_DIR . '/ktapi'); -$KTInit->prependPath(KT_DIR . '/search2'); -require_once('PEAR.php'); +//Creating all the config settings +//==================================== +$oKTConfig = KTConfig::getSingleton(); -// Give everyone access to legacy PHP functions -require_once(KT_LIB_DIR . '/util/legacy.inc'); +//Read in DB specific config settings +$res = $oKTConfig->readDBConfig(); +//Set up DB connection +$dbSetup = $oKTConfig->setupDB(); -// Give everyone access to KTUtil utility functions -require_once(KT_LIB_DIR . '/util/ktutil.inc'); +$KTInit = new KTInit(); + +if(PEAR::isError($dbSetup)) +{ + $KTInit->handleInitError($dbSetup); +} -require_once(KT_LIB_DIR . '/ktentity.inc'); -require_once(KT_LIB_DIR . '/config/config.inc.php'); -require_once(KT_DIR . '/search2/indexing/indexerCore.inc.php'); +$KTInit->getDynamicConfigSettings(); $KTInit->initConfig(); $KTInit->setupI18n(); +//Create final flatns and $default arrays to finish config setup +$res = $oKTConfig->readConfig(); + +//==================================== + define('KTLOG_CACHE',false); if (isset($GLOBALS['kt_test'])) { $KTInit->initTesting(); } -$oKTConfig =& KTConfig::getSingleton(); + + if($oKTConfig->get('CustomErrorMessages/customerrormessages') == 'on') { @@ -762,7 +591,7 @@ $loggingSupport = $KTInit->setupLogging(); // Send all PHP errors to a file (and maybe a window) set_error_handler(array('KTInit', 'handlePHPError')); -$dbSupport = $KTInit->setupDB(); + $KTInit->setupRandomSeed(); $GLOBALS['KTRootUrl'] = $oKTConfig->get('KnowledgeTree/rootUrl'); diff --git a/lib/config/config.inc.php b/lib/config/config.inc.php index 398e43e..c1358c5 100644 --- a/lib/config/config.inc.php +++ b/lib/config/config.inc.php @@ -39,6 +39,7 @@ require_once("Config.php"); require_once(KT_LIB_DIR . '/util/ktutil.inc'); +require_once (KT_LIB_DIR. '/database/dbutil.inc'); class KTConfig { var $conf = array(); @@ -46,6 +47,8 @@ class KTConfig { var $aFileRoot; var $flat = array(); var $flatns = array(); + var $aDBConfig = array(); + var $aConfFile = array(); // FIXME nbm: how do we cache errors here? function loadCache($filename) { @@ -66,21 +69,67 @@ class KTConfig { return true; } + + // {{{ readConfig + function readConfig () { + global $default; + + //Load config data from the database + $sQuery = 'select group_name, item, value, default_value from config_settings'; + $confResult = DBUtil::getResultArray($sQuery); - function createCache($filename) { - $config_cache = array(); - $config_cache['flat'] = $this->flat; - $config_cache['flatns'] = $this->flatns; - $config_cache['expanded'] = $this->expanded; - $config_cache['expanding'] = $this->expanding; + foreach ($confResult as $confItem) + { + + //if $aConfFile doesn't contain the value already set the value - file_put_contents($filename, serialize($config_cache)); + if(!isset($this->aConfFile[$confItem['group_name']][$confItem['item']]) || $this->aConfFile[$confItem['group_name']][$confItem['item']] == 'default') + { + if($confItem['value'] != 'default') + { + $this->flatns[$confItem['group_name'].'/'.$confItem['item']] = $confItem['value']; + $this->flat[$confItem['item']] = $confItem['value']; + } + else + { + $this->flatns[$confItem['group_name'].'/'.$confItem['item']] = $confItem['default_value']; + $this->flat[$confItem['item']] = $confItem['default_value']; - } + } + } + else //if $aConfFile does have the value set $default and flatns with $aConfFile + { + $this->flatns[$confItem['group_name'].'/'.$confItem['item']] = $this->aConfFile[$confItem['group_name']][$confItem['item']]; + $this->flat[$confItem['item']] = $this->aConfFile[$confItem['group_name']][$confItem['item']]; - function loadFile($filename, $bDefault = false) { - $c = new Config; + } + } + foreach($this->flatns as $sGroupItem => $sValue) + { + $aGroupItemArray = explode('/', $sGroupItem); + $default->$aGroupItemArray[1] = $this->expand($this->flatns[$sGroupItem]); + } + + } + // }}} + + // {{{ readDBConfig() + function readDBConfig() + { + $sConfigFile = trim(file_get_contents(KT_DIR . '/config/config-path')); + if (KTUtil::isAbsolutePath($sConfigFile)) { + $res = $this->loadDBFile($sConfigFile); + } else { + $res = $this->loadDBFile(sprintf('%s/%s', KT_DIR, $sConfigFile)); + } + } + // }}} + + // {{{ loadDBFile() + function loadDBFile($filename, $bDefault = false) + { + $c = new Config; $root =& $c->parseConfig($filename, "IniCommented"); if (PEAR::isError($root)) { @@ -90,17 +139,84 @@ class KTConfig { $this->aFileRoot[$filename] =& $root; $conf =& $root->toArray(); - foreach ($conf["root"] as $seck => $secv) { - $aSectionFile[$seck] = $filename; - if (is_array($secv)) { - foreach ($secv as $k => $v) { - $this->setns($seck, $k, $v); - } - } else { - $this->setns(null, $seck, $secv); - } + + //Set the database specific config details here + $this->aDBConfig = $conf['root']['db']; + + //load entire config file into $aConfFile array + //These values will override those given by the database + //This is in case the system fails and the user cannot get to the admin page + //all items given the value default will be poplulated either by the DB or + //by the setdefaultns function + foreach($conf['root'] as $sItem => $sValue) + { + $this->aConfFile[$sItem] = $sValue; } - $this->conf = kt_array_merge($this->conf, $conf["root"]); + + } + // }}} + + function setupDB () { + global $default; + + require_once('DB.php'); + + // DBCompat allows phplib API compatibility + require_once(KT_LIB_DIR . '/database/dbcompat.inc'); + $default->db = new DBCompat; + + // DBUtil is the preferred database abstraction + require_once(KT_LIB_DIR . '/database/dbutil.inc'); + + // KTEntity is the database-backed base class + require_once(KT_LIB_DIR . '/ktentity.inc'); + + + + $prefix = defined('USE_DB_ADMIN_USER')?'Admin':''; + + $sUser = 'dbUser'; + $sPass = 'dbPass'; + + if ($prefix == 'Admin') + { + $sUser = 'dbAdminUser'; + $sPass = 'dbAdminPass'; + } + $dsn = array( + 'phptype' => $this->aDBConfig['dbType'], + 'username' => $this->aDBConfig[$sUser], + 'password' => $this->aDBConfig[$sPass], + 'hostspec' => $this->aDBConfig['dbHost'], + 'database' => $this->aDBConfig['dbName'], + 'port' => $this->aDBConfig['dbPort'] + ); + + $options = array( + 'debug' => 2, + 'portability' => DB_PORTABILITY_ERRORS, + 'seqname_format' => 'zseq_%s', + ); + + $default->_db = &DB::connect($dsn, $options); + if (PEAR::isError($default->_db)) { + // return PEAR error + return $default->_db; + } + $default->_db->setFetchMode(DB_FETCHMODE_ASSOC); + + } + + function createCache($filename) { + $config_cache = array(); + $config_cache['flat'] = $this->flat; + $config_cache['flatns'] = $this->flatns; + $config_cache['expanded'] = $this->expanded; + $config_cache['expanding'] = $this->expanding; + + file_put_contents($filename, serialize($config_cache)); + + } function setns($seck, $k, $v, $bDefault = false) { @@ -142,7 +258,9 @@ class KTConfig { } function get($var, $oDefault = null) { - if (array_key_exists($var, $this->flatns)) { + + + if (array_key_exists($var, $this->flatns)) { return $this->expand($this->flatns[$var]); } if (array_key_exists($var, $this->flat)) { diff --git a/plugins/ktcore/KTCorePlugin.php b/plugins/ktcore/KTCorePlugin.php index 889a8d9..d6f8a05 100644 --- a/plugins/ktcore/KTCorePlugin.php +++ b/plugins/ktcore/KTCorePlugin.php @@ -237,6 +237,8 @@ class KTCorePlugin extends KTPlugin { _kt('Configure the document metadata: Document Types, Document Fieldsets, Link Types and Workflows.')); $this->registerAdminCategory('search', _kt('Search and Indexing'), _kt('Search and Indexing Settings')); + $this->registerAdminCategory('config', _kt('System Configuration'), + _kt('System Configuration Settings')); $this->registerAdminCategory('misc', _kt('Miscellaneous'), _kt('Various settings which do not fit into the other categories, including managing help and saved searches.')); @@ -314,7 +316,31 @@ class KTCorePlugin extends KTPlugin { $this->registerAdminPage('reschedulealldocuments', 'RescheduleDocumentsDispatcher', 'search', _kt('Reschedule all documents'), _kt('This function allows you to re-index your entire repository.'), '../search2/reporting/RescheduleDocuments.php', null); - + //config + $this->registerAdminPage('emailconfigpage', 'EmailConfigPageDispatcher', 'config', + _kt('Email Settings'), _kt('Manage Email Settings'), + '/admin/configsettings.php', null); + + $this->registerAdminPage('uiconfigpage', 'UIConfigPageDispatcher', 'config', + _kt('User Interface Settings'), _kt('Manage User Interface Settings'), + '/admin/configsettings.php', null); + + $this->registerAdminPage('searchandindexingconfigpage', 'SearchAndIndexingConfigPageDispatcher', 'config', + _kt('Search and Indexing Settings'), _kt('Manage Search and Indexing Settings'), + '/admin/configsettings.php', null); + + $this->registerAdminPage('clientconfigpage', 'ClientSettingsConfigPageDispatcher', 'config', + _kt('Client Tools Settings'), _kt('Manage Client Tools Settings'), + '/admin/configsettings.php', null); + + $this->registerAdminPage('generalconfigpage', 'GeneralConfigPageDispatcher', 'config', + _kt('General Settings'), _kt('Manage General Settings'), + '/admin/configsettings.php', null); + + $this->registerAdminPage('i18nconfigpage', 'i18nConfigPageDispatcher', 'config', + _kt('Internationalisation Settings'), _kt('Manage Internationalisation Settings'), + '/admin/configsettings.php', null); + // misc $this->registerAdminPage('helpmanagement', 'ManageHelpDispatcher', 'misc', _kt('Edit Help files'), _kt('Change the help files that are displayed to users.'), diff --git a/plugins/ktcore/admin/configSettings.php b/plugins/ktcore/admin/configSettings.php new file mode 100644 index 0000000..8f3f737 --- /dev/null +++ b/plugins/ktcore/admin/configSettings.php @@ -0,0 +1,240 @@ +. + * + * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, + * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. + * + * The interactive user interfaces in modified source and object code versions + * of this program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU General Public License version 3. + * + * In accordance with Section 7(b) of the GNU General Public License version 3, + * these Appropriate Legal Notices must retain the display of the "Powered by + * KnowledgeTree" logo and retain the original copyright notice. If the display of the + * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices + * must display the words "Powered by KnowledgeTree" and retain the original + * copyright notice. + * Contributor( s): ______________________________________ + * + */ + +require_once(KT_LIB_DIR . '/dispatcher.inc.php'); +require_once(KT_LIB_DIR . '/templating/templating.inc.php'); + +class BaseConfigDispatcher extends KTAdminDispatcher +{ + function check() { + return parent::check(); + } + + function do_main($sQuery) + { + if(empty($sQuery)) + { + $sQuery = ''; + } + $aResults = DBUtil::getResultArray($sQuery); + + //populating paths correctly + $oKTConfig =& KTConfig::getSingleton(); + + for($i = 0; $i < count($aResults); $i++) + { + if(strstr($aResults[$i]['value'],'$') != false) + { + $aResults[$i]['value'] = $oKTConfig->get($aResults[$i]['group_name'].'/'.$aResults[$i]['item']); + } + } + + //If template has posted changes for config settings save all values to db. + if(isset($_POST['configArray'])) + { + + foreach ($aResults as $values) + { + + //IF current db entries id is in the array sent back by the page AND + //the values for the db and the page are different, update the db. + if(isset($_POST['configArray'][$values['id']]) && $_POST['configArray'][$values['id']] + != $values['value']) + { + //update entry + $aFields = array(); + if($values['type'] == 'boolean') + { + if($_POST['configArray'][$values['id']] == 'true') + { + $aFields['value'] = true; + + } + else + { + $aFields['value'] = false; + } + } + else + { + $aFields['value'] = $_POST['configArray'][$values['id']]; + } + $oUpdateResult = DBUtil::autoUpdate('config_settings', $aFields, $values['id']); + } + } + } + + //Get new results after any db change above + if(isset($_POST['configArray'])) + { + $aResults = DBUtil::getResultArray($sQuery); + for($i = 0; $i < count($aResults); $i++) + { + if(strstr($aResults[$i]['value'],'$') != false) + { + $aResults[$i]['value'] = $oKTConfig->get($aResults[$i]['group_name'].'/'.$aResults[$i]['item']); + } + } + } + + $oTemplating =& KTTemplating::getSingleton(); + + $oTemplate =& $oTemplating->loadTemplate('ktcore/configsettings'); + + //set db config data being sent to template + $oTemplate->setData(array( + 'results' => $aResults + + )); + return $oTemplate; + } +} + +class UIConfigPageDispatcher extends BaseConfigDispatcher +{ + function check() { + $this->aBreadcrumbs[] = array( + 'url' => $_SERVER['PHP_SELF'], + 'name' => _kt('User Interface Settings'), + ); + return parent::check(); + } + + function do_main() { + + //get config settings from db + $sQuery = 'select id, group_name, item, type, value, helptext, default_value from config_settings where group_name = \'ui\'order by group_name'; + return parent::do_main($sQuery); + } +} + +class ClientSettingsConfigPageDispatcher extends BaseConfigDispatcher +{ + function check() { + $this->aBreadcrumbs[] = array( + 'url' => $_SERVER['PHP_SELF'], + 'name' => _kt('Client Tools Settings'), + ); + return parent::check(); + } + + function do_main() { + + //get config settings from db + $sQuery = 'select id, group_name, item, type, value, helptext, default_value from config_settings where + group_name = \'KTWebDAVSettings\' or group_name = \'BaobabSettings\' or + group_name = \'webservice\' or group_name = \'clientToolPolicies\' order by group_name'; + return parent::do_main($sQuery); + } +} + +class EmailConfigPageDispatcher extends BaseConfigDispatcher +{ + function check() { + $this->aBreadcrumbs[] = array( + 'url' => $_SERVER['PHP_SELF'], + 'name' => _kt('Email Settings'), + ); + return parent::check(); + } + + function do_main() { + + //get config settings from db + $sQuery = 'select id, group_name, item, type, value, helptext, default_value from config_settings where group_name = \'email\'order by group_name'; + return parent::do_main($sQuery); + } +} + +class GeneralConfigPageDispatcher extends BaseConfigDispatcher +{ + function check() { + $this->aBreadcrumbs[] = array( + 'url' => $_SERVER['PHP_SELF'], + 'name' => _kt('General Settings'), + ); + return parent::check(); + } + + function do_main() { + + //get config settings from db + $sQuery = 'select id, group_name, item, type, value, helptext, default_value from config_settings where + item = \'schedulerInterval\' or item = \'fakeMimetype\' + or item = \'browseToUnitFolder\' order by group_name'; + return parent::do_main($sQuery); + } +} + +class i18nConfigPageDispatcher extends BaseConfigDispatcher +{ + function check() { + $this->aBreadcrumbs[] = array( + 'url' => $_SERVER['PHP_SELF'], + 'name' => _kt('Internationalisation Settings'), + ); + return parent::check(); + } + + function do_main() { + + //get config settings from db + $sQuery = 'select id, group_name, item, type, value, helptext, default_value from config_settings where + group_name = \'i18n\' order by group_name'; + return parent::do_main($sQuery); + } +} + +class SearchAndIndexingConfigPageDispatcher extends BaseConfigDispatcher +{ + function check() { + $this->aBreadcrumbs[] = array( + 'url' => $_SERVER['PHP_SELF'], + 'name' => _kt('Search and Indexing Settings'), + ); + return parent::check(); + } + + function do_main() { + + //get config settings from db + $sQuery = 'select id, group_name, item, type, value, helptext, default_value from config_settings where + group_name = \'search\' or group_name = \'indexer\'order by group_name'; + return parent::do_main($sQuery); + } +} +?> diff --git a/resources/css/kt-framing.css b/resources/css/kt-framing.css index ca20a26..3150971 100644 --- a/resources/css/kt-framing.css +++ b/resources/css/kt-framing.css @@ -2138,4 +2138,24 @@ body #content #add_dashlet { overflow:auto; +} + +.kt_config +{ + width: 100%; + border: 1px solid #ccc; +} + +.kt_config td { + padding: 0.25em 0.5em; + overflow: hidden; + vertical-align: top; +} + +.kt_config th{ + + border-bottom:1px solid #888888; + padding: 0.5em 0.5em; + overflow: hidden; + vertical-align: top; } \ No newline at end of file diff --git a/sql/mysql/install/data.sql b/sql/mysql/install/data.sql index b4497f4..d8f7cab 100644 --- a/sql/mysql/install/data.sql +++ b/sql/mysql/install/data.sql @@ -116,6 +116,22 @@ LOCK TABLES `comment_searchable_text` WRITE; UNLOCK TABLES; -- +-- Dumping data for table `config_settings` +-- + +LOCK TABLES `config_settings` WRITE; +/*!40000 ALTER TABLE `config_settings` DISABLE KEYS */; +INSERT INTO `config_settings`(`id`,`group_name`,`item`,`type`,`value`,`helptext`,`default_value`,`can_edit`) VALUES (1,'ui','appName','','KnowledgeTree','OEM application name','KnowledgeTree',1),(2,'KnowledgeTree','schedulerInterval','','30','','30',1),(3,'dashboard','alwaysShowYCOD','boolean','default','Display the \"Your Checked-out Documents\" dashlet even when empty.','0',1),(4,'urls','graphicsUrl','','${rootUrl}/graphics','','${rootUrl}/graphics',1),(5,'urls','uiUrl','','${rootUrl}/presentation/lookAndFeel/knowledgeTree','','${rootUrl}/presentation/lookAndFeel/knowledgeTree',1),(6,'tweaks','browseToUnitFolder','boolean','default','Whether to browse to the user\'s (first) unit when first going to the browse section.','0',1),(7,'tweaks','genericMetaDataRequired','boolean','1','','1',1),(8,'tweaks','developmentWindowLog','boolean','0','','0',1),(9,'tweaks','noisyBulkOperations','boolean','default','Whether bulk operations should generate a transaction notice on each ; item, or only on the folder. Default of \"false\" indicates that only the folder transaction should occur.','0',1),(10,'email','emailServer','','none','','none',1),(11,'email','emailPort','','default','','',1),(12,'email','emailAuthentication','boolean','0','Do you need auth to connect to SMTP?\r\n','0',1),(13,'email','emailUsername','','username','','username',1),(14,'email','emailPassword','','password','','password',1),(15,'email','emailFrom','','kt@example.org','','kt@example.org',1),(16,'email','emailFromName','','KnowledgeTree Document Management System','','KnowledgeTree Document Management System',1),(17,'email','allowAttachment','boolean','default','Set to true to allow users to send attachments from the document\r\n management system\r\n.','0',1),(18,'email','allowEmailAddresses','boolean','default','Set to true to allow users to send to any email address, as opposed to\r\n only users of the system\r\n.','0',1),(19,'email','sendAsSystem','boolean','default','Set to true to always send email from the emailFrom address listed above, even if there is an identifiable sending user\r\n.','0',1),(20,'email','onlyOwnGroups','boolean','default','Set to true to only allow users to send emails to those in the same\r\n groups as them\r\n.','0',1),(21,'user_prefs','passwordLength','','6','Minimum password length on password-setting\r\n','6',1),(22,'user_prefs','restrictAdminPasswords','boolean','default','Apply the minimum password length to admin while creating / editing accounts?\r\n default is set to \"false\" meaning that admins can create users with shorter passwords.\r\n','0',1), +(23,'user_prefs','restrictPreferences','boolean','0','Restrict users from accessing their preferences menus?\r\n','0',1),(24,'session','sessionTimeout','','1200','Session timeout (in seconds)\r\n','1200',1),(25,'session','allowAnonymousLogin','boolean','0','By default, do not auto-login users as anonymous.\r\n Set this to true if you UNDERSTAND the security system that KT\r\n uses, and have sensibly applied the roles \"Everyone\" and \"Authenticated Users\".\r\n','0',1),(26,'ui','companyLogo','','${rootUrl}/resources/companylogo.png','Add the logo of your company to the site\'s appearance. This logo MUST be 50px tall, and on a white background.\r\n','${rootUrl}/resources/companylogo.png',1),(27,'ui','companyLogoWidth','','313px','The logo\'s width in pixels\r\n','313px',1),(28,'ui','companyLogoTitle','','ACME Corporation','ALT text - for accessibility purposes.\r\n','ACME Corporation',1),(29,'ui','alwaysShowAll','boolean','0','Do not restrict to searches (e.g. always show_all) on users and groups pages.\r\n','0',1),(30,'ui','condensedAdminUI','boolean','0','Use a condensed admin ui\r\n?','0',1),(31,'ui','fakeMimetype','boolean','0','Allow \"open\" from downloads. Changing this to \"true\" will prevent (most)\r\n browsers from giving users the \"open\" option.\r\n','0',1),(32,'ui','metadata_sort','boolean','0','Sort the metadata fields alphabetically\r\n','1',1),(33,'i18n','useLike','boolean','default','If your language doesn\'t have distinguishable words (usually, doesn\'t\r\n have a space character), set useLike to true to use a search that can\r\n deal with this, but which is slower.\r\n','0',1),(34,'import','unzip','','unzip','Unzip command - will use execSearchPath to find if the path to the binary is not given\r\n.','unzip',1),(35,'export','zip','','zip','Zip command - will use execSearchPath to find if the path to the\r\n binary is not given\r\n.','zip',1),(36,'externalBinary','xls2csv','','xls2csv','','xls2csv',1), +(37,'externalBinary','pdftotext','','pdftotext','','pdftotext',1),(38,'externalBinary','catppt','','catppt','','catppt',1),(39,'externalBinary','pstotext','','pstotext','','pstotext',1),(40,'externalBinary','catdoc','','catdoc','','catdoc',1),(41,'externalBinary','antiword','','antiword','','antiword',1),(42,'externalBinary','python','','python','','python',1),(43,'externalBinary','java','','java','','java',1),(44,'externalBinary','php','','php','','php',1),(45,'externalBinary','df','','df','','df',1),(46,'cache','proxyCacheDirectory','','${varDirectory}/proxies','','${varDirectory}/proxies',1),(47,'cache','proxyCacheEnabled','boolean','1','','1',1),(48,'KTWebDAVSettings','debug','','off','This section is for KTWebDAV only, _LOTS_ of debug info will be logged if the following is \"on\"\r\n','off',1),(49,'KTWebDAVSettings','safemode','','on','To allow write access to WebDAV clients set safe mode to \"off\".','on',1),(50,'BaobabSettings','debug','','off','This section is for Baobab only\r\n, _LOTS_ of debug info will be logged if the following is \"on\"\r\n.','off',1),(51,'BaobabSettings','safemode','','on','To allow write access to WebDAV clients set safe mode to \"off\" below\r\n.','on',1),(52,'search','searchBasePath','','${fileSystemRoot}/search2','','${fileSystemRoot}/search2',1),(53,'search','fieldsPath','','${searchBasePath}/search/fields','','${searchBasePath}/search/fields',1),(54,'search','resultsDisplayFormat','','searchengine','The format in which to display the results\r\n options are searchengine or browseview defaults to searchengine\r\n.','searchengine',1),(55,'search','resultsPerPage','','50','The number of results per page\r\n, defaults to 25\r\n','25',1),(56,'search','dateFormat','','Y-m-d','The date format used when making queries using widgets\r\n, defaults to Y-m-d\r\n','Y-m-d',1),(57,'browse','previewActivation','','default','The document info box / preview is activated by mousing over or clicking on the icon\r\n. Options: mouse-over (default) or onclick\r\n.','mouse-over',1), +(58,'indexer','coreClass','','JavaXMLRPCLuceneIndexer','The core indexing class\r\n. Choices: JavaXMLRPCLuceneIndexer or PHPLuceneIndexer.','JavaXMLRPCLuceneIndexer',1),(59,'indexer','batchDocuments','','20','The number of documents to be indexed in a cron session, defaults to 20\r\n.','20',1),(60,'indexer','batchMigrateDocuments','','500','The number of documents to be migrated in a cron session, defaults to 500\r\n.','500',1),(61,'indexer','indexingBasePath','','${searchBasePath}/indexing','','${searchBasePath}/indexing',1),(62,'indexer','luceneDirectory','','${varDirectory}/indexes','The location of the lucene indexes\r\n.','${varDirectory}/indexes',1),(63,'indexer','extractorPath','','${indexingBasePath}/extractors','','${indexingBasePath}/extractors',1),(64,'indexer','extractorHookPath','','${indexingBasePath}/extractorHooks','','${indexingBasePath}/extractorHooks',1),(65,'indexer','javaLuceneURL','','http://127.0.0.1:8875','The url for the Java Lucene Server. This should match up the the Lucene Server configuration. Defaults to http://127.0.0.1:8875\r\n','http://127.0.0.1:8875',1),(66,'openoffice','host','','default','The host on which open office is installed\r\n. Defaults to 127.0.0.1\r\n','127.0.0.1',1),(67,'openoffice','port','','default','The port on which open office is listening. Defaults to 8100\r\n','8100',1),(68,'webservice','uploadDirectory','','${varDirectory}/uploads','Directory to which all uploads via webservices are persisted before moving into the repository\r\n.','${varDirectory}/uploads',1), +(69,'webservice','downloadUrl','','${rootUrl}/ktwebservice/download.php','Url which is sent to clients via web service calls so they can then download file via HTTP GET\r\n.','${rootUrl}/ktwebservice/download.php',1),(70,'webservice','uploadExpiry','','30','Period indicating how long a file should be retained in the uploads directory.\r\n','30',1),(71,'webservice','downloadExpiry','','30','Period indicating how long a download link will be available.','30',1),(72,'webservice','randomKeyText','','bkdfjhg23yskjdhf2iu','Random text used to construct a hash. This can be customised on installations so there is less chance of overlap between installations.\r\n','bkdfjhg23yskjdhf2iu',1),(73,'webservice','validateSessionCount','boolean','0','Validating session counts can interfere with access. It is best to leave this disabled, unless very strict access is required.\r\n','0',1),(74,'webservice','useDefaultDocumentTypeIfInvalid','boolean','1','If the document type is invalid when adding a document, we can be tollerant and just default to the Default document type.\r\n','1',1),(75,'webservice','debug','boolean','0','The web service debugging if the logLevel is set to DEBUG. We can set the value to 4 or 5 to get more verbose web service logging.\r\n Level 4 logs the name of functions being accessed. Level 5 logs the SOAP XML requests and responses.\r\n','0',1),(76,'clientToolPolicies','explorerMetadataCapture','boolean','1','This setting is one of two which control whether or not the client is prompted for metadata when a\r\n document is added to knowledgetree via KTtools. It defaults to true.\r\n','1',1),(77,'clientToolPolicies','officeMetadataCapture','boolean','1','This setting is one of two which control whether or not the client is prompted for metadata when a document is added to knowledgetree via KTtools. It defaults to true.','1',1), +(78,'clientToolPolicies','captureReasonsDelete','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1),(79,'clientToolPolicies','captureReasonsCheckin','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1),(80,'clientToolPolicies','captureReasonsCheckout','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1),(81,'clientToolPolicies','captureReasonsCancelCheckout','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1),(82,'clientToolPolicies','captureReasonsCopyInKT','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1),(83,'clientToolPolicies','captureReasonsMoveInKT','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1), +(84,'clientToolPolicies','allowRememberPassword','boolean','1','This setting governs whether the password can be stored on the client or not.','1',1),(85,'DiskUsage','warningThreshold','','10','When free space in a mount point is less than this percentage, the disk usage dashlet will highlight the mount in ORANGE\r\n.','10',1),(86,'DiskUsage','urgentThreshold','','5','When free space in a mount point is less than this percentage, the disk usage dashlet will highlight the mount in RED\r\n.','5',1),(87,'KnowledgeTree','useNewDashboard','','default','','1',1),(88,'i18n','defaultLanguage','','en','Default language for the interface\r\n.','en',1),(89,'CustomErrorMessages','customerrormessages','','off','Turn custom error messages on or off here','on',1),(90,'CustomErrorMessages','customerrorpagepath','','customerrorpage.php','Name or url of custom error page\r\n.','customerrorpage.php',1),(91,'CustomErrorMessages','customerrorhandler','','off','Turn custom error handler on or off','on',1),(92,'ui','morphEnabled','boolean','0','Enable Morph','0',1),(93,'ui','morphTo','','blue','Morph Theme\r\n','blue',1),(94,'KnowledgeTree','logLevel','','default','Choice: INFO or DEBUG','INFO',1),(95,'storage','manager','','default','','KTOnDiskHashedStorageManager',1),(96,'ui','ieGIF','boolean','0','','1',1),(97,'ui','automaticRefresh','boolean','0','','0',1),(98,'ui','dot','','dot','','dot',1),(99,'tweaks','phpErrorLogFile','boolean','default','If you want to enable PHP error logging to the log/php_error_log file, change this setting to true\r\n.','0',1),(100,'urls','logDirectory','','default','','${varDirectory}/log',1),(101,'urls','uiDirectory','','default','','${fileSystemRoot}/presentation/lookAndFeel/knowledgeTree',1),(102,'urls','tmpDirectory','','default','','${varDirectory}/tmp',1),(103,'urls','stopwordsFile','','default','','${fileSystemRoot}/config/stopwords.txt',1),(104,'cache','cacheEnabled','boolean','default','','0',1),(105,'cache','cacheDirectory','','default','','${varDirectory}/cache',1),(106,'cache','cachePlugins','boolean','default','','1',1),(107,'urls','varDirectory','','default','','${fileSystemRoot}/var',1); +/*!40000 ALTER TABLE `config_settings` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Dumping data for table `dashlet_disables` -- diff --git a/sql/mysql/install/structure.sql b/sql/mysql/install/structure.sql index 7755d9c..b5d48cc 100644 --- a/sql/mysql/install/structure.sql +++ b/sql/mysql/install/structure.sql @@ -157,6 +157,22 @@ CREATE TABLE `comment_searchable_text` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- +-- Table structure for table `config_settings` +-- + +CREATE TABLE `config_settings` ( + `id` int(255) unsigned NOT NULL, + `group_name` varchar(255) NOT NULL default '0', + `item` varchar(255) NOT NULL default '0', + `type` varchar(255) NOT NULL default '0', + `value` varchar(255) NOT NULL default 'default', + `helptext` varchar(255) NOT NULL default '0', + `default_value` varchar(255) NOT NULL default 'default', + `can_edit` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- -- Table structure for table `dashlet_disables` -- @@ -1812,6 +1828,15 @@ CREATE TABLE `zseq_column_entries` ( ) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; -- +-- Table structure for table `zseq_config_settings` +-- + +CREATE TABLE `zseq_config_settings` ( + `id` int(10) unsigned NOT NULL auto_increment, + PRIMARY KEY (`id`) +) ENGINE=MyISAM AUTO_INCREMENT=108 DEFAULT CHARSET=latin1; + +-- -- Table structure for table `zseq_dashlet_disables` -- diff --git a/sql/mysql/upgrade/3.5.3/config_settings.sql b/sql/mysql/upgrade/3.5.3/config_settings.sql new file mode 100644 index 0000000..9c3639b --- /dev/null +++ b/sql/mysql/upgrade/3.5.3/config_settings.sql @@ -0,0 +1,23 @@ +CREATE TABLE `config_settings` ( + `id` int(255) unsigned NOT NULL, + `group_name` varchar(255) NOT NULL default '0', + `item` varchar(255) NOT NULL default '0', + `type` varchar(255) NOT NULL default '0', + `value` varchar(255) NOT NULL default 'default', + `helptext` varchar(255) NOT NULL default '0', + `default_value` varchar(255) NOT NULL default 'default', + `can_edit` tinyint(1) NOT NULL default '1', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +LOCK TABLES `config_settings` WRITE; +/*!40000 ALTER TABLE `config_settings` DISABLE KEYS */; +INSERT INTO `config_settings`(`id`,`group_name`,`item`,`type`,`value`,`helptext`,`default_value`,`can_edit`) VALUES (1,'ui','appName','','KnowledgeTree','OEM application name','KnowledgeTree',1),(2,'KnowledgeTree','schedulerInterval','','30','','30',1),(3,'dashboard','alwaysShowYCOD','boolean','default','Display the \"Your Checked-out Documents\" dashlet even when empty.','0',1),(4,'urls','graphicsUrl','','${rootUrl}/graphics','','${rootUrl}/graphics',1),(5,'urls','uiUrl','','${rootUrl}/presentation/lookAndFeel/knowledgeTree','','${rootUrl}/presentation/lookAndFeel/knowledgeTree',1),(6,'tweaks','browseToUnitFolder','boolean','default','Whether to browse to the user\'s (first) unit when first going to the browse section.','0',1),(7,'tweaks','genericMetaDataRequired','boolean','1','','1',1),(8,'tweaks','developmentWindowLog','boolean','0','','0',1),(9,'tweaks','noisyBulkOperations','boolean','default','Whether bulk operations should generate a transaction notice on each ; item, or only on the folder. Default of \"false\" indicates that only the folder transaction should occur.','0',1),(10,'email','emailServer','','none','','none',1),(11,'email','emailPort','','default','','',1),(12,'email','emailAuthentication','boolean','0','Do you need auth to connect to SMTP?\r\n','0',1),(13,'email','emailUsername','','username','','username',1),(14,'email','emailPassword','','password','','password',1),(15,'email','emailFrom','','kt@example.org','','kt@example.org',1),(16,'email','emailFromName','','KnowledgeTree Document Management System','','KnowledgeTree Document Management System',1),(17,'email','allowAttachment','boolean','default','Set to true to allow users to send attachments from the document\r\n management system\r\n.','0',1),(18,'email','allowEmailAddresses','boolean','default','Set to true to allow users to send to any email address, as opposed to\r\n only users of the system\r\n.','0',1),(19,'email','sendAsSystem','boolean','default','Set to true to always send email from the emailFrom address listed above, even if there is an identifiable sending user\r\n.','0',1),(20,'email','onlyOwnGroups','boolean','default','Set to true to only allow users to send emails to those in the same\r\n groups as them\r\n.','0',1),(21,'user_prefs','passwordLength','','6','Minimum password length on password-setting\r\n','6',1),(22,'user_prefs','restrictAdminPasswords','boolean','default','Apply the minimum password length to admin while creating / editing accounts?\r\n default is set to \"false\" meaning that admins can create users with shorter passwords.\r\n','0',1), +(23,'user_prefs','restrictPreferences','boolean','0','Restrict users from accessing their preferences menus?\r\n','0',1),(24,'session','sessionTimeout','','1200','Session timeout (in seconds)\r\n','1200',1),(25,'session','allowAnonymousLogin','boolean','0','By default, do not auto-login users as anonymous.\r\n Set this to true if you UNDERSTAND the security system that KT\r\n uses, and have sensibly applied the roles \"Everyone\" and \"Authenticated Users\".\r\n','0',1),(26,'ui','companyLogo','','${rootUrl}/resources/companylogo.png','Add the logo of your company to the site\'s appearance. This logo MUST be 50px tall, and on a white background.\r\n','${rootUrl}/resources/companylogo.png',1),(27,'ui','companyLogoWidth','','313px','The logo\'s width in pixels\r\n','313px',1),(28,'ui','companyLogoTitle','','ACME Corporation','ALT text - for accessibility purposes.\r\n','ACME Corporation',1),(29,'ui','alwaysShowAll','boolean','0','Do not restrict to searches (e.g. always show_all) on users and groups pages.\r\n','0',1),(30,'ui','condensedAdminUI','boolean','0','Use a condensed admin ui\r\n?','0',1),(31,'ui','fakeMimetype','boolean','0','Allow \"open\" from downloads. Changing this to \"true\" will prevent (most)\r\n browsers from giving users the \"open\" option.\r\n','0',1),(32,'ui','metadata_sort','boolean','0','Sort the metadata fields alphabetically\r\n','1',1),(33,'i18n','useLike','boolean','default','If your language doesn\'t have distinguishable words (usually, doesn\'t\r\n have a space character), set useLike to true to use a search that can\r\n deal with this, but which is slower.\r\n','0',1),(34,'import','unzip','','unzip','Unzip command - will use execSearchPath to find if the path to the binary is not given\r\n.','unzip',1),(35,'export','zip','','zip','Zip command - will use execSearchPath to find if the path to the\r\n binary is not given\r\n.','zip',1),(36,'externalBinary','xls2csv','','xls2csv','','xls2csv',1), +(37,'externalBinary','pdftotext','','pdftotext','','pdftotext',1),(38,'externalBinary','catppt','','catppt','','catppt',1),(39,'externalBinary','pstotext','','pstotext','','pstotext',1),(40,'externalBinary','catdoc','','catdoc','','catdoc',1),(41,'externalBinary','antiword','','antiword','','antiword',1),(42,'externalBinary','python','','python','','python',1),(43,'externalBinary','java','','java','','java',1),(44,'externalBinary','php','','php','','php',1),(45,'externalBinary','df','','df','','df',1),(46,'cache','proxyCacheDirectory','','${varDirectory}/proxies','','${varDirectory}/proxies',1),(47,'cache','proxyCacheEnabled','boolean','1','','1',1),(48,'KTWebDAVSettings','debug','','off','This section is for KTWebDAV only, _LOTS_ of debug info will be logged if the following is \"on\"\r\n','off',1),(49,'KTWebDAVSettings','safemode','','on','To allow write access to WebDAV clients set safe mode to \"off\".','on',1),(50,'BaobabSettings','debug','','off','This section is for Baobab only\r\n, _LOTS_ of debug info will be logged if the following is \"on\"\r\n.','off',1),(51,'BaobabSettings','safemode','','on','To allow write access to WebDAV clients set safe mode to \"off\" below\r\n.','on',1),(52,'search','searchBasePath','','${fileSystemRoot}/search2','','${fileSystemRoot}/search2',1),(53,'search','fieldsPath','','${searchBasePath}/search/fields','','${searchBasePath}/search/fields',1),(54,'search','resultsDisplayFormat','','searchengine','The format in which to display the results\r\n options are searchengine or browseview defaults to searchengine\r\n.','searchengine',1),(55,'search','resultsPerPage','','50','The number of results per page\r\n, defaults to 25\r\n','25',1),(56,'search','dateFormat','','Y-m-d','The date format used when making queries using widgets\r\n, defaults to Y-m-d\r\n','Y-m-d',1),(57,'browse','previewActivation','','default','The document info box / preview is activated by mousing over or clicking on the icon\r\n. Options: mouse-over (default) or onclick\r\n.','mouse-over',1), +(58,'indexer','coreClass','','JavaXMLRPCLuceneIndexer','The core indexing class\r\n. Choices: JavaXMLRPCLuceneIndexer or PHPLuceneIndexer.','JavaXMLRPCLuceneIndexer',1),(59,'indexer','batchDocuments','','20','The number of documents to be indexed in a cron session, defaults to 20\r\n.','20',1),(60,'indexer','batchMigrateDocuments','','500','The number of documents to be migrated in a cron session, defaults to 500\r\n.','500',1),(61,'indexer','indexingBasePath','','${searchBasePath}/indexing','','${searchBasePath}/indexing',1),(62,'indexer','luceneDirectory','','${varDirectory}/indexes','The location of the lucene indexes\r\n.','${varDirectory}/indexes',1),(63,'indexer','extractorPath','','${indexingBasePath}/extractors','','${indexingBasePath}/extractors',1),(64,'indexer','extractorHookPath','','${indexingBasePath}/extractorHooks','','${indexingBasePath}/extractorHooks',1),(65,'indexer','javaLuceneURL','','http://127.0.0.1:8875','The url for the Java Lucene Server. This should match up the the Lucene Server configuration. Defaults to http://127.0.0.1:8875\r\n','http://127.0.0.1:8875',1),(66,'openoffice','host','','default','The host on which open office is installed\r\n. Defaults to 127.0.0.1\r\n','127.0.0.1',1),(67,'openoffice','port','','default','The port on which open office is listening. Defaults to 8100\r\n','8100',1),(68,'webservice','uploadDirectory','','${varDirectory}/uploads','Directory to which all uploads via webservices are persisted before moving into the repository\r\n.','${varDirectory}/uploads',1), +(69,'webservice','downloadUrl','','${rootUrl}/ktwebservice/download.php','Url which is sent to clients via web service calls so they can then download file via HTTP GET\r\n.','${rootUrl}/ktwebservice/download.php',1),(70,'webservice','uploadExpiry','','30','Period indicating how long a file should be retained in the uploads directory.\r\n','30',1),(71,'webservice','downloadExpiry','','30','Period indicating how long a download link will be available.','30',1),(72,'webservice','randomKeyText','','bkdfjhg23yskjdhf2iu','Random text used to construct a hash. This can be customised on installations so there is less chance of overlap between installations.\r\n','bkdfjhg23yskjdhf2iu',1),(73,'webservice','validateSessionCount','boolean','0','Validating session counts can interfere with access. It is best to leave this disabled, unless very strict access is required.\r\n','0',1),(74,'webservice','useDefaultDocumentTypeIfInvalid','boolean','1','If the document type is invalid when adding a document, we can be tollerant and just default to the Default document type.\r\n','1',1),(75,'webservice','debug','boolean','0','The web service debugging if the logLevel is set to DEBUG. We can set the value to 4 or 5 to get more verbose web service logging.\r\n Level 4 logs the name of functions being accessed. Level 5 logs the SOAP XML requests and responses.\r\n','0',1),(76,'clientToolPolicies','explorerMetadataCapture','boolean','1','This setting is one of two which control whether or not the client is prompted for metadata when a\r\n document is added to knowledgetree via KTtools. It defaults to true.\r\n','1',1),(77,'clientToolPolicies','officeMetadataCapture','boolean','1','This setting is one of two which control whether or not the client is prompted for metadata when a document is added to knowledgetree via KTtools. It defaults to true.','1',1), +(78,'clientToolPolicies','captureReasonsDelete','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1),(79,'clientToolPolicies','captureReasonsCheckin','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1),(80,'clientToolPolicies','captureReasonsCheckout','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1),(81,'clientToolPolicies','captureReasonsCancelCheckout','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1),(82,'clientToolPolicies','captureReasonsCopyInKT','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1),(83,'clientToolPolicies','captureReasonsMoveInKT','boolean','1','This setting is one of six which govern whether reasons are asked for in KTtools\r\n.','1',1), +(84,'clientToolPolicies','allowRememberPassword','boolean','1','This setting governs whether the password can be stored on the client or not.','1',1),(85,'DiskUsage','warningThreshold','','10','When free space in a mount point is less than this percentage, the disk usage dashlet will highlight the mount in ORANGE\r\n.','10',1),(86,'DiskUsage','urgentThreshold','','5','When free space in a mount point is less than this percentage, the disk usage dashlet will highlight the mount in RED\r\n.','5',1),(87,'KnowledgeTree','useNewDashboard','','default','','1',1),(88,'i18n','defaultLanguage','','en','Default language for the interface\r\n.','en',1),(89,'CustomErrorMessages','customerrormessages','','off','Turn custom error messages on or off here','on',1),(90,'CustomErrorMessages','customerrorpagepath','','customerrorpage.php','Name or url of custom error page\r\n.','customerrorpage.php',1),(91,'CustomErrorMessages','customerrorhandler','','off','Turn custom error handler on or off','on',1),(92,'ui','morphEnabled','boolean','0','Enable Morph','0',1),(93,'ui','morphTo','','blue','Morph Theme\r\n','blue',1),(94,'KnowledgeTree','logLevel','','default','Choice: INFO or DEBUG','INFO',1),(95,'storage','manager','','default','','KTOnDiskHashedStorageManager',1),(96,'ui','ieGIF','boolean','0','','1',1),(97,'ui','automaticRefresh','boolean','0','','0',1),(98,'ui','dot','','dot','','dot',1),(99,'tweaks','phpErrorLogFile','boolean','default','If you want to enable PHP error logging to the log/php_error_log file, change this setting to true\r\n.','0',1),(100,'urls','logDirectory','','default','','${varDirectory}/log',1),(101,'urls','uiDirectory','','default','','${fileSystemRoot}/presentation/lookAndFeel/knowledgeTree',1),(102,'urls','tmpDirectory','','default','','${varDirectory}/tmp',1),(103,'urls','stopwordsFile','','default','','${fileSystemRoot}/config/stopwords.txt',1),(104,'cache','cacheEnabled','boolean','default','','0',1),(105,'cache','cacheDirectory','','default','','${varDirectory}/cache',1),(106,'cache','cachePlugins','boolean','default','','1',1),(107,'urls','varDirectory','','default','','${fileSystemRoot}/var',1); +/*!40000 ALTER TABLE `config_settings` ENABLE KEYS */; +UNLOCK TABLES; \ No newline at end of file diff --git a/templates/ktcore/configsettings.smarty b/templates/ktcore/configsettings.smarty new file mode 100644 index 0000000..7a03896 --- /dev/null +++ b/templates/ktcore/configsettings.smarty @@ -0,0 +1,48 @@ +
+ + + + {foreach from=$results item=settings} + + + + + + + + {/foreach} + + + +
+ {$settings.group_name} : {$settings.item} + + {if ($settings.value != 'default')} + {if ($settings.type) == 'boolean'} + {if ($settings.value == '1')} + + {else} + + {/if} + {else} + + {/if} + {else} + {if ($settings.type) == 'boolean'} + {if ($settings.default_value == '1')} + + {else} + + {/if} + {else} + + {/if} + {/if} +
+ {$settings.helptext} +
+ +
+ + +
\ No newline at end of file