2006-01-25 01:15:46 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Metadata for configuration manager plugin
|
|
|
|
*
|
2018-06-01 08:18:05 +02:00
|
|
|
* Note: This file is loaded in Loader::loadMeta().
|
2006-01-25 01:15:46 +01:00
|
|
|
*
|
|
|
|
* Format:
|
|
|
|
* $meta[<setting name>] = array(<handler class id>,<param name> => <param value>);
|
|
|
|
*
|
|
|
|
* <handler class id> is the handler class name without the "setting_" prefix
|
|
|
|
*
|
2018-06-01 08:18:05 +02:00
|
|
|
* Defined classes (see core/Setting/*):
|
|
|
|
* Generic
|
2006-07-05 03:21:42 +02:00
|
|
|
* -------------------------------------------
|
2006-05-11 10:32:09 +02:00
|
|
|
* '' - default class ('setting'), textarea, minimal input validation, setting output in quotes
|
|
|
|
* 'string' - single line text input, minimal input validation, setting output in quotes
|
2006-01-25 01:15:46 +01:00
|
|
|
* 'numeric' - text input, accepts numbers and arithmetic operators, setting output without quotes
|
2010-11-30 18:27:04 +01:00
|
|
|
* if given the '_min' and '_max' parameters are used for validation
|
2007-05-13 11:03:09 +02:00
|
|
|
* 'numericopt' - like above, but accepts empty values
|
2006-01-25 01:15:46 +01:00
|
|
|
* 'onoff' - checkbox input, setting output 0|1
|
|
|
|
* 'multichoice' - select input (single choice), setting output with quotes, required _choices parameter
|
2013-08-01 11:49:52 +02:00
|
|
|
* 'email' - text input, input must conform to email address format, supports optional '_multiple'
|
|
|
|
* parameter for multiple comma separated email addresses
|
2009-01-19 17:48:09 +01:00
|
|
|
* 'password' - password input, minimal input validation, setting output text in quotes, maybe encoded
|
|
|
|
* according to the _code parameter
|
2006-01-25 01:15:46 +01:00
|
|
|
* 'dirchoice' - as multichoice, selection choices based on folders found at location specified in _dir
|
2008-04-01 21:40:32 +02:00
|
|
|
* parameter (required). A pattern can be used to restrict the folders to only those which
|
|
|
|
* match the pattern.
|
2006-07-05 03:21:42 +02:00
|
|
|
* 'multicheckbox'- a checkbox for each choice plus an "other" string input, config file setting is a comma
|
|
|
|
* separated list of checked choices
|
2006-05-10 08:57:32 +02:00
|
|
|
* 'fieldset' - used to group configuration settings, but is not itself a setting. To make this clear in
|
|
|
|
* the language files the keys for this type should start with '_'.
|
2012-11-10 18:18:05 +01:00
|
|
|
* 'array' - a simple (one dimensional) array of string values, shown as comma separated list in the
|
|
|
|
* config manager but saved as PHP array(). Values may not contain commas themselves.
|
|
|
|
* _pattern matching on the array values supported.
|
2013-02-18 16:51:06 +01:00
|
|
|
* 'regex' - regular expression string, normally without delimiters; as for string, in addition tested
|
|
|
|
* to see if will compile & run as a regex. in addition to _pattern, also accepts _delimiter
|
|
|
|
* (default '/') and _pregflags (default 'ui')
|
2006-01-25 01:15:46 +01:00
|
|
|
*
|
2018-06-01 08:18:05 +02:00
|
|
|
* Single Setting
|
2006-07-05 03:21:42 +02:00
|
|
|
* -------------------------------------------------
|
2006-01-25 01:15:46 +01:00
|
|
|
* 'savedir' - as 'setting', input tested against initpath() (inc/init.php)
|
|
|
|
* 'sepchar' - as multichoice, selection constructed from string of valid values
|
|
|
|
* 'authtype' - as 'setting', input validated against a valid php file at expected location for auth files
|
|
|
|
* 'im_convert' - as 'setting', input must exist and be an im_convert module
|
2006-07-05 03:21:42 +02:00
|
|
|
* 'disableactions' - as 'setting'
|
2007-08-05 21:36:38 +02:00
|
|
|
* 'compression' - no additional parameters. checks php installation supports possible compression alternatives
|
2013-02-18 15:47:52 +01:00
|
|
|
* 'licence' - as multichoice, selection constructed from licence strings in language files
|
|
|
|
* 'renderer' - as multichoice, selection constructed from enabled renderer plugins which canRender()
|
2013-10-18 13:47:55 +02:00
|
|
|
* 'authtype' - as multichoice, selection constructed from the enabled auth plugins
|
2006-01-25 01:15:46 +01:00
|
|
|
*
|
|
|
|
* Any setting commented or missing will use 'setting' class - text input, minimal validation, quoted output
|
|
|
|
*
|
|
|
|
* Defined parameters:
|
2013-02-18 18:51:45 +01:00
|
|
|
* '_caution' - no value (default) or 'warning', 'danger', 'security'. display an alert along with the setting
|
2006-01-25 01:15:46 +01:00
|
|
|
* '_pattern' - string, a preg pattern. input is tested against this pattern before being accepted
|
2008-04-01 21:40:32 +02:00
|
|
|
* optional all classes, except onoff & multichoice which ignore it
|
2006-01-25 01:15:46 +01:00
|
|
|
* '_choices' - array of choices. used to populate a selection box. choice will be replaced by a localised
|
|
|
|
* language string, indexed by <setting name>_o_<choice>, if one exists
|
2006-07-05 03:21:42 +02:00
|
|
|
* required by 'multichoice' & 'multicheckbox' classes, ignored by others
|
2006-01-25 01:15:46 +01:00
|
|
|
* '_dir' - location of directory to be used to populate choice list
|
|
|
|
* required by 'dirchoice' class, ignored by other classes
|
2006-07-05 03:21:42 +02:00
|
|
|
* '_combine' - complimentary output setting values which can be combined into a single display checkbox
|
|
|
|
* optional for 'multicheckbox', ignored by other classes
|
2009-01-19 17:48:09 +01:00
|
|
|
* '_code' - encoding method to use, accepted values: 'base64','uuencode','plain'. defaults to plain.
|
2010-11-30 18:27:04 +01:00
|
|
|
* '_min' - minimum numeric value, optional for 'numeric' and 'numericopt', ignored by others
|
|
|
|
* '_max' - maximum numeric value, optional for 'numeric' and 'numericopt', ignored by others
|
2013-02-18 16:51:06 +01:00
|
|
|
* '_delimiter' - string, default '/', a single character used as a delimiter for testing regex input values
|
|
|
|
* '_pregflags' - string, default 'ui', valid preg pattern modifiers used when testing regex input values, for more
|
2016-06-14 08:48:12 +02:00
|
|
|
* information see http://php.net/manual/en/reference.pcre.pattern.modifiers.php
|
2013-08-01 11:49:52 +02:00
|
|
|
* '_multiple' - bool, allow multiple comma separated email values; optional for 'email', ignored by others
|
2015-09-22 18:08:23 +02:00
|
|
|
* '_other' - how to handle other values (not listed in _choices). accepted values: 'always','exists','never'
|
|
|
|
* default value 'always'. 'exists' only shows 'other' input field when the setting contains value(s)
|
|
|
|
* not listed in choices (e.g. due to manual editing or update changing _choices). This is safer than
|
|
|
|
* 'never' as it will not discard unknown/other values.
|
|
|
|
* optional for 'multicheckbox', ignored by others
|
|
|
|
*
|
2018-06-01 08:18:05 +02:00
|
|
|
* The order of the settings influences the order in which they apppear in the config manager
|
2006-01-25 01:15:46 +01:00
|
|
|
*
|
|
|
|
* @author Chris Smith <chris@jalakai.co.uk>
|
|
|
|
*/
|
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_basic'] = array('fieldset');
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['title'] = array('string');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['start'] = array('string','_caution' => 'warning','_pattern' => '!^[^:;/]+$!'); // don't accept namespaces
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['lang'] = array('dirchoice','_dir' => DOKU_INC.'inc/lang/');
|
2008-04-01 21:40:32 +02:00
|
|
|
$meta['template'] = array('dirchoice','_dir' => DOKU_INC.'lib/tpl/','_pattern' => '/^[\w-]+$/');
|
2012-01-29 20:15:13 +01:00
|
|
|
$meta['tagline'] = array('string');
|
|
|
|
$meta['sidebar'] = array('string');
|
2008-10-12 13:31:50 +02:00
|
|
|
$meta['license'] = array('license');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['savedir'] = array('savedir','_caution' => 'danger');
|
|
|
|
$meta['basedir'] = array('string','_caution' => 'danger');
|
|
|
|
$meta['baseurl'] = array('string','_caution' => 'danger');
|
|
|
|
$meta['cookiedir'] = array('string','_caution' => 'danger');
|
2006-10-06 00:31:41 +02:00
|
|
|
$meta['dmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation
|
|
|
|
$meta['fmode'] = array('numeric','_pattern' => '/0[0-7]{3,4}/'); // only accept octal representation
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['allowdebug'] = array('onoff','_caution' => 'security');
|
2006-01-25 01:15:46 +01:00
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_display'] = array('fieldset');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['recent'] = array('numeric');
|
2012-04-15 14:57:20 +02:00
|
|
|
$meta['recent_days'] = array('numeric');
|
2010-11-30 18:34:10 +01:00
|
|
|
$meta['breadcrumbs'] = array('numeric','_min' => 0);
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['youarehere'] = array('onoff');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['fullpath'] = array('onoff','_caution' => 'security');
|
2007-06-13 20:40:15 +02:00
|
|
|
$meta['typography'] = array('multichoice','_choices' => array(0,1,2));
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['dformat'] = array('string');
|
|
|
|
$meta['signature'] = array('string');
|
2018-04-27 19:07:43 +02:00
|
|
|
$meta['showuseras'] = array(
|
|
|
|
'multichoice',
|
|
|
|
'_choices' => array('loginname', 'username', 'username_link', 'email', 'email_link')
|
|
|
|
);
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5)); // 5 toc levels
|
2009-01-17 00:50:51 +01:00
|
|
|
$meta['tocminheads'] = array('multichoice','_choices' => array(0,1,2,3,4,5,10,15,20));
|
2006-02-24 00:00:53 +01:00
|
|
|
$meta['maxtoclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5));
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['maxseclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); // 0 for no sec edit buttons
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['camelcase'] = array('onoff','_caution' => 'warning');
|
|
|
|
$meta['deaccent'] = array('multichoice','_choices' => array(0,1,2),'_caution' => 'warning');
|
2008-11-19 15:07:58 +01:00
|
|
|
$meta['useheading'] = array('multichoice','_choices' => array(0,'navigation','content',1));
|
2012-04-15 14:57:20 +02:00
|
|
|
$meta['sneaky_index'] = array('onoff');
|
2013-02-18 16:51:06 +01:00
|
|
|
$meta['hidepages'] = array('regex');
|
2006-01-25 01:15:46 +01:00
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_authentication'] = array('fieldset');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['useacl'] = array('onoff','_caution' => 'danger');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['autopasswd'] = array('onoff');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['authtype'] = array('authtype','_caution' => 'danger');
|
2016-03-11 13:55:08 +01:00
|
|
|
$meta['passcrypt'] = array('multichoice','_choices' => array(
|
|
|
|
'smd5','md5','apr1','sha1','ssha','lsmd5','crypt','mysql','my411','kmd5','pmd5','hmd5',
|
2020-01-15 19:18:57 +01:00
|
|
|
'mediawiki','bcrypt','djangomd5','djangosha1','djangopbkdf2_sha1','djangopbkdf2_sha256',
|
|
|
|
'sha512','argon2i','argon2id'
|
2016-03-11 13:55:08 +01:00
|
|
|
));
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['defaultgroup']= array('string');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['superuser'] = array('string','_caution' => 'danger');
|
2006-12-03 14:41:04 +01:00
|
|
|
$meta['manager'] = array('string');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['profileconfirm'] = array('onoff');
|
2008-10-14 20:56:11 +02:00
|
|
|
$meta['rememberme'] = array('onoff');
|
2018-04-27 19:07:43 +02:00
|
|
|
$meta['disableactions'] = array(
|
|
|
|
'disableactions',
|
|
|
|
'_choices' => array(
|
|
|
|
'backlink',
|
|
|
|
'index',
|
|
|
|
'recent',
|
|
|
|
'revisions',
|
|
|
|
'search',
|
|
|
|
'subscription',
|
|
|
|
'register',
|
|
|
|
'resendpwd',
|
|
|
|
'profile',
|
|
|
|
'profile_delete',
|
|
|
|
'edit',
|
|
|
|
'wikicode',
|
|
|
|
'check',
|
|
|
|
'rss'
|
|
|
|
),
|
|
|
|
'_combine' => array(
|
|
|
|
'subscription' => array('subscribe', 'unsubscribe'),
|
|
|
|
'wikicode' => array('source', 'export_raw')
|
|
|
|
)
|
|
|
|
);
|
2007-05-28 21:47:47 +02:00
|
|
|
$meta['auth_security_timeout'] = array('numeric');
|
2008-09-13 00:49:22 +02:00
|
|
|
$meta['securecookie'] = array('onoff');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['remote'] = array('onoff','_caution' => 'security');
|
2012-01-08 14:38:52 +01:00
|
|
|
$meta['remoteuser'] = array('string');
|
2006-01-25 01:15:46 +01:00
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_anti_spam'] = array('fieldset');
|
|
|
|
$meta['usewordblock']= array('onoff');
|
|
|
|
$meta['relnofollow'] = array('onoff');
|
|
|
|
$meta['indexdelay'] = array('numeric');
|
|
|
|
$meta['mailguard'] = array('multichoice','_choices' => array('visible','hex','none'));
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['iexssprotect']= array('onoff','_caution' => 'security');
|
2006-05-10 08:57:32 +02:00
|
|
|
|
|
|
|
$meta['_editing'] = array('fieldset');
|
|
|
|
$meta['usedraft'] = array('onoff');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['htmlok'] = array('onoff','_caution' => 'security');
|
|
|
|
$meta['phpok'] = array('onoff','_caution' => 'security');
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['locktime'] = array('numeric');
|
|
|
|
$meta['cachetime'] = array('numeric');
|
|
|
|
|
|
|
|
$meta['_links'] = array('fieldset');
|
|
|
|
$meta['target____wiki'] = array('string');
|
|
|
|
$meta['target____interwiki'] = array('string');
|
|
|
|
$meta['target____extern'] = array('string');
|
|
|
|
$meta['target____media'] = array('string');
|
|
|
|
$meta['target____windows'] = array('string');
|
|
|
|
|
2006-05-16 08:23:21 +02:00
|
|
|
$meta['_media'] = array('fieldset');
|
2011-11-27 11:37:26 +01:00
|
|
|
$meta['mediarevisions'] = array('onoff');
|
2006-05-16 08:23:21 +02:00
|
|
|
$meta['gdlib'] = array('multichoice','_choices' => array(0,1,2));
|
|
|
|
$meta['im_convert'] = array('im_convert');
|
|
|
|
$meta['jpg_quality'] = array('numeric','_pattern' => '/^100$|^[1-9]?[0-9]$/'); //(0-100)
|
2006-06-16 14:45:39 +02:00
|
|
|
$meta['fetchsize'] = array('numeric');
|
2012-04-15 14:57:20 +02:00
|
|
|
$meta['refcheck'] = array('onoff');
|
|
|
|
|
|
|
|
$meta['_notifications'] = array('fieldset');
|
|
|
|
$meta['subscribers'] = array('onoff');
|
|
|
|
$meta['subscribe_time'] = array('numeric');
|
|
|
|
$meta['notify'] = array('email', '_multiple' => true);
|
2013-02-16 14:37:12 +01:00
|
|
|
$meta['registernotify'] = array('email', '_multiple' => true);
|
|
|
|
$meta['mailfrom'] = array('email', '_placeholders' => true);
|
2017-10-28 22:24:54 +02:00
|
|
|
$meta['mailreturnpath'] = array('email', '_placeholders' => true);
|
2012-04-15 14:57:20 +02:00
|
|
|
$meta['mailprefix'] = array('string');
|
2012-04-15 15:21:04 +02:00
|
|
|
$meta['htmlmail'] = array('onoff');
|
2020-08-13 20:28:52 +02:00
|
|
|
$meta['dontlog'] = array(
|
|
|
|
'disableactions',
|
|
|
|
'_choices' => array(
|
|
|
|
'error',
|
|
|
|
'debug',
|
|
|
|
'deprecated',
|
|
|
|
),
|
|
|
|
);
|
2012-04-15 14:57:20 +02:00
|
|
|
|
|
|
|
$meta['_syndication'] = array('fieldset');
|
|
|
|
$meta['sitemap'] = array('numeric');
|
|
|
|
$meta['rss_type'] = array('multichoice','_choices' => array('rss','rss1','rss2','atom','atom1'));
|
|
|
|
$meta['rss_linkto'] = array('multichoice','_choices' => array('diff','page','rev','current'));
|
|
|
|
$meta['rss_content'] = array('multichoice','_choices' => array('abstract','diff','htmldiff','html'));
|
|
|
|
$meta['rss_media'] = array('multichoice','_choices' => array('both','pages','media'));
|
|
|
|
$meta['rss_update'] = array('numeric');
|
|
|
|
$meta['rss_show_summary'] = array('onoff');
|
2017-09-22 00:40:56 +02:00
|
|
|
$meta['rss_show_deleted'] = array('onoff');
|
2006-05-16 08:23:21 +02:00
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_advanced'] = array('fieldset');
|
2006-09-16 23:02:29 +02:00
|
|
|
$meta['updatecheck'] = array('onoff');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['userewrite'] = array('multichoice','_choices' => array(0,1,2),'_caution' => 'danger');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['useslash'] = array('onoff');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['sepchar'] = array('sepchar','_caution' => 'warning');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['canonical'] = array('onoff');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['fnencode'] = array('multichoice','_choices' => array('url','safe','utf-8'),'_caution' => 'warning');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['autoplural'] = array('onoff');
|
|
|
|
$meta['compress'] = array('onoff');
|
2011-06-18 10:16:47 +02:00
|
|
|
$meta['cssdatauri'] = array('numeric','_pattern' => '/^\d+$/');
|
2006-05-16 10:41:32 +02:00
|
|
|
$meta['gzip_output'] = array('onoff');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['send404'] = array('onoff');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['compression'] = array('compression','_caution' => 'warning');
|
2007-02-08 20:51:45 +01:00
|
|
|
$meta['broken_iua'] = array('onoff');
|
2013-02-18 18:51:45 +01:00
|
|
|
$meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3),'_caution' => 'warning');
|
|
|
|
$meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml'),'_caution' => 'warning');
|
2010-03-23 22:50:41 +01:00
|
|
|
$meta['readdircache'] = array('numeric');
|
2018-04-11 14:39:04 +02:00
|
|
|
$meta['search_nslimit'] = array('numeric', '_min' => 0);
|
|
|
|
$meta['search_fragment'] = array('multichoice','_choices' => array('exact', 'starts_with', 'ends_with', 'contains'),);
|
2019-10-21 02:31:40 +02:00
|
|
|
$meta['trustedproxy'] = array('regex');
|
2006-01-25 01:15:46 +01:00
|
|
|
|
2020-01-26 19:37:26 +01:00
|
|
|
$meta['_feature_flags'] = ['fieldset'];
|
|
|
|
$meta['defer_js'] = ['onoff'];
|
|
|
|
|
2006-05-10 08:57:32 +02:00
|
|
|
$meta['_network'] = array('fieldset');
|
2012-04-23 12:24:08 +02:00
|
|
|
$meta['dnslookups'] = array('onoff');
|
2016-12-21 16:14:48 +01:00
|
|
|
$meta['jquerycdn'] = array('multichoice', '_choices' => array(0,'jquery', 'cdnjs'));
|
2007-05-13 11:03:09 +02:00
|
|
|
$meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i');
|
|
|
|
$meta['proxy____port'] = array('numericopt');
|
2006-03-04 22:34:57 +01:00
|
|
|
$meta['proxy____user'] = array('string');
|
2009-01-19 17:48:09 +01:00
|
|
|
$meta['proxy____pass'] = array('password','_code' => 'base64');
|
2006-01-25 01:15:46 +01:00
|
|
|
$meta['proxy____ssl'] = array('onoff');
|
2010-06-26 20:42:48 +02:00
|
|
|
$meta['proxy____except'] = array('string');
|