diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/HTTPClient.php | 11 | ||||
-rw-r--r-- | inc/html.php | 2 | ||||
-rw-r--r-- | inc/lang/de/lang.php | 2 | ||||
-rw-r--r-- | inc/lang/en/lang.php | 2 | ||||
-rw-r--r-- | inc/parser/parser.php | 4 | ||||
-rw-r--r-- | inc/plugin.php | 6 | ||||
-rw-r--r-- | inc/template.php | 20 |
7 files changed, 34 insertions, 13 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 0d7b80cf8..224b32982 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -808,8 +808,15 @@ class HTTPClient { function _postEncode($data){ $url = ''; foreach($data as $key => $val){ - if($url) $url .= '&'; - $url .= urlencode($key).'='.urlencode($val); + if (is_array($val)) { + foreach ($val as $k => $v) { + if($url) $url .= '&'; + $url .= urlencode($key).'['.$k.']='.urlencode($v); + } + } else { + if($url) $url .= '&'; + $url .= urlencode($key).'='.urlencode($val); + } } return $url; } diff --git a/inc/html.php b/inc/html.php index 53f4c45ff..1bd1a74e4 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1492,7 +1492,7 @@ function html_edit(){ echo 'textChanged = ' . ($mod ? 'true' : 'false'); echo '/*!]]>*/</script>' . NL; } ?> - <div class="editBox"> + <div class="editBox" role="application"> <div class="toolbar group"> <div id="draft__status"><?php if(!empty($INFO['draft'])) echo $lang['draftdate'].' '.dformat();?></div> diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index af6f32bf4..aa0a3d3b2 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -235,7 +235,7 @@ $lang['qb_extlink'] = 'Externer Link'; $lang['qb_hr'] = 'Horizontale Linie'; $lang['qb_ol'] = 'Nummerierter Listenpunkt'; $lang['qb_ul'] = 'Listenpunkt'; -$lang['qb_media'] = 'Bilder und andere Dateien hinzufügen'; +$lang['qb_media'] = 'Bilder und andere Dateien hinzufügen (öffnet sich in einem neuen Fenster)'; $lang['qb_sig'] = 'Unterschrift einfügen'; $lang['qb_smileys'] = 'Smileys'; $lang['qb_chars'] = 'Sonderzeichen'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index cdad6c9a6..00e71d254 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -234,7 +234,7 @@ $lang['qb_extlink'] = 'External Link'; $lang['qb_hr'] = 'Horizontal Rule'; $lang['qb_ol'] = 'Ordered List Item'; $lang['qb_ul'] = 'Unordered List Item'; -$lang['qb_media'] = 'Add Images and other files'; +$lang['qb_media'] = 'Add Images and other files (opens in a new window)'; $lang['qb_sig'] = 'Insert Signature'; $lang['qb_smileys'] = 'Smileys'; $lang['qb_chars'] = 'Special Chars'; diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 6aef3fda5..4af1cd333 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -555,7 +555,7 @@ class Doku_Parser_Mode_preformatted extends Doku_Parser_Mode { class Doku_Parser_Mode_code extends Doku_Parser_Mode { function connectTo($mode) { - $this->Lexer->addEntryPattern('<code(?=.*</code>)',$mode,'code'); + $this->Lexer->addEntryPattern('<code\b(?=.*</code>)',$mode,'code'); } function postConnect() { @@ -571,7 +571,7 @@ class Doku_Parser_Mode_code extends Doku_Parser_Mode { class Doku_Parser_Mode_file extends Doku_Parser_Mode { function connectTo($mode) { - $this->Lexer->addEntryPattern('<file(?=.*</file>)',$mode,'file'); + $this->Lexer->addEntryPattern('<file\b(?=.*</file>)',$mode,'file'); } function postConnect() { diff --git a/inc/plugin.php b/inc/plugin.php index 4d3d45f62..422b82534 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -199,11 +199,7 @@ class DokuWiki_Plugin { * @return object helper plugin object */ function loadHelper($name, $msg = true){ - if (!plugin_isdisabled($name)){ - $obj = plugin_load('helper',$name); - }else{ - $obj = null; - } + $obj = plugin_load('helper',$name); if (is_null($obj) && $msg) msg("Helper plugin $name is not available or invalid.",-1); return $obj; } diff --git a/inc/template.php b/inc/template.php index b8129f914..66cbbe471 100644 --- a/inc/template.php +++ b/inc/template.php @@ -764,7 +764,7 @@ function tpl_searchform($ajax = true, $autocomplete = true) { // don't print the search form if search action has been disabled if(!actionOK('search')) return false; - print '<form action="'.wl().'" accept-charset="utf-8" class="search" id="dw__search" method="get"><div class="no">'; + print '<form action="'.wl().'" accept-charset="utf-8" class="search" id="dw__search" method="get" role="search"><div class="no">'; print '<input type="hidden" name="do" value="search" />'; print '<input type="text" '; if($ACT == 'search') print 'value="'.htmlspecialchars($QUERY).'" '; @@ -1746,5 +1746,23 @@ function tpl_media() { echo '</div>'.NL; } +/** + * Return useful layout classes + * + * @author Anika Henke <anika@selfthinker.org> + */ +function tpl_classes() { + global $ACT, $conf, $ID, $INFO; + $classes = array( + 'dokuwiki', + 'mode_'.$ACT, + 'tpl_'.$conf['template'], + $_SERVER['REMOTE_USER'] ? 'loggedIn' : '', + $INFO['exists'] ? '' : 'notFound', + ($ID == $conf['start']) ? 'home' : '', + ); + return join(' ', $classes); +} + //Setup VIM: ex: et ts=4 : |