diff options
-rw-r--r-- | inc/confutils.php | 53 | ||||
-rw-r--r-- | inc/lang/de/lang.php | 2 | ||||
-rw-r--r-- | lib/plugins/authmysql/lang/de/lang.php | 8 | ||||
-rw-r--r-- | lib/plugins/extension/_test/extension.test.php | 2 | ||||
-rw-r--r-- | lib/plugins/extension/lang/de/lang.php | 4 |
5 files changed, 59 insertions, 10 deletions
diff --git a/inc/confutils.php b/inc/confutils.php index 8643a056c..4035d6dd4 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -6,6 +6,12 @@ * @author Harry Fuecks <hfuecks@gmail.com> */ +/* + * line prefix used to negate single value config items + * (scheme.conf & stopwords.conf), e.g. + * !gopher + */ +const DOKU_CONF_NEGATION = '!'; /** * Returns the (known) extension and mimetype of a given filename @@ -49,6 +55,7 @@ function getMimeTypes() { static $mime = null; if ( !$mime ) { $mime = retrieveConfig('mime','confToHash'); + $mime = array_filter($mime); } return $mime; } @@ -62,6 +69,7 @@ function getAcronyms() { static $acronyms = null; if ( !$acronyms ) { $acronyms = retrieveConfig('acronyms','confToHash'); + $acronyms = array_filter($acronyms, 'strlen'); } return $acronyms; } @@ -75,6 +83,7 @@ function getSmileys() { static $smileys = null; if ( !$smileys ) { $smileys = retrieveConfig('smileys','confToHash'); + $smileys = array_filter($smileys, 'strlen'); } return $smileys; } @@ -88,6 +97,7 @@ function getEntities() { static $entities = null; if ( !$entities ) { $entities = retrieveConfig('entities','confToHash'); + $entities = array_filter($entities, 'strlen'); } return $entities; } @@ -101,9 +111,11 @@ function getInterwiki() { static $wikis = null; if ( !$wikis ) { $wikis = retrieveConfig('interwiki','confToHash',array(true)); + $wikis = array_filter($wikis, 'strlen'); + + //add sepecial case 'this' + $wikis['this'] = DOKU_URL.'{NAME}'; } - //add sepecial case 'this' - $wikis['this'] = DOKU_URL.'{NAME}'; return $wikis; } @@ -114,7 +126,7 @@ function getInterwiki() { function getWordblocks() { static $wordblocks = null; if ( !$wordblocks ) { - $wordblocks = retrieveConfig('wordblock','file'); + $wordblocks = retrieveConfig('wordblock','file',null,'array_merge_with_removal'); } return $wordblocks; } @@ -127,11 +139,11 @@ function getWordblocks() { function getSchemes() { static $schemes = null; if ( !$schemes ) { - $schemes = retrieveConfig('scheme','file'); + $schemes = retrieveConfig('scheme','file',null,'array_merge_with_removal'); + $schemes = array_map('trim', $schemes); + $schemes = preg_replace('/^#.*/', '', $schemes); + $schemes = array_filter($schemes); } - $schemes = array_map('trim', $schemes); - $schemes = preg_replace('/^#.*/', '', $schemes); - $schemes = array_filter($schemes); return $schemes; } @@ -196,7 +208,7 @@ function confToHash($file,$lower=false) { * @param array $params optional additional params to pass to the callback * @return array configuration values */ -function retrieveConfig($type,$fn,$params=null) { +function retrieveConfig($type,$fn,$params=null,$combine='array_merge') { global $config_cascade; if(!is_array($params)) $params = array(); @@ -208,7 +220,7 @@ function retrieveConfig($type,$fn,$params=null) { foreach ($config_cascade[$type][$config_group] as $file) { if (file_exists($file)) { $config = call_user_func_array($fn,array_merge(array($file),$params)); - $combined = array_merge($combined, $config); + $combined = $combine($combined, $config); } } } @@ -347,4 +359,27 @@ function conf_decodeString($str) { return $str; } } + +/** + * array combination function to remove negated values (prefixed by !) + * + * @param array $current + * @param array $new + * + * @return array the combined array, numeric keys reset + */ +function array_merge_with_removal($current, $new) { + foreach ($new as $val) { + if (substr($val,0,1) == DOKU_CONF_NEGATION) { + $idx = array_search(trim(substr($val,1)),$current); + if ($idx !== false) { + unset($current[$idx]); + } + } else { + $current[] = trim($val); + } + } + + return array_slice($current,0); +} //Setup VIM: ex: et ts=4 : diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 7dd95eddd..f435a31bf 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -350,10 +350,10 @@ $lang['media_perm_read'] = 'Sie besitzen nicht die notwendigen Berechtigun $lang['media_perm_upload'] = 'Sie besitzen nicht die notwendigen Berechtigungen um Dateien hochzuladen.'; $lang['media_update'] = 'Neue Version hochladen'; $lang['media_restore'] = 'Diese Version wiederherstellen'; +$lang['media_acl_warning'] = 'Diese Liste ist möglicherweise nicht vollständig. Versteckte und durch ACL gesperrte Seiten werden nicht angezeigt.'; $lang['currentns'] = 'Aktueller Namensraum'; $lang['searchresult'] = 'Suchergebnisse'; $lang['plainhtml'] = 'HTML Klartext'; $lang['wikimarkup'] = 'Wiki Markup'; $lang['page_nonexist_rev'] = 'DIe Seite exitiert nicht unter %s. Sie wurde aber unter <a herf="%s">%s</a>'; $lang['unable_to_parse_date'] = 'Parameter "%s" kann nicht geparsed werden.'; -$lang['media_acl_warning'] = 'Diese Liste ist möglicherweise nicht vollständig. Versteckte und durch ACL gesperrte Seiten werden nicht angezeigt.'; diff --git a/lib/plugins/authmysql/lang/de/lang.php b/lib/plugins/authmysql/lang/de/lang.php new file mode 100644 index 000000000..6160f60ea --- /dev/null +++ b/lib/plugins/authmysql/lang/de/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Noel Tilliot <noeltilliot@byom.de> + */ +$lang['usernotexists'] = 'Sorry, dieser Nutzer existiert nicht.'; diff --git a/lib/plugins/extension/_test/extension.test.php b/lib/plugins/extension/_test/extension.test.php index 453b95e79..d4f13201d 100644 --- a/lib/plugins/extension/_test/extension.test.php +++ b/lib/plugins/extension/_test/extension.test.php @@ -14,7 +14,9 @@ class mock_helper_plugin_extension_extension extends helper_plugin_extension_ext /** * @group plugin_extension + * @group admin_plugins * @group plugins + * @group bundled_plugins */ class helper_plugin_extension_extension_test extends DokuWikiTest { diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php index ce5495e24..ef3197513 100644 --- a/lib/plugins/extension/lang/de/lang.php +++ b/lib/plugins/extension/lang/de/lang.php @@ -8,6 +8,7 @@ * @author Simon <st103267@stud.uni-stuttgart.de> * @author Hoisl <hoisl@gmx.at> * @author Dominik Mahr <drache.mahr@gmx.de> + * @author Noel Tilliot <noeltilliot@byom.de> */ $lang['menu'] = 'Erweiterungen verwalten'; $lang['tab_plugins'] = 'Installierte Plugins'; @@ -29,6 +30,9 @@ $lang['btn_disable'] = 'Deaktivieren'; $lang['btn_install'] = 'Installieren'; $lang['btn_reinstall'] = 'Neu installieren'; $lang['js']['reallydel'] = 'Wollen Sie diese Erweiterung wirklich löschen?'; +$lang['js']['display_viewoptions'] = 'Optionen anzeigen'; +$lang['js']['display_enabled'] = 'aktiviert'; +$lang['js']['display_disabled'] = 'deaktiviert'; $lang['search_for'] = 'Erweiterung suchen:'; $lang['search'] = 'Suchen'; $lang['extensionby'] = '<strong>%s</strong> von %s'; |