diff options
Diffstat (limited to 'lib')
607 files changed, 9416 insertions, 12433 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index 40eaf99a6..2ea2c0963 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -6,7 +6,10 @@ * @author Andreas Gohr <andi@splitbrain.org> */ -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); +use dokuwiki\Cache\Cache; +use dokuwiki\Extension\Event; + +if(!defined('DOKU_INC')) define('DOKU_INC', __DIR__ .'/../../'); if(!defined('NOSESSION')) define('NOSESSION',true); // we do not use a session or authentication here (better caching) if(!defined('DOKU_DISABLE_GZIP_OUTPUT')) define('DOKU_DISABLE_GZIP_OUTPUT',1); // we gzip ourself here if(!defined('NL')) define('NL',"\n"); @@ -45,8 +48,8 @@ function css_out(){ if(!$tpl) $tpl = $conf['template']; // load style.ini - $styleUtil = new \dokuwiki\StyleUtils(); - $styleini = $styleUtil->cssStyleini($tpl, $INPUT->bool('preview')); + $styleUtil = new \dokuwiki\StyleUtils($tpl, $INPUT->bool('preview')); + $styleini = $styleUtil->cssStyleini(); // cache influencers $tplinc = tpl_incdir($tpl); @@ -67,7 +70,8 @@ function css_out(){ // load jQuery-UI theme if ($mediatype == 'screen') { - $files[DOKU_INC.'lib/scripts/jquery/jquery-ui-theme/smoothness.css'] = DOKU_BASE.'lib/scripts/jquery/jquery-ui-theme/'; + $files[DOKU_INC.'lib/scripts/jquery/jquery-ui-theme/smoothness.css'] = + DOKU_BASE.'lib/scripts/jquery/jquery-ui-theme/'; } // load plugin styles $files = array_merge($files, css_pluginstyles($mediatype)); @@ -76,7 +80,7 @@ function css_out(){ $files = array_merge($files, $styleini['stylesheets'][$mediatype]); } // load user styles - if(!empty($config_cascade['userstyle'][$mediatype])) { + if(is_array($config_cascade['userstyle'][$mediatype])) { foreach($config_cascade['userstyle'][$mediatype] as $userstyle) { $files[$userstyle] = DOKU_BASE; } @@ -84,7 +88,7 @@ function css_out(){ // Let plugins decide to either put more styles here or to remove some $media_files[$mediatype] = css_filewrapper($mediatype, $files); - $CSSEvt = new Doku_Event('CSS_STYLES_INCLUDED', $media_files[$mediatype]); + $CSSEvt = new Event('CSS_STYLES_INCLUDED', $media_files[$mediatype]); // Make it preventable. if ( $CSSEvt->advise_before() ) { @@ -99,8 +103,17 @@ function css_out(){ } // The generated script depends on some dynamic options - $cache = new cache('styles'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].$INPUT->bool('preview').DOKU_BASE.$tpl.$type,'.css'); - $cache->_event = 'CSS_CACHE_USE'; + $cache = new Cache( + 'styles' . + $_SERVER['HTTP_HOST'] . + $_SERVER['SERVER_PORT'] . + $INPUT->bool('preview') . + DOKU_BASE . + $tpl . + $type, + '.css' + ); + $cache->setEvent('CSS_CACHE_USE'); // check cache age & handle conditional request // This may exit if a cache can be used @@ -114,7 +127,7 @@ function css_out(){ // plugins decide whether to include the DW default styles. // This can be done by preventing the Default. $media_files['DW_DEFAULT'] = css_filewrapper('DW_DEFAULT'); - trigger_event('CSS_STYLES_INCLUDED', $media_files['DW_DEFAULT'], 'css_defaultstyles'); + Event::createAndTrigger('CSS_STYLES_INCLUDED', $media_files['DW_DEFAULT'], 'css_defaultstyles'); // build the stylesheet foreach ($mediatypes as $mediatype) { @@ -454,18 +467,13 @@ class DokuCssFile { */ public function replacements($match) { - // not a relative url? - no adjustment required - if (preg_match('#^(/|data:|https?://)#',$match[3])) { + if (preg_match('#^(/|data:|https?://)#', $match[3])) { // not a relative url? - no adjustment required return $match[0]; - } - // a less file import? - requires a file system location - else if (substr($match[3],-5) == '.less') { - if ($match[3]{0} != '/') { + } elseif (substr($match[3], -5) == '.less') { // a less file import? - requires a file system location + if ($match[3][0] != '/') { $match[3] = $this->getRelativePath() . '/' . $match[3]; } - } - // everything else requires a url adjustment - else { + } else { // everything else requires a url adjustment $match[3] = $this->location . $match[3]; } @@ -535,10 +543,20 @@ function css_pluginstyles($mediatype='screen'){ * @return string */ function css_compress($css){ - //strip comments through a callback + // replace quoted strings with placeholder + $quote_storage = []; + + $quote_cb = function ($match) use (&$quote_storage) { + $quote_storage[] = $match[0]; + return '"STR'.(count($quote_storage)-1).'"'; + }; + + $css = preg_replace_callback('/(([\'"]).*?(?<!\\\\)\2)/', $quote_cb, $css); + + // strip comments through a callback $css = preg_replace_callback('#(/\*)(.*?)(\*/)#s','css_comment_cb',$css); - //strip (incorrect but common) one line comments + // strip (incorrect but common) one line comments $css = preg_replace_callback('/^.*\/\/.*$/m','css_onelinecomment_cb',$css); // strip whitespaces @@ -547,18 +565,58 @@ function css_compress($css){ $css = preg_replace('/ ?: /',':',$css); // number compression - $css = preg_replace('/([: ])0+(\.\d+?)0*((?:pt|pc|in|mm|cm|em|ex|px)\b|%)(?=[^\{]*[;\}])/', '$1$2$3', $css); // "0.1em" to ".1em", "1.10em" to "1.1em" - $css = preg_replace('/([: ])\.(0)+((?:pt|pc|in|mm|cm|em|ex|px)\b|%)(?=[^\{]*[;\}])/', '$1$2', $css); // ".0em" to "0" - $css = preg_replace('/([: ]0)0*(\.0*)?((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', '$1', $css); // "0.0em" to "0" - $css = preg_replace('/([: ]\d+)(\.0*)((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', '$1$3', $css); // "1.0em" to "1em" - $css = preg_replace('/([: ])0+(\d+|\d*\.\d+)((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', '$1$2$3', $css); // "001em" to "1em" + $css = preg_replace( + '/([: ])0+(\.\d+?)0*((?:pt|pc|in|mm|cm|em|ex|px)\b|%)(?=[^\{]*[;\}])/', + '$1$2$3', + $css + ); // "0.1em" to ".1em", "1.10em" to "1.1em" + $css = preg_replace( + '/([: ])\.(0)+((?:pt|pc|in|mm|cm|em|ex|px)\b|%)(?=[^\{]*[;\}])/', + '$1$2', + $css + ); // ".0em" to "0" + $css = preg_replace( + '/([: ]0)0*(\.0*)?((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', + '$1', + $css + ); // "0.0em" to "0" + $css = preg_replace( + '/([: ]\d+)(\.0*)((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', + '$1$3', + $css + ); // "1.0em" to "1em" + $css = preg_replace( + '/([: ])0+(\d+|\d*\.\d+)((?:pt|pc|in|mm|cm|em|ex|px)(?=[^\{]*[;\}])\b|%)/', + '$1$2$3', + $css + ); // "001em" to "1em" // shorten attributes (1em 1em 1em 1em -> 1em) - $css = preg_replace('/(?<![\w\-])((?:margin|padding|border|border-(?:width|radius)):)([\w\.]+)( \2)+(?=[;\}]| !)/', '$1$2', $css); // "1em 1em 1em 1em" to "1em" - $css = preg_replace('/(?<![\w\-])((?:margin|padding|border|border-(?:width)):)([\w\.]+) ([\w\.]+) \2 \3(?=[;\}]| !)/', '$1$2 $3', $css); // "1em 2em 1em 2em" to "1em 2em" + $css = preg_replace( + '/(?<![\w\-])((?:margin|padding|border|border-(?:width|radius)):)([\w\.]+)( \2)+(?=[;\}]| !)/', + '$1$2', + $css + ); // "1em 1em 1em 1em" to "1em" + $css = preg_replace( + '/(?<![\w\-])((?:margin|padding|border|border-(?:width)):)([\w\.]+) ([\w\.]+) \2 \3(?=[;\}]| !)/', + '$1$2 $3', + $css + ); // "1em 2em 1em 2em" to "1em 2em" // shorten colors - $css = preg_replace("/#([0-9a-fA-F]{1})\\1([0-9a-fA-F]{1})\\2([0-9a-fA-F]{1})\\3(?=[^\{]*[;\}])/", "#\\1\\2\\3", $css); + $css = preg_replace( + "/#([0-9a-fA-F]{1})\\1([0-9a-fA-F]{1})\\2([0-9a-fA-F]{1})\\3(?=[^\{]*[;\}])/", + "#\\1\\2\\3", + $css + ); + + // replace back protected strings + $quote_back_cb = function ($match) use (&$quote_storage) { + return $quote_storage[$match[1]]; + }; + + $css = preg_replace_callback('/"STR(\d+)"/', $quote_back_cb, $css); + $css = trim($css); return $css; } @@ -602,23 +660,6 @@ function css_onelinecomment_cb($matches) { break; } - // keep any quoted string that starts before a comment - $nextsqt = strpos($line, "'", $i); - $nextdqt = strpos($line, '"', $i); - if(min($nextsqt, $nextdqt) < $nextcom) { - $skipto = false; - if($nextsqt !== false && ($nextdqt === false || $nextsqt < $nextdqt)) { - $skipto = strpos($line, "'", $nextsqt+1) +1; - } else if ($nextdqt !== false) { - $skipto = strpos($line, '"', $nextdqt+1) +1; - } - - if($skipto !== false) { - $i = $skipto; - continue; - } - } - if($nexturl === false || $nextcom < $nexturl) { // no url anymore, strip comment and be done $i = $nextcom; diff --git a/lib/exe/detail.php b/lib/exe/detail.php index ec1a9b874..a6cffa770 100644 --- a/lib/exe/detail.php +++ b/lib/exe/detail.php @@ -1,4 +1,7 @@ <?php + +use dokuwiki\Extension\Event; + if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); define('DOKU_MEDIADETAIL',1); require_once(DOKU_INC.'inc/init.php'); @@ -12,31 +15,17 @@ $REV = $INPUT->int('rev'); $INFO = array_merge(pageinfo(),mediainfo()); $tmp = array(); -trigger_event('DETAIL_STARTED', $tmp); +Event::createAndTrigger('DETAIL_STARTED', $tmp); //close session session_write_close(); -if($conf['allowdebug'] && $INPUT->has('debug')){ - print '<pre>'; - foreach(explode(' ','basedir userewrite baseurl useslash') as $x){ - print '$'."conf['$x'] = '".$conf[$x]."';\n"; - } - foreach(explode(' ','DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '. - 'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x){ - print '$'."_SERVER['$x'] = '".$_SERVER[$x]."';\n"; - } - print "getID('media'): ".getID('media')."\n"; - print "getID('media',false): ".getID('media',false)."\n"; - print '</pre>'; -} - $ERROR = false; // check image permissions $AUTH = auth_quickaclcheck($IMG); if($AUTH >= AUTH_READ){ // check if image exists - $SRC = mediaFN($IMG,$REV); + $SRC = mediaFN($IMG,$REV); if(!file_exists($SRC)){ //doesn't exist! http_status(404); diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 933367e35..5c5ae899b 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -6,6 +6,8 @@ * @author Andreas Gohr <andi@splitbrain.org> */ +use dokuwiki\Extension\Event; + if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/../../'); if (!defined('DOKU_DISABLE_GZIP_OUTPUT')) define('DOKU_DISABLE_GZIP_OUTPUT', 1); require_once(DOKU_INC.'inc/init.php'); @@ -14,7 +16,7 @@ session_write_close(); //close session require_once(DOKU_INC.'inc/fetch.functions.php'); if (defined('SIMPLE_TEST')) { - $INPUT = new Input(); + $INPUT = new \dokuwiki\Input\Input(); } // BEGIN main @@ -56,7 +58,7 @@ if (defined('SIMPLE_TEST')) { ); // handle the file status - $evt = new Doku_Event('FETCH_MEDIA_STATUS', $data); + $evt = new Event('FETCH_MEDIA_STATUS', $data); if($evt->advise_before()) { // redirects if($data['status'] > 300 && $data['status'] <= 304) { @@ -87,7 +89,7 @@ if (defined('SIMPLE_TEST')) { } // finally send the file to the client - $evt = new Doku_Event('MEDIA_SENDFILE', $data); + $evt = new Event('MEDIA_SENDFILE', $data); if($evt->advise_before()) { sendFile($data['file'], $data['mime'], $data['download'], $data['cache'], $data['ispublic'], $data['orig']); } diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php deleted file mode 100644 index 4f60f1666..000000000 --- a/lib/exe/indexer.php +++ /dev/null @@ -1,209 +0,0 @@ -<?php -/** - * DokuWiki indexer - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Andreas Gohr <andi@splitbrain.org> - */ -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); -define('DOKU_DISABLE_GZIP_OUTPUT',1); -require_once(DOKU_INC.'inc/init.php'); -session_write_close(); //close session -if(!defined('NL')) define('NL',"\n"); - -// keep running after browser closes connection -@ignore_user_abort(true); - -// check if user abort worked, if yes send output early -$defer = !@ignore_user_abort() || $conf['broken_iua']; -$output = $INPUT->has('debug') && $conf['allowdebug']; -if(!$defer && !$output){ - sendGIF(); // send gif -} - -$ID = cleanID($INPUT->str('id')); - -// Catch any possible output (e.g. errors) -if(!$output) ob_start(); -else header('Content-Type: text/plain'); - -// run one of the jobs -$tmp = array(); // No event data -$evt = new Doku_Event('INDEXER_TASKS_RUN', $tmp); -if ($evt->advise_before()) { - runIndexer() or - runSitemapper() or - sendDigest() or - runTrimRecentChanges() or - runTrimRecentChanges(true) or - $evt->advise_after(); -} - -if(!$output) { - ob_end_clean(); - if($defer) sendGIF(); -} - -exit; - -// -------------------------------------------------------------------- - -/** - * Trims the recent changes cache (or imports the old changelog) as needed. - * - * @param bool $media_changes If the media changelog shall be trimmed instead of - * the page changelog - * @return bool - * - * @author Ben Coburn <btcoburn@silicodon.net> - */ -function runTrimRecentChanges($media_changes = false) { - global $conf; - - echo "runTrimRecentChanges($media_changes): started".NL; - - $fn = ($media_changes ? $conf['media_changelog'] : $conf['changelog']); - - // Trim the Recent Changes - // Trims the recent changes cache to the last $conf['changes_days'] recent - // changes or $conf['recent'] items, which ever is larger. - // The trimming is only done once a day. - if (file_exists($fn) && - (@filemtime($fn.'.trimmed')+86400)<time() && - !file_exists($fn.'_tmp')) { - @touch($fn.'.trimmed'); - io_lock($fn); - $lines = file($fn); - if (count($lines)<=$conf['recent']) { - // nothing to trim - io_unlock($fn); - echo "runTrimRecentChanges($media_changes): finished".NL; - return false; - } - - io_saveFile($fn.'_tmp', ''); // presave tmp as 2nd lock - $trim_time = time() - $conf['recent_days']*86400; - $out_lines = array(); - $old_lines = array(); - for ($i=0; $i<count($lines); $i++) { - $log = parseChangelogLine($lines[$i]); - if ($log === false) continue; // discard junk - if ($log['date'] < $trim_time) { - $old_lines[$log['date'].".$i"] = $lines[$i]; // keep old lines for now (append .$i to prevent key collisions) - } else { - $out_lines[$log['date'].".$i"] = $lines[$i]; // definitely keep these lines - } - } - - if (count($lines)==count($out_lines)) { - // nothing to trim - @unlink($fn.'_tmp'); - io_unlock($fn); - echo "runTrimRecentChanges($media_changes): finished".NL; - return false; - } - - // sort the final result, it shouldn't be necessary, - // however the extra robustness in making the changelog cache self-correcting is worth it - ksort($out_lines); - $extra = $conf['recent'] - count($out_lines); // do we need extra lines do bring us up to minimum - if ($extra > 0) { - ksort($old_lines); - $out_lines = array_merge(array_slice($old_lines,-$extra),$out_lines); - } - - // save trimmed changelog - io_saveFile($fn.'_tmp', implode('', $out_lines)); - @unlink($fn); - if (!rename($fn.'_tmp', $fn)) { - // rename failed so try another way... - io_unlock($fn); - io_saveFile($fn, implode('', $out_lines)); - @unlink($fn.'_tmp'); - } else { - io_unlock($fn); - } - echo "runTrimRecentChanges($media_changes): finished".NL; - return true; - } - - // nothing done - echo "runTrimRecentChanges($media_changes): finished".NL; - return false; -} - -/** - * Runs the indexer for the current page - * - * @author Andreas Gohr <andi@splitbrain.org> - */ -function runIndexer(){ - global $ID; - global $conf; - print "runIndexer(): started".NL; - - if(!$ID) return false; - - // do the work - return idx_addPage($ID, true); -} - -/** - * Builds a Google Sitemap of all public pages known to the indexer - * - * The map is placed in the root directory named sitemap.xml.gz - This - * file needs to be writable! - * - * @author Andreas Gohr - * @link https://www.google.com/webmasters/sitemaps/docs/en/about.html - */ -function runSitemapper(){ - print "runSitemapper(): started".NL; - $result = Sitemapper::generate() && Sitemapper::pingSearchEngines(); - print 'runSitemapper(): finished'.NL; - return $result; -} - -/** - * Send digest and list mails for all subscriptions which are in effect for the - * current page - * - * @author Adrian Lang <lang@cosmocode.de> - */ -function sendDigest() { - global $conf; - global $ID; - - echo 'sendDigest(): started'.NL; - if(!actionOK('subscribe')) { - echo 'sendDigest(): disabled'.NL; - return false; - } - $sub = new Subscription(); - $sent = $sub->send_bulk($ID); - - echo "sendDigest(): sent $sent mails".NL; - echo 'sendDigest(): finished'.NL; - return (bool) $sent; -} - -/** - * Just send a 1x1 pixel blank gif to the browser - * - * @author Andreas Gohr <andi@splitbrain.org> - * @author Harry Fuecks <fuecks@gmail.com> - */ -function sendGIF(){ - $img = base64_decode('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAEALAAAAAABAAEAAAIBTAA7'); - header('Content-Type: image/gif'); - header('Content-Length: '.strlen($img)); - header('Connection: Close'); - print $img; - tpl_flush(); - // Browser should drop connection after this - // Thinks it's got the whole image -} - -//Setup VIM: ex: et ts=4 : -// No trailing PHP closing tag - no output please! -// See Note at http://php.net/manual/en/language.basic-syntax.instruction-separation.php diff --git a/lib/exe/jquery.php b/lib/exe/jquery.php index f32aef7d3..b8638ecc0 100644 --- a/lib/exe/jquery.php +++ b/lib/exe/jquery.php @@ -1,5 +1,7 @@ <?php +use dokuwiki\Cache\Cache; + if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__) . '/../../'); if(!defined('NOSESSION')) define('NOSESSION', true); // we do not use a session or authentication here (better caching) if(!defined('NL')) define('NL', "\n"); @@ -19,11 +21,10 @@ jquery_out(); * uses cache or fills it */ function jquery_out() { - $cache = new cache('jquery', '.js'); + $cache = new Cache('jquery', '.js'); $files = array( DOKU_INC . 'lib/scripts/jquery/jquery.min.js', DOKU_INC . 'lib/scripts/jquery/jquery-ui.min.js', - DOKU_INC . 'lib/scripts/jquery/jquery-migrate.min.js', ); $cache_files = $files; $cache_files[] = __FILE__; diff --git a/lib/exe/js.php b/lib/exe/js.php index 7b76efabb..04abec6c0 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -6,7 +6,10 @@ * @author Andreas Gohr <andi@splitbrain.org> */ -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); +use dokuwiki\Cache\Cache; +use dokuwiki\Extension\Event; + +if(!defined('DOKU_INC')) define('DOKU_INC', __DIR__ .'/../../'); if(!defined('NOSESSION')) define('NOSESSION',true); // we do not use a session or authentication here (better caching) if(!defined('NL')) define('NL',"\n"); if(!defined('DOKU_DISABLE_GZIP_OUTPUT')) define('DOKU_DISABLE_GZIP_OUTPUT',1); // we gzip ourself here @@ -66,18 +69,18 @@ function js_out(){ // add possible plugin scripts and userscript $files = array_merge($files,js_pluginscripts()); - if(!empty($config_cascade['userscript']['default'])) { + if(is_array($config_cascade['userscript']['default'])) { foreach($config_cascade['userscript']['default'] as $userscript) { $files[] = $userscript; } } // Let plugins decide to either put more scripts here or to remove some - trigger_event('JS_SCRIPT_LIST', $files); + Event::createAndTrigger('JS_SCRIPT_LIST', $files); // The generated script depends on some dynamic options - $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].md5(serialize($files)),'.js'); - $cache->_event = 'JS_CACHE_USE'; + $cache = new Cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].md5(serialize($files)),'.js'); + $cache->setEvent('JS_CACHE_USE'); $cache_files = array_merge($files, getConfigFiles('main')); $cache_files[] = __FILE__; @@ -90,18 +93,21 @@ function js_out(){ // start output buffering and build the script ob_start(); - $json = new JSON(); // add some global variables print "var DOKU_BASE = '".DOKU_BASE."';"; print "var DOKU_TPL = '".tpl_basedir($tpl)."';"; - print "var DOKU_COOKIE_PARAM = " . $json->encode( + print "var DOKU_COOKIE_PARAM = " . json_encode( array( 'path' => empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'], 'secure' => $conf['securecookie'] && is_ssl() )).";"; // FIXME: Move those to JSINFO - print "Object.defineProperty(window, 'DOKU_UHN', { get: function() { console.warn('Using DOKU_UHN is deprecated. Please use JSINFO.useHeadingNavigation instead'); return JSINFO.useHeadingNavigation; } });"; - print "Object.defineProperty(window, 'DOKU_UHC', { get: function() { console.warn('Using DOKU_UHC is deprecated. Please use JSINFO.useHeadingContent instead'); return JSINFO.useHeadingContent; } });"; + print "Object.defineProperty(window, 'DOKU_UHN', { get: function() {". + "console.warn('Using DOKU_UHN is deprecated. Please use JSINFO.useHeadingNavigation instead');". + "return JSINFO.useHeadingNavigation; } });"; + print "Object.defineProperty(window, 'DOKU_UHC', { get: function() {". + "console.warn('Using DOKU_UHC is deprecated. Please use JSINFO.useHeadingContent instead');". + "return JSINFO.useHeadingContent; } });"; // load JS specific translations $lang['js']['plugins'] = js_pluginstrings(); @@ -109,7 +115,7 @@ function js_out(){ if(!empty($templatestrings)) { $lang['js']['template'] = $templatestrings; } - echo 'LANG = '.$json->encode($lang['js']).";\n"; + echo 'LANG = '.json_encode($lang['js']).";\n"; // load toolbar toolbar_JSdefines('toolbar'); @@ -170,7 +176,7 @@ function js_load($file){ // is it a include_once? if($match[1]){ - $base = utf8_basename($ifile); + $base = \dokuwiki\Utf8\PhpString::basename($ifile); if(array_key_exists($base, $loaded) && $loaded[$base] === true){ $data = str_replace($match[0], '' ,$data); continue; @@ -178,7 +184,7 @@ function js_load($file){ $loaded[$base] = true; } - if($ifile{0} != '/') $ifile = dirname($file).'/'.$ifile; + if($ifile[0] != '/') $ifile = dirname($file).'/'.$ifile; if(file_exists($ifile)){ $idata = io_readFile($ifile); @@ -356,13 +362,13 @@ function js_compress($s){ // reserved word (e.g. "for", "else", "if") or a // variable/object/method (e.g. "foo.color") while ($i < $slen && (strpos($chars,$s[$i]) === false) ){ - $result .= $s{$i}; + $result .= $s[$i]; $i = $i + 1; } - $ch = $s{$i}; + $ch = $s[$i]; // multiline comments (keeping IE conditionals) - if($ch == '/' && $s{$i+1} == '*' && $s{$i+2} != '@'){ + if($ch == '/' && $s[$i+1] == '*' && $s[$i+2] != '@'){ $endC = strpos($s,'*/',$i+2); if($endC === false) trigger_error('Found invalid /*..*/ comment', E_USER_ERROR); @@ -381,7 +387,7 @@ function js_compress($s){ } // singleline - if($ch == '/' && $s{$i+1} == '/'){ + if($ch == '/' && $s[$i+1] == '/'){ $endC = strpos($s,"\n",$i+2); if($endC === false) trigger_error('Invalid comment', E_USER_ERROR); $i = $endC; @@ -392,15 +398,15 @@ function js_compress($s){ if($ch == '/'){ // rewind, skip white space $j = 1; - while(in_array($s{$i-$j}, $whitespaces_chars)){ + while(in_array($s[$i-$j], $whitespaces_chars)){ $j = $j + 1; } - if( in_array($s{$i-$j}, $regex_starters) ){ + if( in_array($s[$i-$j], $regex_starters) ){ // yes, this is an re // now move forward and find the end of it $j = 1; - while($s{$i+$j} != '/'){ - if($s{$i+$j} == '\\') $j = $j + 2; + while($s[$i+$j] != '/'){ + if($s[$i+$j] == '\\') $j = $j + 2; else $j++; } $result .= substr($s,$i,$j+1); @@ -412,8 +418,8 @@ function js_compress($s){ // double quote strings if($ch == '"'){ $j = 1; - while( $s{$i+$j} != '"' && ($i+$j < $slen)){ - if( $s{$i+$j} == '\\' && ($s{$i+$j+1} == '"' || $s{$i+$j+1} == '\\') ){ + while( ($i+$j < $slen) && $s[$i+$j] != '"' ){ + if( $s[$i+$j] == '\\' && ($s[$i+$j+1] == '"' || $s[$i+$j+1] == '\\') ){ $j += 2; }else{ $j += 1; @@ -430,8 +436,8 @@ function js_compress($s){ // single quote strings if($ch == "'"){ $j = 1; - while( $s{$i+$j} != "'" && ($i+$j < $slen)){ - if( $s{$i+$j} == '\\' && ($s{$i+$j+1} == "'" || $s{$i+$j+1} == '\\') ){ + while( ($i+$j < $slen) && $s[$i+$j] != "'" ){ + if( $s[$i+$j] == '\\' && ($s[$i+$j+1] == "'" || $s[$i+$j+1] == '\\') ){ $j += 2; }else{ $j += 1; diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php index 722254423..b43cff745 100644 --- a/lib/exe/mediamanager.php +++ b/lib/exe/mediamanager.php @@ -1,4 +1,7 @@ <?php + +use dokuwiki\Extension\Event; + if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); define('DOKU_MEDIAMANAGER',1); @@ -38,7 +41,7 @@ $AUTH = $INFO['perm']; // shortcut for historical reasons $tmp = array(); - trigger_event('MEDIAMANAGER_STARTED', $tmp); + Event::createAndTrigger('MEDIAMANAGER_STARTED', $tmp); session_write_close(); //close session // do not display the manager if user does not have read access diff --git a/lib/exe/taskrunner.php b/lib/exe/taskrunner.php new file mode 100644 index 000000000..69ab4451a --- /dev/null +++ b/lib/exe/taskrunner.php @@ -0,0 +1,16 @@ +<?php +/** + * DokuWiki indexer + * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Andreas Gohr <andi@splitbrain.org> + */ +if (!defined('DOKU_INC')) { + define('DOKU_INC', __DIR__ . '/../../'); +} +define('DOKU_DISABLE_GZIP_OUTPUT',1); +require_once DOKU_INC.'inc/init.php'; +session_write_close(); //close session + +$taskRunner = new \dokuwiki\TaskRunner(); +$taskRunner->run(); diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index 3046f47e9..dc0438ee1 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -1,67 +1,15 @@ <?php -if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); - -require_once(DOKU_INC.'inc/init.php'); -session_write_close(); //close session - -if(!$conf['remote']) die((new IXR_Error(-32605, "XML-RPC server not enabled."))->getXml()); - /** - * Contains needed wrapper functions and registers all available - * XMLRPC functions. + * XMLRPC API backend */ -class dokuwiki_xmlrpc_server extends IXR_Server { - protected $remote; - - /** - * Constructor. Register methods and run Server - */ - public function __construct(){ - $this->remote = new RemoteAPI(); - $this->remote->setDateTransformation(array($this, 'toDate')); - $this->remote->setFileTransformation(array($this, 'toFile')); - parent::__construct(); - } - /** - * @param string $methodname - * @param array $args - * @return IXR_Error|mixed - */ - public function call($methodname, $args){ - try { - $result = $this->remote->call($methodname, $args); - return $result; - } catch (RemoteAccessDeniedException $e) { - if (!isset($_SERVER['REMOTE_USER'])) { - http_status(401); - return new IXR_Error(-32603, "server error. not authorized to call method $methodname"); - } else { - http_status(403); - return new IXR_Error(-32604, "server error. forbidden to call the method $methodname"); - } - } catch (RemoteException $e) { - return new IXR_Error($e->getCode(), $e->getMessage()); - } - } +use dokuwiki\Remote\XmlRpcServer; - /** - * @param string|int $data iso date(yyyy[-]mm[-]dd[ hh:mm[:ss]]) or timestamp - * @return IXR_Date - */ - public function toDate($data) { - return new IXR_Date($data); - } +if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__).'/../../'); - /** - * @param string $data - * @return IXR_Base64 - */ - public function toFile($data) { - return new IXR_Base64($data); - } -} +require_once(DOKU_INC.'inc/init.php'); +session_write_close(); //close session -$server = new dokuwiki_xmlrpc_server(); +if(!$conf['remote']) die((new IXR_Error(-32605, "XML-RPC server not enabled."))->getXml()); -// vim:ts=4:sw=4:et: +$server = new XmlRpcServer(); diff --git a/lib/images/fileicons/32x32/svg.png b/lib/images/fileicons/32x32/svg.png Binary files differnew file mode 100644 index 000000000..81a3644ff --- /dev/null +++ b/lib/images/fileicons/32x32/svg.png diff --git a/lib/images/fileicons/index.php b/lib/images/fileicons/index.php index 09b6c9df8..d1f233e48 100644 --- a/lib/images/fileicons/index.php +++ b/lib/images/fileicons/index.php @@ -1,9 +1,9 @@ <!DOCTYPE html> <html lang="en" dir="ltr"> <head> - <title>filetype icons</title> + <title>Filetype icons</title> - <style type="text/css"> + <style> body { background-color: #ccc; font-family: Arial; @@ -11,7 +11,7 @@ .box { width: 200px; - float:left; + float: left; padding: 0.5em; margin: 0; } @@ -28,40 +28,32 @@ </head> <body> -<div class="white box"> <?php +$fi_list = ''; $fi_list32 = ''; foreach (glob('*.png') as $img) { - echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; + $fi_list .= '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; } -?> +foreach (glob('32x32/*.png') as $img) { + $fi_list32 .= '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; +} +echo '<div class="white box"> +'.$fi_list.' </div> <div class="black box"> -<?php -foreach (glob('*.png') as $img) { - echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; -} -?> +'.$fi_list.' </div> <br style="clear: left" /> <div class="white box"> - <?php - foreach (glob('32x32/*.png') as $img) { - echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; - } - ?> +'.$fi_list32.' </div> <div class="black box"> - <?php - foreach (glob('32x32/*.png') as $img) { - echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; - } - ?> +'.$fi_list32; +?> </div> - </body> </html> diff --git a/lib/images/fileicons/svg.png b/lib/images/fileicons/svg.png Binary files differnew file mode 100644 index 000000000..a52132dbf --- /dev/null +++ b/lib/images/fileicons/svg.png diff --git a/lib/images/smileys/index.php b/lib/images/smileys/index.php index 4167eda5b..574966628 100644 --- a/lib/images/smileys/index.php +++ b/lib/images/smileys/index.php @@ -1,9 +1,9 @@ <!DOCTYPE html> <html lang="en" dir="ltr"> <head> - <title>smileys</title> + <title>Smileys</title> - <style type="text/css"> + <style> body { background-color: #ccc; font-family: Arial; @@ -11,7 +11,7 @@ .box { width: 200px; - float:left; + float: left; padding: 0.5em; margin: 0; } @@ -28,19 +28,24 @@ </head> <body> -<div class="white box"> <?php +$smi_list = ''; foreach (glob('*.gif') as $img) { - echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; + $smi_list .= '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; } -?> +if(is_dir('local')) { + $smi_list .= '<hr />'; + foreach (glob('local/*.gif') as $img) { + $smi_list .= '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; + } +} + +echo '<div class="white box"> +'.$smi_list.' </div> <div class="black box"> -<?php -foreach (glob('*.gif') as $img) { - echo '<img src="'.$img.'" alt="'.$img.'" title="'.$img.'" /> '; -} +'.$smi_list; ?> </div> diff --git a/lib/plugins/acl/action.php b/lib/plugins/acl/action.php index a7226f598..86e587093 100644 --- a/lib/plugins/acl/action.php +++ b/lib/plugins/acl/action.php @@ -6,13 +6,11 @@ * @author Andreas Gohr <andi@splitbrain.org> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - /** * Register handler */ -class action_plugin_acl extends DokuWiki_Action_Plugin { +class action_plugin_acl extends DokuWiki_Action_Plugin +{ /** * Registers a callback function for a given event @@ -20,10 +18,10 @@ class action_plugin_acl extends DokuWiki_Action_Plugin { * @param Doku_Event_Handler $controller DokuWiki's event controller object * @return void */ - public function register(Doku_Event_Handler $controller) { - - $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax_call_acl'); + public function register(Doku_Event_Handler $controller) + { + $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handleAjaxCallAcl'); } /** @@ -33,9 +31,9 @@ class action_plugin_acl extends DokuWiki_Action_Plugin { * @param mixed $param empty * @return void */ - - public function handle_ajax_call_acl(Doku_Event &$event, $param) { - if($event->data !== 'plugin_acl') { + public function handleAjaxCallAcl(Doku_Event $event, $param) + { + if ($event->data !== 'plugin_acl') { return; } $event->stopPropagation(); @@ -44,44 +42,44 @@ class action_plugin_acl extends DokuWiki_Action_Plugin { global $ID; global $INPUT; - if(!auth_isadmin()) { + /** @var $acl admin_plugin_acl */ + $acl = plugin_load('admin', 'acl'); + if (!$acl->isAccessibleByCurrentUser()) { echo 'for admins only'; return; } - if(!checkSecurityToken()) { + if (!checkSecurityToken()) { echo 'CRSF Attack'; return; } $ID = getID(); - - /** @var $acl admin_plugin_acl */ - $acl = plugin_load('admin', 'acl'); $acl->handle(); $ajax = $INPUT->str('ajax'); header('Content-Type: text/html; charset=utf-8'); - if($ajax == 'info') { - $acl->_html_info(); - } elseif($ajax == 'tree') { - + if ($ajax == 'info') { + $acl->printInfo(); + } elseif ($ajax == 'tree') { $ns = $INPUT->str('ns'); - if($ns == '*') { + if ($ns == '*') { $ns = ''; } $ns = cleanID($ns); $lvl = count(explode(':', $ns)); $ns = utf8_encodeFN(str_replace(':', '/', $ns)); - $data = $acl->_get_tree($ns, $ns); + $data = $acl->makeTree($ns, $ns); - foreach(array_keys($data) as $item) { + foreach (array_keys($data) as $item) { $data[$item]['level'] = $lvl + 1; } echo html_buildlist( - $data, 'acl', array($acl, '_html_list_acl'), - array($acl, '_html_li_acl') + $data, + 'acl', + array($acl, 'makeTreeItem'), + array($acl, 'makeListItem') ); } } diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 6edc6c621..02842fd4b 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -7,16 +7,15 @@ * @author Anika Henke <anika@selfthinker.org> (concepts) * @author Frank Schubert <frank@schokilade.de> (old version) */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); /** * All DokuWiki plugins to extend the admin function * need to inherit from this class */ -class admin_plugin_acl extends DokuWiki_Admin_Plugin { - var $acl = null; - var $ns = null; +class admin_plugin_acl extends DokuWiki_Admin_Plugin +{ + public $acl = null; + protected $ns = null; /** * The currently selected item, associative array with id and type. * Populated from (in this order): @@ -25,22 +24,24 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * $ns * $ID */ - var $current_item = null; - var $who = ''; - var $usersgroups = array(); - var $specials = array(); + protected $current_item = null; + protected $who = ''; + protected $usersgroups = array(); + protected $specials = array(); /** * return prompt for admin menu */ - function getMenuText($language) { + public function getMenuText($language) + { return $this->getLang('admin_acl'); } /** * return sort order for position in admin menu */ - function getMenuSort() { + public function getMenuSort() + { return 1; } @@ -51,7 +52,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function handle() { + public function handle() + { global $AUTH_ACL; global $ID; global $auth; @@ -62,9 +64,9 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $AUTH_ACL = file($config_cascade['acl']['default']); // namespace given? - if($INPUT->str('ns') == '*'){ + if ($INPUT->str('ns') == '*') { $this->ns = '*'; - }else{ + } else { $this->ns = cleanID($INPUT->str('ns')); } @@ -80,78 +82,78 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { // user or group choosen? $who = trim($INPUT->str('acl_w')); - if($INPUT->str('acl_t') == '__g__' && $who){ - $this->who = '@'.ltrim($auth->cleanGroup($who),'@'); - }elseif($INPUT->str('acl_t') == '__u__' && $who){ - $this->who = ltrim($who,'@'); - if($this->who != '%USER%' && $this->who != '%GROUP%'){ #keep wildcard as is + if ($INPUT->str('acl_t') == '__g__' && $who) { + $this->who = '@'.ltrim($auth->cleanGroup($who), '@'); + } elseif ($INPUT->str('acl_t') == '__u__' && $who) { + $this->who = ltrim($who, '@'); + if ($this->who != '%USER%' && $this->who != '%GROUP%') { #keep wildcard as is $this->who = $auth->cleanUser($this->who); } - }elseif($INPUT->str('acl_t') && + } elseif ($INPUT->str('acl_t') && $INPUT->str('acl_t') != '__u__' && - $INPUT->str('acl_t') != '__g__'){ + $INPUT->str('acl_t') != '__g__') { $this->who = $INPUT->str('acl_t'); - }elseif($who){ + } elseif ($who) { $this->who = $who; } // handle modifications - if($INPUT->has('cmd') && checkSecurityToken()){ + if ($INPUT->has('cmd') && checkSecurityToken()) { $cmd = $INPUT->extract('cmd')->str('cmd'); // scope for modifications - if($this->ns){ - if($this->ns == '*'){ + if ($this->ns) { + if ($this->ns == '*') { $scope = '*'; - }else{ + } else { $scope = $this->ns.':*'; } - }else{ + } else { $scope = $ID; } - if($cmd == 'save' && $scope && $this->who && $INPUT->has('acl')){ + if ($cmd == 'save' && $scope && $this->who && $INPUT->has('acl')) { // handle additions or single modifications - $this->_acl_del($scope, $this->who); - $this->_acl_add($scope, $this->who, $INPUT->int('acl')); - }elseif($cmd == 'del' && $scope && $this->who){ + $this->deleteACL($scope, $this->who); + $this->addOrUpdateACL($scope, $this->who, $INPUT->int('acl')); + } elseif ($cmd == 'del' && $scope && $this->who) { // handle single deletions - $this->_acl_del($scope, $this->who); - }elseif($cmd == 'update'){ + $this->deleteACL($scope, $this->who); + } elseif ($cmd == 'update') { $acl = $INPUT->arr('acl'); // handle update of the whole file - foreach($INPUT->arr('del') as $where => $names){ + foreach ($INPUT->arr('del') as $where => $names) { // remove all rules marked for deletion - foreach($names as $who) + foreach ($names as $who) unset($acl[$where][$who]); } // prepare lines $lines = array(); // keep header - foreach($AUTH_ACL as $line){ - if($line{0} == '#'){ + foreach ($AUTH_ACL as $line) { + if ($line[0] == '#') { $lines[] = $line; - }else{ + } else { break; } } // re-add all rules - foreach($acl as $where => $opt){ - foreach($opt as $who => $perm){ + foreach ($acl as $where => $opt) { + foreach ($opt as $who => $perm) { if ($who[0]=='@') { if ($who!='@ALL') { - $who = '@'.ltrim($auth->cleanGroup($who),'@'); + $who = '@'.ltrim($auth->cleanGroup($who), '@'); } - } elseif ($who != '%USER%' && $who != '%GROUP%'){ #keep wildcard as is + } elseif ($who != '%USER%' && $who != '%GROUP%') { #keep wildcard as is $who = $auth->cleanUser($who); } - $who = auth_nameencode($who,true); + $who = auth_nameencode($who, true); $lines[] = "$where\t$who\t$perm\n"; } } // save it - io_saveFile($config_cascade['acl']['default'], join('',$lines)); + io_saveFile($config_cascade['acl']['default'], join('', $lines)); } // reload ACL config @@ -159,7 +161,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { } // initialize ACL array - $this->_init_acl_config(); + $this->initAclConfig(); } /** @@ -171,29 +173,30 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * @author Frank Schubert <frank@schokilade.de> * @author Andreas Gohr <andi@splitbrain.org> */ - function html() { + public function html() + { echo '<div id="acl_manager">'.NL; echo '<h1>'.$this->getLang('admin_acl').'</h1>'.NL; echo '<div class="level1">'.NL; echo '<div id="acl__tree">'.NL; - $this->_html_explorer(); + $this->makeExplorer(); echo '</div>'.NL; echo '<div id="acl__detail">'.NL; - $this->_html_detail(); + $this->printDetail(); echo '</div>'.NL; echo '</div>'.NL; echo '<div class="clearer"></div>'; echo '<h2>'.$this->getLang('current').'</h2>'.NL; echo '<div class="level2">'.NL; - $this->_html_table(); + $this->printAclTable(); echo '</div>'.NL; echo '<div class="footnotes"><div class="fn">'.NL; echo '<sup><a id="fn__1" class="fn_bot" href="#fnt__1">1)</a></sup>'.NL; - echo $this->getLang('p_include'); + echo '<div class="content">'.$this->getLang('p_include').'</div>'; echo '</div></div>'; echo '</div>'.NL; @@ -204,15 +207,16 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _get_opts($addopts=null){ + protected function getLinkOptions($addopts = null) + { $opts = array( 'do'=>'admin', 'page'=>'acl', ); - if($this->ns) $opts['ns'] = $this->ns; - if($this->who) $opts['acl_w'] = $this->who; + if ($this->ns) $opts['ns'] = $this->ns; + if ($this->who) $opts['acl_w'] = $this->who; - if(is_null($addopts)) return $opts; + if (is_null($addopts)) return $opts; return array_merge($opts, $addopts); } @@ -221,54 +225,61 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _html_explorer(){ + protected function makeExplorer() + { global $conf; global $ID; global $lang; $ns = $this->ns; - if(empty($ns)){ - $ns = dirname(str_replace(':','/',$ID)); - if($ns == '.') $ns =''; - }elseif($ns == '*'){ + if (empty($ns)) { + $ns = dirname(str_replace(':', '/', $ID)); + if ($ns == '.') $ns =''; + } elseif ($ns == '*') { $ns =''; } - $ns = utf8_encodeFN(str_replace(':','/',$ns)); + $ns = utf8_encodeFN(str_replace(':', '/', $ns)); - $data = $this->_get_tree($ns); + $data = $this->makeTree($ns); // wrap a list with the root level around the other namespaces array_unshift($data, array( 'level' => 0, 'id' => '*', 'type' => 'd', 'open' =>'true', 'label' => '['.$lang['mediaroot'].']')); - echo html_buildlist($data,'acl', - array($this,'_html_list_acl'), - array($this,'_html_li_acl')); - + echo html_buildlist( + $data, + 'acl', + array($this, 'makeTreeItem'), + array($this, 'makeListItem') + ); } /** * get a combined list of media and page files * + * also called via AJAX + * * @param string $folder an already converted filesystem folder of the current namespace - * @param string $limit limit the search to this folder + * @param string $limit limit the search to this folder + * @return array */ - function _get_tree($folder,$limit=''){ + public function makeTree($folder, $limit = '') + { global $conf; // read tree structure from pages and media $data = array(); - search($data,$conf['datadir'],'search_index',array('ns' => $folder),$limit); + search($data, $conf['datadir'], 'search_index', array('ns' => $folder), $limit); $media = array(); - search($media,$conf['mediadir'],'search_index',array('ns' => $folder, 'nofiles' => true),$limit); - $data = array_merge($data,$media); + search($media, $conf['mediadir'], 'search_index', array('ns' => $folder, 'nofiles' => true), $limit); + $data = array_merge($data, $media); unset($media); // combine by sorting and removing duplicates - usort($data,array($this,'_tree_sort')); + usort($data, array($this, 'treeSort')); $count = count($data); - if($count>0) for($i=1; $i<$count; $i++){ - if($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) { + if ($count>0) for ($i=1; $i<$count; $i++) { + if ($data[$i-1]['id'] == $data[$i]['id'] && $data[$i-1]['type'] == $data[$i]['type']) { unset($data[$i]); $i++; // duplicate found, next $i can't be a duplicate, so skip forward one } @@ -281,7 +292,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * Sorts the combined trees of media and page files */ - function _tree_sort($a,$b){ + public function treeSort($a, $b) + { // handle the trivial cases first if ($a['id'] == '') return -1; if ($b['id'] == '') return 1; @@ -315,6 +327,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { // before that other part. if (empty($a_ids)) return ($a['type'] == 'd') ? -1 : 1; if (empty($b_ids)) return ($b['type'] == 'd') ? 1 : -1; + return 0; //shouldn't happen } /** @@ -323,20 +336,21 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _html_detail(){ + protected function printDetail() + { global $ID; echo '<form action="'.wl().'" method="post" accept-charset="utf-8"><div class="no">'.NL; echo '<div id="acl__user">'; echo $this->getLang('acl_perms').' '; - $inl = $this->_html_select(); - echo '<input type="text" name="acl_w" class="edit" value="'.(($inl)?'':hsc(ltrim($this->who,'@'))).'" />'.NL; + $inl = $this->makeSelect(); + echo '<input type="text" name="acl_w" class="edit" value="'.(($inl)?'':hsc(ltrim($this->who, '@'))).'" />'.NL; echo '<button type="submit">'.$this->getLang('btn_select').'</button>'.NL; echo '</div>'.NL; echo '<div id="acl__info">'; - $this->_html_info(); + $this->printInfo(); echo '</div>'; echo '<input type="hidden" name="ns" value="'.hsc($this->ns).'" />'.NL; @@ -349,23 +363,26 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { /** * Print info and editor + * + * also loaded via Ajax */ - function _html_info(){ + public function printInfo() + { global $ID; - if($this->who){ - $current = $this->_get_exact_perm(); + if ($this->who) { + $current = $this->getExactPermisson(); // explain current permissions - $this->_html_explain($current); + $this->printExplanation($current); // load editor - $this->_html_acleditor($current); - }else{ + $this->printAclEditor($current); + } else { echo '<p>'; - if($this->ns){ - printf($this->getLang('p_choose_ns'),hsc($this->ns)); - }else{ - printf($this->getLang('p_choose_id'),hsc($ID)); + if ($this->ns) { + printf($this->getLang('p_choose_ns'), hsc($this->ns)); + } else { + printf($this->getLang('p_choose_id'), hsc($ID)); } echo '</p>'; @@ -378,21 +395,22 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _html_acleditor($current){ + protected function printAclEditor($current) + { global $lang; echo '<fieldset>'; - if(is_null($current)){ + if (is_null($current)) { echo '<legend>'.$this->getLang('acl_new').'</legend>'; - }else{ + } else { echo '<legend>'.$this->getLang('acl_mod').'</legend>'; } - echo $this->_html_checkboxes($current,empty($this->ns),'acl'); + echo $this->makeCheckboxes($current, empty($this->ns), 'acl'); - if(is_null($current)){ + if (is_null($current)) { echo '<button type="submit" name="cmd[save]">'.$lang['btn_save'].'</button>'.NL; - }else{ + } else { echo '<button type="submit" name="cmd[save]">'.$lang['btn_update'].'</button>'.NL; echo '<button type="submit" name="cmd[del]">'.$lang['btn_delete'].'</button>'.NL; } @@ -405,7 +423,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _html_explain($current){ + protected function printExplanation($current) + { global $ID; global $auth; @@ -413,69 +432,69 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $ns = $this->ns; // prepare where to check - if($ns){ - if($ns == '*'){ + if ($ns) { + if ($ns == '*') { $check='*'; - }else{ + } else { $check=$ns.':*'; } - }else{ + } else { $check = $ID; } // prepare who to check - if($who{0} == '@'){ + if ($who[0] == '@') { $user = ''; - $groups = array(ltrim($who,'@')); - }else{ + $groups = array(ltrim($who, '@')); + } else { $user = $who; $info = $auth->getUserData($user); - if($info === false){ + if ($info === false) { $groups = array(); - }else{ + } else { $groups = $info['grps']; } } // check the permissions - $perm = auth_aclcheck($check,$user,$groups); + $perm = auth_aclcheck($check, $user, $groups); // build array of named permissions $names = array(); - if($perm){ - if($ns){ - if($perm >= AUTH_DELETE) $names[] = $this->getLang('acl_perm16'); - if($perm >= AUTH_UPLOAD) $names[] = $this->getLang('acl_perm8'); - if($perm >= AUTH_CREATE) $names[] = $this->getLang('acl_perm4'); + if ($perm) { + if ($ns) { + if ($perm >= AUTH_DELETE) $names[] = $this->getLang('acl_perm16'); + if ($perm >= AUTH_UPLOAD) $names[] = $this->getLang('acl_perm8'); + if ($perm >= AUTH_CREATE) $names[] = $this->getLang('acl_perm4'); } - if($perm >= AUTH_EDIT) $names[] = $this->getLang('acl_perm2'); - if($perm >= AUTH_READ) $names[] = $this->getLang('acl_perm1'); + if ($perm >= AUTH_EDIT) $names[] = $this->getLang('acl_perm2'); + if ($perm >= AUTH_READ) $names[] = $this->getLang('acl_perm1'); $names = array_reverse($names); - }else{ + } else { $names[] = $this->getLang('acl_perm0'); } // print permission explanation echo '<p>'; - if($user){ - if($ns){ - printf($this->getLang('p_user_ns'),hsc($who),hsc($ns),join(', ',$names)); - }else{ - printf($this->getLang('p_user_id'),hsc($who),hsc($ID),join(', ',$names)); + if ($user) { + if ($ns) { + printf($this->getLang('p_user_ns'), hsc($who), hsc($ns), join(', ', $names)); + } else { + printf($this->getLang('p_user_id'), hsc($who), hsc($ID), join(', ', $names)); } - }else{ - if($ns){ - printf($this->getLang('p_group_ns'),hsc(ltrim($who,'@')),hsc($ns),join(', ',$names)); - }else{ - printf($this->getLang('p_group_id'),hsc(ltrim($who,'@')),hsc($ID),join(', ',$names)); + } else { + if ($ns) { + printf($this->getLang('p_group_ns'), hsc(ltrim($who, '@')), hsc($ns), join(', ', $names)); + } else { + printf($this->getLang('p_group_id'), hsc(ltrim($who, '@')), hsc($ID), join(', ', $names)); } } echo '</p>'; // add note if admin - if($perm == AUTH_ADMIN){ + if ($perm == AUTH_ADMIN) { echo '<p>'.$this->getLang('p_isadmin').'</p>'; - }elseif(is_null($current)){ + } elseif (is_null($current)) { echo '<p>'.$this->getLang('p_inherited').'</p>'; } } @@ -488,46 +507,57 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _html_list_acl($item){ + public function makeTreeItem($item) + { $ret = ''; // what to display - if(!empty($item['label'])){ + if (!empty($item['label'])) { $base = $item['label']; - }else{ + } else { $base = ':'.$item['id']; - $base = substr($base,strrpos($base,':')+1); + $base = substr($base, strrpos($base, ':')+1); } // highlight? - if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) { + if (($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) { $cl = ' cur'; } else { $cl = ''; } // namespace or page? - if($item['type']=='d'){ - if($item['open']){ + if ($item['type']=='d') { + if ($item['open']) { $img = DOKU_BASE.'lib/images/minus.gif'; $alt = '−'; - }else{ + } else { $img = DOKU_BASE.'lib/images/plus.gif'; $alt = '+'; } $ret .= '<img src="'.$img.'" alt="'.$alt.'" />'; - $ret .= '<a href="'.wl('',$this->_get_opts(array('ns'=>$item['id'],'sectok'=>getSecurityToken()))).'" class="idx_dir'.$cl.'">'; + $ret .= '<a href="'. + wl('', $this->getLinkOptions(array('ns'=> $item['id'], 'sectok'=>getSecurityToken()))). + '" class="idx_dir'.$cl.'">'; $ret .= $base; $ret .= '</a>'; - }else{ - $ret .= '<a href="'.wl('',$this->_get_opts(array('id'=>$item['id'],'ns'=>'','sectok'=>getSecurityToken()))).'" class="wikilink1'.$cl.'">'; + } else { + $ret .= '<a href="'. + wl('', $this->getLinkOptions(array('id'=> $item['id'], 'ns'=>'', 'sectok'=>getSecurityToken()))). + '" class="wikilink1'.$cl.'">'; $ret .= noNS($item['id']); $ret .= '</a>'; } return $ret; } - - function _html_li_acl($item){ + /** + * List Item formatter + * + * @param array $item + * @return string + */ + public function makeListItem($item) + { return '<li class="level' . $item['level'] . ' ' . ($item['open'] ? 'open' : 'closed') . '">'; } @@ -538,7 +568,8 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _init_acl_config(){ + public function initAclConfig() + { global $AUTH_ACL; global $conf; $acl_config=array(); @@ -547,20 +578,24 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { // get special users and groups $this->specials[] = '@ALL'; $this->specials[] = '@'.$conf['defaultgroup']; - if($conf['manager'] != '!!not set!!'){ - $this->specials = array_merge($this->specials, - array_map('trim', - explode(',',$conf['manager']))); + if ($conf['manager'] != '!!not set!!') { + $this->specials = array_merge( + $this->specials, + array_map( + 'trim', + explode(',', $conf['manager']) + ) + ); } $this->specials = array_filter($this->specials); $this->specials = array_unique($this->specials); sort($this->specials); - foreach($AUTH_ACL as $line){ - $line = trim(preg_replace('/#.*$/','',$line)); //ignore comments - if(!$line) continue; + foreach ($AUTH_ACL as $line) { + $line = trim(preg_replace('/#.*$/', '', $line)); //ignore comments + if (!$line) continue; - $acl = preg_split('/[ \t]+/',$line); + $acl = preg_split('/[ \t]+/', $line); //0 is pagename, 1 is user, 2 is acl $acl[1] = rawurldecode($acl[1]); @@ -568,7 +603,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { // store non-special users and groups for later selection dialog $ug = $acl[1]; - if(in_array($ug,$this->specials)) continue; + if (in_array($ug, $this->specials)) continue; $usersgroups[] = $ug; } @@ -585,14 +620,15 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _html_table(){ + protected function printAclTable() + { global $lang; global $ID; echo '<form action="'.wl().'" method="post" accept-charset="utf-8"><div class="no">'.NL; - if($this->ns){ + if ($this->ns) { echo '<input type="hidden" name="ns" value="'.hsc($this->ns).'" />'.NL; - }else{ + } else { echo '<input type="hidden" name="id" value="'.hsc($ID).'" />'.NL; } echo '<input type="hidden" name="acl_w" value="'.hsc($this->who).'" />'.NL; @@ -607,29 +643,29 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo '<th>'.$this->getLang('perm').'<sup><a id="fnt__1" class="fn_top" href="#fn__1">1)</a></sup></th>'; echo '<th>'.$lang['btn_delete'].'</th>'; echo '</tr>'; - foreach($this->acl as $where => $set){ - foreach($set as $who => $perm){ + foreach ($this->acl as $where => $set) { + foreach ($set as $who => $perm) { echo '<tr>'; echo '<td>'; - if(substr($where,-1) == '*'){ + if (substr($where, -1) == '*') { echo '<span class="aclns">'.hsc($where).'</span>'; $ispage = false; - }else{ + } else { echo '<span class="aclpage">'.hsc($where).'</span>'; $ispage = true; } echo '</td>'; echo '<td>'; - if($who{0} == '@'){ + if ($who[0] == '@') { echo '<span class="aclgroup">'.hsc($who).'</span>'; - }else{ + } else { echo '<span class="acluser">'.hsc($who).'</span>'; } echo '</td>'; echo '<td>'; - echo $this->_html_checkboxes($perm,$ispage,'acl['.$where.']['.$who.']'); + echo $this->makeCheckboxes($perm, $ispage, 'acl['.$where.']['.$who.']'); echo '</td>'; echo '<td class="check">'; @@ -655,21 +691,22 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _get_exact_perm(){ + protected function getExactPermisson() + { global $ID; - if($this->ns){ - if($this->ns == '*'){ + if ($this->ns) { + if ($this->ns == '*') { $check = '*'; - }else{ + } else { $check = $this->ns.':*'; } - }else{ + } else { $check = $ID; } - if(isset($this->acl[$check][$this->who])){ + if (isset($this->acl[$check][$this->who])) { return $this->acl[$check][$this->who]; - }else{ + } else { return null; } } @@ -679,13 +716,17 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Frank Schubert <frank@schokilade.de> */ - function _acl_add($acl_scope, $acl_user, $acl_level){ + public function addOrUpdateACL($acl_scope, $acl_user, $acl_level) + { global $config_cascade; - $acl_user = auth_nameencode($acl_user,true); + + // first make sure we won't end up with 2 lines matching this user and scope. See issue #1115 + $this->deleteACL($acl_scope, $acl_user); + $acl_user = auth_nameencode($acl_user, true); // max level for pagenames is edit - if(strpos($acl_scope,'*') === false) { - if($acl_level > AUTH_EDIT) $acl_level = AUTH_EDIT; + if (strpos($acl_scope, '*') === false) { + if ($acl_level > AUTH_EDIT) $acl_level = AUTH_EDIT; } $new_acl = "$acl_scope\t$acl_user\t$acl_level\n"; @@ -698,11 +739,12 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Frank Schubert <frank@schokilade.de> */ - function _acl_del($acl_scope, $acl_user){ + public function deleteACL($acl_scope, $acl_user) + { global $config_cascade; - $acl_user = auth_nameencode($acl_user,true); + $acl_user = auth_nameencode($acl_user, true); - $acl_pattern = '^'.preg_quote($acl_scope,'/').'[ \t]+'.$acl_user.'[ \t]+[0-8].*$'; + $acl_pattern = '^'.preg_quote($acl_scope, '/').'[ \t]+'.$acl_user.'[ \t]+[0-8].*$'; return io_deleteFromFile($config_cascade['acl']['default'], "/$acl_pattern/", true); } @@ -713,15 +755,16 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * @author Frank Schubert <frank@schokilade.de> * @author Andreas Gohr <andi@splitbrain.org> */ - function _html_checkboxes($setperm,$ispage,$name){ + protected function makeCheckboxes($setperm, $ispage, $name) + { global $lang; static $label = 0; //number labels $ret = ''; - if($ispage && $setperm > AUTH_EDIT) $setperm = AUTH_EDIT; + if ($ispage && $setperm > AUTH_EDIT) $setperm = AUTH_EDIT; - foreach(array(AUTH_NONE,AUTH_READ,AUTH_EDIT,AUTH_CREATE,AUTH_UPLOAD,AUTH_DELETE) as $perm){ + foreach (array(AUTH_NONE,AUTH_READ,AUTH_EDIT,AUTH_CREATE,AUTH_UPLOAD,AUTH_DELETE) as $perm) { $label += 1; //general checkbox attributes @@ -730,11 +773,11 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { 'name' => $name, 'value' => $perm ); //dynamic attributes - if(!is_null($setperm) && $setperm == $perm) $atts['checked'] = 'checked'; - if($ispage && $perm > AUTH_EDIT){ + if (!is_null($setperm) && $setperm == $perm) $atts['checked'] = 'checked'; + if ($ispage && $perm > AUTH_EDIT) { $atts['disabled'] = 'disabled'; $class = ' class="disabled"'; - }else{ + } else { $class = ''; } @@ -752,21 +795,21 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - function _html_select(){ + protected function makeSelect() + { $inlist = false; $usel = ''; $gsel = ''; - if($this->who && - !in_array($this->who,$this->usersgroups) && - !in_array($this->who,$this->specials)){ - - if($this->who{0} == '@'){ + if ($this->who && + !in_array($this->who, $this->usersgroups) && + !in_array($this->who, $this->specials)) { + if ($this->who[0] == '@') { $gsel = ' selected="selected"'; - }else{ + } else { $usel = ' selected="selected"'; } - }else{ + } else { $inlist = true; } @@ -775,17 +818,17 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo ' <option value="__u__" class="acluser"'.$usel.'>'.$this->getLang('acl_user').'</option>'.NL; if (!empty($this->specials)) { echo ' <optgroup label=" ">'.NL; - foreach($this->specials as $ug){ - if($ug == $this->who){ + foreach ($this->specials as $ug) { + if ($ug == $this->who) { $sel = ' selected="selected"'; $inlist = true; - }else{ + } else { $sel = ''; } - if($ug{0} == '@'){ + if ($ug[0] == '@') { echo ' <option value="'.hsc($ug).'" class="aclgroup"'.$sel.'>'.hsc($ug).'</option>'.NL; - }else{ + } else { echo ' <option value="'.hsc($ug).'" class="acluser"'.$sel.'>'.hsc($ug).'</option>'.NL; } } @@ -793,17 +836,17 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { } if (!empty($this->usersgroups)) { echo ' <optgroup label=" ">'.NL; - foreach($this->usersgroups as $ug){ - if($ug == $this->who){ + foreach ($this->usersgroups as $ug) { + if ($ug == $this->who) { $sel = ' selected="selected"'; $inlist = true; - }else{ + } else { $sel = ''; } - if($ug{0} == '@'){ + if ($ug[0] == '@') { echo ' <option value="'.hsc($ug).'" class="aclgroup"'.$sel.'>'.hsc($ug).'</option>'.NL; - }else{ + } else { echo ' <option value="'.hsc($ug).'" class="acluser"'.$sel.'>'.hsc($ug).'</option>'.NL; } } diff --git a/lib/plugins/acl/lang/ar/lang.php b/lib/plugins/acl/lang/ar/lang.php index 89fe27a76..da16a8e90 100644 --- a/lib/plugins/acl/lang/ar/lang.php +++ b/lib/plugins/acl/lang/ar/lang.php @@ -2,11 +2,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Mostafa Hussein <mostafa@gmail.com> * @author Yaman Hokan <always.smile.yh@hotmail.com> * @author Usama Akkad <uahello@gmail.com> - * @author uahello@gmail.com */ $lang['admin_acl'] = 'إدارة قوائم التحكم بالدخول'; $lang['acl_group'] = 'مجموعة:'; diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php index 648b91ef4..5e250bc19 100644 --- a/lib/plugins/acl/lang/bg/lang.php +++ b/lib/plugins/acl/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Nikolay Vladimirov <nikolay@vladimiroff.com> * @author Viktor Usunov <usun0v@mail.bg> * @author Kiril <neohidra@gmail.com> diff --git a/lib/plugins/acl/lang/ca/lang.php b/lib/plugins/acl/lang/ca/lang.php index 0c882962d..b697c371b 100644 --- a/lib/plugins/acl/lang/ca/lang.php +++ b/lib/plugins/acl/lang/ca/lang.php @@ -4,10 +4,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Carles Bellver <carles.bellver@cent.uji.es> - * @author Carles Bellver <carles.bellver@gmail.com> - * @author carles.bellver@gmail.com - * @author carles.bellver@cent.uji.es - * @author daniel@6temes.cat + * @author carles.bellver <carles.bellver@gmail.com> + * @author daniel <daniel@6temes.cat> */ $lang['admin_acl'] = 'Gestió de la Llista de Control d\'Accés'; $lang['acl_group'] = 'Grup:'; diff --git a/lib/plugins/acl/lang/da/lang.php b/lib/plugins/acl/lang/da/lang.php index 5209b7b10..103a867ee 100644 --- a/lib/plugins/acl/lang/da/lang.php +++ b/lib/plugins/acl/lang/da/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jacob Palm <mail@jacobpalm.dk> * @author koeppe <koeppe@kazur.dk> * @author Jon Bendtsen <bendtsen@diku.dk> * @author Lars Næsbye Christensen <larsnaesbye@stud.ku.dk> @@ -38,7 +39,7 @@ $lang['acl_perm0'] = 'Ingen'; $lang['acl_perm1'] = 'Læs'; $lang['acl_perm2'] = 'Skriv'; $lang['acl_perm4'] = 'Opret'; -$lang['acl_perm8'] = 'Overføre'; +$lang['acl_perm8'] = 'Overfør'; $lang['acl_perm16'] = 'Slet'; $lang['acl_new'] = 'Tilføj ny post'; -$lang['acl_mod'] = 'Ændre post'; +$lang['acl_mod'] = 'Redigér post'; diff --git a/lib/plugins/acl/lang/el/lang.php b/lib/plugins/acl/lang/el/lang.php index 75cc41501..fe2dd083d 100644 --- a/lib/plugins/acl/lang/el/lang.php +++ b/lib/plugins/acl/lang/el/lang.php @@ -11,7 +11,7 @@ * @author Konstantinos Koryllos <koryllos@gmail.com> * @author George Petsagourakis <petsagouris@gmail.com> * @author Petros Vidalis <pvidalis@gmail.com> - * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com + * @author Vasileios Karavasilis <vasileioskaravasilis@gmail.com> */ $lang['admin_acl'] = 'Διαχείριση Δικαιωμάτων Πρόσβασης'; $lang['acl_group'] = 'Ομάδα:'; diff --git a/lib/plugins/acl/lang/fa/lang.php b/lib/plugins/acl/lang/fa/lang.php index 2938e1bb2..46db20893 100644 --- a/lib/plugins/acl/lang/fa/lang.php +++ b/lib/plugins/acl/lang/fa/lang.php @@ -5,8 +5,7 @@ * * @author behrad eslamifar <behrad_es@yahoo.com) * @author Mohsen Firoozmandan <info@mambolearn.com> - * @author omidmr@gmail.com - * @author Omid Mottaghi <omidmr@gmail.com> + * @author omidmr <omidmr@gmail.com> * @author Mohammad Reza Shoaei <shoaei@gmail.com> * @author Milad DZand <M.DastanZand@gmail.com> * @author AmirH Hassaneini <mytechmix@gmail.com> diff --git a/lib/plugins/acl/lang/fi/lang.php b/lib/plugins/acl/lang/fi/lang.php index 2dfc35801..f680f2905 100644 --- a/lib/plugins/acl/lang/fi/lang.php +++ b/lib/plugins/acl/lang/fi/lang.php @@ -2,9 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author otto@valjakko.net - * @author Otto Vainio <otto@valjakko.net> + * + * @author otto <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> * @author Sami Olmari <sami@olmari.fi> */ diff --git a/lib/plugins/acl/lang/id/lang.php b/lib/plugins/acl/lang/id/lang.php index 3b0ecf446..93e3f4125 100644 --- a/lib/plugins/acl/lang/id/lang.php +++ b/lib/plugins/acl/lang/id/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author mubaidillah <mubaidillah@gmail.com> * @author Yustinus Waruwu <juswaruwu@gmail.com> */ diff --git a/lib/plugins/acl/lang/is/lang.php b/lib/plugins/acl/lang/is/lang.php index 13ed7bfd7..6715c2700 100644 --- a/lib/plugins/acl/lang/is/lang.php +++ b/lib/plugins/acl/lang/is/lang.php @@ -1,5 +1,8 @@ <?php + /** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * Icelandic language file * * @author Hrannar Baldursson <hrannar.baldursson@gmail.com> diff --git a/lib/plugins/acl/lang/ja/lang.php b/lib/plugins/acl/lang/ja/lang.php index 24a36391b..0963d2b63 100644 --- a/lib/plugins/acl/lang/ja/lang.php +++ b/lib/plugins/acl/lang/ja/lang.php @@ -3,8 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> * @author Davilin(Yuji Takenaka) <webmaster@davilin.com> - * @author Yuji Takenaka <webmaster@davilin.com> * @author Ikuo Obataya <i.obataya@gmail.com> * @author Daniel Dupriest <kououken@gmail.com> * @author Kazutaka Miyasaka <kazmiya@gmail.com> @@ -22,8 +22,8 @@ $lang['p_user_id'] = 'ユーザー <b class="acluser">%s</b> は、 $lang['p_user_ns'] = 'ユーザー <b class="acluser">%s</b> は、名前空間 <b class="aclns">%s</b> に対して次の権限を持っています: <i>%s</i>'; $lang['p_group_id'] = 'グループ <b class="aclgroup">%s</b> のメンバーは、ページ <b class="aclpage">%s</b> に対して次の権限を持っています: <i>%s</i>'; $lang['p_group_ns'] = 'グループ <b class="aclgroup">%s</b> のメンバーは、名前空間 <b class="aclns">%s</b> に対して次の権限を持っています: <i>%s</i>'; -$lang['p_choose_id'] = 'ページ <b class="aclpage">%s</b> にセットされた権限を閲覧・編集するためには、上記のフォームに<b>ユーザー名もしくはグループ名を入力して下さい</b>。'; -$lang['p_choose_ns'] = '名前空間 <b class="aclns">%s</b> にセットされた権限を閲覧・編集するためには、上記のフォームに<b>ユーザー名もしくはグループ名を入力して下さい</b>。'; +$lang['p_choose_id'] = 'ページ <b class="aclpage">%s</b> にセットされた権限を閲覧・編集するには、上記のフォームに<b>ユーザー名もしくはグループ名を入力して下さい</b>。'; +$lang['p_choose_ns'] = '名前空間 <b class="aclns">%s</b> にセットされた権限を閲覧・編集するには、上記のフォームに<b>ユーザー名もしくはグループ名を入力して下さい</b>。'; $lang['p_inherited'] = '注意:これらの権限は明示されていませんが、他のグループもしくは上位の名前空間の権限を継承します。'; $lang['p_isadmin'] = '注意:選択したグループもしくはユーザーはスーパーユーザーであるため、全ての権限があります。'; $lang['p_include'] = '高次の権限は、それより低次の権限を含みます。作成・アップロード・削除の権限は、ページではなく名前空間のみに適用されます。'; diff --git a/lib/plugins/acl/lang/km/lang.php b/lib/plugins/acl/lang/km/lang.php new file mode 100644 index 000000000..1b7f7da94 --- /dev/null +++ b/lib/plugins/acl/lang/km/lang.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author no credits taken <someone@cambodia.kh> + */ +$lang['where'] = 'ទំព័រ/ដ្ឋាននាម'; diff --git a/lib/plugins/acl/lang/lt/lang.php b/lib/plugins/acl/lang/lt/lang.php index 2a1748abc..5bf5981a3 100644 --- a/lib/plugins/acl/lang/lt/lang.php +++ b/lib/plugins/acl/lang/lt/lang.php @@ -2,9 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Linas Valiukas <shirshegsm@gmail.com> - * @author audrius.klevas@gmail.com + * @author audrius.klevas <audrius.klevas@gmail.com> * @author Arunas Vaitekunas <aras@fan.lt> */ $lang['admin_acl'] = 'Priėjimo Kontrolės Sąrašų valdymas'; diff --git a/lib/plugins/acl/lang/no/lang.php b/lib/plugins/acl/lang/no/lang.php index 13770f498..218ea7516 100644 --- a/lib/plugins/acl/lang/no/lang.php +++ b/lib/plugins/acl/lang/no/lang.php @@ -14,8 +14,7 @@ * @author Knut Staring <knutst@gmail.com> * @author Lisa Ditlefsen <lisa@vervesearch.com> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author Rune Rasmussen syntaxerror.no@gmail.com + * @author Rune Rasmussen <syntaxerror.no@gmail.com> * @author Jon Bøe <jonmagneboe@hotmail.com> * @author Egil Hansen <egil@rosetta.no> */ diff --git a/lib/plugins/acl/lang/pt/help.txt b/lib/plugins/acl/lang/pt/help.txt index cf4619deb..6b076698d 100644 --- a/lib/plugins/acl/lang/pt/help.txt +++ b/lib/plugins/acl/lang/pt/help.txt @@ -1,9 +1,8 @@ === Auxílio Rápido === -Nesta página podes adicionar e remover permissões para espaço de nomes e páginas no seu wiki. +Nesta página pode adicionar e remover permissões para namespace e páginas no seu wiki. + * O painel esquerdo exibe todos os namespaces e páginas.´ + * O formulário acima permite a ver e modificar as permissões de um usuário ou grupo selecionado. + * Na tabela abaixo são exibidas todas as regras de controle de acesso atuais. Podes utilizá-la para excluir ou mudar rapidamente várias regras ao mesmo tempo. -O painel esquerdo exibe todos os espaço de nomes e páginas. O formulario acima permite a visualização e modificar as permissões de um selecionado utilizador ou grupo. - -Na tabela inferior são exibidas todas as actuais regras de controle de acesso. Podes utilisá-la para excluir ou mudar rapidamente várias regras ao mesmo tempo. - -A leitura da [[doku>acl|documentação oficial acerca ACL]] pode ajudar a compreender melhor como o controle de acessos funciona no DokuWiki. +A leitura da [[doku>acl|documentação oficial sobre ACL]] pode ajudar a compreender melhor como o controle de acessos funciona no DokuWiki. diff --git a/lib/plugins/acl/lang/pt/lang.php b/lib/plugins/acl/lang/pt/lang.php index eb77cba5c..e30ce9726 100644 --- a/lib/plugins/acl/lang/pt/lang.php +++ b/lib/plugins/acl/lang/pt/lang.php @@ -3,32 +3,33 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> * @author José Carlos Monteiro <jose.c.monteiro@netcabo.pt> * @author José Monteiro <Jose.Monteiro@DoWeDo-IT.com> * @author Enrico Nicoletto <liverig@gmail.com> * @author Fil <fil@meteopt.com> * @author André Neves <drakferion@gmail.com> - * @author José Campos zecarlosdecampos@gmail.com + * @author José Campos <zecarlosdecampos@gmail.com> */ -$lang['admin_acl'] = 'Gestão de ACLs'; +$lang['admin_acl'] = 'Gerenciamento de ACLs'; $lang['acl_group'] = 'Grupo:'; -$lang['acl_user'] = 'Utilizador:'; +$lang['acl_user'] = 'Usuário:'; $lang['acl_perms'] = 'Permissão para'; -$lang['page'] = 'Documento'; +$lang['page'] = 'Página'; $lang['namespace'] = 'Namespace'; $lang['btn_select'] = 'Selecionar'; $lang['p_user_id'] = 'O utilizador <b class="acluser">%s</b> tem as seguintes permissões na página <b class="aclpage">%s</b>: <i>%s</i>.'; -$lang['p_user_ns'] = 'O utilizador <b class="acluser">%s</b> tem as seguintes permissões no espaço de nomes <b class="aclns">%s</b>: <i>%s</i>.'; +$lang['p_user_ns'] = 'O utilizador <b class="acluser">%s</b> tem as seguintes permissões no namespace <b class="aclns">%s</b>: <i>%s</i>.'; $lang['p_group_id'] = 'Os membros do grupo <b class="aclgroup">%s</b> têm as seguintes permissões na página <b class="aclpage">%s</b>: <i>%s</i>.'; -$lang['p_group_ns'] = 'Os membros do grupo <b class="aclgroup">%s</b> têm as seguintes permissões no espaço de nomes <b class="aclpage">%s</b>: <i>%s</i>.'; -$lang['p_choose_id'] = 'Por favor <b>digite um utilizador ou grupo</b> no formulário acima para ver ou editar as permissões para a página <b class="aclpage">%s</b>.'; -$lang['p_choose_ns'] = 'Por favor <b>digite um utilizador ou grupo</b> no formulário acima para ver ou editar as permissões para o espaço de nomes <b class="aclpage">%s</b>.'; -$lang['p_inherited'] = 'Nota: Essas permissões não foram definidas explicitamente, mas sim herdadas de outros grupos ou espaço de nomes superiores.'; -$lang['p_isadmin'] = 'Nota: O grupo ou utilizador seleccionado tem sempre permissões completas, porque ele está configurado como superutilizador.'; -$lang['p_include'] = 'As permissões superiores incluem as inferiores. Permissões para Criar, Enviar e Apagar aplicam-se apenas aos espaços de nomes e não às páginas.'; -$lang['current'] = 'Regras Actuais ACL'; -$lang['where'] = 'Página/Espaço de Nomes'; -$lang['who'] = 'Utilizador/Grupo'; +$lang['p_group_ns'] = 'Os membros do grupo <b class="aclgroup">%s</b> têm as seguintes permissões no namespace <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_choose_id'] = 'Por favor <b>digite um usuário ou grupo</b> no formulário acima para ver ou editar as permissões para a página <b class="aclpage">%s</b>.'; +$lang['p_choose_ns'] = 'Por favor <b>digite um usuário ou grupo</b> no formulário acima para ver ou editar as permissões para o namespace <b class="aclpage">%s</b>.'; +$lang['p_inherited'] = 'Nota: Essas permissões não foram definidas explicitamente, mas sim herdadas de outros grupos ou namespaces superiores.'; +$lang['p_isadmin'] = 'Nota: O grupo ou utilizador seleccionado tem sempre permissões completas, porque ele está configurado como superusuário.'; +$lang['p_include'] = 'As permissões superiores incluem as inferiores. Permissões para Criar, Enviar e Excluir aplicam-se apenas aos namespaces e não às páginas.'; +$lang['current'] = 'Regras ACL Atuais'; +$lang['where'] = 'Página/Namespace'; +$lang['who'] = 'Usuário/Grupo'; $lang['perm'] = 'Permissões'; $lang['acl_perm0'] = 'Nenhum'; $lang['acl_perm1'] = 'Ler'; @@ -36,5 +37,5 @@ $lang['acl_perm2'] = 'Editar'; $lang['acl_perm4'] = 'Criar'; $lang['acl_perm8'] = 'Carregar'; $lang['acl_perm16'] = 'Remover'; -$lang['acl_new'] = 'Adicionar nova entrada'; +$lang['acl_new'] = 'Adicionar nova Entrada'; $lang['acl_mod'] = 'Modificar Entrada'; diff --git a/lib/plugins/acl/lang/ro/lang.php b/lib/plugins/acl/lang/ro/lang.php index 804bc80c8..3c55a1276 100644 --- a/lib/plugins/acl/lang/ro/lang.php +++ b/lib/plugins/acl/lang/ro/lang.php @@ -4,14 +4,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Sergiu Baltariu <s_baltariu@yahoo.com> - * @author s_baltariu@yahoo.com * @author Emanuel-Emeric Andrasi <n30@mandrivausers.ro> - * @author Emanuel-Emeric Andrași <n30@mandrivausers.ro> * @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro> - * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> - * @author Marius Olar <olarmariusalex@yahoo.com> - * @author Emanuel-Emeric Andrași <em.andrasi@mandrivausers.ro> */ $lang['admin_acl'] = 'Managementul Listei de Control a Accesului'; $lang['acl_group'] = 'Grup:'; diff --git a/lib/plugins/acl/lang/sr/lang.php b/lib/plugins/acl/lang/sr/lang.php index 0ba322a5e..f2c95484d 100644 --- a/lib/plugins/acl/lang/sr/lang.php +++ b/lib/plugins/acl/lang/sr/lang.php @@ -4,8 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Filip Brcic <brcha@users.sourceforge.net> - * @author Иван Петровић petrovicivan@ubuntusrbija.org - * @author Ivan Petrovic <petrovicivan@ubuntusrbija.org> + * @author Иван Петровић <petrovicivan@ubuntusrbija.org> * @author Miroslav Šolti <solti.miroslav@gmail.com> */ $lang['admin_acl'] = 'Управљање листом контроле приступа'; diff --git a/lib/plugins/acl/lang/th/lang.php b/lib/plugins/acl/lang/th/lang.php index 55b707b5c..24694ac2d 100644 --- a/lib/plugins/acl/lang/th/lang.php +++ b/lib/plugins/acl/lang/th/lang.php @@ -2,9 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Komgrit Niyomrath <n.komgrit@gmail.com> - * @author Kittithat Arnontavilas mrtomyum@gmail.com * @author Kittithat Arnontavilas <mrtomyum@gmail.com> * @author Thanasak Sompaisansin <jombthep@gmail.com> */ diff --git a/lib/plugins/acl/lang/tr/lang.php b/lib/plugins/acl/lang/tr/lang.php index 3c3e3dbc1..1f81da0eb 100644 --- a/lib/plugins/acl/lang/tr/lang.php +++ b/lib/plugins/acl/lang/tr/lang.php @@ -2,13 +2,13 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Selim Farsakoğlu <farsakogluselim@yahoo.de> * @author Aydın Coşkuner <aydinweb@gmail.com> * @author Cihan Kahveci <kahvecicihan@gmail.com> * @author Yavuz Selim <yavuzselim@gmail.com> * @author Caleb Maclennan <caleb@alerque.com> - * @author farukerdemoncel@gmail.com + * @author farukerdemoncel <farukerdemoncel@gmail.com> */ $lang['admin_acl'] = 'Erişim Kontrol Listesi (ACL) Yönetimi'; $lang['acl_group'] = 'Grup:'; diff --git a/lib/plugins/acl/lang/vi/help.txt b/lib/plugins/acl/lang/vi/help.txt index 816e5ee71..d657c2e23 100644 --- a/lib/plugins/acl/lang/vi/help.txt +++ b/lib/plugins/acl/lang/vi/help.txt @@ -1,12 +1,8 @@ === Trợ giúp nhanh: === -Trang này giúp bạn thêm hoặc xóa quyền được cấp cho 1 thư mục hoặc trang wiki của bạn. - -Của sổ bên trái hiển thị tất cả các thư mục và trang văn bản. - -Khung trên đây cho phép bạn xem và sửa quyền của một nhóm hoặc thành viên đã chọn. - -Bảng bên dưới hiển thị tất cả các quyền được cấp. Bạn có thể sửa hoặc hóa các quyền đó một cách nhanh chóng. - -Đọc [[doku>acl|tài liệu chính thức về ACL]] sẽ giúp bạn hiểu hơn về cách phân quyền ở DokuWiki. +Trên trang này, bạn có thể thêm và xóa quyền cho không gian tên và trang trong wiki của bạn. + * Khung bên trái hiển thị tất cả các không gian tên và trang có sẵn + * Biểu mẫu trên cho phép bạn xem và sửa đổi các quyền của thành viên hoặc nhóm đã chọn. + * Bảng dưới đây hiện thị tất cả các quy tắc kiểm soát truy cập. Bạn có thể sử dụng nó để nhanh chóng xóa hoặc thay đổi nhiều quy tắc. +Đọc [[doku>acl|tài liệu chính thức về ACL]] có thể giúp bạn hiểu đầy đủ cách thức kiểm soát hoạt động truy cập trong DokuWiki.
\ No newline at end of file diff --git a/lib/plugins/acl/lang/vi/lang.php b/lib/plugins/acl/lang/vi/lang.php index 8ca888cae..fb4d3b1ff 100644 --- a/lib/plugins/acl/lang/vi/lang.php +++ b/lib/plugins/acl/lang/vi/lang.php @@ -2,34 +2,35 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Thien Hau <thienhausoftware@gmail.com> * @author NukeViet <admin@nukeviet.vn> */ $lang['admin_acl'] = 'Quản lý danh sách quyền truy cập'; $lang['acl_group'] = 'Nhóm:'; $lang['acl_user'] = 'Thành viên:'; -$lang['acl_perms'] = 'Cấp phép cho'; +$lang['acl_perms'] = 'Cấp quyền cho'; $lang['page'] = 'Trang'; -$lang['namespace'] = 'Thư mục'; +$lang['namespace'] = 'Không gian tên'; $lang['btn_select'] = 'Chọn'; -$lang['p_user_id'] = 'Thành viên <b class="acluser">%s</b> hiện tại được cấp phép cho trang <b class="aclpage">%s</b>: <i>%s</i>.'; -$lang['p_user_ns'] = 'Thành viên <b class="acluser">%s</b> hiện tại được cấp phép cho thư mục <b class="aclns">%s</b>: <i>%s</i>.'; -$lang['p_group_id'] = 'Thành viên trong nhóm <b class="aclgroup">%s</b> hiện tại được cấp phép cho trang <b class="aclpage">%s</b>: <i>%s</i>.'; -$lang['p_group_ns'] = 'Thành viên trong nhóm <b class="aclgroup">%s</b> hiện tại được cấp phép cho thư mục <b class="aclns">%s</b>: <i>%s</i>.'; -$lang['p_choose_id'] = 'Hãy <b>nhập tên thành viên hoặc nhóm</b> vào ô trên đây để xem hoặc sửa quyền đã thiết đặt cho trang <b class="aclpage">%s</b>.'; -$lang['p_choose_ns'] = 'Hãy <b>nhập tên thành viên hoặc nhóm</b> vào ô trên đây để xem hoặc sửa quyền đã thiết đặt cho thư mục <b class="aclns">%s</b>.'; -$lang['p_inherited'] = 'Ghi chú: Có những quyền không được thể hiện ở đây nhưng nó được cấp phép từ những nhóm hoặc thư mục cấp cao.'; -$lang['p_isadmin'] = 'Ghi chú: Nhóm hoặc thành viên này luôn được cấp đủ quyền vì họ là Quản trị tối cao'; -$lang['p_include'] = 'Một số quyền thấp được thể hiện ở mức cao hơn. Quyền tạo, tải lên và xóa chỉ dành cho thư mục, không dành cho trang.'; +$lang['p_user_id'] = 'Thành viên <b class="acluser">%s</b> hiện có các quyền sau trên trang <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_user_ns'] = 'Thành viên <b class="acluser">%s</b> hiện có các quyền sau trong không gian tên <b class="aclns">%s</b>: <i>%s</i>.'; +$lang['p_group_id'] = 'Thành viên trong nhóm <b class="aclgroup">%s</b> hiện có các quyền sau trên trang <b class="aclpage">%s</b>: <i>%s</i>.'; +$lang['p_group_ns'] = 'Thành viên trong nhóm <b class="aclgroup">%s</b> hiện có các quyền sau trong không gian tên<b class="aclns">%s</b>: <i>%s</i>.'; +$lang['p_choose_id'] = 'Hãy <b>nhập tên thành viên hoặc nhóm</b> vào ô trên đây để xem hoặc sửa đổi quyền đã thiết đặt cho trang <b class="aclpage">%s</b>.'; +$lang['p_choose_ns'] = 'Hãy <b>nhập tên thành viên hoặc nhóm</b> vào ô trên đây để xem hoặc sửa đổi quyền đã thiết đặt cho thư mục <b class="aclns">%s</b>.'; +$lang['p_inherited'] = 'Ghi chú: Có những quyền không được thể hiện ở đây nhưng nó được cấp phép từ những nhóm hoặc không gian tên cao hơn.'; +$lang['p_isadmin'] = 'Ghi chú: Nhóm hoặc thành viên này luôn được cấp đủ quyền vì họ được đặt là Siêu thành viên'; +$lang['p_include'] = 'Các quyền cao hơn bao gồm những quyền thấp hơn. Quyền Tạo, Tải lên và Xóa chỉ áp dụng cho không gian tên, không phải trang.'; $lang['current'] = 'Danh sách quyền truy cập hiện tại'; -$lang['where'] = 'Trang/Thư mục'; +$lang['where'] = 'Trang/Không gian tên'; $lang['who'] = 'Thành viên/Nhóm'; $lang['perm'] = 'Quyền'; $lang['acl_perm0'] = 'Không'; $lang['acl_perm1'] = 'Đọc'; -$lang['acl_perm2'] = 'Sửa'; +$lang['acl_perm2'] = 'Sửa đổi'; $lang['acl_perm4'] = 'Tạo'; $lang['acl_perm8'] = 'Tải lên'; $lang['acl_perm16'] = 'Xóa'; -$lang['acl_new'] = 'Thêm mục mới'; -$lang['acl_mod'] = 'Sửa'; +$lang['acl_new'] = 'Thêm mục nhập mới'; +$lang['acl_mod'] = 'Sửa đổi mục nhập'; diff --git a/lib/plugins/acl/remote.php b/lib/plugins/acl/remote.php index 27c5c162a..8d19add72 100644 --- a/lib/plugins/acl/remote.php +++ b/lib/plugins/acl/remote.php @@ -1,16 +1,20 @@ <?php +use dokuwiki\Remote\AccessDeniedException; + /** * Class remote_plugin_acl */ -class remote_plugin_acl extends DokuWiki_Remote_Plugin { +class remote_plugin_acl extends DokuWiki_Remote_Plugin +{ /** * Returns details about the remote plugin methods * - * @return array Information about all provided methods. {@see RemoteAPI} + * @return array Information about all provided methods. {@see dokuwiki\Remote\RemoteAPI} */ - public function _getMethods() { + public function _getMethods() + { return array( 'listAcls' => array( 'args' => array(), @@ -34,16 +38,20 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { /** * List all ACL config entries * - * @throws RemoteAccessDeniedException + * @throws AccessDeniedException * @return dictionary {Scope: ACL}, where ACL = dictionnary {user/group: permissions_int} */ - public function listAcls(){ - if(!auth_isadmin()) { - throw new RemoteAccessDeniedException('You are not allowed to access ACLs, superuser permission is required', 114); + public function listAcls() + { + if (!auth_isadmin()) { + throw new AccessDeniedException( + 'You are not allowed to access ACLs, superuser permission is required', + 114 + ); } /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); - $apa->_init_acl_config(); + $apa->initAclConfig(); return $apa->acl; } @@ -53,17 +61,21 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { * @param string $scope * @param string $user * @param int $level see also inc/auth.php - * @throws RemoteAccessDeniedException + * @throws AccessDeniedException * @return bool */ - public function addAcl($scope, $user, $level){ - if(!auth_isadmin()) { - throw new RemoteAccessDeniedException('You are not allowed to access ACLs, superuser permission is required', 114); + public function addAcl($scope, $user, $level) + { + if (!auth_isadmin()) { + throw new AccessDeniedException( + 'You are not allowed to access ACLs, superuser permission is required', + 114 + ); } /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); - return $apa->_acl_add($scope, $user, $level); + return $apa->addOrUpdateACL($scope, $user, $level); } /** @@ -71,17 +83,20 @@ class remote_plugin_acl extends DokuWiki_Remote_Plugin { * * @param string $scope * @param string $user - * @throws RemoteAccessDeniedException + * @throws AccessDeniedException * @return bool */ - public function delAcl($scope, $user){ - if(!auth_isadmin()) { - throw new RemoteAccessDeniedException('You are not allowed to access ACLs, superuser permission is required', 114); + public function delAcl($scope, $user) + { + if (!auth_isadmin()) { + throw new AccessDeniedException( + 'You are not allowed to access ACLs, superuser permission is required', + 114 + ); } /** @var admin_plugin_acl $apa */ $apa = plugin_load('admin', 'acl'); - return $apa->_acl_del($scope, $user); + return $apa->deleteACL($scope, $user); } } - diff --git a/lib/plugins/acl/script.js b/lib/plugins/acl/script.js index 86badffdd..95621a255 100644 --- a/lib/plugins/acl/script.js +++ b/lib/plugins/acl/script.js @@ -15,8 +15,8 @@ var dw_acl = { return; } - jQuery('#acl__user select').change(dw_acl.userselhandler); - jQuery('#acl__user button').click(dw_acl.loadinfo); + jQuery('#acl__user select').on('change', dw_acl.userselhandler); + jQuery('#acl__user button').on('click', dw_acl.loadinfo); $tree = jQuery('#acl__tree'); $tree.dw_tree({toggle_selector: 'img', diff --git a/lib/plugins/action.php b/lib/plugins/action.php index 23d94a509..a3cbec722 100644 --- a/lib/plugins/action.php +++ b/lib/plugins/action.php @@ -1,25 +1,2 @@ <?php -/** - * Action Plugin Prototype - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Christopher Smith <chris@jalakai.co.uk> - */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -/** - * All DokuWiki plugins to interfere with the event system - * need to inherit from this class - */ -class DokuWiki_Action_Plugin extends DokuWiki_Plugin { - - /** - * Registers a callback function for a given event - * - * @param Doku_Event_Handler $controller - */ - public function register(Doku_Event_Handler $controller) { - trigger_error('register() not implemented in '.get_class($this), E_USER_WARNING); - } -} +dbg_deprecated('Autoloading. Do not require() files yourself.'); diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php index 4e1cbbb33..a3cbec722 100644 --- a/lib/plugins/admin.php +++ b/lib/plugins/admin.php @@ -1,96 +1,2 @@ <?php -/** - * Admin Plugin Prototype - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Christopher Smith <chris@jalakai.co.uk> - */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -/** - * All DokuWiki plugins to extend the admin function - * need to inherit from this class - */ -class DokuWiki_Admin_Plugin extends DokuWiki_Plugin { - - /** - * Return the text that is displayed at the main admin menu - * (Default localized language string 'menu' is returned, override this function for setting another name) - * - * @param string $language language code - * @return string menu string - */ - public function getMenuText($language) { - $menutext = $this->getLang('menu'); - if (!$menutext) { - $info = $this->getInfo(); - $menutext = $info['name'].' ...'; - } - return $menutext; - } - - /** - * Return the path to the icon being displayed in the main admin menu. - * By default it tries to find an 'admin.svg' file in the plugin directory. - * (Override this function for setting another image) - * - * Important: you have to return a single path, monochrome SVG icon! It has to be - * under 2 Kilobytes! - * - * We recommend icons from https://materialdesignicons.com/ or to use a matching - * style. - * - * @return string full path to the icon file - */ - public function getMenuIcon() { - $plugin = $this->getPluginName(); - return DOKU_PLUGIN . $plugin . '/admin.svg'; - } - - /** - * Determine position in list in admin window - * Lower values are sorted up - * - * @return int - */ - public function getMenuSort() { - return 1000; - } - - /** - * Carry out required processing - */ - public function handle() { - trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); - } - - /** - * Output html of the admin page - */ - public function html() { - trigger_error('html() not implemented in '.get_class($this), E_USER_WARNING); - } - - /** - * Return true for access only by admins (config:superuser) or false if managers are allowed as well - * - * @return bool - */ - public function forAdminOnly() { - return true; - } - - /** - * Return array with ToC items. Items can be created with the html_mktocitem() - * - * @see html_mktocitem() - * @see tpl_toc() - * - * @return array - */ - public function getTOC(){ - return array(); - } -} -//Setup VIM: ex: et ts=4 : +dbg_deprecated('Autoloading. Do not require() files yourself.'); diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index 0cd965b72..a3cbec722 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -1,438 +1,2 @@ <?php -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -/** - * Auth Plugin Prototype - * - * foundation authorisation class - * all auth classes should inherit from this class - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Chris Smith <chris@jalakai.co.uk> - * @author Jan Schumann <js@jschumann-it.com> - */ -class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { - public $success = true; - - /** - * Possible things an auth backend module may be able to - * do. The things a backend can do need to be set to true - * in the constructor. - */ - protected $cando = array( - 'addUser' => false, // can Users be created? - 'delUser' => false, // can Users be deleted? - 'modLogin' => false, // can login names be changed? - 'modPass' => false, // can passwords be changed? - 'modName' => false, // can real names be changed? - 'modMail' => false, // can emails be changed? - 'modGroups' => false, // can groups be changed? - 'getUsers' => false, // can a (filtered) list of users be retrieved? - 'getUserCount' => false, // can the number of users be retrieved? - 'getGroups' => false, // can a list of available groups be retrieved? - 'external' => false, // does the module do external auth checking? - 'logout' => true, // can the user logout again? (eg. not possible with HTTP auth) - ); - - /** - * Constructor. - * - * Carry out sanity checks to ensure the object is - * able to operate. Set capabilities in $this->cando - * array here - * - * For future compatibility, sub classes should always include a call - * to parent::__constructor() in their constructors! - * - * Set $this->success to false if checks fail - * - * @author Christopher Smith <chris@jalakai.co.uk> - */ - public function __construct() { - // the base class constructor does nothing, derived class - // constructors do the real work - } - - /** - * Available Capabilities. [ DO NOT OVERRIDE ] - * - * For introspection/debugging - * - * @author Christopher Smith <chris@jalakai.co.uk> - * @return array - */ - public function getCapabilities(){ - return array_keys($this->cando); - } - - /** - * Capability check. [ DO NOT OVERRIDE ] - * - * Checks the capabilities set in the $this->cando array and - * some pseudo capabilities (shortcutting access to multiple - * ones) - * - * ususal capabilities start with lowercase letter - * shortcut capabilities start with uppercase letter - * - * @author Andreas Gohr <andi@splitbrain.org> - * @param string $cap the capability to check - * @return bool - */ - public function canDo($cap) { - switch($cap) { - case 'Profile': - // can at least one of the user's properties be changed? - return ($this->cando['modPass'] || - $this->cando['modName'] || - $this->cando['modMail']); - break; - case 'UserMod': - // can at least anything be changed? - return ($this->cando['modPass'] || - $this->cando['modName'] || - $this->cando['modMail'] || - $this->cando['modLogin'] || - $this->cando['modGroups'] || - $this->cando['modMail']); - break; - default: - // print a helping message for developers - if(!isset($this->cando[$cap])) { - msg("Check for unknown capability '$cap' - Do you use an outdated Plugin?", -1); - } - return $this->cando[$cap]; - } - } - - /** - * Trigger the AUTH_USERDATA_CHANGE event and call the modification function. [ DO NOT OVERRIDE ] - * - * You should use this function instead of calling createUser, modifyUser or - * deleteUsers directly. The event handlers can prevent the modification, for - * example for enforcing a user name schema. - * - * @author Gabriel Birke <birke@d-scribe.de> - * @param string $type Modification type ('create', 'modify', 'delete') - * @param array $params Parameters for the createUser, modifyUser or deleteUsers method. The content of this array depends on the modification type - * @return bool|null|int Result from the modification function or false if an event handler has canceled the action - */ - public function triggerUserMod($type, $params) { - $validTypes = array( - 'create' => 'createUser', - 'modify' => 'modifyUser', - 'delete' => 'deleteUsers' - ); - if(empty($validTypes[$type])) { - return false; - } - - $result = false; - $eventdata = array('type' => $type, 'params' => $params, 'modification_result' => null); - $evt = new Doku_Event('AUTH_USER_CHANGE', $eventdata); - if($evt->advise_before(true)) { - $result = call_user_func_array(array($this, $validTypes[$type]), $evt->data['params']); - $evt->data['modification_result'] = $result; - } - $evt->advise_after(); - unset($evt); - return $result; - } - - /** - * Log off the current user [ OPTIONAL ] - * - * Is run in addition to the ususal logoff method. Should - * only be needed when trustExternal is implemented. - * - * @see auth_logoff() - * @author Andreas Gohr <andi@splitbrain.org> - */ - public function logOff() { - } - - /** - * Do all authentication [ OPTIONAL ] - * - * Set $this->cando['external'] = true when implemented - * - * If this function is implemented it will be used to - * authenticate a user - all other DokuWiki internals - * will not be used for authenticating, thus - * implementing the checkPass() function is not needed - * anymore. - * - * The function can be used to authenticate against third - * party cookies or Apache auth mechanisms and replaces - * the auth_login() function - * - * The function will be called with or without a set - * username. If the Username is given it was called - * from the login form and the given credentials might - * need to be checked. If no username was given it - * the function needs to check if the user is logged in - * by other means (cookie, environment). - * - * The function needs to set some globals needed by - * DokuWiki like auth_login() does. - * - * @see auth_login() - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param string $user Username - * @param string $pass Cleartext Password - * @param bool $sticky Cookie should not expire - * @return bool true on successful auth - */ - public function trustExternal($user, $pass, $sticky = false) { - /* some example: - - global $USERINFO; - global $conf; - $sticky ? $sticky = true : $sticky = false; //sanity check - - // do the checking here - - // set the globals if authed - $USERINFO['name'] = 'FIXME'; - $USERINFO['mail'] = 'FIXME'; - $USERINFO['grps'] = array('FIXME'); - $_SERVER['REMOTE_USER'] = $user; - $_SESSION[DOKU_COOKIE]['auth']['user'] = $user; - $_SESSION[DOKU_COOKIE]['auth']['pass'] = $pass; - $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO; - return true; - - */ - } - - /** - * Check user+password [ MUST BE OVERRIDDEN ] - * - * Checks if the given user exists and the given - * plaintext password is correct - * - * May be ommited if trustExternal is used. - * - * @author Andreas Gohr <andi@splitbrain.org> - * @param string $user the user name - * @param string $pass the clear text password - * @return bool - */ - public function checkPass($user, $pass) { - msg("no valid authorisation system in use", -1); - return false; - } - - /** - * Return user info [ MUST BE OVERRIDDEN ] - * - * Returns info about the given user needs to contain - * at least these fields: - * - * name string full name of the user - * mail string email address of the user - * grps array list of groups the user is in - * - * @author Andreas Gohr <andi@splitbrain.org> - * @param string $user the user name - * @param bool $requireGroups whether or not the returned data must include groups - * @return false|array containing user data or false - */ - public function getUserData($user, $requireGroups=true) { - if(!$this->cando['external']) msg("no valid authorisation system in use", -1); - return false; - } - - /** - * Create a new User [implement only where required/possible] - * - * Returns false if the user already exists, null when an error - * occurred and true if everything went well. - * - * The new user HAS TO be added to the default group by this - * function! - * - * Set addUser capability when implemented - * - * @author Andreas Gohr <andi@splitbrain.org> - * @param string $user - * @param string $pass - * @param string $name - * @param string $mail - * @param null|array $grps - * @return bool|null - */ - public function createUser($user, $pass, $name, $mail, $grps = null) { - msg("authorisation method does not allow creation of new users", -1); - return null; - } - - /** - * Modify user data [implement only where required/possible] - * - * Set the mod* capabilities according to the implemented features - * - * @author Chris Smith <chris@jalakai.co.uk> - * @param string $user nick of the user to be changed - * @param array $changes array of field/value pairs to be changed (password will be clear text) - * @return bool - */ - public function modifyUser($user, $changes) { - msg("authorisation method does not allow modifying of user data", -1); - return false; - } - - /** - * Delete one or more users [implement only where required/possible] - * - * Set delUser capability when implemented - * - * @author Chris Smith <chris@jalakai.co.uk> - * @param array $users - * @return int number of users deleted - */ - public function deleteUsers($users) { - msg("authorisation method does not allow deleting of users", -1); - return 0; - } - - /** - * Return a count of the number of user which meet $filter criteria - * [should be implemented whenever retrieveUsers is implemented] - * - * Set getUserCount capability when implemented - * - * @author Chris Smith <chris@jalakai.co.uk> - * @param array $filter array of field/pattern pairs, empty array for no filter - * @return int - */ - public function getUserCount($filter = array()) { - msg("authorisation method does not provide user counts", -1); - return 0; - } - - /** - * Bulk retrieval of user data [implement only where required/possible] - * - * Set getUsers capability when implemented - * - * @author Chris Smith <chris@jalakai.co.uk> - * @param int $start index of first user to be returned - * @param int $limit max number of users to be returned, 0 for unlimited - * @param array $filter array of field/pattern pairs, null for no filter - * @return array list of userinfo (refer getUserData for internal userinfo details) - */ - public function retrieveUsers($start = 0, $limit = 0, $filter = null) { - msg("authorisation method does not support mass retrieval of user data", -1); - return array(); - } - - /** - * Define a group [implement only where required/possible] - * - * Set addGroup capability when implemented - * - * @author Chris Smith <chris@jalakai.co.uk> - * @param string $group - * @return bool - */ - public function addGroup($group) { - msg("authorisation method does not support independent group creation", -1); - return false; - } - - /** - * Retrieve groups [implement only where required/possible] - * - * Set getGroups capability when implemented - * - * @author Chris Smith <chris@jalakai.co.uk> - * @param int $start - * @param int $limit - * @return array - */ - public function retrieveGroups($start = 0, $limit = 0) { - msg("authorisation method does not support group list retrieval", -1); - return array(); - } - - /** - * Return case sensitivity of the backend [OPTIONAL] - * - * When your backend is caseinsensitive (eg. you can login with USER and - * user) then you need to overwrite this method and return false - * - * @return bool - */ - public function isCaseSensitive() { - return true; - } - - /** - * Sanitize a given username [OPTIONAL] - * - * This function is applied to any user name that is given to - * the backend and should also be applied to any user name within - * the backend before returning it somewhere. - * - * This should be used to enforce username restrictions. - * - * @author Andreas Gohr <andi@splitbrain.org> - * @param string $user username - * @return string the cleaned username - */ - public function cleanUser($user) { - return $user; - } - - /** - * Sanitize a given groupname [OPTIONAL] - * - * This function is applied to any groupname that is given to - * the backend and should also be applied to any groupname within - * the backend before returning it somewhere. - * - * This should be used to enforce groupname restrictions. - * - * Groupnames are to be passed without a leading '@' here. - * - * @author Andreas Gohr <andi@splitbrain.org> - * @param string $group groupname - * @return string the cleaned groupname - */ - public function cleanGroup($group) { - return $group; - } - - /** - * Check Session Cache validity [implement only where required/possible] - * - * DokuWiki caches user info in the user's session for the timespan defined - * in $conf['auth_security_timeout']. - * - * This makes sure slow authentication backends do not slow down DokuWiki. - * This also means that changes to the user database will not be reflected - * on currently logged in users. - * - * To accommodate for this, the user manager plugin will touch a reference - * file whenever a change is submitted. This function compares the filetime - * of this reference file with the time stored in the session. - * - * This reference file mechanism does not reflect changes done directly in - * the backend's database through other means than the user manager plugin. - * - * Fast backends might want to return always false, to force rechecks on - * each page load. Others might want to use their own checking here. If - * unsure, do not override. - * - * @param string $user - The username - * @author Andreas Gohr <andi@splitbrain.org> - * @return bool - */ - public function useSessionCache($user) { - global $conf; - return ($_SESSION[DOKU_COOKIE]['auth']['time'] >= @filemtime($conf['cachedir'].'/sessionpurge')); - } -} +dbg_deprecated('Autoloading. Do not require() files yourself.'); diff --git a/lib/plugins/authad/action.php b/lib/plugins/authad/action.php index bc0f90c7e..a9fc01c1b 100644 --- a/lib/plugins/authad/action.php +++ b/lib/plugins/authad/action.php @@ -6,22 +6,20 @@ * @author Andreas Gohr <gohr@cosmocode.de> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - /** * Class action_plugin_addomain */ -class action_plugin_authad extends DokuWiki_Action_Plugin { +class action_plugin_authad extends DokuWiki_Action_Plugin +{ /** * Registers a callback function for a given event */ - public function register(Doku_Event_Handler $controller) { - - $controller->register_hook('AUTH_LOGIN_CHECK', 'BEFORE', $this, 'handle_auth_login_check'); - $controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handle_html_loginform_output'); + public function register(Doku_Event_Handler $controller) + { + $controller->register_hook('AUTH_LOGIN_CHECK', 'BEFORE', $this, 'handleAuthLoginCheck'); + $controller->register_hook('HTML_LOGINFORM_OUTPUT', 'BEFORE', $this, 'handleHtmlLoginformOutput'); } /** @@ -30,17 +28,18 @@ class action_plugin_authad extends DokuWiki_Action_Plugin { * @param Doku_Event $event * @param array $param */ - public function handle_auth_login_check(Doku_Event &$event, $param) { + public function handleAuthLoginCheck(Doku_Event $event, $param) + { global $INPUT; /** @var auth_plugin_authad $auth */ global $auth; - if(!is_a($auth, 'auth_plugin_authad')) return; // AD not even used + if (!is_a($auth, 'auth_plugin_authad')) return; // AD not even used - if($INPUT->str('dom')) { + if ($INPUT->str('dom')) { $usr = $auth->cleanUser($event->data['user']); - $dom = $auth->_userDomain($usr); - if(!$dom) { + $dom = $auth->getUserDomain($usr); + if (!$dom) { $usr = "$usr@".$INPUT->str('dom'); } $INPUT->post->set('u', $usr); @@ -54,26 +53,27 @@ class action_plugin_authad extends DokuWiki_Action_Plugin { * @param Doku_Event $event * @param array $param */ - public function handle_html_loginform_output(Doku_Event &$event, $param) { + public function handleHtmlLoginformOutput(Doku_Event $event, $param) + { global $INPUT; /** @var auth_plugin_authad $auth */ global $auth; - if(!is_a($auth, 'auth_plugin_authad')) return; // AD not even used - $domains = $auth->_getConfiguredDomains(); - if(count($domains) <= 1) return; // no choice at all + if (!is_a($auth, 'auth_plugin_authad')) return; // AD not even used + $domains = $auth->getConfiguredDomains(); + if (count($domains) <= 1) return; // no choice at all /** @var Doku_Form $form */ $form =& $event->data; // any default? $dom = ''; - if($INPUT->has('u')) { + if ($INPUT->has('u')) { $usr = $auth->cleanUser($INPUT->str('u')); - $dom = $auth->_userDomain($usr); + $dom = $auth->getUserDomain($usr); // update user field value - if($dom) { - $usr = $auth->_userName($usr); + if ($dom) { + $usr = $auth->getUserName($usr); $pos = $form->findElementByAttribute('name', 'u'); $ele =& $form->getElementAt($pos); $ele['value'] = $usr; @@ -85,7 +85,6 @@ class action_plugin_authad extends DokuWiki_Action_Plugin { $pos = $form->findElementByAttribute('name', 'p'); $form->insertElement($pos + 1, $element); } - } -// vim:ts=4:sw=4:et:
\ No newline at end of file +// vim:ts=4:sw=4:et: diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 50f708456..27a6b229e 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -1,9 +1,4 @@ <?php -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -require_once(DOKU_PLUGIN.'authad/adLDAP/adLDAP.php'); -require_once(DOKU_PLUGIN.'authad/adLDAP/classes/adLDAPUtils.php'); /** * Active Directory authentication backend for DokuWiki @@ -41,7 +36,8 @@ require_once(DOKU_PLUGIN.'authad/adLDAP/classes/adLDAPUtils.php'); * @author Andreas Gohr <andi@splitbrain.org> * @author Jan Schumann <js@schumann-it.com> */ -class auth_plugin_authad extends DokuWiki_Auth_Plugin { +class auth_plugin_authad extends DokuWiki_Auth_Plugin +{ /** * @var array hold connection data for a specific AD domain @@ -66,52 +62,53 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { /** * @var array filter patterns for listing users */ - protected $_pattern = array(); - - protected $_actualstart = 0; + protected $pattern = array(); - protected $_grpsusers = array(); + protected $grpsusers = array(); /** * Constructor */ - public function __construct() { + public function __construct() + { global $INPUT; parent::__construct(); + require_once(DOKU_PLUGIN.'authad/adLDAP/adLDAP.php'); + require_once(DOKU_PLUGIN.'authad/adLDAP/classes/adLDAPUtils.php'); + // we load the config early to modify it a bit here $this->loadConfig(); // additional information fields - if(isset($this->conf['additional'])) { + if (isset($this->conf['additional'])) { $this->conf['additional'] = str_replace(' ', '', $this->conf['additional']); $this->conf['additional'] = explode(',', $this->conf['additional']); } else $this->conf['additional'] = array(); // ldap extension is needed - if(!function_exists('ldap_connect')) { - if($this->conf['debug']) + if (!function_exists('ldap_connect')) { + if ($this->conf['debug']) msg("AD Auth: PHP LDAP extension not found.", -1); $this->success = false; return; } // Prepare SSO - if(!empty($_SERVER['REMOTE_USER'])) { - + if (!empty($_SERVER['REMOTE_USER'])) { // make sure the right encoding is used - if($this->getConf('sso_charset')) { + if ($this->getConf('sso_charset')) { $_SERVER['REMOTE_USER'] = iconv($this->getConf('sso_charset'), 'UTF-8', $_SERVER['REMOTE_USER']); - } elseif(!utf8_check($_SERVER['REMOTE_USER'])) { + } elseif (!\dokuwiki\Utf8\Clean::isUtf8($_SERVER['REMOTE_USER'])) { $_SERVER['REMOTE_USER'] = utf8_encode($_SERVER['REMOTE_USER']); } // trust the incoming user - if($this->conf['sso']) { + if ($this->conf['sso']) { $_SERVER['REMOTE_USER'] = $this->cleanUser($_SERVER['REMOTE_USER']); // we need to simulate a login - if(empty($_COOKIE[DOKU_COOKIE])) { + if (empty($_COOKIE[DOKU_COOKIE])) { $INPUT->set('u', $_SERVER['REMOTE_USER']); $INPUT->set('p', 'sso_only'); } @@ -130,10 +127,11 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param string $cap * @return bool */ - public function canDo($cap) { + public function canDo($cap) + { //capabilities depend on config, which may change depending on domain - $domain = $this->_userDomain($_SERVER['REMOTE_USER']); - $this->_loadServerConfig($domain); + $domain = $this->getUserDomain($_SERVER['REMOTE_USER']); + $this->loadServerConfig($domain); return parent::canDo($cap); } @@ -149,16 +147,22 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param string $pass * @return bool */ - public function checkPass($user, $pass) { - if($_SERVER['REMOTE_USER'] && + public function checkPass($user, $pass) + { + if ($_SERVER['REMOTE_USER'] && $_SERVER['REMOTE_USER'] == $user && $this->conf['sso'] ) return true; - $adldap = $this->_adldap($this->_userDomain($user)); - if(!$adldap) return false; + $adldap = $this->initAdLdap($this->getUserDomain($user)); + if (!$adldap) return false; - return $adldap->authenticate($this->_userName($user), $pass); + try { + return $adldap->authenticate($this->getUserName($user), $pass); + } catch (adLDAPException $e) { + // shouldn't really happen + return false; + } } /** @@ -186,14 +190,15 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin * @return array */ - public function getUserData($user, $requireGroups=true) { + public function getUserData($user, $requireGroups = true) + { global $conf; global $lang; global $ID; - $adldap = $this->_adldap($this->_userDomain($user)); - if(!$adldap) return false; + $adldap = $this->initAdLdap($this->getUserDomain($user)); + if (!$adldap) return array(); - if($user == '') return array(); + if ($user == '') return array(); $fields = array('mail', 'displayname', 'samaccountname', 'lastpwd', 'pwdlastset', 'useraccountcontrol'); @@ -203,8 +208,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $fields = array_filter($fields); //get info for given user - $result = $adldap->user()->info($this->_userName($user), $fields); - if($result == false){ + $result = $adldap->user()->info($this->getUserName($user), $fields); + if ($result == false) { return array(); } @@ -220,52 +225,56 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $info['expires'] = !($result[0]['useraccountcontrol'][0] & 0x10000); //ADS_UF_DONT_EXPIRE_PASSWD // additional information - foreach($this->conf['additional'] as $field) { - if(isset($result[0][strtolower($field)])) { + foreach ($this->conf['additional'] as $field) { + if (isset($result[0][strtolower($field)])) { $info[$field] = $result[0][strtolower($field)][0]; } } // handle ActiveDirectory memberOf - $info['grps'] = $adldap->user()->groups($this->_userName($user),(bool) $this->opts['recursive_groups']); + $info['grps'] = $adldap->user()->groups($this->getUserName($user), (bool) $this->opts['recursive_groups']); - if(is_array($info['grps'])) { - foreach($info['grps'] as $ndx => $group) { + if (is_array($info['grps'])) { + foreach ($info['grps'] as $ndx => $group) { $info['grps'][$ndx] = $this->cleanGroup($group); } } // always add the default group to the list of groups - if(!is_array($info['grps']) || !in_array($conf['defaultgroup'], $info['grps'])) { + if (!is_array($info['grps']) || !in_array($conf['defaultgroup'], $info['grps'])) { $info['grps'][] = $conf['defaultgroup']; } // add the user's domain to the groups - $domain = $this->_userDomain($user); - if($domain && !in_array("domain-$domain", (array) $info['grps'])) { + $domain = $this->getUserDomain($user); + if ($domain && !in_array("domain-$domain", (array) $info['grps'])) { $info['grps'][] = $this->cleanGroup("domain-$domain"); } // check expiry time - if($info['expires'] && $this->conf['expirywarn']){ - $expiry = $adldap->user()->passwordExpiry($user); - if(is_array($expiry)){ - $info['expiresat'] = $expiry['expiryts']; - $info['expiresin'] = round(($info['expiresat'] - time())/(24*60*60)); - - // if this is the current user, warn him (once per request only) - if(($_SERVER['REMOTE_USER'] == $user) && - ($info['expiresin'] <= $this->conf['expirywarn']) && - !$this->msgshown - ) { - $msg = sprintf($this->getLang('authpwdexpire'), $info['expiresin']); - if($this->canDo('modPass')) { - $url = wl($ID, array('do'=> 'profile')); - $msg .= ' <a href="'.$url.'">'.$lang['btn_profile'].'</a>'; + if ($info['expires'] && $this->conf['expirywarn']) { + try { + $expiry = $adldap->user()->passwordExpiry($user); + if (is_array($expiry)) { + $info['expiresat'] = $expiry['expiryts']; + $info['expiresin'] = round(($info['expiresat'] - time())/(24*60*60)); + + // if this is the current user, warn him (once per request only) + if (($_SERVER['REMOTE_USER'] == $user) && + ($info['expiresin'] <= $this->conf['expirywarn']) && + !$this->msgshown + ) { + $msg = sprintf($this->getLang('authpwdexpire'), $info['expiresin']); + if ($this->canDo('modPass')) { + $url = wl($ID, array('do'=> 'profile')); + $msg .= ' <a href="'.$url.'">'.$lang['btn_profile'].'</a>'; + } + msg($msg); + $this->msgshown = true; } - msg($msg); - $this->msgshown = true; } + } catch (adLDAPException $e) { + // ignore. should usually not happen } } @@ -281,11 +290,12 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param string $group * @return string */ - public function cleanGroup($group) { + public function cleanGroup($group) + { $group = str_replace('\\', '', $group); $group = str_replace('#', '', $group); $group = preg_replace('[\s]', '_', $group); - $group = utf8_strtolower(trim($group)); + $group = \dokuwiki\Utf8\PhpString::strtolower(trim($group)); return $group; } @@ -298,27 +308,28 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param string $user * @return string */ - public function cleanUser($user) { + public function cleanUser($user) + { $domain = ''; // get NTLM or Kerberos domain part list($dom, $user) = explode('\\', $user, 2); - if(!$user) $user = $dom; - if($dom) $domain = $dom; + if (!$user) $user = $dom; + if ($dom) $domain = $dom; list($user, $dom) = explode('@', $user, 2); - if($dom) $domain = $dom; + if ($dom) $domain = $dom; // clean up both - $domain = utf8_strtolower(trim($domain)); - $user = utf8_strtolower(trim($user)); + $domain = \dokuwiki\Utf8\PhpString::strtolower(trim($domain)); + $user = \dokuwiki\Utf8\PhpString::strtolower(trim($user)); - // is this a known, valid domain? if not discard - if(!is_array($this->conf[$domain])) { + // is this a known, valid domain or do we work without account suffix? if not discard + if (!is_array($this->conf[$domain]) && $this->conf['account_suffix'] !== '') { $domain = ''; } // reattach domain - if($domain) $user = "$user@$domain"; + if ($domain) $user = "$user@$domain"; return $user; } @@ -327,7 +338,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * * @return bool */ - public function isCaseSensitive() { + public function isCaseSensitive() + { return false; } @@ -337,11 +349,12 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param array $filter * @return string */ - protected function _constructSearchString($filter){ - if (!$filter){ + protected function constructSearchString($filter) + { + if (!$filter) { return '*'; } - $adldapUtils = new adLDAPUtils($this->_adldap(null)); + $adldapUtils = new adLDAPUtils($this->initAdLdap(null)); $result = '*'; if (isset($filter['name'])) { $result .= ')(displayname=*' . $adldapUtils->ldapSlashes($filter['name']) . '*'; @@ -366,32 +379,41 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param array $filter $filter array of field/pattern pairs, empty array for no filter * @return int number of users */ - public function getUserCount($filter = array()) { - $adldap = $this->_adldap(null); - if(!$adldap) { + public function getUserCount($filter = array()) + { + $adldap = $this->initAdLdap(null); + if (!$adldap) { dbglog("authad/auth.php getUserCount(): _adldap not set."); return -1; } if ($filter == array()) { $result = $adldap->user()->all(); } else { - $searchString = $this->_constructSearchString($filter); + $searchString = $this->constructSearchString($filter); $result = $adldap->user()->all(false, $searchString); if (isset($filter['grps'])) { $this->users = array_fill_keys($result, false); + /** @var admin_plugin_usermanager $usermanager */ $usermanager = plugin_load("admin", "usermanager", false); $usermanager->setLastdisabled(true); - if (!isset($this->_grpsusers[$this->_filterToString($filter)])){ - $this->_fillGroupUserArray($filter,$usermanager->getStart() + 3*$usermanager->getPagesize()); - } elseif (count($this->_grpsusers[$this->_filterToString($filter)]) < $usermanager->getStart() + 3*$usermanager->getPagesize()) { - $this->_fillGroupUserArray($filter,$usermanager->getStart() + 3*$usermanager->getPagesize() - count($this->_grpsusers[$this->_filterToString($filter)])); + if (!isset($this->grpsusers[$this->filterToString($filter)])) { + $this->fillGroupUserArray($filter, $usermanager->getStart() + 3*$usermanager->getPagesize()); + } elseif (count($this->grpsusers[$this->filterToString($filter)]) < + $usermanager->getStart() + 3*$usermanager->getPagesize() + ) { + $this->fillGroupUserArray( + $filter, + $usermanager->getStart() + + 3*$usermanager->getPagesize() - + count($this->grpsusers[$this->filterToString($filter)]) + ); } - $result = $this->_grpsusers[$this->_filterToString($filter)]; + $result = $this->grpsusers[$this->filterToString($filter)]; } else { + /** @var admin_plugin_usermanager $usermanager */ $usermanager = plugin_load("admin", "usermanager", false); $usermanager->setLastdisabled(false); } - } if (!$result) { @@ -407,7 +429,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param array $filter * @return string */ - protected function _filterToString ($filter) { + protected function filterToString($filter) + { $result = ''; if (isset($filter['user'])) { $result .= 'user-' . $filter['user']; @@ -433,24 +456,30 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param int $numberOfAdds additional number of users requested * @return int number of Users actually add to Array */ - protected function _fillGroupUserArray($filter, $numberOfAdds){ - $this->_grpsusers[$this->_filterToString($filter)]; - $i = 0; + protected function fillGroupUserArray($filter, $numberOfAdds) + { + if (isset($this->grpsusers[$this->filterToString($filter)])) { + $actualstart = count($this->grpsusers[$this->filterToString($filter)]); + } else { + $this->grpsusers[$this->filterToString($filter)] = []; + $actualstart = 0; + } + + $i=0; $count = 0; - $this->_constructPattern($filter); + $this->constructPattern($filter); foreach ($this->users as $user => &$info) { - if($i++ < $this->_actualstart) { + if ($i++ < $actualstart) { continue; } - if($info === false) { + if ($info === false) { $info = $this->getUserData($user); } - if($this->_filter($user, $info)) { - $this->_grpsusers[$this->_filterToString($filter)][$user] = $info; - if(($numberOfAdds > 0) && (++$count >= $numberOfAdds)) break; + if ($this->filter($user, $info)) { + $this->grpsusers[$this->filterToString($filter)][$user] = $info; + if (($numberOfAdds > 0) && (++$count >= $numberOfAdds)) break; } } - $this->_actualstart = $i; return $count; } @@ -464,50 +493,61 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param array $filter array of field/pattern pairs, null for no filter * @return array userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($start = 0, $limit = 0, $filter = array()) { - $adldap = $this->_adldap(null); - if(!$adldap) return false; + public function retrieveUsers($start = 0, $limit = 0, $filter = array()) + { + $adldap = $this->initAdLdap(null); + if (!$adldap) return array(); - if(!$this->users) { + //if (!$this->users) { //get info for given user - $result = $adldap->user()->all(false, $this->_constructSearchString($filter)); + $result = $adldap->user()->all(false, $this->constructSearchString($filter)); if (!$result) return array(); $this->users = array_fill_keys($result, false); - } + //} $i = 0; $count = 0; $result = array(); if (!isset($filter['grps'])) { + /** @var admin_plugin_usermanager $usermanager */ $usermanager = plugin_load("admin", "usermanager", false); $usermanager->setLastdisabled(false); - $this->_constructPattern($filter); - foreach($this->users as $user => &$info) { - if($i++ < $start) { + $this->constructPattern($filter); + foreach ($this->users as $user => &$info) { + if ($i++ < $start) { continue; } - if($info === false) { + if ($info === false) { $info = $this->getUserData($user); } $result[$user] = $info; - if(($limit > 0) && (++$count >= $limit)) break; + if (($limit > 0) && (++$count >= $limit)) break; } } else { + /** @var admin_plugin_usermanager $usermanager */ $usermanager = plugin_load("admin", "usermanager", false); $usermanager->setLastdisabled(true); - if (!isset($this->_grpsusers[$this->_filterToString($filter)]) || count($this->_grpsusers[$this->_filterToString($filter)]) < ($start+$limit)) { - $this->_fillGroupUserArray($filter,$start+$limit - count($this->_grpsusers[$this->_filterToString($filter)]) +1); + if (!isset($this->grpsusers[$this->filterToString($filter)]) || + count($this->grpsusers[$this->filterToString($filter)]) < ($start+$limit) + ) { + if(!isset($this->grpsusers[$this->filterToString($filter)])) { + $this->grpsusers[$this->filterToString($filter)] = []; + } + + $this->fillGroupUserArray( + $filter, + $start+$limit - count($this->grpsusers[$this->filterToString($filter)]) +1 + ); } - if (!$this->_grpsusers[$this->_filterToString($filter)]) return false; - foreach($this->_grpsusers[$this->_filterToString($filter)] as $user => &$info) { - if($i++ < $start) { + if (!$this->grpsusers[$this->filterToString($filter)]) return array(); + foreach ($this->grpsusers[$this->filterToString($filter)] as $user => &$info) { + if ($i++ < $start) { continue; } $result[$user] = $info; - if(($limit > 0) && (++$count >= $limit)) break; + if (($limit > 0) && (++$count >= $limit)) break; } - } return $result; } @@ -519,45 +559,46 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param array $changes array of field/value pairs to be changed * @return bool */ - public function modifyUser($user, $changes) { + public function modifyUser($user, $changes) + { $return = true; - $adldap = $this->_adldap($this->_userDomain($user)); - if(!$adldap) { + $adldap = $this->initAdLdap($this->getUserDomain($user)); + if (!$adldap) { msg($this->getLang('connectfail'), -1); return false; } // password changing - if(isset($changes['pass'])) { + if (isset($changes['pass'])) { try { - $return = $adldap->user()->password($this->_userName($user),$changes['pass']); + $return = $adldap->user()->password($this->getUserName($user), $changes['pass']); } catch (adLDAPException $e) { if ($this->conf['debug']) msg('AD Auth: '.$e->getMessage(), -1); $return = false; } - if(!$return) msg($this->getLang('passchangefail'), -1); + if (!$return) msg($this->getLang('passchangefail'), -1); } // changing user data $adchanges = array(); - if(isset($changes['name'])) { + if (isset($changes['name'])) { // get first and last name $parts = explode(' ', $changes['name']); $adchanges['surname'] = array_pop($parts); $adchanges['firstname'] = join(' ', $parts); $adchanges['display_name'] = $changes['name']; } - if(isset($changes['mail'])) { + if (isset($changes['mail'])) { $adchanges['email'] = $changes['mail']; } - if(count($adchanges)) { + if (count($adchanges)) { try { - $return = $return & $adldap->user()->modify($this->_userName($user),$adchanges); + $return = $return & $adldap->user()->modify($this->getUserName($user), $adchanges); } catch (adLDAPException $e) { if ($this->conf['debug']) msg('AD Auth: '.$e->getMessage(), -1); $return = false; } - if(!$return) msg($this->getLang('userchangefail'), -1); + if (!$return) msg($this->getLang('userchangefail'), -1); } return $return; @@ -573,20 +614,21 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param string|null $domain The AD domain to use * @return adLDAP|bool true if a connection was established */ - protected function _adldap($domain) { - if(is_null($domain) && is_array($this->opts)) { + protected function initAdLdap($domain) + { + if (is_null($domain) && is_array($this->opts)) { $domain = $this->opts['domain']; } - $this->opts = $this->_loadServerConfig((string) $domain); - if(isset($this->adldap[$domain])) return $this->adldap[$domain]; + $this->opts = $this->loadServerConfig((string) $domain); + if (isset($this->adldap[$domain])) return $this->adldap[$domain]; // connect try { $this->adldap[$domain] = new adLDAP($this->opts); return $this->adldap[$domain]; - } catch(adLDAPException $e) { - if($this->conf['debug']) { + } catch (Exception $e) { + if ($this->conf['debug']) { msg('AD Auth: '.$e->getMessage(), -1); } $this->success = false; @@ -601,7 +643,8 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param string $user * @return string */ - public function _userDomain($user) { + public function getUserDomain($user) + { list(, $domain) = explode('@', $user, 2); return $domain; } @@ -609,12 +652,17 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { /** * Get the user part from a user * + * When an account suffix is set, we strip the domain part from the user + * * @param string $user * @return string */ - public function _userName($user) { - list($name) = explode('@', $user, 2); - return $name; + public function getUserName($user) + { + if ($this->conf['account_suffix'] !== '') { + list($user) = explode('@', $user, 2); + } + return $user; } /** @@ -623,14 +671,15 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param string $domain current AD domain * @return array */ - protected function _loadServerConfig($domain) { + protected function loadServerConfig($domain) + { // prepare adLDAP standard configuration $opts = $this->conf; $opts['domain'] = $domain; // add possible domain specific configuration - if($domain && is_array($this->conf[$domain])) foreach($this->conf[$domain] as $key => $val) { + if ($domain && is_array($this->conf[$domain])) foreach ($this->conf[$domain] as $key => $val) { $opts[$key] = $val; } @@ -640,23 +689,27 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { $opts['domain_controllers'] = array_filter($opts['domain_controllers']); // compatibility with old option name - if(empty($opts['admin_username']) && !empty($opts['ad_username'])) $opts['admin_username'] = $opts['ad_username']; - if(empty($opts['admin_password']) && !empty($opts['ad_password'])) $opts['admin_password'] = $opts['ad_password']; + if (empty($opts['admin_username']) && !empty($opts['ad_username'])) { + $opts['admin_username'] = $opts['ad_username']; + } + if (empty($opts['admin_password']) && !empty($opts['ad_password'])) { + $opts['admin_password'] = $opts['ad_password']; + } $opts['admin_password'] = conf_decodeString($opts['admin_password']); // deobfuscate // we can change the password if SSL is set - if($opts['use_ssl'] || $opts['use_tls']) { + if ($opts['use_ssl'] || $opts['use_tls']) { $this->cando['modPass'] = true; } else { $this->cando['modPass'] = false; } // adLDAP expects empty user/pass as NULL, we're less strict FS#2781 - if(empty($opts['admin_username'])) $opts['admin_username'] = null; - if(empty($opts['admin_password'])) $opts['admin_password'] = null; + if (empty($opts['admin_username'])) $opts['admin_username'] = null; + if (empty($opts['admin_password'])) $opts['admin_password'] = null; // user listing needs admin priviledges - if(!empty($opts['admin_username']) && !empty($opts['admin_password'])) { + if (!empty($opts['admin_username']) && !empty($opts['admin_password'])) { $this->cando['getUsers'] = true; } else { $this->cando['getUsers'] = false; @@ -672,16 +725,17 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * * @return array associative array(key => domain) */ - public function _getConfiguredDomains() { + public function getConfiguredDomains() + { $domains = array(); - if(empty($this->conf['account_suffix'])) return $domains; // not configured yet + if (empty($this->conf['account_suffix'])) return $domains; // not configured yet // add default domain, using the name from account suffix $domains[''] = ltrim($this->conf['account_suffix'], '@'); // find additional domains - foreach($this->conf as $key => $val) { - if(is_array($val) && isset($val['account_suffix'])) { + foreach ($this->conf as $key => $val) { + if (is_array($val) && isset($val['account_suffix'])) { $domains[$key] = ltrim($val['account_suffix'], '@'); } } @@ -701,14 +755,15 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * @param array $info * @return bool */ - protected function _filter($user, $info) { - foreach($this->_pattern as $item => $pattern) { - if($item == 'user') { - if(!preg_match($pattern, $user)) return false; - } else if($item == 'grps') { - if(!count(preg_grep($pattern, $info['grps']))) return false; + protected function filter($user, $info) + { + foreach ($this->pattern as $item => $pattern) { + if ($item == 'user') { + if (!preg_match($pattern, $user)) return false; + } elseif ($item == 'grps') { + if (!count(preg_grep($pattern, $info['grps']))) return false; } else { - if(!preg_match($pattern, $info[$item])) return false; + if (!preg_match($pattern, $info[$item])) return false; } } return true; @@ -721,10 +776,11 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * * @param array $filter */ - protected function _constructPattern($filter) { - $this->_pattern = array(); - foreach($filter as $item => $pattern) { - $this->_pattern[$item] = '/'.str_replace('/', '\/', $pattern).'/i'; // allow regex characters + protected function constructPattern($filter) + { + $this->pattern = array(); + foreach ($filter as $item => $pattern) { + $this->pattern[$item] = '/'.str_replace('/', '\/', $pattern).'/i'; // allow regex characters } } } diff --git a/lib/plugins/authad/conf/default.php b/lib/plugins/authad/conf/default.php index f2834c808..84094ccc5 100644 --- a/lib/plugins/authad/conf/default.php +++ b/lib/plugins/authad/conf/default.php @@ -15,3 +15,4 @@ $conf['expirywarn'] = 0; $conf['additional'] = ''; $conf['update_name'] = 0; $conf['update_mail'] = 0; +$conf['recursive_groups'] = 0; diff --git a/lib/plugins/authad/conf/metadata.php b/lib/plugins/authad/conf/metadata.php index 6b0fc168b..945474c72 100644 --- a/lib/plugins/authad/conf/metadata.php +++ b/lib/plugins/authad/conf/metadata.php @@ -15,3 +15,4 @@ $meta['expirywarn'] = array('numeric', '_min'=>0,'_caution' => 'danger') $meta['additional'] = array('string','_caution' => 'danger'); $meta['update_name'] = array('onoff','_caution' => 'danger'); $meta['update_mail'] = array('onoff','_caution' => 'danger'); +$meta['recursive_groups'] = array('onoff','_caution' => 'danger'); diff --git a/lib/plugins/authad/lang/ar/lang.php b/lib/plugins/authad/lang/ar/lang.php index 173c80f0c..6ba640b33 100644 --- a/lib/plugins/authad/lang/ar/lang.php +++ b/lib/plugins/authad/lang/ar/lang.php @@ -2,9 +2,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Khalid <khalid.aljahil@gmail.com> * @author Mohamed Belhsine <b.mohamed897@gmail.com> * @author Usama Akkad <uahello@gmail.com> */ $lang['domain'] = 'مجال تسجيل الدخول'; $lang['authpwdexpire'] = 'ستنتهي صلاحية كلمة السر في %d . عليك بتغييرها سريعا.'; +$lang['passchangefail'] = 'فشل تغيير كلمة المرور. قد يكون السبب عدم موافاة شروط كلمة المرور.'; +$lang['connectfail'] = 'فشل الاتصال بخادم Active Directory'; diff --git a/lib/plugins/authad/lang/ar/settings.php b/lib/plugins/authad/lang/ar/settings.php index d2a2e2a35..78f3acaea 100644 --- a/lib/plugins/authad/lang/ar/settings.php +++ b/lib/plugins/authad/lang/ar/settings.php @@ -2,11 +2,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Khalid <khalid.aljahil@gmail.com> * @author alhajr <alhajr300@gmail.com> */ $lang['account_suffix'] = 'لاحقة الحساب الخاص بك. على سبيل المثال. <code>@my.domain.org</code>'; $lang['domain_controllers'] = 'قائمة مفصولة بفواصل من وحدات التحكم بالمجال. على سبيل المثال. <code>srv1.domain.org,srv2.domain.org</code>'; $lang['admin_password'] = 'كلمة المرور للمستخدم أعلاه.'; +$lang['sso'] = 'استخدام Kerberos أم NTLM لتسجيل الدخول الموحد؟'; $lang['real_primarygroup'] = 'ينبغي أن تحل المجموعة الأساسية الحقيقية بدلاً من افتراض "Domain Users" (أبطأ).'; +$lang['use_ssl'] = 'استخدام الاتصال المشفر (SSL)؟ في حال استخدامه الرجاء عدم تفعيل (TLS) أسفله.'; $lang['expirywarn'] = 'عدد الأيام المقدمة لتحذير المستخدم حول كلمة مرور منتهية الصلاحية. (0) للتعطيل.'; diff --git a/lib/plugins/authad/lang/bg/lang.php b/lib/plugins/authad/lang/bg/lang.php index 3de5df65f..816c4955e 100644 --- a/lib/plugins/authad/lang/bg/lang.php +++ b/lib/plugins/authad/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Kiril <neohidra@gmail.com> */ $lang['authpwdexpire'] = 'Срока на паролата ви ще изтече след %d дни. Препоръчително е да я смените по-скоро.'; diff --git a/lib/plugins/authad/lang/bg/settings.php b/lib/plugins/authad/lang/bg/settings.php index bf7a2d8ce..bcd2968dc 100644 --- a/lib/plugins/authad/lang/bg/settings.php +++ b/lib/plugins/authad/lang/bg/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Kiril <neohidra@gmail.com> */ $lang['account_suffix'] = 'Наставка на акаунта Ви. Например <code>@някакъв.домейн.org</code>'; diff --git a/lib/plugins/authad/lang/ca/settings.php b/lib/plugins/authad/lang/ca/settings.php index 161f55264..9aa38703b 100644 --- a/lib/plugins/authad/lang/ca/settings.php +++ b/lib/plugins/authad/lang/ca/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> * @author controlonline.net <controlonline.net@gmail.com> * @author Àngel Pérez Beroy <aperezberoy@gmail.com> * @author David Surroca <david.tb303@gmail.com> diff --git a/lib/plugins/authad/lang/cs/settings.php b/lib/plugins/authad/lang/cs/settings.php index c0e789581..d18d7ea1d 100644 --- a/lib/plugins/authad/lang/cs/settings.php +++ b/lib/plugins/authad/lang/cs/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Robert Surý <rsurycz@seznam.cz> * @author mkucera66 <mkucera66@seznam.cz> * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> * @author Daniel Slováček <danslo@danslo.cz> @@ -23,3 +24,4 @@ $lang['expirywarn'] = 'Dny mezi varováním o vypršení hesla uživa $lang['additional'] = 'Čárkou oddělený seznam dodatečných atributů získávaných z uživatelských dat. Využito některými pluginy.'; $lang['update_name'] = 'Povolit uživatelům upravit jejich AD zobrazované jméno?'; $lang['update_mail'] = 'Povolit uživatelům upravit svou emailovou adresu?'; +$lang['recursive_groups'] = 'Vyřešte vnořené skupiny do jejich příslušných členů (pomalejší).'; diff --git a/lib/plugins/authad/lang/da/lang.php b/lib/plugins/authad/lang/da/lang.php index 6badbafcc..c6a8778bb 100644 --- a/lib/plugins/authad/lang/da/lang.php +++ b/lib/plugins/authad/lang/da/lang.php @@ -7,6 +7,7 @@ * @author Mikael Lyngvig <mikael@lyngvig.org> */ $lang['domain'] = 'Logondomæne'; -$lang['authpwdexpire'] = 'Din adgangskode vil udløbe om %d dage, du bør ændre det snart.'; +$lang['authpwdexpire'] = 'Din adgangskode vil udløbe om %d dage, du bør ændre den snart.'; $lang['passchangefail'] = 'Kunne ikke skifte adgangskoden. Måske blev adgangskodepolitikken ikke opfyldt?'; +$lang['userchangefail'] = 'Kunne ikke ændre brugerkontoen. Din konto har muligvis ikke rettigheder til at lave ændringer.'; $lang['connectfail'] = 'Kunne ikke forbinde til Active Directory serveren.'; diff --git a/lib/plugins/authad/lang/da/settings.php b/lib/plugins/authad/lang/da/settings.php index 8b2d62462..e93f979bf 100644 --- a/lib/plugins/authad/lang/da/settings.php +++ b/lib/plugins/authad/lang/da/settings.php @@ -3,21 +3,23 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jacob Palm <jacobpalmdk@icloud.com> * @author Soren Birk <soer9648@hotmail.com> * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> - * @author Jacob Palm <mail@jacobpalm.dk> */ $lang['account_suffix'] = 'Dit konto suffiks. F.eks. <code>@mit.domæne.dk</code>'; $lang['base_dn'] = 'Dit grund DN. F.eks. <code>DC=mit,DC=domæne,DC=dk</code>'; $lang['domain_controllers'] = 'En kommasepareret liste over domænecontrollere. F.eks. <code>srv1.domain.org,srv2.domain.org</code>'; $lang['admin_username'] = 'En privilegeret Active Directory bruger med adgang til alle andre brugeres data. Valgfri, men skal bruges til forskellige handlinger såsom at sende abonnement e-mails.'; -$lang['admin_password'] = 'Kodeordet til den ovenstående bruger.'; -$lang['sso'] = 'Bør Single-Sign-On via Kerberos eller NTLM bruges?'; +$lang['admin_password'] = 'Adgangskoden til den ovenstående brugerkonto.'; +$lang['sso'] = 'Skal der benyttes Single-Sign-On via Kerberos eller NTLM?'; +$lang['sso_charset'] = 'Tegnsættet din webserver leverer Kerberos eller NTLM brugernavnet i. Efterlad blank for UTF-8 eller latin-1. Kræver iconv udvidelsen.'; $lang['real_primarygroup'] = 'Bør den korrekte primære gruppe findes i stedet for at antage "Domain Users" (langsommere)'; -$lang['use_ssl'] = 'Benyt SSL forbindelse? hvis ja, vælg ikke TLS herunder.'; -$lang['use_tls'] = 'Benyt TLS forbindelse? hvis ja, vælg ikke SSL herover.'; +$lang['use_ssl'] = 'Benyt SSL forbindelse? Hvis ja, vælg ikke TLS herunder.'; +$lang['use_tls'] = 'Benyt TLS forbindelse? Hvis ja, vælg ikke SSL herover.'; $lang['debug'] = 'Vis yderligere debug output ved fejl?'; -$lang['expirywarn'] = 'Dage før brugere skal advares om udløben adgangskode. 0 for at deaktivere.'; +$lang['expirywarn'] = 'Dage før udløb af adgangskode brugere skal advares. Angiv 0 for at deaktivere notifikation.'; $lang['additional'] = 'En kommasepareret liste over yderligere AD attributter der skal hentes fra brugerdata. Brug af nogen udvidelser.'; $lang['update_name'] = 'Tillad at brugere opdaterer deres visningnavn i AD?'; $lang['update_mail'] = 'Tillad at brugere opdaterer deres e-mail adresse?'; +$lang['recursive_groups'] = 'Opslå nedarvede grupper til deres individuelle medlemmer (langsommere)'; diff --git a/lib/plugins/authad/lang/de/settings.php b/lib/plugins/authad/lang/de/settings.php index 5708411d2..5d8d9b8de 100644 --- a/lib/plugins/authad/lang/de/settings.php +++ b/lib/plugins/authad/lang/de/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author C!own77 <clown77@posteo.de> * @author Frank Loizzi <contact@software.bacal.de> * @author Matthias Schulte <dokuwiki@lupo49.de> * @author Ben Fey <benedikt.fey@beck-heun.de> @@ -24,3 +25,4 @@ $lang['expirywarn'] = 'Tage im Voraus um Benutzer über ablaufende Pa $lang['additional'] = 'Eine Komma-separierte Liste von zusätzlichen AD-Attributen, die von den Benutzerobjekten abgefragt werden. Wird von einigen Plugins benutzt.'; $lang['update_name'] = 'Benutzern erlauben, ihren AD Anzeige-Namen zu ändern?'; $lang['update_mail'] = 'Benutzern erlauben, ihre E-Mail-Adresse zu ändern?'; +$lang['recursive_groups'] = 'Auflösen verschachtelter Gruppen für ihre jeweiligen Mitglieder (langsamer).'; diff --git a/lib/plugins/authad/lang/el/lang.php b/lib/plugins/authad/lang/el/lang.php index c6064f05c..2728d0163 100644 --- a/lib/plugins/authad/lang/el/lang.php +++ b/lib/plugins/authad/lang/el/lang.php @@ -3,6 +3,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com + * @author Katerina Katapodi <extragold1234@hotmail.com> + * @author Vasileios Karavasilis <vasileioskaravasilis@gmail.com> */ +$lang['domain'] = 'Logon Domain'; $lang['authpwdexpire'] = 'Ο κωδικός πρόσβασης θα λήξει σε %d ημέρες. Προτείνουμε να τον αλλάξετε σύντομα.'; +$lang['passchangefail'] = 'Ο κωδικός πρόσβασης δεν μπόρεσε να αλλάξει. Μήπως δεν ακολουθήθηκαν οι κατάλληλες οδηγίες της πολιτικής κωδικού πρόσβασης?'; +$lang['userchangefail'] = 'Αποτυχία αλλαγής των στοιχείων του χρήστη. Μπορεί ο λογαριασμός σας να μην έχει άδεια να κάνει αλλαγές. '; +$lang['connectfail'] = 'Δεν μπόρεσε να συνδέσει στον διακομιστή Active Directory (Ενεργή Λίστα διευθύνσεων).'; diff --git a/lib/plugins/authad/lang/el/settings.php b/lib/plugins/authad/lang/el/settings.php index b7608dff0..381b59307 100644 --- a/lib/plugins/authad/lang/el/settings.php +++ b/lib/plugins/authad/lang/el/settings.php @@ -3,6 +3,22 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Aikaterini Katapodi <extragold1234@hotmail.com> * @author chris taklis <ctaklis@gmail.com> */ +$lang['account_suffix'] = 'Το πρόσημο του λογαριασμού σας. Π.χ <code>@my.domain.org</code>'; +$lang['base_dn'] = 'Το βασικό σας DN. Eg. <code>DC=my,DC=domain,DC=org</code> '; +$lang['domain_controllers'] = 'Μία λίστα χωρισμένη με κόμμα, των ελεγκτών του Domain. Π.χ. <code>srv1.domain.org,srv2.domain.org</code> '; +$lang['admin_username'] = 'Ένας προνομιούχος χρήστης της Ενεργούς Λίστας Διευθύνσεων με πρόσβαση στα δεδομένα άλλων χρηστών. Προαιρετικό, αλλά χρειάζεται για ορισμένες ενέργειες όπως αποστολή ηλεκτρονικών μηνυμάτων εγγραφής. '; $lang['admin_password'] = 'Ο κωδικός του παραπάνω χρήστη.'; +$lang['sso'] = 'Πρέπει να χρησιμοποιηθεί το Single-Sign-On μέσω Kerberos ή το NTLM ? '; +$lang['sso_charset'] = 'To \'\'charset\'\' που ο διακομιστής ιστοσελίδας σας θα περάσει το Kerberos ή το όνομα χρήστη NTLM . Είναι άδειο για το UTF-8 η το λατινικό -1. Χρειάζεται την προέκταση inconv. '; +$lang['real_primarygroup'] = 'Πρέπει να ισχύσει η βασική ομάδα αντί να ληφθεί υπόψη το \'\'Domain Users\'\' (πιο αργό).'; +$lang['use_ssl'] = 'Να γίνει χρήση της σύνδεσης SSL? Αν χρησιμοποιείται μην ενεργοποιείστε το TLS πιο κάτω. '; +$lang['use_tls'] = 'Να γίνει σύνδεση του TLS?Αν ήδη χρησιμοποιείται, μην ενεργοποιείστε το SSL πιο πάνω. '; +$lang['debug'] = 'Να προβληθεί το επιπλέον σύστημα ανίχνευσης λαθών ?'; +$lang['expirywarn'] = 'Πρέπει να προειδοποιηθεί ο χρήστης πριν λίγες ημέρες για την λήξη του κωδικού πρόσβασης. 0 για να απενεργοποιείστε.'; +$lang['additional'] = 'Μία λίστα που χωρίζεται με κόμμα, με AD επιπλέον ιδιότητες για να φέρουν στοιχεία από τον χρήστη. Χρησιμοποιείται από κάποια επιπρόσθετα.'; +$lang['update_name'] = 'Να επιτρέπεται στους χρήστες να ενημερώνουν το AD όνομα τους που προβάλλεται?'; +$lang['update_mail'] = 'Να επιτρέπεται στους χρήστες να ενημερώνουν την διεύθυνση ηλεκτρονικού τους ταχυδρομείου?'; +$lang['recursive_groups'] = 'Να γίνεται καταχώρηση των μελών των ομάδων?'; diff --git a/lib/plugins/authad/lang/en/settings.php b/lib/plugins/authad/lang/en/settings.php index 9e7a7c320..3de9a7260 100644 --- a/lib/plugins/authad/lang/en/settings.php +++ b/lib/plugins/authad/lang/en/settings.php @@ -15,3 +15,4 @@ $lang['expirywarn'] = 'Days in advance to warn user about expiring passw $lang['additional'] = 'A comma separated list of additional AD attributes to fetch from user data. Used by some plugins.'; $lang['update_name'] = 'Allow users to update their AD display name?'; $lang['update_mail'] = 'Allow users to update their email address?'; +$lang['recursive_groups'] = 'Resolve nested groups to their respective members (slower).'; diff --git a/lib/plugins/authad/lang/eo/lang.php b/lib/plugins/authad/lang/eo/lang.php index 94580c6cf..2beab5f2e 100644 --- a/lib/plugins/authad/lang/eo/lang.php +++ b/lib/plugins/authad/lang/eo/lang.php @@ -3,7 +3,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Florian <florianmail55@gmail.com> * @author Robert Bogenschneider <bogi@uea.org> */ $lang['domain'] = 'Ensaluta domajno'; $lang['authpwdexpire'] = 'Via pasvorto malvalidos post %d tagoj, prefere ŝanĝu ĝin baldaũ.'; +$lang['connectfail'] = 'Malsukcesis konekti al Aktivan Dosierumon servilo.'; diff --git a/lib/plugins/authad/lang/eo/settings.php b/lib/plugins/authad/lang/eo/settings.php index cf9cad0c2..09b594c51 100644 --- a/lib/plugins/authad/lang/eo/settings.php +++ b/lib/plugins/authad/lang/eo/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Florian <florianmail55@gmail.com> * @author Robert Bogenschneider <bogi@uea.org> */ $lang['account_suffix'] = 'Via konto-aldonaĵo, ekz. <code>@mia.domajno.lando</code>'; @@ -18,3 +19,4 @@ $lang['use_tls'] = 'Ĉu uzi TLS-konekton? Se jes, ne aktivigu SSL $lang['debug'] = 'Ĉu montri aldonajn informojn dum eraroj?'; $lang['expirywarn'] = 'Tagoj da antaŭaverto pri malvalidiĝonta pasvorto. 0 por malebligi.'; $lang['additional'] = 'Komodisigita listo de aldonaj AD-atributoj por preni el uzantaj datumoj. Uzita de iuj kromaĵoj.'; +$lang['update_mail'] = 'Ĉu permesi uzantoj ĝisdatigi siajn retardesojn?'; diff --git a/lib/plugins/authad/lang/es/settings.php b/lib/plugins/authad/lang/es/settings.php index 789222236..c329c8e7f 100644 --- a/lib/plugins/authad/lang/es/settings.php +++ b/lib/plugins/authad/lang/es/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Liliana <lilianasaidon@gmail.com> * @author monica <may.dorado@gmail.com> * @author Antonio Bueno <atnbueno@gmail.com> * @author Juan De La Cruz <juann.dlc@gmail.com> @@ -24,3 +25,4 @@ $lang['expirywarn'] = 'Días por adelantado para avisar al usuario de $lang['additional'] = 'Una lista separada por comas de atributos AD adicionales a obtener de los datos de usuario. Usado por algunos plugins.'; $lang['update_name'] = '¿Permitir a los usuarios actualizar su nombre de AD?'; $lang['update_mail'] = '¿Permitir a los usuarios actualizar su email?'; +$lang['recursive_groups'] = 'Restituir los grupos anidados a sus respectivos miembros (más lento)'; diff --git a/lib/plugins/authad/lang/fi/lang.php b/lib/plugins/authad/lang/fi/lang.php index 88a87b87c..776e68a86 100644 --- a/lib/plugins/authad/lang/fi/lang.php +++ b/lib/plugins/authad/lang/fi/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Jussi Takala <jussi.takala@live.fi> */ $lang['authpwdexpire'] = 'Salasanasi vanhenee %d pv:n päästä, vaihda salasanasi pikaisesti.'; diff --git a/lib/plugins/authad/lang/fi/settings.php b/lib/plugins/authad/lang/fi/settings.php index e2f432f36..f0b5276e7 100644 --- a/lib/plugins/authad/lang/fi/settings.php +++ b/lib/plugins/authad/lang/fi/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Otto Vainio <otto@valjakko.net> */ $lang['debug'] = 'Näytä lisää debug-koodia virheistä?'; diff --git a/lib/plugins/authad/lang/fr/settings.php b/lib/plugins/authad/lang/fr/settings.php index f747c08ae..f0717c7a8 100644 --- a/lib/plugins/authad/lang/fr/settings.php +++ b/lib/plugins/authad/lang/fr/settings.php @@ -3,16 +3,16 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Schplurtz le Déboulonné <schplurtz@laposte.net> * @author Bruno Veilleux <bruno.vey@gmail.com> * @author Momo50 <c.brothelande@gmail.com> - * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> */ $lang['account_suffix'] = 'Le suffixe de votre compte. Ex.: <code>@mon.domaine.org</code>'; $lang['base_dn'] = 'Votre nom de domaine de base. <code>DC=mon,DC=domaine,DC=org</code>'; $lang['domain_controllers'] = 'Une liste de contrôleurs de domaine séparés par des virgules. Ex.: <code>srv1.domaine.org,srv2.domaine.org</code>'; $lang['admin_username'] = 'Un utilisateur Active Directory avec accès aux données de tous les autres utilisateurs. Facultatif, mais nécessaire pour certaines actions telles que l\'envoi de courriels d\'abonnement.'; $lang['admin_password'] = 'Le mot de passe de l\'utilisateur ci-dessus.'; -$lang['sso'] = 'Est-ce que la connexion unique (Single-Sign-On) par Kerberos ou NTLM doit être utilisée?'; +$lang['sso'] = 'Est-ce que l\'authentification unique (Single-Sign-On) par Kerberos ou NTLM doit être utilisée?'; $lang['sso_charset'] = 'Le jeu de caractères de votre serveur web va passer le nom d\'utilisateur Kerberos ou NTLM. Vide pour UTF-8 ou latin-1. Nécessite l\'extension iconv.'; $lang['real_primarygroup'] = 'Est-ce que le véritable groupe principal doit être résolu au lieu de présumer "Domain Users" (plus lent)?'; $lang['use_ssl'] = 'Utiliser une connexion SSL? Si utilisée, n\'activez pas TLS ci-dessous.'; @@ -22,3 +22,4 @@ $lang['expirywarn'] = 'Jours d\'avance pour l\'avertissement envoyé $lang['additional'] = 'Une liste séparée par des virgules d\'attributs AD supplémentaires à récupérer dans les données utilisateur. Utilisée par certains modules.'; $lang['update_name'] = 'Autoriser les utilisateurs à modifier leur nom affiché de l\'AD ?'; $lang['update_mail'] = 'Autoriser les utilisateurs à modifier leur adresse de courriel ?'; +$lang['recursive_groups'] = 'Résoudre les groupes imbriqués à leur membres respectifs (plus lent).'; diff --git a/lib/plugins/authad/lang/it/settings.php b/lib/plugins/authad/lang/it/settings.php index 9fd82352a..8d641720b 100644 --- a/lib/plugins/authad/lang/it/settings.php +++ b/lib/plugins/authad/lang/it/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Roberto Bellingeri <bellingeri@netguru.it> * @author Edmondo Di Tucci <snarchio@gmail.com> * @author Torpedo <dgtorpedo@gmail.com> */ @@ -21,3 +22,4 @@ $lang['expirywarn'] = 'Giorni di preavviso per la scadenza della pass $lang['additional'] = 'Valori separati da virgola di attributi AD addizionali da caricare dai dati utente. Usato da alcuni plugin.'; $lang['update_name'] = 'Permettere agli utenti di aggiornare il loro nome AD visualizzato? '; $lang['update_mail'] = 'Permettere agli utenti di aggiornare il loro indirizzo e-mail?'; +$lang['recursive_groups'] = 'Risolvi i gruppi nidificati ai rispettivi membri (più lento).'; diff --git a/lib/plugins/authad/lang/ja/settings.php b/lib/plugins/authad/lang/ja/settings.php index 0dc56494a..84f09b469 100644 --- a/lib/plugins/authad/lang/ja/settings.php +++ b/lib/plugins/authad/lang/ja/settings.php @@ -3,22 +3,24 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> * @author Satoshi Sahara <sahara.satoshi@gmail.com> * @author Hideaki SAWADA <chuno@live.jp> * @author PzF_X <jp_minecraft@yahoo.co.jp> */ -$lang['account_suffix'] = 'アカウントの接尾語。例:<code>@my.domain.org</code>'; -$lang['base_dn'] = 'ベースDN。例:<code>DC=my,DC=domain,DC=org</code>'; -$lang['domain_controllers'] = 'ドメインコントローラのカンマ区切り一覧。例:<code>srv1.domain.org,srv2.domain.org</code>'; -$lang['admin_username'] = '全ユーザーデータへのアクセス権のある特権Active Directoryユーザー。任意ですが、メール通知の登録等の特定の動作に必要。'; +$lang['account_suffix'] = 'アカウントの接尾語(例:<code>@my.domain.org</code>)'; +$lang['base_dn'] = 'ベースDN(例:<code>DC=my,DC=domain,DC=org</code>)'; +$lang['domain_controllers'] = 'ドメインコントローラのカンマ区切り一覧(例:<code>srv1.domain.org,srv2.domain.org</code>)'; +$lang['admin_username'] = '全ユーザーデータへのアクセス権のある特権Active Directoryユーザー(任意ですが、メール通知の登録等の特定の動作に必要となります。)'; $lang['admin_password'] = '上記ユーザーのパスワード'; $lang['sso'] = 'Kerberos か NTLM を使ったシングルサインオン(SSO)をしますか?'; $lang['sso_charset'] = 'サーバーは空のUTF-8かLatin-1でKerberosかNTLMユーザネームを送信します。iconv拡張モジュールが必要です。'; $lang['real_primarygroup'] = '"Domain Users" を仮定する代わりに本当のプライマリグループを解決する(低速)'; -$lang['use_ssl'] = 'SSL接続を使用しますか?使用した場合、下のSSLを有効にしないでください。'; -$lang['use_tls'] = 'TLS接続を使用しますか?使用した場合、上のSSLを有効にしないでください。'; -$lang['debug'] = 'エラー時に追加のデバッグ出力を表示する?'; -$lang['expirywarn'] = '何日前からパスワードの有効期限をユーザーに警告する。0 の場合は無効'; -$lang['additional'] = 'ユーザデータから取得する追加AD属性のカンマ区切り一覧。いくつかのプラグインが使用する。'; -$lang['update_name'] = 'ユーザー自身にAD表示名の変更を許可しますか?'; -$lang['update_mail'] = 'ユーザー自身にメールアドレスの変更を許可しますか?'; +$lang['use_ssl'] = 'SSL接続を使用する(使用する場合、下のTLSを有効にしないでください。)'; +$lang['use_tls'] = 'TLS接続を使用する(使用する場合、上のSSLを有効にしないでください。)'; +$lang['debug'] = 'エラー時に追加のデバッグ出力を表示する'; +$lang['expirywarn'] = '何日前からパスワードの有効期限をユーザーに警告するか(0 の場合は無効)'; +$lang['additional'] = 'ユーザデータから取得する追加AD属性のカンマ区切り一覧(一部プラグインが使用します。)'; +$lang['update_name'] = 'ユーザー自身にAD表示名の変更を許可する'; +$lang['update_mail'] = 'ユーザー自身にメールアドレスの変更を許可する'; +$lang['recursive_groups'] = 'それぞれのメンバーについて入れ子のグループを解決する(動作が遅くなります)'; diff --git a/lib/plugins/authad/lang/nl/settings.php b/lib/plugins/authad/lang/nl/settings.php index c0be12e79..b8b58a1bb 100644 --- a/lib/plugins/authad/lang/nl/settings.php +++ b/lib/plugins/authad/lang/nl/settings.php @@ -3,8 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Remon <no@email.local> * @author Gerrit Uitslag <klapinklapin@gmail.com> + * @author Remon <no@email.local> * @author Sjoerd <sjoerd@sjomar.eu> */ $lang['account_suffix'] = 'Je account domeinnaam. Bijv <code>@mijn.domein.org</code>'; @@ -22,3 +22,4 @@ $lang['expirywarn'] = 'Waarschuwingstermijn voor vervallen wachtwoord $lang['additional'] = 'Een kommagescheiden lijst van extra AD attributen van de gebruiker. Wordt gebruikt door sommige plugins.'; $lang['update_name'] = 'Sta gebruikers toe om hun getoonde AD naam bij te werken'; $lang['update_mail'] = 'Sta gebruikers toe hun email adres bij te werken'; +$lang['recursive_groups'] = 'Zoek voor de geneste groepen hun respectievelijke leden op (langzamer).'; diff --git a/lib/plugins/authad/lang/pl/settings.php b/lib/plugins/authad/lang/pl/settings.php index d5af79c33..6e9814e8e 100644 --- a/lib/plugins/authad/lang/pl/settings.php +++ b/lib/plugins/authad/lang/pl/settings.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Bartek S <sadupl@gmail.com> + * @author Przemek <p_kudriawcew@o2.pl> * @author Wojciech Lichota <wojciech@lichota.pl> * @author Max <maxrb146@gmail.com> * @author Tomasz Bosak <bosak.tomasz@gmail.com> @@ -27,3 +29,4 @@ $lang['expirywarn'] = 'Dni poprzedzających powiadomienie użytkownik $lang['additional'] = 'Oddzielona przecinkami lista dodatkowych atrybutów AD do pobrania z danych użytkownika. Używane przez niektóre wtyczki.'; $lang['update_name'] = 'Zezwól użytkownikom na uaktualnianie nazwy wyświetlanej w AD?'; $lang['update_mail'] = 'Zezwól użytkownikom na uaktualnianie ich adresu email?'; +$lang['recursive_groups'] = 'Rozpatrz grupy zagnieżdżone dla odpowiednich członków (wolniej).'; diff --git a/lib/plugins/authad/lang/pt-br/settings.php b/lib/plugins/authad/lang/pt-br/settings.php index 1231077da..d606682aa 100644 --- a/lib/plugins/authad/lang/pt-br/settings.php +++ b/lib/plugins/authad/lang/pt-br/settings.php @@ -3,8 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Frederico Gonçalves Guimarães <frederico@teia.bio.br> * @author Victor Westmann <victor.westmann@gmail.com> - * @author Frederico Guimarães <frederico@teia.bio.br> * @author Juliano Marconi Lanigra <juliano.marconi@gmail.com> * @author Viliam Dias <viliamjr@gmail.com> */ @@ -23,3 +23,4 @@ $lang['expirywarn'] = 'Dias com antecedência para avisar o usuário $lang['additional'] = 'Uma lista separada de vírgulas de atributos adicionais AD para pegar dados de usuários. Usados por alguns plugins.'; $lang['update_name'] = 'Permitir aos usuários que atualizem seus nomes de exibição AD?'; $lang['update_mail'] = 'Permitir aos usuários que atualizem seu endereço de e-mail?'; +$lang['recursive_groups'] = 'Resolver grupos aninhados para seus respectivos membros (mais lento).'; diff --git a/lib/plugins/authad/lang/pt/lang.php b/lib/plugins/authad/lang/pt/lang.php index 4f8266b5b..5d4a9a350 100644 --- a/lib/plugins/authad/lang/pt/lang.php +++ b/lib/plugins/authad/lang/pt/lang.php @@ -3,11 +3,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> + * @author Maykon Oliveira <maykonoliveira850@gmail.com> * @author Paulo Silva <paulotsilva@yahoo.com> * @author André Neves <drakferion@gmail.com> * @author Paulo Carmino <contato@paulocarmino.com> */ -$lang['domain'] = 'Domínio de Início de Sessão'; -$lang['authpwdexpire'] = 'A sua senha expirará dentro de %d dias, deve mudá-la em breve.'; +$lang['domain'] = 'Domínio de Login'; +$lang['authpwdexpire'] = 'A sua senha expira dentro de %d dias, deve mudá-la em breve.'; $lang['passchangefail'] = 'Falha ao alterar a senha. Tente prosseguir com uma senha mais segura.'; +$lang['userchangefail'] = 'Não foi possível alterar os atributos do usuário. Talvez sua conta não tenha permissões para fazer alterações?'; $lang['connectfail'] = 'Falha ao conectar com o servidor Active Directory.'; diff --git a/lib/plugins/authad/lang/pt/settings.php b/lib/plugins/authad/lang/pt/settings.php index b734c4800..4409fe14f 100644 --- a/lib/plugins/authad/lang/pt/settings.php +++ b/lib/plugins/authad/lang/pt/settings.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> + * @author Maykon Oliveira <maykonoliveira850@gmail.com> * @author André Neves <drakferion@gmail.com> * @author Murilo <muriloricci@hotmail.com> * @author Paulo Silva <paulotsilva@yahoo.com> @@ -12,14 +14,16 @@ $lang['account_suffix'] = 'O sufixo da sua conta. Por exemplo, <code>@my.domain.org</code>'; $lang['base_dn'] = 'Sua base DN. Eg. <code> DC=meu, DC=dominio, DC=org </code>'; $lang['domain_controllers'] = 'Uma lista separada por vírgulas de Controladores de Domínio (AD DC). Ex.: <code>srv1.domain.org,srv2.domain.org</code>'; -$lang['admin_username'] = 'Um utilizador com privilégios na Active Directory que tenha acesso aos dados de todos os outros utilizadores. Opcional, mas necessário para certas ações como enviar emails de subscrição.'; -$lang['admin_password'] = 'A senha para o utilizador acima.'; +$lang['admin_username'] = 'Um usuário com privilégios no Active Directory que tenha acesso aos dados de todos os outros usuários. Opcional, mas necessário para certas ações como enviar e-mails de subscrição.'; +$lang['admin_password'] = 'A senha para o usuário acima.'; $lang['sso'] = 'Deve ser usado o Single-Sign-On via Kerberos ou NTLM?'; $lang['sso_charset'] = 'O charset do seu servidor web vai passar o nome de usuário Kerberos ou NTLM vazio para UTF-8 ou latin-1. Requer a extensão iconv.'; -$lang['real_primarygroup'] = 'Deveria ser resolvido, de fato, o grupo primário ao invés de assumir "Usuários de Domínio" (mais lento).'; -$lang['use_ssl'] = 'Usar ligação SSL? Se usada, não ative TLS abaixo.'; -$lang['use_tls'] = 'Usar ligação TLS? Se usada, não ative SSL abaixo.'; +$lang['real_primarygroup'] = 'O grupo primário deveria ser resolvido ao invés de assumir "Usuários de Domínio" (mais lento).'; +$lang['use_ssl'] = 'Usar conexão SSL? Se usada, não ative a TLS abaixo.'; +$lang['use_tls'] = 'Usar conexão TLS? Se usada, não ative SSL abaixo.'; $lang['debug'] = 'Deve-se mostrar saída adicional de depuração de erros?'; $lang['expirywarn'] = 'Número de dias de avanço para avisar o utilizador da expiração da senha. 0 para desativar.'; $lang['additional'] = 'Uma lista separada por vírgula de atributos adicionais de AD para buscar a partir de dados do usuário. Usado por alguns plugins.'; +$lang['update_name'] = 'Permitir que os usuários atualizem seu nome de exibição do AD?'; $lang['update_mail'] = 'Permitir que usuários atualizem seus endereços de e-mail?'; +$lang['recursive_groups'] = 'Resolve grupos aninhados para seus respectivos membros (mais lento).'; diff --git a/lib/plugins/authad/lang/ro/settings.php b/lib/plugins/authad/lang/ro/settings.php new file mode 100644 index 000000000..2a2541aac --- /dev/null +++ b/lib/plugins/authad/lang/ro/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Victor <kvp@live.com> + */ +$lang['admin_password'] = 'Parola utilizatorului de mai sus.'; diff --git a/lib/plugins/authad/lang/ru/settings.php b/lib/plugins/authad/lang/ru/settings.php index d6bc8fc8a..81b3296bd 100644 --- a/lib/plugins/authad/lang/ru/settings.php +++ b/lib/plugins/authad/lang/ru/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Alexander Kh. <001.arx@gmail.com> * @author Yuriy Skalko <yuriy.skalko@gmail.com> * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) * @author Aleksandr Selivanov <alexgearbox@gmail.com> @@ -28,3 +29,4 @@ $lang['expirywarn'] = 'За сколько дней нужно пре $lang['additional'] = 'Дополнительные AD-атрибуты, разделённые запятой, для выборки из данных пользователя. Используется некоторыми плагинами.'; $lang['update_name'] = 'Разрешить пользователям редактировать свое AD-имя?'; $lang['update_mail'] = 'Разрешить пользователям редактировать свой электронный адрес?'; +$lang['recursive_groups'] = 'Разрешить вложенные группы их соответствующим членам.'; diff --git a/lib/plugins/authad/lang/sr/settings.php b/lib/plugins/authad/lang/sr/settings.php index 5e4409cc3..41e3fa48c 100644 --- a/lib/plugins/authad/lang/sr/settings.php +++ b/lib/plugins/authad/lang/sr/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Milan Oparnica <milan.opa@gmail.com> * @author Марко М. Костић <marko.m.kostic@gmail.com> */ $lang['account_suffix'] = 'Суфикс на вашем налогу. Нпр.: <code>@moj.domen.rs</code>'; @@ -11,9 +12,13 @@ $lang['domain_controllers'] = 'Списак доменских контрол $lang['admin_username'] = 'Повлашћени Active Directory корисник са приступом подацима свих корисника. Изборно али је потребно за одређене радње као што је слање мејлова о претплаћивању.'; $lang['admin_password'] = 'Лозинка за корисника изнад.'; $lang['sso'] = 'Да ли треба да се користи Single-Sign-On преко Кербероса или NTLM-а?'; +$lang['sso_charset'] = 'Znakovni kod u kom će vaš webserver proslediti Kerberos ili NTLM serveru vaše ime. Ostavite prazno za UTF-8 ili latin-1. Zahteva iconv ekstenziju.'; +$lang['real_primarygroup'] = 'Da li treba razrešiti pravu primarnu grupu ili pretpostaviti grupu "Domain Users" (sporije)'; $lang['use_ssl'] = 'Користити SSL везу? Ако се користи, не омогућујте TLS испод.'; $lang['use_tls'] = 'Користити TLS везу? Ако се користи, не омогућујте SSL испод.'; $lang['debug'] = 'Приказати додатан излаз за поправљање грешака код настанка грешака?'; $lang['expirywarn'] = 'Дана унапред за које треба упозорити корисника на истицање лозинке. 0 за искључивање.'; +$lang['additional'] = 'Spisak dodatni AD atributa, razdvojen zarezima, koje treba preuzeti iz korisničkih podataka. Koristi se u nekim dodacima (plugin).'; $lang['update_name'] = 'Дозволити корисницима да ажурирају њихово AD приказно име?'; $lang['update_mail'] = 'Дозволити корисницима да ажурирају њихове мејл адрсе?'; +$lang['recursive_groups'] = 'Razrešenje ugnježdenih grupa do nivoa pripadajućih članova (sporije)'; diff --git a/lib/plugins/authad/lang/tr/lang.php b/lib/plugins/authad/lang/tr/lang.php index 2336e0f0c..2ab16cb8c 100644 --- a/lib/plugins/authad/lang/tr/lang.php +++ b/lib/plugins/authad/lang/tr/lang.php @@ -2,7 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author farukerdemoncel@gmail.com + * + * @author mahir <mahirtakak@gmail.com> + * @author farukerdemoncel <farukerdemoncel@gmail.com> */ +$lang['domain'] = 'Oturum alanadı'; $lang['authpwdexpire'] = 'Şifreniz %d gün sonra geçersiz hale gelecek, yakın bir zamanda değiştirmelisiniz.'; +$lang['passchangefail'] = 'Şifre değiştirilemedi. Şifre gereklilikleri yerine getirilmemiş olabilir mi?'; +$lang['connectfail'] = 'Active Directory sunucusuna bağlanılamadı'; diff --git a/lib/plugins/authad/lang/tr/settings.php b/lib/plugins/authad/lang/tr/settings.php new file mode 100644 index 000000000..8dfc4622b --- /dev/null +++ b/lib/plugins/authad/lang/tr/settings.php @@ -0,0 +1,12 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Hakan <hakandursun2009@gmail.com> + * @author mahir <mahirtakak@gmail.com> + */ +$lang['admin_password'] = 'Yukarıdaki kullanıcının şifresi.'; +$lang['debug'] = 'Hatalarda ek hata ayıklama çıktısı gösterilsin mi?'; +$lang['update_name'] = 'Kullanıcıların AD görünen adlarını güncellemelerine izin verilsin mi?'; +$lang['update_mail'] = 'Kullanıcıların e-posta adresini güncellemelerine izin verilsin mi?'; diff --git a/lib/plugins/authad/lang/uk/settings.php b/lib/plugins/authad/lang/uk/settings.php index 0c76e7d9d..1e0bd3d52 100644 --- a/lib/plugins/authad/lang/uk/settings.php +++ b/lib/plugins/authad/lang/uk/settings.php @@ -3,12 +3,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author velmyshanovnyi <velmyshanovnyi@gmail.com> * @author Oleksii <alexey.furashev@gmail.com> * @author Nina Zolotova <nina-z@i.ua> */ $lang['account_suffix'] = 'Суфікс вашого облікового запису. Щось на шквалт: <code>@my.domain.org</code>'; $lang['base_dn'] = 'Ваш DN. Щось на шквалт: <code>DC=my,DC=domain,DC=org</code>'; $lang['admin_password'] = 'Пароль вказаного користувача.'; +$lang['sso'] = 'Чи потрібно використовувати Single-Sign-On через Kerberos чи NTLM?'; $lang['use_ssl'] = 'Використовуєте SSL-з\'єднання? Якщо так, не вмикайте TLS нижче.'; $lang['use_tls'] = 'Використовуєте TLS-з\'єднання? Якщо так, не вмикайте SSL нижче.'; $lang['debug'] = 'Показати додаткові відомості щодо помилок?'; diff --git a/lib/plugins/authad/lang/vi/lang.php b/lib/plugins/authad/lang/vi/lang.php new file mode 100644 index 000000000..36aa21219 --- /dev/null +++ b/lib/plugins/authad/lang/vi/lang.php @@ -0,0 +1,12 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['domain'] = 'Đăng nhập tên miền'; +$lang['authpwdexpire'] = 'Mật khẩu của bạn sẽ hết hạn sau %d ngày, bạn nên thay đổi sớm.'; +$lang['passchangefail'] = 'Không thể thay đổi mật khẩu. Có lẽ chính sách mật khẩu chưa được đáp ứng?'; +$lang['userchangefail'] = 'Không thể thay đổi thuộc tính thành viên. Có lẽ tài khoản của bạn không có quyền thực hiện thay đổi?'; +$lang['connectfail'] = 'Không thể kết nối với máy chủ Active Directory.'; diff --git a/lib/plugins/authad/lang/vi/settings.php b/lib/plugins/authad/lang/vi/settings.php new file mode 100644 index 000000000..d0dc73dc1 --- /dev/null +++ b/lib/plugins/authad/lang/vi/settings.php @@ -0,0 +1,23 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['account_suffix'] = 'Hậu tố tài khoản của bạn. VD. <code>@my.domain.org</code>'; +$lang['base_dn'] = 'DN cơ sở của bạn. VD. <code>DC=my,DC=domain,DC=org</code>'; +$lang['domain_controllers'] = 'Một danh sách các bộ điều khiển miền được phân tách bằng dấu phẩy. VD. <code>srv1.domain.org,srv2.domain.org</code>'; +$lang['admin_username'] = 'Thành viên Active Directory đặc quyền có quyền truy cập vào tất cả dữ liệu của người dùng khác. Tùy chọn, nhưng cần thiết cho một số hành động nhất định như gửi thư đăng ký.'; +$lang['admin_password'] = 'Mật khẩu của thành viên trên.'; +$lang['sso'] = 'Nên đăng nhập một lần qua Kerberos hoặc NTLM?'; +$lang['sso_charset'] = 'Bộ ký tự máy chủ web của bạn sẽ chuyển tên người dùng Kerberos hoặc NTLM. Để trống cho UTF-8 hoặc latin-1. Yêu cầu phần mở rộng iconv.'; +$lang['real_primarygroup'] = 'Nếu nhóm chính thực sự được giải quyết thay vì giả sử "Tên miền thành viên" (chậm hơn).'; +$lang['use_ssl'] = 'Sử dụng kết nối SSL? Nếu được sử dụng, không kích hoạt TLS bên dưới.'; +$lang['use_tls'] = 'Sử dụng kết nối TLS? Nếu được sử dụng, không kích hoạt SSL ở trên.'; +$lang['debug'] = 'Hiển thị đầu ra gỡ lỗi bổ sung về lỗi?'; +$lang['expirywarn'] = 'Báo trước ngày để cảnh báo thành viên về việc hết hạn mật khẩu. 0 để vô hiệu hóa.'; +$lang['additional'] = 'Một danh sách được phân tách bằng dấu phẩy của các thuộc tính AD bổ sung để tìm nạp dữ liệu thành viên. Được sử dụng bởi một số plugin.'; +$lang['update_name'] = 'Cho phép thành viên cập nhật tên hiển thị AD?'; +$lang['update_mail'] = 'Cho phép thành viên cập nhật địa chỉ thư điện tử?'; +$lang['recursive_groups'] = 'Giải quyết các nhóm lồng nhau cho các thành viên tương ứng (chậm hơn).'; diff --git a/lib/plugins/authad/lang/zh/settings.php b/lib/plugins/authad/lang/zh/settings.php index 1ccadd318..7a0d39b64 100644 --- a/lib/plugins/authad/lang/zh/settings.php +++ b/lib/plugins/authad/lang/zh/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HaoNan <haonan@zhuoming.info> * @author lainme <lainme993@gmail.com> * @author oott123 <ip.192.168.1.1@qq.com> * @author JellyChen <451453325@qq.com> @@ -23,3 +24,4 @@ $lang['expirywarn'] = '提前多少天警告用户密码即将到期 $lang['additional'] = '需要从用户数据中获取的额外 AD 属性的列表,以逗号分隔。用于某些插件。'; $lang['update_name'] = '允许用户更新其AD显示名称?'; $lang['update_mail'] = '是否允许用户更新他们的电子邮件地址?'; +$lang['recursive_groups'] = '将嵌套组拆分为各自的成员(较慢)'; diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 52f9ba50d..68d1dad60 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -1,6 +1,4 @@ <?php -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); /** * LDAP authentication backend @@ -10,8 +8,9 @@ if(!defined('DOKU_INC')) die(); * @author Chris Smith <chris@jalakaic.co.uk> * @author Jan Schumann <js@schumann-it.com> */ -class auth_plugin_authldap extends DokuWiki_Auth_Plugin { - /* @var resource $con holds the LDAP connection*/ +class auth_plugin_authldap extends DokuWiki_Auth_Plugin +{ + /* @var resource $con holds the LDAP connection */ protected $con = null; /* @var int $bound What type of connection does already exist? */ @@ -20,18 +19,19 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { /* @var array $users User data cache */ protected $users = null; - /* @var array $_pattern User filter pattern */ - protected $_pattern = null; + /* @var array $pattern User filter pattern */ + protected $pattern = null; /** * Constructor */ - public function __construct() { + public function __construct() + { parent::__construct(); // ldap extension is needed - if(!function_exists('ldap_connect')) { - $this->_debug("LDAP err: PHP LDAP extension not found.", -1, __LINE__, __FILE__); + if (!function_exists('ldap_connect')) { + $this->debug("LDAP err: PHP LDAP extension not found.", -1, __LINE__, __FILE__); $this->success = false; return; } @@ -47,73 +47,72 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * plaintext password is correct by trying to bind * to the LDAP server * - * @author Andreas Gohr <andi@splitbrain.org> * @param string $user * @param string $pass * @return bool + * @author Andreas Gohr <andi@splitbrain.org> */ - public function checkPass($user, $pass) { + public function checkPass($user, $pass) + { // reject empty password - if(empty($pass)) return false; - if(!$this->_openLDAP()) return false; + if (empty($pass)) return false; + if (!$this->openLDAP()) return false; // indirect user bind - if($this->getConf('binddn') && $this->getConf('bindpw')) { + if ($this->getConf('binddn') && $this->getConf('bindpw')) { // use superuser credentials - if(!@ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw')))) { - $this->_debug('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + if (!@ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw')))) { + $this->debug('LDAP bind as superuser: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } $this->bound = 2; - } else if($this->getConf('binddn') && + } elseif ($this->getConf('binddn') && $this->getConf('usertree') && $this->getConf('userfilter') ) { // special bind string - $dn = $this->_makeFilter( + $dn = $this->makeFilter( $this->getConf('binddn'), - array('user'=> $user, 'server'=> $this->getConf('server')) + array('user' => $user, 'server' => $this->getConf('server')) ); - - } else if(strpos($this->getConf('usertree'), '%{user}')) { + } elseif (strpos($this->getConf('usertree'), '%{user}')) { // direct user bind - $dn = $this->_makeFilter( + $dn = $this->makeFilter( $this->getConf('usertree'), - array('user'=> $user, 'server'=> $this->getConf('server')) + array('user' => $user, 'server' => $this->getConf('server')) ); - } else { // Anonymous bind - if(!@ldap_bind($this->con)) { + if (!@ldap_bind($this->con)) { msg("LDAP: can not bind anonymously", -1); - $this->_debug('LDAP anonymous bind: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + $this->debug('LDAP anonymous bind: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } } // Try to bind to with the dn if we have one. - if(!empty($dn)) { + if (!empty($dn)) { // User/Password bind - if(!@ldap_bind($this->con, $dn, $pass)) { - $this->_debug("LDAP: bind with $dn failed", -1, __LINE__, __FILE__); - $this->_debug('LDAP user dn bind: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + if (!@ldap_bind($this->con, $dn, $pass)) { + $this->debug("LDAP: bind with $dn failed", -1, __LINE__, __FILE__); + $this->debug('LDAP user dn bind: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } $this->bound = 1; return true; } else { // See if we can find the user - $info = $this->_getUserData($user, true); - if(empty($info['dn'])) { + $info = $this->fetchUserData($user, true); + if (empty($info['dn'])) { return false; } else { $dn = $info['dn']; } // Try to bind with the dn provided - if(!@ldap_bind($this->con, $dn, $pass)) { - $this->_debug("LDAP: bind with $dn failed", -1, __LINE__, __FILE__); - $this->_debug('LDAP user bind: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + if (!@ldap_bind($this->con, $dn, $pass)) { + $this->debug("LDAP: bind with $dn failed", -1, __LINE__, __FILE__); + $this->debug('LDAP user bind: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } $this->bound = 1; @@ -138,113 +137,119 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * uid string Posix User ID * inbind bool for internal use - avoid loop in binding * - * @author Andreas Gohr <andi@splitbrain.org> - * @author Trouble - * @author Dan Allen <dan.j.allen@gmail.com> + * @param string $user + * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin + * @return array containing user data or false * @author <evaldas.auryla@pheur.org> * @author Stephane Chazelas <stephane.chazelas@emerson.com> * @author Steffen Schoch <schoch@dsb.net> * - * @param string $user - * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin - * @return array containing user data or false + * @author Andreas Gohr <andi@splitbrain.org> + * @author Trouble + * @author Dan Allen <dan.j.allen@gmail.com> */ - public function getUserData($user, $requireGroups=true) { - return $this->_getUserData($user); + public function getUserData($user, $requireGroups = true) + { + return $this->fetchUserData($user); } /** - * @param string $user - * @param bool $inbind authldap specific, true if in bind phase + * @param string $user + * @param bool $inbind authldap specific, true if in bind phase * @return array containing user data or false */ - protected function _getUserData($user, $inbind = false) { + protected function fetchUserData($user, $inbind = false) + { global $conf; - if(!$this->_openLDAP()) return false; + if (!$this->openLDAP()) return array(); // force superuser bind if wanted and not bound as superuser yet - if($this->getConf('binddn') && $this->getConf('bindpw') && $this->bound < 2) { + if ($this->getConf('binddn') && $this->getConf('bindpw') && $this->bound < 2) { // use superuser credentials - if(!@ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw')))) { - $this->_debug('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); - return false; + if (!@ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw')))) { + $this->debug('LDAP bind as superuser: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); + return array(); } $this->bound = 2; - } elseif($this->bound == 0 && !$inbind) { + } elseif ($this->bound == 0 && !$inbind) { // in some cases getUserData is called outside the authentication workflow // eg. for sending email notification on subscribed pages. This data might not // be accessible anonymously, so we try to rebind the current user here list($loginuser, $loginsticky, $loginpass) = auth_getCookie(); - if($loginuser && $loginpass) { + if ($loginuser && $loginpass) { $loginpass = auth_decrypt($loginpass, auth_cookiesalt(!$loginsticky, true)); $this->checkPass($loginuser, $loginpass); } } $info = array(); - $info['user'] = $user; - $this->_debug('LDAP user to find: '.htmlspecialchars($info['user']), 0, __LINE__, __FILE__); + $info['user'] = $user; + $this->debug('LDAP user to find: ' . hsc($info['user']), 0, __LINE__, __FILE__); $info['server'] = $this->getConf('server'); - $this->_debug('LDAP Server: '.htmlspecialchars($info['server']), 0, __LINE__, __FILE__); - + $this->debug('LDAP Server: ' . hsc($info['server']), 0, __LINE__, __FILE__); //get info for given user - $base = $this->_makeFilter($this->getConf('usertree'), $info); - if($this->getConf('userfilter')) { - $filter = $this->_makeFilter($this->getConf('userfilter'), $info); + $base = $this->makeFilter($this->getConf('usertree'), $info); + if ($this->getConf('userfilter')) { + $filter = $this->makeFilter($this->getConf('userfilter'), $info); } else { $filter = "(ObjectClass=*)"; } - $this->_debug('LDAP Filter: '.htmlspecialchars($filter), 0, __LINE__, __FILE__); + $this->debug('LDAP Filter: ' . hsc($filter), 0, __LINE__, __FILE__); + + $this->debug('LDAP user search: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); + $this->debug('LDAP search at: ' . hsc($base . ' ' . $filter), 0, __LINE__, __FILE__); + $sr = $this->ldapSearch($this->con, $base, $filter, $this->getConf('userscope'), $this->getConf('attributes')); - $this->_debug('LDAP user search: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); - $this->_debug('LDAP search at: '.htmlspecialchars($base.' '.$filter), 0, __LINE__, __FILE__); - $sr = $this->_ldapsearch($this->con, $base, $filter, $this->getConf('userscope')); - $result = @ldap_get_entries($this->con, $sr); + $result = @ldap_get_entries($this->con, $sr); // if result is not an array - if(!is_array($result)) { - // no objects found - $this->_debug('LDAP search returned non-array result: '.htmlspecialchars(print($result)), -1, __LINE__, __FILE__); - return false; + if (!is_array($result)) { + // no objects found + $this->debug('LDAP search returned non-array result: ' . hsc(print($result)), -1, __LINE__, __FILE__); + return array(); } - // Don't accept more or less than one response - if ($result['count'] != 1) { - $this->_debug('LDAP search returned '.htmlspecialchars($result['count']).' results while it should return 1!', -1, __LINE__, __FILE__); - //for($i = 0; $i < $result["count"]; $i++) { - //$this->_debug('result: '.htmlspecialchars(print_r($result[$i])), 0, __LINE__, __FILE__); - //} - return false; - } - + // Don't accept more or less than one response + if ($result['count'] != 1) { + $this->debug( + 'LDAP search returned ' . hsc($result['count']) . ' results while it should return 1!', + -1, + __LINE__, + __FILE__ + ); + //for($i = 0; $i < $result["count"]; $i++) { + //$this->_debug('result: '.hsc(print_r($result[$i])), 0, __LINE__, __FILE__); + //} + return array(); + } - $this->_debug('LDAP search found single result !', 0, __LINE__, __FILE__); + $this->debug('LDAP search found single result !', 0, __LINE__, __FILE__); $user_result = $result[0]; ldap_free_result($sr); // general user info - $info['dn'] = $user_result['dn']; - $info['gid'] = $user_result['gidnumber'][0]; + $info['dn'] = $user_result['dn']; + $info['gid'] = $user_result['gidnumber'][0]; $info['mail'] = $user_result['mail'][0]; $info['name'] = $user_result['cn'][0]; $info['grps'] = array(); // overwrite if other attribs are specified. - if(is_array($this->getConf('mapping'))) { - foreach($this->getConf('mapping') as $localkey => $key) { - if(is_array($key)) { + if (is_array($this->getConf('mapping'))) { + foreach ($this->getConf('mapping') as $localkey => $key) { + if (is_array($key)) { // use regexp to clean up user_result // $key = array($key=>$regexp), only handles the first key-value $regexp = current($key); $key = key($key); - if($user_result[$key]) foreach($user_result[$key] as $grpkey => $grp) { - if($grpkey !== 'count' && preg_match($regexp, $grp, $match)) { - if($localkey == 'grps') { + if ($user_result[$key]) foreach ($user_result[$key] as $grpkey => $grp) { + if ($grpkey !== 'count' && preg_match($regexp, $grp, $match)) { + if ($localkey == 'grps') { $info[$localkey][] = $match[1]; } else { $info[$localkey] = $match[1]; @@ -259,38 +264,44 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { $user_result = array_merge($info, $user_result); //get groups for given user if grouptree is given - if($this->getConf('grouptree') || $this->getConf('groupfilter')) { - $base = $this->_makeFilter($this->getConf('grouptree'), $user_result); - $filter = $this->_makeFilter($this->getConf('groupfilter'), $user_result); - $sr = $this->_ldapsearch($this->con, $base, $filter, $this->getConf('groupscope'), array($this->getConf('groupkey'))); - $this->_debug('LDAP group search: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); - $this->_debug('LDAP search at: '.htmlspecialchars($base.' '.$filter), 0, __LINE__, __FILE__); - - if(!$sr) { + if ($this->getConf('grouptree') || $this->getConf('groupfilter')) { + $base = $this->makeFilter($this->getConf('grouptree'), $user_result); + $filter = $this->makeFilter($this->getConf('groupfilter'), $user_result); + $sr = $this->ldapSearch( + $this->con, + $base, + $filter, + $this->getConf('groupscope'), + array($this->getConf('groupkey')) + ); + $this->debug('LDAP group search: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); + $this->debug('LDAP search at: ' . hsc($base . ' ' . $filter), 0, __LINE__, __FILE__); + + if (!$sr) { msg("LDAP: Reading group memberships failed", -1); - return false; + return array(); } $result = ldap_get_entries($this->con, $sr); ldap_free_result($sr); - if(is_array($result)) foreach($result as $grp) { - if(!empty($grp[$this->getConf('groupkey')])) { + if (is_array($result)) foreach ($result as $grp) { + if (!empty($grp[$this->getConf('groupkey')])) { $group = $grp[$this->getConf('groupkey')]; - if(is_array($group)){ + if (is_array($group)) { $group = $group[0]; } else { - $this->_debug('groupkey did not return a detailled result', 0, __LINE__, __FILE__); + $this->debug('groupkey did not return a detailled result', 0, __LINE__, __FILE__); } - if($group === '') continue; + if ($group === '') continue; - $this->_debug('LDAP usergroup: '.htmlspecialchars($group), 0, __LINE__, __FILE__); + $this->debug('LDAP usergroup: ' . hsc($group), 0, __LINE__, __FILE__); $info['grps'][] = $group; } } } // always add the default group to the list of groups - if(!$info['grps'] or !in_array($conf['defaultgroup'], $info['grps'])) { + if (!$info['grps'] or !in_array($conf['defaultgroup'], $info['grps'])) { $info['grps'][] = $conf['defaultgroup']; } return $info; @@ -299,57 +310,66 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { /** * Definition of the function modifyUser in order to modify the password * - * @param string $user nick of the user to be changed - * @param array $changes array of field/value pairs to be changed (password will be clear text) + * @param string $user nick of the user to be changed + * @param array $changes array of field/value pairs to be changed (password will be clear text) * @return bool true on success, false on error */ - - function modifyUser($user,$changes){ + public function modifyUser($user, $changes) + { // open the connection to the ldap - if(!$this->_openLDAP()){ - $this->_debug('LDAP cannot connect: '. htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + if (!$this->openLDAP()) { + $this->debug('LDAP cannot connect: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } // find the information about the user, in particular the "dn" - $info = $this->getUserData($user,true); - if(empty($info['dn'])) { - $this->_debug('LDAP cannot find your user dn', 0, __LINE__, __FILE__); + $info = $this->getUserData($user, true); + if (empty($info['dn'])) { + $this->debug('LDAP cannot find your user dn', 0, __LINE__, __FILE__); return false; } $dn = $info['dn']; // find the old password of the user - list($loginuser,$loginsticky,$loginpass) = auth_getCookie(); + list($loginuser, $loginsticky, $loginpass) = auth_getCookie(); if ($loginuser !== null) { // the user is currently logged in $secret = auth_cookiesalt(!$loginsticky, true); - $pass = auth_decrypt($loginpass, $secret); + $pass = auth_decrypt($loginpass, $secret); // bind with the ldap - if(!@ldap_bind($this->con, $dn, $pass)){ - $this->_debug('LDAP user bind failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + if (!@ldap_bind($this->con, $dn, $pass)) { + $this->debug( + 'LDAP user bind failed: ' . hsc($dn) . ': ' . hsc(ldap_error($this->con)), + 0, + __LINE__, + __FILE__ + ); return false; } } elseif ($this->getConf('binddn') && $this->getConf('bindpw')) { // we are changing the password on behalf of the user (eg: forgotten password) // bind with the superuser ldap - if (!@ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw')))){ - $this->_debug('LDAP bind as superuser: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + if (!@ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw')))) { + $this->debug('LDAP bind as superuser: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); return false; } - } - else { + } else { return false; // no otherway } // Generate the salted hashed password for LDAP - $phash = new PassHash(); + $phash = new \dokuwiki\PassHash(); $hash = $phash->hash_ssha($changes['pass']); // change the password - if(!@ldap_mod_replace($this->con, $dn,array('userpassword' => $hash))){ - $this->_debug('LDAP mod replace failed: '. htmlspecialchars($dn) .': '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + if (!@ldap_mod_replace($this->con, $dn, array('userpassword' => $hash))) { + $this->debug( + 'LDAP mod replace failed: ' . hsc($dn) . ': ' . hsc(ldap_error($this->con)), + 0, + __LINE__, + __FILE__ + ); return false; } @@ -361,56 +381,58 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * * @return bool */ - public function isCaseSensitive() { + public function isCaseSensitive() + { return false; } /** * Bulk retrieval of user data * - * @author Dominik Eckelmann <dokuwiki@cosmocode.de> - * @param int $start index of first user to be returned - * @param int $limit max number of users to be returned - * @param array $filter array of field/pattern pairs, null for no filter + * @param int $start index of first user to be returned + * @param int $limit max number of users to be returned + * @param array $filter array of field/pattern pairs, null for no filter * @return array of userinfo (refer getUserData for internal userinfo details) + * @author Dominik Eckelmann <dokuwiki@cosmocode.de> */ - function retrieveUsers($start = 0, $limit = 0, $filter = array()) { - if(!$this->_openLDAP()) return false; + public function retrieveUsers($start = 0, $limit = 0, $filter = array()) + { + if (!$this->openLDAP()) return array(); - if(is_null($this->users)) { + if (is_null($this->users)) { // Perform the search and grab all their details - if($this->getConf('userfilter')) { + if ($this->getConf('userfilter')) { $all_filter = str_replace('%{user}', '*', $this->getConf('userfilter')); } else { $all_filter = "(ObjectClass=*)"; } - $sr = ldap_search($this->con, $this->getConf('usertree'), $all_filter); - $entries = ldap_get_entries($this->con, $sr); + $sr = ldap_search($this->con, $this->getConf('usertree'), $all_filter); + $entries = ldap_get_entries($this->con, $sr); $users_array = array(); - $userkey = $this->getConf('userkey'); - for($i = 0; $i < $entries["count"]; $i++) { + $userkey = $this->getConf('userkey'); + for ($i = 0; $i < $entries["count"]; $i++) { array_push($users_array, $entries[$i][$userkey][0]); } asort($users_array); $result = $users_array; - if(!$result) return array(); + if (!$result) return array(); $this->users = array_fill_keys($result, false); } - $i = 0; + $i = 0; $count = 0; - $this->_constructPattern($filter); + $this->constructPattern($filter); $result = array(); - foreach($this->users as $user => &$info) { - if($i++ < $start) { + foreach ($this->users as $user => &$info) { + if ($i++ < $start) { continue; } - if($info === false) { + if ($info === false) { $info = $this->getUserData($user); } - if($this->_filter($user, $info)) { + if ($this->filter($user, $info)) { $result[$user] = $info; - if(($limit > 0) && (++$count >= $limit)) break; + if (($limit > 0) && (++$count >= $limit)) break; } } return $result; @@ -422,23 +444,24 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * Used by auth_getUserData to make the filter * strings for grouptree and groupfilter * - * @author Troels Liebe Bentsen <tlb@rapanden.dk> - * @param string $filter ldap search filter with placeholders - * @param array $placeholders placeholders to fill in + * @param string $filter ldap search filter with placeholders + * @param array $placeholders placeholders to fill in * @return string + * @author Troels Liebe Bentsen <tlb@rapanden.dk> */ - protected function _makeFilter($filter, $placeholders) { + protected function makeFilter($filter, $placeholders) + { preg_match_all("/%{([^}]+)/", $filter, $matches, PREG_PATTERN_ORDER); //replace each match - foreach($matches[1] as $match) { + foreach ($matches[1] as $match) { //take first element if array - if(is_array($placeholders[$match])) { + if (is_array($placeholders[$match])) { $value = $placeholders[$match][0]; } else { $value = $placeholders[$match]; } - $value = $this->_filterEscape($value); - $filter = str_replace('%{'.$match.'}', $value, $filter); + $value = $this->filterEscape($value); + $filter = str_replace('%{' . $match . '}', $value, $filter); } return $filter; } @@ -446,20 +469,21 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { /** * return true if $user + $info match $filter criteria, false otherwise * + * @param string $user the user's login name + * @param array $info the user's userinfo array + * @return bool * @author Chris Smith <chris@jalakai.co.uk> * - * @param string $user the user's login name - * @param array $info the user's userinfo array - * @return bool */ - protected function _filter($user, $info) { - foreach($this->_pattern as $item => $pattern) { - if($item == 'user') { - if(!preg_match($pattern, $user)) return false; - } else if($item == 'grps') { - if(!count(preg_grep($pattern, $info['grps']))) return false; + protected function filter($user, $info) + { + foreach ($this->pattern as $item => $pattern) { + if ($item == 'user') { + if (!preg_match($pattern, $user)) return false; + } elseif ($item == 'grps') { + if (!count(preg_grep($pattern, $info['grps']))) return false; } else { - if(!preg_match($pattern, $info[$item])) return false; + if (!preg_match($pattern, $info[$item])) return false; } } return true; @@ -468,15 +492,16 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { /** * Set the filter pattern * - * @author Chris Smith <chris@jalakai.co.uk> - * * @param $filter * @return void + * @author Chris Smith <chris@jalakai.co.uk> + * */ - protected function _constructPattern($filter) { - $this->_pattern = array(); - foreach($filter as $item => $pattern) { - $this->_pattern[$item] = '/'.str_replace('/', '\/', $pattern).'/i'; // allow regex characters + protected function constructPattern($filter) + { + $this->pattern = array(); + foreach ($filter as $item => $pattern) { + $this->pattern[$item] = '/' . str_replace('/', '\/', $pattern) . '/i'; // allow regex characters } } @@ -485,16 +510,17 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * * Ported from Perl's Net::LDAP::Util escape_filter_value * - * @author Andreas Gohr - * @param string $string + * @param string $string * @return string + * @author Andreas Gohr */ - protected function _filterEscape($string) { + protected function filterEscape($string) + { // see https://github.com/adldap/adLDAP/issues/22 return preg_replace_callback( '/([\x00-\x1F\*\(\)\\\\])/', function ($matches) { - return "\\".join("", unpack("H2", $matches[1])); + return "\\" . join("", unpack("H2", $matches[1])); }, $string ); @@ -506,22 +532,23 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - protected function _openLDAP() { - if($this->con) return true; // connection already established + protected function openLDAP() + { + if ($this->con) return true; // connection already established - if($this->getConf('debug')) { - ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7); + if ($this->getConf('debug')) { + ldap_set_option(null, LDAP_OPT_DEBUG_LEVEL, 7); } $this->bound = 0; - $port = $this->getConf('port'); - $bound = false; + $port = $this->getConf('port'); + $bound = false; $servers = explode(',', $this->getConf('server')); - foreach($servers as $server) { - $server = trim($server); + foreach ($servers as $server) { + $server = trim($server); $this->con = @ldap_connect($server, $port); - if(!$this->con) { + if (!$this->con) { continue; } @@ -534,62 +561,64 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { */ //set protocol version and dependend options - if($this->getConf('version')) { - if(!@ldap_set_option( - $this->con, LDAP_OPT_PROTOCOL_VERSION, + if ($this->getConf('version')) { + if (!@ldap_set_option( + $this->con, + LDAP_OPT_PROTOCOL_VERSION, $this->getConf('version') ) ) { - msg('Setting LDAP Protocol version '.$this->getConf('version').' failed', -1); - $this->_debug('LDAP version set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + msg('Setting LDAP Protocol version ' . $this->getConf('version') . ' failed', -1); + $this->debug('LDAP version set: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); } else { //use TLS (needs version 3) - if($this->getConf('starttls')) { - if(!@ldap_start_tls($this->con)) { + if ($this->getConf('starttls')) { + if (!@ldap_start_tls($this->con)) { msg('Starting TLS failed', -1); - $this->_debug('LDAP TLS set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + $this->debug('LDAP TLS set: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); } } // needs version 3 - if($this->getConf('referrals') > -1) { - if(!@ldap_set_option( - $this->con, LDAP_OPT_REFERRALS, + if ($this->getConf('referrals') > -1) { + if (!@ldap_set_option( + $this->con, + LDAP_OPT_REFERRALS, $this->getConf('referrals') ) ) { msg('Setting LDAP referrals failed', -1); - $this->_debug('LDAP referal set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + $this->debug('LDAP referal set: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); } } } } //set deref mode - if($this->getConf('deref')) { - if(!@ldap_set_option($this->con, LDAP_OPT_DEREF, $this->getConf('deref'))) { - msg('Setting LDAP Deref mode '.$this->getConf('deref').' failed', -1); - $this->_debug('LDAP deref set: '.htmlspecialchars(ldap_error($this->con)), 0, __LINE__, __FILE__); + if ($this->getConf('deref')) { + if (!@ldap_set_option($this->con, LDAP_OPT_DEREF, $this->getConf('deref'))) { + msg('Setting LDAP Deref mode ' . $this->getConf('deref') . ' failed', -1); + $this->debug('LDAP deref set: ' . hsc(ldap_error($this->con)), 0, __LINE__, __FILE__); } } /* As of PHP 5.3.0 we can set timeout to speedup skipping of invalid servers */ - if(defined('LDAP_OPT_NETWORK_TIMEOUT')) { + if (defined('LDAP_OPT_NETWORK_TIMEOUT')) { ldap_set_option($this->con, LDAP_OPT_NETWORK_TIMEOUT, 1); } - if($this->getConf('binddn') && $this->getConf('bindpw')) { + if ($this->getConf('binddn') && $this->getConf('bindpw')) { $bound = @ldap_bind($this->con, $this->getConf('binddn'), conf_decodeString($this->getConf('bindpw'))); $this->bound = 2; } else { $bound = @ldap_bind($this->con); } - if($bound) { + if ($bound) { break; } } - if(!$bound) { + if (!$bound) { msg("LDAP: couldn't connect to LDAP server", -1); - $this->_debug(ldap_error($this->con), 0, __LINE__, __FILE__); + $this->debug(ldap_error($this->con), 0, __LINE__, __FILE__); return false; } @@ -600,34 +629,54 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { /** * Wraps around ldap_search, ldap_list or ldap_read depending on $scope * - * @author Andreas Gohr <andi@splitbrain.org> - * @param resource $link_identifier - * @param string $base_dn - * @param string $filter - * @param string $scope can be 'base', 'one' or 'sub' + * @param resource $link_identifier + * @param string $base_dn + * @param string $filter + * @param string $scope can be 'base', 'one' or 'sub' * @param null|array $attributes - * @param int $attrsonly - * @param int $sizelimit + * @param int $attrsonly + * @param int $sizelimit * @return resource + * @author Andreas Gohr <andi@splitbrain.org> */ - protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null, - $attrsonly = 0, $sizelimit = 0) { - if(is_null($attributes)) $attributes = array(); - - if($scope == 'base') { + protected function ldapSearch( + $link_identifier, + $base_dn, + $filter, + $scope = 'sub', + $attributes = null, + $attrsonly = 0, + $sizelimit = 0 + ) + { + if (is_null($attributes)) $attributes = array(); + + if ($scope == 'base') { return @ldap_read( - $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit + $link_identifier, + $base_dn, + $filter, + $attributes, + $attrsonly, + $sizelimit ); - } elseif($scope == 'one') { + } elseif ($scope == 'one') { return @ldap_list( - $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit + $link_identifier, + $base_dn, + $filter, + $attributes, + $attrsonly, + $sizelimit ); } else { return @ldap_search( - $link_identifier, $base_dn, $filter, $attributes, - $attrsonly, $sizelimit + $link_identifier, + $base_dn, + $filter, + $attributes, + $attrsonly, + $sizelimit ); } } @@ -636,14 +685,14 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin { * Wrapper around msg() but outputs only when debug is enabled * * @param string $message - * @param int $err - * @param int $line + * @param int $err + * @param int $line * @param string $file * @return void */ - protected function _debug($message, $err, $line, $file) { - if(!$this->getConf('debug')) return; + protected function debug($message, $err, $line, $file) + { + if (!$this->getConf('debug')) return; msg($message, $err, $line, $file); } - } diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php index 116cb9d3f..52fa1e64f 100644 --- a/lib/plugins/authldap/conf/default.php +++ b/lib/plugins/authldap/conf/default.php @@ -20,3 +20,4 @@ $conf['userkey'] = 'uid'; $conf['groupkey'] = 'cn'; $conf['debug'] = 0; $conf['modPass'] = 1; +$conf['attributes'] = array(); diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php index f32aed191..3a58590a8 100644 --- a/lib/plugins/authldap/conf/metadata.php +++ b/lib/plugins/authldap/conf/metadata.php @@ -11,6 +11,7 @@ $meta['referrals'] = array('multichoice','_choices' => array(-1,0,1),'_caution $meta['deref'] = array('multichoice','_choices' => array(0,1,2,3),'_caution' => 'danger'); $meta['binddn'] = array('string','_caution' => 'danger'); $meta['bindpw'] = array('password','_caution' => 'danger','_code'=>'base64'); +$meta['attributes'] = array('array'); //$meta['mapping']['name'] unsupported in config manager //$meta['mapping']['grps'] unsupported in config manager $meta['userscope'] = array('multichoice','_choices' => array('sub','one','base'),'_caution' => 'danger'); diff --git a/lib/plugins/authldap/lang/ar/settings.php b/lib/plugins/authldap/lang/ar/settings.php index aaef7763f..d1be7872b 100644 --- a/lib/plugins/authldap/lang/ar/settings.php +++ b/lib/plugins/authldap/lang/ar/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author alhajr <alhajr300@gmail.com> */ $lang['port'] = 'LDAP المنفذ الملقم إذا لم يعط أي عنوان URL كامل أعلاه'; diff --git a/lib/plugins/authldap/lang/bg/settings.php b/lib/plugins/authldap/lang/bg/settings.php index 165216de8..f301d1c31 100644 --- a/lib/plugins/authldap/lang/bg/settings.php +++ b/lib/plugins/authldap/lang/bg/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Kiril <neohidra@gmail.com> */ $lang['server'] = 'Вашият LDAP сървър. Име на хоста (<code>localhost</code>) или целият URL адрес (<code>ldap://сървър.tld:389</code>)'; diff --git a/lib/plugins/authldap/lang/ca/settings.php b/lib/plugins/authldap/lang/ca/settings.php index 2f73833ad..08c036b38 100644 --- a/lib/plugins/authldap/lang/ca/settings.php +++ b/lib/plugins/authldap/lang/ca/settings.php @@ -3,8 +3,13 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> * @author Àngel Pérez Beroy <aperezberoy@gmail.com> * @author David Surroca <david.tb303@gmail.com> + * @author Aniol Marti <amarti@caliu.cat> */ $lang['starttls'] = 'Utilitzar connexions TLS?'; $lang['bindpw'] = 'Contrasenya de l\'usuari referit abans.'; +$lang['attributes'] = 'Atributs a demanar a la consulta LDAP.'; +$lang['modPass'] = 'Es pot canviar la contrasenya del LDAP mitjançant el Dokuwiki?'; +$lang['debug'] = 'Mostra informació addicional de depuració als errors.'; diff --git a/lib/plugins/authldap/lang/cs/settings.php b/lib/plugins/authldap/lang/cs/settings.php index 741a56a62..1bdaf29ba 100644 --- a/lib/plugins/authldap/lang/cs/settings.php +++ b/lib/plugins/authldap/lang/cs/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Petr Kajzar <petr.kajzar@lf1.cuni.cz> * @author mkucera66 <mkucera66@seznam.cz> * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> * @author Martin Růžička <martinr@post.cz> @@ -19,6 +20,7 @@ $lang['referrals'] = 'Přeposílat odkazy?'; $lang['deref'] = 'Jak rozlišovat aliasy?'; $lang['binddn'] = 'Doménový název DN volitelně připojeného uživatele, pokus anonymní připojení není vyhovující, tj. <code>cn=admin, dc=muj, dc=domov</code>'; $lang['bindpw'] = 'Heslo uživatele výše'; +$lang['attributes'] = 'Atributy k načtení pomocí vyhledávání LDAP.'; $lang['userscope'] = 'Omezení rozsahu vyhledávání uživatele'; $lang['groupscope'] = 'Omezení rozsahu vyhledávání skupiny'; $lang['userkey'] = 'Atribut označující uživatelské jméno; musí být konzistetní s uživatelským filtrem.'; diff --git a/lib/plugins/authldap/lang/da/settings.php b/lib/plugins/authldap/lang/da/settings.php index 7a1384db6..f831a8f13 100644 --- a/lib/plugins/authldap/lang/da/settings.php +++ b/lib/plugins/authldap/lang/da/settings.php @@ -3,27 +3,34 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jacob Palm <jacobpalmdk@icloud.com> * @author Jon Theil Nielsen <jontheil@gmail.com> * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> * @author soer9648 <soer9648@eucl.dk> - * @author Jacob Palm <mail@jacobpalm.dk> */ $lang['server'] = 'Din LDAP server. Enten værtsnavn (<code>localhost</code>) eller fuld kvalificeret URL (<code>ldap://server.tld:389</code>)'; $lang['port'] = 'LDAP server port, hvis der ikke er angivet en komplet URL ovenfor.'; -$lang['usertree'] = 'Hvor findes brugerkonti. F.eks. <code>ou=Personer, dc=server, dc=tld</code>'; -$lang['grouptree'] = 'Hvor findes brugergrupper. F.eks. <code>ou=Grupper, dc=server, dc=tld</code>'; +$lang['usertree'] = 'Sti til brugerkonti. F.eks. <code>ou=Personer, dc=server, dc=tld</code>'; +$lang['grouptree'] = 'Sti til brugergrupper. F.eks. <code>ou=Grupper, dc=server, dc=tld</code>'; $lang['userfilter'] = 'LDAP filter der benyttes til at søge efter brugerkonti. F.eks. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; $lang['groupfilter'] = 'LDAP filter tder benyttes til at søge efter grupper. F.eks. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; -$lang['version'] = 'Protokol version der skal benyttes. Det er muligvis nødvendigt at sætte denne til <code>3</code>'; +$lang['version'] = 'Protokol-version der skal benyttes. Det er muligvis nødvendigt at sætte denne til <code>3</code>'; $lang['starttls'] = 'Benyt TLS forbindelser?'; -$lang['binddn'] = 'DN af en valgfri <bindings-bruger, hvis ikke anonym binding er tilstrækkeligt. Fx <code>cn=admin,dc=my,dc=home</code>'; -$lang['bindpw'] = 'Kodeord til ovenstående bruger'; +$lang['referrals'] = 'Tillad henvisninger?'; +$lang['deref'] = 'Hvordan skal opslag renses for henvisninger?'; +$lang['binddn'] = 'DN af en valgfri bindings-bruger, hvis ikke anonym binding er tilstrækkeligt. Fx <code>cn=admin,dc=my,dc=home</code>'; +$lang['bindpw'] = 'Adgangskode til ovenstående bruger'; +$lang['attributes'] = 'Attributter der skal hentes med LDAP søgning.'; $lang['userscope'] = 'Begræns søgekriterier for brugersøgning'; $lang['groupscope'] = 'Begræns søgekriterier for gruppesøgning'; $lang['userkey'] = 'Attribut der betegner brugernavnet; skal være i overensstemmelse med brugerfilteret.'; $lang['groupkey'] = 'Gruppemedlemskab fra hvilken som helst brugerattribut (i stedet for standard AD-grupper), fx gruppe fra afdeling eller telefonnummer'; $lang['modPass'] = 'Kan LDAP adgangskoden skiftes via DokuWiki?'; $lang['debug'] = 'Vis yderligere debug output ved fejl'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; $lang['referrals_o_-1'] = 'brug standardindstilling'; $lang['referrals_o_0'] = 'følg ikke henvisninger'; $lang['referrals_o_1'] = 'følg henvisninger'; diff --git a/lib/plugins/authldap/lang/de/settings.php b/lib/plugins/authldap/lang/de/settings.php index f1bfc00fd..b6622d543 100644 --- a/lib/plugins/authldap/lang/de/settings.php +++ b/lib/plugins/authldap/lang/de/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author C!own77 <clown77@posteo.de> * @author Matthias Schulte <dokuwiki@lupo49.de> * @author christian studer <cstuder@existenz.ch> * @author Philip Knack <p.knack@stollfuss.de> @@ -21,6 +22,7 @@ $lang['referrals'] = 'Weiterverfolgen von LDAP-Referrals (Verweise)? $lang['deref'] = 'Wie sollen Aliase aufgelöst werden?'; $lang['binddn'] = 'DN eines optionalen Benutzers, wenn der anonyme Zugriff nicht ausreichend ist. Zum Beispiel: <code>cn=admin, dc=my, dc=home</code>.'; $lang['bindpw'] = 'Passwort des angegebenen Benutzers.'; +$lang['attributes'] = 'Attribute, die mit der LDAP-Suche abgerufen werden sollen.'; $lang['userscope'] = 'Die Suchweite nach Benutzeraccounts.'; $lang['groupscope'] = 'Die Suchweite nach Benutzergruppen.'; $lang['userkey'] = 'Attribut, das den Benutzernamen enthält; muss konsistent zum userfilter sein.'; diff --git a/lib/plugins/authldap/lang/el/lang.php b/lib/plugins/authldap/lang/el/lang.php new file mode 100644 index 000000000..3e2d26f21 --- /dev/null +++ b/lib/plugins/authldap/lang/el/lang.php @@ -0,0 +1,9 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Aikaterini Katapodi <extragold1234@hotmail.com> + */ +$lang['connectfail'] = 'Δεν υπάρχει δυνατότητα σύνδεσης LDAP %s'; +$lang['domainfail'] = 'To LDAO δεν μπορεί να εντοπίσει το dn του χρήστη σας '; diff --git a/lib/plugins/authldap/lang/el/settings.php b/lib/plugins/authldap/lang/el/settings.php new file mode 100644 index 000000000..296dc247c --- /dev/null +++ b/lib/plugins/authldap/lang/el/settings.php @@ -0,0 +1,32 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Aikaterini Katapodi <extragold1234@hotmail.com> + */ +$lang['server'] = 'Ο διακομιστής σας LDAP. Είτε το κύριο όνομα ή ολόκληρο το URL '; +$lang['port'] = 'Η πύλη διακομιστή LDAP αν δεν εδόθη ολόκληρο το URL '; +$lang['usertree'] = 'Πού μπορούν να βρεθούν οι λογαριασμοί χρήστη.. Π.χ . <code>ou=Κοινό , dc=server, dc=tld</code> '; +$lang['grouptree'] = 'Πού μπορούν να βρεθούν οι ομάδες χρήστη. Πχ. <code>ou=Group, dc=server, dc=tld</code> '; +$lang['userfilter'] = 'LDAP φίλτρο προς αναζήτηση λογαριασμών χρήστη Πχ . <code>(&(uid=%{user})(objectClass=posixAccount))</code> '; +$lang['groupfilter'] = 'LDAP φίλτρο προς αναζήτηση ομάδων . Πχ. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code> '; +$lang['version'] = 'Η έκδοση πρωτοκόλλου προς χρήση. Μπορεί να χρειαστείτε να τοποθετήσετε αυτό στον <κωδικό> 3 </κωδικός>'; +$lang['starttls'] = 'Να γίνει χρήση συνδέσεων TLS?'; +$lang['referrals'] = 'Να ακολουθηθούν τα μέλη αναφοράς?'; +$lang['deref'] = 'Πώς να σβηστεί η αναφορά aliases?'; +$lang['binddn'] = 'To DN ενός προαιρετικού επίσημου χρήστη αν ο ανώνυμος σύνδεσμος δεν είναι επαρκής Πχ. <code>cn=admin, dc=my, dc=home</code> '; +$lang['bindpw'] = 'Ο κωδικός πρόσβασης του άνω χρήστη'; +$lang['userscope'] = 'Περιορισμός του εύρους αναζήτησης χρήστη'; +$lang['groupscope'] = 'Περιορίστε το εύρος της αναζήτησης για αναζήτηση ομάδας'; +$lang['userkey'] = ' Η Καταχώρηση του ονόματος χρήστη πρέπει να είναι σύμφωνα με την ανάλυση (=φίλτρο) χρήστη.'; +$lang['groupkey'] = 'Εγγραφή ομάδας ως μέλους από οιαδήποτε κατηγορία χρήστη (αντί των στάνταρ ομάδων AD) πχ ομάδα τμήματος ή αριθμός τηλεφώνου'; +$lang['modPass'] = 'Μπορεί ο κωδικός πρόσβασης LDAP να αλλάξει μέσω του dokuwiki?'; +$lang['debug'] = 'Προβολή επιπλέον πληροφοριών για την ανεύρεση σφαλμάτων'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER '; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING '; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS '; +$lang['referrals_o_-1'] = 'προεπιλογή χρήσης'; +$lang['referrals_o_0'] = 'μην ακολουθείτε τα νέα μέλη αναφοράς'; +$lang['referrals_o_1'] = 'ακολουθείστε τα νέα μέλη αναφοράς '; diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php index a4194b00a..99884745d 100644 --- a/lib/plugins/authldap/lang/en/settings.php +++ b/lib/plugins/authldap/lang/en/settings.php @@ -11,6 +11,7 @@ $lang['referrals'] = 'Shall referrals be followed?'; $lang['deref'] = 'How to dereference aliases?'; $lang['binddn'] = 'DN of an optional bind user if anonymous bind is not sufficient. Eg. <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = 'Password of above user'; +$lang['attributes'] = 'Attributes to retrieve with the LDAP search.'; $lang['userscope'] = 'Limit search scope for user search'; $lang['groupscope'] = 'Limit search scope for group search'; $lang['userkey'] = 'Attribute denoting the username; must be consistent to userfilter.'; diff --git a/lib/plugins/authldap/lang/es/settings.php b/lib/plugins/authldap/lang/es/settings.php index ba8f41e59..7a4090fe2 100644 --- a/lib/plugins/authldap/lang/es/settings.php +++ b/lib/plugins/authldap/lang/es/settings.php @@ -3,11 +3,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Domingo Redal <docxml@gmail.com> * @author Antonio Bueno <atnbueno@gmail.com> * @author Eloy <ej.perezgomez@gmail.com> * @author Alejandro Nunez <nunez.alejandro@gmail.com> * @author Enny Rodriguez <aquilez.4@gmail.com> - * @author Domingo Redal <docxml@gmail.com> */ $lang['server'] = 'Tu servidor LDAP. Puede ser el nombre del host (<code>localhost</code>) o una URL completa (<code>ldap://server.tld:389</code>)'; $lang['port'] = 'Servidor LDAP en caso de que no se diera la URL completa anteriormente.'; @@ -21,6 +21,7 @@ $lang['referrals'] = '¿Deben ser seguidas las referencias?'; $lang['deref'] = '¿Cómo desreferenciar los alias?'; $lang['binddn'] = 'DN de un usuario de enlace opcional si el enlace anónimo no es suficiente. P. ej. <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = 'Contraseña del usuario de arriba.'; +$lang['attributes'] = 'Atributos a recuperar de la búsqueda en LDAP.'; $lang['userscope'] = 'Limitar ámbito de búsqueda para búsqueda de usuarios'; $lang['groupscope'] = 'Limitar ámbito de búsqueda para búsqueda de grupos'; $lang['userkey'] = 'Atributo que denota el nombre de usuario; debe ser coherente con el filtro.'; diff --git a/lib/plugins/authldap/lang/fa/settings.php b/lib/plugins/authldap/lang/fa/settings.php index 3d4f17b98..658cdf8ba 100644 --- a/lib/plugins/authldap/lang/fa/settings.php +++ b/lib/plugins/authldap/lang/fa/settings.php @@ -3,10 +3,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author علیرضا ایوز <info@alirezaivaz.ir> + * @author Masoud Sadrnezhaad <masoud@sadrnezhaad.ir> * @author Mohammad Sadegh <msdn2013@gmail.com> * @author Omid Hezaveh <hezpublic@gmail.com> * @author Mohmmad Razavi <sepent@gmail.com> - * @author Masoud Sadrnezhaad <masoud@sadrnezhaad.ir> * @author sam01 <m.sajad079@gmail.com> */ $lang['server'] = 'سرور LDAP شما. چه به صورت '; diff --git a/lib/plugins/authldap/lang/fi/settings.php b/lib/plugins/authldap/lang/fi/settings.php index b15d8c676..c322d245c 100644 --- a/lib/plugins/authldap/lang/fi/settings.php +++ b/lib/plugins/authldap/lang/fi/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Otto Vainio <otto@valjakko.net> */ $lang['starttls'] = 'Käytä TLS yhteyttä'; diff --git a/lib/plugins/authldap/lang/fr/settings.php b/lib/plugins/authldap/lang/fr/settings.php index be3636708..b1285a3a1 100644 --- a/lib/plugins/authldap/lang/fr/settings.php +++ b/lib/plugins/authldap/lang/fr/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author PaliPalo <palipalo@hotmail.fr> * @author Bruno Veilleux <bruno.vey@gmail.com> * @author schplurtz <Schplurtz@laposte.net> */ @@ -18,6 +19,7 @@ $lang['referrals'] = 'Suivre les références?'; $lang['deref'] = 'Comment déréférencer les alias ?'; $lang['binddn'] = 'Nom de domaine d\'un utilisateur de connexion facultatif si une connexion anonyme n\'est pas suffisante. Ex. : <code>cn=admin, dc=mon, dc=accueil</code>'; $lang['bindpw'] = 'Mot de passe de l\'utilisateur ci-dessus.'; +$lang['attributes'] = 'Attributs à récupérer avec la recherche LDAP.'; $lang['userscope'] = 'Limiter la portée de recherche d\'utilisateurs'; $lang['groupscope'] = 'Limiter la portée de recherche de groupes'; $lang['userkey'] = 'Attribut indiquant le nom d\'utilisateur. Doit être en accord avec le filtre d\'utilisateur.'; diff --git a/lib/plugins/authldap/lang/ja/settings.php b/lib/plugins/authldap/lang/ja/settings.php index fd7ad7652..f9d16e7d3 100644 --- a/lib/plugins/authldap/lang/ja/settings.php +++ b/lib/plugins/authldap/lang/ja/settings.php @@ -3,31 +3,32 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> + * @author lempel <riverlempel@hotmail.com> * @author Satoshi Sahara <sahara.satoshi@gmail.com> * @author Hideaki SAWADA <sawadakun@live.jp> - * @author Hideaki SAWADA <chuno@live.jp> * @author PzF_X <jp_minecraft@yahoo.co.jp> * @author Ikuo Obataya <i.obataya@gmail.com> */ -$lang['server'] = 'LDAPサーバー。ホスト名(<code>localhost</code>)又は完全修飾URL(<code>ldap://server.tld:389</code>)'; -$lang['port'] = '上記が完全修飾URLでない場合、LDAPサーバーポート'; -$lang['usertree'] = 'ユーザーアカウントを探す場所。例:<code>ou=People, dc=server, dc=tld</code>'; -$lang['grouptree'] = 'ユーザーグループを探す場所。例:<code>ou=Group, dc=server, dc=tld</code>'; -$lang['userfilter'] = 'ユーザーアカウントを探すためのLDAP抽出条件。例:<code>(&(uid=%{user})(objectClass=posixAccount))</code>'; -$lang['groupfilter'] = 'グループを探すLDAP抽出条件。例:<code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; -$lang['version'] = '使用するプロトコルのバージョン。<code>3</code>を設定する必要がある場合があります。'; -$lang['starttls'] = 'TLS接続を使用しますか?'; -$lang['referrals'] = '紹介に従いますか?'; -$lang['deref'] = 'どのように間接参照のエイリアスにしますか?'; -$lang['binddn'] = '匿名バインドでは不十分な場合、オプションバインドユーザーのDN。例:<code>cn=admin, dc=my, dc=home</code>'; +$lang['server'] = 'LDAPサーバー<br>ホスト名(<code>localhost</code>)又は完全修飾URL(<code>ldap://server.tld:389</code>)'; +$lang['port'] = '上記が完全修飾URLでない場合のLDAPサーバーポート'; +$lang['usertree'] = 'ユーザーアカウントを探す場所(例:<code>ou=People, dc=server, dc=tld</code>)'; +$lang['grouptree'] = 'ユーザーグループを探す場所(例:<code>ou=Group, dc=server, dc=tld</code>)'; +$lang['userfilter'] = 'ユーザーアカウントを探すためのLDAP抽出条件(例:<code>(&(uid=%{user})(objectClass=posixAccount))</code>)'; +$lang['groupfilter'] = 'グループを探すLDAP抽出条件(例:<code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>)'; +$lang['version'] = '使用するプロトコルのバージョン(場合によっては<code>3</code>を設定する必要があります。)'; +$lang['starttls'] = 'TLS接続を使用する'; +$lang['referrals'] = '紹介に従う'; +$lang['deref'] = 'どのように間接参照のエイリアスにするか'; +$lang['binddn'] = '匿名バインドでは不十分な場合の、オプションバインドユーザーのDN(例:<code>cn=admin, dc=my, dc=home</code>)'; $lang['bindpw'] = '上記ユーザーのパスワード'; +$lang['attributes'] = 'LDAP検索で取得する属性。'; $lang['userscope'] = 'ユーザー検索の範囲を限定させる'; $lang['groupscope'] = 'グループ検索の範囲を限定させる'; -$lang['userkey'] = 'ユーザー名を示す属性。userfilter と一致している必要があります。'; -$lang['groupkey'] = 'ユーザー属性をグループのメンバーシップから設定します(代わりに標準のADグループ)。 -例えば、部署や電話番号などです。'; -$lang['modPass'] = 'DokuWiki から LDAP パスワードの変更が可能?'; -$lang['debug'] = 'エラーに関して追加のデバッグ情報を表示する。'; +$lang['userkey'] = 'ユーザー名を示す属性(userfilter と一致している必要があります。)'; +$lang['groupkey'] = 'ユーザー属性をグループのメンバーシップから設定する(標準のADグループの代わり。例:部署や電話番号など)'; +$lang['modPass'] = 'DokuWiki から LDAP パスワードの変更が可能かどうか'; +$lang['debug'] = 'エラーに関して追加のデバッグ情報を表示する'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; $lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; diff --git a/lib/plugins/authldap/lang/nl/settings.php b/lib/plugins/authldap/lang/nl/settings.php index 1f80b0251..1a3120291 100644 --- a/lib/plugins/authldap/lang/nl/settings.php +++ b/lib/plugins/authldap/lang/nl/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author PBU <pbu@xs4all.nl> * @author Gerrit Uitslag <klapinklapin@gmail.com> * @author Remon <no@email.local> * @author Johan Wijnker <johan@wijnker.eu> @@ -19,6 +20,7 @@ $lang['referrals'] = 'Moeten verwijzingen worden gevolgd?'; $lang['deref'] = 'Hoe moeten de verwijzing van aliases worden bepaald?'; $lang['binddn'] = 'DN van een optionele bind gebruiker als anonieme bind niet genoeg is. Bijv. <code>cn=beheer, dc=mijn, dc=thuis</code>'; $lang['bindpw'] = 'Wachtwoord van bovenstaande gebruiker'; +$lang['attributes'] = 'Welke onderdelen moeten in LDAP gezocht worden'; $lang['userscope'] = 'Beperken scope van zoekfuncties voor gebruikers'; $lang['groupscope'] = 'Beperken scope van zoekfuncties voor groepen'; $lang['userkey'] = 'Attribuut aanduiding van de gebruikersnaam; moet consistent zijn met userfilter.'; diff --git a/lib/plugins/authldap/lang/no/settings.php b/lib/plugins/authldap/lang/no/settings.php index 3e320bde0..3fd09698f 100644 --- a/lib/plugins/authldap/lang/no/settings.php +++ b/lib/plugins/authldap/lang/no/settings.php @@ -6,7 +6,6 @@ * @author Christopher Schive <chschive@frisurf.no> * @author Patrick <spill.p@hotmail.com> * @author Arne Hanssen <arne.hanssen@getmail.no> - * @author Arne Hanssen <arnehans@getmail.no> */ $lang['server'] = 'Din LDAP-server. Enten vertsnavnet (<code>localhost</code>) eller hele URL (<code>ldap://server.tld:389</code>)'; $lang['port'] = 'LDAP serverport dersom ingen full URL var gitt over.'; diff --git a/lib/plugins/authldap/lang/pt-br/settings.php b/lib/plugins/authldap/lang/pt-br/settings.php index 03469e5c0..8b5cb378b 100644 --- a/lib/plugins/authldap/lang/pt-br/settings.php +++ b/lib/plugins/authldap/lang/pt-br/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Schopf <pschopf@gmail.com> * @author Victor Westmann <victor.westmann@gmail.com> * @author Frederico Guimarães <frederico@teia.bio.br> * @author Hudson FAS <hudsonfas@gmail.com> @@ -19,6 +20,7 @@ $lang['referrals'] = 'Permitir que as referências sejam seguidas?'; $lang['deref'] = 'Como dereferenciar os aliases?'; $lang['binddn'] = 'DN de um vínculo opcional de usuário se vínculo anônimo não for suficiente. Eg. <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = 'Senha do usuário acima'; +$lang['attributes'] = 'Atributos a serem recuperados com a pesquisa LDAP.'; $lang['userscope'] = 'Limitar escopo da busca para busca de usuário'; $lang['groupscope'] = 'Limitar escopo da busca para busca de grupo'; $lang['userkey'] = 'Atributo que indica o nome do usuário; deve ser consistente com userfilter.'; diff --git a/lib/plugins/authldap/lang/pt/settings.php b/lib/plugins/authldap/lang/pt/settings.php index ff308c68e..d1c67245e 100644 --- a/lib/plugins/authldap/lang/pt/settings.php +++ b/lib/plugins/authldap/lang/pt/settings.php @@ -3,32 +3,37 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> + * @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com> + * @author Maykon Oliveira <maykonoliveira850@gmail.com> * @author André Neves <drakferion@gmail.com> * @author Guido Salatino <guidorafael23@gmail.com> * @author Romulo Pereira <romuloccomp@gmail.com> * @author Paulo Carmino <contato@paulocarmino.com> */ -$lang['server'] = 'O seu servidor de LDAP. Ou hostname (<code>localhost</code>) ou URL qualificado completo (<code>ldap://servidor.tld:389</code>)'; -$lang['port'] = 'Porta de servidor de LDAP se o URL completo não foi fornecido acima'; -$lang['usertree'] = 'Onde encontrar as contas de utilizador. Por exemplo <code>ou=Pessoas, dc=servidor, dc=tld</code>'; -$lang['grouptree'] = 'Onde encontrar os grupos de utilizadores. Por exemplo code>ou=Grupo, dc=servidor, dc=tld</code>'; +$lang['server'] = 'O seu servidor de LDAP. Ou hostname (<code>localhost</code>) ou URL qualificada completa (<code>ldap://servidor.tld:389</code>)'; +$lang['port'] = 'Porta de servidor de LDAP se a URL completa não foi fornecida acima'; +$lang['usertree'] = 'Onde encontrar as contas de usuário. Por exemplo <code>ou=Pessoas, dc=servidor, dc=tld</code>'; +$lang['grouptree'] = 'Onde encontrar os grupos de usuário. Por exemplo code>ou=Grupo, dc=servidor, dc=tld</code>'; $lang['userfilter'] = 'Filtro LDAP para procurar por contas de utilizador. Por exemplo <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; $lang['groupfilter'] = 'Filtro LDAP para procurar por grupos. Por exemplo <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; $lang['version'] = 'A versão do protocolo a utilizar. Pode precisar de alterar isto para <code>3</code>'; -$lang['starttls'] = 'Usar ligações TLS?'; +$lang['starttls'] = 'Usar conexões TLS?'; $lang['referrals'] = 'Referrals devem ser seguidos?'; $lang['deref'] = 'Como desreferenciar aliases?'; -$lang['binddn'] = 'DN de um usuário de ligação opcional, quando a ligação é anônima não é suficiente. Eg. <code> cn = admin, dc = my, dc = home </code>'; -$lang['bindpw'] = 'Senha do utilizador acima'; +$lang['binddn'] = 'DN de um usuário de ligação opcional, quando a ligação é anônima não é suficiente. Ex. <code> cn = admin, dc = my, dc = home </code>'; +$lang['bindpw'] = 'Senha do usuário acima'; +$lang['attributes'] = 'Atributos a serem recuperados com a pesquisa LDAP.'; $lang['userscope'] = 'Escopo de pesquisa Limite para pesquisa de usuário'; -$lang['groupscope'] = 'Escopo de pesquisa Limite para pesquisa de grupo'; -$lang['groupkey'] = 'A participação no grupo a partir de qualquer atributo de usuário (em vez de AD padrão de grupos) exemplo: grupo de departamento ou número de telefone'; +$lang['groupscope'] = 'Escopo de pesquisa limite para pesquisa de grupo'; +$lang['userkey'] = 'Atributo denotando o nome de usuário; deve ser consistente com o filtro do usuário.'; +$lang['groupkey'] = 'A participação no grupo a partir de qualquer atributo de usuário (em vez de AD padrão de grupos) ex: grupo de departamento ou número de telefone'; $lang['modPass'] = 'Sua senha LDAP pode ser alterada via dokuwiki?'; -$lang['debug'] = 'Mostrar informação adicional de debug aquando de erros'; -$lang['deref_o_0'] = 'LDAP_DEREF_NUNCA'; -$lang['deref_o_1'] = 'LDAP_DEREF_PESQUISANDO'; -$lang['deref_o_2'] = 'LDAP_DEREF_BUSCANDO'; -$lang['deref_o_3'] = 'LDAP_DEREF_SEMPRE'; +$lang['debug'] = 'Mostrar informação adicional de debug quando ocorrerem erros'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; $lang['referrals_o_-1'] = 'usar padrão'; $lang['referrals_o_0'] = 'não seguir as referências'; $lang['referrals_o_1'] = 'seguir as referências'; diff --git a/lib/plugins/authldap/lang/ru/settings.php b/lib/plugins/authldap/lang/ru/settings.php index 916d9a2d2..c5d3ef456 100644 --- a/lib/plugins/authldap/lang/ru/settings.php +++ b/lib/plugins/authldap/lang/ru/settings.php @@ -3,8 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) - * @author Aleksandr Selivanov <alexgearbox@gmail.com> * @author Erli Moen <evseev.jr@gmail.com> * @author Владимир <id37736@yandex.ru> * @author Vitaly Filatenko <kot@hacktest.net> @@ -22,10 +22,11 @@ $lang['referrals'] = 'Следовать за referrals?'; $lang['deref'] = 'Как расшифровывать псевдонимы?'; $lang['binddn'] = 'DN вторичного bind-пользователя, если anonymous bind недостаточно. Например: <code>cn=admin, dc=my, dc=home</code>'; $lang['bindpw'] = 'Пароль для указанного пользователя'; +$lang['attributes'] = 'Атрибуты для извлечения с помощью поиска LDAP.'; $lang['userscope'] = 'Ограничить область поиска при поиске пользователей'; $lang['groupscope'] = 'Ограничить область поиска при поиске групп'; -$lang['userkey'] = 'Атрибут означающий имя пользователя; должен быть таким же как в userfilter'; -$lang['groupkey'] = 'Использовать любой атрибут пользователя для включения в группу (вместо стандартного AD groups) Например из атрибута department или telephone number'; +$lang['userkey'] = 'Атрибут, означающий имя пользователя; должен быть таким же как в userfilter'; +$lang['groupkey'] = 'Использовать любой атрибут пользователя для включения в группу (вместо стандартного AD groups). Например, из атрибута department или telephone number'; $lang['modPass'] = 'Может ли пароль LDAP быть изменён через «Докувики»?'; $lang['debug'] = 'Показывать дополнительную отладочную информацию при ошибках'; $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; diff --git a/lib/plugins/authldap/lang/sk/settings.php b/lib/plugins/authldap/lang/sk/settings.php index 2d45c923e..9d0456a72 100644 --- a/lib/plugins/authldap/lang/sk/settings.php +++ b/lib/plugins/authldap/lang/sk/settings.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Tibor Repček <tiborepcek@gmail.com> * @author Martin Michalek <michalek.dev@gmail.com> */ $lang['server'] = 'LDAP server. Adresa (<code>localhost</code>) alebo úplné URL (<code>ldap://server.tld:389</code>)'; @@ -27,3 +28,6 @@ $lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; $lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; $lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; $lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; +$lang['referrals_o_-1'] = 'použiť prednastavené'; +$lang['referrals_o_0'] = 'nesleduj odkazovače'; +$lang['referrals_o_1'] = 'sleduj odkazovače'; diff --git a/lib/plugins/authldap/lang/sr/settings.php b/lib/plugins/authldap/lang/sr/settings.php index 3aec5c38a..6f99a532a 100644 --- a/lib/plugins/authldap/lang/sr/settings.php +++ b/lib/plugins/authldap/lang/sr/settings.php @@ -3,10 +3,19 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Milan Oparnica <milan.opa@gmail.com> * @author Марко М. Костић <marko.m.kostic@gmail.com> */ +$lang['server'] = 'Vaš LDAP server. Bilo po nazivu (<code>localhost</code>) ili po punoj URL putanju (<code>ldap://server.tld:389</code>)'; +$lang['port'] = 'Port LDAP servera ako nije zadat u više unetoj punoj URL putanji.'; +$lang['usertree'] = 'Mesto za potragu za korisničkim nalozima. Npr. <code>ou=People, dc=server, dc=tld</code>'; +$lang['grouptree'] = 'Mesto za potragu za korisničkim grupama. Npr. <code>ou=Group, dc=server, dc=tld</code>'; +$lang['userfilter'] = 'LDAP filter za pretragu za korisničkim nalozima. Npr. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'LDAP filter za pretragu za korisničkim grupama. Npr. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; +$lang['version'] = 'Verzija protokola. Može biti neophodno da ovo postavite na vrednost <code>3</code>'; $lang['starttls'] = 'Користити TLS везе?'; $lang['referrals'] = 'Да ли треба пратити реферале?'; +$lang['deref'] = 'Kako razrešiti pseudonime?'; $lang['bindpw'] = 'Лозинка корисника изнад'; $lang['userscope'] = 'Ограничи опсег претраживања за корисничке претраге'; $lang['groupscope'] = 'Ограничи опсег претраживања за групне претраге'; diff --git a/lib/plugins/authldap/lang/tr/settings.php b/lib/plugins/authldap/lang/tr/settings.php index 843b7ef9c..3b526ee3c 100644 --- a/lib/plugins/authldap/lang/tr/settings.php +++ b/lib/plugins/authldap/lang/tr/settings.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author ilker rifat kapaç <irifat@gmail.com> */ $lang['bindpw'] = 'Üstteki kullanıcının şifresi'; diff --git a/lib/plugins/authldap/lang/vi/lang.php b/lib/plugins/authldap/lang/vi/lang.php new file mode 100644 index 000000000..c1f328901 --- /dev/null +++ b/lib/plugins/authldap/lang/vi/lang.php @@ -0,0 +1,9 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['connectfail'] = 'LDAP không thể kết nối : %s'; +$lang['domainfail'] = 'LDAP không thể tìm thấy dn thành viên của bạn'; diff --git a/lib/plugins/authldap/lang/vi/settings.php b/lib/plugins/authldap/lang/vi/settings.php new file mode 100644 index 000000000..65c756e4a --- /dev/null +++ b/lib/plugins/authldap/lang/vi/settings.php @@ -0,0 +1,33 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['server'] = 'Máy chủ LDAP của bạn. Tên máy chủ (<code>localhost</code>) hoặc URL đầy đủ (<code>ldap://server.tld:389</code>)'; +$lang['port'] = 'Cổng máy chủ LDAP nếu không có URL đầy đủ được đưa ra bên trên'; +$lang['usertree'] = 'Nơi tìm tài khoản thành viên. VD. <code>ou=People, dc=server, dc=tld</code>'; +$lang['grouptree'] = 'Nơi tìm nhóm thành viên. Eg. <code>ou=Group, dc=server, dc=tld</code>'; +$lang['userfilter'] = 'Bộ lọc LDAP để tìm kiếm tài khoản thành viên. VD. <code>(&(uid=%{user})(objectClass=posixAccount))</code>'; +$lang['groupfilter'] = 'Bộ lọc LDAP để tìm kiếm nhóm thành viên. Eg. <code>(&(objectClass=posixGroup)(|(gidNumber=%{gid})(memberUID=%{user})))</code>'; +$lang['version'] = 'Phiên bản giao thức để sử dụng. Bạn có thể cần đặt cái này thành <code>3</code>'; +$lang['starttls'] = 'Sử dụng kết nối TLS?'; +$lang['referrals'] = 'Theo dõi Shall referrals?'; +$lang['deref'] = 'Làm thế nào để xóa bỏ bí danh?'; +$lang['binddn'] = 'DN của một thành viên liên kết tùy chọn nếu liên kết ẩn danh là không đủ. VD. <code>cn=admin, dc=my, dc=home</code>'; +$lang['bindpw'] = 'Mật khẩu của thành viên trên'; +$lang['attributes'] = 'Các thuộc tính truy xuất với tìm kiếm LDAP.'; +$lang['userscope'] = 'Giới hạn phạm vi tìm kiếm cho tìm kiếm thành viên'; +$lang['groupscope'] = 'Giới hạn phạm vi tìm kiếm cho tìm kiếm nhóm'; +$lang['userkey'] = 'Thuộc tính biểu thị tên thành viên; phải phù hợp với bộ lọc thành viên.'; +$lang['groupkey'] = 'Thành viên nhóm từ bất kỳ thuộc tính thành viên nào (thay vì các nhóm AD tiêu chuẩn), VD. nhóm từ bộ phận hoặc số điện thoại'; +$lang['modPass'] = 'Có thể thay đổi mật khẩu LDAP qua dokuwiki không?'; +$lang['debug'] = 'Hiển thị thông tin gỡ lỗi bổ sung về lỗi'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; +$lang['referrals_o_-1'] = 'sử dụng mặc định'; +$lang['referrals_o_0'] = 'không theo dõi referrals'; +$lang['referrals_o_1'] = 'theo dõi referrals'; diff --git a/lib/plugins/authmysql/auth.php b/lib/plugins/authmysql/auth.php deleted file mode 100644 index 999542a3d..000000000 --- a/lib/plugins/authmysql/auth.php +++ /dev/null @@ -1,1110 +0,0 @@ -<?php -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -/** - * MySQL authentication backend - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Andreas Gohr <andi@splitbrain.org> - * @author Chris Smith <chris@jalakai.co.uk> - * @author Matthias Grimm <matthias.grimmm@sourceforge.net> - * @author Jan Schumann <js@schumann-it.com> - */ -class auth_plugin_authmysql extends DokuWiki_Auth_Plugin { - /** @var resource holds the database connection */ - protected $dbcon = 0; - /** @var int database version*/ - protected $dbver = 0; - /** @var int database revision */ - protected $dbrev = 0; - /** @var int database subrevision */ - protected $dbsub = 0; - - /** @var array cache to avoid re-reading user info data */ - protected $cacheUserInfo = array(); - - /** - * Constructor - * - * checks if the mysql interface is available, otherwise it will - * set the variable $success of the basis class to false - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - */ - public function __construct() { - parent::__construct(); - - if(!function_exists('mysql_connect')) { - $this->_debug("MySQL err: PHP MySQL extension not found.", -1, __LINE__, __FILE__); - $this->success = false; - return; - } - - // set capabilities based upon config strings set - if(!$this->getConf('server') || !$this->getConf('user') || !$this->getConf('database')) { - $this->_debug("MySQL err: insufficient configuration.", -1, __LINE__, __FILE__); - - $this->success = false; - return; - } - - $this->cando['addUser'] = $this->_chkcnf( - array( - 'getUserInfo', - 'getGroups', - 'addUser', - 'getUserID', - 'getGroupID', - 'addGroup', - 'addUserGroup' - ), true - ); - $this->cando['delUser'] = $this->_chkcnf( - array( - 'getUserID', - 'delUser', - 'delUserRefs' - ), true - ); - $this->cando['modLogin'] = $this->_chkcnf( - array( - 'getUserID', - 'updateUser', - 'UpdateTarget' - ), true - ); - $this->cando['modPass'] = $this->cando['modLogin']; - $this->cando['modName'] = $this->cando['modLogin']; - $this->cando['modMail'] = $this->cando['modLogin']; - $this->cando['modGroups'] = $this->_chkcnf( - array( - 'getUserID', - 'getGroups', - 'getGroupID', - 'addGroup', - 'addUserGroup', - 'delGroup', - 'getGroupID', - 'delUserGroup' - ), true - ); - /* getGroups is not yet supported - $this->cando['getGroups'] = $this->_chkcnf(array('getGroups', - 'getGroupID'),false); */ - $this->cando['getUsers'] = $this->_chkcnf( - array( - 'getUsers', - 'getUserInfo', - 'getGroups' - ), false - ); - $this->cando['getUserCount'] = $this->_chkcnf(array('getUsers'), false); - - if($this->getConf('debug') >= 2) { - $candoDebug = ''; - foreach($this->cando as $cd => $value) { - if($value) { $value = 'yes'; } else { $value = 'no'; } - $candoDebug .= $cd . ": " . $value . " | "; - } - $this->_debug("authmysql cando: " . $candoDebug, 0, __LINE__, __FILE__); - } - } - - /** - * Check if the given config strings are set - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string[] $keys - * @param bool $wop is this a check for a write operation? - * @return bool - */ - protected function _chkcnf($keys, $wop = false) { - foreach($keys as $key) { - if(!$this->getConf($key)) return false; - } - - /* write operation and lock array filled with tables names? */ - if($wop && (!is_array($this->getConf('TablesToLock')) || - !count($this->getConf('TablesToLock'))) - ) { - return false; - } - - return true; - } - - /** - * Checks if the given user exists and the given plaintext password - * is correct. Furtheron it might be checked wether the user is - * member of the right group - * - * Depending on which SQL string is defined in the config, password - * checking is done here (getpass) or by the database (passcheck) - * - * @param string $user user who would like access - * @param string $pass user's clear text password to check - * @return bool - * - * @author Andreas Gohr <andi@splitbrain.org> - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - */ - public function checkPass($user, $pass) { - global $conf; - $rc = false; - - if($this->_openDB()) { - $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('checkPass')); - $sql = str_replace('%{pass}', $this->_escape($pass), $sql); - $sql = str_replace('%{dgroup}', $this->_escape($conf['defaultgroup']), $sql); - $result = $this->_queryDB($sql); - - if($result !== false && count($result) == 1) { - if($this->getConf('forwardClearPass') == 1) { - $rc = true; - } else { - $rc = auth_verifyPassword($pass, $result[0]['pass']); - } - } - $this->_closeDB(); - } - return $rc; - } - - /** - * Return user info - * - * @author Andreas Gohr <andi@splitbrain.org> - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user user login to get data for - * @param bool $requireGroups when true, group membership information should be included in the returned array; - * when false, it maybe included, but is not required by the caller - * @return array|bool - */ - public function getUserData($user, $requireGroups=true) { - if($this->_cacheExists($user, $requireGroups)) { - return $this->cacheUserInfo[$user]; - } - - if($this->_openDB()) { - $this->_lockTables("READ"); - $info = $this->_getUserInfo($user, $requireGroups); - $this->_unlockTables(); - $this->_closeDB(); - } else { - $info = false; - } - return $info; - } - - /** - * Create a new User. Returns false if the user already exists, - * null when an error occurred and true if everything went well. - * - * The new user will be added to the default group by this - * function if grps are not specified (default behaviour). - * - * @author Andreas Gohr <andi@splitbrain.org> - * @author Chris Smith <chris@jalakai.co.uk> - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user nick of the user - * @param string $pwd clear text password - * @param string $name full name of the user - * @param string $mail email address - * @param array $grps array of groups the user should become member of - * @return bool|null - */ - public function createUser($user, $pwd, $name, $mail, $grps = null) { - global $conf; - - if($this->_openDB()) { - if(($info = $this->_getUserInfo($user)) !== false) { - msg($this->getLang('userexists'), -1); - return false; // user already exists - } - - // set defaultgroup if no groups were given - if($grps == null) { - $grps = array($conf['defaultgroup']); - } - - $this->_lockTables("WRITE"); - $pwd = $this->getConf('forwardClearPass') ? $pwd : auth_cryptPassword($pwd); - $rc = $this->_addUser($user, $pwd, $name, $mail, $grps); - $this->_unlockTables(); - $this->_closeDB(); - if(!$rc) { - msg($this->getLang('writefail')); - return null; - } - return true; - } else { - msg($this->getLang('connectfail'), -1); - } - return null; // return error - } - - /** - * Modify user data - * - * An existing user dataset will be modified. Changes are given in an array. - * - * The dataset update will be rejected if the user name should be changed - * to an already existing one. - * - * The password must be provided unencrypted. Pasword encryption is done - * automatically if configured. - * - * If one or more groups can't be updated, an error will be set. In - * this case the dataset might already be changed and we can't rollback - * the changes. Transactions would be really useful here. - * - * modifyUser() may be called without SQL statements defined that are - * needed to change group membership (for example if only the user profile - * should be modified). In this case we assure that we don't touch groups - * even when $changes['grps'] is set by mistake. - * - * @author Chris Smith <chris@jalakai.co.uk> - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user nick of the user to be changed - * @param array $changes array of field/value pairs to be changed (password will be clear text) - * @return bool true on success, false on error - */ - public function modifyUser($user, $changes) { - $rc = false; - - if(!is_array($changes) || !count($changes)) { - return true; // nothing to change - } - - if($this->_openDB()) { - $this->_lockTables("WRITE"); - - $rc = $this->_updateUserInfo($user, $changes); - - if(!$rc) { - msg($this->getLang('usernotexists'), -1); - } elseif(isset($changes['grps']) && $this->cando['modGroups']) { - $groups = $this->_getGroups($user); - $grpadd = array_diff($changes['grps'], $groups); - $grpdel = array_diff($groups, $changes['grps']); - - foreach($grpadd as $group) { - if(($this->_addUserToGroup($user, $group, true)) == false) { - $rc = false; - } - } - - foreach($grpdel as $group) { - if(($this->_delUserFromGroup($user, $group)) == false) { - $rc = false; - } - } - - if(!$rc) msg($this->getLang('writefail')); - } - - $this->_unlockTables(); - $this->_closeDB(); - } else { - msg($this->getLang('connectfail'), -1); - } - return $rc; - } - - /** - * [public function] - * - * Remove one or more users from the list of registered users - * - * @param array $users array of users to be deleted - * @return int the number of users deleted - * - * @author Christopher Smith <chris@jalakai.co.uk> - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - */ - function deleteUsers($users) { - $count = 0; - - if($this->_openDB()) { - if(is_array($users) && count($users)) { - $this->_lockTables("WRITE"); - foreach($users as $user) { - if($this->_delUser($user)) { - $count++; - } - } - $this->_unlockTables(); - } - $this->_closeDB(); - } else { - msg($this->getLang('connectfail'), -1); - } - return $count; - } - - /** - * Counts users which meet certain $filter criteria. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param array $filter filter criteria in item/pattern pairs - * @return int count of found users - */ - public function getUserCount($filter = array()) { - $rc = 0; - - if($this->_openDB()) { - $sql = $this->_createSQLFilter($this->getConf('getUsers'), $filter); - - if($this->dbver >= 4) { - $sql = substr($sql, 6); /* remove 'SELECT' or 'select' */ - $sql = "SELECT SQL_CALC_FOUND_ROWS".$sql." LIMIT 1"; - $this->_queryDB($sql); - $result = $this->_queryDB("SELECT FOUND_ROWS()"); - $rc = $result[0]['FOUND_ROWS()']; - } else if(($result = $this->_queryDB($sql))) - $rc = count($result); - - $this->_closeDB(); - } - return $rc; - } - - /** - * Bulk retrieval of user data - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param int $first index of first user to be returned - * @param int $limit max number of users to be returned - * @param array $filter array of field/pattern pairs - * @return array userinfo (refer getUserData for internal userinfo details) - */ - public function retrieveUsers($first = 0, $limit = 0, $filter = array()) { - $out = array(); - - if($this->_openDB()) { - $this->_lockTables("READ"); - $sql = $this->_createSQLFilter($this->getConf('getUsers'), $filter); - $sql .= " ".$this->getConf('SortOrder'); - if($limit) { - $sql .= " LIMIT $first, $limit"; - } elseif($first) { - $sql .= " LIMIT $first"; - } - $result = $this->_queryDB($sql); - - if(!empty($result)) { - foreach($result as $user) { - if(($info = $this->_getUserInfo($user['user']))) { - $out[$user['user']] = $info; - } - } - } - - $this->_unlockTables(); - $this->_closeDB(); - } - return $out; - } - - /** - * Give user membership of a group - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user - * @param string $group - * @return bool true on success, false on error - */ - protected function joinGroup($user, $group) { - $rc = false; - - if($this->_openDB()) { - $this->_lockTables("WRITE"); - $rc = $this->_addUserToGroup($user, $group); - $this->_unlockTables(); - $this->_closeDB(); - } - return $rc; - } - - /** - * Remove user from a group - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user user that leaves a group - * @param string $group group to leave - * @return bool - */ - protected function leaveGroup($user, $group) { - $rc = false; - - if($this->_openDB()) { - $this->_lockTables("WRITE"); - $rc = $this->_delUserFromGroup($user, $group); - $this->_unlockTables(); - $this->_closeDB(); - } - return $rc; - } - - /** - * MySQL is case-insensitive - */ - public function isCaseSensitive() { - return false; - } - - /** - * Adds a user to a group. - * - * If $force is set to true non existing groups would be created. - * - * The database connection must already be established. Otherwise - * this function does nothing and returns 'false'. It is strongly - * recommended to call this function only after all participating - * tables (group and usergroup) have been locked. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user user to add to a group - * @param string $group name of the group - * @param bool $force create missing groups - * @return bool true on success, false on error - */ - protected function _addUserToGroup($user, $group, $force = false) { - $newgroup = 0; - - if(($this->dbcon) && ($user)) { - $gid = $this->_getGroupID($group); - if(!$gid) { - if($force) { // create missing groups - $sql = str_replace('%{group}', $this->_escape($group), $this->getConf('addGroup')); - $gid = $this->_modifyDB($sql); - $newgroup = 1; // group newly created - } - if(!$gid) return false; // group didn't exist and can't be created - } - - $sql = $this->getConf('addUserGroup'); - if(strpos($sql, '%{uid}') !== false) { - $uid = $this->_getUserID($user); - $sql = str_replace('%{uid}', $this->_escape($uid), $sql); - } - $sql = str_replace('%{user}', $this->_escape($user), $sql); - $sql = str_replace('%{gid}', $this->_escape($gid), $sql); - $sql = str_replace('%{group}', $this->_escape($group), $sql); - if($this->_modifyDB($sql) !== false) { - $this->_flushUserInfoCache($user); - return true; - } - - if($newgroup) { // remove previously created group on error - $sql = str_replace('%{gid}', $this->_escape($gid), $this->getConf('delGroup')); - $sql = str_replace('%{group}', $this->_escape($group), $sql); - $this->_modifyDB($sql); - } - } - return false; - } - - /** - * Remove user from a group - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user user that leaves a group - * @param string $group group to leave - * @return bool true on success, false on error - */ - protected function _delUserFromGroup($user, $group) { - $rc = false; - - if(($this->dbcon) && ($user)) { - $sql = $this->getConf('delUserGroup'); - if(strpos($sql, '%{uid}') !== false) { - $uid = $this->_getUserID($user); - $sql = str_replace('%{uid}', $this->_escape($uid), $sql); - } - $gid = $this->_getGroupID($group); - if($gid) { - $sql = str_replace('%{user}', $this->_escape($user), $sql); - $sql = str_replace('%{gid}', $this->_escape($gid), $sql); - $sql = str_replace('%{group}', $this->_escape($group), $sql); - $rc = $this->_modifyDB($sql) == 0 ? true : false; - - if ($rc) { - $this->_flushUserInfoCache($user); - } - } - } - return $rc; - } - - /** - * Retrieves a list of groups the user is a member off. - * - * The database connection must already be established - * for this function to work. Otherwise it will return - * false. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user user whose groups should be listed - * @return bool|array false on error, all groups on success - */ - protected function _getGroups($user) { - $groups = array(); - - if($this->dbcon) { - $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('getGroups')); - $result = $this->_queryDB($sql); - - if($result !== false && count($result)) { - foreach($result as $row) { - $groups[] = $row['group']; - } - } - return $groups; - } - return false; - } - - /** - * Retrieves the user id of a given user name - * - * The database connection must already be established - * for this function to work. Otherwise it will return - * false. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user user whose id is desired - * @return mixed user id - */ - protected function _getUserID($user) { - if($this->dbcon) { - $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('getUserID')); - $result = $this->_queryDB($sql); - return $result === false ? false : $result[0]['id']; - } - return false; - } - - /** - * Adds a new User to the database. - * - * The database connection must already be established - * for this function to work. Otherwise it will return - * false. - * - * @author Andreas Gohr <andi@splitbrain.org> - * @author Chris Smith <chris@jalakai.co.uk> - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user login of the user - * @param string $pwd encrypted password - * @param string $name full name of the user - * @param string $mail email address - * @param array $grps array of groups the user should become member of - * @return bool - */ - protected function _addUser($user, $pwd, $name, $mail, $grps) { - if($this->dbcon && is_array($grps)) { - $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('addUser')); - $sql = str_replace('%{pass}', $this->_escape($pwd), $sql); - $sql = str_replace('%{name}', $this->_escape($name), $sql); - $sql = str_replace('%{email}', $this->_escape($mail), $sql); - $uid = $this->_modifyDB($sql); - $gid = false; - $group = ''; - - if($uid) { - foreach($grps as $group) { - $gid = $this->_addUserToGroup($user, $group, true); - if($gid === false) break; - } - - if($gid !== false){ - $this->_flushUserInfoCache($user); - return true; - } else { - /* remove the new user and all group relations if a group can't - * be assigned. Newly created groups will remain in the database - * and won't be removed. This might create orphaned groups but - * is not a big issue so we ignore this problem here. - */ - $this->_delUser($user); - $this->_debug("MySQL err: Adding user '$user' to group '$group' failed.", -1, __LINE__, __FILE__); - } - } - } - return false; - } - - /** - * Deletes a given user and all his group references. - * - * The database connection must already be established - * for this function to work. Otherwise it will return - * false. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user username of the user to be deleted - * @return bool - */ - protected function _delUser($user) { - if($this->dbcon) { - $uid = $this->_getUserID($user); - if($uid) { - $sql = str_replace('%{uid}', $this->_escape($uid), $this->getConf('delUserRefs')); - $this->_modifyDB($sql); - $sql = str_replace('%{uid}', $this->_escape($uid), $this->getConf('delUser')); - $sql = str_replace('%{user}', $this->_escape($user), $sql); - $this->_modifyDB($sql); - $this->_flushUserInfoCache($user); - return true; - } - } - return false; - } - - /** - * Flush cached user information - * - * @author Christopher Smith <chris@jalakai.co.uk> - * - * @param string $user username of the user whose data is to be removed from the cache - * if null, empty the whole cache - */ - protected function _flushUserInfoCache($user=null) { - if (is_null($user)) { - $this->cacheUserInfo = array(); - } else { - unset($this->cacheUserInfo[$user]); - } - } - - /** - * Quick lookup to see if a user's information has been cached - * - * This test does not need a database connection or read lock - * - * @author Christopher Smith <chris@jalakai.co.uk> - * - * @param string $user username to be looked up in the cache - * @param bool $requireGroups true, if cached info should include group memberships - * - * @return bool existence of required user information in the cache - */ - protected function _cacheExists($user, $requireGroups=true) { - if (isset($this->cacheUserInfo[$user])) { - if (!is_array($this->cacheUserInfo[$user])) { - return true; // user doesn't exist - } - - if (!$requireGroups || isset($this->cacheUserInfo[$user]['grps'])) { - return true; - } - } - - return false; - } - - /** - * Get a user's information - * - * The database connection must already be established for this function to work. - * - * @author Christopher Smith <chris@jalakai.co.uk> - * - * @param string $user username of the user whose information is being reterieved - * @param bool $requireGroups true if group memberships should be included - * @param bool $useCache true if ok to return cached data & to cache returned data - * - * @return mixed false|array false if the user doesn't exist - * array containing user information if user does exist - */ - protected function _getUserInfo($user, $requireGroups=true, $useCache=true) { - $info = null; - - if ($useCache && isset($this->cacheUserInfo[$user])) { - $info = $this->cacheUserInfo[$user]; - } - - if (is_null($info)) { - $info = $this->_retrieveUserInfo($user); - } - - if (($requireGroups == true) && $info && !isset($info['grps'])) { - $info['grps'] = $this->_getGroups($user); - } - - if ($useCache) { - $this->cacheUserInfo[$user] = $info; - } - - return $info; - } - - /** - * retrieveUserInfo - * - * Gets the data for a specific user. The database connection - * must already be established for this function to work. - * Otherwise it will return 'false'. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $user user's nick to get data for - * @return false|array false on error, user info on success - */ - protected function _retrieveUserInfo($user) { - $sql = str_replace('%{user}', $this->_escape($user), $this->getConf('getUserInfo')); - $result = $this->_queryDB($sql); - if($result !== false && count($result)) { - $info = $result[0]; - return $info; - } - return false; - } - - /** - * Updates the user info in the database - * - * Update a user data structure in the database according changes - * given in an array. The user name can only be changes if it didn't - * exists already. If the new user name exists the update procedure - * will be aborted. The database keeps unchanged. - * - * The database connection has already to be established for this - * function to work. Otherwise it will return 'false'. - * - * The password will be encrypted if necessary. - * - * @param string $user user's nick being updated - * @param array $changes array of items to change as pairs of item and value - * @return bool true on success or false on error - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - */ - protected function _updateUserInfo($user, $changes) { - $sql = $this->getConf('updateUser')." "; - $cnt = 0; - $err = 0; - - if($this->dbcon) { - $uid = $this->_getUserID($user); - if ($uid === false) { - return false; - } - - foreach($changes as $item => $value) { - if($item == 'user') { - if(($this->_getUserID($changes['user']))) { - $err = 1; /* new username already exists */ - break; /* abort update */ - } - if($cnt++ > 0) $sql .= ", "; - $sql .= str_replace('%{user}', $value, $this->getConf('UpdateLogin')); - } else if($item == 'name') { - if($cnt++ > 0) $sql .= ", "; - $sql .= str_replace('%{name}', $value, $this->getConf('UpdateName')); - } else if($item == 'pass') { - if(!$this->getConf('forwardClearPass')) - $value = auth_cryptPassword($value); - if($cnt++ > 0) $sql .= ", "; - $sql .= str_replace('%{pass}', $value, $this->getConf('UpdatePass')); - } else if($item == 'mail') { - if($cnt++ > 0) $sql .= ", "; - $sql .= str_replace('%{email}', $value, $this->getConf('UpdateEmail')); - } - } - - if($err == 0) { - if($cnt > 0) { - $sql .= " ".str_replace('%{uid}', $uid, $this->getConf('UpdateTarget')); - if(get_class($this) == 'auth_mysql') $sql .= " LIMIT 1"; //some PgSQL inheritance comp. - $this->_modifyDB($sql); - $this->_flushUserInfoCache($user); - } - return true; - } - } - return false; - } - - /** - * Retrieves the group id of a given group name - * - * The database connection must already be established - * for this function to work. Otherwise it will return - * false. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $group group name which id is desired - * @return false|string group id - */ - protected function _getGroupID($group) { - if($this->dbcon) { - $sql = str_replace('%{group}', $this->_escape($group), $this->getConf('getGroupID')); - $result = $this->_queryDB($sql); - return $result === false ? false : $result[0]['id']; - } - return false; - } - - /** - * Opens a connection to a database and saves the handle for further - * usage in the object. The successful call to this functions is - * essential for most functions in this object. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @return bool - */ - protected function _openDB() { - if(!$this->dbcon) { - $con = @mysql_connect($this->getConf('server'), $this->getConf('user'), conf_decodeString($this->getConf('password'))); - if($con) { - if((mysql_select_db($this->getConf('database'), $con))) { - if((preg_match('/^(\d+)\.(\d+)\.(\d+).*/', mysql_get_server_info($con), $result)) == 1) { - $this->dbver = $result[1]; - $this->dbrev = $result[2]; - $this->dbsub = $result[3]; - } - $this->dbcon = $con; - if($this->getConf('charset')) { - mysql_query('SET CHARACTER SET "'.$this->getConf('charset').'"', $con); - } - return true; // connection and database successfully opened - } else { - mysql_close($con); - $this->_debug("MySQL err: No access to database {$this->getConf('database')}.", -1, __LINE__, __FILE__); - } - } else { - $this->_debug( - "MySQL err: Connection to {$this->getConf('user')}@{$this->getConf('server')} not possible.", - -1, __LINE__, __FILE__ - ); - } - - return false; // connection failed - } - return true; // connection already open - } - - /** - * Closes a database connection. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - */ - protected function _closeDB() { - if($this->dbcon) { - mysql_close($this->dbcon); - $this->dbcon = 0; - } - } - - /** - * Sends a SQL query to the database and transforms the result into - * an associative array. - * - * This function is only able to handle queries that returns a - * table such as SELECT. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $query SQL string that contains the query - * @return array|false with the result table - */ - protected function _queryDB($query) { - if($this->getConf('debug') >= 2) { - msg('MySQL query: '.hsc($query), 0, __LINE__, __FILE__); - } - - $resultarray = array(); - if($this->dbcon) { - $result = @mysql_query($query, $this->dbcon); - if($result) { - while(($t = mysql_fetch_assoc($result)) !== false) - $resultarray[] = $t; - mysql_free_result($result); - return $resultarray; - } - $this->_debug('MySQL err: '.mysql_error($this->dbcon), -1, __LINE__, __FILE__); - } - return false; - } - - /** - * Sends a SQL query to the database - * - * This function is only able to handle queries that returns - * either nothing or an id value such as INPUT, DELETE, UPDATE, etc. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $query SQL string that contains the query - * @return int|bool insert id or 0, false on error - */ - protected function _modifyDB($query) { - if($this->getConf('debug') >= 2) { - msg('MySQL query: '.hsc($query), 0, __LINE__, __FILE__); - } - - if($this->dbcon) { - $result = @mysql_query($query, $this->dbcon); - if($result) { - $rc = mysql_insert_id($this->dbcon); //give back ID on insert - if($rc !== false) return $rc; - } - $this->_debug('MySQL err: '.mysql_error($this->dbcon), -1, __LINE__, __FILE__); - } - return false; - } - - /** - * Locked a list of tables for exclusive access so that modifications - * to the database can't be disturbed by other threads. The list - * could be set with $conf['plugin']['authmysql']['TablesToLock'] = array() - * - * If aliases for tables are used in SQL statements, also this aliases - * must be locked. For eg. you use a table 'user' and the alias 'u' in - * some sql queries, the array must looks like this (order is important): - * array("user", "user AS u"); - * - * MySQL V3 is not able to handle transactions with COMMIT/ROLLBACK - * so that this functionality is simulated by this function. Nevertheless - * it is not as powerful as transactions, it is a good compromise in safty. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $mode could be 'READ' or 'WRITE' - * @return bool - */ - protected function _lockTables($mode) { - if($this->dbcon) { - $ttl = $this->getConf('TablesToLock'); - if(is_array($ttl) && !empty($ttl)) { - if($mode == "READ" || $mode == "WRITE") { - $sql = "LOCK TABLES "; - $cnt = 0; - foreach($ttl as $table) { - if($cnt++ != 0) $sql .= ", "; - $sql .= "$table $mode"; - } - $this->_modifyDB($sql); - return true; - } - } - } - return false; - } - - /** - * Unlock locked tables. All existing locks of this thread will be - * abrogated. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @return bool - */ - protected function _unlockTables() { - if($this->dbcon) { - $this->_modifyDB("UNLOCK TABLES"); - return true; - } - return false; - } - - /** - * Transforms the filter settings in an filter string for a SQL database - * The database connection must already be established, otherwise the - * original SQL string without filter criteria will be returned. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $sql SQL string to which the $filter criteria should be added - * @param array $filter array of filter criteria as pairs of item and pattern - * @return string SQL string with attached $filter criteria on success, original SQL string on error - */ - protected function _createSQLFilter($sql, $filter) { - $SQLfilter = ""; - $cnt = 0; - - if($this->dbcon) { - foreach($filter as $item => $pattern) { - $tmp = '%'.$this->_escape($pattern).'%'; - if($item == 'user') { - if($cnt++ > 0) $SQLfilter .= " AND "; - $SQLfilter .= str_replace('%{user}', $tmp, $this->getConf('FilterLogin')); - } else if($item == 'name') { - if($cnt++ > 0) $SQLfilter .= " AND "; - $SQLfilter .= str_replace('%{name}', $tmp, $this->getConf('FilterName')); - } else if($item == 'mail') { - if($cnt++ > 0) $SQLfilter .= " AND "; - $SQLfilter .= str_replace('%{email}', $tmp, $this->getConf('FilterEmail')); - } else if($item == 'grps') { - if($cnt++ > 0) $SQLfilter .= " AND "; - $SQLfilter .= str_replace('%{group}', $tmp, $this->getConf('FilterGroup')); - } - } - - // we have to check SQLfilter here and must not use $cnt because if - // any of cnf['Filter????'] is not defined, a malformed SQL string - // would be generated. - - if(strlen($SQLfilter)) { - $glue = strpos(strtolower($sql), "where") ? " AND " : " WHERE "; - $sql = $sql.$glue.$SQLfilter; - } - } - - return $sql; - } - - /** - * Escape a string for insertion into the database - * - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param string $string The string to escape - * @param boolean $like Escape wildcard chars as well? - * @return string - */ - protected function _escape($string, $like = false) { - if($this->dbcon) { - $string = mysql_real_escape_string($string, $this->dbcon); - } else { - $string = addslashes($string); - } - if($like) { - $string = addcslashes($string, '%_'); - } - return $string; - } - - /** - * Wrapper around msg() but outputs only when debug is enabled - * - * @param string $message - * @param int $err - * @param int $line - * @param string $file - * @return void - */ - protected function _debug($message, $err, $line, $file) { - if(!$this->getConf('debug')) return; - msg($message, $err, $line, $file); - } -} diff --git a/lib/plugins/authmysql/conf/default.php b/lib/plugins/authmysql/conf/default.php deleted file mode 100644 index 427bea273..000000000 --- a/lib/plugins/authmysql/conf/default.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -$conf['charset'] = 'utf8'; -$conf['server'] = ''; -$conf['user'] = ''; -$conf['password'] = ''; -$conf['database'] = ''; -$conf['debug'] = 0; -$conf['forwardClearPass'] = 0; -$conf['TablesToLock'] = array(); -$conf['checkPass'] = ''; -$conf['getUserInfo'] = ''; -$conf['getGroups'] = ''; -$conf['getUsers'] = ''; -$conf['FilterLogin'] = ''; -$conf['FilterName'] = ''; -$conf['FilterEmail'] = ''; -$conf['FilterGroup'] = ''; -$conf['SortOrder'] = ''; -$conf['addUser'] = ''; -$conf['addGroup'] = ''; -$conf['addUserGroup'] = ''; -$conf['delGroup'] = ''; -$conf['getUserID'] = ''; -$conf['delUser'] = ''; -$conf['delUserRefs'] = ''; -$conf['updateUser'] = ''; -$conf['UpdateLogin'] = ''; -$conf['UpdatePass'] = ''; -$conf['UpdateEmail'] = ''; -$conf['UpdateName'] = ''; -$conf['UpdateTarget'] = ''; -$conf['delUserGroup'] = ''; -$conf['getGroupID'] = '';
\ No newline at end of file diff --git a/lib/plugins/authmysql/conf/metadata.php b/lib/plugins/authmysql/conf/metadata.php deleted file mode 100644 index bad34e669..000000000 --- a/lib/plugins/authmysql/conf/metadata.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -$meta['server'] = array('string','_caution' => 'danger'); -$meta['user'] = array('string','_caution' => 'danger'); -$meta['password'] = array('password','_caution' => 'danger','_code' => 'base64'); -$meta['database'] = array('string','_caution' => 'danger'); -$meta['charset'] = array('string','_caution' => 'danger'); -$meta['debug'] = array('multichoice','_choices' => array(0,1,2),'_caution' => 'security'); -$meta['forwardClearPass'] = array('onoff','_caution' => 'danger'); -$meta['TablesToLock'] = array('array','_caution' => 'danger'); -$meta['checkPass'] = array('','_caution' => 'danger'); -$meta['getUserInfo'] = array('','_caution' => 'danger'); -$meta['getGroups'] = array('','_caution' => 'danger'); -$meta['getUsers'] = array('','_caution' => 'danger'); -$meta['FilterLogin'] = array('string','_caution' => 'danger'); -$meta['FilterName'] = array('string','_caution' => 'danger'); -$meta['FilterEmail'] = array('string','_caution' => 'danger'); -$meta['FilterGroup'] = array('string','_caution' => 'danger'); -$meta['SortOrder'] = array('string','_caution' => 'danger'); -$meta['addUser'] = array('','_caution' => 'danger'); -$meta['addGroup'] = array('','_caution' => 'danger'); -$meta['addUserGroup'] = array('','_caution' => 'danger'); -$meta['delGroup'] = array('','_caution' => 'danger'); -$meta['getUserID'] = array('','_caution' => 'danger'); -$meta['delUser'] = array('','_caution' => 'danger'); -$meta['delUserRefs'] = array('','_caution' => 'danger'); -$meta['updateUser'] = array('string','_caution' => 'danger'); -$meta['UpdateLogin'] = array('string','_caution' => 'danger'); -$meta['UpdatePass'] = array('string','_caution' => 'danger'); -$meta['UpdateEmail'] = array('string','_caution' => 'danger'); -$meta['UpdateName'] = array('string','_caution' => 'danger'); -$meta['UpdateTarget'] = array('string','_caution' => 'danger'); -$meta['delUserGroup'] = array('','_caution' => 'danger'); -$meta['getGroupID'] = array('','_caution' => 'danger'); diff --git a/lib/plugins/authmysql/lang/bg/lang.php b/lib/plugins/authmysql/lang/bg/lang.php deleted file mode 100644 index d5837c726..000000000 --- a/lib/plugins/authmysql/lang/bg/lang.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Kiril <neohidra@gmail.com> - */ -$lang['connectfail'] = 'Свързването с базата данни се провали.'; -$lang['userexists'] = 'За съжаление вече съществува потребител с това име.'; -$lang['usernotexists'] = 'За съжаление не съществува такъв потребител.'; diff --git a/lib/plugins/authmysql/lang/bg/settings.php b/lib/plugins/authmysql/lang/bg/settings.php deleted file mode 100644 index cd6370218..000000000 --- a/lib/plugins/authmysql/lang/bg/settings.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Kiril <neohidra@gmail.com> - * @author Ivan Peltekov <ivan.peltekov@abv.bg> - */ -$lang['server'] = 'Вашият MySQL сървър'; -$lang['user'] = 'MySQL потребителско име'; -$lang['password'] = 'Парола за горния потребител'; -$lang['database'] = 'Име на базата от данни'; -$lang['charset'] = 'Набор от знаци, който се ползва в базата от данни'; -$lang['debug'] = 'Показване на допълнителна debug информация'; -$lang['checkPass'] = 'SQL заявка за проверка на паролите'; -$lang['getUserInfo'] = 'SQL заявка за извличане на информация за потребителя н'; -$lang['debug_o_0'] = 'не'; -$lang['debug_o_1'] = 'само при грешка'; -$lang['debug_o_2'] = 'за всяко SQL запитване'; diff --git a/lib/plugins/authmysql/lang/cs/lang.php b/lib/plugins/authmysql/lang/cs/lang.php deleted file mode 100644 index 4dd63b437..000000000 --- a/lib/plugins/authmysql/lang/cs/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> - */ -$lang['connectfail'] = 'Selhalo připojení k databázi.'; -$lang['userexists'] = 'Omlouváme se, ale uživatel s tímto jménem již existuje.'; -$lang['usernotexists'] = 'Omlouváme se, uživatel tohoto jména neexistuje.'; -$lang['writefail'] = 'Nelze změnit údaje uživatele. Informujte prosím správce wiki'; diff --git a/lib/plugins/authmysql/lang/cs/settings.php b/lib/plugins/authmysql/lang/cs/settings.php deleted file mode 100644 index bc8e13620..000000000 --- a/lib/plugins/authmysql/lang/cs/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author mkucera66 <mkucera66@seznam.cz> - * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> - */ -$lang['server'] = 'Váš server MySQL'; -$lang['user'] = 'Uživatelské jméno pro MySQL'; -$lang['password'] = 'Heslo tohoto uživatele'; -$lang['database'] = 'Použtá databáze'; -$lang['charset'] = 'znaková sada použitá v databázi'; -$lang['debug'] = 'Zobrazit dodatečné debugovací informace'; -$lang['forwardClearPass'] = 'Posílat uživatelské heslo jako čistý text do příkazů SQL namísto využití volby passcrypt.'; -$lang['TablesToLock'] = 'Čárkou oddělený seznam tabulek, které mohou být zamčené během operací zápisu'; -$lang['checkPass'] = 'Příkaz SQL pro kontrolu hesel'; -$lang['getUserInfo'] = 'Příkaz SQL pro získání informací o uživateli'; -$lang['getGroups'] = 'Příkaz SQL pro získání uživatelovy skupiny'; -$lang['getUsers'] = 'Příkaz SQL pro seznam všech uživatelů'; -$lang['FilterLogin'] = 'Příkaz SQL pro filtrování uživatelů podle přihlašovacího jména'; -$lang['FilterName'] = 'Příkaz SQL pro filtrování uživatelů podle celého jména'; -$lang['FilterEmail'] = 'Příkaz SQL pro filtrování uživatelů podle adres e-mailů'; -$lang['FilterGroup'] = 'Příkaz SQL pro filtrování uživatelů podle členství ve skupinách'; -$lang['SortOrder'] = 'Příkaz SQL pro řazení uživatelů'; -$lang['addUser'] = 'Příkaz SQL pro přidání nového uživatele'; -$lang['addGroup'] = 'Příkaz SQL pro přidání nové skupiny'; -$lang['addUserGroup'] = 'Příkaz SQL pro přidání uživatele do existující skupiny'; -$lang['delGroup'] = 'Příkaz SQL pro vymazání skupiny'; -$lang['getUserID'] = 'Příkaz SQL pro získání primárního klíče uživatele'; -$lang['delUser'] = 'Příkaz SQL pro vymazání uživatele'; -$lang['delUserRefs'] = 'Příkaz SQL pro odstranění členství uživatele se všech skupin'; -$lang['updateUser'] = 'Příkaz SQL pro aktualizaci uživatelského profilu'; -$lang['UpdateLogin'] = 'Klauzule pro aktualizaci přihlačovacího jména uživatele'; -$lang['UpdatePass'] = 'Klauzule pro aktualizaci hesla uživatele'; -$lang['UpdateEmail'] = 'Klauzule pro aktualizaci e-mailové adresy uživatele'; -$lang['UpdateName'] = 'Klauzule pro aktualizaci celého jména uživatele'; -$lang['UpdateTarget'] = 'Omezující klauzule pro identifikaci uživatele při aktualizaci'; -$lang['delUserGroup'] = 'Příkaz SQL pro zrušení členství uživatele v dané skupině'; -$lang['getGroupID'] = 'Příkaz SQL pro získání primárního klíče skupiny'; -$lang['debug_o_0'] = 'nic'; -$lang['debug_o_1'] = 'pouze při chybách'; -$lang['debug_o_2'] = 'všechny dotazy SQL'; diff --git a/lib/plugins/authmysql/lang/cy/lang.php b/lib/plugins/authmysql/lang/cy/lang.php deleted file mode 100644 index a96715c12..000000000 --- a/lib/plugins/authmysql/lang/cy/lang.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * Welsh language file for authmysql plugin - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - */ - -$lang['connectfail'] = 'Method y cysylltiad i\'r databas.'; -$lang['userexists'] = 'Sori, mae defnyddiwr gyda\'r enw mewngofnodi hwn eisoes yn bodoli.'; -$lang['usernotexists'] = 'Sori, \'dyw\'r defnyddiwr hwnnw ddim yn bodoli.'; -$lang['writefail'] = 'Methu â newid data defnyddiwr. Rhowch wybod i Weinyddwr y Wici'; - -//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/authmysql/lang/cy/settings.php b/lib/plugins/authmysql/lang/cy/settings.php deleted file mode 100644 index 526cffa61..000000000 --- a/lib/plugins/authmysql/lang/cy/settings.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -$lang['server'] = 'Eich gweinydd MySQL'; -$lang['user'] = 'Defnyddair MySQL'; -$lang['password'] = 'Cyfrinair y defnyddiwr uchod'; -$lang['database'] = 'Databas i\'w ddefnyddio'; -$lang['charset'] = 'Set nodau i\'w defnyddio gyda\'r databas'; -$lang['debug'] = 'Dangos gwybodaeth dadfygio ychwanegol'; -$lang['forwardClearPass'] = 'Pasio cyfrineiriau defnyddwyr fel \'cleartext\' i\'r datganiadau SQL isod, yn hytrach na defnyddio\'r opsiwn \'passcrypt\''; -$lang['TablesToLock'] = 'Rhestr a wahanwyd gan goma o dablau sydd angen eu cloi yn ystod gweithredoedd ysgrifennu'; -$lang['checkPass'] = 'Datganiad SQL i wirio cyfrineiriau'; -$lang['getUserInfo'] = 'Datganiad SQL i nôl gwybodaeth defnyddiwr'; -$lang['getGroups'] = 'Datganiad SQL i nôl aelodaeth grŵp y defnyddiwr'; -$lang['getUsers'] = 'Datganiad SQL i restru pob defnyddiwr'; -$lang['FilterLogin'] = 'Cymal SQL i hidlo defnyddwyr gan enw mewngofnodi'; -$lang['FilterName'] = 'Cymal SQL i hidlo defnyddwyr gan enw llawn'; -$lang['FilterEmail'] = 'Cymal SQL i hidlo defnyddwyr gan gyfeiriad ebost'; -$lang['FilterGroup'] = 'Cymal SQL i hidlo defnyddwyr gan aelodaeth grŵp'; -$lang['SortOrder'] = 'Cymal SQL i drefnu defnyddwyr'; -$lang['addUser'] = 'Datganiad SQL i ychwanegu defnyddiwr newydd'; -$lang['addGroup'] = 'Datganiad SQL i ychwanegu grŵp newydd'; -$lang['addUserGroup'] = 'Datganiad SQL i ychwanegu defnyddiwr newydd i grŵp sy\'n bodoli eisoes'; -$lang['delGroup'] = 'Datganiad SQL i dynnu grŵp'; -$lang['getUserID'] = 'Datganiad SQL i nôl prif allwedd y defnyddiwr'; -$lang['delUser'] = 'Datganiad SQL i ddileu defnyddiwr'; -$lang['delUserRefs'] = 'Datganiad SQL i dynnu defnyddiwr o bob grŵp'; -$lang['updateUser'] = 'Datganiad SQL i ddiweddaru proffil defnyddiwr'; -$lang['UpdateLogin'] = 'Cymal Diweddaru i ddiweddaru enw mewngofnodi defnyddiwr'; -$lang['UpdatePass'] = 'Cymal Diweddaru i ddiweddaru cyfrinair defnyddiwr'; -$lang['UpdateEmail'] = 'Cymal Diweddaru i ddiweddaru cyfeiriad ebost defnyddiwr'; -$lang['UpdateName'] = 'Cymal Diweddaru i ddiweddaru enw llawn defnyddiwr'; -$lang['UpdateTarget'] = 'Cymal Cyfyngu i adnabod y defnyddiwr wrth ddiweddaru'; -$lang['delUserGroup'] = 'Datganiad SQL i dynnu defnyddiwr oddi ar grŵp'; -$lang['getGroupID'] = 'Datganiad SQL i nôl prif allwedd grŵp penodol'; - - -$lang['debug_o_0'] = 'dim'; -$lang['debug_o_1'] = 'gyda gwallau yn unig'; -$lang['debug_o_2'] = 'pob ymholiad SQL'; diff --git a/lib/plugins/authmysql/lang/da/lang.php b/lib/plugins/authmysql/lang/da/lang.php deleted file mode 100644 index 9806e1675..000000000 --- a/lib/plugins/authmysql/lang/da/lang.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Jon Theil Nielsen <jontheil@gmail.com> - * @author Jacob Palm <mail@jacobpalm.dk> - */ -$lang['connectfail'] = 'Kunne ikke forbinde til databasen.'; -$lang['userexists'] = 'Beklager, en bruger med dette login findes allerede.'; -$lang['usernotexists'] = 'Beklager, brugeren eksisterer ikke.'; -$lang['writefail'] = 'Kan ikke ændre brugerdata. Informér venligst wiki-administratoren'; diff --git a/lib/plugins/authmysql/lang/da/settings.php b/lib/plugins/authmysql/lang/da/settings.php deleted file mode 100644 index 158765ca5..000000000 --- a/lib/plugins/authmysql/lang/da/settings.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> - * @author soer9648 <soer9648@eucl.dk> - * @author Jacob Palm <mail@jacobpalm.dk> - */ -$lang['server'] = 'Din MySQL server'; -$lang['user'] = 'MySQL brugernavn'; -$lang['password'] = 'Kodeord til ovenstående bruger'; -$lang['database'] = 'Database der skal benyttes'; -$lang['charset'] = 'Tegnsæt benyttet i database'; -$lang['debug'] = 'Vis yderligere debug output'; -$lang['forwardClearPass'] = 'Videregiv bruger adgangskoder i klar tekst til nedenstående SQL statement, i stedet for at benytte passcrypt'; -$lang['TablesToLock'] = 'Kommasepareret liste over tabeller der skal låses under skrivning'; -$lang['checkPass'] = 'SQL-sætning til at kontrollere kodeord'; -$lang['getUserInfo'] = 'SQL-sætning til at hente brugerinformation'; -$lang['getGroups'] = 'SQL statement til at bestemme en brugers medlemskab af grupper'; -$lang['getUsers'] = 'SQL-sætning til at liste alle brugere'; -$lang['addUser'] = 'SQL-sætning til at tilføje en ny bruger'; -$lang['addGroup'] = 'SQL-sætning til at tilføje en ny gruppe'; -$lang['addUserGroup'] = 'SQL-sætning til at tilføje en bruger til en eksisterende gruppe'; -$lang['delGroup'] = 'SQL-sætning til at fjerne en gruppe'; -$lang['delUser'] = 'SQL-sætning til at slette en bruger'; -$lang['delUserRefs'] = 'SQL-sætning til at fjerne en bruger fra alle grupper'; -$lang['updateUser'] = 'SQL-sætning til at opdatere en brugerprofil'; -$lang['debug_o_0'] = 'ingen'; -$lang['debug_o_1'] = 'kun ved fejl'; -$lang['debug_o_2'] = 'alle SQL forespørgsler'; diff --git a/lib/plugins/authmysql/lang/de-informal/lang.php b/lib/plugins/authmysql/lang/de-informal/lang.php deleted file mode 100644 index 11b130f90..000000000 --- a/lib/plugins/authmysql/lang/de-informal/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author rnck <dokuwiki@rnck.de> - */ -$lang['connectfail'] = 'Konnte nicht zur Datenbank verbinden.'; -$lang['userexists'] = 'Entschuldigung, es existiert bereits ein Nutzer mit diesem Login.'; -$lang['usernotexists'] = 'Entschuldigung, dieser Nutzer existiert nicht.'; -$lang['writefail'] = 'Konnte Nutzer-Daten nicht modifizieren. Bitte informiere einen Admin.'; diff --git a/lib/plugins/authmysql/lang/de-informal/settings.php b/lib/plugins/authmysql/lang/de-informal/settings.php deleted file mode 100644 index f6033d38b..000000000 --- a/lib/plugins/authmysql/lang/de-informal/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Matthias Schulte <dokuwiki@lupo49.de> - * @author Volker Bödker <volker@boedker.de> - */ -$lang['server'] = 'MySQL-Server'; -$lang['user'] = 'Benutzername für den Zugriff auf den MySQL-Server.'; -$lang['password'] = 'Passwort des angegebenen Benutzers.'; -$lang['database'] = 'Zu verwendende Datenbank.'; -$lang['charset'] = 'Verwendetes Character-Set in der Datenbank.'; -$lang['debug'] = 'Debug-Informationen anzeigen?'; -$lang['forwardClearPass'] = 'Passwort der DokuWiki-Benutzer im Klartext an die Datenbank übergeben? (Im Normalfall wird die passcrypt-Option angewendet.)'; -$lang['TablesToLock'] = 'Eine Komma-separierte Liste von Tabellen, die vor Schreiboperationen gesperrt werden müssen.'; -$lang['checkPass'] = 'SQL-Kommando zum Überprüfen von Passwörtern.'; -$lang['getUserInfo'] = 'SQL-Kommando um Benutzerinformationen auszulesen.'; -$lang['getGroups'] = 'SQL-Kommando um Gruppen eines Benutzers auszulesen.'; -$lang['getUsers'] = 'SQL-Kommando um alle Benutzer auszulesen.'; -$lang['FilterLogin'] = 'SQL-Bedingung um Benutzer anhand ihres Anmeldenamens zu filtern.'; -$lang['FilterName'] = 'SQL-Bedingung um Benutzer anhand ihres Namens zu filtern.'; -$lang['FilterEmail'] = 'SQL-Bedingung um Benutzer anhand ihrer E-Mail-Adresse zu filtern.'; -$lang['FilterGroup'] = 'SQL-Bedingung um Benutzer anhand ihrer Gruppenzugehörigkeit zu filtern.'; -$lang['SortOrder'] = 'SQL-Bedingung um anhand der die Benutzerliste sortiert wird.'; -$lang['addUser'] = 'SQL-Kommando um einen neuen Benutzer anzulegen.'; -$lang['addGroup'] = 'SQL-Kommando um eine neue Gruppe anzulegen.'; -$lang['addUserGroup'] = 'SQL-Kommando um einen Benutzer zu einer Gruppe hinzuzufügen.'; -$lang['delGroup'] = 'SQL-Kommando um eine Gruppe zu löschen.'; -$lang['getUserID'] = 'SQL-Kommando um den Primärschlüssel des Benutzers auszulesen.'; -$lang['delUser'] = 'SQL-Kommando um einen Benutzer zu löschen.'; -$lang['delUserRefs'] = 'SQL-Kommando um einen Benutzer aus allen Gruppen zu entfernen.'; -$lang['updateUser'] = 'SQL-Kommando um das Profil eines Benutzers zu aktualisieren.'; -$lang['UpdateLogin'] = 'SQL-Bedingung um den Anmeldenamen eines Benutzers zu ändern.'; -$lang['UpdatePass'] = 'SQL-Bedingung um das Passwort eines Benutzers zu ändern.'; -$lang['UpdateEmail'] = 'SQL-Bedingung um die E-Mail-Adresse eines Benutzers zu ändern.'; -$lang['UpdateName'] = 'SQL-Bedingung um den Namen eines Benutzers zu ändern.'; -$lang['UpdateTarget'] = 'SQL-Bedingung zur eindeutigen Identifikation des Benutzers.'; -$lang['delUserGroup'] = 'SQL-Kommando um einen Benutzer aus einer angegeben Gruppe zu entfernen.'; -$lang['getGroupID'] = 'SQL-Kommando um den Primärschlüssel einer Gruppe auszulesen.'; -$lang['debug_o_0'] = 'Keine.'; -$lang['debug_o_1'] = 'Nur Fehler.'; -$lang['debug_o_2'] = 'Alle SQL-Abfragen.'; diff --git a/lib/plugins/authmysql/lang/de/lang.php b/lib/plugins/authmysql/lang/de/lang.php deleted file mode 100644 index b5528230a..000000000 --- a/lib/plugins/authmysql/lang/de/lang.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Noel Tilliot <noeltilliot@byom.de> - * @author Hendrik Diel <diel.hendrik@gmail.com> - * @author Philip Knack <p.knack@stollfuss.de> - */ -$lang['connectfail'] = 'Verbindung zur Datenbank fehlgeschlagen.'; -$lang['userexists'] = 'Entschuldigung, aber dieser Benutzername ist bereits vergeben.'; -$lang['usernotexists'] = 'Sorry, dieser Nutzer existiert nicht.'; -$lang['writefail'] = 'Die Benutzerdaten konnten nicht geändert werden. Bitte wenden Sie sich an den Wiki-Admin.'; diff --git a/lib/plugins/authmysql/lang/de/settings.php b/lib/plugins/authmysql/lang/de/settings.php deleted file mode 100644 index 5b603e2c8..000000000 --- a/lib/plugins/authmysql/lang/de/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Matthias Schulte <dokuwiki@lupo49.de> - * @author Hella Breitkopf <hella.breitkopf@gmail.com> - */ -$lang['server'] = 'MySQL-Server'; -$lang['user'] = 'Benutzername für den Zugriff auf den MySQL-Server.'; -$lang['password'] = 'Passwort des angegebenen Benutzers.'; -$lang['database'] = 'Zu verwendende Datenbank'; -$lang['charset'] = 'Zeichensatz der Datenbank'; -$lang['debug'] = 'Debug-Informationen anzeigen?'; -$lang['forwardClearPass'] = 'Passwort der DokuWiki-Benutzer im Klartext an die Datenbank übergeben? (Im Normalfall wird die passcrypt-Option angewendet.)'; -$lang['TablesToLock'] = 'Eine Komma-separierte Liste von Tabellen, die vor Schreiboperationen gesperrt werden müssen.'; -$lang['checkPass'] = 'SQL-Kommando zum Überprüfen von Passwörtern.'; -$lang['getUserInfo'] = 'SQL-Kommando um Benutzerinformationen auszulesen.'; -$lang['getGroups'] = 'SQL-Kommando um Gruppen eines Benutzers auszulesen.'; -$lang['getUsers'] = 'SQL-Kommando um alle Benutzer auszulesen.'; -$lang['FilterLogin'] = 'SQL-Bedingung um Benutzer anhand ihres Anmeldenamens zu filtern.'; -$lang['FilterName'] = 'SQL-Bedingung um Benutzer anhand ihres Namens zu filtern.'; -$lang['FilterEmail'] = 'SQL-Bedingung um Benutzer anhand ihrer E-Mail-Adresse zu filtern.'; -$lang['FilterGroup'] = 'SQL-Bedingung um Benutzer anhand ihrer Gruppenzugehörigkeit zu filtern.'; -$lang['SortOrder'] = 'SQL-Bedingung um anhand der die Benutzerliste sortiert wird.'; -$lang['addUser'] = 'SQL-Kommando um einen neuen Benutzer anzulegen.'; -$lang['addGroup'] = 'SQL-Kommando um eine neue Gruppe anzulegen.'; -$lang['addUserGroup'] = 'SQL-Kommando um einen Benutzer zu einer Gruppe hinzuzufügen.'; -$lang['delGroup'] = 'SQL-Kommando um eine Gruppe zu löschen.'; -$lang['getUserID'] = 'SQL-Kommando um den Primärschlüssel des Benutzers auszulesen.'; -$lang['delUser'] = 'SQL-Kommando um einen Benutzer zu löschen.'; -$lang['delUserRefs'] = 'SQL-Kommando um einen Benutzer aus allen Gruppen zu entfernen.'; -$lang['updateUser'] = 'SQL-Kommando um das Profil eines Benutzers zu aktualisieren.'; -$lang['UpdateLogin'] = 'SQL-Bedingung um den Anmeldenamen eines Benutzers zu ändern.'; -$lang['UpdatePass'] = 'SQL-Bedingung um das Passwort eines Benutzers zu ändern.'; -$lang['UpdateEmail'] = 'SQL-Bedingung um die E-Mail-Adresse eines Benutzers zu ändern.'; -$lang['UpdateName'] = 'SQL-Bedingung um den Namen eines Benutzers zu ändern.'; -$lang['UpdateTarget'] = 'SQL-Bedingung zur eindeutigen Identifikation des Benutzers.'; -$lang['delUserGroup'] = 'SQL-Kommando um einen Benutzer aus einer angegeben Gruppe zu entfernen.'; -$lang['getGroupID'] = 'SQL-Kommando um den Primärschlüssel einer Gruppe auszulesen.'; -$lang['debug_o_0'] = 'Keine.'; -$lang['debug_o_1'] = 'Nur Fehler.'; -$lang['debug_o_2'] = 'Alle SQL-Abfragen.'; diff --git a/lib/plugins/authmysql/lang/en/lang.php b/lib/plugins/authmysql/lang/en/lang.php deleted file mode 100644 index 8313616c6..000000000 --- a/lib/plugins/authmysql/lang/en/lang.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * English language file for authmysql plugin - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - */ - -$lang['connectfail'] = 'Failed to connect to database.'; -$lang['userexists'] = 'Sorry, a user with this login already exists.'; -$lang['usernotexists'] = 'Sorry, that user doesn\'t exist.'; -$lang['writefail'] = 'Unable to modify user data. Please inform the Wiki-Admin'; - -//Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/authmysql/lang/en/settings.php b/lib/plugins/authmysql/lang/en/settings.php deleted file mode 100644 index b95f39701..000000000 --- a/lib/plugins/authmysql/lang/en/settings.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -$lang['server'] = 'Your MySQL server'; -$lang['user'] = 'MySQL user name'; -$lang['password'] = 'Password for above user'; -$lang['database'] = 'Database to use'; -$lang['charset'] = 'Character set used in database'; -$lang['debug'] = 'Display additional debug information'; -$lang['forwardClearPass'] = 'Pass user passwords as cleartext to the SQL statements below, instead of using the passcrypt option'; -$lang['TablesToLock'] = 'Comma separated list of tables that should be locked on write operations'; -$lang['checkPass'] = 'SQL statement for checking passwords'; -$lang['getUserInfo'] = 'SQL statement for retrieving user information'; -$lang['getGroups'] = 'SQL statement for retrieving a user\'s group memberships'; -$lang['getUsers'] = 'SQL statement to list all users'; -$lang['FilterLogin'] = 'SQL clause for filtering users by login name'; -$lang['FilterName'] = 'SQL clause for filtering users by full name'; -$lang['FilterEmail'] = 'SQL clause for filtering users by email address'; -$lang['FilterGroup'] = 'SQL clause for filtering users by group membership'; -$lang['SortOrder'] = 'SQL clause to sort users'; -$lang['addUser'] = 'SQL statement to add a new user'; -$lang['addGroup'] = 'SQL statement to add a new group'; -$lang['addUserGroup'] = 'SQL statement to add a user to an existing group'; -$lang['delGroup'] = 'SQL statement to remove a group'; -$lang['getUserID'] = 'SQL statement to get the primary key of a user'; -$lang['delUser'] = 'SQL statement to delete a user'; -$lang['delUserRefs'] = 'SQL statement to remove a user from all groups'; -$lang['updateUser'] = 'SQL statement to update a user profile'; -$lang['UpdateLogin'] = 'Update clause for updating the user\'s login name'; -$lang['UpdatePass'] = 'Update clause for updating the user\'s password'; -$lang['UpdateEmail'] = 'Update clause for updating the user\'s email address'; -$lang['UpdateName'] = 'Update clause for updating the user\'s full name'; -$lang['UpdateTarget'] = 'Limit clause to identify the user when updating'; -$lang['delUserGroup'] = 'SQL statement to remove a user from a given group'; -$lang['getGroupID'] = 'SQL statement to get the primary key of a given group'; - - -$lang['debug_o_0'] = 'none'; -$lang['debug_o_1'] = 'on errors only'; -$lang['debug_o_2'] = 'all SQL queries'; diff --git a/lib/plugins/authmysql/lang/eo/lang.php b/lib/plugins/authmysql/lang/eo/lang.php deleted file mode 100644 index 818c392b2..000000000 --- a/lib/plugins/authmysql/lang/eo/lang.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Kristjan SCHMIDT <kristjan.schmidt@googlemail.com> - */ -$lang['usernotexists'] = 'Pardonu, tiu uzanto ne ekzistas.'; diff --git a/lib/plugins/authmysql/lang/eo/settings.php b/lib/plugins/authmysql/lang/eo/settings.php deleted file mode 100644 index b85f81248..000000000 --- a/lib/plugins/authmysql/lang/eo/settings.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - */ -$lang['server'] = 'Via MySQL-servilo'; -$lang['user'] = 'MySQL uzantonomo'; -$lang['password'] = 'Pasvorto por tiu uzanto'; -$lang['database'] = 'Uzenda datumbazo'; -$lang['charset'] = 'Uzata tiparo en la datumbazo'; -$lang['debug'] = 'Ĉu montri aldonajn erarinformojn?'; -$lang['forwardClearPass'] = 'Ĉu transdoni pasvortojn klartekste al la SQL-frazoj sube anstataŭ uzi pasvortan kaŝon'; -$lang['TablesToLock'] = 'Komodisigita listo de tabeloj, al kiuj ne eblu skribi'; -$lang['checkPass'] = 'SQL-frazo por testi pasvortojn'; -$lang['getUserInfo'] = 'SQL-frazo por ricevi uzantajn informojn'; -$lang['getGroups'] = 'SQL-frazo por ricevi la grupmembrecojn de uzanto'; -$lang['getUsers'] = 'SQL-frazo por listigi ĉiujn uzantojn'; -$lang['FilterLogin'] = 'SQL-frazo por filtri uzantojn je ensaluta nomo'; -$lang['FilterName'] = 'SQL-frazo por filtri uzantojn je plena nomo'; -$lang['FilterEmail'] = 'SQL-frazo por filtri uzantojn je retpoŝtadreso'; -$lang['FilterGroup'] = 'SQL-frazo por filtri uzantojn je grupmembreco'; -$lang['SortOrder'] = 'SQL-frazo por ordigi uzantojn'; -$lang['addUser'] = 'SQL-frazo por aldoni novan uzanton'; -$lang['addGroup'] = 'SQL-frazo por aldoni novan grupon'; -$lang['addUserGroup'] = 'SQL-frazo por aldoni uzanton al ekzistanta grupo'; -$lang['delGroup'] = 'SQL-frazo por forigi grupon'; -$lang['getUserID'] = 'SQL-frazo por ricevi la ĉefan ŝlosilon de uzanto'; -$lang['delUser'] = 'SQL-frazo por forigi uzanton'; -$lang['delUserRefs'] = 'SQL-frazo por forigi uzanton el ĉiuj grupoj'; -$lang['updateUser'] = 'SQL-frazo por aktualigi uzantan profilon'; -$lang['UpdateLogin'] = 'Aktualiga frazo por uzanta ensalutnomo'; -$lang['UpdatePass'] = 'Aktualiga frazo por uzanta pasvorto'; -$lang['UpdateEmail'] = 'Aktualiga frazo por uzanta retpoŝtadreso'; -$lang['UpdateName'] = 'Aktualiga frazo por plena uzanta nomo'; -$lang['UpdateTarget'] = 'Limiga frazo por identigi la uzanton dum aktualigado'; -$lang['delUserGroup'] = 'SQL-frazo por forigi uzanton el indikita grupo'; -$lang['getGroupID'] = 'SQL-frazo por ricevi la ĉefan ŝlosilon de indikita grupo'; -$lang['debug_o_0'] = 'neniu'; -$lang['debug_o_1'] = 'nur dum eraroj'; -$lang['debug_o_2'] = 'ĉiuj SQL-serĉoj'; diff --git a/lib/plugins/authmysql/lang/es/lang.php b/lib/plugins/authmysql/lang/es/lang.php deleted file mode 100644 index 3fc8228af..000000000 --- a/lib/plugins/authmysql/lang/es/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Domingo Redal <docxml@gmail.com> - */ -$lang['connectfail'] = 'Error al conectar con la base de datos.'; -$lang['userexists'] = 'Lo sentimos, ya existe un usuario con ese inicio de sesión.'; -$lang['usernotexists'] = 'Lo sentimos, no existe ese usuario.'; -$lang['writefail'] = 'No es posible modificar los datos del usuario. Por favor, informa al Administrador del Wiki'; diff --git a/lib/plugins/authmysql/lang/es/settings.php b/lib/plugins/authmysql/lang/es/settings.php deleted file mode 100644 index baa991d1b..000000000 --- a/lib/plugins/authmysql/lang/es/settings.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Antonio Bueno <atnbueno@gmail.com> - * @author Eloy <ej.perezgomez@gmail.com> - * @author Antonio Castilla <antoniocastilla@trazoide.com> - * @author Alejandro Nunez <nunez.alejandro@gmail.com> - * @author Domingo Redal <docxml@gmail.com> - */ -$lang['server'] = 'Tu servidor MySQL'; -$lang['user'] = 'Nombre de usuario MySQL'; -$lang['password'] = 'Contraseña para el usuario de arriba.'; -$lang['database'] = 'Base de datos a usar'; -$lang['charset'] = 'Codificación usada en la base de datos'; -$lang['debug'] = 'Mostrar información adicional para depuración de errores'; -$lang['forwardClearPass'] = 'Enviar las contraseñas de usuario comotexto plano a las siguientes sentencias de SQL, en lugar de utilizar la opción passcrypt'; -$lang['TablesToLock'] = 'Lista separada por comasde las tablas a bloquear durante operaciones de escritura'; -$lang['checkPass'] = 'Sentencia SQL para verificar las contraseñas'; -$lang['getUserInfo'] = 'Sentencia SQL para obtener información del usuario'; -$lang['getGroups'] = 'Sentencia SQL para obtener la pertenencia a grupos de un usuario'; -$lang['getUsers'] = 'Sentencia SQL para listar todos los usuarios'; -$lang['FilterLogin'] = 'Cláusula SQL para filtrar usuarios por su nombre de usuario'; -$lang['FilterName'] = 'Cláusula SQL para filtrar usuarios por su nombre completo'; -$lang['FilterEmail'] = 'Cláusula SQL para filtrar usuarios por su dirección de correo electrónico'; -$lang['FilterGroup'] = 'Cláusula SQL para filtrar usuarios por su pertenencia a grupos'; -$lang['SortOrder'] = 'Cláusula SQL para ordenar usuarios'; -$lang['addUser'] = 'Sentencia SQL para agregar un nuevo usuario'; -$lang['addGroup'] = 'Sentencia SQL para agregar un nuevo grupo'; -$lang['addUserGroup'] = 'Sentencia SQL para agregar un usuario a un grupo existente'; -$lang['delGroup'] = 'Sentencia SQL para eliminar un grupo'; -$lang['getUserID'] = 'Sentencia SQL para obtener la clave primaria de un usuario'; -$lang['delUser'] = 'Sentencia SQL para eliminar un usuario'; -$lang['delUserRefs'] = 'Sentencia SQL para eliminar un usuario de todos los grupos'; -$lang['updateUser'] = 'Sentencia SQL para actualizar un perfil de usuario'; -$lang['UpdateLogin'] = 'Cláusula de actualización para actualizar el login del usuario'; -$lang['UpdatePass'] = 'Cláusula de actualización para actualizar la contraseña del usuario'; -$lang['UpdateEmail'] = 'Cláusula de actualización para actualizar la dirección de correo del usuario'; -$lang['UpdateName'] = 'Cláusula de actualización para actualizar el nomblre completo del usuario'; -$lang['UpdateTarget'] = 'Cláusula limite para identificar al usuario cuando se actualiza'; -$lang['delUserGroup'] = 'Sentencia SQL para eliminar un usuario de un grupo dado'; -$lang['getGroupID'] = 'Sentencia SQL para obtener la clave principal de un grupo dado'; -$lang['debug_o_0'] = 'ninguno'; -$lang['debug_o_1'] = 'sólo errores'; -$lang['debug_o_2'] = 'todas las consultas SQL'; diff --git a/lib/plugins/authmysql/lang/eu/lang.php b/lib/plugins/authmysql/lang/eu/lang.php deleted file mode 100644 index 64083246f..000000000 --- a/lib/plugins/authmysql/lang/eu/lang.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Osoitz <oelkoro@gmail.com> - */ -$lang['connectfail'] = 'Datu-basera konektatzeak huts egin du'; -$lang['userexists'] = 'Badago izen hori duen erabiltzaile bat.'; -$lang['usernotexists'] = 'Ez dago izen hori duen erabiltzailerik.'; diff --git a/lib/plugins/authmysql/lang/eu/settings.php b/lib/plugins/authmysql/lang/eu/settings.php deleted file mode 100644 index 2a44a59ee..000000000 --- a/lib/plugins/authmysql/lang/eu/settings.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Osoitz <oelkoro@gmail.com> - */ -$lang['server'] = 'Zure MYSQL zerbitzaria'; -$lang['user'] = 'MYSQL erabiltzaile-izena'; -$lang['password'] = 'Goiko erabiltzailearen pasahitza'; -$lang['database'] = 'Erabili beharreko datu-basea'; -$lang['charset'] = 'Datu-basean erabilitako karaktere kodeketa'; -$lang['forwardClearPass'] = 'Pasatu erabiltzaileen pasahitza testu argian beheko SQL esaldiei, passcrypt aukera erabili ordez'; -$lang['debug_o_0'] = 'bat ere ez'; diff --git a/lib/plugins/authmysql/lang/fa/lang.php b/lib/plugins/authmysql/lang/fa/lang.php deleted file mode 100644 index b5b878628..000000000 --- a/lib/plugins/authmysql/lang/fa/lang.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Mohmmad Razavi <sepent@gmail.com> - * @author Masoud Sadrnezhaad <masoud@sadrnezhaad.ir> - */ -$lang['connectfail'] = 'خطا در اتصال به دیتابیس'; -$lang['userexists'] = 'با عرض پوزش، یک کاربر با این نام از قبل وجود دارد.'; -$lang['usernotexists'] = 'با عرض پوزش، آن کاربر وجود نداشت.'; -$lang['writefail'] = 'امکان تغییر داده کاربر وجود نداشت. لطفا مسئول Wiki را آگاه کنید.'; diff --git a/lib/plugins/authmysql/lang/fa/settings.php b/lib/plugins/authmysql/lang/fa/settings.php deleted file mode 100644 index 4c708a05f..000000000 --- a/lib/plugins/authmysql/lang/fa/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com> - * @author Mohmmad Razavi <sepent@gmail.com> - */ -$lang['server'] = 'سرور MySQL'; -$lang['user'] = 'نام کاربری MySQL'; -$lang['password'] = 'رمزعبور کاربر بالا'; -$lang['database'] = 'پایگاه داده مورد استفاده'; -$lang['charset'] = 'مجموعه کاراکترهایی (Character set) که در پایگاه داده بکار رفته'; -$lang['debug'] = 'نمایش اطلاعات بیشتر برای دیباگ'; -$lang['forwardClearPass'] = 'بجای استفاده از گزینه passcrypt، رمزعبورهای کاربر را بصورت آشکار به دستور SQL زیر پاس دهید.'; -$lang['TablesToLock'] = 'لیست جدولهایی که هنگام عملیات نوشتن باید قفل شود که با کاما از هم جدا شده اند'; -$lang['checkPass'] = 'دستور SQL برای بررسی رمزعبورها'; -$lang['getUserInfo'] = 'دستور SQL برای دریافت اطلاعات نام کاربری'; -$lang['getGroups'] = 'دستور SQL برای دریافت گروههای عضویت یک کاربر'; -$lang['getUsers'] = 'دستور SQL برای گرفتن لیست تمامی کاربران'; -$lang['FilterLogin'] = 'عبارت SQL برای فیلتر کردن کاربران با نام کاربری (login name)'; -$lang['FilterName'] = 'عبارت SQL برای فیلتر کردن کاربران با نام کامل'; -$lang['FilterEmail'] = 'عبارت SQL برای فیلتر کردن کابران با آدرس ایمیل'; -$lang['FilterGroup'] = 'عبارت SQL برای فیلتر کاربران با گروه عضویتشان'; -$lang['SortOrder'] = 'عبارت SQL برای مرتب کردن کاربران'; -$lang['addUser'] = 'دستور SQL برای اضافه کردن کاربر جدید'; -$lang['addGroup'] = 'دستور SQL برای اضافه کردن گروه جدید'; -$lang['addUserGroup'] = 'دستور SQL برای اضافه کردن یک کاربر به یک گروه موجود از قبل'; -$lang['delGroup'] = 'دستور SQL برای حذف یک گروه'; -$lang['getUserID'] = 'دستور SQL برای گرفتن کلید اصلی (primary key) یک کاربر'; -$lang['delUser'] = 'دستور SQL برای حذف یک کاربر'; -$lang['delUserRefs'] = 'دستور SQL برای حذف یک کابر از تمامی گروهها'; -$lang['updateUser'] = 'دستور SQL برای بروزرسانی پروفایل یک کاربر'; -$lang['UpdateLogin'] = 'عبارت Update برای بروزرسانی نام کاربری (login name)'; -$lang['UpdatePass'] = 'عبارت Update برای بروزرسانی رمزعبور کاربر'; -$lang['UpdateEmail'] = 'عبارت Update برای بروزرسانی ادرسی ایمیل کاربر'; -$lang['UpdateName'] = 'عبارت Update برای بروزرسانی نام کامل کاربر'; -$lang['UpdateTarget'] = 'عبارت Limit برای شناسایی کابر هنگام بروزرسانی'; -$lang['delUserGroup'] = 'دستور SQL برای حذف یک کاربر '; -$lang['getGroupID'] = 'دستور SQL برای گرفتن کلید اصلی (primary key) گروه داده شده'; -$lang['debug_o_0'] = 'هیچ'; -$lang['debug_o_1'] = 'فقط هنگام خطا'; -$lang['debug_o_2'] = 'تمام پرسوجوهای SQL'; diff --git a/lib/plugins/authmysql/lang/fi/settings.php b/lib/plugins/authmysql/lang/fi/settings.php deleted file mode 100644 index 32517957b..000000000 --- a/lib/plugins/authmysql/lang/fi/settings.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Jussi Takala <jussi.takala@live.fi> - */ -$lang['server'] = 'Sinun MySQL-serveri'; -$lang['user'] = 'MySQL-käyttäjänimi'; -$lang['password'] = 'Salasana yläolevalle käyttäjälle'; -$lang['charset'] = 'Käytetty merkistö tietokannassa'; diff --git a/lib/plugins/authmysql/lang/fr/lang.php b/lib/plugins/authmysql/lang/fr/lang.php deleted file mode 100644 index 5e9fb6987..000000000 --- a/lib/plugins/authmysql/lang/fr/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Pietroni <pietroni@informatique.univ-paris-diderot.fr> - */ -$lang['connectfail'] = 'Impossible de se connecter à la base de données.'; -$lang['userexists'] = 'Désolé, un utilisateur avec cet identifiant existe déjà.'; -$lang['usernotexists'] = 'Désolé, cet utilisateur n\'existe pas.'; -$lang['writefail'] = 'Impossible de modifier les données utilisateur. Veuillez en informer l\'administrateur du Wiki.'; diff --git a/lib/plugins/authmysql/lang/fr/settings.php b/lib/plugins/authmysql/lang/fr/settings.php deleted file mode 100644 index a88b3256c..000000000 --- a/lib/plugins/authmysql/lang/fr/settings.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Bruno Veilleux <bruno.vey@gmail.com> - */ -$lang['server'] = 'Votre serveur MySQL'; -$lang['user'] = 'Nom d\'utilisateur MySQL'; -$lang['password'] = 'Mot de passe pour l\'utilisateur ci-dessus'; -$lang['database'] = 'Base de données à utiliser'; -$lang['charset'] = 'Jeu de caractères utilisé dans la base de données'; -$lang['debug'] = 'Afficher des informations de débogage supplémentaires'; -$lang['forwardClearPass'] = 'Passer les mots de passe aux requêtes SQL ci-dessous en cleartext plutôt qu\'avec l\'option passcrypt'; -$lang['TablesToLock'] = 'Liste séparée par des virgules des tables devant être verrouillées par les opérations d\'écriture'; -$lang['checkPass'] = 'Requête SQL pour la vérification des mots de passe'; -$lang['getUserInfo'] = 'Requête SQL pour la récupération des informations d\'un utilisateur'; -$lang['getGroups'] = 'Requête SQL pour la récupération des groupes d\'un utilisateur'; -$lang['getUsers'] = 'Requête SQL pour énumérer tous les utilisateurs'; -$lang['FilterLogin'] = 'Clause SQL pour filtrer les utilisateurs par identifiant'; -$lang['FilterName'] = 'Clause SQL pour filtrer les utilisateurs par nom complet'; -$lang['FilterEmail'] = 'Clause SQL pour filtrer les utilisateurs par adresse électronique'; -$lang['FilterGroup'] = 'Clause SQL pour filtrer les utilisateurs par groupes'; -$lang['SortOrder'] = 'Clause SQL pour trier les utilisateurs'; -$lang['addUser'] = 'Requête SQL pour ajouter un nouvel utilisateur'; -$lang['addGroup'] = 'Requête SQL pour ajouter un nouveau groupe'; -$lang['addUserGroup'] = 'Requête SQL pour ajouter un utilisateur à un groupe existant'; -$lang['delGroup'] = 'Requête SQL pour retirer un groupe'; -$lang['getUserID'] = 'Requête SQL pour obtenir la clé primaire d\'un utilisateur'; -$lang['delUser'] = 'Requête SQL pour supprimer un utilisateur'; -$lang['delUserRefs'] = 'Requête SQL pour retirer un utilisateur de tous les groupes'; -$lang['updateUser'] = 'Requête SQL pour mettre à jour le profil d\'un utilisateur'; -$lang['UpdateLogin'] = 'Clause de mise à jour pour mettre à jour l\'identifiant d\'un utilisateur'; -$lang['UpdatePass'] = 'Clause de mise à jour pour mettre à jour le mot de passe d\'un utilisateur'; -$lang['UpdateEmail'] = 'Clause de mise à jour pour mettre à jour l\'adresse électronique d\'un utilisateur'; -$lang['UpdateName'] = 'Clause de mise à jour pour mettre à jour le nom complet d\'un utilisateur'; -$lang['UpdateTarget'] = 'Clause de limite pour identifier l\'utilisateur durant une mise à jour'; -$lang['delUserGroup'] = 'Requête SQL pour retirer un utilisateur d\'un groupe donné'; -$lang['getGroupID'] = 'Requête SQL pour obtenir la clé primaire d\'un groupe donné'; -$lang['debug_o_0'] = 'aucun'; -$lang['debug_o_1'] = 'sur erreur seulement'; -$lang['debug_o_2'] = 'toutes les requêtes SQL'; diff --git a/lib/plugins/authmysql/lang/he/settings.php b/lib/plugins/authmysql/lang/he/settings.php deleted file mode 100644 index 22c30e52a..000000000 --- a/lib/plugins/authmysql/lang/he/settings.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Menashe Tomer <menashesite@gmail.com> - */ -$lang['getUserID'] = 'שאילתת SQL לקבלת מפתח ראשי של המשתמש'; -$lang['UpdateLogin'] = 'שאילתת SQL לעדכון שם המשתמש'; -$lang['UpdatePass'] = 'שאילתת SQL לעדכון סיסמת המשתמש'; -$lang['UpdateEmail'] = 'שאילתת SQL לעדכון כתובת הדוא"ל של המשתמש'; -$lang['UpdateName'] = 'שאילתת SQL לעדכון שם המשתמש'; diff --git a/lib/plugins/authmysql/lang/hr/lang.php b/lib/plugins/authmysql/lang/hr/lang.php deleted file mode 100644 index e839d6725..000000000 --- a/lib/plugins/authmysql/lang/hr/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Davor Turkalj <turki.bsc@gmail.com> - */ -$lang['connectfail'] = 'Ne mogu se spojiti na bazu.'; -$lang['userexists'] = 'Oprostite ali korisnik s ovom prijavom već postoji.'; -$lang['usernotexists'] = 'Oprostite ali ovaj korisnik ne postoji.'; -$lang['writefail'] = 'Ne mogu izmijeniti podatke. Molim obavijestite Wiki administratora'; diff --git a/lib/plugins/authmysql/lang/hr/settings.php b/lib/plugins/authmysql/lang/hr/settings.php deleted file mode 100644 index 370b645e8..000000000 --- a/lib/plugins/authmysql/lang/hr/settings.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Davor Turkalj <turki.bsc@gmail.com> - */ -$lang['server'] = 'Vaš MySQL server'; -$lang['user'] = 'MySQL korisničko ime'; -$lang['password'] = 'Lozinka gore navedenog korisnika'; -$lang['database'] = 'Baza koja se koristi'; -$lang['charset'] = 'Znakovni set koji se koristi u bazi'; -$lang['debug'] = 'Prikaz dodatnih debug informacija'; -$lang['forwardClearPass'] = 'Proslijedi korisničku lozinku kao čisti tekst u SQL upitu niže, umjesto korištenja passcrypt opcije'; -$lang['TablesToLock'] = 'Zarezom odvojena lista tabela koje trebaju biti zaključane pri operacijama pisanja'; -$lang['checkPass'] = 'SQL izraz za provjeru lozinki'; -$lang['getUserInfo'] = 'SQL izraz za dohvaćanje informacija o korisniku'; -$lang['getGroups'] = 'SQL izraz za dohvaćanje članstva u grupama'; -$lang['getUsers'] = 'SQL izraz za ispis svih korisnika'; -$lang['FilterLogin'] = 'SQL izraz za izdvajanje korisnika po korisničkom imenu'; -$lang['FilterName'] = 'SQL izraz za izdvajanje korisnika po punom imenu'; -$lang['FilterEmail'] = 'SQL izraz za izdvajanje korisnika po adresi e-pošte'; -$lang['FilterGroup'] = 'SQL izraz za izdvajanje korisnika po članstvu u grupama'; -$lang['SortOrder'] = 'SQL izraz za sortiranje korisnika'; -$lang['addUser'] = 'SQL izraz za dodavanje novih korisnika'; -$lang['addGroup'] = 'SQL izraz za dodavanje novih grupa'; -$lang['addUserGroup'] = 'SQL izraz za dodavanje korisnika u postojeću grupu'; -$lang['delGroup'] = 'SQL izraz za uklanjanje grupe'; -$lang['getUserID'] = 'SQL izraz za dobivanje primarnog ključa korisnika'; -$lang['delUser'] = 'SQL izraz za brisanje korisnika'; -$lang['delUserRefs'] = 'SQL izraz za uklanjanje korisnika iz grupe'; -$lang['updateUser'] = 'SQL izraz za ažuriranje korisničkog profila'; -$lang['UpdateLogin'] = 'UPDATE izraz za ažuriranje korisničkog imena'; -$lang['UpdatePass'] = 'UPDATE izraz za ažuriranje korisničke lozinke'; -$lang['UpdateEmail'] = 'UPDATE izraz za ažuriranje korisničke email adrese'; -$lang['UpdateName'] = 'UPDATE izraz za ažuriranje punog imena korisnika'; -$lang['UpdateTarget'] = 'Limit izraz za identificiranje korisnika pri ažuriranju'; -$lang['delUserGroup'] = 'SQL izraz za uklanjanje korisnika iz zadane grupe'; -$lang['getGroupID'] = 'SQL izraz za dobivanje primarnoga ključa zadane grupe'; -$lang['debug_o_0'] = 'ništa'; -$lang['debug_o_1'] = 'u slučaju greške'; -$lang['debug_o_2'] = 'svi SQL upiti'; diff --git a/lib/plugins/authmysql/lang/hu/lang.php b/lib/plugins/authmysql/lang/hu/lang.php deleted file mode 100644 index 3f48da335..000000000 --- a/lib/plugins/authmysql/lang/hu/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Marton Sebok <sebokmarton@gmail.com> - */ -$lang['connectfail'] = 'Az adatbázishoz való csatlakozás sikertelen.'; -$lang['userexists'] = 'Sajnos már létezik ilyen azonosítójú felhasználó.'; -$lang['usernotexists'] = 'Sajnos ez a felhasználó nem létezik.'; -$lang['writefail'] = 'A felhasználói adatok módosítása sikertelen. Kérlek, fordulj a wiki rendszergazdájához!'; diff --git a/lib/plugins/authmysql/lang/hu/settings.php b/lib/plugins/authmysql/lang/hu/settings.php deleted file mode 100644 index cf7b26bb9..000000000 --- a/lib/plugins/authmysql/lang/hu/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Marton Sebok <sebokmarton@gmail.com> - * @author Marina Vladi <deldadam@gmail.com> - */ -$lang['server'] = 'MySQL-kiszolgáló'; -$lang['user'] = 'MySQL-felhasználónév'; -$lang['password'] = 'Fenti felhasználó jelszava'; -$lang['database'] = 'Adatbázis'; -$lang['charset'] = 'Az adatbázisban használt karakterkészlet'; -$lang['debug'] = 'Hibakeresési üzenetek megjelenítése'; -$lang['forwardClearPass'] = 'A jelszó nyílt szövegként történő átadása az alábbi SQL-utasításoknak a passcrypt opció használata helyett'; -$lang['TablesToLock'] = 'Az íráskor zárolni kívánt táblák vesszővel elválasztott listája'; -$lang['checkPass'] = 'SQL-utasítás a jelszavak ellenőrzéséhez'; -$lang['getUserInfo'] = 'SQL-utasítás a felhasználói információk lekérdezéséhez'; -$lang['getGroups'] = 'SQL-utasítás egy felhasználó csoporttagságainak lekérdezéséhez'; -$lang['getUsers'] = 'SQL-utasítás a felhasználók listázásához'; -$lang['FilterLogin'] = 'SQL-kifejezés a felhasználók azonosító alapú szűréséhez'; -$lang['FilterName'] = 'SQL-kifejezés a felhasználók név alapú szűréséhez'; -$lang['FilterEmail'] = 'SQL-kifejezés a felhasználók e-mail cím alapú szűréséhez'; -$lang['FilterGroup'] = 'SQL-kifejezés a felhasználók csoporttagság alapú szűréséhez'; -$lang['SortOrder'] = 'SQL-kifejezés a felhasználók rendezéséhez'; -$lang['addUser'] = 'SQL-utasítás új felhasználó hozzáadásához'; -$lang['addGroup'] = 'SQL-utasítás új csoport hozzáadásához'; -$lang['addUserGroup'] = 'SQL-utasítás egy felhasználó egy meglévő csoporthoz való hozzáadásához'; -$lang['delGroup'] = 'SQL-utasítás egy csoport törléséhez'; -$lang['getUserID'] = 'SQL-utasítás egy felhasználó elsődleges kulcsának lekérdezéséhez'; -$lang['delUser'] = 'SQL-utasítás egy felhasználó törléséhez'; -$lang['delUserRefs'] = 'SQL-utasítás egy felhasználó eltávolításához az összes csoportból'; -$lang['updateUser'] = 'SQL-utasítás egy felhasználó profiljának frissítéséhez'; -$lang['UpdateLogin'] = 'UPDATE-klauzula a felhasználó azonosítójának frissítéséhez'; -$lang['UpdatePass'] = 'UPDATE-klauzula a felhasználó jelszavának frissítéséhez'; -$lang['UpdateEmail'] = 'UPDATE-klauzula a felhasználó e-mail címének frissítéséhez'; -$lang['UpdateName'] = 'UPDATE-klauzula a felhasználó teljes nevének frissítéséhez'; -$lang['UpdateTarget'] = 'LIMIT-klauzula a felhasználó kiválasztásához az adatok frissítésekor'; -$lang['delUserGroup'] = 'SQL-utasítás felhasználó adott csoportból történő törléséhez '; -$lang['getGroupID'] = 'SQL-utasítás adott csoport elsődleges kulcsának lekérdezéséhez'; -$lang['debug_o_0'] = 'nem'; -$lang['debug_o_1'] = 'csak hiba esetén'; -$lang['debug_o_2'] = 'minden SQL-lekérdezésnél'; diff --git a/lib/plugins/authmysql/lang/it/lang.php b/lib/plugins/authmysql/lang/it/lang.php deleted file mode 100644 index 6ba3ef836..000000000 --- a/lib/plugins/authmysql/lang/it/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Torpedo <dgtorpedo@gmail.com> - */ -$lang['connectfail'] = 'Connessione fallita al database.'; -$lang['userexists'] = 'Spiacente, esiste già un utente con queste credenziali.'; -$lang['usernotexists'] = 'Spiacente, quell\'utente non esiste.'; -$lang['writefail'] = 'Non è possibile cambiare le informazioni utente. Si prega di informare l\'Amministratore del wiki'; diff --git a/lib/plugins/authmysql/lang/it/settings.php b/lib/plugins/authmysql/lang/it/settings.php deleted file mode 100644 index ec2d6703e..000000000 --- a/lib/plugins/authmysql/lang/it/settings.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Claudio Lanconelli <lancos@libero.it> - * @author Mirko <malisan.mirko@gmail.com> - * @author Francesco <francesco.cavalli@hotmail.com> - * @author Maurizio <mcannavo@katamail.com> - * @author Torpedo <dgtorpedo@gmail.com> - */ -$lang['server'] = 'Il tuo server MySQL'; -$lang['user'] = 'User name di MySQL'; -$lang['password'] = 'Password per l\'utente di cui sopra'; -$lang['database'] = 'Database da usare'; -$lang['charset'] = 'Set di caratteri usato nel database'; -$lang['debug'] = 'Mostra ulteriori informazioni di debug'; -$lang['forwardClearPass'] = 'Fornisci le password utente come testo visibile alle istruzioni SQL qui sotto, invece che usare l\'opzione passcrypt'; -$lang['TablesToLock'] = 'Lista, separata da virgola, delle tabelle che devono essere bloccate in scrittura'; -$lang['checkPass'] = 'Istruzione SQL per il controllo password'; -$lang['getUserInfo'] = 'Istruzione SQL per recuperare le informazioni utente'; -$lang['getGroups'] = 'Istruzione SQL per recuperare il gruppo di appartenenza di un utente'; -$lang['getUsers'] = 'Istruzione SQL per listare tutti gli utenti'; -$lang['FilterLogin'] = 'Condizione SQL per per filtrare gli utenti in funzione del "login name"'; -$lang['FilterName'] = 'Condizione SQL per filtrare gli utenti in base al nome completo'; -$lang['FilterEmail'] = 'Condizione SQL per filtrare gli utenti in base all\'indirizzo e-mail'; -$lang['FilterGroup'] = 'Condizione SQL per filtrare gli utenti in base al gruppo di appartenenza'; -$lang['SortOrder'] = 'Condizione SQL per ordinare gli utenti'; -$lang['addUser'] = 'Istruzione SQL per aggiungere un nuovo utente'; -$lang['addGroup'] = 'Istruzione SQL per aggiungere un nuovo gruppo'; -$lang['addUserGroup'] = 'Istruzione SQL per aggiungere un utente ad un gruppo esistente'; -$lang['delGroup'] = 'Istruzione SQL per imuovere un gruppo'; -$lang['getUserID'] = 'Istruzione SQL per recuperare la primary key di un utente'; -$lang['delUser'] = 'Istruzione SQL per cancellare un utente'; -$lang['delUserRefs'] = 'Istruzione SQL per rimuovere un utente da tutti i gruppi'; -$lang['updateUser'] = 'Istruzione SQL per aggiornare il profilo utente'; -$lang['UpdateLogin'] = 'Condizione SQL per aggiornare il nome di accesso dell\'utente'; -$lang['UpdatePass'] = 'Condizione SQL per aggiornare la password utente'; -$lang['UpdateEmail'] = 'Condizione SQL per aggiornare l\'e-mail utente'; -$lang['UpdateName'] = 'Condizione SQL per aggiornare il nome completo dell\'utente'; -$lang['UpdateTarget'] = 'Condizione SQL per identificare l\'utente quando aggiornato'; -$lang['delUserGroup'] = 'Istruzione SQL per rimuovere un utente da un dato gruppo'; -$lang['getGroupID'] = 'Istruzione SQL per avere la primary key di un dato gruppo'; -$lang['debug_o_0'] = 'Nulla'; -$lang['debug_o_1'] = 'Solo in errore'; -$lang['debug_o_2'] = 'Tutte le query SQL'; diff --git a/lib/plugins/authmysql/lang/ja/lang.php b/lib/plugins/authmysql/lang/ja/lang.php deleted file mode 100644 index 55c908b81..000000000 --- a/lib/plugins/authmysql/lang/ja/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Hideaki SAWADA <chuno@live.jp> - */ -$lang['connectfail'] = 'データベースへの接続に失敗しました。'; -$lang['userexists'] = 'このログイン名のユーザーが既に存在しています。'; -$lang['usernotexists'] = 'そのユーザーは存在しません。'; -$lang['writefail'] = 'ユーザーデータを変更できません。Wiki の管理者に連絡してください。'; diff --git a/lib/plugins/authmysql/lang/ja/settings.php b/lib/plugins/authmysql/lang/ja/settings.php deleted file mode 100644 index cc0146b15..000000000 --- a/lib/plugins/authmysql/lang/ja/settings.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Satoshi Sahara <sahara.satoshi@gmail.com> - */ -$lang['server'] = 'MySQL のホスト名'; -$lang['user'] = 'MySQL 接続用ユーザー名'; -$lang['password'] = 'MySQL 接続用ユーザーのパスワード'; -$lang['database'] = '使用するデータベース名'; -$lang['charset'] = 'データベースの文字コード'; -$lang['debug'] = 'デバック情報を表示する'; -$lang['forwardClearPass'] = '以下で定義する SQL ステートメントにおいて, パスワード変数 を平文とする(DokiWiki側で暗号化しない)'; -$lang['TablesToLock'] = '書き込み時にロックするテーブル(コンマ区切りで列挙)'; -$lang['checkPass'] = 'パスワードの照合に用いる SQL ステートメント'; -$lang['getUserInfo'] = 'ユーザー情報の取得に用いる SQL ステートメント'; -$lang['getGroups'] = 'ユーザーが所属する全てのグループの取得に用いる SQL ステートメント'; -$lang['getUsers'] = 'ユーザーリストを取得する SQL ステートメント'; -$lang['FilterLogin'] = 'ユーザーリストをログイン名で絞り込む SQL 句'; -$lang['FilterName'] = 'ユーザーリストをフルネームで絞り込む SQL 句'; -$lang['FilterEmail'] = 'ユーザーリストをメールアドレスで絞り込む SQL 句'; -$lang['FilterGroup'] = 'ユーザーリストを所属グループで絞り込む SQL 句'; -$lang['SortOrder'] = 'ユーザーリストのソート方法を指定する SQL 句'; -$lang['addUser'] = '新規ユーザーを追加する SQL ステートメント'; -$lang['addGroup'] = '新規グループを追加する SQL ステートメント'; -$lang['addUserGroup'] = 'ユーザーをグループに配属する SQL ステートメント'; -$lang['delGroup'] = 'グループを削除する SQL ステートメント'; -$lang['getUserID'] = 'ユーザーIDの取得に用いる SQL ステートメント'; -$lang['delUser'] = 'ユーザーを削除する SQL ステートメント'; -$lang['delUserRefs'] = 'ユーザーのグループ所属を全て取り消す SQL ステートメント'; -$lang['updateUser'] = 'ユーザー情報を変更する SQL ステートメント'; -$lang['UpdateLogin'] = '変更後のログイン名を指定する SQL 句'; -$lang['UpdatePass'] = '変更後のパスワードを指定する SQL 句'; -$lang['UpdateEmail'] = '変更後のメールアドレスを指定する SQL 句'; -$lang['UpdateName'] = '変更後のフルネームを指定する SQL 句'; -$lang['UpdateTarget'] = '変更対象のユーザを特定するための SQL 句'; -$lang['delUserGroup'] = 'ユーザーをグループから除名する SQL ステートメント'; -$lang['getGroupID'] = 'グループIDの取得に用いる SQL ステートメント'; -$lang['debug_o_0'] = '表示しない'; -$lang['debug_o_1'] = 'エラー発生時のみ表示'; -$lang['debug_o_2'] = '全ての SQLクエリで表示'; diff --git a/lib/plugins/authmysql/lang/ko/lang.php b/lib/plugins/authmysql/lang/ko/lang.php deleted file mode 100644 index 5e96a4403..000000000 --- a/lib/plugins/authmysql/lang/ko/lang.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author hyeonsoft <hyeonsoft@live.co.kr> - * @author Myeongjin <aranet100@gmail.com> - */ -$lang['connectfail'] = '데이터베이스에 연결하는 데 실패했습니다.'; -$lang['userexists'] = '죄송하지만 이 계정으로 이미 로그인한 사용자가 있습니다.'; -$lang['usernotexists'] = '죄송하지만 해당 사용자가 존재하지 않습니다.'; -$lang['writefail'] = '사용자 데이터를 수정할 수 없습니다. 위키 관리자에게 문의하시기 바랍니다'; diff --git a/lib/plugins/authmysql/lang/ko/settings.php b/lib/plugins/authmysql/lang/ko/settings.php deleted file mode 100644 index ee7c1efde..000000000 --- a/lib/plugins/authmysql/lang/ko/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Myeongjin <aranet100@gmail.com> - * @author Garam <rowain8@gmail.com> - */ -$lang['server'] = 'MySQL 서버'; -$lang['user'] = 'MySQL 사용자 이름'; -$lang['password'] = '위 사용자의 비밀번호'; -$lang['database'] = '사용할 데이터베이스'; -$lang['charset'] = '데이터베이스에 사용하는 문자 집합'; -$lang['debug'] = '추가적인 디버그 정보 보이기'; -$lang['forwardClearPass'] = 'passcrypt 옵션을 사용하는 대신 아래 SQL 문에 일반 텍스트로 사용자 비밀번호를 전달'; -$lang['TablesToLock'] = '쓰기 작업에 잠궈야 하는 테이블의 쉼표로 구분한 목록'; -$lang['checkPass'] = '비밀번호를 확인하기 위한 SQL 문'; -$lang['getUserInfo'] = '사용자 정보를 가져오기 위한 SQL 문'; -$lang['getGroups'] = '사용자의 그룹 구성원을 가져오기 위한 SQL 문'; -$lang['getUsers'] = '모든 사용자를 나타낼 SQL 문'; -$lang['FilterLogin'] = '로그인 이름별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterName'] = '전체 이름별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterEmail'] = '이메일 주소별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterGroup'] = '그룹 구성원별로 사용자를 필터하기 위한 SQL 조항'; -$lang['SortOrder'] = '사용자를 정렬할 SQL 조항'; -$lang['addUser'] = '새 사용자를 추가할 SQL 문'; -$lang['addGroup'] = '새 그룹을 추가할 SQL 문'; -$lang['addUserGroup'] = '기존 그룹에 사용자를 추가할 SQL 문'; -$lang['delGroup'] = '그룹을 제거할 SQL 문'; -$lang['getUserID'] = '사용자의 기본 키를 얻을 SQL 문'; -$lang['delUser'] = '사용자를 삭제할 SQL 문'; -$lang['delUserRefs'] = '모든 그룹에서 사용자를 제거할 SQL 문'; -$lang['updateUser'] = '사용자 프로필을 업데이트할 SQL 문'; -$lang['UpdateLogin'] = '사용자의 로그인 이름을 업데이트하기 위한 Update 조항'; -$lang['UpdatePass'] = '사용자의 비밀번호를 업데이트하기 위한 Update 조항'; -$lang['UpdateEmail'] = '사용자의 이메일 주소를 업데이트하기 위한 Update 조항'; -$lang['UpdateName'] = '사용자의 전체 이름을 업데이트하기 위한 Update 조항'; -$lang['UpdateTarget'] = '업데이트할 때 사용자를 식별할 Limit 조항'; -$lang['delUserGroup'] = '주어진 그룹에서 사용자를 제거할 SQL 문'; -$lang['getGroupID'] = '주어진 그룹의 기본 키를 얻을 SQL 문'; -$lang['debug_o_0'] = '없음'; -$lang['debug_o_1'] = '오류에만'; -$lang['debug_o_2'] = '모든 SQL 쿼리'; diff --git a/lib/plugins/authmysql/lang/lv/settings.php b/lib/plugins/authmysql/lang/lv/settings.php deleted file mode 100644 index 008ef344a..000000000 --- a/lib/plugins/authmysql/lang/lv/settings.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Oskars Pakers <oskars.pakers@gmail.com> - * @author Aivars Miška <allefm@gmail.com> - */ -$lang['server'] = 'Jūsu MySQL serveris'; -$lang['user'] = 'MySQL lietotāja vārds'; -$lang['password'] = 'Lietotāja parole'; -$lang['delUser'] = 'SQL pieprasījums lietotāja dzēšanai'; diff --git a/lib/plugins/authmysql/lang/nl/lang.php b/lib/plugins/authmysql/lang/nl/lang.php deleted file mode 100644 index 1f6d8af73..000000000 --- a/lib/plugins/authmysql/lang/nl/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Hugo Smet <hugo.smet@scarlet.be> - */ -$lang['connectfail'] = 'Connectie met de database mislukt.'; -$lang['userexists'] = 'Sorry, een gebruiker met deze login bestaat reeds.'; -$lang['usernotexists'] = 'Sorry, deze gebruiker bestaat niet.'; -$lang['writefail'] = 'Onmogelijk om de gebruikers data te wijzigen. Gelieve de Wiki-Admin te informeren.'; diff --git a/lib/plugins/authmysql/lang/nl/settings.php b/lib/plugins/authmysql/lang/nl/settings.php deleted file mode 100644 index a4bab2dac..000000000 --- a/lib/plugins/authmysql/lang/nl/settings.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Remon <no@email.local> - */ -$lang['server'] = 'De MySQL server'; -$lang['user'] = 'MySql gebruikersnaam'; -$lang['password'] = 'Wachtwoord van bovenstaande gebruiker'; -$lang['database'] = 'Te gebruiken database'; -$lang['charset'] = 'Tekenset voor database'; -$lang['debug'] = 'Tonen aanvullende debuginformatie'; -$lang['forwardClearPass'] = 'Wachtwoorden als leesbare tekst in SQL commando\'s opnemen in plaats van versleutelde tekens'; -$lang['TablesToLock'] = 'Kommagescheiden lijst van tabellen die gelocked moeten worden bij schrijfacties'; -$lang['checkPass'] = 'SQL commando voor het verifiëren van wachtwoorden'; -$lang['getUserInfo'] = 'SQL commando voor het ophalen van gebruikersinformatie'; -$lang['getGroups'] = 'SQL commando voor het ophalen van groepslidmaatschappen'; -$lang['getUsers'] = 'SQL commando voor het tonen van alle gebruikers'; -$lang['FilterLogin'] = 'SQL clausule voor het filteren van gebruikers op inlognaam'; -$lang['FilterName'] = 'SQL clausule voor het filteren van gebruikers op volledige naam'; -$lang['FilterEmail'] = 'SQL clausule voor het filteren van gebruikers op e-mailadres'; -$lang['FilterGroup'] = 'SQL clausule voor het filteren van gebruikers op groepslidmaatschap'; -$lang['SortOrder'] = 'SQL clausule voor het sorteren van gebruikers'; -$lang['addUser'] = 'SQL commando om een nieuwe gebruiker toe te voegen'; -$lang['addGroup'] = 'SQL commando om een nieuwe groep toe te voegen'; -$lang['addUserGroup'] = 'SQL commando om een gebruiker aan een bestaande groep toe te voegen'; -$lang['delGroup'] = 'SQL commando om een groep te verwijderen'; -$lang['getUserID'] = 'SQL commando om de de primaire sleutel van een gebruiker op te halen'; -$lang['delUser'] = 'SQL commando om een gebruiker te verwijderen'; -$lang['delUserRefs'] = 'SQL commando om een gebruiker uit alle groepen te verwijderen'; -$lang['updateUser'] = 'SQL commando om een gebruikersprofiel bij te werken'; -$lang['UpdateLogin'] = 'Bijwerkcommando om de inlognaam van de gebruiker bij te werken'; -$lang['UpdatePass'] = 'Bijwerkcommando om het wachtwoord van de gebruiker bij te werken'; -$lang['UpdateEmail'] = 'Bijwerkcommando om het e-mailadres van de gebruiker bij te werken'; -$lang['UpdateName'] = 'Bijwerkcommando om de volledige naam van de gebruiker bij te werken'; -$lang['UpdateTarget'] = 'Beperkingsclausule om de gebruiker te identificeren voor bijwerken'; -$lang['delUserGroup'] = 'SQL commando om een gebruiker uit een bepaalde groep te verwijderen'; -$lang['getGroupID'] = 'SQL commando om de primaire sletel van een bepaalde groep op te halen'; -$lang['debug_o_0'] = 'geen'; -$lang['debug_o_1'] = 'alleen bij fouten'; -$lang['debug_o_2'] = 'alle SQL queries'; diff --git a/lib/plugins/authmysql/lang/no/lang.php b/lib/plugins/authmysql/lang/no/lang.php deleted file mode 100644 index 38377b561..000000000 --- a/lib/plugins/authmysql/lang/no/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Arne Hanssen <arne.hanssen@getmail.no> - */ -$lang['connectfail'] = 'Klarte ikke koble til databasen.'; -$lang['userexists'] = 'Beklager, men en bruker med dette brukernavnet fins fra før.'; -$lang['usernotexists'] = 'Beklager med bruker fins ikke.'; -$lang['writefail'] = 'Klarte ikke endre brukerdata. Dette bør meldes til wikiens administrator'; diff --git a/lib/plugins/authmysql/lang/no/settings.php b/lib/plugins/authmysql/lang/no/settings.php deleted file mode 100644 index 6d4134f7c..000000000 --- a/lib/plugins/authmysql/lang/no/settings.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Patrick <spill.p@hotmail.com> - * @author Arne Hanssen <arne.hanssen@getmail.no> - * @author Arne Hanssen <arnehans@getmail.no> - */ -$lang['server'] = 'Din MySQL-server'; -$lang['user'] = 'Ditt MySQL-brukernavn'; -$lang['password'] = 'Passord til brukeren'; -$lang['database'] = 'Database som skal brukes'; -$lang['charset'] = 'Tegnsettet som datasen bruker'; -$lang['debug'] = 'Vis tilleggsinformasjon for feilsøking'; -$lang['forwardClearPass'] = 'Videresendt passord i klartekst til SQL-uttrykket under, i stedet for å bruke det krypterte passordet'; -$lang['TablesToLock'] = 'Kommaseparert liste over tabeller som må låses ved skriveopperasjoner'; -$lang['checkPass'] = 'SQL-uttrykk for å sjekke passord'; -$lang['getUserInfo'] = 'SQL-uttrykk for å hente informasjon om bruker'; -$lang['getGroups'] = 'SQL-uttrykk for å hente gruppene en bruker tilhører'; -$lang['getUsers'] = 'SQL-utrykk for å liste alle brukere'; -$lang['FilterLogin'] = 'SQL-utrykk for å filtrere brukere etter brukernavn'; -$lang['FilterName'] = 'SQL-utrykk for å filtrere brukere etter fult navn'; -$lang['FilterEmail'] = 'SQL-utrykk for å filtrere brukere etter e-postadresse'; -$lang['FilterGroup'] = 'SQL-uttrykk for å filtrere brukere etter hvilken grupper de tilhører'; -$lang['SortOrder'] = 'SQL-utrykk for å sortere brukere'; -$lang['addUser'] = 'SQL-utrykk for å legge til en ny bruker '; -$lang['addGroup'] = 'SQL-utrykk for å legge til en ny gruppe'; -$lang['addUserGroup'] = 'SQL-uttrykk for å legge til en bruker i en eksisterende gruppe'; -$lang['delGroup'] = 'SQL-uttrykk for å fjerne en gruppe'; -$lang['getUserID'] = 'SQL-uttrykk for å hente primærnøkkel for en bruker'; -$lang['delUser'] = 'SQL-utrykk for å slette en bruker'; -$lang['delUserRefs'] = 'SQL-utrykk for å fjerne en bruke fra alle grupper'; -$lang['updateUser'] = 'SQL-uttrykk for å oppdatere en brukerprofil'; -$lang['UpdateLogin'] = 'Update-utrykk for å oppdatere brukernavn'; -$lang['UpdatePass'] = 'Update-utrykk for å oppdatere brukers passord'; -$lang['UpdateEmail'] = 'Update-utrykk for å oppdatere brukers e-postadresse'; -$lang['UpdateName'] = 'Update-utrykk for å oppdatere brukers fulle navn'; -$lang['UpdateTarget'] = 'Limit-uttrykk for å identifisere brukeren ved oppdatering'; -$lang['delUserGroup'] = 'SQL-uttrykk for å fjerne en bruker fra en gitt gruppe'; -$lang['getGroupID'] = 'SQL-uttrykk for å hente primærnøkkel for en gitt gruppe '; -$lang['debug_o_0'] = 'ingen'; -$lang['debug_o_1'] = 'bare ved feil'; -$lang['debug_o_2'] = 'alle SQL-spørringer'; diff --git a/lib/plugins/authmysql/lang/pl/lang.php b/lib/plugins/authmysql/lang/pl/lang.php deleted file mode 100644 index 14f645e67..000000000 --- a/lib/plugins/authmysql/lang/pl/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Wojciech Lichota <wojciech@lichota.pl> - */ -$lang['connectfail'] = 'Nie można połączyć się z bazą danych.'; -$lang['userexists'] = 'Niestety, użytkownik o tym loginie już istnieje.'; -$lang['usernotexists'] = 'Niestety, taki użytkownik nie istnieje.'; -$lang['writefail'] = 'Nie można zmodyfikować danych użytkownika. Proszę poinformować administratora Wiki.'; diff --git a/lib/plugins/authmysql/lang/pl/settings.php b/lib/plugins/authmysql/lang/pl/settings.php deleted file mode 100644 index e54372e57..000000000 --- a/lib/plugins/authmysql/lang/pl/settings.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Wojciech Lichota <wojciech@lichota.pl> - * @author Paweł Jan Czochański <czochanski@gmail.com> - * @author Mati <mackosa@wp.pl> - * @author Maciej Helt <geraldziu@gmail.com> - */ -$lang['server'] = 'Twój server MySQL'; -$lang['user'] = 'Nazwa użytkownika MySQL'; -$lang['password'] = 'Hasło dla powyższego użytkownika'; -$lang['database'] = 'Używana baza danych'; -$lang['charset'] = 'Zestaw znaków uzyty w bazie danych'; -$lang['debug'] = 'Wyświetlaj dodatkowe informacje do debugowania.'; -$lang['forwardClearPass'] = 'Zamiast używać opcji passcrypt, przekazuj hasła użytkowników jako czysty tekst do poniższej instrukcji SQL'; -$lang['TablesToLock'] = 'Rozdzielana przecinkami lista tabel, które powinny być blokowane podczas operacji zapisu'; -$lang['checkPass'] = 'Zapytanie SQL wykorzystywane do sprawdzania haseł.'; -$lang['getUserInfo'] = 'Zapytanie SQL zwracające informacje o użytkowniku'; -$lang['getGroups'] = 'Zapytanie SQL przynależność do grup danego użytkownika'; -$lang['getUsers'] = 'Zapytanie SQL zwracające listę wszystkich użytkowników'; -$lang['FilterLogin'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich loginu'; -$lang['FilterName'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich pełnej nazwy'; -$lang['FilterEmail'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich adresu email'; -$lang['FilterGroup'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich przynależności do grup'; -$lang['SortOrder'] = 'Klauzula SQL używana do sortowania użytkowników'; -$lang['addUser'] = 'Zapytanie SQL dodające nowego użytkownika'; -$lang['addGroup'] = 'Instrukcja SQL dodająca nową grupę'; -$lang['addUserGroup'] = 'Instrukcja SQL dodająca użytkownika do istniejącej grupy'; -$lang['delGroup'] = 'Instrukcja SQL usuwająca grupę'; -$lang['getUserID'] = 'Instrukcja SQL pobierająca klucz główny użytkownika'; -$lang['delUser'] = 'Instrukcja SQL usuwająca użytkownika'; -$lang['delUserRefs'] = 'Instrukcja SQL usuwająca użytkownika ze wszystkich grup'; -$lang['updateUser'] = 'Instrukcja SQL aktualizująca profil użytkownika'; -$lang['UpdateLogin'] = 'Polecenie służące do aktualizacji loginu użytkownika'; -$lang['UpdatePass'] = 'Polecenie służące do aktualizacji hasła użytkownika'; -$lang['UpdateEmail'] = 'Polecenie służące do aktualizacji e-mailu użytkownika'; -$lang['UpdateName'] = 'Polecenie służące do aktualizacji imienia i nazwiska użytkownika'; -$lang['UpdateTarget'] = 'Instrukcja limitu do identyfikacji użytkownika podczas aktualizacji'; -$lang['delUserGroup'] = 'Instrukcja SQL usuwająca użytkownika ze wskazanej grupy'; -$lang['getGroupID'] = 'Instrukcja SQL pobierający klucz główny wskazanej grupy'; -$lang['debug_o_0'] = 'brak'; -$lang['debug_o_1'] = 'tylko w przypadku błędów'; -$lang['debug_o_2'] = 'wszystkie zapytania SQL'; diff --git a/lib/plugins/authmysql/lang/pt-br/lang.php b/lib/plugins/authmysql/lang/pt-br/lang.php deleted file mode 100644 index 02c4b9e1e..000000000 --- a/lib/plugins/authmysql/lang/pt-br/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Frederico Gonçalves Guimarães <frederico@teia.bio.br> - */ -$lang['connectfail'] = 'Não foi possível conectar ao banco de dados.'; -$lang['userexists'] = 'Desculpe, mas já existe esse nome de usuário.'; -$lang['usernotexists'] = 'Desculpe, mas esse usuário não existe.'; -$lang['writefail'] = 'Não foi possível modificar os dados do usuário. Por favor, informe ao administrador do Wiki.'; diff --git a/lib/plugins/authmysql/lang/pt-br/settings.php b/lib/plugins/authmysql/lang/pt-br/settings.php deleted file mode 100644 index cc637d6d4..000000000 --- a/lib/plugins/authmysql/lang/pt-br/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Victor Westmann <victor.westmann@gmail.com> - * @author Frederico Guimarães <frederico@teia.bio.br> - */ -$lang['server'] = 'Seu servidor MySQL'; -$lang['user'] = 'usuário MySQL'; -$lang['password'] = 'Senha do usuário acima'; -$lang['database'] = 'Base de dados para usar'; -$lang['charset'] = 'Codificação de caracter usado na base de dados'; -$lang['debug'] = 'Mostrar informações adicionais de depuração'; -$lang['forwardClearPass'] = 'Passar senhas de usuários como texto puro para comandos SQL abaixo, ao invés de usar opção passcrypt'; -$lang['TablesToLock'] = 'Lista separada por vírgulas para tabelas que devem estar travadas em operações de escrita'; -$lang['checkPass'] = 'Comandos SQL para verificar senhas'; -$lang['getUserInfo'] = 'Comando SQL para obter informações de usuário'; -$lang['getGroups'] = 'Comando SQL para obter as credenciais de grupo de um usuário'; -$lang['getUsers'] = 'Comando SQL para listar todos os usuários'; -$lang['FilterLogin'] = 'Comando SQL para filtrar usuários pelo login'; -$lang['FilterName'] = 'Cláusula SQL para filtrar usuários por nome completo'; -$lang['FilterEmail'] = 'Cláusula SQL para filtrar usuários por endereço de email'; -$lang['FilterGroup'] = 'Cláusula SQL para filtrar usuários por membros de grupos'; -$lang['SortOrder'] = 'Cláusula SQL para ordenar usuários'; -$lang['addUser'] = 'Comando SQL para adicionar um novo usuário'; -$lang['addGroup'] = 'Comando SQL para adicionar um novo grupo'; -$lang['addUserGroup'] = 'Comando SQL para adicionar um usuário a um determinado grupo'; -$lang['delGroup'] = 'Comando SQL para remover um grupo'; -$lang['getUserID'] = 'Comando SQL para obter a chave primária de um usuário'; -$lang['delUser'] = 'Comando SQL para apagar um usuário'; -$lang['delUserRefs'] = 'Comando SQL para apagar um usuário de todos os grupos'; -$lang['updateUser'] = 'Comando SQL para atualizar perfil de usuário'; -$lang['UpdateLogin'] = 'Comando SQL para atualizar o login de um usuário'; -$lang['UpdatePass'] = 'Cláusula de atualização para atualizar senha de usuário'; -$lang['UpdateEmail'] = 'Cláusula de atualização para atualizar email do usuário'; -$lang['UpdateName'] = 'Cláusula de atualização para atualizar nome completo do usuário'; -$lang['UpdateTarget'] = 'Limitar cláusula para identificar usuário quando estiver atualizando'; -$lang['delUserGroup'] = 'Comando SQL para remover um usuário de um grupo determinado'; -$lang['getGroupID'] = 'Comando SQL para obter a chave primária de um grupo determinado'; -$lang['debug_o_0'] = 'nenhum'; -$lang['debug_o_1'] = 'apenas em erros'; -$lang['debug_o_2'] = 'todas as queries SQL'; diff --git a/lib/plugins/authmysql/lang/pt/lang.php b/lib/plugins/authmysql/lang/pt/lang.php deleted file mode 100644 index 9e8bd6cd5..000000000 --- a/lib/plugins/authmysql/lang/pt/lang.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Paulo Carmino <contato@paulocarmino.com> - * @author Guilherme Sá <guilherme.sa@hotmail.com> - */ -$lang['connectfail'] = 'Falha ao conectar com o banco de dados.'; -$lang['userexists'] = 'Desculpe, esse login já está sendo usado.'; -$lang['usernotexists'] = 'Desculpe, esse login não existe.'; -$lang['writefail'] = 'Incapaz de modificar dados do usuário. Favor informar ao Wiki-Admin.'; diff --git a/lib/plugins/authmysql/lang/pt/settings.php b/lib/plugins/authmysql/lang/pt/settings.php deleted file mode 100644 index 2488487fd..000000000 --- a/lib/plugins/authmysql/lang/pt/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author André Neves <drakferion@gmail.com> - * @author Guido Salatino <guidorafael23@gmail.com> - */ -$lang['server'] = 'O seu servidor de MySQL'; -$lang['user'] = 'Utilizador MySQL'; -$lang['password'] = 'Senha para o utilizador acima'; -$lang['database'] = 'Base de dados a usar'; -$lang['charset'] = 'Conjunto de caracteres usado na base de dados'; -$lang['debug'] = 'Mostrar informação adicional de debug'; -$lang['forwardClearPass'] = 'Passe as senhas do usuário como texto puro para as instruções SQL abaixo, em vez de usar a opção passcrypt'; -$lang['TablesToLock'] = 'Lista de tabelas, separadas por virgula, que devem ser bloqueadas em operações de escrita'; -$lang['checkPass'] = 'Instrução SQL para verificar senhas'; -$lang['getUserInfo'] = 'Instrução SQL para recuperar informações do usuário'; -$lang['getGroups'] = 'Instrução SQL para recuperar os usuários participantes de um grupo'; -$lang['getUsers'] = 'Instrução SQL para listar todos usuários'; -$lang['FilterLogin'] = 'Cláusula SQL para filtrar utilizadores por tipo de login'; -$lang['FilterName'] = 'Cláusula SQL para filtrar utilizadores por nome completo'; -$lang['FilterEmail'] = 'Cláusula SQL para filtrar utilizadores por endereço de email'; -$lang['FilterGroup'] = 'Cláusula SQL para filtrar utilizadores por pertença a grupo'; -$lang['SortOrder'] = 'Cláusula SQL para ordenar utilizadores'; -$lang['addUser'] = 'Instrução SQL para adicionar novo usuário'; -$lang['addGroup'] = 'Instrução SQL para adicionar um novo grupo'; -$lang['addUserGroup'] = 'Instrução SQL para adicionar um usuário a um grupo existente'; -$lang['delGroup'] = 'Instrução SQL para remover um grupo'; -$lang['getUserID'] = 'Instrução SQL para obter a chave principal de um usuário'; -$lang['delUser'] = 'Instrução SQL para excluir um usuário'; -$lang['delUserRefs'] = 'Instrução SQL para excluir um usuário de todos os grupos'; -$lang['updateUser'] = 'Instrução SQL para atualizar um perfil de usuário'; -$lang['UpdateLogin'] = 'Cláusula de atualização para atualizar o nome de login do utilizador'; -$lang['UpdatePass'] = 'Cláusula de atualização para atualizar a senha do utilizador'; -$lang['UpdateEmail'] = 'Cláusula de atualização para atualizar o endereço de email do utilizador'; -$lang['UpdateName'] = 'Cláusula de atualização para atualizar o nome completo do utilizador'; -$lang['UpdateTarget'] = 'Cláusula limite para identificar o usuário ao atualizar'; -$lang['delUserGroup'] = 'Instrução SQL para remover um usuário de um determinado grupo'; -$lang['getGroupID'] = 'Instrução SQL para obter a chave principal de um determinado grupo'; -$lang['debug_o_0'] = 'nenhum'; -$lang['debug_o_1'] = 'só aquando de erros'; -$lang['debug_o_2'] = 'todas as consultas SQL'; diff --git a/lib/plugins/authmysql/lang/ru/lang.php b/lib/plugins/authmysql/lang/ru/lang.php deleted file mode 100644 index 27153fd5c..000000000 --- a/lib/plugins/authmysql/lang/ru/lang.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Takumo <9206984@mail.ru> - * @author Aleksandr Selivanov <alexgearbox@yandex.ru> - */ -$lang['connectfail'] = 'Ошибка соединения с базой данных.'; -$lang['userexists'] = 'Извините, пользователь с таким логином уже существует.'; -$lang['usernotexists'] = 'Извините, такой пользователь не существует.'; -$lang['writefail'] = 'Невозможно изменить данные пользователя. Сообщите об этом администратору вики.'; diff --git a/lib/plugins/authmysql/lang/ru/settings.php b/lib/plugins/authmysql/lang/ru/settings.php deleted file mode 100644 index 810937782..000000000 --- a/lib/plugins/authmysql/lang/ru/settings.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Yuriy Skalko <yuriy.skalko@gmail.com> - * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) - * @author Aleksandr Selivanov <alexgearbox@gmail.com> - * @author Type-kun <workwork-1@yandex.ru> - */ -$lang['server'] = 'Ваш MySQL-сервер'; -$lang['user'] = 'Имя пользователя MySQL'; -$lang['password'] = 'Пароль пользователя MySQL'; -$lang['database'] = 'Имя базы данных'; -$lang['charset'] = 'Используемый набор символов в базе данных'; -$lang['debug'] = 'Отображение дополнительной отладочной информации'; -$lang['forwardClearPass'] = 'Передача пароля пользователя открытым текстом, вместо зашифрованной формы, в используемом выражении SQL'; -$lang['TablesToLock'] = 'Имена таблиц (через запятую), которым необходимо ограничение для записи'; -$lang['checkPass'] = 'Выражение SQL, осуществляющее проверку пароля'; -$lang['getUserInfo'] = 'Выражение SQL, осуществляющее извлечение информации о пользователе'; -$lang['getGroups'] = 'Выражение SQL, осуществляющее извлечение информации о членстве пользователе в группах'; -$lang['getUsers'] = 'Выражение SQL, осуществляющее извлечение полного списка пользователей'; -$lang['FilterLogin'] = 'Выражение SQL, осуществляющее фильтрацию пользователей по логину'; -$lang['FilterName'] = 'Выражение SQL, осуществляющее фильтрацию пользователей по полному имени'; -$lang['FilterEmail'] = 'Выражение SQL, осуществляющее фильтрацию пользователей по адресу электронной почты'; -$lang['FilterGroup'] = 'Выражение SQL, осуществляющее фильтрацию пользователей согласно членству в группе'; -$lang['SortOrder'] = 'Выражение SQL, осуществляющее сортировку пользователей'; -$lang['addUser'] = 'Выражение SQL, осуществляющее добавление нового пользователя'; -$lang['addGroup'] = 'Выражение SQL, осуществляющее добавление новой группы'; -$lang['addUserGroup'] = 'Выражение SQL, осуществляющее добавление пользователя в существующую группу'; -$lang['delGroup'] = 'Выражение SQL, осуществляющее удаление группы'; -$lang['getUserID'] = 'Выражение SQL, обеспечивающее получение первичного ключа пользователя'; -$lang['delUser'] = 'Выражение SQL, осуществляющее удаление пользователя'; -$lang['delUserRefs'] = 'Выражение SQL, осуществляющее удаление пользователя из всех групп'; -$lang['updateUser'] = 'Выражение SQL, осуществляющее обновление профиля пользователя'; -$lang['UpdateLogin'] = 'Условие для обновления имени пользователя'; -$lang['UpdatePass'] = 'Условие для обновления пароля пользователя'; -$lang['UpdateEmail'] = 'Условие для обновления адреса электронной почты пользователя'; -$lang['UpdateName'] = 'Условие для обновления полного имени пользователя'; -$lang['UpdateTarget'] = 'Выражение \'LIMIT\' для идентификации пользователя при обновлении'; -$lang['delUserGroup'] = 'Выражение SQL, осуществляющее удаление пользователя из указанной группы'; -$lang['getGroupID'] = 'Выражение SQL, обеспечивающее получение первичного ключа указанной группы'; -$lang['debug_o_0'] = 'ни один из вариантов'; -$lang['debug_o_1'] = 'только при возникновении ошибок'; -$lang['debug_o_2'] = 'все SQL-запросы'; diff --git a/lib/plugins/authmysql/lang/sk/lang.php b/lib/plugins/authmysql/lang/sk/lang.php deleted file mode 100644 index 9d792b7e9..000000000 --- a/lib/plugins/authmysql/lang/sk/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Martin Michalek <michalek.dev@gmail.com> - */ -$lang['connectfail'] = 'Nepodarilo sa pripojiť k databáze.'; -$lang['userexists'] = 'Ľutujem, ale používateľ s týmto prihlasovacím menom už existuje.'; -$lang['usernotexists'] = 'Ľutujem, daný používateľ neexistuje.'; -$lang['writefail'] = 'Nie je možné zmeniť údaje používateľa, informujte prosím administrátora Wiki.'; diff --git a/lib/plugins/authmysql/lang/sk/settings.php b/lib/plugins/authmysql/lang/sk/settings.php deleted file mode 100644 index 4def5d67d..000000000 --- a/lib/plugins/authmysql/lang/sk/settings.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Martin Michalek <michalek.dev@gmail.com> - */ -$lang['server'] = 'MySQL server'; -$lang['user'] = 'Meno používateľa MySQL'; -$lang['password'] = 'Heslo pre vyššie uvedeného používateľa'; -$lang['database'] = 'Použiť databázu'; -$lang['charset'] = 'Znaková sada databázy'; -$lang['debug'] = 'Zobraziť dodatočné ladiace informácie'; -$lang['forwardClearPass'] = 'Posielať heslo ako nezakódovaný text nižšie uvedenému SQL príkazu namiesto použitia kódovania'; -$lang['TablesToLock'] = 'Zoznam tabuliek oddelených čiarkou, ktoré by mali byť uzamknuté pri operáciách zápisu'; -$lang['checkPass'] = 'SQL príkaz pre kontrolu hesla'; -$lang['getUserInfo'] = 'SQL príkaz pre získanie informácií o používateľovi'; -$lang['getGroups'] = 'SQL príkaz pre získanie informácií o skupinách používateľa'; -$lang['getUsers'] = 'SQL príkaz pre získanie zoznamu používateľov'; -$lang['FilterLogin'] = 'SQL podmienka pre filtrovanie používateľov podľa prihlasovacieho mena'; -$lang['FilterName'] = 'SQL podmienka pre filtrovanie používateľov podľa mena a priezviska'; -$lang['FilterEmail'] = 'SQL podmienka pre filtrovanie používateľov podľa emailovej adresy'; -$lang['FilterGroup'] = 'SQL podmienka pre filtrovanie používateľov podľa skupiny'; -$lang['SortOrder'] = 'SQL podmienka pre usporiadenia používateľov'; -$lang['addUser'] = 'SQL príkaz pre pridanie nového používateľa'; -$lang['addGroup'] = 'SQL príkaz pre pridanie novej skupiny'; -$lang['addUserGroup'] = 'SQL príkaz pre pridanie používateľa do existujúcej skupiny'; -$lang['delGroup'] = 'SQL príkaz pre zrušenie skupiny'; -$lang['getUserID'] = 'SQL príkaz pre získanie primárneho klúča používateľa'; -$lang['delUser'] = 'SQL príkaz pre zrušenie používateľa'; -$lang['delUserRefs'] = 'SQL príkaz pre vyradenie používateľa zo všetkých skupín'; -$lang['updateUser'] = 'SQL príkaz pre aktualizáciu informácií o používateľovi'; -$lang['UpdateLogin'] = 'SQL podmienka pre aktualizáciu prihlasovacieho mena používateľa'; -$lang['UpdatePass'] = 'SQL podmienka pre aktualizáciu hesla používateľa'; -$lang['UpdateEmail'] = 'SQL podmienka pre aktualizáciu emailovej adresy používateľa'; -$lang['UpdateName'] = 'SQL podmienka pre aktualizáciu mena a priezviska používateľa'; -$lang['UpdateTarget'] = 'Podmienka identifikácie používateľa pri aktualizácii'; -$lang['delUserGroup'] = 'SQL príkaz pre vyradenie používateľa z danej skupiny'; -$lang['getGroupID'] = 'SQL príkaz pre získanie primárneho kľúča skupiny'; -$lang['debug_o_0'] = 'žiadne'; -$lang['debug_o_1'] = 'iba pri chybách'; -$lang['debug_o_2'] = 'všetky SQL dopyty'; diff --git a/lib/plugins/authmysql/lang/sl/settings.php b/lib/plugins/authmysql/lang/sl/settings.php deleted file mode 100644 index 8e0b58c40..000000000 --- a/lib/plugins/authmysql/lang/sl/settings.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Matej Urbančič <mateju@svn.gnome.org> - */ -$lang['database'] = 'Podatkovna zbirka za uporabo'; -$lang['debug_o_0'] = 'brez'; -$lang['debug_o_1'] = 'le ob napakah'; -$lang['debug_o_2'] = 'vse poizvedbe SQL'; diff --git a/lib/plugins/authmysql/lang/sr/lang.php b/lib/plugins/authmysql/lang/sr/lang.php deleted file mode 100644 index 7ec2fb6a5..000000000 --- a/lib/plugins/authmysql/lang/sr/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Марко М. Костић <marko.m.kostic@gmail.com> - */ -$lang['connectfail'] = 'Нисам успео да се повежем на базу.'; -$lang['userexists'] = 'Нажалост, корисник са таквом пријавом већ постоји.'; -$lang['usernotexists'] = 'Нажалост, тај корисник не постоји.'; -$lang['writefail'] = 'Не могу да променим корисничке податке. Обавестите админа викија'; diff --git a/lib/plugins/authmysql/lang/sr/settings.php b/lib/plugins/authmysql/lang/sr/settings.php deleted file mode 100644 index eabdfbc24..000000000 --- a/lib/plugins/authmysql/lang/sr/settings.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Марко М. Костић <marko.m.kostic@gmail.com> - */ -$lang['server'] = 'Ваш MySQL сервер'; -$lang['user'] = 'MySQL корисничко име'; -$lang['password'] = 'Лозинка корисника изнад'; -$lang['database'] = 'База коју треба користити'; -$lang['charset'] = 'Кодни распоред коришћен у бази'; -$lang['debug'] = 'Прикажи додатне податке за поправљање грешака'; -$lang['forwardClearPass'] = 'Пренеси корисничке лозинке као чист текст у SQL изјавама испод уместо коришћења passcrypt опције'; -$lang['TablesToLock'] = 'Списак табела одвојених размаком које треба закључати приликом уписивања'; -$lang['checkPass'] = 'SQL упит за проверу лозинки'; -$lang['getUserInfo'] = 'SQL упит за добављање података о кориснику'; -$lang['getGroups'] = 'SQL за добављање корисничких учлањења у групе'; -$lang['getUsers'] = 'SQL упит за излиставање свих корисника'; -$lang['FilterLogin'] = 'SQL услов за филтрирање корисника по имену за пријаву'; -$lang['FilterName'] = 'SQL услов за филтрирање корисника по пуном имену'; -$lang['FilterEmail'] = 'SQL услов за филтрирање корисника по мејл адреси'; -$lang['FilterGroup'] = 'SQL услов за филтрирање корисника по чланству у групама'; -$lang['SortOrder'] = 'SQL услов за сортирање корисника'; -$lang['addUser'] = 'SQL упит за додавање новог корисника'; -$lang['addGroup'] = 'SQL упит за додавање нове групе'; -$lang['addUserGroup'] = 'SQL упит за додавање корисника у постојећу групу'; -$lang['delGroup'] = 'SQL упит за уклањање групе'; -$lang['getUserID'] = 'SQL упит за добављање примарног кључа корисника'; -$lang['delUser'] = 'SQL упит за брисање корисника'; -$lang['delUserRefs'] = 'SQL упит за брисање корисника из свих група'; -$lang['updateUser'] = 'SQL упит за ажурирање корисничког профила'; -$lang['UpdateLogin'] = 'Услов за ажурирање корисничког имена за пријаву'; -$lang['UpdatePass'] = 'Услов за ажурирање корисничке лозинке'; -$lang['UpdateEmail'] = 'Услов за ажурирање корисничке мејл адресе'; -$lang['UpdateName'] = 'Услов за ажурирање корисничког пуног имена'; -$lang['UpdateTarget'] = 'Ограничи услов да би се утврдио корисник приликом ажурирања'; -$lang['delUserGroup'] = 'SQL упит за уклањање корисника из дате групе'; -$lang['getGroupID'] = 'SQL упит за добављање примарног кључа дате групе'; -$lang['debug_o_0'] = 'ништа'; -$lang['debug_o_1'] = 'само на грешкама'; -$lang['debug_o_2'] = 'сви SQL упити'; diff --git a/lib/plugins/authmysql/lang/sv/lang.php b/lib/plugins/authmysql/lang/sv/lang.php deleted file mode 100644 index 9c97bd7bb..000000000 --- a/lib/plugins/authmysql/lang/sv/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Tor Härnqvist <tor@harnqvist.se> - */ -$lang['connectfail'] = 'Kunde inte ansluta till databas.'; -$lang['userexists'] = 'Tyvärr, en användare med denna inloggning existerar redan.'; -$lang['usernotexists'] = 'Tyvärr, den användaren existerar inte.'; -$lang['writefail'] = 'Kunde inte ändra användardata. Var god inormera Wiki-administratören.'; diff --git a/lib/plugins/authmysql/lang/sv/settings.php b/lib/plugins/authmysql/lang/sv/settings.php deleted file mode 100644 index aa76b898f..000000000 --- a/lib/plugins/authmysql/lang/sv/settings.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Tor Härnqvist <tor@harnqvist.se> - * @author Smorkster Andersson smorkster@gmail.com - */ -$lang['server'] = 'Din MySQL server'; -$lang['user'] = 'Användarnamn för MySQL'; -$lang['password'] = 'Lösenord för användare ovan'; -$lang['database'] = 'Databas att använda'; -$lang['charset'] = 'Teckenuppsättning som används i databas'; -$lang['debug'] = 'Visa ytterligare felsökningsinformation'; -$lang['forwardClearPass'] = 'Skicka användares lösenord i klartext till SQL sats nedan, istället för att använda passcrypt alternativet'; -$lang['checkPass'] = 'SQL sats för kontroll av lösenord'; -$lang['getUserInfo'] = 'SQL sats för att hämta användarinformation'; -$lang['getGroups'] = 'SQL sats för att hämta en användares gruppmedlemskap'; -$lang['getUsers'] = 'SQL sats för att lista alla användare'; -$lang['addUser'] = 'SQL sats för att lägga till en användare'; -$lang['addGroup'] = 'SQL sats för att lägga till en grupp'; -$lang['addUserGroup'] = 'SQL sats för att lägga till en användare i en existerande grupp'; -$lang['delGroup'] = 'SQL sats för att ta bort en grupp'; -$lang['delUser'] = 'SQL sats för att ta bort en användare'; -$lang['delUserRefs'] = 'SQL sats för att ta bort en användare från alla grupper'; -$lang['updateUser'] = 'SQL sats för att uppdatera en användarprofil'; -$lang['delUserGroup'] = 'SQL sats för att ta bort en användare från en angiven grupp'; -$lang['debug_o_0'] = 'ingen'; -$lang['debug_o_1'] = 'enbart för fel'; diff --git a/lib/plugins/authmysql/lang/tr/lang.php b/lib/plugins/authmysql/lang/tr/lang.php deleted file mode 100644 index b5c7b2fe1..000000000 --- a/lib/plugins/authmysql/lang/tr/lang.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Mete Cuma <mcumax@gmail.com> - */ -$lang['connectfail'] = 'Veritabanına bağlantı kurulamadı.'; -$lang['usernotexists'] = 'Üzgünüz, kullanıcı mevcut değil.'; diff --git a/lib/plugins/authmysql/lang/tr/settings.php b/lib/plugins/authmysql/lang/tr/settings.php deleted file mode 100644 index ca6a7c6ad..000000000 --- a/lib/plugins/authmysql/lang/tr/settings.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author ilker rifat kapaç <irifat@gmail.com> - * @author İlker R. Kapaç <irifat@gmail.com> - */ -$lang['server'] = 'Sizin MySQL sunucunuz'; -$lang['user'] = 'MySQL kullanıcısının adı'; -$lang['password'] = 'Üstteki kullanıcı için şifre'; -$lang['database'] = 'Kullanılacak veritabanı'; -$lang['charset'] = 'Veritabanında kullanılacak karakter seti'; -$lang['debug'] = 'İlave hata ayıklama bilgisini görüntüle'; -$lang['checkPass'] = 'Şifreleri kontrol eden SQL ifadesi'; -$lang['getUserInfo'] = 'Kullanıcı bilgilerini getiren SQL ifadesi'; -$lang['getGroups'] = 'Kullanıcının grup üyeliklerini getiren SQL ifadesi'; -$lang['getUsers'] = 'Tüm kullanıcıları listeleyen SQL ifadesi'; -$lang['FilterLogin'] = 'Kullanıcıları giriş yaptıkları isimlere göre süzmek için SQL şartı'; -$lang['FilterName'] = 'Kullanıcıları tam isimlerine göre süzmek için SQL şartı'; -$lang['FilterEmail'] = 'Kullanıcıları e-posta adreslerine göre süzmek için SQL şartı'; -$lang['FilterGroup'] = 'Kullanıcıları üye oldukları grup isimlerine göre süzmek için SQL şartı'; -$lang['SortOrder'] = 'Kullanıcıları sıralamak için SQL şartı'; -$lang['addUser'] = 'Yeni bir kullanıcı ekleyen SQL ifadesi'; -$lang['addGroup'] = 'Yeni bir grup ekleyen SQL ifadesi'; -$lang['addUserGroup'] = 'Varolan gruba yeni bir kullanıcı ekleyen SQL ifadesi'; -$lang['delGroup'] = 'Grup silen SQL ifadesi'; -$lang['getUserID'] = 'Kullanıcının birincil anahtarını getiren SQL ifadesi'; -$lang['delUser'] = 'Kullanıcı silen SQL ifadesi'; -$lang['delUserRefs'] = 'Kullanıcıyı tüm gruplardan çıkartan SQL ifadesi'; -$lang['updateUser'] = 'Kullanıcı profilini güncelleyen SQL ifadesi'; -$lang['UpdateLogin'] = 'Kullanıcının giriş yaptığı ismi güncelleyen, güncelleme şartı'; -$lang['UpdatePass'] = 'Kullanıcının şifresini güncelleyen, güncelleme şartı'; -$lang['UpdateEmail'] = 'Kullanıcının e-posta adresini güncelleyen, güncelleme şartı'; -$lang['UpdateName'] = 'Kullanıcının tam adını güncelleyen, güncelleme şartı'; -$lang['UpdateTarget'] = 'Güncelleme esnasında kullanıcıyı belirleyen, sınır şartı'; -$lang['delUserGroup'] = 'Kullanıcıyı verilen gruptan silen SQL ifadesi'; -$lang['getGroupID'] = 'Verilen grubun birincil anahtarını getiren SQL ifadesi'; -$lang['debug_o_0'] = 'hiçbiri'; -$lang['debug_o_1'] = 'sadece hata olduğunda'; -$lang['debug_o_2'] = 'tüm SQL sorguları'; diff --git a/lib/plugins/authmysql/lang/uk/lang.php b/lib/plugins/authmysql/lang/uk/lang.php deleted file mode 100644 index e6cbaf026..000000000 --- a/lib/plugins/authmysql/lang/uk/lang.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Nina Zolotova <nina-z@i.ua> - */ -$lang['connectfail'] = 'Не вдалося з\'єднатися з базою даних.'; -$lang['userexists'] = 'Вибачте, користувач з таким логіном вже існує.'; -$lang['usernotexists'] = 'Вибачте, такого користувача не існує.'; diff --git a/lib/plugins/authmysql/lang/zh-tw/settings.php b/lib/plugins/authmysql/lang/zh-tw/settings.php deleted file mode 100644 index 3fbee151c..000000000 --- a/lib/plugins/authmysql/lang/zh-tw/settings.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author syaoranhinata@gmail.com - */ -$lang['server'] = '您的 MySQL 伺服器'; -$lang['user'] = 'MySQL 使用者名稱'; -$lang['password'] = '上述使用者的密碼'; -$lang['database'] = '使用的資料庫'; -$lang['charset'] = '資料庫使用的字符集'; -$lang['debug'] = '顯示額外除錯資訊'; -$lang['forwardClearPass'] = '以明文形式,把使用者密碼傳送给下列的 SQL 語句,而不使用 passcrypt 密碼加密選項'; -$lang['TablesToLock'] = '在寫操作時需要鎖定的數據表列表,以逗號分隔'; -$lang['checkPass'] = '檢查密碼的 SQL 語句'; -$lang['getUserInfo'] = '獲取使用者訊息的 SQL 語句'; -$lang['getGroups'] = '獲取使用者群組成員身份的 SQL 語句'; -$lang['getUsers'] = '把所有使用者列出的 SQL 語句'; -$lang['FilterLogin'] = '根據登入名稱來篩選使用者的 SQL 子句'; -$lang['FilterName'] = '根據全名來篩選使用者的 SQL 子句'; -$lang['FilterEmail'] = '根據電郵地址來篩選使用者的 SQL 子句'; -$lang['FilterGroup'] = '根據群組成員身份來篩選使用者的 SQL 子句'; -$lang['SortOrder'] = '對使用者排序的 SQL 子句'; -$lang['addUser'] = '增加新使用者的 SQL 語句'; -$lang['addGroup'] = '增加新群組的 SQL 語句'; -$lang['addUserGroup'] = '把使用者新增至現有群組的 SQL 語句'; -$lang['delGroup'] = '把群組刪除的 SQL 語句'; -$lang['getUserID'] = '取得使用者主鍵的 SQL 語句'; -$lang['delUser'] = '把使用者刪除的 SQL 語句'; -$lang['delUserRefs'] = '把使用者從所有群組裏刪除的 SQL 語句'; -$lang['updateUser'] = '更新使用者訊息的 SQL 語句'; -$lang['UpdateLogin'] = '更新使用者登入名稱的 Update 子句'; -$lang['UpdatePass'] = '更新帳號密碼的 Update 子句'; -$lang['UpdateEmail'] = '更新使用者電郵地址的 Update 子句'; -$lang['UpdateName'] = '更新使用者全名的 Update 子句'; -$lang['UpdateTarget'] = '在更新時識別使用者的 Limit 子句'; -$lang['delUserGroup'] = '把使用者從指定群組中刪除的 SQL 語句'; -$lang['getGroupID'] = '取得指定群組主鍵的 SQL 語句'; -$lang['debug_o_0'] = '無'; -$lang['debug_o_1'] = '僅在有錯誤時'; -$lang['debug_o_2'] = '所有 SQL 查詢'; diff --git a/lib/plugins/authmysql/lang/zh/lang.php b/lib/plugins/authmysql/lang/zh/lang.php deleted file mode 100644 index d96b7ba96..000000000 --- a/lib/plugins/authmysql/lang/zh/lang.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Errol <errol@hotmail.com> - */ -$lang['connectfail'] = '连接数据库失败'; -$lang['userexists'] = '抱歉,用户名已被使用。'; -$lang['usernotexists'] = '抱歉,用户不存在。'; -$lang['writefail'] = '无法修改用户数据。请通知管理员'; diff --git a/lib/plugins/authmysql/lang/zh/settings.php b/lib/plugins/authmysql/lang/zh/settings.php deleted file mode 100644 index 26ecc6b93..000000000 --- a/lib/plugins/authmysql/lang/zh/settings.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author lainme <lainme993@gmail.com> - */ -$lang['server'] = '您的 MySQL 服务器'; -$lang['user'] = 'MySQL 用户名'; -$lang['password'] = '上述用户的密码'; -$lang['database'] = '使用的数据库'; -$lang['charset'] = '数据库中使用的字符集'; -$lang['debug'] = '显示额外调试信息'; -$lang['forwardClearPass'] = '将用户密码以明文形式传送给下面的 SQL 语句,而不使用 passcrypt 密码加密选项'; -$lang['TablesToLock'] = '在写操作时需要锁定的数据表列表,以逗号分隔'; -$lang['checkPass'] = '检查密码的 SQL 语句'; -$lang['getUserInfo'] = '获取用户信息的 SQL 语句'; -$lang['getGroups'] = '或许用户的组成员身份的 SQL 语句'; -$lang['getUsers'] = '列出所有用户的 SQL 语句'; -$lang['FilterLogin'] = '根据登录名筛选用户的 SQL 子句'; -$lang['FilterName'] = '根据全名筛选用户的 SQL 子句'; -$lang['FilterEmail'] = '根据电子邮件地址筛选用户的 SQL 子句'; -$lang['FilterGroup'] = '根据组成员身份筛选用户的 SQL 子句'; -$lang['SortOrder'] = '对用户排序的 SQL 子句'; -$lang['addUser'] = '添加新用户的 SQL 语句'; -$lang['addGroup'] = '添加新组的 SQL 语句'; -$lang['addUserGroup'] = '将用户添加到现有组的 SQL 语句'; -$lang['delGroup'] = '删除组的 SQL 语句'; -$lang['getUserID'] = '获取用户主键的 SQL 语句'; -$lang['delUser'] = '删除用户的 SQL 语句'; -$lang['delUserRefs'] = '从所有组中删除一个用户的 SQL 语句'; -$lang['updateUser'] = '更新用户信息的 SQL 语句'; -$lang['UpdateLogin'] = '更新用户登录名的 Update 子句'; -$lang['UpdatePass'] = '更新用户密码的 Update 子句'; -$lang['UpdateEmail'] = '更新用户电子邮件地址的 Update 子句'; -$lang['UpdateName'] = '更新用户全名的 Update 子句'; -$lang['UpdateTarget'] = '更新时识别用户的 Limit 子句'; -$lang['delUserGroup'] = '从指定组删除用户的 SQL 语句'; -$lang['getGroupID'] = '获取指定组主键的 SQL 语句'; -$lang['debug_o_0'] = '无'; -$lang['debug_o_1'] = '仅在有错误时'; -$lang['debug_o_2'] = '所有 SQL 查询'; diff --git a/lib/plugins/authmysql/plugin.info.txt b/lib/plugins/authmysql/plugin.info.txt deleted file mode 100644 index 5f8493df1..000000000 --- a/lib/plugins/authmysql/plugin.info.txt +++ /dev/null @@ -1,7 +0,0 @@ -base authmysql -author Andreas Gohr -email andi@splitbrain.org -date 2015-07-13 -name [DEPRECATED] MYSQL Auth Plugin -desc ▶This plugin will be removed from DokuWiki in a future release! Use authpdo instead.◀ Provides user authentication against a MySQL database -url http://www.dokuwiki.org/plugin:authmysql diff --git a/lib/plugins/authpdo/_test/mysql/mybb.sql b/lib/plugins/authpdo/_test/mysql/mybb.sql index fdd1a9974..e83215c6e 100644 --- a/lib/plugins/authpdo/_test/mysql/mybb.sql +++ b/lib/plugins/authpdo/_test/mysql/mybb.sql @@ -30,13 +30,13 @@ CREATE TABLE `mybb_usergroups` ( `gid` smallint(5) unsigned NOT NULL, `type` tinyint(1) unsigned NOT NULL DEFAULT '2', `title` varchar(120) NOT NULL DEFAULT '', - `description` text NOT NULL, + `description` text NOT NULL DEFAULT '', `namestyle` varchar(200) NOT NULL DEFAULT '{username}', `usertitle` varchar(120) NOT NULL DEFAULT '', `stars` smallint(4) unsigned NOT NULL DEFAULT '0', `starimage` varchar(120) NOT NULL DEFAULT '', `image` varchar(120) NOT NULL DEFAULT '', - `disporder` smallint(6) unsigned NOT NULL, + `disporder` smallint(6) unsigned NOT NULL DEFAULT '0', `isbannedgroup` tinyint(1) NOT NULL DEFAULT '0', `canview` tinyint(1) NOT NULL DEFAULT '0', `canviewthreads` tinyint(1) NOT NULL DEFAULT '0', @@ -209,7 +209,7 @@ CREATE TABLE `mybb_users` ( `google` varchar(75) NOT NULL DEFAULT '', `birthday` varchar(15) NOT NULL DEFAULT '', `birthdayprivacy` varchar(4) NOT NULL DEFAULT 'all', - `signature` text NOT NULL, + `signature` text NOT NULL DEFAULT '', `allownotices` tinyint(1) NOT NULL DEFAULT '0', `hideemail` tinyint(1) NOT NULL DEFAULT '0', `subscriptionmethod` tinyint(1) NOT NULL DEFAULT '0', @@ -235,15 +235,15 @@ CREATE TABLE `mybb_users` ( `timezone` varchar(5) NOT NULL DEFAULT '', `dst` tinyint(1) NOT NULL DEFAULT '0', `dstcorrection` tinyint(1) NOT NULL DEFAULT '0', - `buddylist` text NOT NULL, - `ignorelist` text NOT NULL, + `buddylist` text NOT NULL DEFAULT '', + `ignorelist` text NOT NULL DEFAULT '', `style` smallint(5) unsigned NOT NULL DEFAULT '0', `away` tinyint(1) NOT NULL DEFAULT '0', `awaydate` int(10) unsigned NOT NULL DEFAULT '0', `returndate` varchar(15) NOT NULL DEFAULT '', `awayreason` varchar(200) NOT NULL DEFAULT '', - `pmfolders` text NOT NULL, - `notepad` text NOT NULL, + `pmfolders` text NOT NULL DEFAULT '', + `notepad` text NOT NULL DEFAULT '', `referrer` int(10) unsigned NOT NULL DEFAULT '0', `referrals` int(10) unsigned NOT NULL DEFAULT '0', `reputation` int(11) NOT NULL DEFAULT '0', @@ -264,7 +264,7 @@ CREATE TABLE `mybb_users` ( `coppauser` tinyint(1) NOT NULL DEFAULT '0', `classicpostbit` tinyint(1) NOT NULL DEFAULT '0', `loginattempts` smallint(2) unsigned NOT NULL DEFAULT '1', - `usernotes` text NOT NULL, + `usernotes` text NOT NULL DEFAULT '', `sourceeditor` tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM AUTO_INCREMENT=88 DEFAULT CHARSET=utf8; diff --git a/lib/plugins/authpdo/_test/sqlite.test.php b/lib/plugins/authpdo/_test/sqlite.test.php index 35b612604..89cc9f60d 100644 --- a/lib/plugins/authpdo/_test/sqlite.test.php +++ b/lib/plugins/authpdo/_test/sqlite.test.php @@ -10,8 +10,8 @@ class testable_auth_plugin_authpdo extends auth_plugin_authpdo { return 'authpdo'; } - public function _selectGroups() { - return parent::_selectGroups(); + public function selectGroups() { + return parent::selectGroups(); } public function addGroup($group) { @@ -96,7 +96,7 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { public function test_internals() { $auth = new testable_auth_plugin_authpdo(); - $groups = $auth->_selectGroups(); + $groups = $auth->selectGroups(); $this->assertArrayHasKey('user', $groups); $this->assertEquals(1, $groups['user']['gid']); $this->assertArrayHasKey('admin', $groups); @@ -104,7 +104,7 @@ class sqlite_plugin_authpdo_test extends DokuWikiTest { $ok = $auth->addGroup('test'); $this->assertTrue($ok); - $groups = $auth->_selectGroups(); + $groups = $auth->selectGroups(); $this->assertArrayHasKey('test', $groups); $this->assertEquals(3, $groups['test']['gid']); } diff --git a/lib/plugins/authpdo/auth.php b/lib/plugins/authpdo/auth.php index dfe125473..9c0968e30 100644 --- a/lib/plugins/authpdo/auth.php +++ b/lib/plugins/authpdo/auth.php @@ -6,13 +6,11 @@ * @author Andreas Gohr <andi@splitbrain.org> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - /** * Class auth_plugin_authpdo */ -class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { +class auth_plugin_authpdo extends DokuWiki_Auth_Plugin +{ /** @var PDO */ protected $pdo; @@ -23,17 +21,18 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Constructor. */ - public function __construct() { + public function __construct() + { parent::__construct(); // for compatibility - if(!class_exists('PDO')) { - $this->_debug('PDO extension for PHP not found.', -1, __LINE__); + if (!class_exists('PDO')) { + $this->debugMsg('PDO extension for PHP not found.', -1, __LINE__); $this->success = false; return; } - if(!$this->getConf('dsn')) { - $this->_debug('No DSN specified', -1, __LINE__); + if (!$this->getConf('dsn')) { + $this->debugMsg('No DSN specified', -1, __LINE__); $this->success = false; return; } @@ -49,15 +48,15 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, // we want exceptions, not error codes ) ); - } catch(PDOException $e) { - $this->_debug($e); + } catch (PDOException $e) { + $this->debugMsg($e); msg($this->getLang('connectfail'), -1); $this->success = false; return; } // can Users be created? - $this->cando['addUser'] = $this->_chkcnf( + $this->cando['addUser'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -69,7 +68,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can Users be deleted? - $this->cando['delUser'] = $this->_chkcnf( + $this->cando['delUser'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -80,7 +79,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can login names be changed? - $this->cando['modLogin'] = $this->_chkcnf( + $this->cando['modLogin'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -89,7 +88,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can passwords be changed? - $this->cando['modPass'] = $this->_chkcnf( + $this->cando['modPass'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -98,7 +97,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can real names be changed? - $this->cando['modName'] = $this->_chkcnf( + $this->cando['modName'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -107,7 +106,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can real email be changed? - $this->cando['modMail'] = $this->_chkcnf( + $this->cando['modMail'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -116,7 +115,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can groups be changed? - $this->cando['modGroups'] = $this->_chkcnf( + $this->cando['modGroups'] = $this->checkConfig( array( 'select-user', 'select-user-groups', @@ -128,21 +127,21 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { ); // can a filtered list of users be retrieved? - $this->cando['getUsers'] = $this->_chkcnf( + $this->cando['getUsers'] = $this->checkConfig( array( 'list-users' ) ); // can the number of users be retrieved? - $this->cando['getUserCount'] = $this->_chkcnf( + $this->cando['getUserCount'] = $this->checkConfig( array( 'count-users' ) ); // can a list of available groups be retrieved? - $this->cando['getGroups'] = $this->_chkcnf( + $this->cando['getGroups'] = $this->checkConfig( array( 'select-groups' ) @@ -154,28 +153,29 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Check user+password * - * @param string $user the user name - * @param string $pass the clear text password + * @param string $user the user name + * @param string $pass the clear text password * @return bool */ - public function checkPass($user, $pass) { + public function checkPass($user, $pass) + { - $userdata = $this->_selectUser($user); - if($userdata == false) return false; + $userdata = $this->selectUser($user); + if ($userdata == false) return false; // password checking done in SQL? - if($this->_chkcnf(array('check-pass'))) { + if ($this->checkConfig(array('check-pass'))) { $userdata['clear'] = $pass; $userdata['hash'] = auth_cryptPassword($pass); - $result = $this->_query($this->getConf('check-pass'), $userdata); - if($result === false) return false; + $result = $this->query($this->getConf('check-pass'), $userdata); + if ($result === false) return false; return (count($result) == 1); } // we do password checking on our own - if(isset($userdata['hash'])) { + if (isset($userdata['hash'])) { // hashed password - $passhash = new PassHash(); + $passhash = new \dokuwiki\PassHash(); return $passhash->verify_hash($pass, $userdata['hash']); } else { // clear text password in the database O_o @@ -193,20 +193,21 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * mail string email addres of the user * grps array list of groups the user is in * - * @param string $user the user name - * @param bool $requireGroups whether or not the returned data must include groups + * @param string $user the user name + * @param bool $requireGroups whether or not the returned data must include groups * @return array|bool containing user data or false */ - public function getUserData($user, $requireGroups = true) { - $data = $this->_selectUser($user); - if($data == false) return false; + public function getUserData($user, $requireGroups = true) + { + $data = $this->selectUser($user); + if ($data == false) return false; - if(isset($data['hash'])) unset($data['hash']); - if(isset($data['clean'])) unset($data['clean']); + if (isset($data['hash'])) unset($data['hash']); + if (isset($data['clean'])) unset($data['clean']); - if($requireGroups) { - $data['grps'] = $this->_selectUserGroups($data); - if($data['grps'] === false) return false; + if ($requireGroups) { + $data['grps'] = $this->selectUserGroups($data); + if ($data['grps'] === false) return false; } return $data; @@ -223,23 +224,24 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * * Set addUser capability when implemented * - * @param string $user - * @param string $clear - * @param string $name - * @param string $mail - * @param null|array $grps + * @param string $user + * @param string $clear + * @param string $name + * @param string $mail + * @param null|array $grps * @return bool|null */ - public function createUser($user, $clear, $name, $mail, $grps = null) { + public function createUser($user, $clear, $name, $mail, $grps = null) + { global $conf; - if(($info = $this->getUserData($user, false)) !== false) { + if (($info = $this->getUserData($user, false)) !== false) { msg($this->getLang('userexists'), -1); return false; // user already exists } // prepare data - if($grps == null) $grps = array(); + if ($grps == null) $grps = array(); array_unshift($grps, $conf['defaultgroup']); $grps = array_unique($grps); $hash = auth_cryptPassword($clear); @@ -249,25 +251,25 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { $this->pdo->beginTransaction(); { // insert the user - $ok = $this->_query($this->getConf('insert-user'), $userdata); - if($ok === false) goto FAIL; + $ok = $this->query($this->getConf('insert-user'), $userdata); + if ($ok === false) goto FAIL; $userdata = $this->getUserData($user, false); - if($userdata === false) goto FAIL; + if ($userdata === false) goto FAIL; // create all groups that do not exist, the refetch the groups - $allgroups = $this->_selectGroups(); - foreach($grps as $group) { - if(!isset($allgroups[$group])) { + $allgroups = $this->selectGroups(); + foreach ($grps as $group) { + if (!isset($allgroups[$group])) { $ok = $this->addGroup($group); - if($ok === false) goto FAIL; + if ($ok === false) goto FAIL; } } - $allgroups = $this->_selectGroups(); + $allgroups = $this->selectGroups(); // add user to the groups - foreach($grps as $group) { - $ok = $this->_joinGroup($userdata, $allgroups[$group]); - if($ok === false) goto FAIL; + foreach ($grps as $group) { + $ok = $this->joinGroup($userdata, $allgroups[$group]); + if ($ok === false) goto FAIL; } } $this->pdo->commit(); @@ -276,7 +278,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { // something went wrong, rollback FAIL: $this->pdo->rollBack(); - $this->_debug('Transaction rolled back', 0, __LINE__); + $this->debugMsg('Transaction rolled back', 0, __LINE__); msg($this->getLang('writefail'), -1); return null; // return error } @@ -284,11 +286,12 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Modify user data * - * @param string $user nick of the user to be changed - * @param array $changes array of field/value pairs to be changed (password will be clear text) + * @param string $user nick of the user to be changed + * @param array $changes array of field/value pairs to be changed (password will be clear text) * @return bool */ - public function modifyUser($user, $changes) { + public function modifyUser($user, $changes) + { // secure everything in transaction $this->pdo->beginTransaction(); { @@ -297,64 +300,64 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { unset($olddata['grps']); // changing the user name? - if(isset($changes['user'])) { - if($this->getUserData($changes['user'], false)) goto FAIL; + if (isset($changes['user'])) { + if ($this->getUserData($changes['user'], false)) goto FAIL; $params = $olddata; $params['newlogin'] = $changes['user']; - $ok = $this->_query($this->getConf('update-user-login'), $params); - if($ok === false) goto FAIL; + $ok = $this->query($this->getConf('update-user-login'), $params); + if ($ok === false) goto FAIL; } // changing the password? - if(isset($changes['pass'])) { + if (isset($changes['pass'])) { $params = $olddata; $params['clear'] = $changes['pass']; $params['hash'] = auth_cryptPassword($changes['pass']); - $ok = $this->_query($this->getConf('update-user-pass'), $params); - if($ok === false) goto FAIL; + $ok = $this->query($this->getConf('update-user-pass'), $params); + if ($ok === false) goto FAIL; } // changing info? - if(isset($changes['mail']) || isset($changes['name'])) { + if (isset($changes['mail']) || isset($changes['name'])) { $params = $olddata; - if(isset($changes['mail'])) $params['mail'] = $changes['mail']; - if(isset($changes['name'])) $params['name'] = $changes['name']; + if (isset($changes['mail'])) $params['mail'] = $changes['mail']; + if (isset($changes['name'])) $params['name'] = $changes['name']; - $ok = $this->_query($this->getConf('update-user-info'), $params); - if($ok === false) goto FAIL; + $ok = $this->query($this->getConf('update-user-info'), $params); + if ($ok === false) goto FAIL; } // changing groups? - if(isset($changes['grps'])) { - $allgroups = $this->_selectGroups(); + if (isset($changes['grps'])) { + $allgroups = $this->selectGroups(); // remove membership for previous groups - foreach($oldgroups as $group) { - if(!in_array($group, $changes['grps']) && isset($allgroups[$group])) { - $ok = $this->_leaveGroup($olddata, $allgroups[$group]); - if($ok === false) goto FAIL; + foreach ($oldgroups as $group) { + if (!in_array($group, $changes['grps']) && isset($allgroups[$group])) { + $ok = $this->leaveGroup($olddata, $allgroups[$group]); + if ($ok === false) goto FAIL; } } // create all new groups that are missing $added = 0; - foreach($changes['grps'] as $group) { - if(!isset($allgroups[$group])) { + foreach ($changes['grps'] as $group) { + if (!isset($allgroups[$group])) { $ok = $this->addGroup($group); - if($ok === false) goto FAIL; + if ($ok === false) goto FAIL; $added++; } } // reload group info - if($added > 0) $allgroups = $this->_selectGroups(); + if ($added > 0) $allgroups = $this->selectGroups(); // add membership for new groups - foreach($changes['grps'] as $group) { - if(!in_array($group, $oldgroups)) { - $ok = $this->_joinGroup($olddata, $allgroups[$group]); - if($ok === false) goto FAIL; + foreach ($changes['grps'] as $group) { + if (!in_array($group, $oldgroups)) { + $ok = $this->joinGroup($olddata, $allgroups[$group]); + if ($ok === false) goto FAIL; } } } @@ -366,7 +369,7 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { // something went wrong, rollback FAIL: $this->pdo->rollBack(); - $this->_debug('Transaction rolled back', 0, __LINE__); + $this->debugMsg('Transaction rolled back', 0, __LINE__); msg($this->getLang('writefail'), -1); return false; // return error } @@ -376,13 +379,14 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * * Set delUser capability when implemented * - * @param array $users + * @param array $users * @return int number of users deleted */ - public function deleteUsers($users) { + public function deleteUsers($users) + { $count = 0; - foreach($users as $user) { - if($this->_deleteUser($user)) $count++; + foreach ($users as $user) { + if ($this->deleteUser($user)) $count++; } return $count; } @@ -392,36 +396,41 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * * Set getUsers capability when implemented * - * @param int $start index of first user to be returned - * @param int $limit max number of users to be returned - * @param array $filter array of field/pattern pairs, null for no filter + * @param int $start index of first user to be returned + * @param int $limit max number of users to be returned + * @param array $filter array of field/pattern pairs, null for no filter * @return array list of userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($start = 0, $limit = -1, $filter = null) { - if($limit < 0) $limit = 10000; // we don't support no limit - if(is_null($filter)) $filter = array(); - - if(isset($filter['grps'])) $filter['group'] = $filter['grps']; - foreach(array('user', 'name', 'mail', 'group') as $key) { - if(!isset($filter[$key])) { + public function retrieveUsers($start = 0, $limit = -1, $filter = null) + { + if ($limit < 0) $limit = 10000; // we don't support no limit + if (is_null($filter)) $filter = array(); + + if (isset($filter['grps'])) $filter['group'] = $filter['grps']; + foreach (array('user', 'name', 'mail', 'group') as $key) { + if (!isset($filter[$key])) { $filter[$key] = '%'; } else { $filter[$key] = '%' . $filter[$key] . '%'; } } - $filter['start'] = (int) $start; - $filter['end'] = (int) $start + $limit; - $filter['limit'] = (int) $limit; + $filter['start'] = (int)$start; + $filter['end'] = (int)$start + $limit; + $filter['limit'] = (int)$limit; - $result = $this->_query($this->getConf('list-users'), $filter); - if(!$result) return array(); + $result = $this->query($this->getConf('list-users'), $filter); + if (!$result) return array(); $users = array(); - foreach($result as $row) { - if(!isset($row['user'])) { - $this->_debug("Statement did not return 'user' attribute", -1, __LINE__); - return array(); + if (is_array($result)) { + foreach ($result as $row) { + if (!isset($row['user'])) { + $this->debugMsg("list-users statement did not return 'user' attribute", -1, __LINE__); + return array(); + } + $users[] = $this->getUserData($row['user']); } - $users[] = $this->getUserData($row['user']); + } else { + $this->debugMsg("list-users statement did not return a list of result", -1, __LINE__); } return $users; } @@ -429,26 +438,27 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Return a count of the number of user which meet $filter criteria * - * @param array $filter array of field/pattern pairs, empty array for no filter + * @param array $filter array of field/pattern pairs, empty array for no filter * @return int */ - public function getUserCount($filter = array()) { - if(is_null($filter)) $filter = array(); + public function getUserCount($filter = array()) + { + if (is_null($filter)) $filter = array(); - if(isset($filter['grps'])) $filter['group'] = $filter['grps']; - foreach(array('user', 'name', 'mail', 'group') as $key) { - if(!isset($filter[$key])) { + if (isset($filter['grps'])) $filter['group'] = $filter['grps']; + foreach (array('user', 'name', 'mail', 'group') as $key) { + if (!isset($filter[$key])) { $filter[$key] = '%'; } else { $filter[$key] = '%' . $filter[$key] . '%'; } } - $result = $this->_query($this->getConf('count-users'), $filter); - if(!$result || !isset($result[0]['count'])) { - $this->_debug("Statement did not return 'count' attribute", -1, __LINE__); + $result = $this->query($this->getConf('count-users'), $filter); + if (!$result || !isset($result[0]['count'])) { + $this->debugMsg("Statement did not return 'count' attribute", -1, __LINE__); } - return (int) $result[0]['count']; + return (int)$result[0]['count']; } /** @@ -457,12 +467,13 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param string $group * @return bool */ - public function addGroup($group) { + public function addGroup($group) + { $sql = $this->getConf('insert-group'); - $result = $this->_query($sql, array(':group' => $group)); - $this->_clearGroupCache(); - if($result === false) return false; + $result = $this->query($sql, array(':group' => $group)); + $this->clearGroupCache(); + if ($result === false) return false; return true; } @@ -471,15 +482,16 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * * Set getGroups capability when implemented * - * @param int $start - * @param int $limit + * @param int $start + * @param int $limit * @return array */ - public function retrieveGroups($start = 0, $limit = 0) { - $groups = array_keys($this->_selectGroups()); - if($groups === false) return array(); + public function retrieveGroups($start = 0, $limit = 0) + { + $groups = array_keys($this->selectGroups()); + if ($groups === false) return array(); - if(!$limit) { + if (!$limit) { return array_splice($groups, $start); } else { return array_splice($groups, $start, $limit); @@ -492,38 +504,39 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param string $user the user name * @return bool|array user data, false on error */ - protected function _selectUser($user) { + protected function selectUser($user) + { $sql = $this->getConf('select-user'); - $result = $this->_query($sql, array(':user' => $user)); - if(!$result) return false; + $result = $this->query($sql, array(':user' => $user)); + if (!$result) return false; - if(count($result) > 1) { - $this->_debug('Found more than one matching user', -1, __LINE__); + if (count($result) > 1) { + $this->debugMsg('Found more than one matching user', -1, __LINE__); return false; } $data = array_shift($result); $dataok = true; - if(!isset($data['user'])) { - $this->_debug("Statement did not return 'user' attribute", -1, __LINE__); + if (!isset($data['user'])) { + $this->debugMsg("Statement did not return 'user' attribute", -1, __LINE__); $dataok = false; } - if(!isset($data['hash']) && !isset($data['clear']) && !$this->_chkcnf(array('check-pass'))) { - $this->_debug("Statement did not return 'clear' or 'hash' attribute", -1, __LINE__); + if (!isset($data['hash']) && !isset($data['clear']) && !$this->checkConfig(array('check-pass'))) { + $this->debugMsg("Statement did not return 'clear' or 'hash' attribute", -1, __LINE__); $dataok = false; } - if(!isset($data['name'])) { - $this->_debug("Statement did not return 'name' attribute", -1, __LINE__); + if (!isset($data['name'])) { + $this->debugMsg("Statement did not return 'name' attribute", -1, __LINE__); $dataok = false; } - if(!isset($data['mail'])) { - $this->_debug("Statement did not return 'mail' attribute", -1, __LINE__); + if (!isset($data['mail'])) { + $this->debugMsg("Statement did not return 'mail' attribute", -1, __LINE__); $dataok = false; } - if(!$dataok) return false; + if (!$dataok) return false; return $data; } @@ -533,22 +546,23 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param string $user * @return bool true when the user was deleted */ - protected function _deleteUser($user) { + protected function deleteUser($user) + { $this->pdo->beginTransaction(); { $userdata = $this->getUserData($user); - if($userdata === false) goto FAIL; - $allgroups = $this->_selectGroups(); + if ($userdata === false) goto FAIL; + $allgroups = $this->selectGroups(); // remove group memberships (ignore errors) - foreach($userdata['grps'] as $group) { - if(isset($allgroups[$group])) { - $this->_leaveGroup($userdata, $allgroups[$group]); + foreach ($userdata['grps'] as $group) { + if (isset($allgroups[$group])) { + $this->leaveGroup($userdata, $allgroups[$group]); } } - $ok = $this->_query($this->getConf('delete-user'), $userdata); - if($ok === false) goto FAIL; + $ok = $this->query($this->getConf('delete-user'), $userdata); + if ($ok === false) goto FAIL; } $this->pdo->commit(); return true; @@ -564,19 +578,24 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param array $userdata The userdata as returned by _selectUser() * @return array|bool list of group names, false on error */ - protected function _selectUserGroups($userdata) { + protected function selectUserGroups($userdata) + { global $conf; $sql = $this->getConf('select-user-groups'); - $result = $this->_query($sql, $userdata); - if($result === false) return false; + $result = $this->query($sql, $userdata); + if ($result === false) return false; $groups = array($conf['defaultgroup']); // always add default config - foreach($result as $row) { - if(!isset($row['group'])) { - $this->_debug("No 'group' field returned in select-user-groups statement"); - return false; + if (is_array($result)) { + foreach ($result as $row) { + if (!isset($row['group'])) { + $this->debugMsg("No 'group' field returned in select-user-groups statement", -1, __LINE__); + return false; + } + $groups[] = $row['group']; } - $groups[] = $row['group']; + } else { + $this->debugMsg("select-user-groups statement did not return a list of result", -1, __LINE__); } $groups = array_unique($groups); @@ -589,23 +608,28 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * * @return array|bool list of all available groups and their properties */ - protected function _selectGroups() { - if($this->groupcache) return $this->groupcache; + protected function selectGroups() + { + if ($this->groupcache) return $this->groupcache; $sql = $this->getConf('select-groups'); - $result = $this->_query($sql); - if($result === false) return false; + $result = $this->query($sql); + if ($result === false) return false; $groups = array(); - foreach($result as $row) { - if(!isset($row['group'])) { - $this->_debug("No 'group' field returned from select-groups statement", -1, __LINE__); - return false; - } + if (is_array($result)) { + foreach ($result as $row) { + if (!isset($row['group'])) { + $this->debugMsg("No 'group' field returned from select-groups statement", -1, __LINE__); + return false; + } - // relayout result with group name as key - $group = $row['group']; - $groups[$group] = $row; + // relayout result with group name as key + $group = $row['group']; + $groups[$group] = $row; + } + } else { + $this->debugMsg("select-groups statement did not return a list of result", -1, __LINE__); } ksort($groups); @@ -615,7 +639,8 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Remove all entries from the group cache */ - protected function _clearGroupCache() { + protected function clearGroupCache() + { $this->groupcache = null; } @@ -626,11 +651,12 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param array $groupdata all the group data * @return bool */ - protected function _joinGroup($userdata, $groupdata) { + protected function joinGroup($userdata, $groupdata) + { $data = array_merge($userdata, $groupdata); $sql = $this->getConf('join-group'); - $result = $this->_query($sql, $data); - if($result === false) return false; + $result = $this->query($sql, $data); + if ($result === false) return false; return true; } @@ -641,11 +667,12 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param array $groupdata all the group data * @return bool */ - protected function _leaveGroup($userdata, $groupdata) { + protected function leaveGroup($userdata, $groupdata) + { $data = array_merge($userdata, $groupdata); $sql = $this->getConf('leave-group'); - $result = $this->_query($sql, $data); - if($result === false) return false; + $result = $this->query($sql, $data); + if ($result === false) return false; return true; } @@ -656,25 +683,27 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param array $arguments Named parameters to be used in the statement * @return array|int|bool The result as associative array for SELECTs, affected rows for others, false on error */ - protected function _query($sql, $arguments = array()) { + protected function query($sql, $arguments = array()) + { $sql = trim($sql); - if(empty($sql)) { - $this->_debug('No SQL query given', -1, __LINE__); + if (empty($sql)) { + $this->debugMsg('No SQL query given', -1, __LINE__); return false; } // execute $params = array(); $sth = $this->pdo->prepare($sql); + $result = false; try { // prepare parameters - we only use those that exist in the SQL - foreach($arguments as $key => $value) { - if(is_array($value)) continue; - if(is_object($value)) continue; - if($key[0] != ':') $key = ":$key"; // prefix with colon if needed - if(strpos($sql, $key) === false) continue; // skip if parameter is missing + foreach ($arguments as $key => $value) { + if (is_array($value)) continue; + if (is_object($value)) continue; + if ($key[0] != ':') $key = ":$key"; // prefix with colon if needed + if (strpos($sql, $key) === false) continue; // skip if parameter is missing - if(is_int($value)) { + if (is_int($value)) { $sth->bindValue($key, $value, PDO::PARAM_INT); } else { $sth->bindValue($key, $value); @@ -683,19 +712,32 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { } $sth->execute(); - if(strtolower(substr($sql, 0, 6)) == 'select') { - $result = $sth->fetchAll(); - } else { - $result = $sth->rowCount(); + // only report last line's result + $hasnextrowset = true; + $currentsql = $sql; + while ($hasnextrowset) { + if (strtolower(substr($currentsql, 0, 6)) == 'select') { + $result = $sth->fetchAll(); + } else { + $result = $sth->rowCount(); + } + $semi_pos = strpos($currentsql, ';'); + if ($semi_pos) { + $currentsql = trim(substr($currentsql, $semi_pos + 1)); + } + try { + $hasnextrowset = $sth->nextRowset(); // run next rowset + } catch (PDOException $rowset_e) { + $hasnextrowset = false; // driver does not support multi-rowset, should be executed in one time + } } - } catch(Exception $e) { + } catch (Exception $e) { // report the caller's line $trace = debug_backtrace(); $line = $trace[0]['line']; - $dsql = $this->_debugSQL($sql, $params, !defined('DOKU_UNITTEST')); - $this->_debug($e, -1, $line); - $this->_debug("SQL: <pre>$dsql</pre>", -1, $line); - $result = false; + $dsql = $this->debugSQL($sql, $params, !defined('DOKU_UNITTEST')); + $this->debugMsg($e, -1, $line); + $this->debugMsg("SQL: <pre>$dsql</pre>", -1, $line); } $sth->closeCursor(); $sth = null; @@ -710,17 +752,18 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param int $err * @param int $line */ - protected function _debug($message, $err = 0, $line = 0) { - if(!$this->getConf('debug')) return; - if(is_a($message, 'Exception')) { + protected function debugMsg($message, $err = 0, $line = 0) + { + if (!$this->getConf('debug')) return; + if (is_a($message, 'Exception')) { $err = -1; $msg = $message->getMessage(); - if(!$line) $line = $message->getLine(); + if (!$line) $line = $message->getLine(); } else { $msg = $message; } - if(defined('DOKU_UNITTEST')) { + if (defined('DOKU_UNITTEST')) { printf("\n%s, %s:%d\n", $msg, __FILE__, $line); } else { msg('authpdo: ' . $msg, $err, $line, __FILE__); @@ -730,22 +773,23 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { /** * Check if the given config strings are set * + * @param string[] $keys + * @return bool * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> * - * @param string[] $keys - * @return bool */ - protected function _chkcnf($keys) { - foreach($keys as $key) { + protected function checkConfig($keys) + { + foreach ($keys as $key) { $params = explode(':', $key); $key = array_shift($params); $sql = trim($this->getConf($key)); // check if sql is set - if(!$sql) return false; + if (!$sql) return false; // check if needed params are there - foreach($params as $param) { - if(strpos($sql, ":$param") === false) return false; + foreach ($params as $param) { + if (strpos($sql, ":$param") === false) return false; } } @@ -760,20 +804,21 @@ class auth_plugin_authpdo extends DokuWiki_Auth_Plugin { * @param bool $htmlescape Should the result be escaped for output in HTML? * @return string */ - protected function _debugSQL($sql, $params, $htmlescape = true) { - foreach($params as $key => $val) { - if(is_int($val)) { + protected function debugSQL($sql, $params, $htmlescape = true) + { + foreach ($params as $key => $val) { + if (is_int($val)) { $val = $this->pdo->quote($val, PDO::PARAM_INT); - } elseif(is_bool($val)) { + } elseif (is_bool($val)) { $val = $this->pdo->quote($val, PDO::PARAM_BOOL); - } elseif(is_null($val)) { + } elseif (is_null($val)) { $val = 'NULL'; } else { $val = $this->pdo->quote($val); } $sql = str_replace($key, $val, $sql); } - if($htmlescape) $sql = hsc($sql); + if ($htmlescape) $sql = hsc($sql); return $sql; } } diff --git a/lib/plugins/authpdo/conf/metadata.php b/lib/plugins/authpdo/conf/metadata.php index 7c2ee8cdc..34e60a40e 100644 --- a/lib/plugins/authpdo/conf/metadata.php +++ b/lib/plugins/authpdo/conf/metadata.php @@ -23,5 +23,3 @@ $meta['update-user-pass'] = array('', '_caution' => 'danger'); $meta['insert-group'] = array('', '_caution' => 'danger'); $meta['join-group'] = array('', '_caution' => 'danger'); $meta['leave-group'] = array('', '_caution' => 'danger'); - - diff --git a/lib/plugins/authpdo/lang/bg/lang.php b/lib/plugins/authpdo/lang/bg/lang.php index f6532c453..220fbcd60 100644 --- a/lib/plugins/authpdo/lang/bg/lang.php +++ b/lib/plugins/authpdo/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Kiril <neohidra@gmail.com> */ $lang['connectfail'] = 'Свързването с базата данни се провали.'; diff --git a/lib/plugins/authpdo/lang/ca/lang.php b/lib/plugins/authpdo/lang/ca/lang.php new file mode 100644 index 000000000..d8c6eda05 --- /dev/null +++ b/lib/plugins/authpdo/lang/ca/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> + */ +$lang['connectfail'] = 'Ha fallat la connexió a la base de dades.'; +$lang['userexists'] = 'Ja existeix un usuari amb aquest nom.'; +$lang['writefail'] = 'No es poden modificar les dades de l’usuari. Informeu d’això a l’administrador del wiki'; diff --git a/lib/plugins/authpdo/lang/ca/settings.php b/lib/plugins/authpdo/lang/ca/settings.php new file mode 100644 index 000000000..b599da6f0 --- /dev/null +++ b/lib/plugins/authpdo/lang/ca/settings.php @@ -0,0 +1,8 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> + */ +$lang['dsn'] = 'El DNS per a connectar a la base de dades.'; diff --git a/lib/plugins/authpdo/lang/cs/lang.php b/lib/plugins/authpdo/lang/cs/lang.php index cf52a1890..5cbc85077 100644 --- a/lib/plugins/authpdo/lang/cs/lang.php +++ b/lib/plugins/authpdo/lang/cs/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> */ $lang['connectfail'] = 'Selhalo připojení k databázi.'; diff --git a/lib/plugins/authpdo/lang/cs/settings.php b/lib/plugins/authpdo/lang/cs/settings.php new file mode 100644 index 000000000..08de9539e --- /dev/null +++ b/lib/plugins/authpdo/lang/cs/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Robert Surý <rsurycz@seznam.cz> + */ +$lang['debug'] = 'Vytištění podrobných chybových zpráv. Po dokončení nastavení by mělo být deaktivováno.'; +$lang['dsn'] = 'DSN pro připojení k databázi.'; +$lang['user'] = 'Uživatel pro výše uvedené připojení k databázi (prázdný pro sqlite)'; +$lang['pass'] = 'Heslo pro výše uvedené připojení k databázi (prázdné pro sqlite)'; +$lang['select-user'] = 'Příkaz SQL pro výběr dat jednoho uživatele'; +$lang['select-user-groups'] = 'Příkaz SQL pro výběr všech skupin jednoho uživatele'; +$lang['select-groups'] = 'Příkaz SQL pro výběr všech dostupných skupin'; +$lang['insert-user'] = 'Příkaz SQL pro vložení nového uživatele do databáze'; +$lang['delete-user'] = 'Příkaz SQL pro odebrání jednoho uživatele z databáze'; +$lang['list-users'] = 'Příkaz SQL pro výpis seznamu uživatelů odpovídajících filtru'; +$lang['count-users'] = 'Příkaz SQL pro spočítání uživatelů odpovídajících filtru'; +$lang['update-user-info'] = 'Příkaz SQL pro aktualizaci celého jména a e-mailové adresy jednoho uživatele'; +$lang['update-user-login'] = 'Příkaz SQL pro aktualizaci přihlašovacího jména jednoho uživatele'; +$lang['update-user-pass'] = 'Příkaz SQL pro aktualizaci hesla jednoho uživatele'; +$lang['insert-group'] = 'Příkaz SQL pro vložení nové skupiny do databáze'; +$lang['join-group'] = 'Příkaz SQL pro přidání uživatele do existující skupiny'; +$lang['leave-group'] = 'Příkaz SQL pro odebrání uživatele ze skupiny'; +$lang['check-pass'] = 'Příkaz SQL ke kontrole hesla uživatele. Může zůstat prázdný, pokud jsou informace o heslech vyvolány ve vybraném uživateli.'; diff --git a/lib/plugins/authpdo/lang/da/lang.php b/lib/plugins/authpdo/lang/da/lang.php new file mode 100644 index 000000000..85c64f084 --- /dev/null +++ b/lib/plugins/authpdo/lang/da/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jacob Palm <mail@jacobpalm.dk> + */ +$lang['connectfail'] = 'Kunne ikke forbinde til database.'; +$lang['userexists'] = 'Beklager, en bruger med dette loginnavn findes allerede.'; +$lang['writefail'] = 'Kunne ikke ændre brugerdata. Informer venligst wikiens administrator.'; diff --git a/lib/plugins/authpdo/lang/da/settings.php b/lib/plugins/authpdo/lang/da/settings.php new file mode 100644 index 000000000..80b6e2e93 --- /dev/null +++ b/lib/plugins/authpdo/lang/da/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jacob Palm <mail@jacobpalm.dk> + */ +$lang['debug'] = 'Vis detaljerede fejlmeddelelser. Bør deaktiveres efter opsætning.'; +$lang['dsn'] = 'DSN der benyttes til at forbinde til databasen.'; +$lang['user'] = 'Brugerkonto til ovenstående databaseforbindelse (blank ved sqlite)'; +$lang['pass'] = 'Adgangskode til ovenstående databaseforbindelse (blank ved sqlite)'; +$lang['select-user'] = 'SQL statement til at selektere data for en enkelt bruger'; +$lang['select-user-groups'] = 'SQL statement til at selektere alle grupper en enkelt bruger er medlem af'; +$lang['select-groups'] = 'SQL statement til at selektere alle tilgængelige grupper'; +$lang['insert-user'] = 'SQL statement til at indsætte en ny bruger i databasen'; +$lang['delete-user'] = 'SQL statement til at fjerne en bruger fra databasen'; +$lang['list-users'] = 'SQL statement til at selektere brugere ud fra et filter'; +$lang['count-users'] = 'SQL statement til at tælle brugere der matcher et filter'; +$lang['update-user-info'] = 'SQL statement til at opdatere fulde navn og e-mail adresse på en enkelt bruger'; +$lang['update-user-login'] = 'SQL statement til at opdatere loginnavn på en enkelt bruger'; +$lang['update-user-pass'] = 'SQL statement til at opdatere adgangskode på en enkelt bruger'; +$lang['insert-group'] = 'SQL statement til at indsætte en ny gruppe i databasen'; +$lang['join-group'] = 'SQL statement til at tilføje en bruger til en eksisterende gruppe'; +$lang['leave-group'] = 'SQL statement til at fjerne en bruger fra en gruppe'; +$lang['check-pass'] = 'SQL statement til at kontrollere adgangskode for en bruger. Kan efterlades blank hvis adgangskode information hentes når brugeren selekteres.'; diff --git a/lib/plugins/authpdo/lang/de-informal/lang.php b/lib/plugins/authpdo/lang/de-informal/lang.php new file mode 100644 index 000000000..a3d97473a --- /dev/null +++ b/lib/plugins/authpdo/lang/de-informal/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Martin <martin@andev.de> + */ +$lang['connectfail'] = 'Verbindung zur Datenbank fehlgeschlagen.'; +$lang['userexists'] = 'Der Benutzername existiert leider schon.'; +$lang['writefail'] = 'Die Benutzerdaten konnten nicht geändert werden. Bitte wenden Sie sich an den Wiki-Admin.'; diff --git a/lib/plugins/authpdo/lang/de/lang.php b/lib/plugins/authpdo/lang/de/lang.php index 7ae13dd17..3fe2a440b 100644 --- a/lib/plugins/authpdo/lang/de/lang.php +++ b/lib/plugins/authpdo/lang/de/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Noel Tilliot <noeltilliot@byom.de> * @author Hendrik Diel <diel.hendrik@gmail.com> * @author Philip Knack <p.knack@stollfuss.de> diff --git a/lib/plugins/authpdo/lang/de/settings.php b/lib/plugins/authpdo/lang/de/settings.php new file mode 100644 index 000000000..d661d5c01 --- /dev/null +++ b/lib/plugins/authpdo/lang/de/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jürgen Fredriksson <jfriedrich@gmx.at> + */ +$lang['debug'] = 'Zeige detaillierte Fehlermeldungen. Diese sollten nach dem Setup deaktiviert werden.'; +$lang['dsn'] = 'Der DSN(Data Source Name) zur Verbindung mit der Datenbank'; +$lang['user'] = 'Der Benutzer für die obige Datenbankverbindung (leer lassen für SQLite)'; +$lang['pass'] = 'Das Passwort für die obige Datenbankverbindung (leer lassen für SQLite)'; +$lang['select-user'] = 'SQL Anweisung um einen Benutzer abzufragen'; +$lang['select-user-groups'] = 'SQL Anweisung um alle Gruppen eines Benutzers abzufragen'; +$lang['select-groups'] = 'SQL Anweisung um alle verfügbaren Gruppen auszuwählen'; +$lang['insert-user'] = 'SQL Anweisung um einen neuen Benutzer in der Datenbank abzulegen'; +$lang['delete-user'] = 'SQL Anweisung um einen Benutzer aus der Datenbank zu entfernen'; +$lang['list-users'] = 'SQL Anweisung um eine Liste gefilterter Benutzer anzuzeigen'; +$lang['count-users'] = 'SQL Anweisung, welche die Anzahl der gefilterten Benutzer wiedergibt'; +$lang['update-user-info'] = 'SQL Anweisung um den vollen Namen sowie dessen E-Mail Adresse zu aktualisieren'; +$lang['update-user-login'] = 'SQL Anweisung um den Login-Namen eines Benutzers zu aktualisieren'; +$lang['update-user-pass'] = 'SQL Anweisung um das Passwort eines Benutzers zu aktualisieren'; +$lang['insert-group'] = 'SQL Anweisung um eine neue Gruppe in der Datenbank anzulegen'; +$lang['join-group'] = 'SQL Anweisung um einen Benutzer zu einer existierenden Gruppe hinzuzufügen'; +$lang['leave-group'] = 'SQL Anweisung um einen Benutzer aus einer Gruppe zu entfernen'; +$lang['check-pass'] = 'SQL Anweisung um das Passwort eines Benutzers zu überprüfen. Es kann leer gelassen werden wenn die Information über die Benutzerabfrage erhoben wurde.'; diff --git a/lib/plugins/authpdo/lang/el/lang.php b/lib/plugins/authpdo/lang/el/lang.php new file mode 100644 index 000000000..fe944cf44 --- /dev/null +++ b/lib/plugins/authpdo/lang/el/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Aikaterini Katapodi <extragold1234@hotmail.com> + */ +$lang['connectfail'] = 'Δεν μπόρεσε να κάνει σύνδεση με την βάση δεδομένων'; +$lang['userexists'] = 'Συγγνώμη υπάρχει ήδη χρήστης με αυτά τα στοιχεία'; +$lang['writefail'] = 'Δεν μπορέσαμε τα τροποποιήσουμε τα στοιχεία χρήστη. Παρακαλώ ενημερώστε το Wiki-Admin'; diff --git a/lib/plugins/authpdo/lang/el/settings.php b/lib/plugins/authpdo/lang/el/settings.php new file mode 100644 index 000000000..531fefeb2 --- /dev/null +++ b/lib/plugins/authpdo/lang/el/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Aikaterini Katapodi <extragold1234@hotmail.com> + */ +$lang['debug'] = 'Εκτύπωση μηνυμάτων σφαλμάτων λεπτομερώς. Αυτή η ρύθμιση πρέπει μετά να απενεργοποιηθεί.'; +$lang['dsn'] = 'Να συνδεθεί το DSN με τη βάση δεδομένων'; +$lang['user'] = 'Ο συνδεδεμένος χρήστης με την άνω βάση δεδομένων'; +$lang['pass'] = 'Ο κωδικός πρόσβασης της άνω βάσης δεδομένων'; +$lang['select-user'] = 'SQL Αντίγραφο επιλογής δεδομένων ενός απλού χρήστη'; +$lang['select-user-groups'] = 'SQL Αντίγραφο to select all groups of a single user '; +$lang['select-groups'] = 'SQL Αντίγραφο για επιλογή όλων των διαθέσιμων ομάδων '; +$lang['insert-user'] = 'Δηλωτικό SQL για να εισάγει έναν νέο χρήστη στη βάση δεδομένων'; +$lang['delete-user'] = 'Δηλωτικό SQL για αφαίρεση χρήστη από την βάση δεδομένων'; +$lang['list-users'] = 'Δηλωτικό SQL για να ταξινομήσει τους χρήστες με προσαρμογή φίλτρου'; +$lang['count-users'] = 'Δηλωτικό SQL για να μετρήσει τον αριθμό των χρηστών με τη χρήση ενός φίλτρου'; +$lang['update-user-info'] = 'Δηλωτικό SQL για ενημέρωση του ονόματος και της διεύθυνσης email ενός χρήστη'; +$lang['update-user-login'] = 'Δηλωτικό SQL για ενημέρωση του ονόματος σύνδεσης ενός απλού χρήστη '; +$lang['update-user-pass'] = 'Δηλωτικό SQL για ενημέρωση του κωδικού πρόσβασης ενός χρήστη'; +$lang['insert-group'] = 'Δηλωτικό SQL για να εισάγει νέα ομάδα στην βάση δεδομένων'; +$lang['join-group'] = 'Δηλωτικό SQL για πρόσθεση χρήστη σε μια υπάρχουσα ομάδα'; +$lang['leave-group'] = 'Δηλωτικό SQL για αφαίρεση χρήστη από μια ομάδα'; +$lang['check-pass'] = 'Δηλωτικό SQL για να ελέγξει τον κωδικό πρόσβασης για έναν χρήστη. Μπορεί να μείνει κενό αν εισαχθεί κωδικός χρήστη στην ομάδα επιλογής χρήστη.'; diff --git a/lib/plugins/authpdo/lang/es/lang.php b/lib/plugins/authpdo/lang/es/lang.php index 9bd9211e9..c382ebf70 100644 --- a/lib/plugins/authpdo/lang/es/lang.php +++ b/lib/plugins/authpdo/lang/es/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Domingo Redal <docxml@gmail.com> */ $lang['connectfail'] = 'Error al conectar con la base de datos.'; diff --git a/lib/plugins/authpdo/lang/es/settings.php b/lib/plugins/authpdo/lang/es/settings.php new file mode 100644 index 000000000..f866fe1cf --- /dev/null +++ b/lib/plugins/authpdo/lang/es/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author WIRESLINKEA <wireslinkea@gmail.com> + */ +$lang['debug'] = 'Imprime mensajes de error detallados. Debería ser deshabilitado después de la instalación.'; +$lang['dsn'] = 'El DSN para conectarse a la base de datos.'; +$lang['user'] = 'El usuario de la conexión de base de datos anterior (vacía para sqlite)'; +$lang['pass'] = 'La contraseña para la conexión de base de datos anterior (vacía para sqlite)'; +$lang['select-user'] = 'Declaración SQL para seleccionar los datos de un solo usuario'; +$lang['select-user-groups'] = 'Declaración SQL para seleccionar todos los grupos de un solo usuario'; +$lang['select-groups'] = 'Declaración SQL para seleccionar todos los grupos disponibles'; +$lang['insert-user'] = 'Declaración SQL para insertar un nuevo usuario en la base de datos'; +$lang['delete-user'] = 'Declaración SQL para eliminar un único usuario de la base de datos'; +$lang['list-users'] = 'Declaración SQL para mostrar los usuarios que coinciden con un filtro'; +$lang['count-users'] = 'Declaración SQL para contar usuarios que coinciden con un filtro'; +$lang['update-user-info'] = 'Declaración SQL para actualizar el nombre completo y la dirección de correo electrónico de un único usuario'; +$lang['update-user-login'] = 'Declaración SQL para actualizar el nombre de usuario de un solo usuario'; +$lang['update-user-pass'] = 'Declaración SQL para actualizar la contraseña de un solo usuario'; +$lang['insert-group'] = 'Declaración SQL para insertar un nuevo grupo en la base de datos'; +$lang['join-group'] = 'Declaración SQL para agregar un usuario a un grupo existente '; +$lang['leave-group'] = 'Declaración SQL para eliminar un usuario de un grupo'; +$lang['check-pass'] = 'Declaración SQL para verificar la contraseña de un usuario. Puede dejarse vacío si se busca información de contraseña en el usuario de selección.'; diff --git a/lib/plugins/authpdo/lang/fa/lang.php b/lib/plugins/authpdo/lang/fa/lang.php index b26e83698..7f06df888 100644 --- a/lib/plugins/authpdo/lang/fa/lang.php +++ b/lib/plugins/authpdo/lang/fa/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Mohmmad Razavi <sepent@gmail.com> * @author Masoud Sadrnezhaad <masoud@sadrnezhaad.ir> */ diff --git a/lib/plugins/authpdo/lang/fa/settings.php b/lib/plugins/authpdo/lang/fa/settings.php new file mode 100644 index 000000000..201687c00 --- /dev/null +++ b/lib/plugins/authpdo/lang/fa/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Masoud Sadrnezhaad <masoud@sadrnezhaad.ir> + */ +$lang['debug'] = 'جزئیات پیامهای خطا را نمایش بده. باید بعد از تنظیم غیرفعال شود.'; +$lang['dsn'] = 'دیاسان برای اتصال به پایگاه داده'; +$lang['user'] = 'کاربر برای اتصال پایگاه دادهٔ بالا (برای sqlite خالی)'; +$lang['pass'] = 'کلمهٔ عبور برای اتصال پایگاه دادهٔ بالا (برای sqlite خالی)'; +$lang['select-user'] = 'دستور SQL برای انتخاب دادهای از یک کاربر'; +$lang['select-user-groups'] = 'دستور SQL برای انتخاب همهٔ گروههای یک کاربر'; +$lang['select-groups'] = 'دستور SQL برای انتخاب گروههای موجود'; +$lang['insert-user'] = 'دستور SQL برای افزودن یک کاربر جدید به پایگاه داده'; +$lang['delete-user'] = 'دستور SQL برای ححذف یک کاربر از پایگاه داده'; +$lang['list-users'] = 'دستور SQL برای فهرست کردن کاربران دارای ویژگی مشخص'; +$lang['count-users'] = 'دستور SQL برای شمارش کاربران دارای ویژگی مشخص'; +$lang['update-user-info'] = 'دستور SQL برای بهروزرسانی نام کامل و ایمیل یک کاربر'; +$lang['update-user-login'] = 'دستور SQL برای بهروزرسانی نام ورود به سیستم برای یک کاربر'; +$lang['update-user-pass'] = 'دستور SQL برای بهروزرسانی کلمهٔ عبور برای یک کاربر'; +$lang['insert-group'] = 'دستور SQL برای افزودن گروه جدید به پایگاه داده'; +$lang['join-group'] = 'دستور SQL برای افزودن یک کاربر به یک گروه موجود'; +$lang['leave-group'] = 'دستور SQL برای حذف یک کاربر از یک گروه'; +$lang['check-pass'] = 'دستور SQL برای چک کردن کلمهٔ عبور یک کاربر. اگر اطلاعات کلمهٔ عبور در دریافت کاربر گرفته شده میتواند خالی بماند.'; diff --git a/lib/plugins/authpdo/lang/fr/lang.php b/lib/plugins/authpdo/lang/fr/lang.php index ee87b0d52..5473aa71c 100644 --- a/lib/plugins/authpdo/lang/fr/lang.php +++ b/lib/plugins/authpdo/lang/fr/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Pietroni <pietroni@informatique.univ-paris-diderot.fr> */ $lang['connectfail'] = 'Impossible de se connecter à la base de données.'; diff --git a/lib/plugins/authpdo/lang/fr/settings.php b/lib/plugins/authpdo/lang/fr/settings.php new file mode 100644 index 000000000..5c2704a2c --- /dev/null +++ b/lib/plugins/authpdo/lang/fr/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Schplurtz le Déboulonné <schplurtz@laposte.net> + */ +$lang['debug'] = 'Afficher des messages d\'erreur détaillés. Devrait être désactivé passé la configuration.'; +$lang['dsn'] = 'Le DSN de connexion à la base de données.'; +$lang['user'] = 'L\'utilisateur pour la connexion à la base de donnée ci-dessus (vide pour sqlite)'; +$lang['pass'] = 'Le mot de passe pour la connexion à la base de donnée ci-dessus (vide pour sqlite)'; +$lang['select-user'] = 'Instruction SQL pour sélectionner les données d\'un seul utilisateur'; +$lang['select-user-groups'] = 'Instruction SQL pour sélectionner tous les groupes d\'un utilisateur donné'; +$lang['select-groups'] = 'Instruction SQL pour sélectionner tous les groupes disponibles'; +$lang['insert-user'] = 'Instruction SQL pour insérer un nouvel utilisateur dans la base de données'; +$lang['delete-user'] = 'Instruction SQL pour retirer un utilisateur de la base de données'; +$lang['list-users'] = 'Instruction SQL pour lister les utilisateurs correspondant à un filtre'; +$lang['count-users'] = 'Instruction SQL pour compter les utilisateurs correspondant à un filtre'; +$lang['update-user-info'] = 'Instruction SQL pour mettre à jour le nom complet et l\'adresse de courriel d\'un utilisateur donné'; +$lang['update-user-login'] = 'Instruction SQL pour mettre à jour l\'identifiant d\'un utilisateur donné'; +$lang['update-user-pass'] = 'Instruction SQL pour mettre à jour le mot de passe d\'un utilisateur donné'; +$lang['insert-group'] = 'Instruction SQL pour mettre insérer un nouveau groupe dans la base de données'; +$lang['join-group'] = 'Instruction SQL pour ajouter un utilisateur à un groupe existant'; +$lang['leave-group'] = 'Instruction SQL pour retirer un utilisateur d\'un groupe'; +$lang['check-pass'] = 'Instruction SQL pour vérifier le mot de passe d\'un utilisateur. Peut être laissé vide si l\'information de mot de passe est obtenue lors de la sélection d\'un utilisateur.'; diff --git a/lib/plugins/authpdo/lang/it/lang.php b/lib/plugins/authpdo/lang/it/lang.php index 5c0a3f146..56b4a014b 100644 --- a/lib/plugins/authpdo/lang/it/lang.php +++ b/lib/plugins/authpdo/lang/it/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Torpedo <dgtorpedo@gmail.com> */ $lang['connectfail'] = 'Connessione fallita al database.'; diff --git a/lib/plugins/authpdo/lang/it/settings.php b/lib/plugins/authpdo/lang/it/settings.php new file mode 100644 index 000000000..d539c4abd --- /dev/null +++ b/lib/plugins/authpdo/lang/it/settings.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Eddy <eddy@mail.it> + * @author Riccardo <riccardo.furlato@gmail.com> + */ +$lang['debug'] = 'Stampa messaggi di errore dettagliati. Dovrebbe essere disabilitato dopo l\'installazione.'; +$lang['dsn'] = 'Il DSN per connettersi al database.'; +$lang['user'] = 'L\'utente per la connessione al database sopra (vuoto per sqlite)'; +$lang['pass'] = 'La password per la connessione al database sopra (vuoto per sqlite)'; +$lang['select-user'] = 'Istruzione SQL per selezionare i dati di un singolo utente'; +$lang['select-user-groups'] = 'Istruzione SQL per selezionare tutti i gruppi di un singolo utente'; +$lang['select-groups'] = 'Istruzione SQL per selezionare tutti i gruppi disponibili'; +$lang['insert-user'] = 'Istruzione SQL per inserire un nuovo utente nel database'; +$lang['delete-user'] = 'Istruzione SQL per rimuovere un singolo utente dal database'; +$lang['list-users'] = 'Istruzione SQL per elencare gli utenti che corrispondono a un filtro'; +$lang['count-users'] = 'Istruzione SQL per contare gli utenti che corrispondono a un filtro'; +$lang['update-user-info'] = 'Istruzione SQL per aggiornare nome completo ed indirizzo email di un singolo utente'; +$lang['update-user-login'] = 'Istruzione SQL per aggiornare il nome di login di un singolo utente'; +$lang['update-user-pass'] = 'Istruzione SQL per aggiornare la password di un singolo utente'; +$lang['insert-group'] = 'Istruzione SQL per inserire un nuovo gruppo nel database'; +$lang['join-group'] = 'Istruzione SQL per aggiungere un utente ad un gruppo esistente'; +$lang['leave-group'] = 'Istruzione SQL per rimuovere un utente da un gruppo'; +$lang['check-pass'] = 'Istruzione SQL per cercare la password di un utente. Può essere omessa se l\'informazioni sulla password è recuperate dalla selezione utente.'; diff --git a/lib/plugins/authpdo/lang/ja/lang.php b/lib/plugins/authpdo/lang/ja/lang.php index 1cd441b60..8893f2d8a 100644 --- a/lib/plugins/authpdo/lang/ja/lang.php +++ b/lib/plugins/authpdo/lang/ja/lang.php @@ -2,9 +2,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> * @author Hideaki SAWADA <chuno@live.jp> */ $lang['connectfail'] = 'データベースへの接続に失敗しました。'; -$lang['userexists'] = 'このログイン名のユーザーが既に存在しています。'; +$lang['userexists'] = '恐れ入りますが、このログイン名のユーザーが既に存在しています。'; $lang['writefail'] = 'ユーザーデータを変更できません。Wiki の管理者に連絡してください。'; diff --git a/lib/plugins/authpdo/lang/ja/settings.php b/lib/plugins/authpdo/lang/ja/settings.php new file mode 100644 index 000000000..b90db26f6 --- /dev/null +++ b/lib/plugins/authpdo/lang/ja/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> + */ +$lang['debug'] = '詳細なエラーメッセージを出力する(セットアップ後、このオプションはオフにすべきです)'; +$lang['dsn'] = 'データベースにアクセスするDSN'; +$lang['user'] = '上記データベースに接続するユーザー名(sqliteの場合は空欄にしておいて下さい)'; +$lang['pass'] = '上記データベースに接続するパスワード(sqliteの場合は空欄にしておいて下さい)'; +$lang['select-user'] = '個々のユーザーのデータを選ぶSQL命令文'; +$lang['select-user-groups'] = '個々のユーザーが属する全てのグループを選ぶSQL命令文'; +$lang['select-groups'] = '利用可能な全グループを選ぶSQL命令文'; +$lang['insert-user'] = 'データベースに新規ユーザーを追加するSQL命令文'; +$lang['delete-user'] = '個々のユーザーをデータベースから取り除くSQL命令文'; +$lang['list-users'] = 'フィルターに一致するユーザーを一覧にするSQL命令文'; +$lang['count-users'] = 'フィルターに一致するユーザーを数えるSQL命令文'; +$lang['update-user-info'] = '個々のユーザーのフルネームとメールアドレスを更新するSQL命令文'; +$lang['update-user-login'] = '個々のユーザーのログイン名を更新するSQL命令文'; +$lang['update-user-pass'] = '個々のユーザーのパスワードを更新するSQL命令文'; +$lang['insert-group'] = 'データベースに新規グループを追加するSQL命令文'; +$lang['join-group'] = '既にあるグループにユーザーを追加するSQL命令文'; +$lang['leave-group'] = 'グループからユーザーを取り除くSQL命令文'; +$lang['check-pass'] = 'ユーザーのパスワードをチェックするSQL命令文(select-userでパスワード情報を呼び出す場合は空欄にしておけます)'; diff --git a/lib/plugins/authpdo/lang/ko/lang.php b/lib/plugins/authpdo/lang/ko/lang.php index 0b14197b4..4a8a4d42e 100644 --- a/lib/plugins/authpdo/lang/ko/lang.php +++ b/lib/plugins/authpdo/lang/ko/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author hyeonsoft <hyeonsoft@live.co.kr> * @author Myeongjin <aranet100@gmail.com> */ diff --git a/lib/plugins/authpdo/lang/ko/settings.php b/lib/plugins/authpdo/lang/ko/settings.php new file mode 100644 index 000000000..e2361d581 --- /dev/null +++ b/lib/plugins/authpdo/lang/ko/settings.php @@ -0,0 +1,29 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author pavement <pavement@rael.cc> + * @author Traend <Traend@ruu.kr> + */ +$lang['debug'] = '자세한 오류 메시지를 출력합니다. 설정 후 비활성화해야 합니다.'; +$lang['dsn'] = '데이터베이스에 연결할 DSN'; +$lang['user'] = '위의 데이터베이스 연결에 대한 사용자(sqlite의 경우 비어 있음)'; +$lang['pass'] = '위의 데이터베이스 연결에 대한 암호(sqlite의 경우 비어 있음)'; +$lang['select-user'] = '단일 사용자의 데이터를 선택하기 위한 SQL 문 +'; +$lang['select-user-groups'] = '단일 사용자의 모든 그룹을 선택하기 위한 SQL 문'; +$lang['select-groups'] = '사용 가능한 모든 그룹을 선택하기 위한 SQL 문 +'; +$lang['insert-user'] = '데이터베이스에 새 사용자를 삽입하는 SQL 문 +'; +$lang['delete-user'] = '데이터베이스에서 단일 사용자를 제거하기 위한 SQL 문'; +$lang['list-users'] = '필터와 일치하는 사용자를 나열하는 SQL 문'; +$lang['count-users'] = '필터와 일치하는 사용자를 계산하는 SQL 문'; +$lang['update-user-info'] = '단일 사용자의 전체 이름과 이메일 주소를 업데이트하는 SQL 문'; +$lang['update-user-login'] = '단일 사용자의 로그인 이름을 업데이트하는 SQL 문'; +$lang['update-user-pass'] = '단일 사용자의 암호를 업데이트하는 SQL 문'; +$lang['insert-group'] = '데이터베이스에 새 그룹을 삽입하는 SQL 문'; +$lang['join-group'] = '기존 그룹에 사용자를 추가하는 SQL 문'; +$lang['leave-group'] = '그룹에서 사용자를 제거하는 SQL 문'; +$lang['check-pass'] = '사용자의 암호를 확인하는 SQL 문입니다. 선택 사용자에서 암호 정보를 가져오는 경우 비워 둘 수 있습니다.'; diff --git a/lib/plugins/authpdo/lang/nl/lang.php b/lib/plugins/authpdo/lang/nl/lang.php index b426f6ba5..c0c688da0 100644 --- a/lib/plugins/authpdo/lang/nl/lang.php +++ b/lib/plugins/authpdo/lang/nl/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Hugo Smet <hugo.smet@scarlet.be> */ $lang['connectfail'] = 'Connectie met de database mislukt.'; diff --git a/lib/plugins/authpdo/lang/nl/settings.php b/lib/plugins/authpdo/lang/nl/settings.php new file mode 100644 index 000000000..4929e9178 --- /dev/null +++ b/lib/plugins/authpdo/lang/nl/settings.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Gerrit Uitslag <klapinklapin@gmail.com> + * @author Andy <astolker@icloud.com> + */ +$lang['debug'] = 'Geef gedetailleerde foutmeldingen weer. Dit zou uitgeschakeld moeten zijn na de installatie.'; +$lang['dsn'] = 'De DSN om verbinding te maken met de database.'; +$lang['user'] = 'De gebruikersnaam voor de bovengenoemde database verbinding (laat leeg voor sqlite)'; +$lang['pass'] = 'Het wachtwoord voor de bovengenoemde database verbinding (laat leeg voor sqlite)'; +$lang['select-user'] = 'SQL Statement om de data te selecteren van één gebruiker'; +$lang['select-user-groups'] = 'SQL Statement om alle groepen van één gebruiker te selecteren'; +$lang['select-groups'] = 'SQL Statement om alle beschikbare groepen te selecteren'; +$lang['insert-user'] = 'SQL Statement om een nieuwe gebruiker in de database in te voeren'; +$lang['delete-user'] = 'SQL Statement om één gebruiker uit de database te verwijderen'; +$lang['list-users'] = 'SQL-instructie om gebruikers weer te geven die overeenkomen met een filter'; +$lang['count-users'] = 'SQL-instructie om gebruikers te tellen die overeenkomen met een filter'; +$lang['update-user-info'] = 'SQL-instructie om de volledige naam en e-mailadres van een enkele gebruiker bij te werken'; +$lang['update-user-login'] = 'SQL-instructie om de inlognaam van een enkele gebruiker bij te werken'; +$lang['update-user-pass'] = 'SQL-instructie om het wachtwoord van een enkele gebruiker bij te werken'; +$lang['insert-group'] = 'SQL-instructie om een nieuwe groep aan de database toe te voegen'; +$lang['join-group'] = 'SQL-instructie om een gebruiker aan een bestaande groep toe te voegen'; +$lang['leave-group'] = 'SQL-instructie om een gebruiker uit een groep te verwijderen'; +$lang['check-pass'] = 'SQL-instructie om het wachtwoord van een gebruiker te controleren. Kan leeg gelaten worden als de wachtwoordinformatie wordt opgehaald in select-user'; diff --git a/lib/plugins/authpdo/lang/pl/lang.php b/lib/plugins/authpdo/lang/pl/lang.php new file mode 100644 index 000000000..fd813f1f9 --- /dev/null +++ b/lib/plugins/authpdo/lang/pl/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Przemek <p_kudriawcew@o2.pl> + */ +$lang['connectfail'] = 'Błąd łącznie się z bazą danych'; +$lang['userexists'] = 'Przepraszamy, użytkownik o tym loginie już istnieje'; +$lang['writefail'] = 'Nie można zmodyfikować danych użytkownika. Proszę skontaktować się z Administratorem'; diff --git a/lib/plugins/authpdo/lang/pl/settings.php b/lib/plugins/authpdo/lang/pl/settings.php new file mode 100644 index 000000000..93f328abb --- /dev/null +++ b/lib/plugins/authpdo/lang/pl/settings.php @@ -0,0 +1,17 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Bartek S <sadupl@gmail.com> + * @author Przemek <p_kudriawcew@o2.pl> + */ +$lang['debug'] = 'Wyświetlanie szczegółowej wiadomości o błędzie. Powinno być wyłączone po '; +$lang['dsn'] = 'Nazwa źródła danych do łączenia się z bazą danych'; +$lang['select-user'] = 'Zapytanie SQL, aby wybrać dane jednego użytkownika'; +$lang['select-user-groups'] = 'Zapytanie SQL aby wybrać wszystkie grupy jednego użytkownika'; +$lang['update-user-pass'] = 'Zapytanie SQL do zaktualizowania hasła dla pojedynczego użytkownika'; +$lang['insert-group'] = 'Zapytanie SQL aby dodać nową grupę do bazy danych'; +$lang['join-group'] = 'Zapytanie SQL aby dodać użytkownika do istniejącej grupy'; +$lang['leave-group'] = 'Zapytanie SQL aby usunąć użytkownika z grupy'; +$lang['check-pass'] = 'Zapytanie SQL aby sprawdzić hasło użytkownika. Można pozostawić puste, jeśli informacje o haśle są pobierane w select-user.'; diff --git a/lib/plugins/authpdo/lang/pt-br/lang.php b/lib/plugins/authpdo/lang/pt-br/lang.php index 2008ae609..8f440860b 100644 --- a/lib/plugins/authpdo/lang/pt-br/lang.php +++ b/lib/plugins/authpdo/lang/pt-br/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Frederico Gonçalves Guimarães <frederico@teia.bio.br> */ $lang['connectfail'] = 'Não foi possível conectar ao banco de dados.'; diff --git a/lib/plugins/authpdo/lang/pt-br/settings.php b/lib/plugins/authpdo/lang/pt-br/settings.php new file mode 100644 index 000000000..b1d285bad --- /dev/null +++ b/lib/plugins/authpdo/lang/pt-br/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Frederico Gonçalves Guimarães <frederico@teia.bio.br> + */ +$lang['debug'] = 'Exibir mensagens de erro detalhadas. Deve ser desabilitado após a configuração.'; +$lang['dsn'] = 'O DSN para conectar ao banco de dados.'; +$lang['user'] = 'O usuário para a conexão ao banco de dados acima (em branco para sqlite)'; +$lang['pass'] = 'A senha para a conexão ao banco de dados acima (em branco para sqlite)'; +$lang['select-user'] = 'Declaração SQL para selecionar os dados de um único usuário'; +$lang['select-user-groups'] = 'Declaração SQL para selecionar todos os grupos de um único usuário'; +$lang['select-groups'] = 'Declaração SQL para selecionar todos os grupos disponíveis'; +$lang['insert-user'] = 'Declaração SQL para inserir um novo usuário no banco de dados'; +$lang['delete-user'] = 'Declaração SQL para remover um único usuário do banco de dados'; +$lang['list-users'] = 'Declaração SQL para listar usuários correspondentes a um filtro'; +$lang['count-users'] = 'Declaração SQL para contar usuários correspondentes a um filtro'; +$lang['update-user-info'] = 'Declaração SQL para atualizar o nome completo e endereço de e-mail de um único usuário'; +$lang['update-user-login'] = 'Declaração SQL para atualizar o nome de usuário de e-mail de um único usuário'; +$lang['update-user-pass'] = 'Declaração SQL para atualizar a senha de um único usuário'; +$lang['insert-group'] = 'Declaração SQL para inserir um novo grupo no banco de dados'; +$lang['join-group'] = 'Declaração SQL para adicionar um usuário a um grupo existente'; +$lang['leave-group'] = 'Declaração SQL para remover um usuário de um grupo'; +$lang['check-pass'] = 'Declaração SQL para verificar a senha de um usuário. Pode ser deixada em branco se a informação da senha for obtida a partir do usuário selecionado.'; diff --git a/lib/plugins/authpdo/lang/pt/lang.php b/lib/plugins/authpdo/lang/pt/lang.php index f2eca8f59..3e7ed620b 100644 --- a/lib/plugins/authpdo/lang/pt/lang.php +++ b/lib/plugins/authpdo/lang/pt/lang.php @@ -2,8 +2,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Paulo Schopf <pschopf@gmail.com> + * @author Maykon Oliveira <maykonoliveira850@gmail.com> * @author Paulo Carmino <contato@paulocarmino.com> */ -$lang['connectfail'] = 'Falha ao conectar com o banco de dados.'; +$lang['connectfail'] = 'Erro ao conectar o banco de dados.'; $lang['userexists'] = 'Desculpe, esse login já está sendo usado.'; +$lang['writefail'] = 'Não é possível modificar os dados do usuário. Por favor, informe o Wiki-Admin'; diff --git a/lib/plugins/authpdo/lang/pt/settings.php b/lib/plugins/authpdo/lang/pt/settings.php new file mode 100644 index 000000000..45d259b61 --- /dev/null +++ b/lib/plugins/authpdo/lang/pt/settings.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Paulo Ricardo Schopf <pschopf@gmail.com> + * @author Maykon Oliveira <maykonoliveira850@gmail.com> + */ +$lang['debug'] = 'Imprima mensagens de erro detalhadas. Deve ser desativado após a configuração.'; +$lang['dsn'] = 'O DSN para se conectar ao banco de dados.'; +$lang['user'] = 'O usuário para a conexão de banco de dados acima (vazio para sqlite)'; +$lang['pass'] = 'A senha para a conexão de banco de dados acima (vazia para sqlite)'; +$lang['select-user'] = 'Instrução SQL para selecionar os dados de um único usuário'; +$lang['select-user-groups'] = 'Instrução SQL para selecionar todos os grupos de um único usuário'; +$lang['select-groups'] = 'Instrução SQL para selecionar todos os grupos disponíveis'; +$lang['insert-user'] = 'Instrução SQL para inserir um novo usuário no banco de dados'; +$lang['delete-user'] = 'Instrução SQL para remover um usuário do banco de dados'; +$lang['list-users'] = 'Instrução SQL para listar usuários que correspondam a um filtro'; +$lang['count-users'] = 'Instrução SQL para contar usuários que correspondam a um filtro'; +$lang['update-user-info'] = 'Instrução SQL para atualizar o nome completo e e-mail de um usuário'; +$lang['update-user-login'] = 'Instrução SQL para atualizar o nome de login de um usuário'; +$lang['update-user-pass'] = 'Instrução SQL para atualizar a senha de um usuário'; +$lang['insert-group'] = 'Instrução SQL para inserir um novo grupo no banco de dados'; +$lang['join-group'] = 'Instrução SQL para adicionar um usuário a um grupo existente'; +$lang['leave-group'] = 'Instrução SQL para remover um usuário de um grupo'; +$lang['check-pass'] = 'Instrução SQL para verificar a senha de um usuário. Pode ser deixado em branco se a informação da senha for buscada no usuário selecionado.'; diff --git a/lib/plugins/authpdo/lang/ru/lang.php b/lib/plugins/authpdo/lang/ru/lang.php index 9f75d1726..9dc832651 100644 --- a/lib/plugins/authpdo/lang/ru/lang.php +++ b/lib/plugins/authpdo/lang/ru/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Takumo <9206984@mail.ru> * @author Aleksandr Selivanov <alexgearbox@yandex.ru> */ diff --git a/lib/plugins/authpdo/lang/ru/settings.php b/lib/plugins/authpdo/lang/ru/settings.php new file mode 100644 index 000000000..144763a0b --- /dev/null +++ b/lib/plugins/authpdo/lang/ru/settings.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + * @author Vyacheslav Strenadko <vyacheslav.strenadko@gmail.com> + */ +$lang['debug'] = 'Выводить подробные сообщения об ошибках. Должно быть отключено после настройки.'; +$lang['dsn'] = 'DSN (имя источника данных) для подключения к базе данных'; +$lang['user'] = 'Имя пользователя для подключения к базе данных (пустое для SQLite)'; +$lang['pass'] = 'Пароль для подключения к базе данных (пустой для SQLite)'; +$lang['select-user'] = 'SQL-выражение для выбора данных одного пользователя'; +$lang['select-user-groups'] = 'SQL-выражение для выбора всех групп одного пользователя'; +$lang['select-groups'] = 'SQL-выражение для выбора всех доступных групп'; +$lang['insert-user'] = 'SQL-выражение для добавления нового пользователя в базу данных'; +$lang['delete-user'] = 'SQL-выражение для удаления одного пользователя из базы данных'; +$lang['list-users'] = 'SQL-выражение для перечисления пользователей, соответствующих фильтру'; +$lang['count-users'] = 'SQL-выражение для подсчёта пользователей, соответствующих фильтру'; +$lang['update-user-info'] = 'SQL-выражение для обновления полного имени и адреса эл. почты одного пользователя'; +$lang['update-user-login'] = 'SQL-выражение для обновления логина одного пользователя'; +$lang['update-user-pass'] = 'SQL-выражение для обновления пароля одного пользователя'; +$lang['insert-group'] = 'SQL-выражение для добавления новой группы в базу данных'; +$lang['join-group'] = 'SQL-выражение для добавления пользователя в существующую группу'; +$lang['leave-group'] = 'SQL-выражение для удаления пользователя из группы'; +$lang['check-pass'] = 'SQL-выражение для проверки пароля пользователя. Может быть пустым, если информация о пароле выбрана пользователем. (Can be left empty if password info is fetched in select-user.)'; diff --git a/lib/plugins/authpdo/lang/sk/lang.php b/lib/plugins/authpdo/lang/sk/lang.php index d143bbf2c..9f7038157 100644 --- a/lib/plugins/authpdo/lang/sk/lang.php +++ b/lib/plugins/authpdo/lang/sk/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Martin Michalek <michalek.dev@gmail.com> */ $lang['connectfail'] = 'Nepodarilo sa pripojiť k databáze.'; diff --git a/lib/plugins/authpdo/lang/sk/settings.php b/lib/plugins/authpdo/lang/sk/settings.php new file mode 100644 index 000000000..0fdbfa4e3 --- /dev/null +++ b/lib/plugins/authpdo/lang/sk/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Martin Michalek <michalek.dev@gmail.com> + */ +$lang['debug'] = 'Výpis podrobných chybových hlásení. Po nastavení by sa malo vypnúť.'; +$lang['dsn'] = 'DSN pre pripojenie k databáze.'; +$lang['user'] = 'Používateľ uvedeného databázového pripojenia (prázdne pre sqllite)'; +$lang['pass'] = 'Heslo uvedeného databázového pripojenia (prázdne pre sqllite)'; +$lang['select-user'] = 'SQL príkaz pre výber údajov používateľa'; +$lang['select-user-groups'] = 'SQL príkaz pre výber všetkých skupín používateľa'; +$lang['select-groups'] = 'SQL príkaz pre výber dostupných skupín'; +$lang['insert-user'] = 'SQL príkaz pre vloženie údajov používateľa do databázy'; +$lang['delete-user'] = 'SQL príkaz pre odstránenie používateľa z databázy'; +$lang['list-users'] = 'SQL príkaz pre výpis používateľov podľa filtra'; +$lang['count-users'] = 'SQL príkaz pre spočítanie používateľov podľa filtra'; +$lang['update-user-info'] = 'SQL príkaz pre aktualizáciu mena a emailu používateľa'; +$lang['update-user-login'] = 'SQL príkaz pre aktualizáciu prihlasovacieho mena používateľa'; +$lang['update-user-pass'] = 'SQL príkaz pre aktualizáciu hesla používateľa'; +$lang['insert-group'] = 'SQL príkaz pre vloženie údajov skupiny do databázy'; +$lang['join-group'] = 'SQL príkaz pre pridanie používateľa do existujúcej skupiny'; +$lang['leave-group'] = 'SQL príkaz pre odstránenie používateľa zo skupiny'; +$lang['check-pass'] = 'SQL príkaz pre kontrolu hesla používateľa. Môže zostať prázdny, ak je informácia o hesle pripojená k výberu údajov používateľa.'; diff --git a/lib/plugins/authpdo/lang/tr/lang.php b/lib/plugins/authpdo/lang/tr/lang.php index 30576c074..6e907165e 100644 --- a/lib/plugins/authpdo/lang/tr/lang.php +++ b/lib/plugins/authpdo/lang/tr/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Mete Cuma <mcumax@gmail.com> */ $lang['connectfail'] = 'Veritabanına bağlantı kurulamadı.'; diff --git a/lib/plugins/authpdo/lang/uk/lang.php b/lib/plugins/authpdo/lang/uk/lang.php new file mode 100644 index 000000000..e5b9d65a3 --- /dev/null +++ b/lib/plugins/authpdo/lang/uk/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Dmytro Marchenko <dmytro.marchenko1989@gmail.com> + */ +$lang['connectfail'] = 'Не вдалося підключитися до бази даних.'; +$lang['userexists'] = 'На жаль, користувач із цим логіном вже існує.'; +$lang['writefail'] = 'Неможливо змінити дані користувача. Будь-ласка, повідомте про це Wiki-Адміністратора'; diff --git a/lib/plugins/authpdo/lang/uk/settings.php b/lib/plugins/authpdo/lang/uk/settings.php new file mode 100644 index 000000000..94abd897a --- /dev/null +++ b/lib/plugins/authpdo/lang/uk/settings.php @@ -0,0 +1,15 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Dmytro Marchenko <dmytro.marchenko1989@gmail.com> + */ +$lang['dsn'] = 'DSN для підключення до бази даних.'; +$lang['user'] = 'Користувач для вищевказаного з\'єднання з базою даних (порожній для sqlite)'; +$lang['pass'] = 'Пароль для вищезазначеного з\'єднання з базою даних (порожній для sqlite)'; +$lang['select-user'] = 'Запит SQL для вибору даних одного користувача'; +$lang['select-user-groups'] = 'Запит SQL для вибору всіх груп одного користувача'; +$lang['select-groups'] = 'Запит SQL для вибору всіх доступних груп'; +$lang['insert-user'] = 'Запит SQL для вставки нового користувача в базу даних'; +$lang['delete-user'] = 'Запит SQL для видалення одного користувача з бази даних'; diff --git a/lib/plugins/authpdo/lang/vi/lang.php b/lib/plugins/authpdo/lang/vi/lang.php new file mode 100644 index 000000000..42de9865a --- /dev/null +++ b/lib/plugins/authpdo/lang/vi/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['connectfail'] = 'Không thể kết nối với cơ sở dữ liệu.'; +$lang['userexists'] = 'Xin lỗi, thành viên có thông tin đăng nhập này đã tồn tại.'; +$lang['writefail'] = 'Không thể sửa đổi dữ liệu thành viên. Vui lòng thông báo cho Admin-Wiki'; diff --git a/lib/plugins/authpdo/lang/vi/settings.php b/lib/plugins/authpdo/lang/vi/settings.php new file mode 100644 index 000000000..dfc367ac6 --- /dev/null +++ b/lib/plugins/authpdo/lang/vi/settings.php @@ -0,0 +1,25 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['debug'] = 'In ra các thông báo lỗi chi tiết. Nên bị vô hiệu hóa sau khi thiết lập.'; +$lang['dsn'] = 'DSN để kết nối với cơ sở dữ liệu.'; +$lang['user'] = 'Thành viên cho kết nối cơ sở dữ liệu trên (trống cho sqlite)'; +$lang['pass'] = 'Mật khẩu cho kết nối cơ sở dữ liệu trên (trống cho sqlite)'; +$lang['select-user'] = 'Câu lệnh SQL để chọn dữ liệu của một thành viên'; +$lang['select-user-groups'] = 'Câu lệnh SQL để chọn tất cả các nhóm của một thành viên'; +$lang['select-groups'] = 'Câu lệnh SQL để chọn tất cả các nhóm có sẵn'; +$lang['insert-user'] = 'Câu lệnh SQL để chèn thành viên mới vào cơ sở dữ liệu'; +$lang['delete-user'] = 'Câu lệnh SQL để xóa một thành viên khỏi cơ sở dữ liệu'; +$lang['list-users'] = 'Câu lệnh SQL để liệt kê thành viên khớp với bộ lọc'; +$lang['count-users'] = 'Câu lệnh SQL để đếm thành viên khớp với bộ lọc'; +$lang['update-user-info'] = 'Câu lệnh SQL để cập nhật tên đầy đủ và địa chỉ thư điện thử của một thành viên'; +$lang['update-user-login'] = 'Câu lệnh SQL để cập nhật tên đăng nhập của một thành viên'; +$lang['update-user-pass'] = 'Câu lệnh SQL để cập nhật mật khẩu của một thành viên'; +$lang['insert-group'] = 'Câu lệnh SQL để chèn một nhóm mới vào cơ sở dữ liệu'; +$lang['join-group'] = 'Câu lệnh SQL để thêm thành viên vào một nhóm hiện có'; +$lang['leave-group'] = 'Câu lệnh SQL để xóa thành viên khỏi một nhóm'; +$lang['check-pass'] = 'Câu lệnh SQL để kiểm tra mật khẩu của thành viên. Có thể để trống nếu thông tin mật khẩu được tìm nạp trong thành viên chọn.'; diff --git a/lib/plugins/authpdo/lang/zh/lang.php b/lib/plugins/authpdo/lang/zh/lang.php index 06c258f9b..be66754a6 100644 --- a/lib/plugins/authpdo/lang/zh/lang.php +++ b/lib/plugins/authpdo/lang/zh/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Errol <errol@hotmail.com> */ $lang['connectfail'] = '连接数据库失败'; diff --git a/lib/plugins/authpdo/lang/zh/settings.php b/lib/plugins/authpdo/lang/zh/settings.php new file mode 100644 index 000000000..9374b75d9 --- /dev/null +++ b/lib/plugins/authpdo/lang/zh/settings.php @@ -0,0 +1,26 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Phy <dokuwiki@phy25.com> + * @author Aaron Zhou <iradio@163.com> + */ +$lang['debug'] = '打印详细的错误信息。应该在设定完成后禁用。'; +$lang['dsn'] = '连接到数据库的DSN'; +$lang['user'] = '以上数据库连接的用户名(sqlite 留空)'; +$lang['pass'] = '以上数据库连接的密码 (sqlite 留空)'; +$lang['select-user'] = '选择单一用户数据的SQL语句'; +$lang['select-user-groups'] = '选择单一用户所有用户组的SQL语句'; +$lang['select-groups'] = '选择所有有效组的SQL语句'; +$lang['insert-user'] = '向数据库插入一个新用户的SQL语句'; +$lang['delete-user'] = '从数据库中移除单个用户的SQL语句'; +$lang['list-users'] = '列出与筛选条件匹配用户的SQL语句'; +$lang['count-users'] = '统计与筛选条件匹配的用户数量的SQL语句'; +$lang['update-user-info'] = '更新单一用户全名和email地址的SQL语句'; +$lang['update-user-login'] = '更新单一用户登录名的SQL语句'; +$lang['update-user-pass'] = '更新单一用户密码的SQL语句'; +$lang['insert-group'] = '向数据库中插入一个新组的SQL语句'; +$lang['join-group'] = '把用户增加到现有用户组的 SQL 语句'; +$lang['leave-group'] = '把用户移除出现有用户组的 SQL 语句'; +$lang['check-pass'] = '查询用户密码的 SQL 语句(如密码在 select-user 查询时已经获取,则本设置可留空)'; diff --git a/lib/plugins/authpgsql/auth.php b/lib/plugins/authpgsql/auth.php deleted file mode 100644 index 7b677d3d7..000000000 --- a/lib/plugins/authpgsql/auth.php +++ /dev/null @@ -1,431 +0,0 @@ -<?php -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -/** - * PostgreSQL authentication backend - * - * This class inherits much functionality from the MySQL class - * and just reimplements the Postgres specific parts. - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Andreas Gohr <andi@splitbrain.org> - * @author Chris Smith <chris@jalakai.co.uk> - * @author Matthias Grimm <matthias.grimmm@sourceforge.net> - * @author Jan Schumann <js@schumann-it.com> - */ -class auth_plugin_authpgsql extends auth_plugin_authmysql { - - /** - * Constructor - * - * checks if the pgsql interface is available, otherwise it will - * set the variable $success of the basis class to false - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * @author Andreas Gohr <andi@splitbrain.org> - */ - public function __construct() { - // we don't want the stuff the MySQL constructor does, but the grandparent might do something - DokuWiki_Auth_Plugin::__construct(); - - if(!function_exists('pg_connect')) { - $this->_debug("PgSQL err: PHP Postgres extension not found.", -1, __LINE__, __FILE__); - $this->success = false; - return; - } - - $this->loadConfig(); - - // set capabilities based upon config strings set - if(empty($this->conf['user']) || - empty($this->conf['password']) || empty($this->conf['database']) - ) { - $this->_debug("PgSQL err: insufficient configuration.", -1, __LINE__, __FILE__); - $this->success = false; - return; - } - - $this->cando['addUser'] = $this->_chkcnf( - array( - 'getUserInfo', - 'getGroups', - 'addUser', - 'getUserID', - 'getGroupID', - 'addGroup', - 'addUserGroup' - ) - ); - $this->cando['delUser'] = $this->_chkcnf( - array( - 'getUserID', - 'delUser', - 'delUserRefs' - ) - ); - $this->cando['modLogin'] = $this->_chkcnf( - array( - 'getUserID', - 'updateUser', - 'UpdateTarget' - ) - ); - $this->cando['modPass'] = $this->cando['modLogin']; - $this->cando['modName'] = $this->cando['modLogin']; - $this->cando['modMail'] = $this->cando['modLogin']; - $this->cando['modGroups'] = $this->_chkcnf( - array( - 'getUserID', - 'getGroups', - 'getGroupID', - 'addGroup', - 'addUserGroup', - 'delGroup', - 'getGroupID', - 'delUserGroup' - ) - ); - /* getGroups is not yet supported - $this->cando['getGroups'] = $this->_chkcnf(array('getGroups', - 'getGroupID')); */ - $this->cando['getUsers'] = $this->_chkcnf( - array( - 'getUsers', - 'getUserInfo', - 'getGroups' - ) - ); - $this->cando['getUserCount'] = $this->_chkcnf(array('getUsers')); - } - - /** - * Check if the given config strings are set - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string[] $keys - * @param bool $wop - * @return bool - */ - protected function _chkcnf($keys, $wop = false) { - foreach($keys as $key) { - if(empty($this->conf[$key])) return false; - } - return true; - } - - /** - * Counts users which meet certain $filter criteria. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param array $filter filter criteria in item/pattern pairs - * @return int count of found users. - */ - public function getUserCount($filter = array()) { - $rc = 0; - - if($this->_openDB()) { - $sql = $this->_createSQLFilter($this->conf['getUsers'], $filter); - - // no equivalent of SQL_CALC_FOUND_ROWS in pgsql? - if(($result = $this->_queryDB($sql))) { - $rc = count($result); - } - $this->_closeDB(); - } - return $rc; - } - - /** - * Bulk retrieval of user data - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param int $first index of first user to be returned - * @param int $limit max number of users to be returned - * @param array $filter array of field/pattern pairs - * @return array userinfo (refer getUserData for internal userinfo details) - */ - public function retrieveUsers($first = 0, $limit = 0, $filter = array()) { - $out = array(); - - if($this->_openDB()) { - $this->_lockTables("READ"); - $sql = $this->_createSQLFilter($this->conf['getUsers'], $filter); - $sql .= " ".$this->conf['SortOrder']; - if($limit) $sql .= " LIMIT $limit"; - if($first) $sql .= " OFFSET $first"; - $result = $this->_queryDB($sql); - - foreach($result as $user) { - if(($info = $this->_getUserInfo($user['user']))) { - $out[$user['user']] = $info; - } - } - - $this->_unlockTables(); - $this->_closeDB(); - } - return $out; - } - - // @inherit function joinGroup($user, $group) - // @inherit function leaveGroup($user, $group) { - - /** - * Adds a user to a group. - * - * If $force is set to true non existing groups would be created. - * - * The database connection must already be established. Otherwise - * this function does nothing and returns 'false'. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param string $user user to add to a group - * @param string $group name of the group - * @param bool $force create missing groups - * @return bool true on success, false on error - */ - protected function _addUserToGroup($user, $group, $force = false) { - $newgroup = 0; - - if(($this->dbcon) && ($user)) { - $gid = $this->_getGroupID($group); - if(!$gid) { - if($force) { // create missing groups - $sql = str_replace('%{group}', addslashes($group), $this->conf['addGroup']); - $this->_modifyDB($sql); - //group should now exists try again to fetch it - $gid = $this->_getGroupID($group); - $newgroup = 1; // group newly created - } - } - if(!$gid) return false; // group didn't exist and can't be created - - $sql = $this->conf['addUserGroup']; - if(strpos($sql, '%{uid}') !== false) { - $uid = $this->_getUserID($user); - $sql = str_replace('%{uid}', addslashes($uid), $sql); - } - $sql = str_replace('%{user}', addslashes($user), $sql); - $sql = str_replace('%{gid}', addslashes($gid), $sql); - $sql = str_replace('%{group}', addslashes($group), $sql); - if($this->_modifyDB($sql) !== false) { - $this->_flushUserInfoCache($user); - return true; - } - - if($newgroup) { // remove previously created group on error - $sql = str_replace('%{gid}', addslashes($gid), $this->conf['delGroup']); - $sql = str_replace('%{group}', addslashes($group), $sql); - $this->_modifyDB($sql); - } - } - return false; - } - - // @inherit function _delUserFromGroup($user $group) - // @inherit function _getGroups($user) - // @inherit function _getUserID($user) - - /** - * Adds a new User to the database. - * - * The database connection must already be established - * for this function to work. Otherwise it will return - * 'false'. - * - * @param string $user login of the user - * @param string $pwd encrypted password - * @param string $name full name of the user - * @param string $mail email address - * @param array $grps array of groups the user should become member of - * @return bool - * - * @author Andreas Gohr <andi@splitbrain.org> - * @author Chris Smith <chris@jalakai.co.uk> - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - */ - protected function _addUser($user, $pwd, $name, $mail, $grps) { - if($this->dbcon && is_array($grps)) { - $sql = str_replace('%{user}', addslashes($user), $this->conf['addUser']); - $sql = str_replace('%{pass}', addslashes($pwd), $sql); - $sql = str_replace('%{name}', addslashes($name), $sql); - $sql = str_replace('%{email}', addslashes($mail), $sql); - if($this->_modifyDB($sql)) { - $uid = $this->_getUserID($user); - } else { - return false; - } - - $group = ''; - $gid = false; - - if($uid) { - foreach($grps as $group) { - $gid = $this->_addUserToGroup($user, $group, true); - if($gid === false) break; - } - - if($gid !== false){ - $this->_flushUserInfoCache($user); - return true; - } else { - /* remove the new user and all group relations if a group can't - * be assigned. Newly created groups will remain in the database - * and won't be removed. This might create orphaned groups but - * is not a big issue so we ignore this problem here. - */ - $this->_delUser($user); - $this->_debug("PgSQL err: Adding user '$user' to group '$group' failed.", -1, __LINE__, __FILE__); - } - } - } - return false; - } - - /** - * Opens a connection to a database and saves the handle for further - * usage in the object. The successful call to this functions is - * essential for most functions in this object. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @return bool - */ - protected function _openDB() { - if(!$this->dbcon) { - $dsn = $this->conf['server'] ? 'host='.$this->conf['server'] : ''; - $dsn .= ' port='.$this->conf['port']; - $dsn .= ' dbname='.$this->conf['database']; - $dsn .= ' user='.$this->conf['user']; - $dsn .= ' password='.conf_decodeString($this->conf['password']); - - $con = @pg_connect($dsn); - if($con) { - $this->dbcon = $con; - return true; // connection and database successfully opened - } else { - $this->_debug( - "PgSQL err: Connection to {$this->conf['user']}@{$this->conf['server']} not possible.", - -1, __LINE__, __FILE__ - ); - } - return false; // connection failed - } - return true; // connection already open - } - - /** - * Closes a database connection. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - */ - protected function _closeDB() { - if($this->dbcon) { - pg_close($this->dbcon); - $this->dbcon = 0; - } - } - - /** - * Sends a SQL query to the database and transforms the result into - * an associative array. - * - * This function is only able to handle queries that returns a - * table such as SELECT. - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $query SQL string that contains the query - * @return array|false the result table - */ - protected function _queryDB($query) { - $resultarray = array(); - if($this->dbcon) { - $result = @pg_query($this->dbcon, $query); - if($result) { - while(($t = pg_fetch_assoc($result)) !== false) - $resultarray[] = $t; - pg_free_result($result); - return $resultarray; - } else{ - $this->_debug('PgSQL err: '.pg_last_error($this->dbcon), -1, __LINE__, __FILE__); - } - } - return false; - } - - /** - * Executes an update or insert query. This differs from the - * MySQL one because it does NOT return the last insertID - * - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param string $query - * @return bool - */ - protected function _modifyDB($query) { - if($this->dbcon) { - $result = @pg_query($this->dbcon, $query); - if($result) { - pg_free_result($result); - return true; - } - $this->_debug('PgSQL err: '.pg_last_error($this->dbcon), -1, __LINE__, __FILE__); - } - return false; - } - - /** - * Start a transaction - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @param string $mode could be 'READ' or 'WRITE' - * @return bool - */ - protected function _lockTables($mode) { - if($this->dbcon) { - $this->_modifyDB('BEGIN'); - return true; - } - return false; - } - - /** - * Commit a transaction - * - * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net> - * - * @return bool - */ - protected function _unlockTables() { - if($this->dbcon) { - $this->_modifyDB('COMMIT'); - return true; - } - return false; - } - - /** - * Escape a string for insertion into the database - * - * @author Andreas Gohr <andi@splitbrain.org> - * - * @param string $string The string to escape - * @param bool $like Escape wildcard chars as well? - * @return string - */ - protected function _escape($string, $like = false) { - $string = pg_escape_string($string); - if($like) { - $string = addcslashes($string, '%_'); - } - return $string; - } -} diff --git a/lib/plugins/authpgsql/conf/default.php b/lib/plugins/authpgsql/conf/default.php deleted file mode 100644 index 7f78280f9..000000000 --- a/lib/plugins/authpgsql/conf/default.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -$conf['server'] = ''; -$conf['port'] = 5432; -$conf['user'] = ''; -$conf['password'] = ''; -$conf['database'] = ''; -$conf['debug'] = 0; -$conf['forwardClearPass'] = 0; -$conf['checkPass'] = ''; -$conf['getUserInfo'] = ''; -$conf['getGroups'] = ''; -$conf['getUsers'] = ''; -$conf['FilterLogin'] = ''; -$conf['FilterName'] = ''; -$conf['FilterEmail'] = ''; -$conf['FilterGroup'] = ''; -$conf['SortOrder'] = ''; -$conf['addUser'] = ''; -$conf['addGroup'] = ''; -$conf['addUserGroup'] = ''; -$conf['delGroup'] = ''; -$conf['getUserID'] = ''; -$conf['delUser'] = ''; -$conf['delUserRefs'] = ''; -$conf['updateUser'] = ''; -$conf['UpdateLogin'] = ''; -$conf['UpdatePass'] = ''; -$conf['UpdateEmail'] = ''; -$conf['UpdateName'] = ''; -$conf['UpdateTarget'] = ''; -$conf['delUserGroup'] = ''; -$conf['getGroupID'] = '';
\ No newline at end of file diff --git a/lib/plugins/authpgsql/conf/metadata.php b/lib/plugins/authpgsql/conf/metadata.php deleted file mode 100644 index cb9c45643..000000000 --- a/lib/plugins/authpgsql/conf/metadata.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -$meta['server'] = array('string','_caution' => 'danger'); -$meta['port'] = array('numeric','_caution' => 'danger'); -$meta['user'] = array('string','_caution' => 'danger'); -$meta['password'] = array('password','_caution' => 'danger','_code'=>'base64'); -$meta['database'] = array('string','_caution' => 'danger'); -$meta['debug'] = array('onoff','_caution' => 'security'); -$meta['forwardClearPass'] = array('onoff','_caution' => 'danger'); -$meta['checkPass'] = array('','_caution' => 'danger'); -$meta['getUserInfo'] = array('','_caution' => 'danger'); -$meta['getGroups'] = array(''); -$meta['getUsers'] = array('','_caution' => 'danger'); -$meta['FilterLogin'] = array('string','_caution' => 'danger'); -$meta['FilterName'] = array('string','_caution' => 'danger'); -$meta['FilterEmail'] = array('string','_caution' => 'danger'); -$meta['FilterGroup'] = array('string','_caution' => 'danger'); -$meta['SortOrder'] = array('string','_caution' => 'danger'); -$meta['addUser'] = array('','_caution' => 'danger'); -$meta['addGroup'] = array('','_caution' => 'danger'); -$meta['addUserGroup'] = array('','_caution' => 'danger'); -$meta['delGroup'] = array('','_caution' => 'danger'); -$meta['getUserID'] = array('','_caution' => 'danger'); -$meta['delUser'] = array('','_caution' => 'danger'); -$meta['delUserRefs'] = array('','_caution' => 'danger'); -$meta['updateUser'] = array('string','_caution' => 'danger'); -$meta['UpdateLogin'] = array('string','_caution' => 'danger'); -$meta['UpdatePass'] = array('string','_caution' => 'danger'); -$meta['UpdateEmail'] = array('string','_caution' => 'danger'); -$meta['UpdateName'] = array('string','_caution' => 'danger'); -$meta['UpdateTarget'] = array('string','_caution' => 'danger'); -$meta['delUserGroup'] = array('','_caution' => 'danger'); -$meta['getGroupID'] = array('','_caution' => 'danger'); diff --git a/lib/plugins/authpgsql/lang/bg/settings.php b/lib/plugins/authpgsql/lang/bg/settings.php deleted file mode 100644 index bd6ae1cee..000000000 --- a/lib/plugins/authpgsql/lang/bg/settings.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Kiril <neohidra@gmail.com> - */ -$lang['server'] = 'Вашият PostgreSQL сървър'; -$lang['port'] = 'Порт за PostgreSQL сървъра'; -$lang['user'] = 'PostgreSQL потребител'; -$lang['password'] = 'Парола за горния потребител'; -$lang['database'] = 'Име на базата от данни'; -$lang['debug'] = 'Показване на допълнителна debug информация'; diff --git a/lib/plugins/authpgsql/lang/cs/settings.php b/lib/plugins/authpgsql/lang/cs/settings.php deleted file mode 100644 index af8b837ca..000000000 --- a/lib/plugins/authpgsql/lang/cs/settings.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author mkucera66 <mkucera66@seznam.cz> - * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> - */ -$lang['server'] = 'Váš server PostgreSQL'; -$lang['port'] = 'Port vašeho serveru PostgreSQL'; -$lang['user'] = 'Uživatelské jméno pro PostgreSQL'; -$lang['password'] = 'Heslo tohoto uživatele'; -$lang['database'] = 'Použtá databáze'; -$lang['debug'] = 'Zobrazit dodatečné debugovací informace'; -$lang['forwardClearPass'] = 'Posílat uživatelské heslo jako čistý text do příkazů SQL namísto využití volby passcrypt.'; -$lang['checkPass'] = 'Příkaz SQL pro kontrolu hesel'; -$lang['getUserInfo'] = 'Příkaz SQL pro získání informací o uživateli'; -$lang['getGroups'] = 'Příkaz SQL pro získání členství uživatele ve skupinách'; -$lang['getUsers'] = 'Příkaz SQL pro seznam všech uživatelů'; -$lang['FilterLogin'] = 'Příkaz SQL pro filtrování uživatelů podle přihlašovacího jména'; -$lang['FilterName'] = 'Příkaz SQL pro filtrování uživatelů podle celého jména'; -$lang['FilterEmail'] = 'Příkaz SQL pro filtrování uživatelů podle adres e-mailů'; -$lang['FilterGroup'] = 'Příkaz SQL pro filtrování uživatelů podle členství ve skupinách'; -$lang['SortOrder'] = 'Příkaz SQL pro řazení uživatelů'; -$lang['addUser'] = 'Příkaz SQL pro řazení uživatelů'; -$lang['addGroup'] = 'Příkaz SQL pro přidání nové skupiny'; -$lang['addUserGroup'] = 'Příkaz SQL pro přidání uživatele do existující skupiny'; -$lang['delGroup'] = 'Příkaz SQL pro vymazání skupiny'; -$lang['getUserID'] = 'Příkaz SQL pro získání primárního klíče uživatele'; -$lang['delUser'] = 'Příkaz SQL pro vymazání uživatele'; -$lang['delUserRefs'] = 'Příkaz SQL pro odstranění členství uživatele se všech skupin'; -$lang['updateUser'] = 'Příkaz SQL pro aktualizaci uživatelského profilu'; -$lang['UpdateLogin'] = 'Klauzule pro aktualizaci přihlačovacího jména uživatele'; -$lang['UpdatePass'] = 'Klauzule pro aktualizaci hesla uživatele'; -$lang['UpdateEmail'] = 'Klauzule pro aktualizaci e-mailové adresy uživatele'; -$lang['UpdateName'] = 'Klauzule pro aktualizaci celého jména uživatele'; -$lang['UpdateTarget'] = 'Omezující klauzule pro identifikaci uživatele při aktualizaci'; -$lang['delUserGroup'] = 'Příkaz SQL pro zrušení členství uživatele v dané skupině'; -$lang['getGroupID'] = 'Příkaz SQL pro získání primárního klíče skupiny'; diff --git a/lib/plugins/authpgsql/lang/cy/settings.php b/lib/plugins/authpgsql/lang/cy/settings.php deleted file mode 100644 index 0c32ad7b2..000000000 --- a/lib/plugins/authpgsql/lang/cy/settings.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -$lang['server'] = 'Eich gweinydd PostgreSQL'; -$lang['port'] = 'Porth eich gweinydd PostgreSQL'; -$lang['user'] = 'Defnyddair PostgreSQL'; -$lang['password'] = 'Cyfrinair y defnyddiwr uchod'; -$lang['database'] = 'Databas i\'w ddefnyddio'; -$lang['debug'] = 'angos gwybodaeth dadfygio ychwanegol'; -$lang['forwardClearPass'] = 'Pasio cyfrineiriau defnyddwyr fel \'cleartext\' i\'r datganiadau SQL isod, yn hytrach na defnyddio\'r opsiwn \'passcrypt\''; -$lang['checkPass'] = 'Datganiad SQL i wirio cyfrineiriau'; -$lang['getUserInfo'] = 'Datganiad SQL i nôl gwybodaeth defnyddiwr'; -$lang['getGroups'] = 'Datganiad SQL i nôl aelodaeth grŵp y defnyddiwr'; -$lang['getUsers'] = 'Datganiad SQL i restru pob defnyddiwr'; -$lang['FilterLogin'] = 'Cymal SQL i hidlo defnyddwyr gan enw mewngofnodi'; -$lang['FilterName'] = 'Cymal SQL i hidlo defnyddwyr gan enw llawn'; -$lang['FilterEmail'] = 'Cymal SQL i hidlo defnyddwyr gan gyfeiriad ebost'; -$lang['FilterGroup'] = 'Cymal SQL i hidlo defnyddwyr gan aelodaeth grŵp'; -$lang['SortOrder'] = 'Cymal SQL i drefnu defnyddwyr'; -$lang['addUser'] = 'Datganiad SQL i ychwanegu defnyddiwr newydd'; -$lang['addGroup'] = 'Datganiad SQL i ychwanegu grŵp newydd'; -$lang['addUserGroup'] = 'Datganiad SQL i ychwanegu defnyddiwr newydd i grŵp sy\'n bodoli eisoes'; -$lang['delGroup'] = 'Datganiad SQL i dynnu grŵp'; -$lang['getUserID'] = 'Datganiad SQL i nôl prif allwedd y defnyddiwr'; -$lang['delUser'] = 'Datganiad SQL i ddileu defnyddiwr'; -$lang['delUserRefs'] = 'Datganiad SQL i dynnu defnyddiwr o bob grŵp'; -$lang['updateUser'] = 'Datganiad SQL i ddiweddaru proffil defnyddiwr'; -$lang['UpdateLogin'] = 'Cymal Diweddaru i ddiweddaru enw mewngofnodi defnyddiwr'; -$lang['UpdatePass'] = 'Cymal Diweddaru i ddiweddaru cyfrinair defnyddiwr'; -$lang['UpdateEmail'] = 'Cymal Diweddaru i ddiweddaru cyfeiriad ebost defnyddiwr'; -$lang['UpdateName'] = 'Cymal Diweddaru i ddiweddaru enw llawn defnyddiwr'; -$lang['UpdateTarget'] = 'Cymal Cyfyngu i adnabod y defnyddiwr wrth ddiweddaru'; -$lang['delUserGroup'] = 'Datganiad SQL i dynnu defnyddiwr oddi ar grŵp'; -$lang['getGroupID'] = 'Datganiad SQL i nôl prif allwedd grŵp penodol'; diff --git a/lib/plugins/authpgsql/lang/da/settings.php b/lib/plugins/authpgsql/lang/da/settings.php deleted file mode 100644 index bca2bfb36..000000000 --- a/lib/plugins/authpgsql/lang/da/settings.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Jens Hyllegaard <jens.hyllegaard@gmail.com> - * @author soer9648 <soer9648@eucl.dk> - */ -$lang['server'] = 'Din PostgresSQL server'; -$lang['port'] = 'Din PostgresSQL servers port'; -$lang['password'] = 'Kodeord til ovenstående bruger'; -$lang['database'] = 'Database der skal benyttes'; -$lang['debug'] = 'Vis yderligere debug output'; -$lang['checkPass'] = 'SQL-sætning til at kontrollere kodeord'; -$lang['getUsers'] = 'SQL-sætning til at liste alle brugere'; -$lang['addUser'] = 'SQL-sætning til at tilføje en ny bruger'; -$lang['addGroup'] = 'SQL-sætning til at tilføje en ny gruppe'; -$lang['addUserGroup'] = 'SQL-sætning til at tilføje en bruger til en eksisterende gruppe'; -$lang['delGroup'] = 'SQL-sætning til at fjerne en gruppe'; -$lang['delUser'] = 'SQL-sætning til at slette en bruger'; -$lang['delUserRefs'] = 'SQL-sætning til at fjerne en bruger fra alle grupper'; -$lang['updateUser'] = 'SQL-sætning til at opdatere en brugerprofil'; diff --git a/lib/plugins/authpgsql/lang/de-informal/settings.php b/lib/plugins/authpgsql/lang/de-informal/settings.php deleted file mode 100644 index 2547e2c2f..000000000 --- a/lib/plugins/authpgsql/lang/de-informal/settings.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Matthias Schulte <dokuwiki@lupo49.de> - * @author Volker Bödker <volker@boedker.de> - */ -$lang['server'] = 'PostgreSQL-Server'; -$lang['port'] = 'Port des PostgreSQL-Servers.'; -$lang['user'] = 'Benutzername für den Zugriff auf den PostgreSQL-Server.'; -$lang['password'] = 'Passwort des angegebenen Benutzers.'; -$lang['database'] = 'Zu verwendende Datenbank.'; -$lang['debug'] = 'Debug-Informationen anzeigen?'; -$lang['forwardClearPass'] = 'Passwort der DokuWiki-Benutzer im Klartext an die Datenbank übergeben? (Im Normalfall wird die passcrypt-Option angewendet.)'; -$lang['checkPass'] = 'SQL-Kommando zum Überprüfen von Passwörtern.'; -$lang['getUserInfo'] = 'SQL-Kommando um Benutzerinformationen auszulesen.'; -$lang['getGroups'] = 'SQL-Kommando um Gruppen eines Benutzers auszulesen.'; -$lang['getUsers'] = 'SQL-Kommando um alle Benutzer auszulesen.'; -$lang['FilterLogin'] = 'SQL-Bedingung um Benutzer anhand ihres Anmeldenamens zu filtern.'; -$lang['FilterName'] = 'SQL-Bedingung um Benutzer anhand ihres Namens zu filtern.'; -$lang['FilterEmail'] = 'SQL-Bedingung um Benutzer anhand ihrer E-Mail-Adresse zu filtern.'; -$lang['FilterGroup'] = 'SQL-Bedingung um Benutzer anhand ihrer Gruppenzugehörigkeit zu filtern.'; -$lang['SortOrder'] = 'SQL-Bedingung um anhand der die Benutzerliste sortiert wird.'; -$lang['addUser'] = 'SQL-Kommando um einen neuen Benutzer anzulegen.'; -$lang['addGroup'] = 'SQL-Kommando um eine neue Gruppe anzulegen.'; -$lang['addUserGroup'] = 'SQL-Kommando um einen Benutzer zu einer Gruppe hinzuzufügen.'; -$lang['delGroup'] = 'SQL-Kommando um eine Gruppe zu löschen.'; -$lang['getUserID'] = 'SQL-Kommando um den Primärschlüssel des Benutzers auszulesen.'; -$lang['delUser'] = 'SQL-Kommando um einen Benutzer zu löschen.'; -$lang['delUserRefs'] = 'SQL-Kommando um einen Benutzer aus allen Gruppen zu entfernen.'; -$lang['updateUser'] = 'SQL-Kommando um das Profil eines Benutzers zu aktualisieren.'; -$lang['UpdateLogin'] = 'SQL-Bedingung um den Anmeldenamen eines Benutzers zu ändern.'; -$lang['UpdatePass'] = 'SQL-Bedingung um das Passwort eines Benutzers zu ändern.'; -$lang['UpdateEmail'] = 'SQL-Bedingung um die E-Mail-Adresse eines Benutzers zu ändern.'; -$lang['UpdateName'] = 'SQL-Bedingung um den Namen eines Benutzers zu ändern.'; -$lang['UpdateTarget'] = 'SQL-Bedingung zur eindeutigen Identifikation des Benutzers.'; -$lang['delUserGroup'] = 'SQL-Kommando um einen Benutzer aus einer angegeben Gruppe zu entfernen.'; -$lang['getGroupID'] = 'SQL-Kommando um den Primärschlüssel einer Gruppe auszulesen.'; diff --git a/lib/plugins/authpgsql/lang/de/settings.php b/lib/plugins/authpgsql/lang/de/settings.php deleted file mode 100644 index 6a18811b3..000000000 --- a/lib/plugins/authpgsql/lang/de/settings.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Matthias Schulte <dokuwiki@lupo49.de> - * @author Hella Breitkopf <hella.breitkopf@gmail.com> - */ -$lang['server'] = 'PostgreSQL-Server'; -$lang['port'] = 'Port des PostgreSQL-Servers.'; -$lang['user'] = 'Benutzername für den Zugriff auf den PostgreSQL-Server.'; -$lang['password'] = 'Passwort des angegebenen Benutzers.'; -$lang['database'] = 'Zu verwendende Datenbank.'; -$lang['debug'] = 'Debug-Informationen anzeigen?'; -$lang['forwardClearPass'] = 'Passwort der DokuWiki-Benutzer im Klartext an die Datenbank übergeben? (Im Normalfall wird die passcrypt-Option angewendet.)'; -$lang['checkPass'] = 'SQL-Kommando zum Überprüfen von Passwörtern.'; -$lang['getUserInfo'] = 'SQL-Kommando um Benutzerinformationen auszulesen.'; -$lang['getGroups'] = 'SQL-Kommando um Gruppen eines Benutzers auszulesen.'; -$lang['getUsers'] = 'SQL-Kommando um alle Benutzer auszulesen.'; -$lang['FilterLogin'] = 'SQL-Bedingung um Benutzer anhand ihres Anmeldenamens zu filtern.'; -$lang['FilterName'] = 'SQL-Bedingung um Benutzer anhand ihres Namens zu filtern.'; -$lang['FilterEmail'] = 'SQL-Bedingung um Benutzer anhand ihrer E-Mail-Adresse zu filtern.'; -$lang['FilterGroup'] = 'SQL-Bedingung um Benutzer anhand ihrer Gruppenzugehörigkeit zu filtern.'; -$lang['SortOrder'] = 'SQL-Bedingung um anhand der die Benutzerliste sortiert wird.'; -$lang['addUser'] = 'SQL-Kommando um einen neuen Benutzer anzulegen.'; -$lang['addGroup'] = 'SQL-Kommando um eine neue Gruppe anzulegen.'; -$lang['addUserGroup'] = 'SQL-Kommando um einen Benutzer zu einer Gruppe hinzuzufügen.'; -$lang['delGroup'] = 'SQL-Kommando um eine Gruppe zu löschen.'; -$lang['getUserID'] = 'SQL-Kommando um den Primärschlüssel des Benutzers auszulesen.'; -$lang['delUser'] = 'SQL-Kommando um einen Benutzer zu löschen.'; -$lang['delUserRefs'] = 'SQL-Kommando um einen Benutzer aus allen Gruppen zu entfernen.'; -$lang['updateUser'] = 'SQL-Kommando um das Profil eines Benutzers zu aktualisieren.'; -$lang['UpdateLogin'] = 'SQL-Bedingung um den Anmeldenamen eines Benutzers zu ändern.'; -$lang['UpdatePass'] = 'SQL-Befehl um das Passwort eines Benutzers zu ändern.'; -$lang['UpdateEmail'] = 'SQL-Befehl um die E-Mail-Adresse eines Benutzers zu ändern.'; -$lang['UpdateName'] = 'SQL-Befehl um den Namen eines Benutzers zu ändern.'; -$lang['UpdateTarget'] = 'SQL-Filter zur eindeutigen Identifikation des Benutzers.'; -$lang['delUserGroup'] = 'SQL-Kommando um einen Benutzer aus einer angegeben Gruppe zu entfernen.'; -$lang['getGroupID'] = 'SQL-Kommando um den Primärschlüssel einer Gruppe auszulesen.'; diff --git a/lib/plugins/authpgsql/lang/en/settings.php b/lib/plugins/authpgsql/lang/en/settings.php deleted file mode 100644 index cfb2686cb..000000000 --- a/lib/plugins/authpgsql/lang/en/settings.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -$lang['server'] = 'Your PostgreSQL server'; -$lang['port'] = 'Your PostgreSQL server\'s port'; -$lang['user'] = 'PostgreSQL user name'; -$lang['password'] = 'Password for above user'; -$lang['database'] = 'Database to use'; -$lang['debug'] = 'Display additional debug information'; -$lang['forwardClearPass'] = 'Pass user passwords as cleartext to the SQL statements below, instead of using the passcrypt option'; -$lang['checkPass'] = 'SQL statement for checking passwords'; -$lang['getUserInfo'] = 'SQL statement for retrieving user information'; -$lang['getGroups'] = 'SQL statement for retrieving a user\'s group memberships'; -$lang['getUsers'] = 'SQL statement to list all users'; -$lang['FilterLogin'] = 'SQL clause for filtering users by login name'; -$lang['FilterName'] = 'SQL clause for filtering users by full name'; -$lang['FilterEmail'] = 'SQL clause for filtering users by email address'; -$lang['FilterGroup'] = 'SQL clause for filtering users by group membership'; -$lang['SortOrder'] = 'SQL clause to sort users'; -$lang['addUser'] = 'SQL statement to add a new user'; -$lang['addGroup'] = 'SQL statement to add a new group'; -$lang['addUserGroup'] = 'SQL statement to add a user to an existing group'; -$lang['delGroup'] = 'SQL statement to remove a group'; -$lang['getUserID'] = 'SQL statement to get the primary key of a user'; -$lang['delUser'] = 'SQL statement to delete a user'; -$lang['delUserRefs'] = 'SQL statement to remove a user from all groups'; -$lang['updateUser'] = 'SQL statement to update a user profile'; -$lang['UpdateLogin'] = 'Update clause for updating the user\'s login name'; -$lang['UpdatePass'] = 'Update clause for updating the user\'s password'; -$lang['UpdateEmail'] = 'Update clause for updating the user\'s email address'; -$lang['UpdateName'] = 'Update clause for updating the user\'s full name'; -$lang['UpdateTarget'] = 'Limit clause to identify the user when updating'; -$lang['delUserGroup'] = 'SQL statement to remove a user from a given group'; -$lang['getGroupID'] = 'SQL statement to get the primary key of a given group'; diff --git a/lib/plugins/authpgsql/lang/eo/settings.php b/lib/plugins/authpgsql/lang/eo/settings.php deleted file mode 100644 index 3af6b4079..000000000 --- a/lib/plugins/authpgsql/lang/eo/settings.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - */ -$lang['server'] = 'Via PostgreSQL-servilo'; -$lang['port'] = 'Via PostgreSQL-servila pordego'; -$lang['user'] = 'PostgreSQL-uzantonomo'; -$lang['password'] = 'Pasvorto por tiu uzanto'; -$lang['database'] = 'Uzenda datumbazo'; -$lang['debug'] = 'Ĉu indiki aldonajn erarinformojn'; -$lang['forwardClearPass'] = 'Ĉu transdoni pasvortojn klartekste al la SQL-frazoj sube anstataŭ uzi pasvortan kaŝon'; -$lang['checkPass'] = 'SQL-frazo por testi pasvortojn'; -$lang['getUserInfo'] = 'SQL-frazo por ricevi uzantajn informojn'; -$lang['getGroups'] = 'SQL-frazo por ricevi la grupmembrecojn de uzanto'; -$lang['getUsers'] = 'SQL-frazo por listigi ĉiujn uzantojn'; -$lang['FilterLogin'] = 'SQL-frazo por filtri uzantojn je ensaluta nomo'; -$lang['FilterName'] = 'SQL-frazo por filtri uzantojn je plena nomo'; -$lang['FilterEmail'] = 'SQL-frazo por filtri uzantojn je retpoŝtadreso'; -$lang['FilterGroup'] = 'SQL-frazo por filtri uzantojn je grupmembreco'; -$lang['SortOrder'] = 'SQL-frazo por ordigi uzantojn'; -$lang['addUser'] = 'SQL-frazo por aldoni novan uzanton'; -$lang['addGroup'] = 'SQL-frazo por aldoni novan grupon'; -$lang['addUserGroup'] = 'SQL-frazo por aldoni uzanton al ekzistanta grupo'; -$lang['delGroup'] = 'SQL-frazo por forigi grupon'; -$lang['getUserID'] = 'SQL-frazo por ricevi la ĉefan ŝlosilon de uzanto'; -$lang['delUser'] = 'SQL-frazo por forigi uzanton'; -$lang['delUserRefs'] = 'SQL-frazo por forigi uzanton el ĉiuj grupoj'; -$lang['updateUser'] = 'SQL-frazo por aktualigi uzantan profilon'; -$lang['UpdateLogin'] = 'Aktualiga frazo por uzanta ensalutnomo'; -$lang['UpdatePass'] = 'Aktualiga frazo por uzanta pasvorto'; -$lang['UpdateEmail'] = 'Aktualiga frazo por uzanta retpoŝtadreso'; -$lang['UpdateName'] = 'Aktualiga frazo por plena uzanta nomo'; -$lang['UpdateTarget'] = 'Limiga frazo por identigi la uzanton dum aktualigado'; -$lang['delUserGroup'] = 'SQL-frazo por forigi uzanton el indikita grupo'; -$lang['getGroupID'] = 'SQL-frazo por ricevi la ĉefan ŝlosilon de indikita grupo'; diff --git a/lib/plugins/authpgsql/lang/es/settings.php b/lib/plugins/authpgsql/lang/es/settings.php deleted file mode 100644 index 384d79894..000000000 --- a/lib/plugins/authpgsql/lang/es/settings.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Antonio Bueno <atnbueno@gmail.com> - * @author Antonio Castilla <antoniocastilla@trazoide.com> - * @author pokesakura <pokesakura@gmail.com> - * @author Domingo Redal <docxml@gmail.com> - */ -$lang['server'] = 'Su servidor PostgreSQL'; -$lang['port'] = 'Puerto de su servidor PostgreSQL'; -$lang['user'] = 'Nombre de usuario PostgreSQL'; -$lang['password'] = 'Contraseña del usuario indicado'; -$lang['database'] = 'Base de datos a usar'; -$lang['debug'] = 'Muestra la información de depuración adicional'; -$lang['forwardClearPass'] = 'Pasar las contraseñas de usuario en texto plano a las siguientes sentencias de SQL, en lugar de utilizar la opción passcrypt'; -$lang['checkPass'] = 'Sentencia SQL para el control de las contraseñas'; -$lang['getUserInfo'] = 'Sentencia SQL para recuperar información del usuario'; -$lang['getGroups'] = 'Sentencia SQL para recuperar la pertenencia a grupos de un usuario'; -$lang['getUsers'] = 'Sentencia SQL para enumerar todos los usuarios'; -$lang['FilterLogin'] = 'Sentencia SQL para filtrar a los usuarios por su login'; -$lang['FilterName'] = 'Sentencia SQL para filtrar a los usuarios por su nombre completo'; -$lang['FilterEmail'] = 'Sentencia SQL para filtrar a los usuarios por su correo electrónico'; -$lang['FilterGroup'] = 'Sentencia SQL para filtrar a los usuarios por su membresía en un grupo'; -$lang['SortOrder'] = 'Sentencia SQL para ordenar a los usuarios'; -$lang['addUser'] = 'Sentencia de SQL para agregar un nuevo usuario'; -$lang['addGroup'] = 'Sentencia de SQL para agregar un nuevo grupo'; -$lang['addUserGroup'] = 'Sentencia SQL para agregar un usuario a un grupo existente'; -$lang['delGroup'] = 'Instrucción SQL para eliminar un grupo'; -$lang['getUserID'] = 'Sentencia SQL para obtener la clave principal de un usuario'; -$lang['delUser'] = 'Sentencia SQL para eliminar un usuario'; -$lang['delUserRefs'] = 'Sentencia SQL para remover a un usuario de su memebresia en todos los grupos'; -$lang['updateUser'] = 'Sentencia SQL para actualizar los datos del usuario'; -$lang['UpdateLogin'] = 'Sentencia de actualizacion para el login del usuario'; -$lang['UpdatePass'] = 'Sentencia de actualizacion para el password del usuario'; -$lang['UpdateEmail'] = 'Sentencia de actualizacion del correo electrónico del usuario'; -$lang['UpdateName'] = 'Sentencia de actualizacion del nombre completo del usuario'; -$lang['UpdateTarget'] = 'Cláusula limite para identificar al usuario cuando se actualiza'; -$lang['delUserGroup'] = 'Sentencia SQL para eliminar un usuario de un grupo determinado'; -$lang['getGroupID'] = 'Sentencia SQL para obtener la clave principal de un grupo dado'; diff --git a/lib/plugins/authpgsql/lang/fa/settings.php b/lib/plugins/authpgsql/lang/fa/settings.php deleted file mode 100644 index 9fe503211..000000000 --- a/lib/plugins/authpgsql/lang/fa/settings.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Mohamad Mehdi Habibi <habibi.esf@gmail.com> - * @author Mohmmad Razavi <sepent@gmail.com> - * @author Masoud Sadrnezhaad <masoud@sadrnezhaad.ir> - */ -$lang['server'] = 'سرور PostgreSQL شما'; -$lang['port'] = 'پورت سرور PostgreSQL شما'; -$lang['user'] = 'نام کاربری PostgreSQL'; -$lang['password'] = 'رمزعبور کابر بالا'; -$lang['database'] = 'پایگاه داده مورد استفاده'; -$lang['debug'] = 'نمایش اطلاعات بیشتر برای خطایابی'; -$lang['forwardClearPass'] = 'به جای استفاده از امکان رمزنگاری، پسورد کاربران به صورت متنی به دستورات SQL ارسال شود'; -$lang['checkPass'] = 'دستور SQL برای چک کردن پسورد'; -$lang['getUserInfo'] = 'دستور SQL برای دریافت اطلاعات کاربران'; -$lang['getGroups'] = 'دستور SQL برای دریافت گروههای یک کاربر'; -$lang['getUsers'] = 'دستور SQL برای فهرست کردن تمام کاربران'; -$lang['FilterLogin'] = 'کلاز SQL برای فیلتر کردن کاربران با نام کاربری'; -$lang['FilterName'] = 'کلاز SQL برای فیلتر کردن کاربران با نام کامل'; -$lang['FilterEmail'] = 'کلاز SQL برای فیلتر کردن کاربران با آدرس ایمیل'; -$lang['FilterGroup'] = 'کلاز SQL برای فیلتر کردن کاربران با عضویت در گروه'; -$lang['SortOrder'] = 'کلاز SQL برای مرتب کردن کاربران'; -$lang['addUser'] = 'دستور SQL برای افزودن کاربر جدید'; -$lang['addGroup'] = 'دستور SQL برای افزودن گروه جدید'; -$lang['addUserGroup'] = 'دستور SQL برای افزودن یک کاربر به یک گروه موجود'; -$lang['delGroup'] = 'دستور SQL برای پاک کردن یک گروه'; -$lang['getUserID'] = 'دستور SQL برای گرفتن کلید اصلی یک کاربر'; -$lang['delUser'] = 'دستور SQL برای حذف یک کاربر'; -$lang['delUserRefs'] = 'دستور SQL برای پاک کردن یک کاربر از تمام گروهها'; -$lang['updateUser'] = 'دستور SQL برای بهروزرسانی پروفایل کاربر'; -$lang['UpdateLogin'] = 'کلاز Update برای به روز کردن نام کاربری'; -$lang['UpdatePass'] = 'کلاز Update برای به روز کردن پسورد کاربر'; -$lang['UpdateEmail'] = 'کلاز Update برای به روز کردن ایمیل کاربر'; -$lang['UpdateName'] = 'کلاز Update برای به روز کردن نام کامل کاربر'; -$lang['UpdateTarget'] = 'کلاز Limit برای شناسایی کاربر هنگام به روز رسانی'; -$lang['delUserGroup'] = 'دستور SQL برای حذف یک کاربر از یک گروه'; -$lang['getGroupID'] = 'دستور SQL برای گرفتن کلید اصلی یک گروه'; diff --git a/lib/plugins/authpgsql/lang/fr/settings.php b/lib/plugins/authpgsql/lang/fr/settings.php deleted file mode 100644 index 8cd9c6a7b..000000000 --- a/lib/plugins/authpgsql/lang/fr/settings.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Bruno Veilleux <bruno.vey@gmail.com> - */ -$lang['server'] = 'Votre serveur PostgreSQL'; -$lang['port'] = 'Le port de votre serveur PostgreSQL'; -$lang['user'] = 'Nom d\'utilisateur PostgreSQL'; -$lang['password'] = 'Mot de passe pour l\'utilisateur ci-dessus'; -$lang['database'] = 'Base de données à utiliser'; -$lang['debug'] = 'Afficher des informations de débogage supplémentaires'; -$lang['forwardClearPass'] = 'Passer les mots de passe aux requêtes SQL ci-dessous en cleartext plutôt qu\'avec l\'option passcrypt'; -$lang['checkPass'] = 'Requête SQL pour la vérification des mots de passe'; -$lang['getUserInfo'] = 'Requête SQL pour la récupération des informations d\'un utilisateur'; -$lang['getGroups'] = 'Requête SQL pour la récupération des groupes d\'un utilisateur'; -$lang['getUsers'] = 'Requête SQL pour énumérer tous les utilisateurs'; -$lang['FilterLogin'] = 'Clause SQL pour filtrer les utilisateurs par identifiant'; -$lang['FilterName'] = 'Clause SQL pour filtrer les utilisateurs par nom complet'; -$lang['FilterEmail'] = 'Clause SQL pour filtrer les utilisateurs par adresse électronique'; -$lang['FilterGroup'] = 'Clause SQL pour filtrer les utilisateurs par groupes'; -$lang['SortOrder'] = 'Clause SQL pour trier les utilisateurs'; -$lang['addUser'] = 'Requête SQL pour ajouter un nouvel utilisateur'; -$lang['addGroup'] = 'Requête SQL pour ajouter un nouveau groupe'; -$lang['addUserGroup'] = 'Requête SQL pour ajouter un utilisateur à un groupe existant'; -$lang['delGroup'] = 'Requête SQL pour retirer un groupe'; -$lang['getUserID'] = 'Requête SQL pour obtenir la clé primaire d\'un utilisateur'; -$lang['delUser'] = 'Requête SQL pour supprimer un utilisateur'; -$lang['delUserRefs'] = 'Requête SQL pour retirer un utilisateur de tous les groupes'; -$lang['updateUser'] = 'Requête SQL pour mettre à jour le profil d\'un utilisateur'; -$lang['UpdateLogin'] = 'Clause de mise à jour pour mettre à jour l\'identifiant d\'un utilisateur'; -$lang['UpdatePass'] = 'Clause de mise à jour pour mettre à jour le mot de passe d\'un utilisateur'; -$lang['UpdateEmail'] = 'Clause de mise à jour pour mettre à jour l\'adresse électronique d\'un utilisateur'; -$lang['UpdateName'] = 'Clause de mise à jour pour mettre à jour le nom complet d\'un utilisateur'; -$lang['UpdateTarget'] = 'Clause de limite pour identifier l\'utilisateur durant une mise à jour'; -$lang['delUserGroup'] = 'Requête SQL pour retirer un utilisateur d\'un groupe donné'; -$lang['getGroupID'] = 'Requête SQL pour obtenir la clé primaire d\'un groupe donné'; diff --git a/lib/plugins/authpgsql/lang/hr/settings.php b/lib/plugins/authpgsql/lang/hr/settings.php deleted file mode 100644 index 2cec4e5fa..000000000 --- a/lib/plugins/authpgsql/lang/hr/settings.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Davor Turkalj <turki.bsc@gmail.com> - */ -$lang['server'] = 'Vaš PostgreSQL server'; -$lang['port'] = 'Port vašeg PostgreSQL servera'; -$lang['user'] = 'PostgreSQL korisničko ime'; -$lang['password'] = 'Lozinka gore navedenoga korisnika'; -$lang['database'] = 'Baza koja se koristi'; -$lang['debug'] = 'Prikaz dodatnih dijagnostičkih informacija'; -$lang['forwardClearPass'] = 'Proslijed lozinku kao običan tekst u SQL izrazima koji slijede, umjesto korištenja passcrypt opcije'; -$lang['checkPass'] = 'SQL izraz za provjeru lozinke'; -$lang['getUserInfo'] = 'SQL izraz za dohvat korisničkih informacija'; -$lang['getGroups'] = 'SQL izraz za dohvat korisničkog članstva u grupama'; -$lang['getUsers'] = 'SQL izraz za ispis svih korisnika'; -$lang['FilterLogin'] = 'SQL izraz za filtriranje korisnika po korisničkom imenu'; -$lang['FilterName'] = 'SQL izraz za filtriranje korisnika po punom imenu'; -$lang['FilterEmail'] = 'SQL izraz za filtriranje korisnika po email adresi'; -$lang['FilterGroup'] = 'SQL izraz za filtriranje korisnika po članstvu u grupama'; -$lang['SortOrder'] = 'SQL izraz za sortiranje korisnika'; -$lang['addUser'] = 'SQL izraz za dodavanje novog korisnika'; -$lang['addGroup'] = 'SQL izraz za dodavanje nove grupe'; -$lang['addUserGroup'] = 'SQL izraz za dodavanje korisnika u postojeću grupu'; -$lang['delGroup'] = 'SQL izraz za brisanje grupe'; -$lang['getUserID'] = 'SQL izraz za dohvaćanje primarnog ključa korisnika'; -$lang['delUser'] = 'SQL izraz za brisanje korisnika'; -$lang['delUserRefs'] = 'SQL izraz za uklanjanje korisnika iz svih grupa'; -$lang['updateUser'] = 'SQL izraz za ažuriranje korisničkog profila'; -$lang['UpdateLogin'] = 'UPDATE izraz za ažuriranje korisničkog imena'; -$lang['UpdatePass'] = 'UPDATE izraz za ažuriranje korisničke lozinke'; -$lang['UpdateEmail'] = 'UPDATE izraz za ažuriranje korisničke email adrese'; -$lang['UpdateName'] = 'UPDATE izraz za ažuriranje korisničkog punog imena'; -$lang['UpdateTarget'] = 'Limitirajući izraz za identificiranje korisnika pri ažuriranju'; -$lang['delUserGroup'] = 'SQL izraz za uklanjanje korisnika iz navedenih grupa'; -$lang['getGroupID'] = 'SQL izraz za dobivanje primarnog ključa navedene grupe'; diff --git a/lib/plugins/authpgsql/lang/hu/settings.php b/lib/plugins/authpgsql/lang/hu/settings.php deleted file mode 100644 index 213fc8751..000000000 --- a/lib/plugins/authpgsql/lang/hu/settings.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Marton Sebok <sebokmarton@gmail.com> - * @author Marina Vladi <deldadam@gmail.com> - */ -$lang['server'] = 'PostgreSQL-kiszolgáló'; -$lang['port'] = 'PostgreSQL-kiszolgáló portja'; -$lang['user'] = 'PostgreSQL-felhasználónév'; -$lang['password'] = 'Fenti felhasználó jelszava'; -$lang['database'] = 'Adatbázis'; -$lang['debug'] = 'Hibakeresési üzenetek megjelenítése'; -$lang['forwardClearPass'] = 'A jelszó nyílt szövegben való átadása a következő SQL utasításokban a passcrypt opció használata helyett'; -$lang['checkPass'] = 'SQL-utasítás a jelszavak ellenőrzéséhez'; -$lang['getUserInfo'] = 'SQL-utasítás a felhasználói információk lekérdezéséhez'; -$lang['getGroups'] = 'SQL-utasítás egy felhasználó csoporttagságainak lekérdezéséhez'; -$lang['getUsers'] = 'SQL-utasítás a felhasználók listázásához'; -$lang['FilterLogin'] = 'SQL-kifejezés a felhasználók azonosító alapú szűréséhez'; -$lang['FilterName'] = 'SQL-klauzula a felhasználók név alapú szűréséhez'; -$lang['FilterEmail'] = 'SQL-klauzula a felhasználók e-mail cím alapú szűréséhez'; -$lang['FilterGroup'] = 'SQL-klauzula a felhasználók csoporttagság alapú szűréséhez'; -$lang['SortOrder'] = 'SQL-klauzula a felhasználók rendezéséhez'; -$lang['addUser'] = 'SQL-klauzula új felhasználó hozzáadásához'; -$lang['addGroup'] = 'SQL-klauzula új csoport hozzáadásához'; -$lang['addUserGroup'] = 'SQL-utasítás felhasználó meglévő csoporthoz való hozzáadásához'; -$lang['delGroup'] = 'SQL-utasítás csoport törléséhez'; -$lang['getUserID'] = 'SQL-utasítás felhasználó elsődleges kulcsának lekérdezéséhez'; -$lang['delUser'] = 'SQL-utasítás felhasználó törléséhez'; -$lang['delUserRefs'] = 'SQL-utasítás felhasználó összes csoportból való törléséhez'; -$lang['updateUser'] = 'SQL-utasítás felhasználó profiljának frissítéséhez'; -$lang['UpdateLogin'] = 'UPDATE-klauzula felhasználók azonosítójának frissítéséhez'; -$lang['UpdatePass'] = 'UPDATE-klauzula felhasználók jelszavának frissítéséhez'; -$lang['UpdateEmail'] = 'UPDATE-klauzula felhasználók e-mailcímének frissítéséhez'; -$lang['UpdateName'] = 'SQL-kifejezés a felhasználó nevének frissítéséhez'; -$lang['UpdateTarget'] = 'SQL-kifejezés a felhasználó kiválasztásához az adatok frissítésekor'; -$lang['delUserGroup'] = 'SQL-utasítás egy felhasználó eltávolításához egy adott csoportból'; -$lang['getGroupID'] = 'SQL-utasítás egy csoport elsődleges kulcsának lekérdezéséhez'; diff --git a/lib/plugins/authpgsql/lang/it/settings.php b/lib/plugins/authpgsql/lang/it/settings.php deleted file mode 100644 index 365fc47e4..000000000 --- a/lib/plugins/authpgsql/lang/it/settings.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Francesco <francesco.cavalli@hotmail.com> - * @author Torpedo <dgtorpedo@gmail.com> - * @author Maurizio <mcannavo@katamail.com> - */ -$lang['server'] = 'Il tuo server PostgreSQL '; -$lang['port'] = 'La porta del tuo server PostgreSQL '; -$lang['user'] = 'Lo username PostgreSQL'; -$lang['password'] = 'Password dell\'utente summenzionato'; -$lang['database'] = 'Database da usare'; -$lang['debug'] = 'Visualizza informazioni addizionali di debug'; -$lang['forwardClearPass'] = 'Fornisci le password utente come testo visibile alle istruzioni SQL qui sotto, invece che usare l\'opzione passcrypt'; -$lang['checkPass'] = 'Istruzione SQL per il controllo password'; -$lang['getUserInfo'] = 'Istruzione SQL per recuperare le informazioni utente'; -$lang['getGroups'] = 'Istruzione SQL per recuperare il gruppo di appartenenza di un utente'; -$lang['getUsers'] = 'Istruzione SQL per elencare tutti gli utenti'; -$lang['FilterLogin'] = 'Condizione SQL per filtrare gli utenti in base al nome di accesso'; -$lang['FilterName'] = 'Condizione SQL per filtrare gli utenti in base al nome completo'; -$lang['FilterEmail'] = 'Condizione SQL per filtrare gli utenti in base all\'indirizzo e-mail'; -$lang['FilterGroup'] = 'Condizione SQL per filtrare gli utenti in base al gruppo di appartenenza'; -$lang['SortOrder'] = 'Condizione SQL per ordinare gli utenti'; -$lang['addUser'] = 'Istruzione SQL per aggiungere un nuovo utente'; -$lang['addGroup'] = 'Istruzione SQL per aggiungere un nuovo gruppo'; -$lang['addUserGroup'] = 'Istruzione SQL per aggiungere un utente ad un gruppo esistente'; -$lang['delGroup'] = 'Istruzione SQL per imuovere un gruppo'; -$lang['getUserID'] = 'Istruzione SQL per recuperare la primary key di un utente'; -$lang['delUser'] = 'Istruzione SQL per cancellare un utente'; -$lang['delUserRefs'] = 'Istruzione SQL per rimuovere un utente da tutti i gruppi'; -$lang['updateUser'] = 'Istruzione SQL per aggiornare il profilo utente'; -$lang['UpdateLogin'] = 'Condizione SQL per aggiornare il nome di accesso dell\'utente'; -$lang['UpdatePass'] = 'Condizione SQL per aggiornare la password utente'; -$lang['UpdateEmail'] = 'Condizione SQL per aggiornare l\'e-mail utente'; -$lang['UpdateName'] = 'Condizione SQL per aggiornare il nome completo dell\'utente'; -$lang['UpdateTarget'] = 'Condizione SQL per identificare l\'utente quando aggiornato'; -$lang['delUserGroup'] = 'Istruzione SQL per rimuovere un utente da un dato gruppo'; -$lang['getGroupID'] = 'Istruzione SQL per avere la primary key di un dato gruppo'; diff --git a/lib/plugins/authpgsql/lang/ja/settings.php b/lib/plugins/authpgsql/lang/ja/settings.php deleted file mode 100644 index 001008c9f..000000000 --- a/lib/plugins/authpgsql/lang/ja/settings.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Satoshi Sahara <sahara.satoshi@gmail.com> - */ -$lang['server'] = 'PostgreSQL のサーバー名'; -$lang['port'] = 'PostgreSQL サーバーのポート番号'; -$lang['user'] = 'PostgreSQL 接続用ユーザー名'; -$lang['password'] = 'PostgreSQL 接続用ユーザーのパスワード'; -$lang['database'] = '使用するデータベース名'; -$lang['debug'] = 'デバック情報を表示する'; -$lang['forwardClearPass'] = '以下で定義する SQL ステートメントにおいて, パスワード変数 を平文とする(DokiWiki側で暗号化しない)'; -$lang['checkPass'] = 'パスワードの照合に用いる SQL ステートメント'; -$lang['getUserInfo'] = 'ユーザー情報の取得に用いる SQL ステートメント'; -$lang['getGroups'] = 'ユーザーが所属する全てのグループの取得に用いる SQL ステートメント'; -$lang['getUsers'] = 'ユーザーリストを取得する SQL ステートメント'; -$lang['FilterLogin'] = 'ユーザーリストをログイン名で絞り込む SQL 句'; -$lang['FilterName'] = 'ユーザーリストをフルネームで絞り込む SQL 句'; -$lang['FilterEmail'] = 'ユーザーリストをメールアドレスで絞り込む SQL 句'; -$lang['FilterGroup'] = 'ユーザーリストを所属グループで絞り込む SQL 句'; -$lang['SortOrder'] = 'ユーザーリストのソート方法を指定する SQL 句'; -$lang['addUser'] = '新規ユーザーを追加する SQL ステートメント'; -$lang['addGroup'] = '新規グループを追加する SQL ステートメント'; -$lang['addUserGroup'] = 'ユーザーをグループに配属する SQL ステートメント'; -$lang['delGroup'] = 'グループを削除する SQL ステートメント'; -$lang['getUserID'] = 'ユーザーIDの取得に用いる SQL ステートメン'; -$lang['delUser'] = 'ユーザーを削除する SQL ステートメント'; -$lang['delUserRefs'] = 'ユーザーのグループ所属を全て取り消す SQL ステートメント'; -$lang['updateUser'] = 'ユーザー情報を変更する SQL ステートメント'; -$lang['UpdateLogin'] = '変更後のログイン名を指定する SQL 句'; -$lang['UpdatePass'] = '変更後のパスワードを指定する SQL 句'; -$lang['UpdateEmail'] = '変更後のメールアドレスを指定する SQL 句'; -$lang['UpdateName'] = '変更後のフルネームを指定する SQL 句'; -$lang['UpdateTarget'] = '変更対象のユーザを特定するための SQL 句'; -$lang['delUserGroup'] = 'ユーザーをグループから除名する SQL ステートメント'; -$lang['getGroupID'] = 'グループIDの取得に用いる SQL ステートメント'; diff --git a/lib/plugins/authpgsql/lang/ko/settings.php b/lib/plugins/authpgsql/lang/ko/settings.php deleted file mode 100644 index fd45bfa48..000000000 --- a/lib/plugins/authpgsql/lang/ko/settings.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Myeongjin <aranet100@gmail.com> - * @author Garam <rowain8@gmail.com> - */ -$lang['server'] = 'PostgreSQL 서버'; -$lang['port'] = 'PostgreSQL 서버의 포트'; -$lang['user'] = 'PostgreSQL 사용자 이름'; -$lang['password'] = '위 사용자의 비밀번호'; -$lang['database'] = '사용할 데이터베이스'; -$lang['debug'] = '추가적인 디버그 정보 보이기'; -$lang['forwardClearPass'] = 'passcrypt 옵션을 사용하는 대신 아래 SQL 문에 일반 텍스트로 사용자 비밀번호를 전달'; -$lang['checkPass'] = '비밀번호를 확인하기 위한 SQL 문'; -$lang['getUserInfo'] = '사용자 정보를 가져오기 위한 SQL 문'; -$lang['getGroups'] = '사용자의 그룹 구성원을 가져오기 위한 SQL 문'; -$lang['getUsers'] = '모든 사용자를 나타낼 SQL 문'; -$lang['FilterLogin'] = '로그인 이름별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterName'] = '전체 이름별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterEmail'] = '이메일 주소별로 사용자를 필터하기 위한 SQL 조항'; -$lang['FilterGroup'] = '그룹 구성원별로 사용자를 필터하기 위한 SQL 조항'; -$lang['SortOrder'] = '사용자를 정렬할 SQL 조항'; -$lang['addUser'] = '새 사용자를 추가할 SQL 문'; -$lang['addGroup'] = '새 그룹을 추가할 SQL 문'; -$lang['addUserGroup'] = '기존 그룹에 사용자를 추가할 SQL 문'; -$lang['delGroup'] = '그룹을 제거할 SQL 문'; -$lang['getUserID'] = '사용자의 기본 키를 얻을 SQL 문'; -$lang['delUser'] = '사용자를 삭제할 SQL 문'; -$lang['delUserRefs'] = '모든 그룹에서 사용자를 제거할 SQL 문'; -$lang['updateUser'] = '사용자 프로필을 업데이트할 SQL 문'; -$lang['UpdateLogin'] = '사용자의 로그인 이름을 업데이트하기 위한 Update 조항'; -$lang['UpdatePass'] = '사용자의 비밀번호를 업데이트하기 위한 Update 조항'; -$lang['UpdateEmail'] = '사용자의 이메일 주소를 업데이트하기 위한 Update 조항'; -$lang['UpdateName'] = '사용자의 전체 이름을 업데이트하기 위한 Update 조항'; -$lang['UpdateTarget'] = '업데이트할 때 사용자를 식별할 Limit 조항'; -$lang['delUserGroup'] = '주어진 그룹에서 사용자를 제거할 SQL 문'; -$lang['getGroupID'] = '주어진 그룹의 기본 키를 얻을 SQL 문'; diff --git a/lib/plugins/authpgsql/lang/lv/settings.php b/lib/plugins/authpgsql/lang/lv/settings.php deleted file mode 100644 index dd63544b5..000000000 --- a/lib/plugins/authpgsql/lang/lv/settings.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Aivars Miška <allefm@gmail.com> - */ -$lang['password'] = 'Lietotāja parole'; -$lang['delUser'] = 'SQL pieprasījums lietotāja dzēšanai'; diff --git a/lib/plugins/authpgsql/lang/nl/settings.php b/lib/plugins/authpgsql/lang/nl/settings.php deleted file mode 100644 index 7b4ec702c..000000000 --- a/lib/plugins/authpgsql/lang/nl/settings.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Remon <no@email.local> - */ -$lang['server'] = 'Je PostgreSQL server'; -$lang['port'] = 'Je PostgreSQL server poort'; -$lang['user'] = 'PostgreSQL gebruikersnaam'; -$lang['password'] = 'Wachtwoord voor bovenstaande gebruiker'; -$lang['database'] = 'Te gebruiken database'; -$lang['debug'] = 'Tonen aanvullende debuginformatie'; -$lang['forwardClearPass'] = 'Wachtwoorden als leesbare tekst in SQL commando\'s opnemen in plaats van versleuteld'; -$lang['checkPass'] = 'SQL commando voor het verifiëren van wachtwoorden'; -$lang['getUserInfo'] = 'SQL commando voor het ophalen van gebruikersinformatie'; -$lang['getGroups'] = 'SQL commando voor het ophalen van groepslidmaatschappen van gebruikers'; -$lang['getUsers'] = 'SQL commando voor het tonen van alle gebruikers'; -$lang['FilterLogin'] = 'SQL commando voor het filteren van gebruikers op inlognaam'; -$lang['FilterName'] = 'SQL commando voor het filteren van gebruikers op volledige naam'; -$lang['FilterEmail'] = 'SQL commando voor het filteren van gebruikers op e-mailadres'; -$lang['FilterGroup'] = 'SQL commando voor het filteren van gebruikers op groepslidmaatschap'; -$lang['SortOrder'] = 'SQL commando voor het sorteren van gebruikers'; -$lang['addUser'] = 'SQL commando voor het toevoegen van een nieuwe gebruiker'; -$lang['addGroup'] = 'SQL commando voor het toevoegen van een nieuwe groep'; -$lang['addUserGroup'] = 'SQL commando voor toevoegen van een gebruiker aan een bestaande groep'; -$lang['delGroup'] = 'SQL commando voor het verwijderen van een groep'; -$lang['getUserID'] = 'SQL commando om de primaire sleutel van een gebruiker op te halen'; -$lang['delUser'] = 'SQL commando voor het verwijderen van een gebruiker'; -$lang['delUserRefs'] = 'SQL commando om een gebruiker uit alle groepen te verwijderen'; -$lang['updateUser'] = 'SQL commando om een gebruikersprofiel bij te werken'; -$lang['UpdateLogin'] = 'SQL commando om een inlognaam bij te werken'; -$lang['UpdatePass'] = 'SQL commando om een wachtwoord bij te werken'; -$lang['UpdateEmail'] = 'SQL commando om een e-mailadres bij te werken'; -$lang['UpdateName'] = 'SQL commando om een volledige naam bij te werken'; -$lang['UpdateTarget'] = 'Beperkingsclausule om de gebruiker te identificeren bij het bijwerken'; -$lang['delUserGroup'] = 'SQL commando om een gebruiker uit een bepaalde groep te verwijderen'; -$lang['getGroupID'] = 'SQL commando om de primaire sleutel van een bepaalde groep op te halen'; diff --git a/lib/plugins/authpgsql/lang/no/settings.php b/lib/plugins/authpgsql/lang/no/settings.php deleted file mode 100644 index 9e84e4d30..000000000 --- a/lib/plugins/authpgsql/lang/no/settings.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Arne Hanssen <arne.hanssen@getmail.no> - */ -$lang['server'] = 'Din PostgreSQL-server'; -$lang['port'] = 'Porten til din PostgreSQL-server'; -$lang['user'] = 'PostgreSQL-brukernavn'; -$lang['password'] = 'Passord til bruker over'; -$lang['database'] = 'Database som brukes'; -$lang['debug'] = 'Vis utvidet feilinformasjon'; -$lang['forwardClearPass'] = 'Videresendt passord i klartekst til SQL-uttrykket under, i stedet for å bruke det krypterte passordet'; -$lang['checkPass'] = 'SQL-uttrykk for å sjekke passordet'; -$lang['getUserInfo'] = 'SQL-uttrykk for å hente informasjon om en bruker'; -$lang['getGroups'] = 'SQL-uttrykk for å hente gruppene en bruker tilhører'; -$lang['getUsers'] = 'SQL-uttrykk for å liste alle brukere '; -$lang['FilterLogin'] = 'SQL-uttrykk for å filtrere brukere etter brukernavn'; -$lang['FilterName'] = 'SQL-uttrykk for å filtrere brukere etter fult navn'; -$lang['FilterEmail'] = 'SQL-uttrykk for å filtrere brukere etter e-postadresse'; -$lang['FilterGroup'] = 'SQL-uttrykk for å filtrere brukere etter hvilken grupper de tilhører'; -$lang['SortOrder'] = 'SQL-uttrykk for å sortere brukere'; -$lang['addUser'] = 'SQL-uttrykk for å legge til en ny bruker'; -$lang['addGroup'] = 'SQL-uttrykk for å legge til en ny gruppe'; -$lang['addUserGroup'] = 'SQL-uttrykk for å legge til en bruker i en eksisterende gruppe'; -$lang['delGroup'] = 'SQL-uttrykk for å fjerne en gruppe '; -$lang['getUserID'] = 'SQL-uttrykk for å hente primærnøkkel for en gitt bruker'; -$lang['delUser'] = 'SQL-utrykk for å slette en bruker '; -$lang['delUserRefs'] = 'SQL-utrykk for å fjerne en bruke fra alle grupper'; -$lang['updateUser'] = 'SQL-uttrykk for å oppdatere en brukerprofil'; -$lang['UpdateLogin'] = 'Update-utrykk for å oppdatere brukernavn'; -$lang['UpdatePass'] = 'Update-utrykk for å oppdatere brukers passord'; -$lang['UpdateEmail'] = 'Update-utrykk for å oppdatere brukers e-postadresse'; -$lang['UpdateName'] = 'Update-utrykk for å oppdatere brukers fulle navn'; -$lang['UpdateTarget'] = 'Limit-uttrykk for å identifisere brukeren ved oppdatering'; -$lang['delUserGroup'] = 'SQL-uttrykk for fjerne en bruker fra gitt gruppe'; -$lang['getGroupID'] = 'SQL-uttrykk for å hente primærnøkkel for en gitt gruppe'; diff --git a/lib/plugins/authpgsql/lang/pl/settings.php b/lib/plugins/authpgsql/lang/pl/settings.php deleted file mode 100644 index e89fd91a2..000000000 --- a/lib/plugins/authpgsql/lang/pl/settings.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Wojciech Lichota <wojciech@lichota.pl> - * @author Max <maxrb146@gmail.com> - * @author Mati <mackosa@wp.pl> - */ -$lang['server'] = 'Twój serwer PostgreSQL'; -$lang['port'] = 'Port Twojego serwera PostgreSQL'; -$lang['user'] = 'Nazwa użytkownika PostgreSQL'; -$lang['password'] = 'Hasła dla powyższego użytkownika'; -$lang['database'] = 'Baza danych do użycia'; -$lang['debug'] = 'Wyświetl dodatkowe informacje debagowania'; -$lang['forwardClearPass'] = 'Przekazuj do poniższej instrukcji SQL hasła użytkowników jako czysty tekst do instrukcji SQL zamiast używać opcji passcrypt'; -$lang['checkPass'] = 'Instrukcja SQL sprawdzająca hasła'; -$lang['getUserInfo'] = 'Instrukcja SQL pobierająca dane użytkownika'; -$lang['getGroups'] = 'Instrukcja SQL pobierająca przynależność użytkownika do grup'; -$lang['getUsers'] = 'Instrukcja SQL listująca wszystkich użytkowników'; -$lang['FilterLogin'] = 'Instrukcja SQL filtrująca użytkowników po loginie'; -$lang['FilterName'] = 'Instrukcja SQL filtrująca użytkowników po imieniu i nazwisku'; -$lang['FilterEmail'] = 'Instrukcja SQL filtrująca użytkowników po emailu'; -$lang['FilterGroup'] = 'Instrukcja SQL filtrująca użytkowników po przynależności do grupy'; -$lang['SortOrder'] = 'Instrukcja SQL sortująca użytkowników'; -$lang['addUser'] = 'Instrukcja SQL dodająca nowego użytkownika'; -$lang['addGroup'] = 'Instrukcja SQL dodająca nową grupę'; -$lang['addUserGroup'] = 'Instrukcja SQL dodająca użytkownika do istniejącej grupy'; -$lang['delGroup'] = 'Instrukcja SQL usuwająca grupę'; -$lang['getUserID'] = 'Instrukcja SQL pobierająca klucz główny użytkownika'; -$lang['delUser'] = 'Instrukcja SQL usuwająca użytkownika'; -$lang['delUserRefs'] = 'Instrukcja SQL usuwająca użytkownika ze wszystkich grup'; -$lang['updateUser'] = 'Instrukcja SQL aktualizująca profil użytkownika'; -$lang['UpdateLogin'] = 'Polecenie służące do aktualizacji loginu użytkownika'; -$lang['UpdatePass'] = 'Polecenie służące do aktualizacji hasła użytkownika'; -$lang['UpdateEmail'] = 'Polecenie służące do aktualizacji e-mailu użytkownika'; -$lang['UpdateName'] = 'Polecenie służące do aktualizacji imienia i nazwiska użytkownika'; -$lang['UpdateTarget'] = 'Instrukcja limitu do identyfikacji użytkownika podczas aktualizacji'; -$lang['delUserGroup'] = 'Instrukcja SQL usuwająca użytkownika ze wskazanej grupy'; -$lang['getGroupID'] = 'Instrukcja SQL pobierająca klucz główny wskazanej grupy'; diff --git a/lib/plugins/authpgsql/lang/pt-br/settings.php b/lib/plugins/authpgsql/lang/pt-br/settings.php deleted file mode 100644 index a06ce0eab..000000000 --- a/lib/plugins/authpgsql/lang/pt-br/settings.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Victor Westmann <victor.westmann@gmail.com> - * @author Frederico Guimarães <frederico@teia.bio.br> - */ -$lang['server'] = 'Seu servidor PostgreSQL'; -$lang['port'] = 'Sua porta do servidor PostgreSQL'; -$lang['user'] = 'Nome de usuário PostgreSQL'; -$lang['password'] = 'Senha do usuário acima'; -$lang['database'] = 'Base de dados para usar'; -$lang['debug'] = 'Mostrar informações adicionais de depuração'; -$lang['forwardClearPass'] = 'Transmitir senhas de usuário como texto puro para comandos SQL abaixo, ao invés de usar a opção passcrypt'; -$lang['checkPass'] = 'Comando SQL para verificar senhas'; -$lang['getUserInfo'] = 'Comando SQL para obter informações do usuário'; -$lang['getGroups'] = 'Comando SQL para obter as credenciais de um usuário de um determinado grupo'; -$lang['getUsers'] = 'Comando SQL para listar todos os usuários'; -$lang['FilterLogin'] = 'Cláusula SQL para filtrar usuários pelo nome de login'; -$lang['FilterName'] = 'Cláusula SQL para filtrar usuários pelo nome completo'; -$lang['FilterEmail'] = 'Cláusula SQL para filtrar usuários pelo endereço de email'; -$lang['FilterGroup'] = 'Cláusula SQL para filtrar usuários pelo grupo que pertencem'; -$lang['SortOrder'] = 'Comando SQL para adicionar novo grupo'; -$lang['addUser'] = 'Comando SQL para adicionar novo usuário'; -$lang['addGroup'] = 'Comando SQL para adicionar novo grupo'; -$lang['addUserGroup'] = 'Comando SQL para adicionar um usuário a um grupo existente'; -$lang['delGroup'] = 'Comando SQL para remover um grupo'; -$lang['getUserID'] = 'Comando SQL para obter chave primária de usuário'; -$lang['delUser'] = 'Comando SQL para apagar usuário'; -$lang['delUserRefs'] = 'Comando SQL para remover um usuário de todos os grupos'; -$lang['updateUser'] = 'Comando SQL para atualizar perfil de usuário'; -$lang['UpdateLogin'] = 'Atualizar cláusula para atualizar o login do usuário'; -$lang['UpdatePass'] = 'Atualizar cláusula para atualizar a senha do usuário'; -$lang['UpdateEmail'] = 'Atualizar cláusula para atualizar o endereço de email'; -$lang['UpdateName'] = 'Atualizar cláusula para atualizar o nome completo do usuário'; -$lang['UpdateTarget'] = 'Limitar cláusula para identificar quando um usuário estiver atualizando'; -$lang['delUserGroup'] = 'Comando SQL para remover um usuário de um determinado grupo'; -$lang['getGroupID'] = 'Comando SQL para obter a chave primária de um determinado grupo'; diff --git a/lib/plugins/authpgsql/lang/pt/settings.php b/lib/plugins/authpgsql/lang/pt/settings.php deleted file mode 100644 index edc4e1a84..000000000 --- a/lib/plugins/authpgsql/lang/pt/settings.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author André Neves <drakferion@gmail.com> - * @author Guido Salatino <guidorafael23@gmail.com> - */ -$lang['server'] = 'O seu servidor PostgreSQL'; -$lang['port'] = 'A porta do seu servidor PostgreSQL'; -$lang['user'] = 'Nome de utilizador PostgreSQL'; -$lang['password'] = 'Senha do utilizador acima'; -$lang['database'] = 'Base de dados a usar'; -$lang['debug'] = 'Mostrar informação adicional de debug'; -$lang['forwardClearPass'] = 'Passe as senhas do usuário como texto puro para as instruções SQL abaixo, em vez de usar a opção passcrypt'; -$lang['checkPass'] = 'Instrução SQL para verificar senhas'; -$lang['getUserInfo'] = 'Instrução SQL para recuperar informações de um usuário'; -$lang['getGroups'] = 'Instrução SQL para recuperar os usuários participantes de um grupo'; -$lang['getUsers'] = 'Instrução SQL para listar todos usuários'; -$lang['FilterLogin'] = 'Cláusula SQL para filtrar utilizadores por nome de login'; -$lang['FilterName'] = 'Cláusula SQL para filtrar utilizadores por nome completo'; -$lang['FilterEmail'] = 'Cláusula SQL para filtrar utilizadores por endereço de email'; -$lang['FilterGroup'] = 'Cláusula SQL para filtrar utilizadores por pertença a grupo'; -$lang['SortOrder'] = 'Cláusula SQL para ordenar utilizadores'; -$lang['addUser'] = 'Instrução SQL para adicionar um novo usuário'; -$lang['addGroup'] = 'Instrução SQL para adicionar um novo grupo'; -$lang['addUserGroup'] = 'Instrução SQL para adicionar um usuário a um grupo existente'; -$lang['delGroup'] = 'Instrução SQL para remover um grupo'; -$lang['getUserID'] = 'Instrução SQL para obter a chave principal de um usuário'; -$lang['delUser'] = 'Instrução SQL para remover um usuário'; -$lang['delUserRefs'] = 'Instrução SQL para remover um usuário de todos os grupos'; -$lang['updateUser'] = 'Instrução SQL para atualizar um perfil de usuário'; -$lang['UpdateLogin'] = 'Cláusula de atualização para atualizar o nome de login do utilizador'; -$lang['UpdatePass'] = 'Cláusula de atualização para atualizar a senha do utilizador'; -$lang['UpdateEmail'] = 'Cláusula de atualização para atualizar o endereço de email do utilizador'; -$lang['UpdateName'] = 'Cláusula de atualização para atualizar o nome completo do utilizador'; -$lang['UpdateTarget'] = 'Cláusula limite para identificar o usuário ao atualizar'; -$lang['delUserGroup'] = 'Instrução SQL para remover um usuário de um determinado grupo'; -$lang['getGroupID'] = 'Instrução SQL para obter a chave principal de um determinado grupo'; diff --git a/lib/plugins/authpgsql/lang/ru/settings.php b/lib/plugins/authpgsql/lang/ru/settings.php deleted file mode 100644 index ceb5bd466..000000000 --- a/lib/plugins/authpgsql/lang/ru/settings.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Ivan I. Udovichenko (sendtome@mymailbox.pp.ua) - * @author Aleksandr Selivanov <alexgearbox@gmail.com> - * @author Vitaly Filatenko <kot@hacktest.net> - * @author Type-kun <workwork-1@yandex.ru> - * @author Alex P <alexander@lanos.co.uk> - */ -$lang['server'] = 'Ваш PostgreSQL-сервер'; -$lang['port'] = 'Порт вашего PostgreSQL-сервера'; -$lang['user'] = 'Имя пользователя PostgreSQL'; -$lang['password'] = 'Пароль для указанного пользователя'; -$lang['database'] = 'Имя базы данных'; -$lang['debug'] = 'Отображать дополнительную отладочную информацию'; -$lang['forwardClearPass'] = 'Передать чистым текстом ползовательские пароли в SQL запросы ниже, вместо использование опции passcrypt'; -$lang['checkPass'] = 'Выражение SQL, осуществляющее проверку пароля'; -$lang['getUserInfo'] = 'Выражение SQL, осуществляющее извлечение информации о пользователе'; -$lang['getGroups'] = 'Выражение SQL, осуществляющее извлечение информации о членстве пользователе в группах'; -$lang['getUsers'] = 'Выражение SQL, осуществляющее извлечение полного списка пользователей'; -$lang['FilterLogin'] = 'Выражение SQL, осуществляющее фильтрацию пользователей по логину'; -$lang['FilterName'] = 'Выражение SQL, осуществляющее фильтрацию пользователей по полному имени'; -$lang['FilterEmail'] = 'Выражение SQL, осуществляющее фильтрацию пользователей по адресу электронной почты'; -$lang['FilterGroup'] = 'Выражение SQL, осуществляющее фильтрацию пользователей согласно членству в группе'; -$lang['SortOrder'] = 'Выражение SQL, осуществляющее сортировку пользователей'; -$lang['addUser'] = 'Выражение SQL, осуществляющее добавление нового пользователя'; -$lang['addGroup'] = 'Выражение SQL, осуществляющее добавление новой группы'; -$lang['addUserGroup'] = 'Выражение SQL, осуществляющее добавление пользователя в существующую группу'; -$lang['delGroup'] = 'Выражение SQL, осуществляющее удаление группы'; -$lang['getUserID'] = 'Выражение SQL, обеспечивающее получение первичного ключа пользователя'; -$lang['delUser'] = 'Выражение SQL, осуществляющее удаление пользователя'; -$lang['delUserRefs'] = 'Выражение SQL, осуществляющее удаление пользователя из всех группы'; -$lang['updateUser'] = 'Выражение SQL, осуществляющее обновление профиля пользователя'; -$lang['UpdateLogin'] = 'Измените условие для обновления логина'; -$lang['UpdatePass'] = 'Измените условие для обновления пароля'; -$lang['UpdateEmail'] = 'Измените условие для обновления email'; -$lang['UpdateName'] = 'Условие для обновления полного имени пользователя'; -$lang['UpdateTarget'] = 'Выражение \'LIMIT\' для идентификации пользователя при обновлении'; -$lang['delUserGroup'] = 'Выражение SQL, осуществляющее удаление пользователя из указанной группы'; -$lang['getGroupID'] = 'Выражение SQL, обеспечивающее получение первичного ключа указанной группы'; diff --git a/lib/plugins/authpgsql/lang/sk/settings.php b/lib/plugins/authpgsql/lang/sk/settings.php deleted file mode 100644 index acdc2d72a..000000000 --- a/lib/plugins/authpgsql/lang/sk/settings.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Martin Michalek <michalek.dev@gmail.com> - */ -$lang['server'] = 'PostgreSQL server'; -$lang['port'] = 'Port PostgreSQL servera'; -$lang['user'] = 'Meno používateľa PostgreSQL'; -$lang['password'] = 'Heslo pre vyššie uvedeného používateľa'; -$lang['database'] = 'Použiť databázu'; -$lang['debug'] = 'Zobraziť dodatočné ladiace informácie'; -$lang['forwardClearPass'] = 'Posielať heslo ako nezakódovaný text nižšie uvedenému SQL príkazu namiesto použitia kódovania'; -$lang['checkPass'] = 'SQL príkaz pre kontrolu hesla'; -$lang['getUserInfo'] = 'SQL príkaz pre získanie informácií o používateľovi'; -$lang['getGroups'] = 'SQL príkaz pre získanie informácií o skupinách používateľa'; -$lang['getUsers'] = 'SQL príkaz pre získanie zoznamu používateľov'; -$lang['FilterLogin'] = 'SQL podmienka pre filtrovanie používateľov podľa prihlasovacieho mena'; -$lang['FilterName'] = 'SQL podmienka pre filtrovanie používateľov podľa mena a priezviska'; -$lang['FilterEmail'] = 'SQL podmienka pre filtrovanie používateľov podľa emailovej adresy'; -$lang['FilterGroup'] = 'SQL podmienka pre filtrovanie používateľov podľa skupiny'; -$lang['SortOrder'] = 'SQL podmienka pre usporiadenia používateľov'; -$lang['addUser'] = 'SQL príkaz pre pridanie nového používateľa'; -$lang['addGroup'] = 'SQL príkaz pre pridanie novej skupiny'; -$lang['addUserGroup'] = 'SQL príkaz pre pridanie používateľa do existujúcej skupiny'; -$lang['delGroup'] = 'SQL príkaz pre zrušenie skupiny'; -$lang['getUserID'] = 'SQL príkaz pre získanie primárneho klúča používateľa'; -$lang['delUser'] = 'SQL príkaz pre zrušenie používateľa'; -$lang['delUserRefs'] = 'SQL príkaz pre vyradenie používateľa zo všetkých skupín'; -$lang['updateUser'] = 'SQL príkaz pre aktualizáciu informácií o používateľovi'; -$lang['UpdateLogin'] = 'SQL podmienka pre aktualizáciu prihlasovacieho mena používateľa'; -$lang['UpdatePass'] = 'SQL podmienka pre aktualizáciu hesla používateľa'; -$lang['UpdateEmail'] = 'SQL podmienka pre aktualizáciu emailovej adresy používateľa'; -$lang['UpdateName'] = 'SQL podmienka pre aktualizáciu mena a priezviska používateľa'; -$lang['UpdateTarget'] = 'Podmienka identifikácie používateľa pri aktualizácii'; -$lang['delUserGroup'] = 'SQL príkaz pre vyradenie používateľa z danej skupiny'; -$lang['getGroupID'] = 'SQL príkaz pre získanie primárneho kľúča skupiny'; diff --git a/lib/plugins/authpgsql/lang/sl/settings.php b/lib/plugins/authpgsql/lang/sl/settings.php deleted file mode 100644 index 7110a6efd..000000000 --- a/lib/plugins/authpgsql/lang/sl/settings.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Matej Urbančič <mateju@svn.gnome.org> - */ -$lang['database'] = 'Podatkovna zbirka za uporabo'; -$lang['addUserGroup'] = 'Ukaz SQL za dodajanje uporabnika v obstoječo skupino'; -$lang['delGroup'] = 'Ukaz SQL za odstranitev skupine'; -$lang['getUserID'] = 'Ukaz SQL za pridobitev osnovnega ključa uporabnika'; -$lang['delUser'] = 'Ukaz SQL za izbris uporabnika'; -$lang['delUserRefs'] = 'Ukaz SQL za odstranitev uporabnika iz vseh skupin'; -$lang['updateUser'] = 'Ukaz SQL za posodobitev profila uporabnika'; -$lang['delUserGroup'] = 'Ukaz SQL za odstranitev uporabnika iz podane skupine'; -$lang['getGroupID'] = 'Ukaz SQL za pridobitev osnovnega ključa podane skupine'; diff --git a/lib/plugins/authpgsql/lang/sr/settings.php b/lib/plugins/authpgsql/lang/sr/settings.php deleted file mode 100644 index 4b1cd8bfe..000000000 --- a/lib/plugins/authpgsql/lang/sr/settings.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Марко М. Костић <marko.m.kostic@gmail.com> - */ -$lang['server'] = 'Ваш PostgreSQL сервер'; -$lang['port'] = 'Порт вашег PostgreSQL сервера'; -$lang['user'] = 'PostgreSQL корисничко име'; -$lang['password'] = 'Лозинка за корисника изнад'; -$lang['database'] = 'База коју треба користити'; -$lang['debug'] = 'Прикажи додатне податке за поправљање грешака'; -$lang['forwardClearPass'] = 'Пренеси корисничке лозинке као чист текст ка SQL упитима испод уместо коришћења passcrypt опције'; -$lang['checkPass'] = 'SQL упит за проверу лозинки'; -$lang['getUserInfo'] = 'SQL упит за добављање корисничких података'; -$lang['getGroups'] = 'SQL упит за добављање групних учлањења корисника'; -$lang['getUsers'] = 'SQL упит за листање свих корисника'; diff --git a/lib/plugins/authpgsql/lang/sv/settings.php b/lib/plugins/authpgsql/lang/sv/settings.php deleted file mode 100644 index 1082583dd..000000000 --- a/lib/plugins/authpgsql/lang/sv/settings.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Smorkster Andersson smorkster@gmail.com - */ -$lang['server'] = 'Din PostgreSQL server'; -$lang['port'] = 'Din PostgreSQL servers port'; -$lang['user'] = 'PostgreSQL användarnamn'; -$lang['password'] = 'Lösenord för användaren ovan'; -$lang['database'] = 'Databas att använda'; -$lang['debug'] = 'Visa ytterligare felsökningsinformation'; -$lang['forwardClearPass'] = 'Skicka lösenord för användare som klartext till SQL satserna nedan, istället för att använda krypteringsalternativet'; -$lang['checkPass'] = 'SQL sats för kontroll av lösenord'; -$lang['getUserInfo'] = 'SQL sats för att hämta användarinformation'; -$lang['getGroups'] = 'SQL sats för att hämta en användares gruppmedlemskap'; -$lang['getUsers'] = 'SQL sats för att lista alla användare'; -$lang['FilterLogin'] = 'SQL klausul för att filtrera användare efter inloggningsnamn'; -$lang['FilterName'] = 'SQL klausul för att filtrera användare efter fullt namn'; -$lang['FilterEmail'] = 'SQL klausul för att filtrera användare efter e-post adress'; -$lang['addUser'] = 'SQL sats för att lägga till en ny användare'; -$lang['addGroup'] = 'SQL sats för att lägga till en ny grupp'; -$lang['addUserGroup'] = 'SQL sats för att lägga till en användare i en existerande grupp'; -$lang['delGroup'] = 'SQL sats för att ta bort en grupp'; -$lang['delUser'] = 'SQL sats för att ta bort en användare'; -$lang['delUserRefs'] = 'SQL sats för att ta bort en användare från alla grupper'; -$lang['updateUser'] = 'SQL sats för att uppdatera en användarprofil'; -$lang['delUserGroup'] = 'SQL sats för att ta bort en användare från angiven grupp'; diff --git a/lib/plugins/authpgsql/lang/tr/settings.php b/lib/plugins/authpgsql/lang/tr/settings.php deleted file mode 100644 index f6fef9cde..000000000 --- a/lib/plugins/authpgsql/lang/tr/settings.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author İlker R. Kapaç <irifat@gmail.com> - */ -$lang['server'] = 'PostgreSQL sunucunuz'; -$lang['port'] = 'PostgreSQL sunucunuzun kapısı (port)'; -$lang['user'] = 'PostgreSQL kullanıcısının adı'; -$lang['password'] = 'Yukarıdaki kullanıcı için şifre'; -$lang['database'] = 'Kullanılacak veritabanı'; -$lang['debug'] = 'İlave hata ayıklama bilgisini görüntüle'; diff --git a/lib/plugins/authpgsql/lang/uk/settings.php b/lib/plugins/authpgsql/lang/uk/settings.php deleted file mode 100644 index 9a353414d..000000000 --- a/lib/plugins/authpgsql/lang/uk/settings.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author Nina Zolotova <nina-z@i.ua> - */ -$lang['database'] = 'Використовувати базу даних'; diff --git a/lib/plugins/authpgsql/lang/zh-tw/settings.php b/lib/plugins/authpgsql/lang/zh-tw/settings.php deleted file mode 100644 index b7dd9c6d8..000000000 --- a/lib/plugins/authpgsql/lang/zh-tw/settings.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author syaoranhinata@gmail.com - */ -$lang['server'] = '您的 PostgreSQL 伺服器'; -$lang['port'] = '您的 PostgreSQL 伺服器端口'; -$lang['user'] = 'PostgreSQL 使用者名稱'; -$lang['password'] = '上述使用者的密碼'; -$lang['database'] = '使用的資料庫'; -$lang['debug'] = '顯示額外除錯資訊'; -$lang['forwardClearPass'] = '以明文形式,把使用者密碼傳送给下列的 SQL 語句,而不使用 passcrypt 密碼加密選項'; -$lang['checkPass'] = '檢查密碼的 SQL 語句'; -$lang['getUserInfo'] = '獲取使用者訊息的 SQL 語句'; -$lang['getGroups'] = '獲取使用者群組成員身份的 SQL 語句'; -$lang['getUsers'] = '把所有使用者列出的 SQL 語句'; -$lang['FilterLogin'] = '根據登入名稱來篩選使用者的 SQL 子句'; -$lang['FilterName'] = '根據全名來篩選使用者的 SQL 子句'; -$lang['FilterEmail'] = '根據電郵地址來篩選使用者的 SQL 子句'; -$lang['FilterGroup'] = '根據群組成員身份來篩選使用者的 SQL 子句'; -$lang['SortOrder'] = '對使用者排序的 SQL 子句'; -$lang['addUser'] = '增加新使用者的 SQL 語句'; -$lang['addGroup'] = '增加新群組的 SQL 語句'; -$lang['addUserGroup'] = '把使用者新增至現有群組的 SQL 語句'; -$lang['delGroup'] = '把群組刪除的 SQL 語句'; -$lang['getUserID'] = '取得使用者主鍵的 SQL 語句'; -$lang['delUser'] = '把使用者刪除的 SQL 語句'; -$lang['delUserRefs'] = '把使用者從所有群組裏刪除的 SQL 語句'; -$lang['updateUser'] = '更新使用者訊息的 SQL 語句'; -$lang['UpdateLogin'] = '更新使用者登入名稱的 Update 子句'; -$lang['UpdatePass'] = '更新帳號密碼的 Update 子句'; -$lang['UpdateEmail'] = '更新使用者電郵地址的 Update 子句'; -$lang['UpdateName'] = '更新使用者全名的 Update 子句'; -$lang['UpdateTarget'] = '在更新時識別使用者的 Limit 子句'; -$lang['delUserGroup'] = '把使用者從指定群組中刪除的 SQL 語句'; -$lang['getGroupID'] = '取得指定群組主鍵的 SQL 語句'; diff --git a/lib/plugins/authpgsql/lang/zh/settings.php b/lib/plugins/authpgsql/lang/zh/settings.php deleted file mode 100644 index 5140d1127..000000000 --- a/lib/plugins/authpgsql/lang/zh/settings.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/** - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author lainme <lainme993@gmail.com> - */ -$lang['server'] = '您的 PostgreSQL 服务器'; -$lang['port'] = '您的 PostgreSQL 服务器端口'; -$lang['user'] = 'PostgreSQL 用户名'; -$lang['password'] = '上述用户的密码'; -$lang['database'] = '使用的数据库'; -$lang['debug'] = '显示额外调试信息'; -$lang['forwardClearPass'] = '将用户密码以明文形式传送给下面的 SQL 语句,而不使用 passcrypt 密码加密选项'; -$lang['checkPass'] = '检查密码的 SQL 语句'; -$lang['getUserInfo'] = '获取用户信息的 SQL 语句'; -$lang['getGroups'] = '获取用户的组成员身份的 SQL 语句'; -$lang['getUsers'] = '列出所有用户的 SQL 语句'; -$lang['FilterLogin'] = '根据登录名筛选用户的 SQL 子句'; -$lang['FilterName'] = '根据全名筛选用户的 SQL 子句'; -$lang['FilterEmail'] = '根据电子邮件地址筛选用户的 SQL 子句'; -$lang['FilterGroup'] = '根据组成员身份筛选用户的 SQL 子句'; -$lang['SortOrder'] = '对用户排序的 SQL 子句'; -$lang['addUser'] = '添加新用户的 SQL 语句'; -$lang['addGroup'] = '添加新组的 SQL 语句'; -$lang['addUserGroup'] = '将用户添加到现有组的 SQL 语句'; -$lang['delGroup'] = '删除组的 SQL 语句'; -$lang['getUserID'] = '获取用户主键的 SQL 语句'; -$lang['delUser'] = '删除用户的 SQL 语句'; -$lang['delUserRefs'] = '从所有组中删除一个用户的 SQL 语句'; -$lang['updateUser'] = '更新用户信息的 SQL 语句'; -$lang['UpdateLogin'] = '更新用户登录名的 Update 子句'; -$lang['UpdatePass'] = '更新用户密码的 Update 子句'; -$lang['UpdateEmail'] = '更新用户电子邮件地址的 Update 子句'; -$lang['UpdateName'] = '更新用户全名的 Update 子句'; -$lang['UpdateTarget'] = '更新时识别用户的 Limit 子句'; -$lang['delUserGroup'] = '从指定组删除用户的 SQL 语句'; -$lang['getGroupID'] = '获取指定组主键的 SQL 语句'; diff --git a/lib/plugins/authpgsql/plugin.info.txt b/lib/plugins/authpgsql/plugin.info.txt deleted file mode 100644 index 033c29179..000000000 --- a/lib/plugins/authpgsql/plugin.info.txt +++ /dev/null @@ -1,7 +0,0 @@ -base authpgsql -author Andreas Gohr -email andi@splitbrain.org -date 2015-07-13 -name [DEPRECATED] PostgreSQL Auth Plugin -desc ▶This plugin will be removed from DokuWiki in a future release! Use authpdo instead.◀ Provides user authentication against a PostgreSQL database -url http://www.dokuwiki.org/plugin:authpgsql diff --git a/lib/plugins/authplain/_test/conf/auth.users.php b/lib/plugins/authplain/_test/conf/auth.users.php new file mode 100644 index 000000000..87f54fedb --- /dev/null +++ b/lib/plugins/authplain/_test/conf/auth.users.php @@ -0,0 +1,16 @@ +# users.auth.php +# <?php exit()?> +# Don't modify the lines above +# +# Userfile +# +# Format: +# +# login:passwordhash:Real Name:email:groups,comma,separated + + +user_1:$1$tGu7CW5z$VpsMjRIx5tbyOJaQ2SP23.:Admin:admin@example.com:user,first_group +user_2:$1$2uJ5C3ib$edo0EDEb/yLAFHme7RK851:User 2:user2@example.com:user,second_group,third_group +user_3:$1$yqnlDqgZ$Sste968uKhuxH6wIQt6/D/:User 3:user3@example.com:user,fourth_group,first_group,third_group +user_4:$1$tXjajS9s$peoGPBQep.P245H1Lfloj0:User 4:user4@example.com:user,third_group +user_5:$1$IWrqdhol$xXOmufjZ2hW1aAVp7zDP.1:User 5:user5@example.com:user,second_group,fifth_group diff --git a/lib/plugins/authplain/_test/escaping.test.php b/lib/plugins/authplain/_test/escaping.test.php index a38940e1a..be4d06b4e 100644 --- a/lib/plugins/authplain/_test/escaping.test.php +++ b/lib/plugins/authplain/_test/escaping.test.php @@ -114,14 +114,14 @@ class auth_plugin_authplainharness extends auth_plugin_authplain { * @param boolean $bool */ public function setPregsplit_safe($bool) { - $this->_pregsplit_safe = $bool; + $this->pregsplit_safe = $bool; } /** * @return bool|mixed */ public function getPregsplit_safe(){ - return $this->_pregsplit_safe; + return $this->pregsplit_safe; } /** @@ -129,6 +129,6 @@ class auth_plugin_authplainharness extends auth_plugin_authplain { * @return array */ public function splitUserData($line){ - return $this->_splitUserData($line); + return parent::splitUserData($line); } } diff --git a/lib/plugins/authplain/_test/userdata.test.php b/lib/plugins/authplain/_test/userdata.test.php new file mode 100644 index 000000000..b80b39349 --- /dev/null +++ b/lib/plugins/authplain/_test/userdata.test.php @@ -0,0 +1,64 @@ +<?php + +/** + * Class userdata_test + * + * Test group retrieval + * + * @group plugins + */ +class userdata_test extends DokuWikiTest +{ + /** @var auth_plugin_authplain */ + protected $auth; + + /** + * Load auth with test conf + * @throws Exception + */ + public function setUp() + { + parent::setUp(); + global $config_cascade; + $config_cascade['plainauth.users']['default'] = __DIR__ . '/conf/auth.users.php'; + $this->auth = new auth_plugin_authplain(); + } + + /** + * Test that all groups are retrieved in the correct order, without duplicates + */ + public function test_retrieve_groups() + { + $expected = ['user', 'first_group', 'second_group', 'third_group', 'fourth_group', 'fifth_group']; + $actual = $this->auth->retrieveGroups(); + $this->assertEquals($expected, $actual); + } + + /** + * Test with small and large limits + */ + public function test_retrieve_groups_limit() + { + $expected = ['user', 'first_group']; + $actual = $this->auth->retrieveGroups(0, 2); + $this->assertEquals($expected, $actual); + + $expected = ['user', 'first_group', 'second_group', 'third_group', 'fourth_group', 'fifth_group']; + $actual = $this->auth->retrieveGroups(0, 20); + $this->assertEquals($expected, $actual); + } + + /** + * Test with small and large offsets + */ + public function test_retrieve_groups_offset() + { + $expected = ['third_group', 'fourth_group', 'fifth_group']; + $actual = $this->auth->retrieveGroups(3,10); + $this->assertEquals($expected, $actual); + + $expected = []; + $actual = $this->auth->retrieveGroups(10,3); + $this->assertEquals($expected, $actual); + } +} diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php index 7dfa43a4f..421af8847 100644 --- a/lib/plugins/authplain/auth.php +++ b/lib/plugins/authplain/auth.php @@ -1,6 +1,4 @@ <?php -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); /** * Plaintext authentication backend @@ -10,15 +8,16 @@ if(!defined('DOKU_INC')) die(); * @author Chris Smith <chris@jalakai.co.uk> * @author Jan Schumann <js@schumann-it.com> */ -class auth_plugin_authplain extends DokuWiki_Auth_Plugin { +class auth_plugin_authplain extends DokuWiki_Auth_Plugin +{ /** @var array user cache */ protected $users = null; /** @var array filter pattern */ - protected $_pattern = array(); + protected $pattern = array(); /** @var bool safe version of preg_split */ - protected $_pregsplit_safe = false; + protected $pregsplit_safe = false; /** * Constructor @@ -28,14 +27,15 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * * @author Christopher Smith <chris@jalakai.co.uk> */ - public function __construct() { + public function __construct() + { parent::__construct(); global $config_cascade; - if(!@is_readable($config_cascade['plainauth.users']['default'])) { + if (!@is_readable($config_cascade['plainauth.users']['default'])) { $this->success = false; } else { - if(@is_writable($config_cascade['plainauth.users']['default'])) { + if (@is_writable($config_cascade['plainauth.users']['default'])) { $this->cando['addUser'] = true; $this->cando['delUser'] = true; $this->cando['modLogin'] = true; @@ -46,9 +46,10 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { } $this->cando['getUsers'] = true; $this->cando['getUserCount'] = true; + $this->cando['getGroups'] = true; } - $this->_pregsplit_safe = version_compare(PCRE_VERSION,'6.7','>='); + $this->pregsplit_safe = version_compare(PCRE_VERSION, '6.7', '>='); } /** @@ -62,9 +63,10 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param string $pass * @return bool */ - public function checkPass($user, $pass) { + public function checkPass($user, $pass) + { $userinfo = $this->getUserData($user); - if($userinfo === false) return false; + if ($userinfo === false) return false; return auth_verifyPassword($pass, $this->users[$user]['pass']); } @@ -84,8 +86,9 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param bool $requireGroups (optional) ignored by this plugin, grps info always supplied * @return array|false */ - public function getUserData($user, $requireGroups=true) { - if($this->users === null) $this->_loadUserData(); + public function getUserData($user, $requireGroups = true) + { + if ($this->users === null) $this->loadUserData(); return isset($this->users[$user]) ? $this->users[$user] : false; } @@ -101,7 +104,8 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param array $grps list of groups the user is in * @return string */ - protected function _createUserLine($user, $pass, $name, $mail, $grps) { + protected function createUserLine($user, $pass, $name, $mail, $grps) + { $groups = join(',', $grps); $userline = array($user, $pass, $name, $mail, $groups); $userline = str_replace('\\', '\\\\', $userline); // escape \ as \\ @@ -129,12 +133,13 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param array $grps * @return bool|null|string */ - public function createUser($user, $pwd, $name, $mail, $grps = null) { + public function createUser($user, $pwd, $name, $mail, $grps = null) + { global $conf; global $config_cascade; // user mustn't already exist - if($this->getUserData($user) !== false) { + if ($this->getUserData($user) !== false) { msg($this->getLang('userexists'), -1); return false; } @@ -142,12 +147,12 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { $pass = auth_cryptPassword($pwd); // set default group if no groups specified - if(!is_array($grps)) $grps = array($conf['defaultgroup']); + if (!is_array($grps)) $grps = array($conf['defaultgroup']); // prepare user line - $userline = $this->_createUserLine($user, $pass, $name, $mail, $grps); + $userline = $this->createUserLine($user, $pass, $name, $mail, $grps); - if(!io_saveFile($config_cascade['plainauth.users']['default'], $userline, true)) { + if (!io_saveFile($config_cascade['plainauth.users']['default'], $userline, true)) { msg($this->getLang('writefail'), -1); return null; } @@ -164,38 +169,45 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param array $changes array of field/value pairs to be changed (password will be clear text) * @return bool */ - public function modifyUser($user, $changes) { + public function modifyUser($user, $changes) + { global $ACT; global $config_cascade; // sanity checks, user must already exist and there must be something to change - if(($userinfo = $this->getUserData($user)) === false) { + if (($userinfo = $this->getUserData($user)) === false) { msg($this->getLang('usernotexists'), -1); return false; } // don't modify protected users - if(!empty($userinfo['protected'])) { + if (!empty($userinfo['protected'])) { msg(sprintf($this->getLang('protected'), hsc($user)), -1); return false; } - if(!is_array($changes) || !count($changes)) return true; + if (!is_array($changes) || !count($changes)) return true; // update userinfo with new data, remembering to encrypt any password $newuser = $user; - foreach($changes as $field => $value) { - if($field == 'user') { + foreach ($changes as $field => $value) { + if ($field == 'user') { $newuser = $value; continue; } - if($field == 'pass') $value = auth_cryptPassword($value); + if ($field == 'pass') $value = auth_cryptPassword($value); $userinfo[$field] = $value; } - $userline = $this->_createUserLine($newuser, $userinfo['pass'], $userinfo['name'], $userinfo['mail'], $userinfo['grps']); + $userline = $this->createUserLine( + $newuser, + $userinfo['pass'], + $userinfo['name'], + $userinfo['mail'], + $userinfo['grps'] + ); - if(!io_replaceInFile($config_cascade['plainauth.users']['default'], '/^'.$user.':/', $userline, true)) { + if (!io_replaceInFile($config_cascade['plainauth.users']['default'], '/^'.$user.':/', $userline, true)) { msg('There was an error modifying your user data. You may need to register again.', -1); // FIXME, io functions should be fail-safe so existing data isn't lost $ACT = 'register'; @@ -213,24 +225,25 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param array $users array of users to be deleted * @return int the number of users deleted */ - public function deleteUsers($users) { + public function deleteUsers($users) + { global $config_cascade; - if(!is_array($users) || empty($users)) return 0; + if (!is_array($users) || empty($users)) return 0; - if($this->users === null) $this->_loadUserData(); + if ($this->users === null) $this->loadUserData(); $deleted = array(); - foreach($users as $user) { + foreach ($users as $user) { // don't delete protected users - if(!empty($this->users[$user]['protected'])) { + if (!empty($this->users[$user]['protected'])) { msg(sprintf($this->getLang('protected'), hsc($user)), -1); continue; } - if(isset($this->users[$user])) $deleted[] = preg_quote($user, '/'); + if (isset($this->users[$user])) $deleted[] = preg_quote($user, '/'); } - if(empty($deleted)) return 0; + if (empty($deleted)) return 0; $pattern = '/^('.join('|', $deleted).'):/'; if (!io_deleteFromFile($config_cascade['plainauth.users']['default'], $pattern, true)) { @@ -240,7 +253,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { // reload the user list and count the difference $count = count($this->users); - $this->_loadUserData(); + $this->loadUserData(); $count -= count($this->users); return $count; } @@ -253,17 +266,18 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param array $filter * @return int */ - public function getUserCount($filter = array()) { + public function getUserCount($filter = array()) + { - if($this->users === null) $this->_loadUserData(); + if ($this->users === null) $this->loadUserData(); - if(!count($filter)) return count($this->users); + if (!count($filter)) return count($this->users); $count = 0; - $this->_constructPattern($filter); + $this->constructPattern($filter); - foreach($this->users as $user => $info) { - $count += $this->_filter($user, $info); + foreach ($this->users as $user => $info) { + $count += $this->filter($user, $info); } return $count; @@ -279,23 +293,24 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param array $filter array of field/pattern pairs * @return array userinfo (refer getUserData for internal userinfo details) */ - public function retrieveUsers($start = 0, $limit = 0, $filter = array()) { + public function retrieveUsers($start = 0, $limit = 0, $filter = array()) + { - if($this->users === null) $this->_loadUserData(); + if ($this->users === null) $this->loadUserData(); ksort($this->users); $i = 0; $count = 0; $out = array(); - $this->_constructPattern($filter); + $this->constructPattern($filter); - foreach($this->users as $user => $info) { - if($this->_filter($user, $info)) { - if($i >= $start) { + foreach ($this->users as $user => $info) { + if ($this->filter($user, $info)) { + if ($i >= $start) { $out[$user] = $info; $count++; - if(($limit > 0) && ($count >= $limit)) break; + if (($limit > 0) && ($count >= $limit)) break; } $i++; } @@ -305,12 +320,36 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { } /** + * Retrieves groups. + * Loads complete user data into memory before searching for groups. + * + * @param int $start index of first group to be returned + * @param int $limit max number of groups to be returned + * @return array + */ + public function retrieveGroups($start = 0, $limit = 0) + { + $groups = []; + + if ($this->users === null) $this->loadUserData(); + foreach($this->users as $user => $info) { + $groups = array_merge($groups, array_diff($info['grps'], $groups)); + } + + if($limit > 0) { + return array_splice($groups, $start, $limit); + } + return array_splice($groups, $start); + } + + /** * Only valid pageid's (no namespaces) for usernames * * @param string $user * @return string */ - public function cleanUser($user) { + public function cleanUser($user) + { global $conf; return cleanID(str_replace(':', $conf['sepchar'], $user)); } @@ -321,7 +360,8 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param string $group * @return string */ - public function cleanGroup($group) { + public function cleanGroup($group) + { global $conf; return cleanID(str_replace(':', $conf['sepchar'], $group)); } @@ -333,15 +373,16 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> */ - protected function _loadUserData() { + protected function loadUserData() + { global $config_cascade; - $this->users = $this->_readUserFile($config_cascade['plainauth.users']['default']); + $this->users = $this->readUserFile($config_cascade['plainauth.users']['default']); // support protected users - if(!empty($config_cascade['plainauth.users']['protected'])) { - $protected = $this->_readUserFile($config_cascade['plainauth.users']['protected']); - foreach(array_keys($protected) as $key) { + if (!empty($config_cascade['plainauth.users']['protected'])) { + $protected = $this->readUserFile($config_cascade['plainauth.users']['protected']); + foreach (array_keys($protected) as $key) { $protected[$key]['protected'] = true; } $this->users = array_merge($this->users, $protected); @@ -356,17 +397,18 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param string $file the file to load data from * @return array */ - protected function _readUserFile($file) { + protected function readUserFile($file) + { $users = array(); - if(!file_exists($file)) return $users; + if (!file_exists($file)) return $users; $lines = file($file); - foreach($lines as $line) { + foreach ($lines as $line) { $line = preg_replace('/#.*$/', '', $line); //ignore comments $line = trim($line); - if(empty($line)) continue; + if (empty($line)) continue; - $row = $this->_splitUserData($line); + $row = $this->splitUserData($line); $row = str_replace('\\:', ':', $row); $row = str_replace('\\\\', '\\', $row); @@ -380,22 +422,29 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { return $users; } - protected function _splitUserData($line){ + /** + * Get the user line split into it's parts + * + * @param string $line + * @return string[] + */ + protected function splitUserData($line) + { // due to a bug in PCRE 6.6, preg_split will fail with the regex we use here // refer github issues 877 & 885 - if ($this->_pregsplit_safe){ + if ($this->pregsplit_safe) { return preg_split('/(?<![^\\\\]\\\\)\:/', $line, 5); // allow for : escaped as \: } $row = array(); $piece = ''; $len = strlen($line); - for($i=0; $i<$len; $i++){ - if ($line[$i]=='\\'){ + for ($i=0; $i<$len; $i++) { + if ($line[$i]=='\\') { $piece .= $line[$i]; $i++; if ($i>=$len) break; - } else if ($line[$i]==':'){ + } elseif ($line[$i]==':') { $row[] = $piece; $piece = ''; continue; @@ -416,14 +465,15 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * @param array $info User's userinfo array * @return bool */ - protected function _filter($user, $info) { - foreach($this->_pattern as $item => $pattern) { - if($item == 'user') { - if(!preg_match($pattern, $user)) return false; - } else if($item == 'grps') { - if(!count(preg_grep($pattern, $info['grps']))) return false; + protected function filter($user, $info) + { + foreach ($this->pattern as $item => $pattern) { + if ($item == 'user') { + if (!preg_match($pattern, $user)) return false; + } elseif ($item == 'grps') { + if (!count(preg_grep($pattern, $info['grps']))) return false; } else { - if(!preg_match($pattern, $info[$item])) return false; + if (!preg_match($pattern, $info[$item])) return false; } } return true; @@ -434,10 +484,11 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { * * @param array $filter */ - protected function _constructPattern($filter) { - $this->_pattern = array(); - foreach($filter as $item => $pattern) { - $this->_pattern[$item] = '/'.str_replace('/', '\/', $pattern).'/i'; // allow regex characters + protected function constructPattern($filter) + { + $this->pattern = array(); + foreach ($filter as $item => $pattern) { + $this->pattern[$item] = '/'.str_replace('/', '\/', $pattern).'/i'; // allow regex characters } } } diff --git a/lib/plugins/authplain/lang/ar/lang.php b/lib/plugins/authplain/lang/ar/lang.php index 16d59f397..59016acbb 100644 --- a/lib/plugins/authplain/lang/ar/lang.php +++ b/lib/plugins/authplain/lang/ar/lang.php @@ -1,6 +1,7 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * */ -$lang['userexists'] = 'عذرا، يوجد مشترك بنفس الاسم.'; +$lang['userexists'] = 'عذرا، يوجد مشترك بنفس الاسم.'; diff --git a/lib/plugins/authplain/lang/bg/lang.php b/lib/plugins/authplain/lang/bg/lang.php index 62e62dc13..f21b46517 100644 --- a/lib/plugins/authplain/lang/bg/lang.php +++ b/lib/plugins/authplain/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Kiril <neohidra@gmail.com> */ $lang['userexists'] = 'Вече съществува потребител с избраното име.'; diff --git a/lib/plugins/authplain/lang/da/lang.php b/lib/plugins/authplain/lang/da/lang.php index ff683ed38..dea4ea321 100644 --- a/lib/plugins/authplain/lang/da/lang.php +++ b/lib/plugins/authplain/lang/da/lang.php @@ -3,7 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jacob Palm <mail@jacobpalm.dk> * @author Kenneth Schack Banner <kescba@gmail.com> */ $lang['userexists'] = 'Dette brugernavn er allerede i brug.'; +$lang['usernotexists'] = 'Beklager, brugeren eksisterer ikke.'; $lang['writefail'] = 'Ude af stand til at redigere bruger data. Kontakt venligst Wiki-Administratoren'; +$lang['protected'] = 'Data for brugeren %s er beskyttet, og kan ikke ændres eller slettes.'; diff --git a/lib/plugins/authplain/lang/el/lang.php b/lib/plugins/authplain/lang/el/lang.php index 1d83eb170..d5b65ff74 100644 --- a/lib/plugins/authplain/lang/el/lang.php +++ b/lib/plugins/authplain/lang/el/lang.php @@ -3,5 +3,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Katerina Katapodi <extragold1234@hotmail.com> */ $lang['userexists'] = 'Αυτός ο λογαριασμός υπάρχει ήδη.'; +$lang['usernotexists'] = 'Λυπάμαι, αυτός ο χρήστης δεν υπάρχει.'; +$lang['writefail'] = 'Δεν μπόρεσε να τροποποιήσει τα δεδομένα χρήστη. Παρακαλώ ενημερώστε το Wiki-Admin'; +$lang['protected'] = ' Τα δεδομένα χρήστη %s είναι εμπιστευτικά και δεν μπορούν να τροποποιηθούν ή απαλειφθούν.'; diff --git a/lib/plugins/authplain/lang/fi/lang.php b/lib/plugins/authplain/lang/fi/lang.php index abdaf6720..efd96eaae 100644 --- a/lib/plugins/authplain/lang/fi/lang.php +++ b/lib/plugins/authplain/lang/fi/lang.php @@ -2,6 +2,6 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * */ $lang['userexists'] = 'Käyttäjä tällä käyttäjänimellä on jo olemassa.'; diff --git a/lib/plugins/authplain/lang/id/lang.php b/lib/plugins/authplain/lang/id/lang.php index 5e6a99830..e01136655 100644 --- a/lib/plugins/authplain/lang/id/lang.php +++ b/lib/plugins/authplain/lang/id/lang.php @@ -1,6 +1,7 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * */ -$lang['userexists'] = 'Maaf, user dengan user login ini telah ada.'; +$lang['userexists'] = 'Maaf, user dengan user login ini telah ada.'; diff --git a/lib/plugins/authplain/lang/is/lang.php b/lib/plugins/authplain/lang/is/lang.php index 21392ee5e..82088ddd2 100644 --- a/lib/plugins/authplain/lang/is/lang.php +++ b/lib/plugins/authplain/lang/is/lang.php @@ -1,6 +1,7 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * */ -$lang['userexists'] = 'Afsakið, notandi með þessu nafni er þegar skráður inn.'; +$lang['userexists'] = 'Afsakið, notandi með þessu nafni er þegar skráður inn.'; diff --git a/lib/plugins/authplain/lang/ja/lang.php b/lib/plugins/authplain/lang/ja/lang.php index f290cba58..cfaca13f2 100644 --- a/lib/plugins/authplain/lang/ja/lang.php +++ b/lib/plugins/authplain/lang/ja/lang.php @@ -3,9 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> * @author Hideaki SAWADA <chuno@live.jp> */ -$lang['userexists'] = 'このユーザー名は既に存在しています。'; -$lang['usernotexists'] = 'このユーザーは未登録です。'; +$lang['userexists'] = '恐れ入りますが、このユーザー名は既に存在しています。'; +$lang['usernotexists'] = '恐れ入りますが、このユーザーは未登録です。'; $lang['writefail'] = 'ユーザーデータを変更できません。管理者に問い合わせてください。'; $lang['protected'] = 'ユーザ %s のデータは保護されており、変更・削除はできません。'; diff --git a/lib/plugins/authplain/lang/km/lang.php b/lib/plugins/authplain/lang/km/lang.php index 322e454e5..eaac2de98 100644 --- a/lib/plugins/authplain/lang/km/lang.php +++ b/lib/plugins/authplain/lang/km/lang.php @@ -1,6 +1,7 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * */ -$lang['userexists'] = 'សុំអាទោស នាមប្រើនេះមានរួចហើ។'; +$lang['userexists'] = 'សុំអាទោស នាមប្រើនេះមានរួចហើ។'; diff --git a/lib/plugins/authplain/lang/ku/lang.php b/lib/plugins/authplain/lang/ku/lang.php index 64cb834f3..43406d6f0 100644 --- a/lib/plugins/authplain/lang/ku/lang.php +++ b/lib/plugins/authplain/lang/ku/lang.php @@ -1,6 +1,7 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * */ -$lang['userexists'] = 'Sorry, a user with this login already exists.'; +$lang['userexists'] = 'Sorry, a user with this login already exists.'; diff --git a/lib/plugins/authplain/lang/lt/lang.php b/lib/plugins/authplain/lang/lt/lang.php index 5ad435a04..b1834360f 100644 --- a/lib/plugins/authplain/lang/lt/lang.php +++ b/lib/plugins/authplain/lang/lt/lang.php @@ -1,6 +1,7 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * */ -$lang['userexists'] = 'Vartotojas su pasirinktu prisijungimo vardu jau egzistuoja.'; +$lang['userexists'] = 'Vartotojas su pasirinktu prisijungimo vardu jau egzistuoja.'; diff --git a/lib/plugins/authplain/lang/pt/lang.php b/lib/plugins/authplain/lang/pt/lang.php index 3334ea667..583c6b7cb 100644 --- a/lib/plugins/authplain/lang/pt/lang.php +++ b/lib/plugins/authplain/lang/pt/lang.php @@ -3,9 +3,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> * @author Paulo Carmino <contato@paulocarmino.com> * @author Guilherme Sá <guilherme.sa@hotmail.com> */ -$lang['userexists'] = 'Este utilizador já está inscrito. Por favor escolha outro nome de utilizador.'; -$lang['usernotexists'] = 'Desculpe, esse login não existe.'; -$lang['writefail'] = 'Incapaz de modificar dados do usuário. Favor informar ao Wiki-Admin.'; +$lang['userexists'] = 'Este nome de usuário já existe. Escolha outro.'; +$lang['usernotexists'] = 'Desculpe, esse usuário não existe.'; +$lang['writefail'] = 'Não foi possível modificar dados do usuário. Favor informar ao Wiki-Admin.'; +$lang['protected'] = 'Os dados do usuário %s estão protegidos e não podem ser modificados ou excluídos.'; diff --git a/lib/plugins/authplain/lang/th/lang.php b/lib/plugins/authplain/lang/th/lang.php index 463a27992..9e9e104cd 100644 --- a/lib/plugins/authplain/lang/th/lang.php +++ b/lib/plugins/authplain/lang/th/lang.php @@ -2,6 +2,6 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * */ $lang['userexists'] = 'ชื่อบัญชีที่ใส่นั้นมีผู้อื่นได้ใช้แล้ว กรุณาเลือกชื่อผู้ใช้อื่น'; diff --git a/lib/plugins/authplain/lang/tr/lang.php b/lib/plugins/authplain/lang/tr/lang.php index 6111085c2..946dd0e6b 100644 --- a/lib/plugins/authplain/lang/tr/lang.php +++ b/lib/plugins/authplain/lang/tr/lang.php @@ -2,6 +2,6 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * */ $lang['userexists'] = 'Üzgünüz, bu isime sahip bir kullanıcı zaten mevcut.'; diff --git a/lib/plugins/authplain/lang/vi/lang.php b/lib/plugins/authplain/lang/vi/lang.php index 7ecb0a27c..10278560a 100644 --- a/lib/plugins/authplain/lang/vi/lang.php +++ b/lib/plugins/authplain/lang/vi/lang.php @@ -1,6 +1,11 @@ <?php + /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Thien Hau <thienhausoftware@gmail.com> */ -$lang['userexists'] = 'Bạn khác đã dùng username này rồi.'; +$lang['userexists'] = 'Xin lỗi, thành viên có thông tin đăng nhập này đã tồn tại.'; +$lang['usernotexists'] = 'Xin lỗi, thành viên đó không tồn tại.'; +$lang['writefail'] = 'Không thể sửa đổi dữ liệu thành viên. Vui lòng thông báo cho Wiki-Admin'; +$lang['protected'] = 'Dữ liệu cho thành viên %s được bảo vệ và không thể sửa đổi hoặc xóa.'; diff --git a/lib/plugins/cli.php b/lib/plugins/cli.php index 721f54779..a3cbec722 100644 --- a/lib/plugins/cli.php +++ b/lib/plugins/cli.php @@ -1,11 +1,2 @@ <?php - -/** - * Base class for CLI plugins - * - * Provides DokuWiki plugin functionality on top of phpcli - */ -abstract class DokuWiki_CLI_Plugin extends \splitbrain\phpcli\CLI implements DokuWiki_PluginInterface { - use DokuWiki_PluginTrait; - -} +dbg_deprecated('Autoloading. Do not require() files yourself.'); diff --git a/lib/plugins/config/_test/configuration.test.php b/lib/plugins/config/_test/ConfigParserTest.php index 7455461a4..b7e33a539 100644 --- a/lib/plugins/config/_test/configuration.test.php +++ b/lib/plugins/config/_test/ConfigParserTest.php @@ -1,31 +1,20 @@ <?php + +namespace dokuwiki\plugin\config\test; + +use dokuwiki\plugin\config\core\ConfigParser; + /** * @group plugin_config * @group admin_plugins * @group plugins * @group bundled_plugins */ - -class plugin_config_configuration_test extends DokuWikiTest { - - private $config = ''; - private $meta = ''; - - /** - * Load config files - */ - function __construct() { - parent::__construct(); - - $this->config = dirname(__FILE__).'/data/config.php'; - $this->meta = dirname(__FILE__).'/data/metadata.php'; - require_once(dirname(__FILE__).'/../settings/config.class.php'); - } +class ConfigParserTest extends \DokuWikiTest { function test_readconfig() { - $confmgr = new configuration($this->meta); - - $conf = $confmgr->_read_config($this->config); + $parser = new ConfigParser(); + $conf = $parser->parse(__DIR__ . '/data/config.php'); // var_dump($conf); @@ -42,9 +31,8 @@ class plugin_config_configuration_test extends DokuWikiTest { } function test_readconfig_onoff() { - $confmgr = new configuration($this->meta); - - $conf = $confmgr->_read_config($this->config); + $parser = new ConfigParser(); + $conf = $parser->parse(__DIR__ . '/data/config.php'); // var_dump($conf); diff --git a/lib/plugins/config/_test/LoaderTest.php b/lib/plugins/config/_test/LoaderTest.php new file mode 100644 index 000000000..0c315842d --- /dev/null +++ b/lib/plugins/config/_test/LoaderTest.php @@ -0,0 +1,79 @@ +<?php + +namespace dokuwiki\plugin\config\test; + +use dokuwiki\plugin\config\core\ConfigParser; +use dokuwiki\plugin\config\core\Loader; + +/** + * @group plugin_config + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ +class LoaderTest extends \DokuWikiTest { + + protected $pluginsEnabled = ['testing']; + + /** + * Ensure loading the config meta data works + */ + public function testMetaData() { + $loader = new Loader(new ConfigParser()); + + $meta = $loader->loadMeta(); + $this->assertTrue(is_array($meta)); + + // there should be some defaults + $this->assertArrayHasKey('savedir', $meta); + $this->assertEquals(['savedir', '_caution' => 'danger'], $meta['savedir']); + $this->assertArrayHasKey('proxy____port', $meta); + $this->assertEquals(['numericopt'], $meta['proxy____port']); + + // there should be plugin info + $this->assertArrayHasKey('plugin____testing____plugin_settings_name', $meta); + $this->assertEquals(['fieldset'], $meta['plugin____testing____plugin_settings_name']); + $this->assertArrayHasKey('plugin____testing____schnibble', $meta); + $this->assertEquals(['onoff'], $meta['plugin____testing____schnibble']); + } + + /** + * Ensure loading the defaults work + */ + public function testDefaults() { + $loader = new Loader(new ConfigParser()); + + $conf = $loader->loadDefaults(); + $this->assertTrue(is_array($conf)); + + // basic defaults + $this->assertArrayHasKey('title', $conf); + $this->assertEquals('DokuWiki', $conf['title']); + + // plugin defaults + $this->assertArrayHasKey('plugin____testing____schnibble', $conf); + $this->assertEquals(0, $conf['plugin____testing____schnibble']); + } + + /** + * Ensure language loading works + */ + public function testLangs() { + $loader = new Loader(new ConfigParser()); + + $lang = $loader->loadLangs(); + $this->assertTrue(is_array($lang)); + + // basics are not included in the returned array! + $this->assertArrayNotHasKey('title', $lang); + + // plugin strings + $this->assertArrayHasKey('plugin____testing____plugin_settings_name', $lang); + $this->assertEquals('Testing', $lang['plugin____testing____plugin_settings_name']); + $this->assertArrayHasKey('plugin____testing____schnibble', $lang); + $this->assertEquals( + 'Turns on the schnibble before the frobble is used', + $lang['plugin____testing____schnibble'] + ); + } +} diff --git a/lib/plugins/config/_test/Setting/AbstractSettingTest.php b/lib/plugins/config/_test/Setting/AbstractSettingTest.php new file mode 100644 index 000000000..d18f0ec17 --- /dev/null +++ b/lib/plugins/config/_test/Setting/AbstractSettingTest.php @@ -0,0 +1,99 @@ +<?php + +namespace dokuwiki\plugin\config\test\Setting; + +use dokuwiki\plugin\config\core\Setting\Setting; + +abstract class AbstractSettingTest extends \DokuWikiTest { + + /** @var string the class to test */ + protected $class; + + /** + * Sets up the proper class to test based on the test's class name + * @throws \Exception + */ + public function setUp() { + parent::setUp(); + $class = get_class($this); + $class = substr($class, strrpos($class, '\\') + 1, -4); + $class = 'dokuwiki\\plugin\\config\\core\\Setting\\' . $class; + $this->class = $class; + } + + public function testInitialBasics() { + /** @var Setting $setting */ + $setting = new $this->class('test'); + $this->assertEquals('test', $setting->getKey()); + $this->assertSame(false, $setting->isProtected()); + $this->assertSame(true, $setting->isDefault()); + $this->assertSame(false, $setting->hasError()); + $this->assertSame(false, $setting->shouldBeSaved()); + } + + public function testShouldHaveDefault() { + /** @var Setting $setting */ + $setting = new $this->class('test'); + $this->assertSame(true, $setting->shouldHaveDefault()); + } + + public function testPrettyKey() { + /** @var Setting $setting */ + $setting = new $this->class('test'); + $this->assertEquals('test', $setting->getPrettyKey(false)); + + $setting = new $this->class('test____foo'); + $this->assertEquals('test»foo', $setting->getPrettyKey(false)); + + $setting = new $this->class('test'); + $this->assertEquals( + '<a href="http://www.dokuwiki.org/config:test">test</a>', + $setting->getPrettyKey(true) + ); + + $setting = new $this->class('test____foo'); + $this->assertEquals('test»foo', $setting->getPrettyKey(true)); + + $setting = new $this->class('start'); + $this->assertEquals( + '<a href="http://www.dokuwiki.org/config:startpage">start</a>', + $setting->getPrettyKey(true) + ); + } + + public function testType() { + /** @var Setting $setting */ + $setting = new $this->class('test'); + $this->assertEquals('dokuwiki', $setting->getType()); + + $setting = new $this->class('test_foo'); + $this->assertEquals('dokuwiki', $setting->getType()); + + $setting = new $this->class('plugin____test'); + $this->assertEquals('plugin', $setting->getType()); + + $setting = new $this->class('tpl____test'); + $this->assertEquals('template', $setting->getType()); + } + + public function testCaution() { + /** @var Setting $setting */ + $setting = new $this->class('test'); + $this->assertEquals(false, $setting->caution()); + + $setting = new $this->class('test', ['_caution' => 'warning']); + $this->assertEquals('warning', $setting->caution()); + + $setting = new $this->class('test', ['_caution' => 'danger']); + $this->assertEquals('danger', $setting->caution()); + + $setting = new $this->class('test', ['_caution' => 'security']); + $this->assertEquals('security', $setting->caution()); + + $setting = new $this->class('test', ['_caution' => 'flargh']); + $this->expectException(\RuntimeException::class); + $setting->caution(); + } + + +} diff --git a/lib/plugins/config/_test/Setting/SettingArrayTest.php b/lib/plugins/config/_test/Setting/SettingArrayTest.php new file mode 100644 index 000000000..09dcf1421 --- /dev/null +++ b/lib/plugins/config/_test/Setting/SettingArrayTest.php @@ -0,0 +1,20 @@ +<?php + +namespace dokuwiki\plugin\config\test\Setting; + +/** + * @group plugin_config + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ +class SettingArrayTest extends SettingTest { + + /** @inheritdoc */ + public function dataOut() { + return [ + [ ['foo','bar'], "\$conf['test'] = array('foo', 'bar');\n"] + ]; + } + +} diff --git a/lib/plugins/config/_test/Setting/SettingNumericTest.php b/lib/plugins/config/_test/Setting/SettingNumericTest.php new file mode 100644 index 000000000..6248a06b7 --- /dev/null +++ b/lib/plugins/config/_test/Setting/SettingNumericTest.php @@ -0,0 +1,24 @@ +<?php + +namespace dokuwiki\plugin\config\test\Setting; + +/** + * @group plugin_config + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ +class SettingNumericTest extends SettingTest { + + /** @inheritdoc */ + public function dataOut() { + return [ + [42, "\$conf['test'] = 42;\n"], + [0, "\$conf['test'] = 0;\n"], + [-42, "\$conf['test'] = -42;\n"], + [-42.13, "\$conf['test'] = -42.13;\n"], + ['12*13', "\$conf['test'] = 12*13;\n"], + ]; + } + +} diff --git a/lib/plugins/config/_test/Setting/SettingNumericoptTest.php b/lib/plugins/config/_test/Setting/SettingNumericoptTest.php new file mode 100644 index 000000000..9d29f31e7 --- /dev/null +++ b/lib/plugins/config/_test/Setting/SettingNumericoptTest.php @@ -0,0 +1,23 @@ +<?php + +namespace dokuwiki\plugin\config\test\Setting; + +/** + * @group plugin_config + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ +class SettingNumericoptTest extends SettingNumericTest { + + /** @inheritdoc */ + public function dataOut() { + return array_merge( + parent::dataOut(), + [ + ['', "\$conf['test'] = '';\n"], + ] + ); + } + +} diff --git a/lib/plugins/config/_test/Setting/SettingOnoffTest.php b/lib/plugins/config/_test/Setting/SettingOnoffTest.php new file mode 100644 index 000000000..d6561bdf1 --- /dev/null +++ b/lib/plugins/config/_test/Setting/SettingOnoffTest.php @@ -0,0 +1,72 @@ +<?php + +namespace dokuwiki\plugin\config\test\Setting; + +/** + * @group plugin_config + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ +class SettingOnoffTest extends SettingTest { + + /** @inheritdoc */ + public function dataOut() { + return [ + [1, "\$conf['test'] = 1;\n"], + [0, "\$conf['test'] = 0;\n"], + + ['1', "\$conf['test'] = 1;\n"], + ['0', "\$conf['test'] = 0;\n"], + + ['on', "\$conf['test'] = 1;\n"], + ['off', "\$conf['test'] = 0;\n"], + + ['true', "\$conf['test'] = 1;\n"], + ['false', "\$conf['test'] = 0;\n"], + + ['On', "\$conf['test'] = 1;\n"], + ['Off', "\$conf['test'] = 0;\n"], + + ['True', "\$conf['test'] = 1;\n"], + ['False', "\$conf['test'] = 0;\n"], + + [true, "\$conf['test'] = 1;\n"], + [false, "\$conf['test'] = 0;\n"], + + [3, "\$conf['test'] = 1;\n"], + ['3', "\$conf['test'] = 1;\n"], + + ['', "\$conf['test'] = 0;\n"], + [' ', "\$conf['test'] = 0;\n"], + ]; + } + + /** @inheritdoc */ + public function dataShouldBeSaved() { + return [ + [0, null, false], + [1, null, false], + [0, 0, false], + [1, 1, false], + [0, 1, true], + [1, 0, true], + + ['0', '0', false], + ['1', '1', false], + ['0', '1', true], + ['1', '0', true], + + ['0', 0, false], + ['1', 1, false], + ['0', 1, true], + ['1', 0, true], + + [0, '0', false], + [1, '1', false], + [0, '1', true], + [1, '0', true], + ]; + } + +} diff --git a/lib/plugins/config/_test/Setting/SettingStringTest.php b/lib/plugins/config/_test/Setting/SettingStringTest.php new file mode 100644 index 000000000..3d6a71c9d --- /dev/null +++ b/lib/plugins/config/_test/Setting/SettingStringTest.php @@ -0,0 +1,13 @@ +<?php + +namespace dokuwiki\plugin\config\test\Setting; + +/** + * @group plugin_config + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ +class SettingStringTest extends SettingTest { + +} diff --git a/lib/plugins/config/_test/Setting/SettingTest.php b/lib/plugins/config/_test/Setting/SettingTest.php new file mode 100644 index 000000000..49e0662e0 --- /dev/null +++ b/lib/plugins/config/_test/Setting/SettingTest.php @@ -0,0 +1,70 @@ +<?php + +namespace dokuwiki\plugin\config\test\Setting; + +use dokuwiki\plugin\config\core\Setting\Setting; + +/** + * @group plugin_config + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ +class SettingTest extends AbstractSettingTest { + + /** + * Dataprovider for testOut() + * + * @return array + */ + public function dataOut() { + return [ + ['bar', "\$conf['test'] = 'bar';\n"], + ["foo'bar", "\$conf['test'] = 'foo\\'bar';\n"], + ]; + } + + /** + * Check the output + * + * @param mixed $in The value to initialize the setting with + * @param string $out The expected output (for conf[test]) + * @dataProvider dataOut + */ + public function testOut($in, $out) { + /** @var Setting $setting */ + $setting = new $this->class('test'); + $setting->initialize('ignore', $in); + + $this->assertEquals($out, $setting->out('conf')); + } + + /** + * DataProvider for testShouldBeSaved() + * + * @return array + */ + public function dataShouldBeSaved() { + return [ + ['default', null, false], + ['default', 'default', false], + ['default', 'new', true], + ]; + } + + /** + * Check if shouldBeSaved works as expected + * + * @dataProvider dataShouldBeSaved + * @param mixed $default The default value + * @param mixed $local The current local value + * @param bool $expect The expected outcome + */ + public function testShouldBeSaved($default, $local, $expect) { + /** @var Setting $setting */ + $setting = new $this->class('test'); + $setting->initialize($default, $local, null); + $this->assertSame($expect, $setting->shouldBeSaved()); + } + +} diff --git a/lib/plugins/config/_test/WriterTest.php b/lib/plugins/config/_test/WriterTest.php new file mode 100644 index 000000000..739f68be4 --- /dev/null +++ b/lib/plugins/config/_test/WriterTest.php @@ -0,0 +1,63 @@ +<?php + +namespace dokuwiki\plugin\config\test; +use dokuwiki\plugin\config\core\Setting\SettingString; +use dokuwiki\plugin\config\core\Writer; + +/** + * @group plugin_config + * @group admin_plugins + * @group plugins + * @group bundled_plugins + */ +class WriterTest extends \DokuWikiTest { + + public function testSave() { + global $config_cascade; + $config = end($config_cascade['main']['local']); + + $set1 = new SettingString('test1'); + $set1->initialize('foo','bar', null); + $set2 = new SettingString('test2'); + $set2->initialize('foo','foo', null); + $settings = [$set1, $set2]; + $writer = new Writer(); + + // before running, no backup should exist + $this->assertFileExists($config); + $this->assertFileNotExists("$config.bak.php"); + $old = filesize($config); + + /** @noinspection PhpUnhandledExceptionInspection */ + $writer->save($settings); + + // after running, both should exist + $this->assertFileExists($config); + $this->assertFileExists("$config.bak.php"); + $this->assertEquals($old, filesize("$config.bak.php"), 'backup should have size of old file'); + + // check contents + $conf = []; + include $config; + $this->assertArrayHasKey('test1', $conf); + $this->assertEquals('bar', $conf['test1']); + $this->assertArrayNotHasKey('test2', $conf); + + /** @noinspection PhpUnhandledExceptionInspection */ + $writer->save($settings); + $this->assertEquals(filesize($config), filesize("$config.bak.php")); + } + + public function testTouch() { + global $config_cascade; + $config = end($config_cascade['main']['local']); + $writer = new Writer(); + + $old = filemtime($config); + $this->waitForTick(true); + /** @noinspection PhpUnhandledExceptionInspection */ + $writer->touch(); + clearstatcache($config); + $this->assertGreaterThan($old, filemtime($config)); + } +} diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 76ecae24c..219612cf1 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -6,17 +6,11 @@ * @author Christopher Smith <chris@jalakai.co.uk> * @author Ben Coburn <btcoburn@silicodon.net> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); -define('CM_KEYMARKER','____'); // used for settings with multiple dimensions of array indices - -define('PLUGIN_SELF',dirname(__FILE__).'/'); -define('PLUGIN_METADATA',PLUGIN_SELF.'settings/config.metadata.php'); -if(!defined('DOKU_PLUGIN_IMAGES')) define('DOKU_PLUGIN_IMAGES',DOKU_BASE.'lib/plugins/config/images/'); - -require_once(PLUGIN_SELF.'settings/config.class.php'); // main configuration class and generic settings classes -require_once(PLUGIN_SELF.'settings/extra.class.php'); // settings classes specific to these settings +use dokuwiki\plugin\config\core\Configuration; +use dokuwiki\plugin\config\core\Setting\Setting; +use dokuwiki\plugin\config\core\Setting\SettingFieldset; +use dokuwiki\plugin\config\core\Setting\SettingHidden; /** * All DokuWiki plugins to extend the admin function @@ -24,18 +18,17 @@ require_once(PLUGIN_SELF.'settings/extra.class.php'); // settings classes spec */ class admin_plugin_config extends DokuWiki_Admin_Plugin { - protected $_file = PLUGIN_METADATA; - protected $_config = null; - protected $_input = null; - protected $_changed = false; // set to true if configuration has altered - protected $_error = false; - protected $_session_started = false; - protected $_localised_prompts = false; + const IMGDIR = DOKU_BASE . 'lib/plugins/config/images/'; + + /** @var Configuration */ + protected $configuration; + + /** @var bool were there any errors in the submitted data? */ + protected $hasErrors = false; + + /** @var bool have the settings translations been loaded? */ + protected $promptsLocalized = false; - /** - * @return int - */ - public function getMenuSort() { return 100; } /** * handle user request @@ -43,44 +36,33 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { public function handle() { global $ID, $INPUT; - if(!$this->_restore_session() || $INPUT->int('save') != 1 || !checkSecurityToken()) { - $this->_close_session(); - return; - } + // always initialize the configuration + $this->configuration = new Configuration(); - if(is_null($this->_config)) { - $this->_config = new configuration($this->_file); - } - - // don't go any further if the configuration is locked - if($this->_config->locked) { - $this->_close_session(); + if(!$INPUT->bool('save') || !checkSecurityToken()) { return; } - $this->_input = $INPUT->arr('config'); - - foreach ($this->_config->setting as $key => $value){ - $input = isset($this->_input[$key]) ? $this->_input[$key] : null; - if ($this->_config->setting[$key]->update($input)) { - $this->_changed = true; + // don't go any further if the configuration is locked + if($this->configuration->isLocked()) return; + + // update settings and redirect of successful + $ok = $this->configuration->updateSettings($INPUT->arr('config')); + if($ok) { // no errors + try { + if($this->configuration->hasChanged()) { + $this->configuration->save(); + } else { + $this->configuration->touch(); + } + msg($this->getLang('updated'), 1); + } catch(Exception $e) { + msg($this->getLang('error'), -1); } - if ($this->_config->setting[$key]->error()) $this->_error = true; + send_redirect(wl($ID, array('do' => 'admin', 'page' => 'config'), true, '&')); + } else { + $this->hasErrors = true; } - - if ($this->_changed && !$this->_error) { - $this->_config->save_settings($this->getPluginName()); - - // save state & force a page reload to get the new settings to take effect - $_SESSION['PLUGIN_CONFIG'] = array('state' => 'updated', 'time' => time()); - $this->_close_session(); - send_redirect(wl($ID,array('do'=>'admin','page'=>'config'),true,'&')); - exit(); - } elseif(!$this->_error) { - $this->_config->touch_settings(); // just touch to refresh cache - } - - $this->_close_session(); } /** @@ -91,234 +73,137 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { global $lang; global $ID; - if (is_null($this->_config)) { $this->_config = new configuration($this->_file); } $this->setupLocale(true); - print $this->locale_xhtml('intro'); + echo $this->locale_xhtml('intro'); - ptln('<div id="config__manager">'); + echo '<div id="config__manager">'; - if ($this->_config->locked) - ptln('<div class="info">'.$this->getLang('locked').'</div>'); - elseif ($this->_error) - ptln('<div class="error">'.$this->getLang('error').'</div>'); - elseif ($this->_changed) - ptln('<div class="success">'.$this->getLang('updated').'</div>'); + if($this->configuration->isLocked()) { + echo '<div class="info">' . $this->getLang('locked') . '</div>'; + } // POST to script() instead of wl($ID) so config manager still works if // rewrite config is broken. Add $ID as hidden field to remember // current ID in most cases. - ptln('<form action="'.script().'" method="post">'); - ptln('<div class="no"><input type="hidden" name="id" value="'.$ID.'" /></div>'); + echo '<form id="dw__configform" action="' . script() . '" method="post">'; + echo '<div class="no"><input type="hidden" name="id" value="' . $ID . '" /></div>'; formSecurityToken(); - $this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki')); + $this->printH1('dokuwiki_settings', $this->getLang('_header_dokuwiki')); - /** @var setting[] $undefined_settings */ - $undefined_settings = array(); $in_fieldset = false; $first_plugin_fieldset = true; $first_template_fieldset = true; - foreach($this->_config->setting as $setting) { - if (is_a($setting, 'setting_hidden')) { - // skip hidden (and undefined) settings - if ($allow_debug && is_a($setting, 'setting_undefined')) { - $undefined_settings[] = $setting; - } else { - continue; - } - } else if (is_a($setting, 'setting_fieldset')) { + foreach($this->configuration->getSettings() as $setting) { + if(is_a($setting, SettingHidden::class)) { + continue; + } else if(is_a($setting, settingFieldset::class)) { // config setting group - if ($in_fieldset) { - ptln(' </table>'); - ptln(' </div>'); - ptln(' </fieldset>'); + if($in_fieldset) { + echo '</table>'; + echo '</div>'; + echo '</fieldset>'; } else { $in_fieldset = true; } - if ($first_plugin_fieldset && substr($setting->_key, 0, 10)=='plugin'.CM_KEYMARKER) { - $this->_print_h1('plugin_settings', $this->getLang('_header_plugin')); + if($first_plugin_fieldset && $setting->getType() == 'plugin') { + $this->printH1('plugin_settings', $this->getLang('_header_plugin')); $first_plugin_fieldset = false; - } else if ($first_template_fieldset && substr($setting->_key, 0, 7)=='tpl'.CM_KEYMARKER) { - $this->_print_h1('template_settings', $this->getLang('_header_template')); + } else if($first_template_fieldset && $setting->getType() == 'template') { + $this->printH1('template_settings', $this->getLang('_header_template')); $first_template_fieldset = false; } - ptln(' <fieldset id="'.$setting->_key.'">'); - ptln(' <legend>'.$setting->prompt($this).'</legend>'); - ptln(' <div class="table">'); - ptln(' <table class="inline">'); + echo '<fieldset id="' . $setting->getKey() . '">'; + echo '<legend>' . $setting->prompt($this) . '</legend>'; + echo '<div class="table">'; + echo '<table class="inline">'; } else { // config settings - list($label,$input) = $setting->html($this, $this->_error); - - $class = $setting->is_default() ? ' class="default"' : ($setting->is_protected() ? ' class="protected"' : ''); - $error = $setting->error() ? ' class="value error"' : ' class="value"'; - $icon = $setting->caution() ? '<img src="'.DOKU_PLUGIN_IMAGES.$setting->caution().'.png" alt="'.$setting->caution().'" title="'.$this->getLang($setting->caution()).'" />' : ''; - - ptln(' <tr'.$class.'>'); - ptln(' <td class="label">'); - ptln(' <span class="outkey">'.$setting->_out_key(true, true).'</span>'); - ptln(' '.$icon.$label); - ptln(' </td>'); - ptln(' <td'.$error.'>'.$input.'</td>'); - ptln(' </tr>'); + list($label, $input) = $setting->html($this, $this->hasErrors); + + $class = $setting->isDefault() + ? ' class="default"' + : ($setting->isProtected() ? ' class="protected"' : ''); + $error = $setting->hasError() + ? ' class="value error"' + : ' class="value"'; + $icon = $setting->caution() + ? '<img src="' . self::IMGDIR . $setting->caution() . '.png" ' . + 'alt="' . $setting->caution() . '" title="' . $this->getLang($setting->caution()) . '" />' + : ''; + + echo '<tr' . $class . '>'; + echo '<td class="label">'; + echo '<span class="outkey">' . $setting->getPrettyKey() . '</span>'; + echo $icon . $label; + echo '</td>'; + echo '<td' . $error . '>' . $input . '</td>'; + echo '</tr>'; } } - ptln(' </table>'); - ptln(' </div>'); - if ($in_fieldset) { - ptln(' </fieldset>'); + echo '</table>'; + echo '</div>'; + if($in_fieldset) { + echo '</fieldset>'; } // show undefined settings list - if ($allow_debug && !empty($undefined_settings)) { + $undefined_settings = $this->configuration->getUndefined(); + if($allow_debug && !empty($undefined_settings)) { /** * Callback for sorting settings * - * @param setting $a - * @param setting $b + * @param Setting $a + * @param Setting $b * @return int if $a is lower/equal/higher than $b */ - function _setting_natural_comparison($a, $b) { - return strnatcmp($a->_key, $b->_key); + function settingNaturalComparison($a, $b) { + return strnatcmp($a->getKey(), $b->getKey()); } - usort($undefined_settings, '_setting_natural_comparison'); - $this->_print_h1('undefined_settings', $this->getLang('_header_undefined')); - ptln('<fieldset>'); - ptln('<div class="table">'); - ptln('<table class="inline">'); - $undefined_setting_match = array(); + usort($undefined_settings, 'settingNaturalComparison'); + $this->printH1('undefined_settings', $this->getLang('_header_undefined')); + echo '<fieldset>'; + echo '<div class="table">'; + echo '<table class="inline">'; foreach($undefined_settings as $setting) { - if (preg_match('/^(?:plugin|tpl)'.CM_KEYMARKER.'.*?'.CM_KEYMARKER.'(.*)$/', $setting->_key, $undefined_setting_match)) { - $undefined_setting_key = $undefined_setting_match[1]; - } else { - $undefined_setting_key = $setting->_key; - } - ptln(' <tr>'); - ptln(' <td class="label"><span title="$meta[\''.$undefined_setting_key.'\']">$'.$this->_config->_name.'[\''.$setting->_out_key().'\']</span></td>'); - ptln(' <td>'.$this->getLang('_msg_'.get_class($setting)).'</td>'); - ptln(' </tr>'); + list($label, $input) = $setting->html($this); + echo '<tr>'; + echo '<td class="label">' . $label . '</td>'; + echo '<td>' . $input . '</td>'; + echo '</tr>'; } - ptln('</table>'); - ptln('</div>'); - ptln('</fieldset>'); + echo '</table>'; + echo '</div>'; + echo '</fieldset>'; } // finish up form - ptln('<p>'); - ptln(' <input type="hidden" name="do" value="admin" />'); - ptln(' <input type="hidden" name="page" value="config" />'); - - if (!$this->_config->locked) { - ptln(' <input type="hidden" name="save" value="1" />'); - ptln(' <button type="submit" name="submit" accesskey="s">'.$lang['btn_save'].'</button>'); - ptln(' <button type="reset">'.$lang['btn_reset'].'</button>'); - } - - ptln('</p>'); - - ptln('</form>'); - ptln('</div>'); - } - - /** - * @return boolean true - proceed with handle, false - don't proceed - */ - protected function _restore_session() { - - // dokuwiki closes the session before act_dispatch. $_SESSION variables are all set, - // however they can't be changed without starting the session again - if (!headers_sent()) { - session_start(); - $this->_session_started = true; + echo '<p>'; + echo '<input type="hidden" name="do" value="admin" />'; + echo '<input type="hidden" name="page" value="config" />'; + + if(!$this->configuration->isLocked()) { + echo '<input type="hidden" name="save" value="1" />'; + echo '<button type="submit" name="submit" accesskey="s">' . $lang['btn_save'] . '</button>'; + echo '<button type="reset">' . $lang['btn_reset'] . '</button>'; } - if (!isset($_SESSION['PLUGIN_CONFIG'])) return true; + echo '</p>'; - $session = $_SESSION['PLUGIN_CONFIG']; - unset($_SESSION['PLUGIN_CONFIG']); - - // still valid? - if (time() - $session['time'] > 120) return true; - - switch ($session['state']) { - case 'updated' : - $this->_changed = true; - return false; - } - - return true; - } - - protected function _close_session() { - if ($this->_session_started) session_write_close(); + echo '</form>'; + echo '</div>'; } /** * @param bool $prompts */ - public function setupLocale($prompts=false) { - + public function setupLocale($prompts = false) { parent::setupLocale(); - if (!$prompts || $this->_localised_prompts) return; - - $this->_setup_localised_plugin_prompts(); - $this->_localised_prompts = true; - - } - - /** - * @return bool - */ - protected function _setup_localised_plugin_prompts() { - global $conf; - - $langfile = '/lang/'.$conf['lang'].'/settings.php'; - $enlangfile = '/lang/en/settings.php'; - - if ($dh = opendir(DOKU_PLUGIN)) { - while (false !== ($plugin = readdir($dh))) { - if ($plugin == '.' || $plugin == '..' || $plugin == 'tmp' || $plugin == 'config') continue; - if (is_file(DOKU_PLUGIN.$plugin)) continue; - - if (file_exists(DOKU_PLUGIN.$plugin.$enlangfile)){ - $lang = array(); - @include(DOKU_PLUGIN.$plugin.$enlangfile); - if ($conf['lang'] != 'en') @include(DOKU_PLUGIN.$plugin.$langfile); - foreach ($lang as $key => $value){ - $this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value; - } - } - - // fill in the plugin name if missing (should exist for plugins with settings) - if (!isset($this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'])) { - $this->lang['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'] = - ucwords(str_replace('_', ' ', $plugin)); - } - } - closedir($dh); - } - - // the same for the active template - $tpl = $conf['template']; - - if (file_exists(tpl_incdir().$enlangfile)){ - $lang = array(); - @include(tpl_incdir().$enlangfile); - if ($conf['lang'] != 'en') @include(tpl_incdir().$langfile); - foreach ($lang as $key => $value){ - $this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value; - } - } - - // fill in the template name if missing (should exist for templates with settings) - if (!isset($this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'])) { - $this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'] = - ucwords(str_replace('_', ' ', $tpl)); - } - - return true; + if(!$prompts || $this->promptsLocalized) return; + $this->lang = array_merge($this->lang, $this->configuration->getLangs()); + $this->promptsLocalized = true; } /** @@ -329,76 +214,69 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { * @return array */ public function getTOC() { - if (is_null($this->_config)) { $this->_config = new configuration($this->_file); } $this->setupLocale(true); $allow_debug = $GLOBALS['conf']['allowdebug']; // avoid global $conf; here. + $toc = array(); + $check = false; - // gather toc data - $has_undefined = false; - $toc = array('conf'=>array(), 'plugin'=>array(), 'template'=>null); - foreach($this->_config->setting as $setting) { - if (is_a($setting, 'setting_fieldset')) { - if (substr($setting->_key, 0, 10)=='plugin'.CM_KEYMARKER) { - $toc['plugin'][] = $setting; - } else if (substr($setting->_key, 0, 7)=='tpl'.CM_KEYMARKER) { - $toc['template'] = $setting; - } else { - $toc['conf'][] = $setting; - } - } else if (!$has_undefined && is_a($setting, 'setting_undefined')) { - $has_undefined = true; + // gather settings data into three sub arrays + $labels = ['dokuwiki' => [], 'plugin' => [], 'template' => []]; + foreach($this->configuration->getSettings() as $setting) { + if(is_a($setting, SettingFieldset::class)) { + $labels[$setting->getType()][] = $setting; } } - // build toc - $t = array(); - - $check = false; + // top header $title = $this->getLang('_configuration_manager'); - $t[] = html_mktocitem(sectionID($title, $check), $title, 1); - $t[] = html_mktocitem('dokuwiki_settings', $this->getLang('_header_dokuwiki'), 1); - /** @var setting $setting */ - foreach($toc['conf'] as $setting) { - $name = $setting->prompt($this); - $t[] = html_mktocitem($setting->_key, $name, 2); - } - if (!empty($toc['plugin'])) { - $t[] = html_mktocitem('plugin_settings', $this->getLang('_header_plugin'), 1); - } - foreach($toc['plugin'] as $setting) { - $name = $setting->prompt($this); - $t[] = html_mktocitem($setting->_key, $name, 2); - } - if (isset($toc['template'])) { - $t[] = html_mktocitem('template_settings', $this->getLang('_header_template'), 1); - $setting = $toc['template']; - $name = $setting->prompt($this); - $t[] = html_mktocitem($setting->_key, $name, 2); + $toc[] = html_mktocitem(sectionID($title, $check), $title, 1); + + // main entries + foreach(['dokuwiki', 'plugin', 'template'] as $section) { + if(empty($labels[$section])) continue; // no entries, skip + + // create main header + $toc[] = html_mktocitem( + $section . '_settings', + $this->getLang('_header_' . $section), + 1 + ); + + // create sub headers + foreach($labels[$section] as $setting) { + /** @var SettingFieldset $setting */ + $name = $setting->prompt($this); + $toc[] = html_mktocitem($setting->getKey(), $name, 2); + } } - if ($has_undefined && $allow_debug) { - $t[] = html_mktocitem('undefined_settings', $this->getLang('_header_undefined'), 1); + + // undefined settings if allowed + if(count($this->configuration->getUndefined()) && $allow_debug) { + $toc[] = html_mktocitem('undefined_settings', $this->getLang('_header_undefined'), 1); } - return $t; + return $toc; } /** * @param string $id * @param string $text */ - protected function _print_h1($id, $text) { - ptln('<h1 id="'.$id.'">'.$text.'</h1>'); + protected function printH1($id, $text) { + echo '<h1 id="' . $id . '">' . $text . '</h1>'; } /** * Adds a translation to this plugin's language array * + * Used by some settings to set up dynamic translations + * * @param string $key * @param string $value */ public function addLang($key, $value) { - if (!$this->localised) $this->setupLocale(); + if(!$this->localised) $this->setupLocale(); $this->lang[$key] = $value; } } diff --git a/lib/plugins/config/core/ConfigParser.php b/lib/plugins/config/core/ConfigParser.php new file mode 100644 index 000000000..9e79b96f3 --- /dev/null +++ b/lib/plugins/config/core/ConfigParser.php @@ -0,0 +1,90 @@ +<?php + +namespace dokuwiki\plugin\config\core; + +/** + * A naive PHP file parser + * + * This parses our very simple config file in PHP format. We use this instead of simply including + * the file, because we want to keep expressions such as 24*60*60 as is. + * + * @author Chris Smith <chris@jalakai.co.uk> + */ +class ConfigParser { + /** @var string variable to parse from the file */ + protected $varname = 'conf'; + /** @var string the key to mark sub arrays */ + protected $keymarker = Configuration::KEYMARKER; + + /** + * Parse the given PHP file into an array + * + * When the given files does not exist, this returns an empty array + * + * @param string $file + * @return array + */ + public function parse($file) { + if(!file_exists($file)) return array(); + + $config = array(); + $contents = @php_strip_whitespace($file); + $pattern = '/\$' . $this->varname . '\[[\'"]([^=]+)[\'"]\] ?= ?(.*?);(?=[^;]*(?:\$' . $this->varname . '|$))/s'; + $matches = array(); + preg_match_all($pattern, $contents, $matches, PREG_SET_ORDER); + + for($i = 0; $i < count($matches); $i++) { + $value = $matches[$i][2]; + + // merge multi-dimensional array indices using the keymarker + $key = preg_replace('/.\]\[./', $this->keymarker, $matches[$i][1]); + + // handle arrays + if(preg_match('/^array ?\((.*)\)/', $value, $match)) { + $arr = explode(',', $match[1]); + + // remove quotes from quoted strings & unescape escaped data + $len = count($arr); + for($j = 0; $j < $len; $j++) { + $arr[$j] = trim($arr[$j]); + $arr[$j] = $this->readValue($arr[$j]); + } + + $value = $arr; + } else { + $value = $this->readValue($value); + } + + $config[$key] = $value; + } + + return $config; + } + + /** + * Convert php string into value + * + * @param string $value + * @return bool|string + */ + protected function readValue($value) { + $removequotes_pattern = '/^(\'|")(.*)(?<!\\\\)\1$/s'; + $unescape_pairs = array( + '\\\\' => '\\', + '\\\'' => '\'', + '\\"' => '"' + ); + + if($value == 'true') { + $value = true; + } elseif($value == 'false') { + $value = false; + } else { + // remove quotes from quoted strings & unescape escaped data + $value = preg_replace($removequotes_pattern, '$2', $value); + $value = strtr($value, $unescape_pairs); + } + return $value; + } + +} diff --git a/lib/plugins/config/core/Configuration.php b/lib/plugins/config/core/Configuration.php new file mode 100644 index 000000000..c58645c5b --- /dev/null +++ b/lib/plugins/config/core/Configuration.php @@ -0,0 +1,219 @@ +<?php + +namespace dokuwiki\plugin\config\core; + +use dokuwiki\plugin\config\core\Setting\Setting; +use dokuwiki\plugin\config\core\Setting\SettingNoClass; +use dokuwiki\plugin\config\core\Setting\SettingNoDefault; +use dokuwiki\plugin\config\core\Setting\SettingNoKnownClass; +use dokuwiki\plugin\config\core\Setting\SettingUndefined; + +/** + * Holds all the current settings and proxies the Loader and Writer + * + * @author Chris Smith <chris@jalakai.co.uk> + * @author Ben Coburn <btcoburn@silicodon.net> + * @author Andreas Gohr <andi@splitbrain.org> + */ +class Configuration { + + const KEYMARKER = '____'; + + /** @var Setting[] metadata as array of Settings objects */ + protected $settings = array(); + /** @var Setting[] undefined and problematic settings */ + protected $undefined = array(); + + /** @var array all metadata */ + protected $metadata; + /** @var array all default settings */ + protected $default; + /** @var array all local settings */ + protected $local; + /** @var array all protected settings */ + protected $protected; + + /** @var bool have the settings been changed since loading from disk? */ + protected $changed = false; + + /** @var Loader */ + protected $loader; + /** @var Writer */ + protected $writer; + + /** + * ConfigSettings constructor. + */ + public function __construct() { + $this->loader = new Loader(new ConfigParser()); + $this->writer = new Writer(); + + $this->metadata = $this->loader->loadMeta(); + $this->default = $this->loader->loadDefaults(); + $this->local = $this->loader->loadLocal(); + $this->protected = $this->loader->loadProtected(); + + $this->initSettings(); + } + + /** + * Get all settings + * + * @return Setting[] + */ + public function getSettings() { + return $this->settings; + } + + /** + * Get all unknown or problematic settings + * + * @return Setting[] + */ + public function getUndefined() { + return $this->undefined; + } + + /** + * Have the settings been changed since loading from disk? + * + * @return bool + */ + public function hasChanged() { + return $this->changed; + } + + /** + * Check if the config can be written + * + * @return bool + */ + public function isLocked() { + return $this->writer->isLocked(); + } + + /** + * Update the settings using the data provided + * + * @param array $input as posted + * @return bool true if all updates went through, false on errors + */ + public function updateSettings($input) { + $ok = true; + + foreach($this->settings as $key => $obj) { + $value = isset($input[$key]) ? $input[$key] : null; + if($obj->update($value)) { + $this->changed = true; + } + if($obj->hasError()) $ok = false; + } + + return $ok; + } + + /** + * Save the settings + * + * This save the current state as defined in this object, including the + * undefined settings + * + * @throws \Exception + */ + public function save() { + // only save the undefined settings that have not been handled in settings + $undefined = array_diff_key($this->undefined, $this->settings); + $this->writer->save(array_merge($this->settings, $undefined)); + } + + /** + * Touch the settings + * + * @throws \Exception + */ + public function touch() { + $this->writer->touch(); + } + + /** + * Load the extension language strings + * + * @return array + */ + public function getLangs() { + return $this->loader->loadLangs(); + } + + /** + * Initalizes the $settings and $undefined properties + */ + protected function initSettings() { + $keys = array_merge( + array_keys($this->metadata), + array_keys($this->default), + array_keys($this->local), + array_keys($this->protected) + ); + $keys = array_unique($keys); + + foreach($keys as $key) { + $obj = $this->instantiateClass($key); + + if($obj->shouldHaveDefault() && !isset($this->default[$key])) { + $this->undefined[$key] = new SettingNoDefault($key); + } + + $d = isset($this->default[$key]) ? $this->default[$key] : null; + $l = isset($this->local[$key]) ? $this->local[$key] : null; + $p = isset($this->protected[$key]) ? $this->protected[$key] : null; + + $obj->initialize($d, $l, $p); + } + } + + /** + * Instantiates the proper class for the given config key + * + * The class is added to the $settings or $undefined arrays and returned + * + * @param string $key + * @return Setting + */ + protected function instantiateClass($key) { + if(isset($this->metadata[$key])) { + $param = $this->metadata[$key]; + $class = $this->determineClassName(array_shift($param), $key); // first param is class + $obj = new $class($key, $param); + $this->settings[$key] = $obj; + } else { + $obj = new SettingUndefined($key); + $this->undefined[$key] = $obj; + } + return $obj; + } + + /** + * Return the class to load + * + * @param string $class the class name as given in the meta file + * @param string $key the settings key + * @return string + */ + protected function determineClassName($class, $key) { + // try namespaced class first + if(is_string($class)) { + $modern = str_replace('_', '', ucwords($class, '_')); + $modern = '\\dokuwiki\\plugin\\config\\core\\Setting\\Setting' . $modern; + if($modern && class_exists($modern)) return $modern; + // try class as given + if(class_exists($class)) return $class; + // class wasn't found add to errors + $this->undefined[$key] = new SettingNoKnownClass($key); + } else { + // no class given, add to errors + $this->undefined[$key] = new SettingNoClass($key); + } + return '\\dokuwiki\\plugin\\config\\core\\Setting\\Setting'; + } + +} diff --git a/lib/plugins/config/core/Loader.php b/lib/plugins/config/core/Loader.php new file mode 100644 index 000000000..90ad0f50e --- /dev/null +++ b/lib/plugins/config/core/Loader.php @@ -0,0 +1,269 @@ +<?php + +namespace dokuwiki\plugin\config\core; + +use dokuwiki\Extension\Event; + +/** + * Configuration loader + * + * Loads configuration meta data and settings from the various files. Honors the + * configuration cascade and installed plugins. + */ +class Loader { + /** @var ConfigParser */ + protected $parser; + + /** @var string[] list of enabled plugins */ + protected $plugins; + /** @var string current template */ + protected $template; + + /** + * Loader constructor. + * @param ConfigParser $parser + * @triggers PLUGIN_CONFIG_PLUGINLIST + */ + public function __construct(ConfigParser $parser) { + global $conf; + $this->parser = $parser; + $this->plugins = plugin_list(); + $this->template = $conf['template']; + // allow plugins to remove configurable plugins + Event::createAndTrigger('PLUGIN_CONFIG_PLUGINLIST', $this->plugins); + } + + /** + * Read the settings meta data + * + * Reads the main file, plugins and template settings meta data + * + * @return array + */ + public function loadMeta() { + // load main file + $meta = array(); + include DOKU_PLUGIN . 'config/settings/config.metadata.php'; + + // plugins + foreach($this->plugins as $plugin) { + $meta = array_merge( + $meta, + $this->loadExtensionMeta( + DOKU_PLUGIN . $plugin . '/conf/metadata.php', + 'plugin', + $plugin + ) + ); + } + + // current template + $meta = array_merge( + $meta, + $this->loadExtensionMeta( + tpl_incdir() . '/conf/metadata.php', + 'tpl', + $this->template + ) + ); + + return $meta; + } + + /** + * Read the default values + * + * Reads the main file, plugins and template defaults + * + * @return array + */ + public function loadDefaults() { + // load main files + global $config_cascade; + $conf = $this->loadConfigs($config_cascade['main']['default']); + + // plugins + foreach($this->plugins as $plugin) { + $conf = array_merge( + $conf, + $this->loadExtensionConf( + DOKU_PLUGIN . $plugin . '/conf/default.php', + 'plugin', + $plugin + ) + ); + } + + // current template + $conf = array_merge( + $conf, + $this->loadExtensionConf( + tpl_incdir() . '/conf/default.php', + 'tpl', + $this->template + ) + ); + + return $conf; + } + + /** + * Reads the language strings + * + * Only reads extensions, main one is loaded the usual way + * + * @return array + */ + public function loadLangs() { + $lang = array(); + + // plugins + foreach($this->plugins as $plugin) { + $lang = array_merge( + $lang, + $this->loadExtensionLang( + DOKU_PLUGIN . $plugin . '/', + 'plugin', + $plugin + ) + ); + } + + // current template + $lang = array_merge( + $lang, + $this->loadExtensionLang( + tpl_incdir() . '/', + 'tpl', + $this->template + ) + ); + + return $lang; + } + + /** + * Read the local settings + * + * @return array + */ + public function loadLocal() { + global $config_cascade; + return $this->loadConfigs($config_cascade['main']['local']); + } + + /** + * Read the protected settings + * + * @return array + */ + public function loadProtected() { + global $config_cascade; + return $this->loadConfigs($config_cascade['main']['protected']); + } + + /** + * Read the config values from the given files + * + * @param string[] $files paths to config php's + * @return array + */ + protected function loadConfigs($files) { + $conf = array(); + foreach($files as $file) { + $conf = array_merge($conf, $this->parser->parse($file)); + } + return $conf; + } + + /** + * Read settings file from an extension + * + * This is used to read the settings.php files of plugins and templates + * + * @param string $file php file to read + * @param string $type should be 'plugin' or 'tpl' + * @param string $extname name of the extension + * @return array + */ + protected function loadExtensionMeta($file, $type, $extname) { + if(!file_exists($file)) return array(); + $prefix = $type . Configuration::KEYMARKER . $extname . Configuration::KEYMARKER; + + // include file + $meta = array(); + include $file; + if(empty($meta)) return array(); + + // read data + $data = array(); + $data[$prefix . $type . '_settings_name'] = ['fieldset']; + foreach($meta as $key => $value) { + if($value[0] == 'fieldset') continue; //plugins only get one fieldset + $data[$prefix . $key] = $value; + } + + return $data; + } + + /** + * Read a default file from an extension + * + * This is used to read the default.php files of plugins and templates + * + * @param string $file php file to read + * @param string $type should be 'plugin' or 'tpl' + * @param string $extname name of the extension + * @return array + */ + protected function loadExtensionConf($file, $type, $extname) { + if(!file_exists($file)) return array(); + $prefix = $type . Configuration::KEYMARKER . $extname . Configuration::KEYMARKER; + + // parse file + $conf = $this->parser->parse($file); + if(empty($conf)) return array(); + + // read data + $data = array(); + foreach($conf as $key => $value) { + $data[$prefix . $key] = $value; + } + + return $data; + } + + /** + * Read the language file of an extension + * + * @param string $dir directory of the extension + * @param string $type should be 'plugin' or 'tpl' + * @param string $extname name of the extension + * @return array + */ + protected function loadExtensionLang($dir, $type, $extname) { + global $conf; + $ll = $conf['lang']; + $prefix = $type . Configuration::KEYMARKER . $extname . Configuration::KEYMARKER; + + // include files + $lang = array(); + if(file_exists($dir . 'lang/en/settings.php')) { + include $dir . 'lang/en/settings.php'; + } + if($ll != 'en' && file_exists($dir . 'lang/' . $ll . '/settings.php')) { + include $dir . 'lang/' . $ll . '/settings.php'; + } + + // set up correct keys + $strings = array(); + foreach($lang as $key => $val) { + $strings[$prefix . $key] = $val; + } + + // add fieldset key + $strings[$prefix . $type . '_settings_name'] = ucwords(str_replace('_', ' ', $extname)); + + return $strings; + } +} diff --git a/lib/plugins/config/core/Setting/Setting.php b/lib/plugins/config/core/Setting/Setting.php new file mode 100644 index 000000000..d64f68417 --- /dev/null +++ b/lib/plugins/config/core/Setting/Setting.php @@ -0,0 +1,294 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +use dokuwiki\plugin\config\core\Configuration; + +/** + * Class Setting + */ +class Setting { + /** @var string unique identifier of this setting */ + protected $key = ''; + + /** @var mixed the default value of this setting */ + protected $default = null; + /** @var mixed the local value of this setting */ + protected $local = null; + /** @var mixed the protected value of this setting */ + protected $protected = null; + + /** @var array valid alerts, images matching the alerts are in the plugin's images directory */ + static protected $validCautions = array('warning', 'danger', 'security'); + + protected $pattern = ''; + protected $error = false; // only used by those classes which error check + protected $input = null; // only used by those classes which error check + protected $caution = null; // used by any setting to provide an alert along with the setting + + /** + * Constructor. + * + * The given parameters will be set up as class properties + * + * @see initialize() to set the actual value of the setting + * + * @param string $key + * @param array|null $params array with metadata of setting + */ + public function __construct($key, $params = null) { + $this->key = $key; + + if(is_array($params)) { + foreach($params as $property => $value) { + $property = trim($property, '_'); // we don't use underscores anymore + $this->$property = $value; + } + } + } + + /** + * Set the current values for the setting $key + * + * This is used to initialize the setting with the data read form the config files. + * + * @see update() to set a new value + * @param mixed $default default setting value + * @param mixed $local local setting value + * @param mixed $protected protected setting value + */ + public function initialize($default = null, $local = null, $protected = null) { + $this->default = $this->cleanValue($default); + $this->local = $this->cleanValue($local); + $this->protected = $this->cleanValue($protected); + } + + /** + * update changed setting with validated user provided value $input + * - if changed value fails validation check, save it to $this->input (to allow echoing later) + * - if changed value passes validation check, set $this->local to the new value + * + * @param mixed $input the new value + * @return boolean true if changed, false otherwise + */ + public function update($input) { + if(is_null($input)) return false; + if($this->isProtected()) return false; + $input = $this->cleanValue($input); + + $value = is_null($this->local) ? $this->default : $this->local; + if($value == $input) return false; + + // validate new value + if($this->pattern && !preg_match($this->pattern, $input)) { + $this->error = true; + $this->input = $input; + return false; + } + + // update local copy of this setting with new value + $this->local = $input; + + // setting ready for update + return true; + } + + /** + * Clean a value read from a config before using it internally + * + * Default implementation returns $value as is. Subclasses can override. + * Note: null should always be returned as null! + * + * This is applied in initialize() and update() + * + * @param mixed $value + * @return mixed + */ + protected function cleanValue($value) { + return $value; + } + + /** + * Should this type of config have a default? + * + * @return bool + */ + public function shouldHaveDefault() { + return true; + } + + /** + * Get this setting's unique key + * + * @return string + */ + public function getKey() { + return $this->key; + } + + /** + * Get the key of this setting marked up human readable + * + * @param bool $url link to dokuwiki.org manual? + * @return string + */ + public function getPrettyKey($url = true) { + $out = str_replace(Configuration::KEYMARKER, "»", $this->key); + if($url && !strstr($out, '»')) {//provide no urls for plugins, etc. + if($out == 'start') { + // exception, because this config name is clashing with our actual start page + return '<a href="http://www.dokuwiki.org/config:startpage">' . $out . '</a>'; + } else { + return '<a href="http://www.dokuwiki.org/config:' . $out . '">' . $out . '</a>'; + } + } + return $out; + } + + /** + * Returns setting key as an array key separator + * + * This is used to create form output + * + * @return string key + */ + public function getArrayKey() { + return str_replace(Configuration::KEYMARKER, "']['", $this->key); + } + + /** + * What type of configuration is this + * + * Returns one of + * + * 'plugin' for plugin configuration + * 'template' for template configuration + * 'dokuwiki' for core configuration + * + * @return string + */ + public function getType() { + if(substr($this->getKey(), 0, 10) == 'plugin' . Configuration::KEYMARKER) { + return 'plugin'; + } else if(substr($this->getKey(), 0, 7) == 'tpl' . Configuration::KEYMARKER) { + return 'template'; + } else { + return 'dokuwiki'; + } + } + + /** + * Build html for label and input of setting + * + * @param \admin_plugin_config $plugin object of config plugin + * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting + * @return string[] with content array(string $label_html, string $input_html) + */ + public function html(\admin_plugin_config $plugin, $echo = false) { + $disable = ''; + + if($this->isProtected()) { + $value = $this->protected; + $disable = 'disabled="disabled"'; + } else { + if($echo && $this->error) { + $value = $this->input; + } else { + $value = is_null($this->local) ? $this->default : $this->local; + } + } + + $key = htmlspecialchars($this->key); + $value = formText($value); + + $label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>'; + $input = '<textarea rows="3" cols="40" id="config___' . $key . + '" name="config[' . $key . ']" class="edit" ' . $disable . '>' . $value . '</textarea>'; + return array($label, $input); + } + + /** + * Should the current local value be saved? + * + * @see out() to run when this returns true + * @return bool + */ + public function shouldBeSaved() { + if($this->isProtected()) return false; + if($this->local === null) return false; + if($this->default == $this->local) return false; + return true; + } + + /** + * Generate string to save local setting value to file according to $fmt + * + * @see shouldBeSaved() to check if this should be called + * @param string $var name of variable + * @param string $fmt save format + * @return string + */ + public function out($var, $fmt = 'php') { + if($fmt != 'php') return ''; + + $tr = array("\\" => '\\\\', "'" => '\\\''); // escape the value + $out = '$' . $var . "['" . $this->getArrayKey() . "'] = '" . strtr(cleanText($this->local), $tr) . "';\n"; + + return $out; + } + + /** + * Returns the localized prompt + * + * @param \admin_plugin_config $plugin object of config plugin + * @return string text + */ + public function prompt(\admin_plugin_config $plugin) { + $prompt = $plugin->getLang($this->key); + if(!$prompt) $prompt = htmlspecialchars(str_replace(array('____', '_'), ' ', $this->key)); + return $prompt; + } + + /** + * Is setting protected + * + * @return bool + */ + public function isProtected() { + return !is_null($this->protected); + } + + /** + * Is setting the default? + * + * @return bool + */ + public function isDefault() { + return !$this->isProtected() && is_null($this->local); + } + + /** + * Has an error? + * + * @return bool + */ + public function hasError() { + return $this->error; + } + + /** + * Returns caution + * + * @return false|string caution string, otherwise false for invalid caution + */ + public function caution() { + if(empty($this->caution)) return false; + if(!in_array($this->caution, Setting::$validCautions)) { + throw new \RuntimeException( + 'Invalid caution string (' . $this->caution . ') in metadata for setting "' . $this->key . '"' + ); + } + return $this->caution; + } + +} diff --git a/lib/plugins/config/core/Setting/SettingArray.php b/lib/plugins/config/core/Setting/SettingArray.php new file mode 100644 index 000000000..c48dc760b --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingArray.php @@ -0,0 +1,105 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_array + */ +class SettingArray extends Setting { + + /** + * Create an array from a string + * + * @param string $string + * @return array + */ + protected function fromString($string) { + $array = explode(',', $string); + $array = array_map('trim', $array); + $array = array_filter($array); + $array = array_unique($array); + return $array; + } + + /** + * Create a string from an array + * + * @param array $array + * @return string + */ + protected function fromArray($array) { + return join(', ', (array) $array); + } + + /** + * update setting with user provided value $input + * if value fails error check, save it + * + * @param string $input + * @return bool true if changed, false otherwise (incl. on error) + */ + public function update($input) { + if(is_null($input)) return false; + if($this->isProtected()) return false; + + $input = $this->fromString($input); + + $value = is_null($this->local) ? $this->default : $this->local; + if($value == $input) return false; + + foreach($input as $item) { + if($this->pattern && !preg_match($this->pattern, $item)) { + $this->error = true; + $this->input = $input; + return false; + } + } + + $this->local = $input; + return true; + } + + /** + * Escaping + * + * @param string $string + * @return string + */ + protected function escape($string) { + $tr = array("\\" => '\\\\', "'" => '\\\''); + return "'" . strtr(cleanText($string), $tr) . "'"; + } + + /** @inheritdoc */ + public function out($var, $fmt = 'php') { + if($fmt != 'php') return ''; + + $vals = array_map(array($this, 'escape'), $this->local); + $out = '$' . $var . "['" . $this->getArrayKey() . "'] = array(" . join(', ', $vals) . ");\n"; + return $out; + } + + /** @inheritdoc */ + public function html(\admin_plugin_config $plugin, $echo = false) { + $disable = ''; + + if($this->isProtected()) { + $value = $this->protected; + $disable = 'disabled="disabled"'; + } else { + if($echo && $this->error) { + $value = $this->input; + } else { + $value = is_null($this->local) ? $this->default : $this->local; + } + } + + $key = htmlspecialchars($this->key); + $value = htmlspecialchars($this->fromArray($value)); + + $label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>'; + $input = '<input id="config___' . $key . '" name="config[' . $key . + ']" type="text" class="edit" value="' . $value . '" ' . $disable . '/>'; + return array($label, $input); + } +} diff --git a/lib/plugins/config/core/Setting/SettingAuthtype.php b/lib/plugins/config/core/Setting/SettingAuthtype.php new file mode 100644 index 000000000..3a6df6fe5 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingAuthtype.php @@ -0,0 +1,60 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_authtype + */ +class SettingAuthtype extends SettingMultichoice { + + /** @inheritdoc */ + public function initialize($default = null, $local = null, $protected = null) { + /** @var $plugin_controller \dokuwiki\Extension\PluginController */ + global $plugin_controller; + + // retrieve auth types provided by plugins + foreach($plugin_controller->getList('auth') as $plugin) { + $this->choices[] = $plugin; + } + + parent::initialize($default, $local, $protected); + } + + /** @inheritdoc */ + public function update($input) { + /** @var $plugin_controller \dokuwiki\Extension\PluginController */ + global $plugin_controller; + + // is an update possible/requested? + $local = $this->local; // save this, parent::update() may change it + if(!parent::update($input)) return false; // nothing changed or an error caught by parent + $this->local = $local; // restore original, more error checking to come + + // attempt to load the plugin + $auth_plugin = $plugin_controller->load('auth', $input); + + // @TODO: throw an error in plugin controller instead of returning null + if(is_null($auth_plugin)) { + $this->error = true; + msg('Cannot load Auth Plugin "' . $input . '"', -1); + return false; + } + + // verify proper instantiation (is this really a plugin?) @TODO use instanceof? implement interface? + if(is_object($auth_plugin) && !method_exists($auth_plugin, 'getPluginName')) { + $this->error = true; + msg('Cannot create Auth Plugin "' . $input . '"', -1); + return false; + } + + // did we change the auth type? logout + global $conf; + if($conf['authtype'] != $input) { + msg('Authentication system changed. Please re-login.'); + auth_logoff(); + } + + $this->local = $input; + return true; + } +} diff --git a/lib/plugins/config/core/Setting/SettingCompression.php b/lib/plugins/config/core/Setting/SettingCompression.php new file mode 100644 index 000000000..f97d82801 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingCompression.php @@ -0,0 +1,21 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_compression + */ +class SettingCompression extends SettingMultichoice { + + protected $choices = array('0'); // 0 = no compression, always supported + + /** @inheritdoc */ + public function initialize($default = null, $local = null, $protected = null) { + + // populate _choices with the compression methods supported by this php installation + if(function_exists('gzopen')) $this->choices[] = 'gz'; + if(function_exists('bzopen')) $this->choices[] = 'bz2'; + + parent::initialize($default, $local, $protected); + } +} diff --git a/lib/plugins/config/core/Setting/SettingDirchoice.php b/lib/plugins/config/core/Setting/SettingDirchoice.php new file mode 100644 index 000000000..dfb27f5f4 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingDirchoice.php @@ -0,0 +1,33 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_dirchoice + */ +class SettingDirchoice extends SettingMultichoice { + + protected $dir = ''; + + /** @inheritdoc */ + public function initialize($default = null, $local = null, $protected = null) { + + // populate $this->_choices with a list of directories + $list = array(); + + if($dh = @opendir($this->dir)) { + while(false !== ($entry = readdir($dh))) { + if($entry == '.' || $entry == '..') continue; + if($this->pattern && !preg_match($this->pattern, $entry)) continue; + + $file = (is_link($this->dir . $entry)) ? readlink($this->dir . $entry) : $this->dir . $entry; + if(is_dir($file)) $list[] = $entry; + } + closedir($dh); + } + sort($list); + $this->choices = $list; + + parent::initialize($default, $local, $protected); + } +} diff --git a/lib/plugins/config/core/Setting/SettingDisableactions.php b/lib/plugins/config/core/Setting/SettingDisableactions.php new file mode 100644 index 000000000..2553175bd --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingDisableactions.php @@ -0,0 +1,23 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_disableactions + */ +class SettingDisableactions extends SettingMulticheckbox { + + /** @inheritdoc */ + public function html(\admin_plugin_config $plugin, $echo = false) { + global $lang; + + // make some language adjustments (there must be a better way) + // transfer some DokuWiki language strings to the plugin + $plugin->addLang($this->key . '_revisions', $lang['btn_revs']); + foreach($this->choices as $choice) { + if(isset($lang['btn_' . $choice])) $plugin->addLang($this->key . '_' . $choice, $lang['btn_' . $choice]); + } + + return parent::html($plugin, $echo); + } +} diff --git a/lib/plugins/config/core/Setting/SettingEmail.php b/lib/plugins/config/core/Setting/SettingEmail.php new file mode 100644 index 000000000..25a0c0e75 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingEmail.php @@ -0,0 +1,58 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_email + */ +class SettingEmail extends SettingString { + protected $multiple = false; + protected $placeholders = false; + + /** @inheritdoc */ + public function update($input) { + if(is_null($input)) return false; + if($this->isProtected()) return false; + + $value = is_null($this->local) ? $this->default : $this->local; + if($value == $input) return false; + if($input === '') { + $this->local = $input; + return true; + } + $mail = $input; + + if($this->placeholders) { + // replace variables with pseudo values + $mail = str_replace('@USER@', 'joe', $mail); + $mail = str_replace('@NAME@', 'Joe Schmoe', $mail); + $mail = str_replace('@MAIL@', 'joe@example.com', $mail); + } + + // multiple mail addresses? + if($this->multiple) { + $mails = array_filter(array_map('trim', explode(',', $mail))); + } else { + $mails = array($mail); + } + + // check them all + foreach($mails as $mail) { + // only check the address part + if(preg_match('#(.*?)<(.*?)>#', $mail, $matches)) { + $addr = $matches[2]; + } else { + $addr = $mail; + } + + if(!mail_isvalid($addr)) { + $this->error = true; + $this->input = $input; + return false; + } + } + + $this->local = $input; + return true; + } +} diff --git a/lib/plugins/config/core/Setting/SettingFieldset.php b/lib/plugins/config/core/Setting/SettingFieldset.php new file mode 100644 index 000000000..4e8618967 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingFieldset.php @@ -0,0 +1,17 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * A do-nothing class used to detect the 'fieldset' type. + * + * Used to start a new settings "display-group". + */ +class SettingFieldset extends Setting { + + /** @inheritdoc */ + public function shouldHaveDefault() { + return false; + } + +} diff --git a/lib/plugins/config/core/Setting/SettingHidden.php b/lib/plugins/config/core/Setting/SettingHidden.php new file mode 100644 index 000000000..ca8a03eb9 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingHidden.php @@ -0,0 +1,10 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_hidden + */ +class SettingHidden extends Setting { + // Used to explicitly ignore a setting in the configuration manager. +} diff --git a/lib/plugins/config/core/Setting/SettingImConvert.php b/lib/plugins/config/core/Setting/SettingImConvert.php new file mode 100644 index 000000000..8740d94c8 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingImConvert.php @@ -0,0 +1,28 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_im_convert + */ +class SettingImConvert extends SettingString { + + /** @inheritdoc */ + public function update($input) { + if($this->isProtected()) return false; + + $input = trim($input); + + $value = is_null($this->local) ? $this->default : $this->local; + if($value == $input) return false; + + if($input && !file_exists($input)) { + $this->error = true; + $this->input = $input; + return false; + } + + $this->local = $input; + return true; + } +} diff --git a/lib/plugins/config/core/Setting/SettingLicense.php b/lib/plugins/config/core/Setting/SettingLicense.php new file mode 100644 index 000000000..8dacf8e25 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingLicense.php @@ -0,0 +1,23 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_license + */ +class SettingLicense extends SettingMultichoice { + + protected $choices = array(''); // none choosen + + /** @inheritdoc */ + public function initialize($default = null, $local = null, $protected = null) { + global $license; + + foreach($license as $key => $data) { + $this->choices[] = $key; + $this->lang[$this->key . '_o_' . $key] = $data['name']; // stored in setting + } + + parent::initialize($default, $local, $protected); + } +} diff --git a/lib/plugins/config/core/Setting/SettingMulticheckbox.php b/lib/plugins/config/core/Setting/SettingMulticheckbox.php new file mode 100644 index 000000000..df212cca0 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingMulticheckbox.php @@ -0,0 +1,163 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_multicheckbox + */ +class SettingMulticheckbox extends SettingString { + + protected $choices = array(); + protected $combine = array(); + protected $other = 'always'; + + /** @inheritdoc */ + public function update($input) { + if($this->isProtected()) return false; + + // split any combined values + convert from array to comma separated string + $input = ($input) ? $input : array(); + $input = $this->array2str($input); + + $value = is_null($this->local) ? $this->default : $this->local; + if($value == $input) return false; + + if($this->pattern && !preg_match($this->pattern, $input)) { + $this->error = true; + $this->input = $input; + return false; + } + + $this->local = $input; + return true; + } + + /** @inheritdoc */ + public function html(\admin_plugin_config $plugin, $echo = false) { + + $disable = ''; + + if($this->isProtected()) { + $value = $this->protected; + $disable = 'disabled="disabled"'; + } else { + if($echo && $this->error) { + $value = $this->input; + } else { + $value = is_null($this->local) ? $this->default : $this->local; + } + } + + $key = htmlspecialchars($this->key); + + // convert from comma separated list into array + combine complimentary actions + $value = $this->str2array($value); + $default = $this->str2array($this->default); + + $input = ''; + foreach($this->choices as $choice) { + $idx = array_search($choice, $value); + $idx_default = array_search($choice, $default); + + $checked = ($idx !== false) ? 'checked="checked"' : ''; + + // @todo ideally this would be handled using a second class of "default" + $class = (($idx !== false) == (false !== $idx_default)) ? " selectiondefault" : ""; + + $prompt = ($plugin->getLang($this->key . '_' . $choice) ? + $plugin->getLang($this->key . '_' . $choice) : htmlspecialchars($choice)); + + $input .= '<div class="selection' . $class . '">' . "\n"; + $input .= '<label for="config___' . $key . '_' . $choice . '">' . $prompt . "</label>\n"; + $input .= '<input id="config___' . $key . '_' . $choice . '" name="config[' . $key . + '][]" type="checkbox" class="checkbox" value="' . $choice . '" ' . $disable . ' ' . $checked . "/>\n"; + $input .= "</div>\n"; + + // remove this action from the disabledactions array + if($idx !== false) unset($value[$idx]); + if($idx_default !== false) unset($default[$idx_default]); + } + + // handle any remaining values + if($this->other != 'never') { + $other = join(',', $value); + // test equivalent to ($this->_other == 'always' || ($other && $this->_other == 'exists') + // use != 'exists' rather than == 'always' to ensure invalid values default to 'always' + if($this->other != 'exists' || $other) { + + $class = ( + (count($default) == count($value)) && + (count($value) == count(array_intersect($value, $default))) + ) ? + " selectiondefault" : ""; + + $input .= '<div class="other' . $class . '">' . "\n"; + $input .= '<label for="config___' . $key . '_other">' . + $plugin->getLang($key . '_other') . + "</label>\n"; + $input .= '<input id="config___' . $key . '_other" name="config[' . $key . + '][other]" type="text" class="edit" value="' . htmlspecialchars($other) . + '" ' . $disable . " />\n"; + $input .= "</div>\n"; + } + } + $label = '<label>' . $this->prompt($plugin) . '</label>'; + return array($label, $input); + } + + /** + * convert comma separated list to an array and combine any complimentary values + * + * @param string $str + * @return array + */ + protected function str2array($str) { + $array = explode(',', $str); + + if(!empty($this->combine)) { + foreach($this->combine as $key => $combinators) { + $idx = array(); + foreach($combinators as $val) { + if(($idx[] = array_search($val, $array)) === false) break; + } + + if(count($idx) && $idx[count($idx) - 1] !== false) { + foreach($idx as $i) unset($array[$i]); + $array[] = $key; + } + } + } + + return $array; + } + + /** + * convert array of values + other back to a comma separated list, incl. splitting any combined values + * + * @param array $input + * @return string + */ + protected function array2str($input) { + + // handle other + $other = trim($input['other']); + $other = !empty($other) ? explode(',', str_replace(' ', '', $input['other'])) : array(); + unset($input['other']); + + $array = array_unique(array_merge($input, $other)); + + // deconstruct any combinations + if(!empty($this->combine)) { + foreach($this->combine as $key => $combinators) { + + $idx = array_search($key, $array); + if($idx !== false) { + unset($array[$idx]); + $array = array_merge($array, $combinators); + } + } + } + + return join(',', array_unique($array)); + } +} diff --git a/lib/plugins/config/core/Setting/SettingMultichoice.php b/lib/plugins/config/core/Setting/SettingMultichoice.php new file mode 100644 index 000000000..3a50857e0 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingMultichoice.php @@ -0,0 +1,71 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_multichoice + */ +class SettingMultichoice extends SettingString { + protected $choices = array(); + public $lang; //some custom language strings are stored in setting + + /** @inheritdoc */ + public function html(\admin_plugin_config $plugin, $echo = false) { + $disable = ''; + $nochoice = ''; + + if($this->isProtected()) { + $value = $this->protected; + $disable = ' disabled="disabled"'; + } else { + $value = is_null($this->local) ? $this->default : $this->local; + } + + // ensure current value is included + if(!in_array($value, $this->choices)) { + $this->choices[] = $value; + } + // disable if no other choices + if(!$this->isProtected() && count($this->choices) <= 1) { + $disable = ' disabled="disabled"'; + $nochoice = $plugin->getLang('nochoice'); + } + + $key = htmlspecialchars($this->key); + + $label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>'; + + $input = "<div class=\"input\">\n"; + $input .= '<select class="edit" id="config___' . $key . '" name="config[' . $key . ']"' . $disable . '>' . "\n"; + foreach($this->choices as $choice) { + $selected = ($value == $choice) ? ' selected="selected"' : ''; + $option = $plugin->getLang($this->key . '_o_' . $choice); + if(!$option && isset($this->lang[$this->key . '_o_' . $choice])) { + $option = $this->lang[$this->key . '_o_' . $choice]; + } + if(!$option) $option = $choice; + + $choice = htmlspecialchars($choice); + $option = htmlspecialchars($option); + $input .= ' <option value="' . $choice . '"' . $selected . ' >' . $option . '</option>' . "\n"; + } + $input .= "</select> $nochoice \n"; + $input .= "</div>\n"; + + return array($label, $input); + } + + /** @inheritdoc */ + public function update($input) { + if(is_null($input)) return false; + if($this->isProtected()) return false; + + $value = is_null($this->local) ? $this->default : $this->local; + if($value == $input) return false; + + if(!in_array($input, $this->choices)) return false; + + $this->local = $input; + return true; + } +} diff --git a/lib/plugins/config/core/Setting/SettingNoClass.php b/lib/plugins/config/core/Setting/SettingNoClass.php new file mode 100644 index 000000000..8efff216a --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingNoClass.php @@ -0,0 +1,12 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_no_class + * A do-nothing class used to detect settings with a missing setting class. + * Used internaly to hide undefined settings, and generate the undefined settings list. + */ +class SettingNoClass extends SettingUndefined { + protected $errorMessage = '_msg_setting_no_class'; +} diff --git a/lib/plugins/config/core/Setting/SettingNoDefault.php b/lib/plugins/config/core/Setting/SettingNoDefault.php new file mode 100644 index 000000000..07b8412dd --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingNoDefault.php @@ -0,0 +1,13 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_no_default + * + * A do-nothing class used to detect settings with no default value. + * Used internaly to hide undefined settings, and generate the undefined settings list. + */ +class SettingNoDefault extends SettingUndefined { + protected $errorMessage = '_msg_setting_no_default'; +} diff --git a/lib/plugins/config/core/Setting/SettingNoKnownClass.php b/lib/plugins/config/core/Setting/SettingNoKnownClass.php new file mode 100644 index 000000000..3c527e1ee --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingNoKnownClass.php @@ -0,0 +1,11 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * A do-nothing class used to detect settings with a missing setting class. + * Used internaly to hide undefined settings, and generate the undefined settings list. + */ +class SettingNoKnownClass extends SettingUndefined { + protected $errorMessage = '_msg_setting_no_known_class'; +} diff --git a/lib/plugins/config/core/Setting/SettingNumeric.php b/lib/plugins/config/core/Setting/SettingNumeric.php new file mode 100644 index 000000000..8a6b17956 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingNumeric.php @@ -0,0 +1,42 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_numeric + */ +class SettingNumeric extends SettingString { + // This allows for many PHP syntax errors... + // var $_pattern = '/^[-+\/*0-9 ]*$/'; + // much more restrictive, but should eliminate syntax errors. + protected $pattern = '/^[-+]? *[0-9]+ *(?:[-+*] *[0-9]+ *)*$/'; + protected $min = null; + protected $max = null; + + /** @inheritdoc */ + public function update($input) { + $local = $this->local; + $valid = parent::update($input); + if($valid && !(is_null($this->min) && is_null($this->max))) { + $numeric_local = (int) eval('return ' . $this->local . ';'); + if((!is_null($this->min) && $numeric_local < $this->min) || + (!is_null($this->max) && $numeric_local > $this->max)) { + $this->error = true; + $this->input = $input; + $this->local = $local; + $valid = false; + } + } + return $valid; + } + + /** @inheritdoc */ + public function out($var, $fmt = 'php') { + if($fmt != 'php') return ''; + + $local = $this->local === '' ? "''" : $this->local; + $out = '$' . $var . "['" . $this->getArrayKey() . "'] = " . $local . ";\n"; + + return $out; + } +} diff --git a/lib/plugins/config/core/Setting/SettingNumericopt.php b/lib/plugins/config/core/Setting/SettingNumericopt.php new file mode 100644 index 000000000..a486e187f --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingNumericopt.php @@ -0,0 +1,25 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_numericopt + */ +class SettingNumericopt extends SettingNumeric { + // just allow an empty config + protected $pattern = '/^(|[-]?[0-9]+(?:[-+*][0-9]+)*)$/'; + + /** + * @inheritdoc + * Empty string is valid for numericopt + */ + public function update($input) { + if($input === '') { + if($input == $this->local) return false; + $this->local = $input; + return true; + } + + return parent::update($input); + } +} diff --git a/lib/plugins/config/core/Setting/SettingOnoff.php b/lib/plugins/config/core/Setting/SettingOnoff.php new file mode 100644 index 000000000..780778b48 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingOnoff.php @@ -0,0 +1,57 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_onoff + */ +class SettingOnoff extends SettingNumeric { + + /** + * We treat the strings 'false' and 'off' as false + * @inheritdoc + */ + protected function cleanValue($value) { + if($value === null) return null; + + if(is_string($value)) { + if(strtolower($value) === 'false') return 0; + if(strtolower($value) === 'off') return 0; + if(trim($value) === '') return 0; + } + + return (int) (bool) $value; + } + + /** @inheritdoc */ + public function html(\admin_plugin_config $plugin, $echo = false) { + $disable = ''; + + if($this->isProtected()) { + $value = $this->protected; + $disable = ' disabled="disabled"'; + } else { + $value = is_null($this->local) ? $this->default : $this->local; + } + + $key = htmlspecialchars($this->key); + $checked = ($value) ? ' checked="checked"' : ''; + + $label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>'; + $input = '<div class="input"><input id="config___' . $key . '" name="config[' . $key . + ']" type="checkbox" class="checkbox" value="1"' . $checked . $disable . '/></div>'; + return array($label, $input); + } + + /** @inheritdoc */ + public function update($input) { + if($this->isProtected()) return false; + + $input = ($input) ? 1 : 0; + $value = is_null($this->local) ? $this->default : $this->local; + if($value == $input) return false; + + $this->local = $input; + return true; + } +} diff --git a/lib/plugins/config/core/Setting/SettingPassword.php b/lib/plugins/config/core/Setting/SettingPassword.php new file mode 100644 index 000000000..9d9c53377 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingPassword.php @@ -0,0 +1,39 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_password + */ +class SettingPassword extends SettingString { + + protected $code = 'plain'; // mechanism to be used to obscure passwords + + /** @inheritdoc */ + public function update($input) { + if($this->isProtected()) return false; + if(!$input) return false; + + if($this->pattern && !preg_match($this->pattern, $input)) { + $this->error = true; + $this->input = $input; + return false; + } + + $this->local = conf_encodeString($input, $this->code); + return true; + } + + /** @inheritdoc */ + public function html(\admin_plugin_config $plugin, $echo = false) { + + $disable = $this->isProtected() ? 'disabled="disabled"' : ''; + + $key = htmlspecialchars($this->key); + + $label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>'; + $input = '<input id="config___' . $key . '" name="config[' . $key . + ']" autocomplete="off" type="password" class="edit" value="" ' . $disable . ' />'; + return array($label, $input); + } +} diff --git a/lib/plugins/config/core/Setting/SettingRegex.php b/lib/plugins/config/core/Setting/SettingRegex.php new file mode 100644 index 000000000..b38f0a560 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingRegex.php @@ -0,0 +1,34 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_regex + */ +class SettingRegex extends SettingString { + + protected $delimiter = '/'; // regex delimiter to be used in testing input + protected $pregflags = 'ui'; // regex pattern modifiers to be used in testing input + + /** @inheritdoc */ + public function update($input) { + + // let parent do basic checks, value, not changed, etc. + $local = $this->local; + if(!parent::update($input)) return false; + $this->local = $local; + + // see if the regex compiles and runs (we don't check for effectiveness) + $regex = $this->delimiter . $input . $this->delimiter . $this->pregflags; + $lastError = error_get_last(); + @preg_match($regex, 'testdata'); + if(preg_last_error() != PREG_NO_ERROR || error_get_last() != $lastError) { + $this->input = $input; + $this->error = true; + return false; + } + + $this->local = $input; + return true; + } +} diff --git a/lib/plugins/config/core/Setting/SettingRenderer.php b/lib/plugins/config/core/Setting/SettingRenderer.php new file mode 100644 index 000000000..37ba9c70a --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingRenderer.php @@ -0,0 +1,56 @@ +<?php +/** + * additional setting classes specific to these settings + * + * @author Chris Smith <chris@jalakai.co.uk> + */ + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_renderer + */ +class SettingRenderer extends SettingMultichoice { + protected $prompts = array(); + protected $format = null; + + /** @inheritdoc */ + public function initialize($default = null, $local = null, $protected = null) { + $format = $this->format; + + foreach(plugin_list('renderer') as $plugin) { + $renderer = plugin_load('renderer', $plugin); + if(method_exists($renderer, 'canRender') && $renderer->canRender($format)) { + $this->choices[] = $plugin; + + $info = $renderer->getInfo(); + $this->prompts[$plugin] = $info['name']; + } + } + + parent::initialize($default, $local, $protected); + } + + /** @inheritdoc */ + public function html(\admin_plugin_config $plugin, $echo = false) { + + // make some language adjustments (there must be a better way) + // transfer some plugin names to the config plugin + foreach($this->choices as $choice) { + if(!$plugin->getLang($this->key . '_o_' . $choice)) { + if(!isset($this->prompts[$choice])) { + $plugin->addLang( + $this->key . '_o_' . $choice, + sprintf($plugin->getLang('renderer__core'), $choice) + ); + } else { + $plugin->addLang( + $this->key . '_o_' . $choice, + sprintf($plugin->getLang('renderer__plugin'), $this->prompts[$choice]) + ); + } + } + } + return parent::html($plugin, $echo); + } +} diff --git a/lib/plugins/config/core/Setting/SettingSavedir.php b/lib/plugins/config/core/Setting/SettingSavedir.php new file mode 100644 index 000000000..43e428dd3 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingSavedir.php @@ -0,0 +1,26 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_savedir + */ +class SettingSavedir extends SettingString { + + /** @inheritdoc */ + public function update($input) { + if($this->isProtected()) return false; + + $value = is_null($this->local) ? $this->default : $this->local; + if($value == $input) return false; + + if(!init_path($input)) { + $this->error = true; + $this->input = $input; + return false; + } + + $this->local = $input; + return true; + } +} diff --git a/lib/plugins/config/core/Setting/SettingSepchar.php b/lib/plugins/config/core/Setting/SettingSepchar.php new file mode 100644 index 000000000..57cd0ae92 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingSepchar.php @@ -0,0 +1,18 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_sepchar + */ +class SettingSepchar extends SettingMultichoice { + + /** @inheritdoc */ + public function __construct($key, $param = null) { + $str = '_-.'; + for($i = 0; $i < strlen($str); $i++) $this->choices[] = $str[$i]; + + // call foundation class constructor + parent::__construct($key, $param); + } +} diff --git a/lib/plugins/config/core/Setting/SettingString.php b/lib/plugins/config/core/Setting/SettingString.php new file mode 100644 index 000000000..b819407b7 --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingString.php @@ -0,0 +1,32 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +/** + * Class setting_string + */ +class SettingString extends Setting { + /** @inheritdoc */ + public function html(\admin_plugin_config $plugin, $echo = false) { + $disable = ''; + + if($this->isProtected()) { + $value = $this->protected; + $disable = 'disabled="disabled"'; + } else { + if($echo && $this->error) { + $value = $this->input; + } else { + $value = is_null($this->local) ? $this->default : $this->local; + } + } + + $key = htmlspecialchars($this->key); + $value = htmlspecialchars($value); + + $label = '<label for="config___' . $key . '">' . $this->prompt($plugin) . '</label>'; + $input = '<input id="config___' . $key . '" name="config[' . $key . + ']" type="text" class="edit" value="' . $value . '" ' . $disable . '/>'; + return array($label, $input); + } +} diff --git a/lib/plugins/config/core/Setting/SettingUndefined.php b/lib/plugins/config/core/Setting/SettingUndefined.php new file mode 100644 index 000000000..fa46a9f1d --- /dev/null +++ b/lib/plugins/config/core/Setting/SettingUndefined.php @@ -0,0 +1,40 @@ +<?php + +namespace dokuwiki\plugin\config\core\Setting; + +use dokuwiki\plugin\config\core\Configuration; + +/** + * A do-nothing class used to detect settings with no metadata entry. + * Used internaly to hide undefined settings, and generate the undefined settings list. + */ +class SettingUndefined extends SettingHidden { + + protected $errorMessage = '_msg_setting_undefined'; + + /** @inheritdoc */ + public function shouldHaveDefault() { + return false; + } + + /** @inheritdoc */ + public function html(\admin_plugin_config $plugin, $echo = false) { + // determine the name the meta key would be called + if(preg_match( + '/^(?:plugin|tpl)' . Configuration::KEYMARKER . '.*?' . Configuration::KEYMARKER . '(.*)$/', + $this->getKey(), + $undefined_setting_match + )) { + $undefined_setting_key = $undefined_setting_match[1]; + } else { + $undefined_setting_key = $this->getKey(); + } + + $label = '<span title="$meta[\'' . $undefined_setting_key . '\']">$' . + 'conf' . '[\'' . $this->getArrayKey() . '\']</span>'; + $input = $plugin->getLang($this->errorMessage); + + return array($label, $input); + } + +} diff --git a/lib/plugins/config/core/Writer.php b/lib/plugins/config/core/Writer.php new file mode 100644 index 000000000..56de621d9 --- /dev/null +++ b/lib/plugins/config/core/Writer.php @@ -0,0 +1,116 @@ +<?php + +namespace dokuwiki\plugin\config\core; +use dokuwiki\plugin\config\core\Setting\Setting; + +/** + * Writes the settings to the correct local file + */ +class Writer { + /** @var string header info */ + protected $header = 'Dokuwiki\'s Main Configuration File - Local Settings'; + + /** @var string the file where the config will be saved to */ + protected $savefile; + + /** + * Writer constructor. + */ + public function __construct() { + global $config_cascade; + $this->savefile = end($config_cascade['main']['local']); + } + + /** + * Save the given settings + * + * @param Setting[] $settings + * @throws \Exception + */ + public function save($settings) { + global $conf; + if($this->isLocked()) throw new \Exception('no save'); + + // backup current file (remove any existing backup) + if(file_exists($this->savefile)) { + if(file_exists($this->savefile . '.bak.php')) @unlink($this->savefile . '.bak.php'); + if(!io_rename($this->savefile, $this->savefile . '.bak.php')) throw new \Exception('no backup'); + } + + if(!$fh = @fopen($this->savefile, 'wb')) { + io_rename($this->savefile . '.bak.php', $this->savefile); // problem opening, restore the backup + throw new \Exception('no save'); + } + + $out = $this->getHeader(); + foreach($settings as $setting) { + if($setting->shouldBeSaved()) { + $out .= $setting->out('conf', 'php'); + } + } + + fwrite($fh, $out); + fclose($fh); + if($conf['fperm']) chmod($this->savefile, $conf['fperm']); + $this->opcacheUpdate($this->savefile); + } + + /** + * Update last modified time stamp of the config file + * + * Will invalidate all DokuWiki caches + * + * @throws \Exception when the config isn't writable + */ + public function touch() { + if($this->isLocked()) throw new \Exception('no save'); + @touch($this->savefile); + $this->opcacheUpdate($this->savefile); + } + + /** + * Invalidate the opcache of the given file + * + * @todo this should probably be moved to core + * @param string $file + */ + protected function opcacheUpdate($file) { + if(!function_exists('opcache_invalidate')) return; + opcache_invalidate($file); + } + + /** + * Configuration is considered locked if there is no local settings filename + * or the directory its in is not writable or the file exists and is not writable + * + * @return bool true: locked, false: writable + */ + public function isLocked() { + if(!$this->savefile) return true; + if(!is_writable(dirname($this->savefile))) return true; + if(file_exists($this->savefile) && !is_writable($this->savefile)) return true; + return false; + } + + /** + * Returns the PHP intro header for the config file + * + * @return string + */ + protected function getHeader() { + return join( + "\n", + array( + '<?php', + '/*', + ' * ' . $this->header, + ' * Auto-generated by config plugin', + ' * Run for user: ' . $_SERVER['REMOTE_USER'], + ' * Date: ' . date('r'), + ' */', + '', + '' + ) + ); + } +} diff --git a/lib/plugins/config/lang/ar/lang.php b/lib/plugins/config/lang/ar/lang.php index 69e843ffd..bc83ddaf9 100644 --- a/lib/plugins/config/lang/ar/lang.php +++ b/lib/plugins/config/lang/ar/lang.php @@ -1,10 +1,13 @@ <?php + /** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * Arabic language file * + * @author Khalid <khalid.aljahil@gmail.com> * @author Yaman Hokan <always.smile.yh@hotmail.com> * @author Usama Akkad <uahello@gmail.com> - * @author uahello@gmail.com */ $lang['menu'] = 'الإعدادات'; $lang['error'] = 'لم تحدث الاعدادات بسبب قيمة غير صالحة، رجاء راجع تغييراتك ثم ارسلها. @@ -142,12 +145,6 @@ $lang['proxy____user'] = 'اسم مستخدم الوكيل'; $lang['proxy____pass'] = 'كلمة سر الوكيل'; $lang['proxy____ssl'] = 'استخدم ssl للاتصال بالوكيل'; $lang['proxy____except'] = 'تعبير شرطي لمقابلة العناوين التي ستتجاوز البروكسي.'; -$lang['safemodehack'] = 'مكّن hack الوضع الآمن'; -$lang['ftp____host'] = 'خادوم FTP ل hack الوضع الآمن'; -$lang['ftp____port'] = 'منفذ FTP ل hack الوضع الآمن'; -$lang['ftp____user'] = 'اسم مستخدم FTP ل hack الوضع الآمن'; -$lang['ftp____pass'] = 'كلمة سر FTP ل hack الوضع الآمن'; -$lang['ftp____root'] = 'دليل الجذر ل FTP لأجل hack الوضع الآمن'; $lang['license_o_'] = 'غير مختار'; $lang['typography_o_0'] = 'لاشيء'; $lang['typography_o_1'] = 'استبعاد الاقتباس المفرد'; diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php index 75508a525..04aa5b0a3 100644 --- a/lib/plugins/config/lang/bg/lang.php +++ b/lib/plugins/config/lang/bg/lang.php @@ -2,7 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Salif Mehmed <salif13mehmed@gmail.com> * @author Nikolay Vladimirov <nikolay@vladimiroff.com> * @author Viktor Usunov <usun0v@mail.bg> * @author Kiril <neohidra@gmail.com> @@ -145,12 +146,6 @@ $lang['proxy____user'] = 'Потребител за проксито'; $lang['proxy____pass'] = 'Парола за проксито'; $lang['proxy____ssl'] = 'Ползване на SSL при свързване с проксито'; $lang['proxy____except'] = 'Регулярен израз определящ за кои URL адреси да не се ползва прокси сървър.'; -$lang['safemodehack'] = 'Ползване на хака safemode'; -$lang['ftp____host'] = 'FTP сървър за хака safemode'; -$lang['ftp____port'] = 'FTP порт за хака safemode'; -$lang['ftp____user'] = 'FTP потребител за хака safemode'; -$lang['ftp____pass'] = 'FTP парола за хака safemode'; -$lang['ftp____root'] = 'FTP главна директория за хака safemode'; $lang['license_o_'] = 'Нищо не е избрано'; $lang['typography_o_0'] = 'без'; $lang['typography_o_1'] = 'с изключение на единични кавички'; diff --git a/lib/plugins/config/lang/ca-valencia/lang.php b/lib/plugins/config/lang/ca-valencia/lang.php index db86dc916..944b891ee 100644 --- a/lib/plugins/config/lang/ca-valencia/lang.php +++ b/lib/plugins/config/lang/ca-valencia/lang.php @@ -128,12 +128,6 @@ $lang['proxy____port'] = 'Port del proxy'; $lang['proxy____user'] = 'Nom d\'usuari del proxy'; $lang['proxy____pass'] = 'Contrasenya del proxy'; $lang['proxy____ssl'] = 'Utilisar SSL per a conectar al proxy'; -$lang['safemodehack'] = 'Activar \'hack\' de modo segur'; -$lang['ftp____host'] = 'Servidor FTP per al \'hack\' de modo segur'; -$lang['ftp____port'] = 'Port FTP per al \'hack\' de modo segur'; -$lang['ftp____user'] = 'Nom de l\'usuari per al \'hack\' de modo segur'; -$lang['ftp____pass'] = 'Contrasenya FTP per al \'hack\' de modo segur'; -$lang['ftp____root'] = 'Directori base FTP per al \'hack\' de modo segur'; $lang['license_o_'] = 'Cap triada'; $lang['typography_o_0'] = 'cap'; $lang['typography_o_1'] = 'Excloure cometes simples'; diff --git a/lib/plugins/config/lang/ca/lang.php b/lib/plugins/config/lang/ca/lang.php index 7ef19e74c..7dc528026 100644 --- a/lib/plugins/config/lang/ca/lang.php +++ b/lib/plugins/config/lang/ca/lang.php @@ -3,11 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> * @author Carles Bellver <carles.bellver@gmail.com> - * @author carles.bellver@gmail.com - * @author carles.bellver@cent.uji.es - * @author Carles Bellver <carles.bellver@cent.uji.es> - * @author daniel@6temes.cat + * @author carles.bellver <carles.bellver@cent.uji.es> + * @author daniel <daniel@6temes.cat> * @author controlonline.net <controlonline.net@gmail.com> * @author Pauet <pauet@gmx.com> * @author Àngel Pérez Beroy <aperezberoy@gmail.com> @@ -86,6 +85,7 @@ $lang['disableactions'] = 'Inhabilita accions DokuWiki'; $lang['disableactions_check'] = 'Revisa'; $lang['disableactions_subscription'] = 'Subscripció/cancel·lació'; $lang['disableactions_wikicode'] = 'Mostra/exporta font'; +$lang['disableactions_profile_delete'] = 'Suprimeix el propi compte'; $lang['disableactions_other'] = 'Altres accions (separades per comes)'; $lang['auth_security_timeout'] = 'Temps d\'espera de seguretat en l\'autenticació (segons)'; $lang['securecookie'] = 'Les galetes que s\'han creat via HTTPS, només s\'han d\'enviar des del navegador per HTTPS? Inhabiliteu aquesta opció si només l\'inici de sessió del wiki es fa amb SSL i la navegació del wiki es fa sense seguretat.'; @@ -119,6 +119,7 @@ $lang['rss_linkto'] = 'Destinació dels enllaços en el canal XML'; $lang['rss_content'] = 'Què es mostrarà en els elements del canal XML?'; $lang['rss_update'] = 'Interval d\'actualització del canal XML (segons)'; $lang['rss_show_summary'] = 'Mostra resum en els títols del canal XML'; +$lang['rss_media_o_pages'] = 'pàgines'; $lang['updatecheck'] = 'Comprova actualitzacions i avisos de seguretat. DokuWiki necessitarà contactar amb update.dokuwiki.org per utilitzar aquesta característica.'; $lang['userewrite'] = 'Utilitza URL nets'; $lang['useslash'] = 'Utilitza la barra / com a separador d\'espais en els URL'; @@ -134,17 +135,15 @@ $lang['xsendfile'] = 'Utilitza la capçalera X-Sendfile perquè el s $lang['renderer_xhtml'] = 'Renderitzador que cal utilitzar per a la sortida principal (xhtml) del wiki'; $lang['renderer__core'] = '%s (ànima del dokuwiki)'; $lang['renderer__plugin'] = '%s (connector)'; +$lang['search_fragment_o_exact'] = 'exacte'; +$lang['search_fragment_o_starts_with'] = 'comença per'; +$lang['search_fragment_o_ends_with'] = 'termina per'; +$lang['search_fragment_o_contains'] = 'conté'; $lang['proxy____host'] = 'Nom del servidor intermediari'; $lang['proxy____port'] = 'Port del servidor intermediari'; $lang['proxy____user'] = 'Nom d\'usuari del servidor intermediari'; $lang['proxy____pass'] = 'Contrasenya del servidor intermediari'; $lang['proxy____ssl'] = 'Utilitza SSL per connectar amb el servidor intermediari'; -$lang['safemodehack'] = 'Utilitza el hack per a safemode'; -$lang['ftp____host'] = 'Servidor FTP per al hack de safemode'; -$lang['ftp____port'] = 'Port FTP per al hack de safemode'; -$lang['ftp____user'] = 'Nom d\'usuari FTP per al hack de safemode'; -$lang['ftp____pass'] = 'Contrasenya FTP per al hack de safemode'; -$lang['ftp____root'] = 'Directori arrel FTP per al hack de safemode'; $lang['license_o_'] = 'Cap selecció'; $lang['typography_o_0'] = 'cap'; $lang['typography_o_1'] = 'només cometes dobles'; diff --git a/lib/plugins/config/lang/cs/lang.php b/lib/plugins/config/lang/cs/lang.php index 80a9d29a0..a72ab7b2c 100644 --- a/lib/plugins/config/lang/cs/lang.php +++ b/lib/plugins/config/lang/cs/lang.php @@ -3,6 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + * @author Petr Kajzar <petr.kajzar@lf1.cuni.cz> + * @author Robert Surý <rsurycz@seznam.cz> + * @author Martin Hořínek <hev@hev.cz> * @author Jonáš Dyba <jonas.dyba@gmail.com> * @author Bohumir Zamecnik <bohumir@zamecnik.org> * @author Zbynek Krivka <zbynek.krivka@seznam.cz> @@ -48,6 +52,7 @@ $lang['_advanced'] = 'Pokročilá nastavení'; $lang['_network'] = 'Nastavení sítě'; $lang['_msg_setting_undefined'] = 'Chybí metadata položky.'; $lang['_msg_setting_no_class'] = 'Chybí třída položky.'; +$lang['_msg_setting_no_known_class'] = 'Konfigurační třída není dostupná.'; $lang['_msg_setting_no_default'] = 'Chybí výchozí hodnota položky.'; $lang['title'] = 'Název celé wiki'; $lang['start'] = 'Název úvodní stránky'; @@ -99,7 +104,7 @@ $lang['disableactions'] = 'Vypnout DokuWiki akce'; $lang['disableactions_check'] = 'Zkontrolovat'; $lang['disableactions_subscription'] = 'Přihlásit se/Odhlásit se ze seznamu pro odběr změn'; $lang['disableactions_wikicode'] = 'Prohlížet zdrojové kódy/Export wiki textu'; -$lang['disableactions_profile_delete'] = 'Smazat vlasní účet'; +$lang['disableactions_profile_delete'] = 'Smazat vlastní účet'; $lang['disableactions_other'] = 'Další akce (oddělené čárkou)'; $lang['disableactions_rss'] = 'XMS syndikace (RSS)'; $lang['auth_security_timeout'] = 'Časový limit pro autentikaci (v sekundách)'; @@ -132,6 +137,7 @@ $lang['subscribe_time'] = 'Časový interval v sekundách, ve kterém jso $lang['notify'] = 'Posílat oznámení o změnách na následující emailovou adresu'; $lang['registernotify'] = 'Posílat informace o nově registrovaných uživatelích na tuto mailovou adresu'; $lang['mailfrom'] = 'E-mailová adresa, která se bude používat pro automatické maily'; +$lang['mailreturnpath'] = 'E-mailová adresa příjemce pro oznámení o nedoručení'; $lang['mailprefix'] = 'Předpona předmětu e-mailu, která se bude používat pro automatické maily'; $lang['htmlmail'] = 'Posílat emaily v HTML (hezčí ale větší). Při vypnutí budou posílány jen textové emaily.'; $lang['sitemap'] = 'Generovat Google sitemap (interval ve dnech)'; @@ -141,6 +147,7 @@ $lang['rss_content'] = 'Co zobrazovat v položkách XML kanálu?'; $lang['rss_update'] = 'Interval aktualizace XML kanálu (v sekundách)'; $lang['rss_show_summary'] = 'XML kanál ukazuje souhrn v titulku'; $lang['rss_media'] = 'Jaký typ změn má být uveden v kanálu XML'; +$lang['rss_media_o_both'] = 'oba'; $lang['rss_media_o_pages'] = 'stránky'; $lang['rss_media_o_media'] = 'média'; $lang['updatecheck'] = 'Kontrolovat aktualizace a bezpečnostní varování? DokuWiki potřebuje pro tuto funkci přístup k update.dokuwiki.org'; @@ -160,9 +167,13 @@ $lang['xsendfile'] = 'Používat X-Sendfile hlavničky pro download $lang['renderer_xhtml'] = 'Vykreslovací jádro pro hlavní (xhtml) výstup wiki'; $lang['renderer__core'] = '%s (jádro DokuWiki)'; $lang['renderer__plugin'] = '%s (plugin)'; +$lang['search_nslimit'] = 'Omezit vyhledávání na současných X jmenných prostorů. Když je vyhledávání provedeno ze stránky zanořeného jmenného prostoru, bude jako filtr přidáno prvních X jmenných prostorů.'; +$lang['search_fragment'] = 'Určete výchozí chování vyhledávání fragmentů'; +$lang['search_fragment_o_exact'] = 'přesný'; $lang['search_fragment_o_starts_with'] = 'začíná s'; $lang['search_fragment_o_ends_with'] = 'končí s'; $lang['search_fragment_o_contains'] = 'obsahuje'; +$lang['trustedproxy'] = 'Důvěřovat proxy serverům odpovídajícím tomuto regulárním výrazu ohledně skutečné IP adresy klienta, kterou hlásí. Výchozí hodnota odpovídá místním sítím. Ponechejte prázdné, pokud nechcete důvěřovat žádné proxy.'; $lang['dnslookups'] = 'DokuWiki zjišťuje DNS jména pro vzdálené IP adresy uživatelů, kteří editují stránky. Pokud máte pomalý, nebo nefunkční DNS server, nebo nepotřebujete tuto funkci, tak tuto volbu zrušte.'; $lang['jquerycdn'] = 'Mají být skripty jQuery a jQuery UI načítány z CDN? Vzniknou tím další HTTP dotazy, ale soubory se mohou načíst rychleji a uživatelé je už mohou mít ve vyrovnávací paměti.'; @@ -175,12 +186,6 @@ $lang['proxy____user'] = 'Proxy uživatelské jméno'; $lang['proxy____pass'] = 'Proxy heslo'; $lang['proxy____ssl'] = 'Použít SSL při připojení k proxy'; $lang['proxy____except'] = 'Regulární výrazy pro URL, pro které bude přeskočena proxy.'; -$lang['safemodehack'] = 'Zapnout safemode hack'; -$lang['ftp____host'] = 'FTP server pro safemode hack'; -$lang['ftp____port'] = 'FTP port pro safemode hack'; -$lang['ftp____user'] = 'FTP uživatelské jméno pro safemode hack'; -$lang['ftp____pass'] = 'FTP heslo pro safemode hack'; -$lang['ftp____root'] = 'FTP kořenový adresář pro safemode hack'; $lang['license_o_'] = 'Nic nevybráno'; $lang['typography_o_0'] = 'vypnuto'; $lang['typography_o_1'] = 'Pouze uvozovky'; diff --git a/lib/plugins/config/lang/cy/lang.php b/lib/plugins/config/lang/cy/lang.php index 4fa8ab853..781419429 100644 --- a/lib/plugins/config/lang/cy/lang.php +++ b/lib/plugins/config/lang/cy/lang.php @@ -185,14 +185,6 @@ $lang['proxy____pass'] = 'Cyfrinair procsi'; $lang['proxy____ssl'] = 'Defnyddio SSL i gysylltu â\'r procsi'; $lang['proxy____except'] = 'Mynegiad rheolaidd i gydweddu URL ar gyfer y procsi a ddylai cael eu hanwybyddu.'; -/* Safemode Hack */ -$lang['safemodehack'] = 'Galluogi safemode hack'; -$lang['ftp____host'] = 'Gweinydd FTP safemode hack'; -$lang['ftp____port'] = 'Porth FTP safemode hack'; -$lang['ftp____user'] = 'Defnyddair FTP safemode hack'; -$lang['ftp____pass'] = 'Cyfrinair FTP safemode hack'; -$lang['ftp____root'] = 'Gwraiddffolder FTP safemode hack'; - /* License Options */ $lang['license_o_'] = 'Dim wedi\'i ddewis'; diff --git a/lib/plugins/config/lang/da/lang.php b/lib/plugins/config/lang/da/lang.php index 7546264e9..ff601811d 100644 --- a/lib/plugins/config/lang/da/lang.php +++ b/lib/plugins/config/lang/da/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jacob Palm <jacobpalmdk@icloud.com> * @author Kenneth Schack Banner <kescba@gmail.com> * @author Jon Theil Nielsen <jontheil@gmail.com> * @author Lars Næsbye Christensen <larsnaesbye@stud.ku.dk> @@ -13,7 +14,6 @@ * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> * @author rasmus <rasmus@kinnerup.com> * @author Mikael Lyngvig <mikael@lyngvig.org> - * @author Jacob Palm <mail@jacobpalm.dk> */ $lang['menu'] = 'Opsætningsindstillinger'; $lang['error'] = 'Indstillingerne blev ikke opdateret på grund af en ugyldig værdi, Gennemse venligst dine ændringer og gem dem igen. @@ -28,146 +28,164 @@ $lang['security'] = 'Sikkerhedsadvarsel: Ændring af denne mulighed $lang['_configuration_manager'] = 'Opsætningsstyring'; $lang['_header_dokuwiki'] = 'DokuWiki indstillinger'; $lang['_header_plugin'] = 'Udvidelsesindstillinger'; -$lang['_header_template'] = 'Skabelonindstillinger'; -$lang['_header_undefined'] = 'Ikke satte indstillinger'; +$lang['_header_template'] = 'Tema'; +$lang['_header_undefined'] = 'Udefinerede indstillinger'; $lang['_basic'] = 'Grundindstillinger'; -$lang['_display'] = 'Synlighedsindstillinger'; +$lang['_display'] = 'Visningsindstillinger'; $lang['_authentication'] = 'Bekræftelsesindstillinger'; $lang['_anti_spam'] = 'Trafikkontrolsindstillinger'; $lang['_editing'] = 'Redigeringsindstillinger'; $lang['_links'] = 'Henvisningsindstillinger'; $lang['_media'] = 'Medieindstillinger'; $lang['_notifications'] = 'Notificeringsindstillinger'; +$lang['_syndication'] = 'Syndikering (RSS)'; $lang['_advanced'] = 'Avancerede indstillinger'; $lang['_network'] = 'Netværksindstillinger'; $lang['_msg_setting_undefined'] = 'Ingen indstillingsmetadata.'; $lang['_msg_setting_no_class'] = 'Ingen indstillingsklasse.'; +$lang['_msg_setting_no_known_class'] = 'Indstillingsklasse ikke tilgængelig.'; $lang['_msg_setting_no_default'] = 'Ingen standardværdi.'; -$lang['title'] = 'Wiki titel'; -$lang['start'] = 'Startsidens navn'; +$lang['title'] = 'Wiki titel (navnet på din wiki)'; +$lang['start'] = 'Startsidens navn (benyttes som startside i alle navnerum)'; $lang['lang'] = 'Sprog'; -$lang['template'] = 'Skabelon'; -$lang['tagline'] = 'Tagline (hvis templaten understøtter det)'; -$lang['sidebar'] = 'Sidebar side navne (hvis templaten understøtter det).'; +$lang['template'] = 'Tema'; +$lang['tagline'] = 'Tagline (hvis tema understøtter det)'; +$lang['sidebar'] = 'Sidepanelet sidenavn (hvis temaet understøtter det). Lad være blankt for at deaktivere sidepanelet.'; $lang['license'] = 'Under hvilken licens skal dit indhold frigives?'; $lang['savedir'] = 'Katalog til opbevaring af data'; $lang['basedir'] = 'Grundkatalog'; -$lang['baseurl'] = 'Grundadresse'; -$lang['cookiedir'] = 'Cookie sti. Hvis tom, bruges baseurl.'; -$lang['dmode'] = 'Katalogoprettelsestilstand'; -$lang['fmode'] = 'Filoprettelsestilstand'; -$lang['allowdebug'] = 'Tillad fejlretning <b>slå fra hvis unødvendig!</b>'; +$lang['baseurl'] = 'Serverens URL-adresse (f.eks. <code>http://www.minserver.dk<code>). Lad være blank for at detektere automatisk.'; +$lang['cookiedir'] = 'Cookie sti. Hvis tom benyttes grundlæggende URL.'; +$lang['dmode'] = 'Mappe oprettelsestilstand'; +$lang['fmode'] = 'Fil oprettelsestilstand'; +$lang['allowdebug'] = 'Tillad fejlretning. <b>Slå fra hvis unødvendig!</b>'; $lang['recent'] = 'Nylige ændringer'; $lang['recent_days'] = 'Hvor mange nye ændringer der skal beholdes (dage)'; -$lang['breadcrumbs'] = 'Stilængde'; -$lang['youarehere'] = 'Hierarkisk sti'; -$lang['fullpath'] = 'Vis den fulde sti til siderne i bundlinjen'; +$lang['breadcrumbs'] = 'Stilængde. Sæt til 0 for at deaktivere.'; +$lang['youarehere'] = 'Brug hierarkisk sti (hvis slået til, bør du formentlig slå ovenstående fra)'; +$lang['fullpath'] = 'Vis den fulde sti til siderne i sidefoden'; $lang['typography'] = 'Typografiske erstatninger'; $lang['dformat'] = 'Datoformat (se PHP\'s <a href="http://php.net/strftime">strftime</a>-funktion)'; $lang['signature'] = 'Underskrift'; $lang['showuseras'] = 'Hvad skal vises når den sidste bruger, der har ændret siden, fremstilles'; $lang['toptoclevel'] = 'Øverste niveau for indholdsfortegnelse'; -$lang['tocminheads'] = 'Mindste antal overskrifter for at danne Indholdsfortegnelsen'; +$lang['tocminheads'] = 'Mindste antal overskrifter for at danne en indholdsfortegnelse'; $lang['maxtoclevel'] = 'Højeste niveau for indholdsfortegnelse'; $lang['maxseclevel'] = 'Højeste niveau for redigering af sektioner'; -$lang['camelcase'] = 'Brug KamelKasse til henvisninger'; +$lang['camelcase'] = 'Brug CamelCase til henvisninger'; $lang['deaccent'] = 'Pæne sidenavne'; $lang['useheading'] = 'Brug første overskrift til sidenavne'; $lang['sneaky_index'] = 'DokuWiki vil som standard vise alle navnerum i indholdsfortegnelsen. Ved at slå denne valgmulighed til vil skjule de navnerum, hvor brugeren ikke har læsetilladelse. Dette kan føre til, at tilgængelige undernavnerum bliver skjult. Ligeledes kan det også gøre indholdsfortegnelsen ubrugelig med visse ACL-opsætninger.'; $lang['hidepages'] = 'Skjul lignende sider (almindelige udtryk)'; -$lang['useacl'] = 'Benyt adgangskontrollister'; +$lang['useacl'] = 'Benyt adgangskontrollister (ACL)'; $lang['autopasswd'] = 'Generer adgangskoder automatisk'; $lang['authtype'] = 'Bekræftelsesgrundlag'; $lang['passcrypt'] = 'Krypteringsmetode for adgangskoder'; $lang['defaultgroup'] = 'Standardgruppe'; $lang['superuser'] = 'Superbruger'; $lang['manager'] = 'Bestyrer - en gruppe eller bruger med adgang til bestemte styrende funktioner'; -$lang['profileconfirm'] = 'Bekræft profilændringer med kodeord'; +$lang['profileconfirm'] = 'Bekræft profilændringer med adgangskode'; $lang['rememberme'] = 'Tillad varige datafiler for brugernavne (husk mig)'; $lang['disableactions'] = 'Slå DokuWiki-muligheder fra'; $lang['disableactions_check'] = 'Tjek'; $lang['disableactions_subscription'] = 'Tliføj/Fjern opskrivning'; $lang['disableactions_wikicode'] = 'Vis kilde/Eksporter grundkode'; +$lang['disableactions_profile_delete'] = 'Slet egen brugerkonto'; $lang['disableactions_other'] = 'Andre muligheder (kommasepareret)'; +$lang['disableactions_rss'] = 'XML syndikering (RSS)'; $lang['auth_security_timeout'] = 'Tidsudløb for bekræftelse (sekunder)'; $lang['securecookie'] = 'Skal datafiler skabt af HTTPS kun sendes af HTTPS gennem browseren? Slå denne valgmulighed fra hvis kun brugen af din wiki er SSL-beskyttet, mens den almindelige tilgang udefra ikke er sikret.'; -$lang['remote'] = 'Aktivér fjern APIet. Dette tillader andre programmer at tilgå wikien via XML-RPC eller andre mekanismer.'; -$lang['remoteuser'] = 'Begræns fjern API adgang til den kommaseparerede liste af grupper eller brugere angivet her. Efterlad tom for at give adgang til alle.'; -$lang['usewordblock'] = 'Hindr uønsket brug med en ordliste'; -$lang['relnofollow'] = 'Brug rel="nofollow" til udadgående henvisninger'; +$lang['remote'] = 'Aktivér fjern-API\'et. Dette tillader andre programmer at tilgå wikien via XML-RPC eller andre mekanismer.'; +$lang['remoteuser'] = 'Begræns fjern-API adgang til den kommaseparerede liste af grupper eller brugere angivet her. Efterlad tom for at give adgang til alle.'; +$lang['usewordblock'] = 'Bloker uønsket sprogbrug med en ordliste'; +$lang['relnofollow'] = 'Brug rel="nofollow" til udgående henvisninger'; $lang['indexdelay'] = 'Tidsforsinkelse før katalogisering (sek.)'; -$lang['mailguard'] = 'Slør elektroniske adresser'; +$lang['mailguard'] = 'Slør e-mail adresser'; $lang['iexssprotect'] = 'Gennemse oplagte filer for mulig skadelig JavaScript- eller HTML-kode.'; $lang['usedraft'] = 'Gem automatisk en kladde under redigering'; $lang['htmlok'] = 'Tillad indlejret HTML'; $lang['phpok'] = 'Tillad indlejret PHP'; $lang['locktime'] = 'Længste levetid for låsefiler (sek)'; -$lang['cachetime'] = 'Længste levetid for "cache" (sek)'; +$lang['cachetime'] = 'Længste levetid for cache (sek)'; $lang['target____wiki'] = 'Målvindue for indre henvisninger'; $lang['target____interwiki'] = 'Målvindue for egne wikihenvisninger '; $lang['target____extern'] = 'Målvindue for udadgående henvisninger'; $lang['target____media'] = 'Målvindue for mediehenvisninger'; $lang['target____windows'] = 'Målvindue til Windows-henvisninger'; -$lang['mediarevisions'] = 'Akvtivér media udgaver?'; +$lang['mediarevisions'] = 'Aktiver revisioner af medier?'; $lang['refcheck'] = 'Mediehenvisningerkontrol'; -$lang['gdlib'] = 'Udgave af GD Lib'; +$lang['gdlib'] = 'Version af GD Lib'; $lang['im_convert'] = 'Sti til ImageMagick\'s omdannerværktøj'; $lang['jpg_quality'] = 'JPG komprimeringskvalitet (0-100)'; -$lang['fetchsize'] = 'Største antal (bytes) fetch.php må hente udefra'; +$lang['fetchsize'] = 'Største antal (bytes) fetch.php må hente udefra, til eksempelvis cache og størrelsesændring af eksterne billeder'; $lang['subscribers'] = 'Slå understøttelse af abonnement på sider til'; $lang['subscribe_time'] = 'Tid der går før abonnementlister og nyhedsbreve er sendt (i sekunder). Denne værdi skal være mindre end den tid specificeret under recent_days.'; $lang['notify'] = 'Send ændringsmeddelelser til denne e-adresse'; $lang['registernotify'] = 'Send info om nyoprettede brugere til denne e-adresse'; -$lang['mailfrom'] = 'E-adresse til brug for automatiske meddelelser'; -$lang['mailprefix'] = 'Præfiks på email subject for automastiske mails. Efterlad blank for at bruge wiki titlen.'; -$lang['htmlmail'] = 'Send pænere, men større HTML multipart mails. Deaktivér for at sende rene tekst mails.'; -$lang['sitemap'] = 'Generer Google-"sitemap" (dage)'; -$lang['rss_type'] = 'Type af XML-liste'; -$lang['rss_linkto'] = 'XML-liste henviser til'; -$lang['rss_content'] = 'Hvad skal der vises i XML-listepunkteren?'; -$lang['rss_update'] = 'XML-listens opdateringsinterval (sek)'; -$lang['rss_show_summary'] = 'XML-liste vis referat i overskriften'; -$lang['rss_media'] = 'Hvilke ændringer skal vises i XML listen?'; +$lang['mailfrom'] = 'E-mail adresse til brug for automatiske meddelelser'; +$lang['mailreturnpath'] = 'E-mail adresse til notifikation når en mail ikke kan leveres'; +$lang['mailprefix'] = 'Præfiks på e-mail emne til automatiske mails. Efterlad blank for at bruge wikien titel.'; +$lang['htmlmail'] = 'Send pænere, men større, HTML multipart mails. Deaktiver for at sende mails i klar tekst.'; +$lang['sitemap'] = 'Interval for dannelse af Google sitemap (i dage). Sæt til 0 for at deaktivere.'; +$lang['rss_type'] = 'Type af XML-feed'; +$lang['rss_linkto'] = 'XML-feed henviser til'; +$lang['rss_content'] = 'Hvad skal der vises i XML-feed?'; +$lang['rss_update'] = 'XML-feed opdateringsinterval (sek)'; +$lang['rss_show_summary'] = 'XML-feed vis referat i overskriften'; +$lang['rss_show_deleted'] = 'XML feed Vis slettede feeds'; +$lang['rss_media'] = 'Hvilke ændringer skal vises i XML feed?'; +$lang['rss_media_o_both'] = 'begge'; +$lang['rss_media_o_pages'] = 'sider'; +$lang['rss_media_o_media'] = 'media'; $lang['updatecheck'] = 'Kig efter opdateringer og sikkerhedsadvarsler? DokuWiki er nødt til at kontakte update.dokuwiki.org for at tilgå denne funktion.'; $lang['userewrite'] = 'Brug pæne netadresser'; $lang['useslash'] = 'Brug skråstreg som navnerumsdeler i netadresser'; $lang['sepchar'] = 'Orddelingstegn til sidenavne'; $lang['canonical'] = 'Benyt fuldt kanoniske netadresser'; -$lang['fnencode'] = 'Metode for indkodning af ikke ASCII filnavne'; +$lang['fnencode'] = 'Metode til kodning af ikke-ASCII filnavne'; $lang['autoplural'] = 'Tjek for flertalsendelser i henvisninger'; $lang['compression'] = 'Pakningsmetode for attic-filer'; -$lang['gzip_output'] = 'Benyt gzip-Content-Encoding (indholdskryptering) til XHTML'; +$lang['gzip_output'] = 'Benyt gzip-Content-Encoding (indholdskodning) til XHTML'; $lang['compress'] = 'Komprimer CSS- og JavaScript-filer'; +$lang['cssdatauri'] = 'Maksimal størrelse i bytes hvor billeder refereret fra CSS filer integreres direkte i CSS, for at reducere HTTP headerens størrelse. <code>400</code> til <code>600</code> bytes anbefales. Sæt til <code>0</code> for at deaktivere.'; $lang['send404'] = 'Send "HTTP 404/Page Not Found" for ikke-eksisterende sider'; $lang['broken_iua'] = 'Er funktionen "ignore_user_abort" uvirksom på dit system? Dette kunne forårsage en ikke virkende søgeoversigt. IIS+PHP/CGI er kendt for ikke at virke. Se <a href="http://bugs.splitbrain.org/?do=details&task_id=852">Fejl 852</a> for flere oplysninger.'; $lang['xsendfile'] = 'Brug hovedfilen til X-Sendfile for at få netserveren til at sende statiske filer? Din netserver skal understøtte dette for at bruge det.'; $lang['renderer_xhtml'] = 'Udskriver der skal bruges til størstedelen af wiki-udskriften (XHTML)'; $lang['renderer__core'] = '%s (dokuwiki-kerne)'; $lang['renderer__plugin'] = '%s (udvidelse)'; -$lang['proxy____host'] = 'Proxy-servernavn'; -$lang['proxy____port'] = 'Proxy-port'; -$lang['proxy____user'] = 'Proxy-brugernavn'; -$lang['proxy____pass'] = 'Proxy-kodeord'; +$lang['search_nslimit'] = 'Begræns søgningen til de aktuelle X navnerum. Når en søgning udføres fra en side i et underliggende navnerum, tilføjes de første X navnerum som filter'; +$lang['search_fragment'] = 'Angiv standardadfærd ved fragment søgning'; +$lang['search_fragment_o_exact'] = 'præcis'; +$lang['search_fragment_o_starts_with'] = 'starter med'; +$lang['search_fragment_o_ends_with'] = 'slutter med'; +$lang['search_fragment_o_contains'] = 'indeholder'; +$lang['trustedproxy'] = 'Hav tillid til viderestillede proxyer som rapporterer en oprindelig IP der matcher denne regular expression. Som standard matcher lokale netværk. Efterlad blank for ikke at have tillid til nogen proxyer.'; +$lang['_feature_flags'] = 'Funktionsflag'; +$lang['defer_js'] = 'Afvent med JavaScript ekserkvering, til sidens HTML er behandlet. Dette kan få sideindlæsning til at føles hurtigere, men kan potentielt forhindre et fåtal af udvidelser i at fungere korrekt.'; +$lang['dnslookups'] = 'DokuWiki laver DNS-opslag for at finde hostnames på de IP-adresser hvorfra brugere redigerer sider. Hvis du har en langsom eller ikke-fungerende DNS-server, eller ikke ønsker denne funktion, kan du slå den fra.'; +$lang['jquerycdn'] = 'Skal jQuery og jQuery UI kode hentes fra et CDN (content delivery network)? Dette resulterer i flere HTTP-forespørgsler, men filerne indlæses muligvis hurtigere, og brugere har dem muligvis allerede i cachen.'; +$lang['jquerycdn_o_0'] = 'Intet CDN, kode hentes fra denne server'; +$lang['jquerycdn_o_jquery'] = 'Benyt code.jquery.com'; +$lang['jquerycdn_o_cdnjs'] = 'Benyt cdnjs.com'; +$lang['proxy____host'] = 'Proxyserver'; +$lang['proxy____port'] = 'Proxy port'; +$lang['proxy____user'] = 'Proxy brugernavn'; +$lang['proxy____pass'] = 'Proxy adgangskode'; $lang['proxy____ssl'] = 'Brug SSL til at forbinde til proxy'; $lang['proxy____except'] = 'Regular expression til at matche URL\'er for hvilke proxier der skal ignores'; -$lang['safemodehack'] = 'Slå "safemode hack" til '; -$lang['ftp____host'] = 'FTP-server til "safemode hack"'; -$lang['ftp____port'] = 'FTP-port til "safemode hack"'; -$lang['ftp____user'] = 'FTP-brugernavn til "safemode hack"'; -$lang['ftp____pass'] = 'FTP-adgangskode til "safemode hack"'; -$lang['ftp____root'] = 'FTP-rodmappe til "safemode hack"'; $lang['license_o_'] = 'Ingen valgt'; $lang['typography_o_0'] = 'ingen'; $lang['typography_o_1'] = 'Kun gåseøjne'; $lang['typography_o_2'] = 'Tillader enkelttegnscitering (vil måske ikke altid virke)'; $lang['userewrite_o_0'] = 'ingen'; $lang['userewrite_o_1'] = '.htaccess'; -$lang['userewrite_o_2'] = 'Dokuwiki indre'; +$lang['userewrite_o_2'] = 'Dokuwiki internt'; $lang['deaccent_o_0'] = 'fra'; $lang['deaccent_o_1'] = 'fjern accenttegn'; $lang['deaccent_o_2'] = 'romaniser'; $lang['gdlib_o_0'] = 'GD Lib ikke tilstede'; -$lang['gdlib_o_1'] = 'Udgave 1.x'; +$lang['gdlib_o_1'] = 'Version 1.x'; $lang['gdlib_o_2'] = 'automatisk sondering'; $lang['rss_type_o_rss'] = 'RSS 0.91'; $lang['rss_type_o_rss1'] = 'RSS 1.0'; @@ -179,20 +197,21 @@ $lang['rss_content_o_diff'] = '"Unified Diff" (Sammensat)'; $lang['rss_content_o_htmldiff'] = 'HTML-formateret diff-tabel'; $lang['rss_content_o_html'] = 'Fuldt HTML-sideindhold'; $lang['rss_linkto_o_diff'] = 'liste over forskelle'; -$lang['rss_linkto_o_page'] = 'den redigerede side'; -$lang['rss_linkto_o_rev'] = 'liste over ændringer'; +$lang['rss_linkto_o_page'] = 'den reviderede side'; +$lang['rss_linkto_o_rev'] = 'liste over revideringer'; $lang['rss_linkto_o_current'] = 'den nuværende side'; $lang['compression_o_0'] = 'ingen'; $lang['compression_o_gz'] = 'gzip'; $lang['compression_o_bz2'] = 'bz2'; $lang['xsendfile_o_0'] = 'brug ikke'; $lang['xsendfile_o_1'] = 'Proprietær lighttpd-hovedfil (før udgave 1.5)'; -$lang['xsendfile_o_2'] = 'Standard X-Sendfile-hovedfil'; -$lang['xsendfile_o_3'] = 'Proprietær Nginx X-Accel-Redirect hovedfil'; +$lang['xsendfile_o_2'] = 'Standard X-Sendfile header'; +$lang['xsendfile_o_3'] = 'Proprietær Nginx X-Accel-Redirect header'; $lang['showuseras_o_loginname'] = 'Brugernavn'; $lang['showuseras_o_username'] = 'Brugerens fulde navn'; -$lang['showuseras_o_email'] = 'Brugerens e-adresse (ændret i forhold til mailguard-indstillingerne)'; -$lang['showuseras_o_email_link'] = 'Brugers e-adresse som en mailto:-henvisning'; +$lang['showuseras_o_username_link'] = 'Brugerens fulde navn som interwiki bruger-link'; +$lang['showuseras_o_email'] = 'Brugerens e-mail adresse (sløret i henhold til mailguard-indstillingerne)'; +$lang['showuseras_o_email_link'] = 'Brugers e-mail adresse som en mailto:-henvisning'; $lang['useheading_o_0'] = 'Aldrig'; $lang['useheading_o_navigation'] = 'Kun navigering'; $lang['useheading_o_content'] = 'Kun wiki-indhold'; diff --git a/lib/plugins/config/lang/de-informal/lang.php b/lib/plugins/config/lang/de-informal/lang.php index 6c31e8520..dec3641ec 100644 --- a/lib/plugins/config/lang/de-informal/lang.php +++ b/lib/plugins/config/lang/de-informal/lang.php @@ -157,12 +157,6 @@ $lang['proxy____user'] = 'Benutzername für den Proxy'; $lang['proxy____pass'] = 'Passwort von dem Proxybenutzer'; $lang['proxy____ssl'] = 'SSL verwenden um auf den Proxy zu zugreifen'; $lang['proxy____except'] = 'Regulärer Ausdruck um Adressen zu beschreiben, für die kein Proxy verwendet werden soll'; -$lang['safemodehack'] = 'Aktiviere safemode Hack'; -$lang['ftp____host'] = 'FTP Server für safemode Hack'; -$lang['ftp____port'] = 'FTP Port für safemode Hack'; -$lang['ftp____user'] = 'FTP Benutzername für safemode Hack'; -$lang['ftp____pass'] = 'FTP Passwort für safemode Hack'; -$lang['ftp____root'] = 'FTP Wurzelverzeichnis für Safemodehack'; $lang['license_o_'] = 'Nichts ausgewählt'; $lang['typography_o_0'] = 'nichts'; $lang['typography_o_1'] = 'ohne einfache Anführungszeichen'; diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php index 65c319b70..114c5790f 100644 --- a/lib/plugins/config/lang/de/lang.php +++ b/lib/plugins/config/lang/de/lang.php @@ -3,9 +3,13 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Andreas Gohr <andi@splitbrain.org> + * @author Eric Haberstroh <ehaberstroh@gmail.com> + * @author C!own77 <clown77@posteo.de> + * @author Alex Beck <alex@4becks.com> + * @author Jürgen Fredriksson <jfriedrich@gmx.at> * @author Michael Bohn <mjbohn@gmail.com> * @author Joel Strasser <strasser999@gmail.com> - * @author Andreas Gohr <andi@splitbrain.org> * @author Michael Klier <chi@chimeric.de> * @author Leo Moll <leo@yeasoft.com> * @author Florian Anderiasch <fa@art-core.org> @@ -50,6 +54,7 @@ $lang['_advanced'] = 'Erweitert'; $lang['_network'] = 'Netzwerk'; $lang['_msg_setting_undefined'] = 'Keine Konfigurationsmetadaten.'; $lang['_msg_setting_no_class'] = 'Keine Konfigurationsklasse.'; +$lang['_msg_setting_no_known_class'] = 'Setting-Klasse nicht verfügbar.'; $lang['_msg_setting_no_default'] = 'Kein Standardwert.'; $lang['title'] = 'Titel des Wikis'; $lang['start'] = 'Startseitenname'; @@ -159,12 +164,16 @@ $lang['xsendfile'] = 'Den X-Sendfile-Header nutzen, um Dateien direk $lang['renderer_xhtml'] = 'Standard-Renderer für die normale (XHTML) Wiki-Ausgabe.'; $lang['renderer__core'] = '%s (DokuWiki Kern)'; $lang['renderer__plugin'] = '%s (Plugin)'; +$lang['search_nslimit'] = 'Beschränke die Suche auf die jetzigen X Namensräume. Wenn eine Suche von einer Seite in einem tieferen Namensraum aus ausgeführt wird, werden die ersten X Namensräume als Filter hinzugefügt'; +$lang['search_fragment'] = 'Spezifiziere das vorgegebenen Fragment-Suchverhalten'; $lang['search_fragment_o_exact'] = 'genaue Treffer'; $lang['search_fragment_o_starts_with'] = 'beginnt mit'; $lang['search_fragment_o_ends_with'] = 'endet mit'; $lang['search_fragment_o_contains'] = 'enthält'; +$lang['trustedproxy'] = 'Vertrauen Sie Weiterleitungs-Proxys, welche dem regulärem Ausdruck entsprechen, hinsichtlich der angegebenen Client-ID. Der Standardwert entspricht dem lokalem Netzwerk. Leer lassen um jedem Proxy zu vertrauen.'; +$lang['defer_js'] = 'JavaScript-Ausführung verzögern bis das HTML der gesamten Seite verarbeitet wurde. Erhöht die gefühlte Geschwindigkeit des Seitenaufbaus, kann aber mit einigen wenigen Plugins inkompatibel sein.'; $lang['dnslookups'] = 'DokuWiki löst die IP-Adressen von Benutzern zu deren Hostnamen auf. Wenn Sie einen langsamen oder unzuverlässigen DNS-Server verwenden oder die Funktion nicht benötigen, dann sollte diese Option deaktiviert sein.'; -$lang['jquerycdn'] = 'Sollen jQuery und jQuery UI Skriptdateien von einem CDN (Contend Delivery Network) geladen werden? Dadurch entstehen zusätzliche HTTP-Anfragen, aber die Daten werden voraussichtlich schneller geladen und eventuell sind sie auch schon beim Benutzer im Cache.'; +$lang['jquerycdn'] = 'Sollen jQuery und jQuery UI Skriptdateien von einem CDN (Content Delivery Network) geladen werden? Dadurch entstehen zusätzliche HTTP-Anfragen, aber die Daten werden voraussichtlich schneller geladen und eventuell sind sie auch schon beim Benutzer im Cache.'; $lang['jquerycdn_o_0'] = 'Kein CDN, ausschließlich lokale Auslieferung'; $lang['jquerycdn_o_jquery'] = 'CDN von code.jquery.com'; $lang['jquerycdn_o_cdnjs'] = 'CDN von cdnjs.com'; @@ -174,12 +183,6 @@ $lang['proxy____user'] = 'Proxy Benutzername'; $lang['proxy____pass'] = 'Proxy Passwort'; $lang['proxy____ssl'] = 'SSL bei Verbindung zum Proxy verwenden'; $lang['proxy____except'] = 'Regulärer Ausdruck für URLs, bei denen kein Proxy verwendet werden soll'; -$lang['safemodehack'] = 'Safemodehack verwenden'; -$lang['ftp____host'] = 'FTP-Host für Safemodehack'; -$lang['ftp____port'] = 'FTP-Port für Safemodehack'; -$lang['ftp____user'] = 'FTP Benutzername für Safemodehack'; -$lang['ftp____pass'] = 'FTP Passwort für Safemodehack'; -$lang['ftp____root'] = 'FTP Wurzelverzeichnis für Safemodehack'; $lang['license_o_'] = 'Keine gewählt'; $lang['typography_o_0'] = 'keine'; $lang['typography_o_1'] = 'ohne einfache Anführungszeichen'; diff --git a/lib/plugins/config/lang/el/lang.php b/lib/plugins/config/lang/el/lang.php index 7904c63bd..625f5a05b 100644 --- a/lib/plugins/config/lang/el/lang.php +++ b/lib/plugins/config/lang/el/lang.php @@ -3,13 +3,15 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Apostolos Tsompanopoulos <info@aptlogs.com> + * @author Katerina Katapodi <extragold1234@hotmail.com> * @author Christopher Smith <chris@jalakai.co.uk> * @author Thanos Massias <tm@thriasio.gr> * @author Αθανάσιος Νταής <homunculus@wana.gr> * @author Konstantinos Koryllos <koryllos@gmail.com> * @author George Petsagourakis <petsagouris@gmail.com> * @author Petros Vidalis <pvidalis@gmail.com> - * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com + * @author Vasileios Karavasilis <vasileioskaravasilis@gmail.com> * @author Zacharias Sdregas <zsdregas@sch.gr> */ $lang['menu'] = 'Ρυθμίσεις'; @@ -85,7 +87,9 @@ $lang['disableactions'] = 'Απενεργοποίηση λειτουργ $lang['disableactions_check'] = 'Έλεγχος'; $lang['disableactions_subscription'] = 'Εγγραφή/Διαγραφή χρήστη'; $lang['disableactions_wikicode'] = 'Προβολή κώδικα σελίδας'; +$lang['disableactions_profile_delete'] = 'Διαγραφή Λογαριασμού '; $lang['disableactions_other'] = 'Άλλες λειτουργίες (διαχωρίστε τις με κόμμα)'; +$lang['disableactions_rss'] = 'XML Ομαδοποίηση (RSS)'; $lang['auth_security_timeout'] = 'Διάρκεια χρόνου για ασφάλεια πιστοποίησης (δευτερόλεπτα)'; $lang['securecookie'] = 'Τα cookies που έχουν οριστεί μέσω HTTPS πρέπει επίσης να αποστέλλονται μόνο μέσω HTTPS από τον φυλλομετρητή? Απενεργοποιήστε αυτή την επιλογή όταν μόνο η είσοδος στο wiki σας διασφαλίζεται μέσω SSL αλλά η περιήγηση γίνεται και χωρίς αυτό.'; $lang['remote'] = 'Ενεργοποίησης απομακρυσμένης προγραμματιστικής διεπαφής εφαρμογών (API). Με αυτό τον τρόπο επιτρέπεται η πρόσβαση στο wiki με το XML-RPC ή με άλλα πρωτόκολλα επικοινωνίας.'; @@ -116,6 +120,7 @@ $lang['subscribe_time'] = 'Χρόνος μετά τον οποίο οι $lang['notify'] = 'Αποστολή ενημέρωσης για αλλαγές σε αυτή την e-mail διεύθυνση'; $lang['registernotify'] = 'Αποστολή ενημερωτικών μηνυμάτων σε αυτή την e-mail διεύθυνση κατά την εγγραφή νέων χρηστών'; $lang['mailfrom'] = 'e-mail διεύθυνση αποστολέα για μηνύματα από την εφαρμογή'; +$lang['mailreturnpath'] = 'Διεύθυνση ηλεκτρονικού ταχυδρομείου λήπτη για μηνύματα που δεν έλαβε'; $lang['mailprefix'] = 'Πρόθεμα θέματος που να χρησιμοποιείται για τα αυτόματα μηνύματα ηλεκτρονικού ταχυδρομείου.'; $lang['htmlmail'] = 'Αποστολή οπτικά καλύτερου, αλλά μεγαλύτερου σε μέγεθος email με χρήση HTML. Απενεργοποιήστε το για αποστέλλονται μόνο email απλού κειμένου.'; $lang['sitemap'] = 'Δημιουργία Google sitemap (ημέρες)'; @@ -125,6 +130,9 @@ $lang['rss_content'] = 'Τι να εμφανίζεται στα XML fe $lang['rss_update'] = 'Χρόνος ανανέωσης XML feed (sec)'; $lang['rss_show_summary'] = 'Να εμφανίζεται σύνοψη του XML feed στον τίτλο'; $lang['rss_media'] = 'Τι είδους αλλαγές πρέπει να εμφανίζονται στο XLM feed;'; +$lang['rss_media_o_both'] = 'αμφότεροι'; +$lang['rss_media_o_pages'] = 'σελίδες'; +$lang['rss_media_o_media'] = 'μέσα ενημέρωσης '; $lang['updatecheck'] = 'Έλεγχος για ύπαρξη νέων εκδόσεων και ενημερώσεων ασφαλείας της εφαρμογής? Απαιτείται η σύνδεση με το update.dokuwiki.org για να λειτουργήσει σωστά αυτή η επιλογή.'; $lang['userewrite'] = 'Χρήση ωραίων URLs'; $lang['useslash'] = 'Χρήση slash σαν διαχωριστικό φακέλων στα URLs'; @@ -142,19 +150,23 @@ $lang['xsendfile'] = 'Χρήση της κεφαλίδας X-Sendfil $lang['renderer_xhtml'] = 'Πρόγραμμα δημιουργίας βασικής (xhtml) εξόδου wiki.'; $lang['renderer__core'] = '%s (βασικός κώδικας dokuwiki)'; $lang['renderer__plugin'] = '%s (επέκταση)'; +$lang['search_nslimit'] = 'Περιορίστε την αναζήτηση στα παρόντα αρχεία που δεν έχουν τίτλο Χ. Όταν η αναζήτηση διεξάγεται από μια σελίδα στα πλαίσια ενός μεγαλύτερου άτιτλου αρχείου, τα πρώτα ονόματα αρχείων Χ θα προστεθούν για να καλύψουν.'; +$lang['search_fragment'] = 'Κάντε την αναζήτηση ορίζοντας το πλαίσιο μη πρόσβασης που λείπει'; +$lang['search_fragment_o_exact'] = 'ακριβής'; +$lang['search_fragment_o_starts_with'] = 'αρχίζει με'; +$lang['search_fragment_o_ends_with'] = 'τελειώνει με'; +$lang['search_fragment_o_contains'] = 'περιέχει'; $lang['dnslookups'] = 'Το DokuWiki θα ψάξει τα ονόματα υπολογιστών που αντιστοιχούν σε διευθύνσεις IP των χρηστών που γράφουν στις σελίδες. Αν ο DNS είναι αργός, δεν δουλεύει ή δεν χρειάζεστε αυτή την λειτουργία, απενεργοποιήστε την.'; +$lang['jquerycdn'] = 'Πρέπει οι φάκελλοι με περιεχόμενο jQuery και jQuery UI να φορτωθούν από το CDN? Αυτό προσθέτει επιπλέον αιτήματα HTTP , αλλά οι φάκελλοι μπορούν να φορτωθούν ταχύτερα και οι χρήστες μπορεί να τους έχουν κρύψει ήδη.'; +$lang['jquerycdn_o_0'] = 'Δεν υπάρχει CDN, τοπική μετάδοση μόνο'; +$lang['jquerycdn_o_jquery'] = 'CDN στον κωδικό.jquery.com '; +$lang['jquerycdn_o_cdnjs'] = 'CDN στο cdnjs.com '; $lang['proxy____host'] = 'Διακομιστής Proxy'; $lang['proxy____port'] = 'Θύρα Proxy'; $lang['proxy____user'] = 'Όνομα χρήστη Proxy'; $lang['proxy____pass'] = 'Κωδικός χρήστη Proxy'; $lang['proxy____ssl'] = 'Χρήση ssl για σύνδεση με διακομιστή Proxy'; $lang['proxy____except'] = 'Regular expression για να πιάνει τα URLs για τα οποία θα παρακάμπτεται το proxy.'; -$lang['safemodehack'] = 'Ενεργοποίηση safemode hack'; -$lang['ftp____host'] = 'Διακομιστής FTP για safemode hack'; -$lang['ftp____port'] = 'Θύρα FTP για safemode hack'; -$lang['ftp____user'] = 'Όνομα χρήστη FTP για safemode hack'; -$lang['ftp____pass'] = 'Κωδικός χρήστη FTP για safemode hack'; -$lang['ftp____root'] = 'Αρχικός φάκελος FTP για safemode hack'; $lang['license_o_'] = 'Δεν επελέγει άδεια'; $lang['typography_o_0'] = 'κανένα'; $lang['typography_o_1'] = 'μόνο διπλά εισαγωγικά'; @@ -190,6 +202,7 @@ $lang['xsendfile_o_2'] = 'Τυπική κεφαλίδα X-Sendfile'; $lang['xsendfile_o_3'] = 'Ιδιοταγής κεφαλίδα Nginx X-Accel-Redirect '; $lang['showuseras_o_loginname'] = 'Όνομα χρήστη'; $lang['showuseras_o_username'] = 'Ονοματεπώνυμο χρήστη'; +$lang['showuseras_o_username_link'] = 'Το ονοματεπώνυμο του χρήστη ως σύνδεσμος χρήστη interwiki '; $lang['showuseras_o_email'] = 'e-mail διεύθυνση χρήστη (εμφανίζεται σύμφωνα με την ρύθμιση για την κωδικοποίηση e-mail διευθύνσεων)'; $lang['showuseras_o_email_link'] = 'Εμφάνιση e-mail διεύθυνσης χρήστη σαν σύνδεσμος mailto:'; $lang['useheading_o_0'] = 'Ποτέ'; diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index 356db4e5e..fb8186cd8 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -46,6 +46,7 @@ $lang['_network'] = 'Network'; /* --- Undefined Setting Messages --- */ $lang['_msg_setting_undefined'] = 'No setting metadata.'; $lang['_msg_setting_no_class'] = 'No setting class.'; +$lang['_msg_setting_no_known_class'] = 'Setting class not available.'; $lang['_msg_setting_no_default'] = 'No default value.'; /* -------------------- Config Options --------------------------- */ @@ -110,7 +111,7 @@ $lang['remoteuser'] = 'Restrict remote API access to the comma separated groups /* Anti-Spam Settings */ $lang['usewordblock']= 'Block spam based on wordlist'; -$lang['relnofollow'] = 'Use rel="nofollow" on external links'; +$lang['relnofollow'] = 'Use rel="ugc nofollow" on external links'; $lang['indexdelay'] = 'Time delay before indexing (sec)'; $lang['mailguard'] = 'Obfuscate email addresses'; $lang['iexssprotect']= 'Check uploaded files for possibly malicious JavaScript or HTML code'; @@ -154,6 +155,7 @@ $lang['rss_linkto'] = 'XML feed links to'; $lang['rss_content'] = 'What to display in the XML feed items?'; $lang['rss_update'] = 'XML feed update interval (sec)'; $lang['rss_show_summary'] = 'XML feed show summary in title'; +$lang['rss_show_deleted'] = 'XML feed Show deleted feeds'; $lang['rss_media'] = 'What kind of changes should be listed in the XML feed?'; $lang['rss_media_o_both'] = 'both'; $lang['rss_media_o_pages'] = 'pages'; @@ -184,6 +186,10 @@ $lang['search_fragment_o_exact'] = 'exact'; $lang['search_fragment_o_starts_with'] = 'starts with'; $lang['search_fragment_o_ends_with'] = 'ends with'; $lang['search_fragment_o_contains'] = 'contains'; +$lang['trustedproxy'] = 'Trust forwarding proxies matching this regular expression about the true client IP they report. The default matches local networks. Leave empty to trust no proxy.'; + +$lang['_feature_flags'] = 'Feature Flags'; +$lang['defer_js'] = 'Defer javascript to be execute after the page\'s HTML has been parsed. Improves perceived page speed but could break a small number of plugins.'; /* Network Options */ $lang['dnslookups'] = 'DokuWiki will lookup hostnames for remote IP addresses of users editing pages. If you have a slow or non working DNS server or don\'t want this feature, disable this option'; @@ -202,14 +208,6 @@ $lang['proxy____pass'] = 'Proxy password'; $lang['proxy____ssl'] = 'Use SSL to connect to proxy'; $lang['proxy____except'] = 'Regular expression to match URLs for which the proxy should be skipped.'; -/* Safemode Hack */ -$lang['safemodehack'] = 'Enable safemode hack'; -$lang['ftp____host'] = 'FTP server for safemode hack'; -$lang['ftp____port'] = 'FTP port for safemode hack'; -$lang['ftp____user'] = 'FTP user name for safemode hack'; -$lang['ftp____pass'] = 'FTP password for safemode hack'; -$lang['ftp____root'] = 'FTP root directory for safemode hack'; - /* License Options */ $lang['license_o_'] = 'None chosen'; diff --git a/lib/plugins/config/lang/eo/lang.php b/lib/plugins/config/lang/eo/lang.php index 7201b3267..ad779da43 100644 --- a/lib/plugins/config/lang/eo/lang.php +++ b/lib/plugins/config/lang/eo/lang.php @@ -5,6 +5,7 @@ * * Esperantolanguage file * + * @author Florian <florianmail55@gmail.com> * @author Kristjan SCHMIDT <kristjan.schmidt@googlemail.com> * @author Felipe Castro <fefcas@uol.com.br> * @author Felipo Kastro <fefcas@gmail.com> @@ -152,12 +153,6 @@ $lang['proxy____user'] = 'Uzantonomo ĉe la "Proxy"'; $lang['proxy____pass'] = 'Pasvorto ĉe la "Proxy"'; $lang['proxy____ssl'] = 'Uzi SSL por konekti al la "Proxy"'; $lang['proxy____except'] = 'Regula esprimo por URL-oj, kiujn la servilo preterrigardu.'; -$lang['safemodehack'] = 'Ebligi sekuran modon'; -$lang['ftp____host'] = 'FTP-a servilo por sekura modo'; -$lang['ftp____port'] = 'FTP-a pordo por sekura modo'; -$lang['ftp____user'] = 'FTP-a uzantonomo por sekura modo'; -$lang['ftp____pass'] = 'FTP-a pasvorto por sekura modo'; -$lang['ftp____root'] = 'FTP-a superuzanta (root) subdosierujo por sekura modo'; $lang['license_o_'] = 'Nenio elektita'; $lang['typography_o_0'] = 'nenio'; $lang['typography_o_1'] = 'Nur duoblaj citiloj'; diff --git a/lib/plugins/config/lang/es/lang.php b/lib/plugins/config/lang/es/lang.php index 4d6647e7b..97b5540d1 100644 --- a/lib/plugins/config/lang/es/lang.php +++ b/lib/plugins/config/lang/es/lang.php @@ -51,6 +51,7 @@ $lang['_advanced'] = 'Parámetros Avanzados'; $lang['_network'] = 'Parámetros de Red'; $lang['_msg_setting_undefined'] = 'Sin parámetros de metadata.'; $lang['_msg_setting_no_class'] = 'Sin clase establecida.'; +$lang['_msg_setting_no_known_class'] = 'Configuración de la clase no disponible.'; $lang['_msg_setting_no_default'] = 'Sin valor por defecto.'; $lang['title'] = 'Título del wiki'; $lang['start'] = 'Nombre de la página inicial'; @@ -166,6 +167,7 @@ $lang['search_fragment_o_exact'] = 'exacto'; $lang['search_fragment_o_starts_with'] = 'comienza con'; $lang['search_fragment_o_ends_with'] = 'termina con'; $lang['search_fragment_o_contains'] = 'contiene'; +$lang['trustedproxy'] = 'Confíe en los proxys de reenvío que coincidan con esta expresión regular acerca de la IP verdadera del cliente que referencia. El valor predeterminado coincide con las redes locales. Dejar en blanco para no confiar en ningún proxy.'; $lang['dnslookups'] = 'DokuWiki buscara los hostnames para usuarios editando las páginas con IP remota. Si usted tiene un servidor DNS bastante lento o que no funcione, favor de desactivar esta opción.'; $lang['jquerycdn'] = '¿Deberían cargarse los ficheros de script jQuery y jQuery UI desde un CDN? Esto añade peticiones HTTP adicionales, pero los ficheros se pueden cargar más rápido y los usuarios pueden tenerlas ya almacenadas en caché.'; $lang['jquerycdn_o_0'] = 'No CDN, sólo entrega local'; @@ -177,12 +179,6 @@ $lang['proxy____user'] = 'Nombre de usuario para el servidor Proxy'; $lang['proxy____pass'] = 'Contraseña para el servidor Proxy'; $lang['proxy____ssl'] = 'Usar ssl para conectarse al servidor Proxy'; $lang['proxy____except'] = 'Expresiones regulares para encontrar URLs que el proxy debería omitir.'; -$lang['safemodehack'] = 'Habilitar edición (hack) de modo seguro'; -$lang['ftp____host'] = 'Nombre del servidor FTP para modo seguro'; -$lang['ftp____port'] = 'Puerto del servidor FTP para modo seguro'; -$lang['ftp____user'] = 'Nombre de usuario para el servidor FTP para modo seguro'; -$lang['ftp____pass'] = 'Contraseña para el servidor FTP para modo seguro'; -$lang['ftp____root'] = 'Directorio raiz para el servidor FTP para modo seguro'; $lang['license_o_'] = 'No se eligió ninguna'; $lang['typography_o_0'] = 'ninguno'; $lang['typography_o_1'] = 'Dobles comillas solamente'; diff --git a/lib/plugins/config/lang/eu/lang.php b/lib/plugins/config/lang/eu/lang.php index b48df552a..cf9972d8f 100644 --- a/lib/plugins/config/lang/eu/lang.php +++ b/lib/plugins/config/lang/eu/lang.php @@ -135,12 +135,6 @@ $lang['proxy____user'] = 'Proxyaren erabiltzaile izena'; $lang['proxy____pass'] = 'Proxyaren pasahitza '; $lang['proxy____ssl'] = 'Erabili SSL Proxyra konektatzeko'; $lang['proxy____except'] = 'URLak detektatzeko espresio erregularra, zeinentzat Proxy-a sahiestu beharko litzatekeen.'; -$lang['safemodehack'] = 'Gaitu modu segurua hack-a'; -$lang['ftp____host'] = 'FTP zerbitzaria modu seguruarentzat'; -$lang['ftp____port'] = 'FTP portua modu seguruarentzat'; -$lang['ftp____user'] = 'FTP erabiltzailea modu seguruarentzat'; -$lang['ftp____pass'] = 'FTP pasahitza modu seguruarentzat'; -$lang['ftp____root'] = 'FTP erro direktorioa modu seguruarentzat'; $lang['license_o_'] = 'Bat ere ez hautaturik'; $lang['typography_o_0'] = 'ezer'; $lang['typography_o_1'] = 'Komatxo bikoitzak bakarrik'; diff --git a/lib/plugins/config/lang/fa/lang.php b/lib/plugins/config/lang/fa/lang.php index 72bbbe1f8..e9c4e3cd6 100644 --- a/lib/plugins/config/lang/fa/lang.php +++ b/lib/plugins/config/lang/fa/lang.php @@ -3,15 +3,15 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author علیرضا ایوز <info@alirezaivaz.ir> + * @author Masoud Sadrnezhaad <masoud@sadrnezhaad.ir> * @author behrad eslamifar <behrad_es@yahoo.com) * @author Mohsen Firoozmandan <info@mambolearn.com> - * @author omidmr@gmail.com - * @author Omid Mottaghi <omidmr@gmail.com> + * @author omidmr <omidmr@gmail.com> * @author Mohammad Reza Shoaei <shoaei@gmail.com> * @author Milad DZand <M.DastanZand@gmail.com> * @author AmirH Hassaneini <mytechmix@gmail.com> * @author Mohmmad Razavi <sepent@gmail.com> - * @author Masoud Sadrnezhaad <masoud@sadrnezhaad.ir> * @author sam01 <m.sajad079@gmail.com> */ $lang['menu'] = 'تنظیمات پیکربندی'; @@ -119,6 +119,7 @@ $lang['subscribe_time'] = 'زمان مورد نیاز برای ارسال $lang['notify'] = 'تغییرات به این ایمیل ارسال شود'; $lang['registernotify'] = 'اطلاعات کاربران تازه وارد به این ایمیل ارسال شود'; $lang['mailfrom'] = 'آدرس ایمیلی که برای ایمیلهای خودکار استفاده میشود'; +$lang['mailreturnpath'] = 'نشانی ایمیل گیرنده برای اعلانهای دریافت نشده'; $lang['mailprefix'] = 'پیشوند تیتر ایمیل (جهت ایمیل های خودکار)'; $lang['htmlmail'] = 'فرستادن با ظاهر بهتر ، امّا با اندازه بیشتر در ایمیل های چند قسمتی HTML. برای استفاده از ایمیل متنی ، غیر فعال کنید.'; @@ -129,6 +130,9 @@ $lang['rss_content'] = 'چه چیزی در تکههای خوراک $lang['rss_update'] = 'زمان به روز رسانی خوراک به ثانیه'; $lang['rss_show_summary'] = 'خوراک مختصری از مطلب را در عنوان نمایش دهد'; $lang['rss_media'] = 'چه نوع تغییراتی باید در خوراک XML لیست شود؟'; +$lang['rss_media_o_both'] = 'هر دو'; +$lang['rss_media_o_pages'] = 'صفحات'; +$lang['rss_media_o_media'] = 'مدیا'; $lang['updatecheck'] = 'هشدارهای به روز رسانی و امنیتی بررسی شود؟ برای اینکار دوکوویکی با سرور update.dokuwiki.org تماس خواهد گرفت.'; $lang['userewrite'] = 'از زیباکنندهی آدرسها استفاده شود'; $lang['useslash'] = 'از اسلش «/» برای جداکنندهی آدرس فضاینامها استفاده شود'; @@ -146,19 +150,23 @@ $lang['xsendfile'] = 'استفاده از هدر X-Sendfile، تا $lang['renderer_xhtml'] = 'مفسری که برای خروجی اصلی ویکی استفاده شود'; $lang['renderer__core'] = '%s (هستهی dokuwiki)'; $lang['renderer__plugin'] = '%s (افزونه)'; +$lang['search_nslimit'] = 'جستجو را به فضاینام X محدود کن. اگر جستجو از صفحهای که از فضای نام عمیقتری هست انجام شود اولین فضای نام X به عنوان فیلتر اضافه میشود.'; +$lang['search_fragment'] = 'رفتار جستجوی بخشی پیشفرض را مشخص کنید.'; +$lang['search_fragment_o_exact'] = 'دقیقا'; +$lang['search_fragment_o_starts_with'] = 'شروع شده با'; +$lang['search_fragment_o_ends_with'] = 'پایان یافته با'; +$lang['search_fragment_o_contains'] = 'شامل'; $lang['dnslookups'] = 'دوکوویکی نام هاست ها را برای آدرسهای آیپیهای صفحات ویرایشی کاربران ، جستجو می کند. اگر یک سرور DNS کند یا نا کارامد دارید یا این ویژگی را نمی خواهید ، این گزینه را غیر فعال کنید.'; +$lang['jquerycdn'] = 'آیا فایلهای اسکریپت jQuery و jQuery UI باید از روی یک CDN باز شوند؟ این قابلیت تعداد درخواستهای HTTP بیشتری اضافه میکند، اما فایلها ممکن است سریعتر باز شوند و کاربران ممکن است آنها را کش کرده باشند.'; +$lang['jquerycdn_o_0'] = 'بدون CDN فقط برای دریافت داخلی'; +$lang['jquerycdn_o_jquery'] = 'CDN در code.jquery.com'; +$lang['jquerycdn_o_cdnjs'] = 'CDN در cdnjs.com'; $lang['proxy____host'] = 'آدرس سرور پروکسی'; $lang['proxy____port'] = 'پورت پروکسی'; $lang['proxy____user'] = 'نام کاربری پروکسی'; $lang['proxy____pass'] = 'گذرواژهي پروکسی'; $lang['proxy____ssl'] = 'استفاده از SSL برای اتصال به پروکسی'; $lang['proxy____except'] = 'عبارت منظم برای تطبیق با URLها برای اینکه دریابیم که از روی چه پروکسیای باید بپریم!'; -$lang['safemodehack'] = 'فعال کردن safemode hack'; -$lang['ftp____host'] = 'آدرس FTP برای safemode hack'; -$lang['ftp____port'] = 'پورت FTP برای safemode hack'; -$lang['ftp____user'] = 'نام کاربری FTP برای safemode hack'; -$lang['ftp____pass'] = 'گذرواژهی FTP برای safemode hack'; -$lang['ftp____root'] = 'شاخهی FTP برای safemode hack'; $lang['license_o_'] = 'هیچ کدام'; $lang['typography_o_0'] = 'هیچ'; $lang['typography_o_1'] = 'حذف کردن single-quote'; diff --git a/lib/plugins/config/lang/fi/lang.php b/lib/plugins/config/lang/fi/lang.php index 3389754f2..e8d7c8f4c 100644 --- a/lib/plugins/config/lang/fi/lang.php +++ b/lib/plugins/config/lang/fi/lang.php @@ -2,9 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author otto@valjakko.net - * @author Otto Vainio <otto@valjakko.net> + * + * @author Tuomo Hartikainen <tuomo.hartikainen@heksia.fi> + * @author otto <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> * @author Sami Olmari <sami@olmari.fi> * @author Wiki Doku <SugarKidder@mailinator.com> @@ -42,7 +42,7 @@ $lang['title'] = 'Wikin nimi'; $lang['start'] = 'Alkusivun nimi'; $lang['lang'] = 'Kieli'; $lang['template'] = 'Sivumalli'; -$lang['tagline'] = 'Apuotsikko - slogan sivustonimen yhteysteen (jos template käyttää)'; +$lang['tagline'] = 'Apuotsikko - slogan sivustonimen yhteyteen (jos template tukee)'; $lang['sidebar'] = 'Sivupalkin sivunimi (jos template tukee sitä), tyhjä arvo poistaa sivupalkin'; $lang['license'] = 'Millä lisenssillä sisältö pitäisi julkaista?'; $lang['savedir'] = 'Hakemisto tietojen tallennukseen.'; @@ -114,7 +114,7 @@ $lang['subscribe_time'] = 'Aika jonka jälkeen tilauslinkit ja yhteenveto $lang['notify'] = 'Lähetä muutosilmoitukset tähän osoitteeseen'; $lang['registernotify'] = 'Lähetä ilmoitus uusista rekisteröitymisistä tähän osoitteeseen'; $lang['mailfrom'] = 'Sähköpostiosoite automaattisia postituksia varten'; -$lang['mailprefix'] = 'Etuliite automaattisesti lähetettyihin dähköposteihin'; +$lang['mailprefix'] = 'Etuliite automaattisesti lähetettyihin sähköposteihin'; $lang['htmlmail'] = 'Lähetä paremman näköisiä, mutta isompia HTML multipart sähköposteja. Ota pois päältä, jos haluat vain tekstimuotoisia posteja.'; $lang['sitemap'] = 'Luo Google sitemap (päiviä)'; $lang['rss_type'] = 'XML-syötteen tyyppi'; @@ -148,12 +148,6 @@ $lang['proxy____user'] = 'Proxy käyttäjän nimi'; $lang['proxy____pass'] = 'Proxy salasana'; $lang['proxy____ssl'] = 'Käytä ssl-yhteyttä kytkeytyäksesi proxy-palvelimeen'; $lang['proxy____except'] = 'Säännönmukainen lause, URLiin, jolle proxy ohitetaan.'; -$lang['safemodehack'] = 'Käytä safemode kiertoa'; -$lang['ftp____host'] = 'FTP-palvelin safemode kiertoa varten'; -$lang['ftp____port'] = 'FTP-portti safemode kiertoa varten'; -$lang['ftp____user'] = 'FTP-käyttäjä safemode kiertoa varten'; -$lang['ftp____pass'] = 'FTP-salasana safemode kiertoa varten'; -$lang['ftp____root'] = 'FTP-juurihakemisto safemode kiertoa varten'; $lang['license_o_'] = 'ei mitään valittuna'; $lang['typography_o_0'] = 'ei mitään'; $lang['typography_o_1'] = 'ilman yksinkertaisia lainausmerkkejä'; diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index 520a8bdaa..5f0a03f24 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -3,8 +3,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Damien Regad <dregad@mantisbt.org> + * @author Nicolas Friedli <nicolas@theologique.ch> * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> + * @author PaliPalo <palipalo@hotmail.fr> + * @author Laurent Ponthieu <contact@coopindus.fr> + * @author Damien Regad <dregad@mantisbt.org> * @author Michael Bohn <mjbohn@gmail.com> * @author Guy Brand <gb@unistra.fr> * @author Delassaux Julien <julien@delassaux.fr> @@ -23,7 +26,6 @@ * @author Anael Mobilia <contrib@anael.eu> * @author Bruno Veilleux <bruno.vey@gmail.com> * @author Carbain Frédéric <fcarbain@yahoo.fr> - * @author Nicolas Friedli <nicolas@theologique.ch> * @author Floriang <antispam@floriang.eu> * @author Simon DELAGE <simon.geekitude@gmail.com> * @author Eric <ericstevenart@netc.fr> @@ -55,6 +57,7 @@ $lang['_advanced'] = 'Paramètres avancés'; $lang['_network'] = 'Paramètres réseaux'; $lang['_msg_setting_undefined'] = 'Pas de définition de métadonnées'; $lang['_msg_setting_no_class'] = 'Pas de définition de paramètres.'; +$lang['_msg_setting_no_known_class'] = 'Classe de réglage non disponible.'; $lang['_msg_setting_no_default'] = 'Pas de valeur par défaut.'; $lang['title'] = 'Titre du wiki (nom du wiki)'; $lang['start'] = 'Nom de la page d\'accueil à utiliser pour toutes les catégories'; @@ -83,7 +86,7 @@ $lang['toptoclevel'] = 'Niveau le plus haut à afficher dans la table $lang['tocminheads'] = 'Nombre minimum de titres pour qu\'une table des matières soit affichée'; $lang['maxtoclevel'] = 'Niveau maximum pour figurer dans la table des matières'; $lang['maxseclevel'] = 'Niveau maximum pour modifier des sections'; -$lang['camelcase'] = 'Utiliser l\'affichage «CamelCase » pour les liens'; +$lang['camelcase'] = 'Les mots en CamelCase créent des liens'; $lang['deaccent'] = 'Retirer les accents dans les noms de pages'; $lang['useheading'] = 'Utiliser le titre de premier niveau pour le nom de la page'; $lang['sneaky_index'] = 'Par défaut, DokuWiki affichera toutes les catégories dans la vue par index. Activer cette option permet de cacher les catégories pour lesquelles l\'utilisateur n\'a pas l\'autorisation de lecture. Il peut en résulter le masquage de sous-catégories accessibles. Ceci peut rendre l\'index inutilisable avec certains contrôles d\'accès.'; @@ -143,6 +146,7 @@ $lang['rss_linkto'] = 'Lien du flux XML vers'; $lang['rss_content'] = 'Quel contenu afficher dans le flux XML?'; $lang['rss_update'] = 'Fréquence de mise à jour du flux XML (secondes)'; $lang['rss_show_summary'] = 'Le flux XML affiche le résumé dans le titre'; +$lang['rss_show_deleted'] = 'Le flux XML montre les flux détruits'; $lang['rss_media'] = 'Quels types de changements doivent être listés dans le flux XML?'; $lang['rss_media_o_both'] = 'les deux'; $lang['rss_media_o_pages'] = 'pages'; @@ -171,6 +175,9 @@ $lang['search_fragment_o_exact'] = 'exact'; $lang['search_fragment_o_starts_with'] = 'commence par'; $lang['search_fragment_o_ends_with'] = 'se termine par'; $lang['search_fragment_o_contains'] = 'contient'; +$lang['trustedproxy'] = 'Faire confiance aux mandataires qui correspondent à cette expression régulière pour l\'adresse IP réelle des clients qu\'ils rapportent. La valeur par défaut correspond aux réseaux locaux. Laisser vide pour ne faire confiance à aucun mandataire.'; +$lang['_feature_flags'] = 'Fonctionnalités expérimentales'; +$lang['defer_js'] = 'Attendre que le code HTML des pages soit analysé avant d\'exécuter le javascript. Améliore la vitesse de chargement perçue, mais pourrait casser un petit nombre de greffons.'; $lang['dnslookups'] = 'DokuWiki effectuera une résolution du nom d\'hôte sur les adresses IP des utilisateurs modifiant des pages. Si vous ne possédez pas de serveur DNS, que ce dernier est lent ou que vous ne souhaitez pas utiliser cette fonctionnalité : désactivez-la.'; $lang['jquerycdn'] = 'Faut-il distribuer les scripts JQuery et JQuery UI depuis un CDN ? Cela ajoute une requête HTTP, mais les fichiers peuvent se charger plus vite et les internautes les ont peut-être déjà en cache.'; $lang['jquerycdn_o_0'] = 'Non : utilisation de votre serveur.'; @@ -182,12 +189,6 @@ $lang['proxy____user'] = 'Mandataire - Identifiant'; $lang['proxy____pass'] = 'Mandataire - Mot de passe'; $lang['proxy____ssl'] = 'Mandataire - Utilisation de SSL'; $lang['proxy____except'] = 'Mandataire - Expression régulière de test des URLs pour lesquelles le mandataire (proxy) ne doit pas être utilisé.'; -$lang['safemodehack'] = 'Activer l\'option Mode sans échec'; -$lang['ftp____host'] = 'FTP / Mode sans échec - Serveur hôte'; -$lang['ftp____port'] = 'FTP / Mode sans échec - Port'; -$lang['ftp____user'] = 'FTP / Mode sans échec - Identifiant'; -$lang['ftp____pass'] = 'FTP / Mode sans échec - Mot de passe'; -$lang['ftp____root'] = 'FTP / Mode sans échec - Répertoire racine'; $lang['license_o_'] = 'Aucune choisie'; $lang['typography_o_0'] = 'aucun'; $lang['typography_o_1'] = 'guillemets uniquement'; diff --git a/lib/plugins/config/lang/gl/lang.php b/lib/plugins/config/lang/gl/lang.php index 551396481..933cedc8e 100644 --- a/lib/plugins/config/lang/gl/lang.php +++ b/lib/plugins/config/lang/gl/lang.php @@ -144,12 +144,6 @@ $lang['proxy____user'] = 'Nome de usuario do Proxy'; $lang['proxy____pass'] = 'Contrasinal do Proxy'; $lang['proxy____ssl'] = 'Utilizar ssl para conectar ao Proxy'; $lang['proxy____except'] = 'Expresión regular para atopar URLs que deban ser omitidas polo Proxy.'; -$lang['safemodehack'] = 'Activar hack de modo seguro (safemode)'; -$lang['ftp____host'] = 'Servidor FTP para o hack de modo seguro (safemode)'; -$lang['ftp____port'] = 'Porto FTP para o hack de modo seguro(safemode)'; -$lang['ftp____user'] = 'Nome de usuario FTP para o hack de modo seguro(safemode)'; -$lang['ftp____pass'] = 'Contrasinal FTP para o hack de modo seguro(safemode)'; -$lang['ftp____root'] = 'Directorio raigaña do FTP para o hack de modo seguro(safemode)'; $lang['license_o_'] = 'Non se escolleu nada'; $lang['typography_o_0'] = 'ningunha'; $lang['typography_o_1'] = 'Só dobres aspas'; diff --git a/lib/plugins/config/lang/he/lang.php b/lib/plugins/config/lang/he/lang.php index 8c986ae65..4a7f32d34 100644 --- a/lib/plugins/config/lang/he/lang.php +++ b/lib/plugins/config/lang/he/lang.php @@ -124,12 +124,6 @@ $lang['proxy____port'] = 'שער השרת המתווך'; $lang['proxy____user'] = 'שם המשתמש בשרת המתווך'; $lang['proxy____pass'] = 'סיסמת ההשרת המתווך'; $lang['proxy____ssl'] = 'השתמש ב-ssl כדי להתחבר לשרת המתווך'; -$lang['safemodehack'] = 'אפשר שימוש בפתרון ל-safemode'; -$lang['ftp____host'] = 'שרת FTP עבור פתרון ה-safemode'; -$lang['ftp____port'] = 'שער ה-FTP עבור פתרון ה-safemode'; -$lang['ftp____user'] = 'שם המשתמש ב-FTPעבור פתרון ה-safemode'; -$lang['ftp____pass'] = 'סיסמת ה-FTP לפתרון ה-safemode'; -$lang['ftp____root'] = 'ספרית השורש ב-FTP עבור פתרון ה-safemode'; $lang['typography_o_0'] = 'ללא'; $lang['typography_o_1'] = 'רק גרשיים כפולים'; $lang['typography_o_2'] = 'כל הגרשים (עלול שלא לעבוד לעיתים)'; diff --git a/lib/plugins/config/lang/hr/lang.php b/lib/plugins/config/lang/hr/lang.php index d6f93b354..f6851b484 100644 --- a/lib/plugins/config/lang/hr/lang.php +++ b/lib/plugins/config/lang/hr/lang.php @@ -159,12 +159,6 @@ $lang['proxy____user'] = 'Proxy poslužitelj - korisničko ime'; $lang['proxy____pass'] = 'Proxy poslužitelj - lozinka'; $lang['proxy____ssl'] = 'Koristi SSL za vezu prema proxy poslužitelju'; $lang['proxy____except'] = 'Preskoči proxy za URL-ove koji odgovaraju ovom regularnom izrazu.'; -$lang['safemodehack'] = 'Omogući safemode hack'; -$lang['ftp____host'] = 'FTP poslužitelj za safemode hack'; -$lang['ftp____port'] = 'FTP port za safemode hack'; -$lang['ftp____user'] = 'FTP korisničko ime za safemode hack'; -$lang['ftp____pass'] = 'FTP lozinka za safemode hack'; -$lang['ftp____root'] = 'FTP root direktorij za safemode hack'; $lang['license_o_'] = 'Ništa odabrano'; $lang['typography_o_0'] = 'ništa'; $lang['typography_o_1'] = 'isključivši jednostruke navodnike'; diff --git a/lib/plugins/config/lang/hu/lang.php b/lib/plugins/config/lang/hu/lang.php index 972a731d8..71782632a 100644 --- a/lib/plugins/config/lang/hu/lang.php +++ b/lib/plugins/config/lang/hu/lang.php @@ -151,12 +151,6 @@ $lang['proxy____user'] = 'Proxy felhasználó név'; $lang['proxy____pass'] = 'Proxy jelszó'; $lang['proxy____ssl'] = 'SSL használata a proxyhoz csatlakozáskor'; $lang['proxy____except'] = 'URL szabály azokra a webcímekre, amit szeretnél, hogy ne kezeljen a proxy.'; -$lang['safemodehack'] = 'A PHP safemode beállítás megkerülésének engedélyezése'; -$lang['ftp____host'] = 'FTP szerver a safemode megkerüléshez'; -$lang['ftp____port'] = 'FTP port a safemode megkerüléshez'; -$lang['ftp____user'] = 'FTP felhasználó név a safemode megkerüléshez'; -$lang['ftp____pass'] = 'FTP jelszó a safemode megkerüléshez'; -$lang['ftp____root'] = 'FTP gyökérkönyvtár a safemode megkerüléshez'; $lang['license_o_'] = 'Nincs kiválasztva'; $lang['typography_o_0'] = 'nem'; $lang['typography_o_1'] = 'Csak a dupla idézőjelet'; diff --git a/lib/plugins/config/lang/ia/lang.php b/lib/plugins/config/lang/ia/lang.php index 511d08101..df0f4512a 100644 --- a/lib/plugins/config/lang/ia/lang.php +++ b/lib/plugins/config/lang/ia/lang.php @@ -126,12 +126,6 @@ $lang['proxy____port'] = 'Porto del proxy'; $lang['proxy____user'] = 'Nomine de usator pro le proxy'; $lang['proxy____pass'] = 'Contrasigno pro le proxy'; $lang['proxy____ssl'] = 'Usar SSL pro connecter al proxy'; -$lang['safemodehack'] = 'Permitter truco de modo secur'; -$lang['ftp____host'] = 'Servitor FTP pro truco de modo secur'; -$lang['ftp____port'] = 'Porto FTP pro truco de modo secur'; -$lang['ftp____user'] = 'Nomine de usator FTP pro truco de modo secur'; -$lang['ftp____pass'] = 'Contrasigno FTP pro truco de modo secur'; -$lang['ftp____root'] = 'Directorio radice FTP pro truco de modo securr'; $lang['license_o_'] = 'Nihil seligite'; $lang['typography_o_0'] = 'nulle'; $lang['typography_o_1'] = 'excludente '; diff --git a/lib/plugins/config/lang/id-ni/lang.php b/lib/plugins/config/lang/id-ni/lang.php index 7b7e14ce5..c30752f97 100644 --- a/lib/plugins/config/lang/id-ni/lang.php +++ b/lib/plugins/config/lang/id-ni/lang.php @@ -24,12 +24,6 @@ $lang['proxy____port'] = 'Port proxy'; $lang['proxy____user'] = 'Töi proxy'; $lang['proxy____pass'] = 'Kode proxy'; $lang['proxy____ssl'] = 'Fake ssl ba connect awö Proxy'; -$lang['safemodehack'] = 'Orifi safemode hack'; -$lang['ftp____host'] = 'FTP server khö safemode hack'; -$lang['ftp____port'] = 'FTP port khö safemode hack'; -$lang['ftp____user'] = 'Töi FTP khö safemode hack'; -$lang['ftp____pass'] = 'FTP kode khö safemode hack'; -$lang['ftp____root'] = 'FTP root directory for safemode hack'; $lang['typography_o_0'] = 'lö\'ö'; $lang['typography_o_1'] = 'Ha sitombua kutip'; $lang['typography_o_2'] = 'Fefu nikutip (itataria lömohalöwö)'; diff --git a/lib/plugins/config/lang/id/intro.txt b/lib/plugins/config/lang/id/intro.txt index 296206d02..c5a9297df 100644 --- a/lib/plugins/config/lang/id/intro.txt +++ b/lib/plugins/config/lang/id/intro.txt @@ -1,5 +1,7 @@ ====== Manajemen Konfigurasi ====== -Gunakan halaman ini untuk mengatur konfigurasi instalasi DokuWiki Anda. Untuk bantuan dalam konfigurasi, silahkan lihat di [[doku>config]]. Unuk mengetahui lebih lanjut tentang plugin in silahkan lihat [[doku>plugin:config]]. +Gunakan halaman ini untuk mengontrol pengaturan instalasi DokuWiki anda. Untuk bantuan tentang pengaturan individual, lihat [[doku>config]]. Untuk detail lebih lanjut tentang plugin ini lihat [[doku>plugin:config]]. -Konfigurasi dengan warna merah dilindungi dan tidak bisa diubah dengan plugin ini. Konfigurasi dengan warna biru adalah nilai default, dan konfigurasi dengan latar putih telah diset khusus untuk instalasi ini. Konfigurasi berwarna putih atau b +Pengaturan yang ditunjukkan dengan latar belakang merah muda dilindungi dan tidak dapat diubah dengan plugin ini. Pengaturan yang ditunjukkan dengan latar belakang biru adalah nilai bawaan (default) dan pengaturan yang ditunjukkan dengan latar belakang putih telah diatur secara lokal oleh anda. Pengaturan biru dan putih dapat diubah. + +Ingatlah untuk menekan tombol **Simpan** sebelum meninggalkan halaman ini, jika tidak perubahan anda akan hilang.
\ No newline at end of file diff --git a/lib/plugins/config/lang/is/lang.php b/lib/plugins/config/lang/is/lang.php index 4f4944616..fa18b37d1 100644 --- a/lib/plugins/config/lang/is/lang.php +++ b/lib/plugins/config/lang/is/lang.php @@ -1,5 +1,8 @@ <?php + /** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * Icelandic language file * * @author Hrannar Baldursson <hrannar.baldursson@gmail.com> @@ -13,24 +16,24 @@ $lang['nochoice'] = '(engir aðrir valmöguleikar fyrir hendi)'; $lang['_display'] = 'Skjástillingar'; $lang['_anti_spam'] = 'Stillingar gegn ruslpósti'; $lang['_editing'] = 'Útgáfastillingar'; -$lang['lang'] = 'Tungumál'; $lang['title'] = 'Heiti wikis'; +$lang['lang'] = 'Tungumál'; $lang['template'] = 'Mát'; $lang['recent'] = 'Nýlegar breytingar'; $lang['breadcrumbs'] = 'Fjöldi brauðmolar'; $lang['youarehere'] = 'Stigveldisá brauðmolar'; $lang['typography'] = 'Gera stað fyrir leturgerðir'; -$lang['htmlok'] = 'Fella HTML inn'; -$lang['phpok'] = 'Fella PHP inn'; $lang['dformat'] = 'Dagsetningarsnið (sjá PHP-aðgerð <a href="http://php.net/strftime">strftime</a>)'; $lang['signature'] = 'Undirskrift'; $lang['passcrypt'] = 'Dulritunaraðferð aðgangsorðs'; $lang['defaultgroup'] = 'Sjálfgefinn hópur'; $lang['superuser'] = 'Hópur kerfisstjóra '; $lang['profileconfirm'] = 'Staðfestu breytingar með aðgangsorði'; -$lang['mailfrom'] = 'Rafpóstfang fyrir sjálfvirkar póstsendingar'; +$lang['htmlok'] = 'Fella HTML inn'; +$lang['phpok'] = 'Fella PHP inn'; $lang['gdlib'] = 'Útgáfa af GD Lib'; $lang['jpg_quality'] = 'JPG gæðastilling (0-100)'; +$lang['mailfrom'] = 'Rafpóstfang fyrir sjálfvirkar póstsendingar'; $lang['proxy____host'] = 'Heiti staðgengilsþjóns'; $lang['proxy____port'] = 'Staðgengilstengi'; $lang['proxy____user'] = 'Staðgengill notendanafn'; diff --git a/lib/plugins/config/lang/it/lang.php b/lib/plugins/config/lang/it/lang.php index 9e9ece4e9..801ec6218 100644 --- a/lib/plugins/config/lang/it/lang.php +++ b/lib/plugins/config/lang/it/lang.php @@ -3,6 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Roberto Bellingeri <bellingeri@netguru.it> + * @author Eddy <eddy@mail.it> + * @author Riccardo <riccardo.furlato@gmail.com> + * @author Stefano <stefano.stefano@gmail.com> * @author damiano <damiano@spagnuolo.eu> * @author Torpedo <dgtorpedo@gmail.com> * @author Christopher Smith <chris@jalakai.co.uk> @@ -12,7 +16,6 @@ * @author robocap <robocap1@gmail.com> * @author Jacopo Corbetta <jacopo.corbetta@gmail.com> * @author Matteo Pasotti <matteo@xquiet.eu> - * @author Riccardo <riccardofila@gmail.com> * @author Paolo <paolopoz12@gmail.com> */ $lang['menu'] = 'Configurazione Wiki'; @@ -152,6 +155,12 @@ $lang['xsendfile'] = 'Usare l\'header X-Sendfile per permettere al w $lang['renderer_xhtml'] = 'Renderer da usare per la visualizzazione del wiki (xhtml)'; $lang['renderer__core'] = '%s (dokuwiki)'; $lang['renderer__plugin'] = '%s (plugin)'; +$lang['search_nslimit'] = 'Limita la ricerca agli attuali spazi dei nomi X. Quando una ricerca viene eseguita da una pagina all\'interno di uno spazio dei nomi più profondo, i primi spazi dei nomi X verranno aggiunti come filtro'; +$lang['search_fragment'] = 'Specificare il comportamento di ricerca del frammento predefinito'; +$lang['search_fragment_o_exact'] = 'esatto'; +$lang['search_fragment_o_starts_with'] = 'inizia con'; +$lang['search_fragment_o_ends_with'] = 'finisce con'; +$lang['search_fragment_o_contains'] = 'contiene'; $lang['dnslookups'] = 'Dokuwiki farà il lookup dei nomi host per ricavare l\'indirizzo IP remoto degli utenti che modificano le pagine. Se hai un DNS lento o non funzionante o se non vuoi questa funzione, disabilita l\'opzione'; $lang['jquerycdn'] = 'Vuoi che gli script jQuery e jQuery UI siano caricati da una CDN? Questo richiederà richieste HTTP aggiuntive ma i file potrebbero caricarsi più velocemente e gli utenti potrebbero averli già in cache.'; $lang['jquerycdn_o_0'] = 'Nessuna CDN, solo consegna locale'; @@ -163,12 +172,6 @@ $lang['proxy____user'] = 'Nome utente proxy'; $lang['proxy____pass'] = 'Password proxy'; $lang['proxy____ssl'] = 'Usa SSL per connetterti al proxy'; $lang['proxy____except'] = 'Espressioni regolari per far corrispondere le URLs per i quali i proxy dovrebbero essere ommessi.'; -$lang['safemodehack'] = 'Abilita safemode hack'; -$lang['ftp____host'] = 'Server FTP per safemode hack'; -$lang['ftp____port'] = 'Porta FTP per safemode hack'; -$lang['ftp____user'] = 'Nome utente FTP per safemode hack'; -$lang['ftp____pass'] = 'Password FTP per safemode hack'; -$lang['ftp____root'] = 'Directory principale FTP per safemode hack'; $lang['license_o_'] = 'Nessuna scelta'; $lang['typography_o_0'] = 'nessuno'; $lang['typography_o_1'] = 'Solo virgolette'; diff --git a/lib/plugins/config/lang/ja/intro.txt b/lib/plugins/config/lang/ja/intro.txt index 4d98dd3ed..29e3e7539 100644 --- a/lib/plugins/config/lang/ja/intro.txt +++ b/lib/plugins/config/lang/ja/intro.txt @@ -4,8 +4,8 @@ 個々の設定に関しては[[doku>ja:config|DokuWiki の設定]]を参照してください。 このプラグインに関する詳細な情報は[[doku>ja:plugin:config|設定管理プラグイン]]を参照してください。 -背景が薄い赤の場合、その設定は変更することが出来ません。 -背景が青の場合はデフォルト設定、背景が白の場合はサイト固有の設定になっており、どちら設定も変更が可能です。 +背景が薄い赤の場合、その設定は保護されており、本プラグインを通して変更することは出来ません。 +背景が青の場合はデフォルト設定、背景が白の場合はサイト固有の設定になっており、どちらの場合でも変更が可能です。 設定の変更後は必ず **保存** ボタンを押して変更を確定してください。 ボタンを押さなかった場合、変更は破棄されます。 diff --git a/lib/plugins/config/lang/ja/lang.php b/lib/plugins/config/lang/ja/lang.php index 9475f900f..76d254142 100644 --- a/lib/plugins/config/lang/ja/lang.php +++ b/lib/plugins/config/lang/ja/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> + * @author lempel <riverlempel@hotmail.com> * @author Yuji Takenaka <webmaster@davilin.com> * @author Christopher Smith <chris@jalakai.co.uk> * @author Ikuo Obataya <i.obataya@gmail.com> @@ -21,7 +23,7 @@ $lang['locked'] = '設定用ファイルを更新できません ローカル設定ファイルの名前と権限を確認して下さい。'; $lang['danger'] = '危険:この設定を変更するとウィキや設定管理画面にアクセスできなくなる恐れがあります。'; $lang['warning'] = '注意:この設定を変更すると意図しない作動につながる可能性があります。'; -$lang['security'] = '警告:この設定を変更するとセキュリティに悪影響する恐れがあります。'; +$lang['security'] = 'セキュリティ警告:この設定を変更するとセキュリティに悪影響する恐れがあります。'; $lang['_configuration_manager'] = '設定管理'; $lang['_header_dokuwiki'] = 'DokuWiki'; $lang['_header_plugin'] = 'プラグイン'; @@ -35,52 +37,53 @@ $lang['_editing'] = '編集'; $lang['_links'] = 'リンク'; $lang['_media'] = 'メディア'; $lang['_notifications'] = '通知設定'; -$lang['_syndication'] = 'RSS配信設定'; +$lang['_syndication'] = '配信設定(RSS)'; $lang['_advanced'] = '高度な設定'; $lang['_network'] = 'ネットワーク'; $lang['_msg_setting_undefined'] = '設定のためのメタデータがありません。'; $lang['_msg_setting_no_class'] = '設定クラスがありません。'; +$lang['_msg_setting_no_known_class'] = 'クラス設定が利用出来ません。'; $lang['_msg_setting_no_default'] = '初期値が設定されていません。'; -$lang['title'] = 'WIKIタイトル'; -$lang['start'] = 'スタートページ名'; +$lang['title'] = 'Wikiタイトル(あなたのWikiの名前)'; +$lang['start'] = 'スタートページ名(各名前空間の始点として使われるページ名)'; $lang['lang'] = '使用言語'; -$lang['template'] = 'テンプレート'; -$lang['tagline'] = 'キャッチフレーズ (テンプレートが対応していれば)'; -$lang['sidebar'] = 'サイドバー用ページ名 (テンプレートが対応していれば)。空欄でサイドバー無効。'; -$lang['license'] = '作成した内容をどのライセンスでリリースしますか?'; -$lang['savedir'] = '保存ディレクトリ'; -$lang['basedir'] = 'サーバのパス (例: <code>/dokuwiki/</code>)。空欄にすると自動的に検出します。'; -$lang['baseurl'] = 'サーバの URL (例: <code>http://www.yourserver.com</code>)。空欄にすると自動的に検出します。'; -$lang['cookiedir'] = 'Cookie のパス。空欄にすると baseurl を使用します。'; +$lang['template'] = 'テンプレート(Wikiのデザイン)'; +$lang['tagline'] = 'キャッチフレーズ(テンプレートが対応している場合に有効)'; +$lang['sidebar'] = 'サイドバー用ページ名(テンプレートが対応している場合に有効。空欄でサイドバーを無効化します。)'; +$lang['license'] = '作成した内容をどのライセンスでリリースするか'; +$lang['savedir'] = 'データ保存用のディレクトリ'; +$lang['basedir'] = 'サーバのパス (例: <code>/dokuwiki/</code>)<br>空欄にすると自動的に検出します。'; +$lang['baseurl'] = 'サーバの URL (例: <code>http://www.yourserver.com</code>)<br>空欄にすると自動的に検出します。'; +$lang['cookiedir'] = 'Cookie のパス(空欄にすると baseurl を使用します。)'; $lang['dmode'] = 'フォルダ作成マスク'; $lang['fmode'] = 'ファイル作成マスク'; $lang['allowdebug'] = 'デバッグモード(<b>必要で無いときは無効にしてください</b>)'; -$lang['recent'] = '最近の変更表示数'; +$lang['recent'] = '最近の変更で1ページごとに表示する数'; $lang['recent_days'] = '最近の変更とする期間(日数)'; -$lang['breadcrumbs'] = 'トレース(パンくず)表示数'; -$lang['youarehere'] = '現在位置を表示'; +$lang['breadcrumbs'] = 'トレース(パンくず)表示数(0で無効化します)'; +$lang['youarehere'] = '現在位置を表示(こちらをオンにする場合、恐らく、上のオプションをオフにしたいとも思うでしょう)'; $lang['fullpath'] = 'ページのフッターに絶対パスを表示'; $lang['typography'] = 'タイポグラフィー変換'; $lang['dformat'] = '日付フォーマット(PHPの<a href="http://php.net/strftime">strftime</a>関数を参照)'; -$lang['signature'] = '署名'; +$lang['signature'] = 'エディターの署名ボタンで挿入する内容'; $lang['showuseras'] = '最終編集者の情報として表示する内容'; -$lang['toptoclevel'] = '目次 トップレベル見出し'; -$lang['tocminheads'] = '目次を生成するための最小見出し数'; -$lang['maxtoclevel'] = '目次 表示限度見出し'; -$lang['maxseclevel'] = '編集可能見出し'; -$lang['camelcase'] = 'キャメルケースリンク'; +$lang['toptoclevel'] = '目次のトップレベル見出し'; +$lang['tocminheads'] = '目次を生成する最小見出し数'; +$lang['maxtoclevel'] = '目次に表示する最大レベルの見出し'; +$lang['maxseclevel'] = '部分編集を有効にする最大レベルの見出し'; +$lang['camelcase'] = 'キャメルケースリンクを使う'; $lang['deaccent'] = 'ページ名の変換方法'; $lang['useheading'] = '最初の見出しをページ名とする'; -$lang['sneaky_index'] = 'デフォルトでは索引にすべての名前空間を表示しますが、この機能はユーザーに閲覧権限のない名前空間を非表示にします。ただし、閲覧が可能な副名前空間まで表示されなくなるため、ACLの設定が適正でない場合は索引機能が使えなくなる場合があります。'; -$lang['hidepages'] = '検索、サイトマップ、その他の自動インデックスの結果に表示しないページ(Regex)'; -$lang['useacl'] = 'アクセス管理を行う(ACL)'; -$lang['autopasswd'] = 'パスワードの自動生成(ACL)'; -$lang['authtype'] = '認証方法(ACL)'; -$lang['passcrypt'] = '暗号化方法(ACL)'; -$lang['defaultgroup'] = 'デフォルトグループ(ACL)'; -$lang['superuser'] = 'スーパーユーザー(ACL)'; -$lang['manager'] = 'マネージャー(特定の管理機能を使用可能なユーザーもしくはグループ)'; -$lang['profileconfirm'] = 'プロフィール変更時に現在のパスワードを要求(ACL)'; +$lang['sneaky_index'] = 'デフォルトでは索引にすべての名前空間を表示しますが、このオプションを有効にすると、ユーザーに閲覧権限のない名前空間を非表示にします。ただし、閲覧が可能な副名前空間まで表示されなくなるため、ACLの設定が適正でない場合は索引機能が使えなくなる場合があります。'; +$lang['hidepages'] = '検索、サイトマップ、その他の自動インデックスの結果に表示しないページ'; +$lang['useacl'] = 'アクセス管理(ACL)を行う'; +$lang['autopasswd'] = 'パスワードの自動生成'; +$lang['authtype'] = '認証方法'; +$lang['passcrypt'] = '暗号化方法'; +$lang['defaultgroup'] = 'デフォルトグループ(全てのユーザーがこのグループに属します。)'; +$lang['superuser'] = 'スーパーユーザー(ACL設定に関わらず全てのページと機能へのアクセス権を有します。グループ、ユーザー、もしくはそれらをカンマ区切りしたリスト(例:user1,@group1,user2)を入力して下さい。)'; +$lang['manager'] = 'マネージャー(特定の管理機能へのアクセス権を有します。グループ、ユーザー、もしくはそれらをカンマ区切りしたリスト(例:user1,@group1,user2)を入力して下さい。)'; +$lang['profileconfirm'] = 'プロフィール変更時に現在のパスワードを要求'; $lang['rememberme'] = 'ログイン用クッキーを永久に保持することを許可(ログインを保持)'; $lang['disableactions'] = 'DokuWiki の動作を無効にする'; $lang['disableactions_check'] = 'チェック'; @@ -90,64 +93,78 @@ $lang['disableactions_profile_delete'] = '自分のアカウントの抹消'; $lang['disableactions_other'] = 'その他の動作(カンマ区切り)'; $lang['disableactions_rss'] = 'XML 配信(RSS)'; $lang['auth_security_timeout'] = '認証タイムアウト設定(秒)'; -$lang['securecookie'] = 'クッキーをHTTPSにてセットする場合は、ブラウザよりHTTPS経由で送信された場合にみに制限しますか?ログインのみをSSLで行う場合は、この機能を無効にしてください。'; -$lang['remote'] = 'リモートAPIを有効化します。有効化するとXML-RPCまたは他の手段でwikiにアプリケーションがアクセスすることを許可します。'; -$lang['remoteuser'] = 'カンマ区切りで書かれたグループ名、またはユーザ名だけにリモートAPIへのアクセスを許可します。空白の場合は、すべてのユーザにアクセスを許可します。'; +$lang['securecookie'] = 'クッキーをHTTPSにてセットする場合は、ブラウザよりHTTPS経由で送信された場合にみに制限する(ログインのみをSSLで行う場合は、この機能を無効にしてください。)'; +$lang['remote'] = 'リモートAPIを有効化(有効化するとXML-RPCまたは他の手段でwikiにアプリケーションがアクセスすることを許可します。)'; +$lang['remoteuser'] = 'リモートAPIへのアクセス許可(カンマ区切りで指定されたグループ、またはユーザーに対してのみ許可します。空白の場合は、すべてのユーザにアクセスを許可します。)'; $lang['usewordblock'] = '単語リストに基づくスパムブロック'; -$lang['relnofollow'] = 'rel="nofollow"を付加'; +$lang['relnofollow'] = '外部リンクにrel="nofollow"を付加'; $lang['indexdelay'] = 'インデックスを許可(何秒後)'; $lang['mailguard'] = 'メールアドレス保護'; $lang['iexssprotect'] = 'アップロードファイルに悪意のあるJavaScriptやHTMLが含まれていないかチェックする'; $lang['usedraft'] = '編集中の自動保存(ドラフト)機能を使用'; -$lang['htmlok'] = 'HTML埋め込み'; -$lang['phpok'] = 'PHP埋め込み'; +$lang['htmlok'] = 'HTML埋め込みを許可する'; +$lang['phpok'] = 'PHP埋め込みを許可する'; $lang['locktime'] = 'ファイルロック期限(秒)'; $lang['cachetime'] = 'キャッシュ保持時間(秒)'; -$lang['target____wiki'] = '内部リンクの表示先'; -$lang['target____interwiki'] = 'InterWikiリンクの表示先'; -$lang['target____extern'] = '外部リンクの表示先'; -$lang['target____media'] = 'メディアリンクの表示先'; -$lang['target____windows'] = 'Windowsリンクの表示先'; -$lang['mediarevisions'] = 'メディアファイルの履歴を有効にしますか?'; -$lang['refcheck'] = 'メディア参照元チェック'; +$lang['target____wiki'] = '内部リンクの表示先(target="……")'; +$lang['target____interwiki'] = 'InterWikiリンクの表示先(target="……")'; +$lang['target____extern'] = '外部リンクの表示先(target="……")'; +$lang['target____media'] = 'メディアリンクの表示先(target="……")'; +$lang['target____windows'] = 'Windowsリンクの表示先(target="……")'; +$lang['mediarevisions'] = 'メディアファイルの履歴を有効にする'; +$lang['refcheck'] = 'メディアファイルを削除する前に、それがまだ使われているかどうかチェックする'; $lang['gdlib'] = 'GDlibバージョン'; $lang['im_convert'] = 'ImageMagick変換ツールへのパス'; $lang['jpg_quality'] = 'JPG圧縮品質(0-100)'; -$lang['fetchsize'] = '外部からのダウンロード最大サイズ'; -$lang['subscribers'] = '更新通知機能'; -$lang['subscribe_time'] = '購読リストと概要を送信する期間(秒)。「最近の変更とする期間」で指定した期間より小さくしてください。'; -$lang['notify'] = '変更を通知するメールアドレス'; -$lang['registernotify'] = '新規ユーザー登録を通知するメールアドレス'; -$lang['mailfrom'] = 'メール送信時の送信元アドレス'; -$lang['mailprefix'] = '自動メールの題名に使用する接頭語'; -$lang['htmlmail'] = 'メールをテキスト形式ではなく、HTML形式で送信する。'; -$lang['sitemap'] = 'Googleサイトマップ作成頻度(日数)'; -$lang['rss_type'] = 'RSSフィード形式'; -$lang['rss_linkto'] = 'RSS内リンク先'; -$lang['rss_content'] = 'XMLフィードに何を表示させますか?'; -$lang['rss_update'] = 'RSSフィードの更新間隔(秒)'; -$lang['rss_show_summary'] = 'フィードのタイトルにサマリーを表示'; +$lang['fetchsize'] = 'fetch.phpが外部URLからダウンロードする内容(キャッシュ保存や、外部イメージのリサイズなど)の最大サイズ(バイト数指定)'; +$lang['subscribers'] = 'ユーザーがEメールで更新通知を受ける機能を有効にする'; +$lang['subscribe_time'] = '購読リストと概要を送信する期間(秒)<br>「最近の変更とする期間(recent_days)」で指定した期間より小さくしてください。'; +$lang['notify'] = '変更を常に通知する送信先メールアドレス'; +$lang['registernotify'] = '新規ユーザー登録を常に通知する送信先メールアドレス'; +$lang['mailfrom'] = 'メール自動送信時の送信元アドレス'; +$lang['mailreturnpath'] = '不届き通知を受け取るメールアドレス'; +$lang['mailprefix'] = '自動メールの題名に使用する接頭語(空欄の場合、Wikiタイトルが使用されます。)'; +$lang['htmlmail'] = 'メールをテキスト形式ではなく、HTML形式で送信する(見た目は良くなりますが、サイズは大きくなります。このオプションを無効にすると、プレーンテキストのみのメールを送信します。)'; +$lang['sitemap'] = 'Googleサイトマップ作成頻度(日数。0で無効化します。)'; +$lang['rss_type'] = 'XMLフィード形式'; +$lang['rss_linkto'] = 'XMLフィード内リンク先'; +$lang['rss_content'] = 'XMLフィードに表示する内容'; +$lang['rss_update'] = 'XMLフィードの更新間隔(秒)'; +$lang['rss_show_summary'] = 'XMLフィードのタイトルにサマリーを表示'; +$lang['rss_show_deleted'] = '削除されたフィードを含める'; $lang['rss_media'] = 'XMLフィードで、どんな種類の変更を記載するか'; -$lang['updatecheck'] = 'DokuWikiの更新とセキュリティに関する情報をチェックしますか? この機能は update.dokuwiki.org への接続が必要です。'; +$lang['rss_media_o_both'] = '両方'; +$lang['rss_media_o_pages'] = 'ページ'; +$lang['rss_media_o_media'] = 'メディア'; +$lang['updatecheck'] = 'DokuWikiの更新とセキュリティに関する情報をチェックする(この機能は update.dokuwiki.org への接続が必要です。)'; $lang['userewrite'] = 'URLの書き換え'; $lang['useslash'] = 'URL上の名前空間の区切りにスラッシュを使用'; $lang['sepchar'] = 'ページ名の単語区切り文字'; $lang['canonical'] = 'canonical URL(正準URL)を使用'; $lang['fnencode'] = '非アスキーファイル名のエンコーディング方法'; -$lang['autoplural'] = '自動複数形処理'; +$lang['autoplural'] = 'リンク内での自動複数形処理'; $lang['compression'] = 'アーカイブファイルの圧縮方法'; $lang['gzip_output'] = 'xhtmlに対するコンテンツ圧縮(gzip)を使用'; $lang['compress'] = 'CSSとJavaScriptを圧縮'; $lang['cssdatauri'] = 'HTTP リクエスト数によるオーバーヘッドを減らすため、CSS ファイルから参照される画像ファイルのサイズがここで指定するバイト数以内の場合は CSS ファイル内に Data URI として埋め込みます。 <code>400</code> から <code>600</code> バイトがちょうどよい値です。<code>0</code> を指定すると埋め込み処理は行われません。'; $lang['send404'] = '文書が存在しないページに"HTTP404/Page Not Found"を使用'; -$lang['broken_iua'] = 'ignore_user_abort関数が破損している恐れがあります。そのため、検索インデックスが動作しない可能性があります。IIS+PHP/CGIの組み合わせで破損することが判明しています。詳しくは<a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a>を参照してください。'; -$lang['xsendfile'] = 'ウェブサーバーが静的ファイルを生成するために X-Sendfile ヘッダーを使用しますか?なお、この機能をウェブサーバーがサポートしている必要があります。'; -$lang['renderer_xhtml'] = 'Wikiの出力(xhtml)にレンダラーを使用する'; +$lang['broken_iua'] = 'お使いのシステムのignore_user_abort関数が故障している場合、このオプションを有効にして下さい。そのままだと、検索インデックスが動作しない可能性があります。IIS+PHP/CGIの組み合わせで破損することが判明しています。詳しくは<a href="http://bugs.splitbrain.org/?do=details&task_id=852">Bug 852</a>を参照してください。'; +$lang['xsendfile'] = 'ウェブサーバーが静的ファイルを生成する際に X-Sendfile ヘッダーを使用する(お使いのウェブサーバーがこの機能をサポートしている必要があります。)'; +$lang['renderer_xhtml'] = 'Wikiの出力(xhtml)に使用するレンダラー'; $lang['renderer__core'] = '%s (Dokuwikiコア)'; $lang['renderer__plugin'] = '%s (プラグイン)'; -$lang['dnslookups'] = 'ページを編集しているユーザーのIPアドレスからホスト名を逆引きする。利用できるDNSサーバーがない、あるいはこの機能が不要な場合にはオフにします。'; -$lang['jquerycdn'] = 'コンテンツ・デリバリー・ネットワーク (CDN) の選択:jQuery と jQuery UI スクリプトを CDN からロードさせる場合には、追加的な HTTP リクエストが発生しますが、ブラウザキャッシュが使用されるため、表示速度の向上が期待できます。'; -$lang['jquerycdn_o_0'] = 'CDN を使用しない(または利用できない)'; +$lang['search_nslimit'] = '現在の名前空間 X 内のみ検索する<br>より下層の名前空間から検索が実行された場合、最初の名前空間 X がフィルターとして追加されます。'; +$lang['search_fragment'] = '部分検索の規定の動作を指定する'; +$lang['search_fragment_o_exact'] = '完全一致'; +$lang['search_fragment_o_starts_with'] = '前方一致'; +$lang['search_fragment_o_ends_with'] = '後方一致'; +$lang['search_fragment_o_contains'] = '部分一致'; +$lang['trustedproxy'] = '報告される真のクライアントIPに関して、ここで指定する正規表現に合う転送プロキシを信頼します。あらゆるプロキシを信頼する場合は、何も入力しないでおいて下さい。'; +$lang['_feature_flags'] = '機能フラグ'; +$lang['defer_js'] = 'ページのHTMLが解析されるまでJavascriptの実行を延期する(ページの読み込み速度が向上しますが、一部のプラグインが正常に動作しない可能性があります)'; +$lang['dnslookups'] = 'ページを編集しているユーザーのIPアドレスからホスト名を逆引きする(利用できるDNSサーバーがない、あるいはこの機能が不要な場合にはオフにします。)'; +$lang['jquerycdn'] = 'コンテンツ・デリバリー・ネットワーク (CDN) の選択(jQuery と jQuery UI スクリプトを CDN からロードさせる場合には、追加的な HTTP リクエストが発生しますが、ブラウザキャッシュが使用されるため、表示速度の向上が期待できます。)'; +$lang['jquerycdn_o_0'] = 'CDN を使用せず、ローカルデリバリーのみ使用する'; $lang['jquerycdn_o_jquery'] = 'CDN: code.jquery.com を使用'; $lang['jquerycdn_o_cdnjs'] = 'CDN: cdnjs.com を使用'; $lang['proxy____host'] = 'プロキシ - サーバー名'; @@ -156,12 +173,6 @@ $lang['proxy____user'] = 'プロキシ - ユーザー名'; $lang['proxy____pass'] = 'プロキシ - パスワード'; $lang['proxy____ssl'] = 'プロキシへの接続にsslを使用'; $lang['proxy____except'] = 'スキップするプロキシのURL正規表現'; -$lang['safemodehack'] = 'セーフモード対策を行う'; -$lang['ftp____host'] = 'FTP サーバー名(セーフモード対策)'; -$lang['ftp____port'] = 'FTP ポート(セーフモード対策)'; -$lang['ftp____user'] = 'FTP ユーザー名(セーフモード対策)'; -$lang['ftp____pass'] = 'FTP パスワード(セーフモード対策)'; -$lang['ftp____root'] = 'FTP ルートディレクトリ(セーフモード対策)'; $lang['license_o_'] = '選択されていません'; $lang['typography_o_0'] = '変換しない'; $lang['typography_o_1'] = '二重引用符(ダブルクオート)のみ'; @@ -170,9 +181,9 @@ $lang['userewrite_o_0'] = '使用しない'; $lang['userewrite_o_1'] = '.htaccess'; $lang['userewrite_o_2'] = 'DokuWikiによる設定'; $lang['deaccent_o_0'] = '変換しない'; -$lang['deaccent_o_1'] = 'アクセント付きの文字を変換する'; +$lang['deaccent_o_1'] = 'アクセント付きの文字からアクセントを取り除く'; $lang['deaccent_o_2'] = 'ローマ字化'; -$lang['gdlib_o_0'] = 'GDを利用できません'; +$lang['gdlib_o_0'] = 'GD Libが利用不可'; $lang['gdlib_o_1'] = 'バージョン 1.x'; $lang['gdlib_o_2'] = '自動検出'; $lang['rss_type_o_rss'] = 'RSS 0.91'; @@ -199,7 +210,7 @@ $lang['showuseras_o_loginname'] = 'ログイン名'; $lang['showuseras_o_username'] = 'ユーザーのフルネーム'; $lang['showuseras_o_username_link'] = 'user という InterWiki リンクになったユーザーのフルネーム'; $lang['showuseras_o_email'] = 'ユーザーのメールアドレス(メールガード設定による難読化)'; -$lang['showuseras_o_email_link'] = 'ユーザーのメールアドレスをリンクにする'; +$lang['showuseras_o_email_link'] = 'ユーザーのメールアドレスをmailtoリンクにする'; $lang['useheading_o_0'] = '使用しない'; $lang['useheading_o_navigation'] = 'ナビゲーションのみ'; $lang['useheading_o_content'] = 'Wikiの内容のみ'; diff --git a/lib/plugins/config/lang/ko/lang.php b/lib/plugins/config/lang/ko/lang.php index cfca44278..2d2582a09 100644 --- a/lib/plugins/config/lang/ko/lang.php +++ b/lib/plugins/config/lang/ko/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author pavement <pavement@rael.cc> + * @author Traend <Traend@ruu.kr> * @author Seungheon Song <esketch@gmail.com> * @author jk Lee * @author dongnak <dongnak@gmail.com> @@ -149,6 +151,7 @@ $lang['xsendfile'] = '웹 서버가 정적 파일을 제공할 수 $lang['renderer_xhtml'] = '주요 (xhtml) 위키 출력에 사용할 렌더러'; $lang['renderer__core'] = '%s (도쿠위키 코어)'; $lang['renderer__plugin'] = '%s (플러그인)'; +$lang['search_nslimit'] = '검색을 현재 X 네임스페이스로 제한하십시오. 더 깊은 네임스페이스 내의 페이지에서 검색을 실행하면 첫 번째 X 네임스페이스가 필터로 추가됩니다.'; $lang['dnslookups'] = '도쿠위키가 문서를 편집하는 사용자의 원격 IP 주소에 대한 호스트 이름을 조회합니다. 서버가 느리거나 DNS 서버를 작동하지 않거나 이 기능을 원하지 않으면, 이 옵션을 비활성화하세요'; $lang['jquerycdn'] = '제이쿼리(jQuery)와 제이쿼리UI 스크립트 파일을 컨텐츠전송네트워크(CDN)에서 불러와야만 합니까? 이것은 추가적인 HTTP요청을 합니다. 하지만 파일이 빨리 불러지고 캐쉬에 저장되게 할 수 있습니다.'; $lang['jquerycdn_o_0'] = '컨텐츠전송네트워크(CDN) 사용 안 함. 로컬 전송만 함'; @@ -160,12 +163,6 @@ $lang['proxy____user'] = '프록시 사용자 이름'; $lang['proxy____pass'] = '프록시 비밀번호'; $lang['proxy____ssl'] = '프록시로 연결하는 데 SSL 사용'; $lang['proxy____except'] = '프록시가 건너뛰어야 할 일치하는 URL의 정규 표현식.'; -$lang['safemodehack'] = 'safemode hack 활성화'; -$lang['ftp____host'] = 'safemode hack의 FTP 서버'; -$lang['ftp____port'] = 'safemode hack의 FTP 포트'; -$lang['ftp____user'] = 'safemode hack의 FTP 사용자 이름'; -$lang['ftp____pass'] = 'safemode hack의 FTP 비밀번호'; -$lang['ftp____root'] = 'safemode hack의 FTP 루트 디렉터리'; $lang['license_o_'] = '선택하지 않음'; $lang['typography_o_0'] = '없음'; $lang['typography_o_1'] = '작은따옴표를 제외'; diff --git a/lib/plugins/config/lang/la/lang.php b/lib/plugins/config/lang/la/lang.php index 515aa9551..dc926e5d3 100644 --- a/lib/plugins/config/lang/la/lang.php +++ b/lib/plugins/config/lang/la/lang.php @@ -127,12 +127,6 @@ $lang['proxy____user'] = 'Proxis nomen sodalis'; $lang['proxy____pass'] = 'Proxis tessera'; $lang['proxy____ssl'] = 'SSL ut connectas uti'; $lang['proxy____except'] = 'Verba, ut VRL inspicias, quibus Proxis non agnoscitur.'; -$lang['safemodehack'] = 'Ad tempus conseruatio apta facere'; -$lang['ftp____host'] = 'FTP computator seruitor ad tempus seruatis'; -$lang['ftp____port'] = 'FTP ianua ad tempus seruatis'; -$lang['ftp____user'] = 'FTP Sodalis ad tempus seruatis'; -$lang['ftp____pass'] = 'FTP tessera ad tempus seruatis'; -$lang['ftp____root'] = 'FTP domicilium ad tempus seruatis'; $lang['license_o_'] = 'Nihil electum'; $lang['typography_o_0'] = 'neuter'; $lang['typography_o_1'] = 'sine singulis uirgulis'; diff --git a/lib/plugins/config/lang/lt/lang.php b/lib/plugins/config/lang/lt/lang.php index eff7f0e4a..f69ed6cf4 100644 --- a/lib/plugins/config/lang/lt/lang.php +++ b/lib/plugins/config/lang/lt/lang.php @@ -1,8 +1,11 @@ <?php + /** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * Lithuanian language file * - * @author audrius.klevas@gmail.com + * @author audrius.klevas <audrius.klevas@gmail.com> * @author Arunas Vaitekunas <aras@fan.lt> */ $lang['lang'] = 'Kalba'; diff --git a/lib/plugins/config/lang/lv/lang.php b/lib/plugins/config/lang/lv/lang.php index 8caba8ed3..893e9a72b 100644 --- a/lib/plugins/config/lang/lv/lang.php +++ b/lib/plugins/config/lang/lv/lang.php @@ -135,12 +135,6 @@ $lang['proxy____user'] = 'Proxy lietotāja vārds'; $lang['proxy____pass'] = 'Proxy parole'; $lang['proxy____ssl'] = 'Lietot SSL savienojumu ar proxy'; $lang['proxy____except'] = 'Regulārā izteiksme tiem URL, kam nevar lietot proxy.'; -$lang['safemodehack'] = 'Lietot safemode apeju'; -$lang['ftp____host'] = 'FTP serveris safemode apejai'; -$lang['ftp____port'] = 'FTP ports safemode apejai'; -$lang['ftp____user'] = 'FTP lietotājvārds safemode apejai'; -$lang['ftp____pass'] = 'FTP parole safemode apejai'; -$lang['ftp____root'] = 'FTP saknes diektorija safemode apejai'; $lang['license_o_'] = 'Ar nekādu'; $lang['typography_o_0'] = 'neko'; $lang['typography_o_1'] = 'tikai dubultpēdiņas'; diff --git a/lib/plugins/config/lang/mr/lang.php b/lib/plugins/config/lang/mr/lang.php index 5dbb8ecee..a1b47c80e 100644 --- a/lib/plugins/config/lang/mr/lang.php +++ b/lib/plugins/config/lang/mr/lang.php @@ -128,12 +128,6 @@ $lang['proxy____port'] = 'छद्म ( proxy ) सर्वरचे $lang['proxy____user'] = 'छद्म ( proxy ) सर्वरचे सदस्यनाम'; $lang['proxy____pass'] = 'छद्म ( proxy ) सर्वरचा पासवर्ड'; $lang['proxy____ssl'] = 'छद्म सर्वरला संपर्क साधण्यासाठी SSL वापरा'; -$lang['safemodehack'] = 'सेफमोड़ हॅक चालू करा'; -$lang['ftp____host'] = 'सेफमोड़ हॅक साठी FTP सर्वर'; -$lang['ftp____port'] = 'सेफमोड़ हॅक साठी FTP पोर्ट'; -$lang['ftp____user'] = 'सेफमोड़ हॅक साठी FTP सदस्यनाम'; -$lang['ftp____pass'] = 'सेफमोड़ हॅक साठी FTP पासवर्ड'; -$lang['ftp____root'] = 'सेफमोड़ हॅक साठी FTP मूळ डिरेक्टरी'; $lang['license_o_'] = 'काही निवडले नाही'; $lang['typography_o_0'] = 'काही नाही'; $lang['typography_o_1'] = 'फक्त दुहेरी अवतरण चिह्न'; diff --git a/lib/plugins/config/lang/nl/lang.php b/lib/plugins/config/lang/nl/lang.php index 8fdd76c03..6346143b6 100644 --- a/lib/plugins/config/lang/nl/lang.php +++ b/lib/plugins/config/lang/nl/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author PBU <pbu@xs4all.nl> + * @author Gerrit Uitslag <klapinklapin@gmail.com> * @author Harriet Neitz <harrietneitz@gmail.com> * @author mark prins <mprins@users.sf.net> * @author Pieter van der Meulen <pieter@vdmeulen.net> @@ -14,7 +16,6 @@ * @author Marijn Hofstra <hofstra.m@gmail.com> * @author Timon Van Overveldt <timonvo@gmail.com> * @author Ricardo Guijt <ricardoguijt@gmail.com> - * @author Gerrit <klapinklapin@gmail.com> * @author Hugo Smet <hugo.smet@scarlet.be> */ $lang['menu'] = 'Configuratie-instellingen'; @@ -43,6 +44,7 @@ $lang['_advanced'] = 'Geavanceerde instellingen'; $lang['_network'] = 'Netwerkinstellingen'; $lang['_msg_setting_undefined'] = 'Geen metadata voor deze instelling.'; $lang['_msg_setting_no_class'] = 'Geen class voor deze instelling.'; +$lang['_msg_setting_no_known_class'] = 'Setting class niet beschikbaar'; $lang['_msg_setting_no_default'] = 'Geen standaard waarde.'; $lang['title'] = 'Titel van de wiki'; $lang['start'] = 'Naam startpagina'; @@ -153,10 +155,12 @@ $lang['renderer_xhtml'] = 'Weergavesysteem voor de standaard (xhtml) wiki $lang['renderer__core'] = '%s (dokuwiki core)'; $lang['renderer__plugin'] = '%s (plugin)'; $lang['search_nslimit'] = 'Beperk het zoeken tot de huidige X namespaces. Wanneer het zoeken wordt uitgevoerd vanaf een pagina binnen een diepere namespace, worden de eerste X aantal namespaces toegevoegd als filter'; +$lang['search_fragment'] = 'Specifeer het standaard zoekgedrag voor fragmenten'; $lang['search_fragment_o_exact'] = 'exact'; $lang['search_fragment_o_starts_with'] = 'begint met'; $lang['search_fragment_o_ends_with'] = 'eindigt op'; $lang['search_fragment_o_contains'] = 'bevat'; +$lang['trustedproxy'] = 'Vertrouw op doorstuurproxy\'s die overeenkomen met deze reguliere expressie over het echte client-IP dat ze rapporteren. De standaard komt overeen met lokale netwerken. Laat leeg om geen proxy te vertrouwen.'; $lang['dnslookups'] = 'DokuWiki zoekt de hostnamen van IP-adressen van gebruikers die pagina wijzigen op. Schakel deze optie uit als je geen of een langzame DNS server hebt.'; $lang['jquerycdn'] = 'Moet er een CDN gebruikt worden om de jQuery en jQuery UI bestanden te laden. Dit zorgt voor extra HTTP verzoeken, maar bestanden laden mogelijk sneller en zitten misschien al in de cache van de gebruiker.'; $lang['jquerycdn_o_0'] = 'Geen CDN gebruiken'; @@ -168,12 +172,6 @@ $lang['proxy____user'] = 'Proxy gebruikersnaam'; $lang['proxy____pass'] = 'Proxy wachtwoord'; $lang['proxy____ssl'] = 'Gebruik SSL om een verbinding te maken met de proxy'; $lang['proxy____except'] = 'Reguliere expressie om URL\'s te bepalen waarvoor de proxy overgeslagen moet worden.'; -$lang['safemodehack'] = 'Safemode hack aanzetten'; -$lang['ftp____host'] = 'FTP server voor safemode hack'; -$lang['ftp____port'] = 'FTP port voor safemode hack'; -$lang['ftp____user'] = 'FTP gebruikersnaam voor safemode hack'; -$lang['ftp____pass'] = 'FTP wachtwoord voor safemode hack'; -$lang['ftp____root'] = 'FTP root directory voor safemode hack'; $lang['license_o_'] = 'Geen gekozen'; $lang['typography_o_0'] = 'geen'; $lang['typography_o_1'] = 'Alleen dubbele aanhalingstekens'; diff --git a/lib/plugins/config/lang/no/lang.php b/lib/plugins/config/lang/no/lang.php index ae612807c..a20415f0e 100644 --- a/lib/plugins/config/lang/no/lang.php +++ b/lib/plugins/config/lang/no/lang.php @@ -3,6 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Torgeir Blesvik <bletor@banenor.no> + * @author Rut Kristin Aanestad <dark@met.no> + * @author ThorPrestboen <thor.erling.prestboen@gmail.com> + * @author Christian McKenna <mckchr@banenor.no> * @author Thomas Nygreen <nygreen@gmail.com> * @author Arild Burud <arildb@met.no> * @author Torkill Bruland <torkar-b@online.no> @@ -12,12 +16,10 @@ * @author Knut Staring <knutst@gmail.com> * @author Lisa Ditlefsen <lisa@vervesearch.com> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author Rune Rasmussen syntaxerror.no@gmail.com + * @author Rune Rasmussen <syntaxerror.no@gmail.com> * @author Jon Bøe <jonmagneboe@hotmail.com> * @author Egil Hansen <egil@rosetta.no> * @author Arne Hanssen <arne.hanssen@getmail.no> - * @author Arne Hanssen <arnehans@getmail.no> * @author Patrick Sletvold <patricksletvold@hotmail.com> */ $lang['menu'] = 'Konfigurasjonsinnstillinger'; @@ -163,12 +165,6 @@ $lang['proxy____user'] = 'Brukernavn på proxyserver'; $lang['proxy____pass'] = 'Passord på proxyserver'; $lang['proxy____ssl'] = 'Bruk SSL for å koble til proxyserver'; $lang['proxy____except'] = 'Regulært uttrykk for URLer som ikke trenger bruk av proxy'; -$lang['safemodehack'] = 'Bruk safemode-hack'; -$lang['ftp____host'] = 'FTP-server for safemode-hack'; -$lang['ftp____port'] = 'FTP-port for safemode-hack'; -$lang['ftp____user'] = 'FTP-brukernavn for safemode-hack'; -$lang['ftp____pass'] = 'FTP-passord for safemode-hack'; -$lang['ftp____root'] = 'FTP-rotmappe for safemode-hack'; $lang['license_o_'] = 'Ingen valgt'; $lang['typography_o_0'] = 'ingen'; $lang['typography_o_1'] = 'Kun doble anførselstegn'; diff --git a/lib/plugins/config/lang/pl/lang.php b/lib/plugins/config/lang/pl/lang.php index 0a3df552d..55790ce0e 100644 --- a/lib/plugins/config/lang/pl/lang.php +++ b/lib/plugins/config/lang/pl/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Bartek S <sadupl@gmail.com> * @author Wojciech Lichota <wojciech@lichota.pl> * @author Max <maxrb146@gmail.com> * @author Grzegorz Żur <grzegorz.zur@gmail.com> @@ -153,6 +154,11 @@ $lang['xsendfile'] = 'Użyj nagłówka HTTP X-Sendfile w celu przesy $lang['renderer_xhtml'] = 'Mechanizm renderowania głównej treści strony (xhtml)'; $lang['renderer__core'] = '%s (dokuwiki)'; $lang['renderer__plugin'] = '%s (wtyczka)'; +$lang['search_fragment'] = 'Określ domyślne zachowanie wyszukiwania fragmentów'; +$lang['search_fragment_o_exact'] = 'dokładny'; +$lang['search_fragment_o_starts_with'] = 'zaczyna się z'; +$lang['search_fragment_o_ends_with'] = 'kończy się z'; +$lang['search_fragment_o_contains'] = 'zawiera'; $lang['dnslookups'] = 'DokiWiki wyszuka nazwy hostów dla zdalnych adresów IP użytkowników edytujących strony. Jeśli twój serwer DNS działa zbyt wolno, uległ awarii lub nie chcesz używać wyszukiwania, wyłącz tę opcję.'; $lang['jquerycdn'] = 'Czy pliki skryptów jQuery i jQuery UI powinny być ładowane z CDN? Powoduje to dodanie dodatkowych żądań HTTP, ale pliki mogą być ładowane szybciej, a użytkownicy mogą już je mieć zbuforowane.'; $lang['jquerycdn_o_0'] = 'Bez CDN, tylko lokalne zasoby'; @@ -164,12 +170,6 @@ $lang['proxy____user'] = 'Proxy - nazwa użytkownika'; $lang['proxy____pass'] = 'Proxy - hasło'; $lang['proxy____ssl'] = 'Proxy - SSL'; $lang['proxy____except'] = 'Wyrażenie regularne określające adresy URL, do których nie należy używać proxy.'; -$lang['safemodehack'] = 'Bezpieczny tryb (przez FTP)'; -$lang['ftp____host'] = 'FTP - serwer'; -$lang['ftp____port'] = 'FTP - port'; -$lang['ftp____user'] = 'FTP - nazwa użytkownika'; -$lang['ftp____pass'] = 'FTP - hasło'; -$lang['ftp____root'] = 'FTP - katalog główny'; $lang['license_o_'] = 'Nie wybrano żadnej'; $lang['typography_o_0'] = 'brak'; $lang['typography_o_1'] = 'tylko podwójne cudzysłowy'; diff --git a/lib/plugins/config/lang/pt-br/lang.php b/lib/plugins/config/lang/pt-br/lang.php index fe532fbcb..57de8bb7c 100644 --- a/lib/plugins/config/lang/pt-br/lang.php +++ b/lib/plugins/config/lang/pt-br/lang.php @@ -3,7 +3,11 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + * @author Davi Jorge <davimoises2015@hotmail.com> + * @author Schopf <pschopf@gmail.com> * @author Frederico Gonçalves Guimarães <frederico@teia.bio.br> + * @author Márcio Gomes Gonçalves <gomes@metha.com.br> * @author Felipe Castro <fefcas@gmail.com> * @author Lucien Raven <lucienraven@yahoo.com.br> * @author Enrico Nicoletto <liverig@gmail.com> @@ -46,6 +50,7 @@ $lang['_advanced'] = 'Configurações avançadas'; $lang['_network'] = 'Configurações de rede'; $lang['_msg_setting_undefined'] = 'Nenhum metadado configurado.'; $lang['_msg_setting_no_class'] = 'Nenhuma classe definida.'; +$lang['_msg_setting_no_known_class'] = 'Classe de configuração não disponível.'; $lang['_msg_setting_no_default'] = 'Nenhum valor padrão.'; $lang['title'] = 'Título do wiki'; $lang['start'] = 'Nome da página inicial'; @@ -134,6 +139,7 @@ $lang['rss_linkto'] = 'Os links da fonte XML apontam para'; $lang['rss_content'] = 'O que deve ser exibido nos itens da fonte XML?'; $lang['rss_update'] = 'Intervalo de atualização da fonte XML (seg)'; $lang['rss_show_summary'] = 'Resumo de exibição da fonte XML no título'; +$lang['rss_show_deleted'] = 'Feed XML Mostrar feeds excluídos'; $lang['rss_media'] = 'Que tipo de alterações devem ser listadas na fonte XML?'; $lang['rss_media_o_both'] = 'ambos'; $lang['rss_media_o_pages'] = 'páginas'; @@ -155,6 +161,15 @@ $lang['xsendfile'] = 'Usar o cabeçalho "X-Sendfile" para permitir q $lang['renderer_xhtml'] = 'Renderizador a ser utilizado para a saída principal (xhtml) do wiki'; $lang['renderer__core'] = '%s (núcleo do DokuWiki)'; $lang['renderer__plugin'] = '%s ("plug-in")'; +$lang['search_nslimit'] = 'Limite a pesquisa aos atuais X espaços de nomes. Quando uma pesquisa é executada a partir de uma página em um espaço de nomes mais interno, os primeiros X espaços de nomes serão adicionados como filtro'; +$lang['search_fragment'] = 'Especifique o comportamento padrão da pesquisa de fragmentos'; +$lang['search_fragment_o_exact'] = 'exato'; +$lang['search_fragment_o_starts_with'] = 'começa com'; +$lang['search_fragment_o_ends_with'] = 'termina com'; +$lang['search_fragment_o_contains'] = 'contém'; +$lang['trustedproxy'] = 'Confie nos proxies de encaminhamento que correspondem a essa expressão regular sobre o verdadeiro IP do cliente que eles relatam. O padrão corresponde às redes locais. Deixe em branco para não confiar em proxy.'; +$lang['_feature_flags'] = 'Sinalizadores de recursos'; +$lang['defer_js'] = 'Adie o javascript para ser executado após a análise do HTML da página. Melhora a velocidade percebida da página, mas pode interromper um pequeno número de plugins.'; $lang['dnslookups'] = 'O DokuWiki procurará pelo nome de host dos endereços IP remotos dos usuários que estão editando as páginas. Caso você tenha um DNS lento, ele não esteja funcionando ou, ainda, você não queira esse recurso, desabilite essa opção.'; $lang['jquerycdn'] = 'Os scripts jQuery e jQuery UI devem ser carregados a partir de uma CND? Isso adiciona requisições HTTP adicionais, mas os arquivos podem carregar mais rapidamente e os usuários podem já tê-los no cache.'; $lang['jquerycdn_o_0'] = 'Sem CDN, somente entrega local'; @@ -166,12 +181,6 @@ $lang['proxy____user'] = 'Nome de usuário do proxy'; $lang['proxy____pass'] = 'Senha do proxy'; $lang['proxy____ssl'] = 'Usar SSL para conectar ao proxy'; $lang['proxy____except'] = 'Expressões regulares de URL para excessão de proxy.'; -$lang['safemodehack'] = 'Habilitar o contorno de segurança'; -$lang['ftp____host'] = 'Servidor FTP para o contorno de segurança'; -$lang['ftp____port'] = 'Porta do FTP para o contorno de segurança'; -$lang['ftp____user'] = 'Nome do usuário FTP para o contorno de segurança'; -$lang['ftp____pass'] = 'Senha do usuário FTP para o contorno de segurança'; -$lang['ftp____root'] = 'Diretório raiz do FTP para o contorno de segurança'; $lang['license_o_'] = 'Nenhuma escolha'; $lang['typography_o_0'] = 'nenhuma'; $lang['typography_o_1'] = 'excluir aspas simples'; diff --git a/lib/plugins/config/lang/pt/intro.txt b/lib/plugins/config/lang/pt/intro.txt index 06a68c475..29e17d6b4 100644 --- a/lib/plugins/config/lang/pt/intro.txt +++ b/lib/plugins/config/lang/pt/intro.txt @@ -1,7 +1,7 @@ ====== Gerenciador de Configurações ====== -Use esta página para controlar as definições da instalação do seu DokuWiki. Para ajuda acerca dos itens, consulte [[doku>config]]. Para mais detalhes sobre este plugin, veja [[doku>plugin:config]]. +Use esta página para controlar as definições da instalação do seu DokuWiki. Para ajuda em itens individuais, consulte [[doku>config]]. Para mais detalhes sobre este plugin, veja [[doku>plugin:config]]. Definições que apresentem um fundo vermelho claro são protegidas e não podem ser alteradas com este plugin. Definições com um fundo azul são padrão e definições com um fundo branco foram configuradas localmente para essa instalação em particular. Tanto as definições em azul como em branco podem ser alteradas. -Lembre-se de pressionar o botão **Guardar** antes de sair desta página, caso contrário, as suas definições serão perdidas. +Lembre-se de pressionar o botão **Salvar** antes de sair desta página, caso contrário, as suas definições serão perdidas. diff --git a/lib/plugins/config/lang/pt/lang.php b/lib/plugins/config/lang/pt/lang.php index ba0ab0b3c..3fb851b28 100644 --- a/lib/plugins/config/lang/pt/lang.php +++ b/lib/plugins/config/lang/pt/lang.php @@ -3,159 +3,184 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> + * @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com> + * @author Maykon Oliveira <maykonoliveira850@gmail.com> + * @author José Vieira <jmsv63@gmail.com> * @author José Monteiro <Jose.Monteiro@DoWeDo-IT.com> * @author Enrico Nicoletto <liverig@gmail.com> * @author Fil <fil@meteopt.com> * @author André Neves <drakferion@gmail.com> - * @author José Campos zecarlosdecampos@gmail.com + * @author José Campos <zecarlosdecampos@gmail.com> * @author Paulo Carmino <contato@paulocarmino.com> * @author Alfredo Silva <alfredo.silva@sky.com> * @author Guilherme Sá <guilherme.sa@hotmail.com> */ -$lang['menu'] = 'Configuração'; -$lang['error'] = 'Parâmetros de Configuração não actualizados devido a valores inválidos. Por favor, reveja as modificações que pretende efectuar antes de re-submetê-las.<br /> Os valores incorrectos serão mostrados dentro de uma "moldura" vermelha.'; -$lang['updated'] = 'Parâmetros de Configuração actualizados com sucesso.'; +$lang['menu'] = 'Configurações'; +$lang['error'] = 'Parâmetros de configuração não atualizados devido a valores inválidos. Reveja as modificações que pretende efetuar antes de re-submetê-las.<br />Os valores incorretos serão mostrados dentro de uma "moldura" vermelha.'; +$lang['updated'] = 'Parâmetros de configuração atualizados.'; $lang['nochoice'] = '(não existem outras escolhas disponíveis)'; -$lang['locked'] = 'O ficheiro de configuração não pôde ser actualizado, se isso foi não intencional, <br />certifique-se que o nome e as permissões do ficheiro de configuração estejam correctas. +$lang['locked'] = 'O arquivo de configuração não pôde ser atualizado, se isso foi não intencional, <br />certifique-se que o nome e as permissões do arquivo de configuração estejam corretos. '; -$lang['danger'] = 'Perigo: Alterar esta opção poderá tornar o seu wiki e o menu de configuração inacessíveis.'; +$lang['danger'] = 'Perigo: Alterar esta opção poderá tornar seu wiki e o menu de configuração inacessíveis.'; $lang['warning'] = 'Aviso: A alteração desta opção poderá causar comportamento involuntário.'; -$lang['security'] = 'Aviso de segurança: Alterar esta opção pode apresentar um risco de segurança.'; -$lang['_configuration_manager'] = 'Gestor de Parâmetros de Configuração'; -$lang['_header_dokuwiki'] = 'Parâmetros DokuWiki'; -$lang['_header_plugin'] = 'Parâmetros dos Plugins'; -$lang['_header_template'] = 'Parâmetros das Templates'; -$lang['_header_undefined'] = 'Parâmetros não definidos'; -$lang['_basic'] = 'Configurações Básicas'; -$lang['_display'] = 'Configuração de Apresentação'; -$lang['_authentication'] = 'Configuração de Autenticação'; -$lang['_anti_spam'] = 'Configuração Anti-Spam'; -$lang['_editing'] = 'Configuração de Edição'; -$lang['_links'] = 'Configuração de Ligações'; -$lang['_media'] = 'Configuração de Media'; +$lang['security'] = 'Aviso de Segurança: Alterar esta opção pode apresentar um risco de segurança.'; +$lang['_configuration_manager'] = 'Gerenciamento de Configuração'; +$lang['_header_dokuwiki'] = 'DokuWiki'; +$lang['_header_plugin'] = 'Plugins'; +$lang['_header_template'] = 'Modelos'; +$lang['_header_undefined'] = 'Configurações não Definidas'; +$lang['_basic'] = 'Básicas'; +$lang['_display'] = 'Apresentação'; +$lang['_authentication'] = 'Autenticação'; +$lang['_anti_spam'] = 'Anti-Spam'; +$lang['_editing'] = 'Edição'; +$lang['_links'] = 'Links'; +$lang['_media'] = 'Mídia'; $lang['_notifications'] = 'Notificação'; $lang['_syndication'] = 'Sindicação (RSS)'; -$lang['_advanced'] = 'Configurações Avançadas'; -$lang['_network'] = 'Configuração de Rede'; -$lang['_msg_setting_undefined'] = 'Nenhum metadado configurado.'; +$lang['_advanced'] = 'Avançadas'; +$lang['_network'] = 'Rede'; +$lang['_msg_setting_undefined'] = 'Nenhum metadado definido.'; $lang['_msg_setting_no_class'] = 'Nenhuma classe definida.'; -$lang['_msg_setting_no_default'] = 'Sem valor por omissão.'; +$lang['_msg_setting_no_known_class'] = 'Classe de configuração não disponível.'; +$lang['_msg_setting_no_default'] = 'Sem valor padrão.'; $lang['title'] = 'Título deste Wiki'; $lang['start'] = 'Nome da Página Inicial'; $lang['lang'] = 'Idioma'; -$lang['template'] = 'Template'; +$lang['template'] = 'Modelo'; +$lang['tagline'] = 'Slogan (se o modelo for compatível)'; +$lang['sidebar'] = 'Nome da página da barra lateral (se o modelo for compatível). Um campo vazio desativará a barra lateral'; $lang['license'] = 'Sob que licença o seu conteúdo deverá ser disponibilizado?'; -$lang['savedir'] = 'Pasta para guardar dados'; -$lang['basedir'] = 'Pasta Base'; -$lang['baseurl'] = 'URL Base'; +$lang['savedir'] = 'Pasta para salvar dados'; +$lang['basedir'] = 'Caminho do servidor (ex. <code>/dokuwiki/</code>). Deixe em branco para auto detecção.'; +$lang['baseurl'] = 'URL do servidor (ex. <code>http://www.yourserver.com</code>). Deixe em branco para auto detecção.'; +$lang['cookiedir'] = 'Caminho do cookie. Deixe em branco para usar a baseurl.'; $lang['dmode'] = 'Modo de criação de pastas.'; -$lang['fmode'] = 'Modo de criação de ficheiros.'; +$lang['fmode'] = 'Modo de criação de arquivos.'; $lang['allowdebug'] = 'Permitir depuração <b>desabilite se não for necessário!</b>'; -$lang['recent'] = 'Alterações recentes'; +$lang['recent'] = 'Número de entradas por página em alterações recentes'; $lang['recent_days'] = 'Quantas mudanças recentes devem ser mantidas? (dias)'; $lang['breadcrumbs'] = 'Número máximo de breadcrumbs'; -$lang['youarehere'] = 'Breadcrumbs hierárquicas'; -$lang['fullpath'] = 'Revelar caminho completo no rodapé'; +$lang['youarehere'] = 'Usar breadcrumbs hierárquicas (você provavelmente irá querer desativar a opção acima então)'; +$lang['fullpath'] = 'Mostrar o caminho completo das páginas no rodapé'; $lang['typography'] = 'Executar substituições tipográficas'; $lang['dformat'] = 'Formato de Data (ver função PHP\'s <a href="http://php.net/strftime">strftime</a>)'; -$lang['signature'] = 'Assinatura'; +$lang['signature'] = 'O que inserir quando clicar no botão de assinatura do editor'; $lang['showuseras'] = 'O que exibir quando mostrar o utilizador que editou a página pela última vez'; $lang['toptoclevel'] = 'Nível de topo para a tabela de conteúdo'; $lang['tocminheads'] = 'Quantidade mínima de cabeçalhos para a construção da tabela de conteúdos.'; -$lang['maxtoclevel'] = 'Máximo nível para a tabela de conteúdo'; -$lang['maxseclevel'] = 'Máximo nível para editar secção'; -$lang['camelcase'] = 'Usar CamelCase'; -$lang['deaccent'] = 'Nomes das páginas sem acentos'; +$lang['maxtoclevel'] = 'Nível máximo para a tabela de conteúdo'; +$lang['maxseclevel'] = 'Nível máximo para editar seção'; +$lang['camelcase'] = 'Usar CamelCase para links'; +$lang['deaccent'] = 'Como limpar nomes de páginas'; $lang['useheading'] = 'Usar o primeiro cabeçalho para o nome da página'; -$lang['sneaky_index'] = 'Por norma, o DokuWiki irá exibir todos os espaços de nomes na visualização do índice. Ao habilitar essa opção, serão escondidos aqueles em que o utilizador não tenha permissão de leitura. Isto pode resultar na omissão de sub-ramos acessíveis, que poderá tornar o índice inútil para certas configurações de ACL.'; -$lang['hidepages'] = 'Esconder páginas correspondentes (expressões regulares)'; -$lang['useacl'] = 'Usar ACL - Listas de Controlo de Acessos'; +$lang['sneaky_index'] = 'Por padrão, o DokuWiki irá exibir todos os namespaces na visualização do índice. Ao ativar essa opção, serão escondidos aqueles em que o utilizador não tenha permissão de leitura. Isto pode resultar na ocultação de subnamespaces acessíveis, o que poderá tornar o índice inútil para certas configurações de ACL.'; +$lang['hidepages'] = 'Esconder páginas correspondentes com expressões regulares da pesquisa, índice e outros índices automáticos'; +$lang['useacl'] = 'Usar listas de controle de acesso'; $lang['autopasswd'] = 'Auto-gerar senhas'; $lang['authtype'] = 'Método de autenticação'; -$lang['passcrypt'] = 'Método de cifragem da senha'; -$lang['defaultgroup'] = 'Grupo por omissão'; -$lang['superuser'] = 'Superutilizador - um grupo, utilizador ou uma lista separada por vírgulas usuário1,@grupo1,usuário2 que tem acesso completo a todas as páginas e funções, independente das definições da ACL'; -$lang['manager'] = 'Gestor - um grupo, utilizador ou uma lista separada por vírgulas usuário1,@grupo1,usuário2 que tem acesso a certas funções de gestão'; +$lang['passcrypt'] = 'Método de criptografia da senha'; +$lang['defaultgroup'] = 'Grupo padrão onde novos usuários serão colocados'; +$lang['superuser'] = 'Superusuário - um grupo, utilizador ou uma lista separada por vírgulas usuário1,@grupo1,usuário2 que tem acesso completo a todas as páginas e funções, independente das definições da ACL'; +$lang['manager'] = 'Gerenciador - um grupo, utilizador ou uma lista separada por vírgulas usuário1,@grupo1,usuário2 que tem acesso a certas funções de gerenciamento'; $lang['profileconfirm'] = 'Confirmar mudanças no perfil com a senha'; -$lang['rememberme'] = 'Permitir cookies de autenticação permanentes (Memorizar?)'; -$lang['disableactions'] = 'Desactivar acções DokuWiki'; -$lang['disableactions_check'] = 'Checar'; -$lang['disableactions_subscription'] = 'Subscrever/Não Subscrver'; -$lang['disableactions_wikicode'] = 'Ver fonte/Exportar em bruto'; -$lang['disableactions_profile_delete'] = 'Deletar Sua Conta.'; -$lang['disableactions_other'] = 'Outras acções (separadas por vírgula)'; +$lang['rememberme'] = 'Permitir cookies de login permanentes (lembrar-me)'; +$lang['disableactions'] = 'Desativar ações DokuWiki'; +$lang['disableactions_check'] = 'Verificar'; +$lang['disableactions_subscription'] = 'Subscrever/Des-subscrever'; +$lang['disableactions_wikicode'] = 'Ver fonte/Exportar Direto'; +$lang['disableactions_profile_delete'] = 'Excluir Sua Conta'; +$lang['disableactions_other'] = 'Outras ações (separadas por vírgula)'; $lang['disableactions_rss'] = 'Sindicação XML (RSS)'; -$lang['auth_security_timeout'] = 'Tempo limite de segurança para autenticações (seg)'; -$lang['securecookie'] = 'Os cookies definidos via HTTPS deverão ser enviados para o navegador somente via HTTPS? Desabilite essa opção quando somente a autenticação do seu wiki for realizada de maneira segura via SSL e a navegação de maneira insegura.'; +$lang['auth_security_timeout'] = 'Tempo Limite para Autenticações (segundos)'; +$lang['securecookie'] = 'Os cookies definidos via HTTPS deverão ser enviados para o navegador somente via HTTPS? Desative essa opção quando somente a autenticação do seu wiki for realizada de maneira segura via SSL e a navegação de maneira insegura.'; +$lang['remote'] = 'Ativar o sistema de API remota. Isso permite que outros aplicativos acessem o wiki via XML-RPC ou outros mecanismos.'; +$lang['remoteuser'] = 'Restringe o acesso remoto da API aos grupos separados por vírgula ou aos usuários fornecidos aqui. Deixe em branco para dar acesso a todos.'; $lang['usewordblock'] = 'Bloquear spam baseado em lista de palavras (wordlist)'; $lang['relnofollow'] = 'Usar rel="nofollow" em links externos'; $lang['indexdelay'] = 'Tempo de espera antes da indexação (seg)'; $lang['mailguard'] = 'Obscurecer endereços de email'; $lang['iexssprotect'] = 'Verificar os arquivos enviados contra possíveis códigos maliciosos em HTML ou JavaScript'; -$lang['usedraft'] = 'Guardar o rascunho automaticamente durante a edição'; -$lang['htmlok'] = 'Permitir embeber HTML'; -$lang['phpok'] = 'Permitir embeber PHP'; -$lang['locktime'] = 'Idade máxima para locks (seg.)'; -$lang['cachetime'] = 'Idade máxima para cache (seg.)'; +$lang['usedraft'] = 'Salvar o rascunho automaticamente durante a edição'; +$lang['htmlok'] = 'Permitir incorporar HTML'; +$lang['phpok'] = 'Permitir incorporar PHP'; +$lang['locktime'] = 'Idade máxima para arquivos de lock (seg)'; +$lang['cachetime'] = 'Idade máxima para cache (seg)'; $lang['target____wiki'] = 'Parâmetro "target" para links internos'; $lang['target____interwiki'] = 'Parâmetro "target" para links entre wikis'; $lang['target____extern'] = 'Parâmetro "target" para links externos'; $lang['target____media'] = 'Parâmetro "target" para links de media'; $lang['target____windows'] = 'Parâmetro "target" para links do Windows'; $lang['mediarevisions'] = 'Ativar Mediarevisions?'; -$lang['refcheck'] = 'Verificação de referência da media'; +$lang['refcheck'] = 'Verificar se a mídia está em uso antes de excluí-la'; $lang['gdlib'] = 'Versão GD Lib'; $lang['im_convert'] = 'Caminho para a ferramenta "convert" do ImageMagick'; $lang['jpg_quality'] = 'Compressão/Qualidade JPG (0-100)'; -$lang['fetchsize'] = 'Tamanho máximo (bytes) que o fetch.php pode transferir do exterior'; -$lang['subscribers'] = 'Habilitar o suporte a subscrição de páginas '; -$lang['subscribe_time'] = 'Tempo após o qual as listas de subscrição e "digests" são enviados (seg.); Isto deve ser inferior ao tempo especificado em recent_days.'; -$lang['notify'] = 'Enviar notificações de mudanças para este endereço de email'; -$lang['registernotify'] = 'Enviar informações de utilizadores registados para este endereço de email'; -$lang['mailfrom'] = 'Endereço de email a ser utilizado para mensagens automáticas'; -$lang['mailprefix'] = 'Prefixo de email a ser utilizado para mensagens automáticas'; -$lang['sitemap'] = 'Gerar Sitemap Google (dias)'; +$lang['fetchsize'] = 'Tamanho máximo (bytes) que o fetch.php pode baixar de URLs externas, ex. para cache e redimensionamento de imagens externas.'; +$lang['subscribers'] = 'Habilitar o suporte a subscrição de páginas por e-mail'; +$lang['subscribe_time'] = 'Tempo após o qual as listas de subscrição e "digests" são enviados (seg); Isto deve ser inferior ao tempo especificado em recent_days.'; +$lang['notify'] = 'Sempre enviar notificações de mudanças para este endereço de e-mail'; +$lang['registernotify'] = 'Sempre enviar informações de usuários registados para este endereço de e-mail'; +$lang['mailfrom'] = 'Endereço de e-mail a ser utilizado para mensagens automáticas'; +$lang['mailreturnpath'] = 'Endereço de e-mail do destinatário para notificações não entregues'; +$lang['mailprefix'] = 'Prefixo de e-mail a ser utilizado para mensagens automáticas. Deixe em branco para usar o título do wiki'; +$lang['htmlmail'] = 'Envie e-mails multipartes em HTML para uma melhor aparência, mas maiores em tamanho. Desative para mensagens em texto simples.'; +$lang['sitemap'] = 'Gerar sitemap Google frequentemente (dias). 0 para desativar'; $lang['rss_type'] = 'Tipo de feed XML'; -$lang['rss_linkto'] = 'Links de feed XML ara'; +$lang['rss_linkto'] = 'Links de feed XML para'; $lang['rss_content'] = 'O que deve ser exibido nos itens do alimentador XML?'; -$lang['rss_update'] = 'Intervalo de actualização do alimentador XML (seg)'; -$lang['rss_show_summary'] = 'Resumo de exibição do alimentador XML no título'; -$lang['updatecheck'] = 'Verificar por actualizações e avisos de segurança? O DokuWiki precisa contactar o "splitbrain.org" para efectuar esta verificação.'; +$lang['rss_update'] = 'Intervalo de atualização do feed XML (seg)'; +$lang['rss_show_summary'] = 'Resumo de exibição do feed XML no título'; +$lang['rss_show_deleted'] = 'O feed XML mostra feeds excluídos'; +$lang['rss_media'] = 'Que tipo de alterações devem ser listadas no feed XML?'; +$lang['rss_media_o_both'] = 'ambos'; +$lang['rss_media_o_pages'] = 'páginas'; +$lang['rss_media_o_media'] = 'mídia'; +$lang['updatecheck'] = 'Verificar por atualizações e avisos de segurança? O DokuWiki precisa contactar o "splitbrain.org" para efetuar esta verificação.'; $lang['userewrite'] = 'Usar URLs SEO'; -$lang['useslash'] = 'Usar a barra como separador de espaços de nomes nas URLs'; +$lang['useslash'] = 'Usar a barra como separador de namespaces nas URLs'; $lang['sepchar'] = 'Separador de palavras no nome da página'; -$lang['canonical'] = 'Usar URLs absolutas (http://servidor/caminho)'; -$lang['fnencode'] = 'Método de codificar nomes de ficheiro não-ASCII.'; +$lang['canonical'] = 'Usar URLs absolutas'; +$lang['fnencode'] = 'Método de codificar nomes de arquivo não-ASCII.'; $lang['autoplural'] = 'Verificar formas plurais nos links'; -$lang['compression'] = 'Método de compressão para histórico'; -$lang['gzip_output'] = 'Usar "Content-Encoding" do gzip para o código xhtml'; +$lang['compression'] = 'Método de compressão para arquivos attic'; +$lang['gzip_output'] = 'Usar Content-Encoding do gzip para código xhtml'; $lang['compress'] = 'Compactar as saídas de CSS e JavaScript'; -$lang['cssdatauri'] = 'Tamanho em bytes até ao qual as imagens referenciadas em ficheiros CSS devem ser embutidas diretamente no CSS para reduzir a carga de pedidos HTTP extra. <code>400</code> a <code>600</code> bytes é um bom valor. Escolher <code>0</code> para desativar.'; -$lang['send404'] = 'Enviar "HTTP 404/Página não encontrada" para páginas não existentes'; -$lang['broken_iua'] = 'A função "ignore_user_abort" não está a funcionar no seu sistema? Isso pode causar um índice de busca defeituoso. Sistemas com IIS+PHP/CGI são conhecidos por possuírem este problema. Veja o <a href="http://bugs.splitbrain.org/?do=details&task_id=852">bug 852</a> para mais informações.'; -$lang['xsendfile'] = 'Usar o cabeçalho "X-Sendfile" para permitir o servidor de internet encaminhar ficheiros estáticos? O seu servidor de internet precisa ter suporte a isso.'; +$lang['cssdatauri'] = 'Tamanho em bytes até ao qual as imagens referenciadas em arquivos CSS devem ser embutidas diretamente no CSS para reduzir carga extra de pedidos HTTP. <code>400</code> a <code>600</code> bytes é um bom valor. Defina <code>0</code> para desativar.'; +$lang['send404'] = 'Enviar "HTTP 404/Página não encontrada" para páginas inexistentes'; +$lang['broken_iua'] = 'A função ignore_user_abort não está funcionando no seu sistema? Isso pode causar um índice de busca defeituoso. Sistemas com IIS+PHP/CGI são conhecidos por possuírem este problema. Veja o <a href="http://bugs.dokuwiki.org/?do=details&task_id=852">Bug 852</a> para mais informações.'; +$lang['xsendfile'] = 'Usar o cabeçalho X-Sendfile para permitir o servidor de internet encaminhar arquivos estáticos? O seu servidor de internet precisa ter suporte a isso.'; $lang['renderer_xhtml'] = 'Renderizador a ser utilizado para a saída principal do wiki (xhtml)'; $lang['renderer__core'] = '%s (núcleo dokuwiki)'; $lang['renderer__plugin'] = '%s (plugin)'; +$lang['search_nslimit'] = 'Limite a pesquisa aos atuais X namespaces. Quando uma pesquisa é executada a partir de uma página em um namespace mais profundo, os primeiros X namespaces serão adicionados como filtro'; +$lang['search_fragment'] = 'Especifique o comportamento de pesquisa de fragmento padrão'; +$lang['search_fragment_o_exact'] = 'exato'; +$lang['search_fragment_o_starts_with'] = 'começa com'; +$lang['search_fragment_o_ends_with'] = 'termina com'; +$lang['search_fragment_o_contains'] = 'contém'; +$lang['trustedproxy'] = 'Confie nos proxies de encaminhamento que correspondem a essa expressão regular sobre o verdadeiro IP do cliente que eles relatam. O padrão corresponde às redes locais. Deixe em branco para não confiar em proxy.'; +$lang['_feature_flags'] = 'Sinalizadores de recursos'; +$lang['defer_js'] = 'Adie a execução do javascript para depois da análise do HTML da página. Isso Melhora a velocidade da página, mas pode interromper um pequeno número de plugins.'; +$lang['dnslookups'] = 'O DokuWiki irá procurar nomes de host para endereços IP remotos de usuários editando páginas. Se você tiver um servidor DNS lento, inoperante ou não quiser esse recurso, desabilite essa opção'; +$lang['jquerycdn'] = 'Os arquivos de script jQuery e jQuery UI devem ser carregados de um CDN? Isso gera solicitações HTTP adicionais mas os arquivos são carregados mais rapidamente e os usuários já podem tê-los armazenados em cache.'; +$lang['jquerycdn_o_0'] = 'Sem CDN, somente entrega local'; +$lang['jquerycdn_o_jquery'] = 'CDN em code.jquery.com'; +$lang['jquerycdn_o_cdnjs'] = 'CDN em cdnjs.com'; $lang['proxy____host'] = 'Nome do servidor proxy'; $lang['proxy____port'] = 'Porta de Proxy'; -$lang['proxy____user'] = 'Nome de utilizador Proxy'; -$lang['proxy____pass'] = 'Password de Proxy '; +$lang['proxy____user'] = 'Nome de usuário Proxy'; +$lang['proxy____pass'] = 'Senha do Proxy '; $lang['proxy____ssl'] = 'Usar SSL para conectar ao proxy'; -$lang['proxy____except'] = 'Expressão regular para condizer URLs para os quais o proxy deve ser saltado.'; -$lang['safemodehack'] = 'Habilitar modo de segurança'; -$lang['ftp____host'] = 'Servidor FTP para o modo de segurança'; -$lang['ftp____port'] = 'Porta de FTP para o modo de segurança'; -$lang['ftp____user'] = 'Nome do utilizador FTP para o modo de segurança'; -$lang['ftp____pass'] = 'Senha do utilizador FTP para o modo de segurança'; -$lang['ftp____root'] = 'Directoria raiz do FTP para o modo de segurança'; +$lang['proxy____except'] = 'Expressão regular para bater com URLs para os quais o proxy deve ser ignorado.'; $lang['license_o_'] = 'Nenhuma escolha'; $lang['typography_o_0'] = 'nenhum'; -$lang['typography_o_1'] = 'Apenas entre aspas'; -$lang['typography_o_2'] = 'Entre aspas e apóstrofes'; +$lang['typography_o_1'] = 'excluindo aspas simples'; +$lang['typography_o_2'] = 'incluindo aspas simples (pode não funcionar sempre)'; $lang['userewrite_o_0'] = 'nenhum'; $lang['userewrite_o_1'] = '.htaccess'; -$lang['userewrite_o_2'] = 'interno (DokuWiki)'; +$lang['userewrite_o_2'] = 'DokuWiki interno'; $lang['deaccent_o_0'] = 'desligado'; $lang['deaccent_o_1'] = 'remover acentos'; $lang['deaccent_o_2'] = 'romanizar'; @@ -167,27 +192,28 @@ $lang['rss_type_o_rss1'] = 'RSS 1.0'; $lang['rss_type_o_rss2'] = 'RSS 2.0'; $lang['rss_type_o_atom'] = 'Atom 0.3'; $lang['rss_type_o_atom1'] = 'Atom 1.0'; -$lang['rss_content_o_abstract'] = 'Abstracto'; +$lang['rss_content_o_abstract'] = 'Abstrato'; $lang['rss_content_o_diff'] = 'Diferenças Unificadas'; -$lang['rss_content_o_htmldiff'] = 'Tabela de diff formatada em HTML'; +$lang['rss_content_o_htmldiff'] = 'Tabela diff formatada em HTML'; $lang['rss_content_o_html'] = 'Conteúdo completo da página em HTML'; -$lang['rss_linkto_o_diff'] = 'vista de diferenças'; +$lang['rss_linkto_o_diff'] = 'visualizar diferenças'; $lang['rss_linkto_o_page'] = 'página revista'; $lang['rss_linkto_o_rev'] = 'lista de revisões'; -$lang['rss_linkto_o_current'] = 'página actual'; -$lang['compression_o_0'] = 'Sem Compressão'; +$lang['rss_linkto_o_current'] = 'página atual'; +$lang['compression_o_0'] = 'sem compressão'; $lang['compression_o_gz'] = 'gzip'; $lang['compression_o_bz2'] = 'bz2'; $lang['xsendfile_o_0'] = 'não usar'; $lang['xsendfile_o_1'] = 'Cabeçalho proprietário lighttpd (anterior à versão 1.5)'; -$lang['xsendfile_o_2'] = 'Cabeçalho "X-Sendfile" padrão'; -$lang['xsendfile_o_3'] = 'Cabeçalho proprietário "Nginx X-Accel-Redirect"'; -$lang['showuseras_o_loginname'] = 'Nome de utilizador'; -$lang['showuseras_o_username'] = 'Nome completo do utilizador'; -$lang['showuseras_o_email'] = 'Endereço email do utilizador (ofuscado de acordo com a configuração mailguard)'; -$lang['showuseras_o_email_link'] = 'Endereço de e-mail de usuário como um link "mailto:"'; +$lang['xsendfile_o_2'] = 'Cabeçalho X-Sendfile padrão'; +$lang['xsendfile_o_3'] = 'Cabeçalho proprietário Nginx X-Accel-Redirect'; +$lang['showuseras_o_loginname'] = 'Nome de usuário'; +$lang['showuseras_o_username'] = 'Nome completo do usuário'; +$lang['showuseras_o_username_link'] = 'Nome completo do usuário como link do usuário interwiki'; +$lang['showuseras_o_email'] = 'E-mail do usuário (ofuscado de acordo com a configuração mailguard)'; +$lang['showuseras_o_email_link'] = 'E-mail do usuário como um link mailto:'; $lang['useheading_o_0'] = 'Nunca'; $lang['useheading_o_navigation'] = 'Apenas Navegação'; $lang['useheading_o_content'] = 'Apenas Conteúdo Wiki'; $lang['useheading_o_1'] = 'Sempre'; -$lang['readdircache'] = 'Idade máxima para a cache de "readdir" (seg)'; +$lang['readdircache'] = 'Idade máxima para a cache readdir (seg)'; diff --git a/lib/plugins/config/lang/ro/lang.php b/lib/plugins/config/lang/ro/lang.php index 649954de0..4df72ecba 100644 --- a/lib/plugins/config/lang/ro/lang.php +++ b/lib/plugins/config/lang/ro/lang.php @@ -4,14 +4,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Sergiu Baltariu <s_baltariu@yahoo.com> - * @author s_baltariu@yahoo.com * @author Emanuel-Emeric Andrasi <n30@mandrivausers.ro> - * @author Emanuel-Emeric Andrași <n30@mandrivausers.ro> * @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro> - * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> - * @author Marius Olar <olarmariusalex@yahoo.com> - * @author Emanuel-Emeric Andrași <em.andrasi@mandrivausers.ro> */ $lang['menu'] = 'Setări de Configurare'; $lang['error'] = 'Setări nu au fost actualizate datorită unei valori incorecte; verificaţi modificările şi încercaţi din nou. <br /> Valorile incorecte vor apărea într-un chenar roşu.'; @@ -145,12 +140,6 @@ $lang['proxy____user'] = 'Nume utilizator Proxy'; $lang['proxy____pass'] = 'Parolă Proxy'; $lang['proxy____ssl'] = 'Foloseşte SSL pentru conectare la Proxy'; $lang['proxy____except'] = 'Expresie regulară de potrivit cu URL-uri pentru care proxy-ul trebuie păsuit.'; -$lang['safemodehack'] = 'Activează safemode hack'; -$lang['ftp____host'] = 'Server FTP pentru safemode hack'; -$lang['ftp____port'] = 'Port FTP pentru safemode hack'; -$lang['ftp____user'] = 'Nume utilizator pentru safemode hack'; -$lang['ftp____pass'] = 'Parolă FTP pentru safemode hack'; -$lang['ftp____root'] = 'Director rădăcină FTP pentru safemode hack'; $lang['license_o_'] = 'Nici una aleasă'; $lang['typography_o_0'] = 'nimic'; $lang['typography_o_1'] = 'Numai ghilimele duble'; diff --git a/lib/plugins/config/lang/ru/lang.php b/lib/plugins/config/lang/ru/lang.php index 3d6914d8c..2164882dc 100644 --- a/lib/plugins/config/lang/ru/lang.php +++ b/lib/plugins/config/lang/ru/lang.php @@ -3,7 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Анатолий <anatol_m@mail.ru> * @author Yuriy Skalko <yuriy.skalko@gmail.com> + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + * @author Vyacheslav Strenadko <vyacheslav.strenadko@gmail.com> * @author Zhassulan <zyesmukanov@gmail.com> * @author Denis Simakov <akinoame1@gmail.com> * @author Andrew Pleshakov <beotiger@mail.ru> @@ -14,7 +17,6 @@ * @author Kirill Krasnov <krasnovforum@gmail.com> * @author Vlad Tsybenko <vlad.development@gmail.com> * @author Aleksey Osadchiy <rfc@nm.ru> - * @author Aleksandr Selivanov <alexgearbox@gmail.com> * @author Ladyko Andrey <fylh@succexy.spb.ru> * @author Eugene <windy.wanderer@gmail.com> * @author Johnny Utah <pcpa@cyberpunk.su> @@ -25,7 +27,7 @@ $lang['menu'] = 'Настройки вики'; $lang['error'] = 'Настройки не были сохранены из-за ошибки в одном из значений. Пожалуйста, проверьте свои изменения и попробуйте ещё раз.<br />Неправильные значения будут обведены красной рамкой.'; $lang['updated'] = 'Настройки успешно сохранены.'; $lang['nochoice'] = '(нет других вариантов)'; -$lang['locked'] = 'Файл настройки недоступен для изменения. Если это не специально, <br />убедитесь, что файл локальной настройки имеет правильное имя и права доступа.'; +$lang['locked'] = 'Файл настройки недоступен для изменения. Если это не специально,<br />убедитесь, что файл локальной настройки имеет правильное имя и права доступа.'; $lang['danger'] = 'Внимание: изменение этой опции может сделать вашу вики и меню конфигурации недоступными.'; $lang['warning'] = 'Предостережение: изменение этой опции может вызвать непредсказуемое поведение.'; $lang['security'] = 'Предостережение по безопасности: изменение этой опции может вызвать риск, связанный с безопасностью.'; @@ -47,13 +49,14 @@ $lang['_advanced'] = 'Тонкая настройка'; $lang['_network'] = 'Параметры сети'; $lang['_msg_setting_undefined'] = 'Не найдены метаданные настроек.'; $lang['_msg_setting_no_class'] = 'Не найден класс настроек.'; +$lang['_msg_setting_no_known_class'] = 'Класс настроек недоступен.'; $lang['_msg_setting_no_default'] = 'Не задано значение по умолчанию.'; -$lang['title'] = 'Название вики'; -$lang['start'] = 'Имя стартовой страницы'; -$lang['lang'] = 'Язык'; -$lang['template'] = 'Шаблон'; +$lang['title'] = 'Название (заголовок) вики'; +$lang['start'] = 'Имя страницы, используемой как стартовой в каждом пространства имён'; +$lang['lang'] = 'Язык интерфейса'; +$lang['template'] = 'Шаблон (дизайн)'; $lang['tagline'] = 'Слоган (если поддерживается шаблоном)'; -$lang['sidebar'] = 'Боковая панель; пустое поле отключает боковую панель.'; +$lang['sidebar'] = 'Боковая панель (если поддерживается шаблоном); пустое поле отключает боковую панель.'; $lang['license'] = 'На условиях какой лицензии будет предоставляться содержимое вики?'; $lang['savedir'] = 'Директория для данных'; $lang['basedir'] = 'Корневая директория (например, <code>/dokuwiki/</code>). Оставьте пустым для автоопределения.'; @@ -64,9 +67,9 @@ $lang['fmode'] = 'Права для создаваемых фа $lang['allowdebug'] = 'Включить отладку. <b>Отключите, если она вам не нужна!</b>'; $lang['recent'] = 'Недавние изменения (кол-во)'; $lang['recent_days'] = 'На сколько дней назад сохранять недавние изменения'; -$lang['breadcrumbs'] = 'Вы посетили (кол-во). Поставьте 0 (ноль) для отключения.'; +$lang['breadcrumbs'] = 'Вы посетили (количество страниц). Поставьте 0 (ноль) для отключения.'; $lang['youarehere'] = 'Показывать «Вы находитесь здесь»'; -$lang['fullpath'] = 'Полный путь к документу'; +$lang['fullpath'] = 'Полный путь к документу внизу страницы'; $lang['typography'] = 'Выполнять замену на типографские символы'; $lang['dformat'] = 'Формат даты и времени (см. функцию PHP <a href="http://php.net/strftime">strftime</a>)'; $lang['signature'] = 'Шаблон подписи'; @@ -78,7 +81,7 @@ $lang['maxseclevel'] = 'Макс. уровень для правки'; $lang['camelcase'] = 'Использовать ВикиРегистр для ссылок'; $lang['deaccent'] = 'Транслитерация в именах страниц'; $lang['useheading'] = 'Первый заголовок вместо имени страницы'; -$lang['sneaky_index'] = 'По умолчанию, «Докувики» показывает в индексе страниц все пространства имён. Включение этой опции скроет пространства имён, для которых пользователь не имеет прав чтения. Это может привести к скрытию доступных вложенных пространств имён и потере функциональности индекса страниц при некоторых конфигурациях прав доступа.'; +$lang['sneaky_index'] = 'По умолчанию, «Докувики» показывает все пространства имён на «Все страницы». Включение этой опции скроет пространства имён, для которых пользователь не имеет прав чтения. Это может привести к скрытию доступных вложенных пространств имён и потере функциональности индекса страниц при некоторых конфигурациях прав доступа.'; $lang['hidepages'] = 'Скрыть страницы (регулярное выражение)'; $lang['useacl'] = 'Использовать списки прав доступа'; $lang['autopasswd'] = 'Автогенерация паролей'; @@ -97,11 +100,11 @@ $lang['disableactions_profile_delete'] = 'Удалить свой аккаунт $lang['disableactions_other'] = 'Другие операции (через запятую)'; $lang['disableactions_rss'] = 'XML-синдикация (RSS)'; $lang['auth_security_timeout'] = 'Интервал для безопасности авторизации (сек.)'; -$lang['securecookie'] = 'Должны ли куки (cookies), выставленные через HTTPS, отправляться браузером только через HTTPS. Отключите эту опцию в случае, когда только логин вашей вики передаётся через SSL, а обычный просмотр осуществляется в небезопасном режиме.'; +$lang['securecookie'] = 'Должны ли куки (cookies), выставленные через HTTPS, отправляться браузером только через HTTPS? Отключите эту опцию в случае, когда только логин вашей вики передаётся через SSL, а обычный просмотр осуществляется в небезопасном режиме.'; $lang['remote'] = 'Включить систему API для подключений. Это позволит другим приложениям получить доступ к вики через XML-RPC или другие механизмы.'; $lang['remoteuser'] = 'Дать права для удалённого API-доступа пользователям, указанным здесь (разделяйте запятыми). Оставьте поле пустым для предоставления доступа всем.'; $lang['usewordblock'] = 'Блокировать спам по ключевым словам'; -$lang['relnofollow'] = 'Использовать rel="nofollow" для внешних ссылок'; +$lang['relnofollow'] = 'Использовать rel="ugc nofollow" для внешних ссылок'; $lang['indexdelay'] = 'Задержка перед индексированием (сек.)'; $lang['mailguard'] = 'Кодировать адреса электронной почты'; $lang['iexssprotect'] = 'Проверять закачанные файлы на наличие потенциально опасного кода JavaScript или HTML'; @@ -117,16 +120,16 @@ $lang['target____media'] = 'target для ссылок на медиафа $lang['target____windows'] = 'target для ссылок на сетевые каталоги'; $lang['mediarevisions'] = 'Включение версий медиафайлов'; $lang['refcheck'] = 'Проверять ссылки на медиафайлы'; -$lang['gdlib'] = 'Версия LibGD'; +$lang['gdlib'] = 'Версия GD Lib'; $lang['im_convert'] = 'Путь к ImageMagick'; -$lang['jpg_quality'] = 'Качество сжатия JPG (0–100). Значение по умолчанию — 70.'; +$lang['jpg_quality'] = 'Качество сжатия JPG (0–100)'; $lang['fetchsize'] = 'Максимальный размер файла (в байтах), который fetch.php может скачивать с внешнего источника'; $lang['subscribers'] = 'Разрешить подписку на изменения'; $lang['subscribe_time'] = 'Интервал рассылки подписок и сводок (сек.). Должен быть меньше, чем значение, указанное в recent_days.'; $lang['notify'] = 'Всегда отправлять сообщения об изменениях на этот электронный адрес'; -$lang['registernotify'] = 'Всегода отправлять информацию о новых зарегистрированных пользователях на этот электронный адрес'; +$lang['registernotify'] = 'Всегда отправлять информацию о новых зарегистрированных пользователях на этот электронный адрес'; $lang['mailfrom'] = 'Электронный адрес вики (От:)'; -$lang['mailreturnpath'] = 'Адрес электронной почты для доставки отчета о недоставленных сообщений'; +$lang['mailreturnpath'] = 'Адрес электронной почты для доставки отчёта о недоставленных сообщениях'; $lang['mailprefix'] = 'Префикс, используемый для автоматического письма, станет темой сообщения. Оставьте поле пустым для использования названия вики.'; $lang['htmlmail'] = 'Отправлять красивые, но более крупные HTML-письма. Отключите для отправки простых текстовых писем.'; $lang['sitemap'] = 'Число дней, через которое нужно создавать (обновлять) карту сайта для поисковиков (Гугл, Яндекс и др.). Укажите 0 (ноль) для отключения.'; @@ -135,6 +138,7 @@ $lang['rss_linkto'] = 'Ссылки в XML-ленте указыва $lang['rss_content'] = 'Что показывать в XML-ленте?'; $lang['rss_update'] = 'Интервал обновления XML-ленты (сек.)'; $lang['rss_show_summary'] = 'Показывать краткую выдержку в заголовках XML-ленты'; +$lang['rss_show_deleted'] = 'XML feed Показать удаленные каналы'; $lang['rss_media'] = 'Какие изменения должны быть отображены в XML-ленте?'; $lang['rss_media_o_both'] = 'оба'; $lang['rss_media_o_pages'] = 'страницы'; @@ -149,17 +153,22 @@ $lang['autoplural'] = 'Проверять можественную ф $lang['compression'] = 'Метод сжатия для архивных файлов'; $lang['gzip_output'] = 'Использовать gzip-сжатие для xhtml (Content-Encoding)'; $lang['compress'] = 'Сжимать файлы CSS и javascript'; -$lang['cssdatauri'] = 'Размер в байтах, до которого изображения, указанные в CSS-файлах, должны быть встроены прямо в таблицу стилей, для уменьшения избыточных HTTP-запросов. Этот метод не будет работать в IE версии 7 и ниже! Установка от <code>400</code> до <code>600</code> байт является хорошим показателем. Установите <code>0</code>, чтобы отключить.'; +$lang['cssdatauri'] = 'Размер в байтах, до которого изображения, указанные в CSS-файлах, должны быть встроены прямо в таблицу стилей для уменьшения избыточных HTTP-запросов. Значение между <code>400</code> и <code>600</code> байт является хорошим. Укажите <code>0</code>, чтобы отключить.'; $lang['send404'] = 'Посылать «HTTP 404/Страница не найдена» для несуществующих страниц'; $lang['broken_iua'] = 'Возможно, функция ignore_user_abort не работает в вашей системе? Это может привести к потере функциональности индексирования поиска. Эта проблема присутствует, например, в IIS+PHP/CGI. Для дополнительной информации смотрите <a href="http://bugs.splitbrain.org/?do=details&task_id=852">баг 852</a>.'; $lang['xsendfile'] = 'Используете заголовок X-Sendfile для загрузки файлов на веб-сервер? Ваш веб-сервер должен поддерживать это.'; $lang['renderer_xhtml'] = 'Обработчик основного (xhtml) вывода вики'; $lang['renderer__core'] = '%s (ядро «Докувики»)'; $lang['renderer__plugin'] = '%s (плагин)'; +$lang['search_nslimit'] = 'Ограничить поиск текущими пространствами имён X. Когда поиск выполняется со страницы в более глубоком пространстве имён, первые X-пространства имен будут добавлены в качестве фильтра.'; +$lang['search_fragment'] = 'Укажите поведение поиска фрагмента по умолчанию'; $lang['search_fragment_o_exact'] = 'точно'; $lang['search_fragment_o_starts_with'] = 'начинается на'; $lang['search_fragment_o_ends_with'] = 'заканчивается'; $lang['search_fragment_o_contains'] = 'содержит'; +$lang['trustedproxy'] = 'Доверять прокси-серверам, соответствующим этому регулярному выражению, в отношении реального IP-адреса клиента, который они сообщают. Значение по умолчанию соответствует локальным сетям. Оставьте пустым, чтобы не доверять никаким прокси-серверам.'; +$lang['_feature_flags'] = 'Флаги функций'; +$lang['defer_js'] = 'Отложено выполнение javascript после анализа HTML-кода страницы. Улучшает воспринимаемую скорость страницы, но может нарушить работу небольшого количества плагинов.'; $lang['dnslookups'] = '«Докувики» ищет DNS-имена пользователей, редактирующих страницы. Если у вас нет DNS-сервера или он работает медленно, рекомендуем отключить эту опцию.'; $lang['jquerycdn'] = 'Требуется ли загрузка jQuery-скриптов (включая jQuery UI-скрипты) из CDN сети? Данная функция увеличивает количество HTTP запросов, но загрузка файлов будет проходить быстрее и пользователи смогут кэшировать запросы.'; $lang['jquerycdn_o_0'] = 'Не использовать CDN. Использовать только локальную доставку'; @@ -171,12 +180,6 @@ $lang['proxy____user'] = 'proxy-имя пользователя'; $lang['proxy____pass'] = 'proxy-пароль'; $lang['proxy____ssl'] = 'Использовать SSL для соединения с прокси'; $lang['proxy____except'] = 'Регулярное выражение для адресов (URL), для которых прокси должен быть пропущен.'; -$lang['safemodehack'] = 'Включить обход safemode (хак)'; -$lang['ftp____host'] = 'ftp-адрес'; -$lang['ftp____port'] = 'ftp-порт'; -$lang['ftp____user'] = 'ftp-имя пользователя'; -$lang['ftp____pass'] = 'ftp-пароль'; -$lang['ftp____root'] = 'ftp-корневая директория'; $lang['license_o_'] = 'Не выбрано'; $lang['typography_o_0'] = 'нет'; $lang['typography_o_1'] = 'только двойные кавычки'; diff --git a/lib/plugins/config/lang/sk/lang.php b/lib/plugins/config/lang/sk/lang.php index 79054aaea..c69605dad 100644 --- a/lib/plugins/config/lang/sk/lang.php +++ b/lib/plugins/config/lang/sk/lang.php @@ -3,7 +3,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Peter Mydliar <peto.mydliar@gmail.com> * @author Martin Michalek <michalek.dev@gmail.com> + * @author Tibor Repček <tiborepcek@gmail.com> * @author Michal Mesko <michal.mesko@gmail.com> * @author exusik <exusik@gmail.com> */ @@ -80,7 +82,9 @@ $lang['disableactions'] = 'Zakázať DokuWiki akcie'; $lang['disableactions_check'] = 'Skontrolovať'; $lang['disableactions_subscription'] = 'Povoliť/Zrušiť informovanie o zmenách stránky'; $lang['disableactions_wikicode'] = 'Pozrieť zdroj/Exportovať zdroj'; +$lang['disableactions_profile_delete'] = 'Zrušenie vlastného účtu'; $lang['disableactions_other'] = 'Iné akcie (oddelené čiarkou)'; +$lang['disableactions_rss'] = 'RSS'; $lang['auth_security_timeout'] = 'Časový limit pri prihlasovaní (v sekundách)'; $lang['securecookie'] = 'Mal by prehliadač posielať cookies nastavené cez HTTPS posielať iba cez HTTPS (bezpečné) pripojenie? Vypnite túto voľbu iba v prípade, ak je prihlasovanie do Vašej wiki zabezpečené SSL, ale prezeranie wiki je nezabezpečené.'; $lang['remote'] = 'Povolenie vzdialeného API. Umožnuje iným aplikáciám pristupovať k wiki cez XML-RPC alebo iným spôsobom.'; @@ -120,6 +124,9 @@ $lang['rss_content'] = 'Čo zobrazovať v XML feede?'; $lang['rss_update'] = 'Časový interval obnovy XML feedu (sek.)'; $lang['rss_show_summary'] = 'XML zdroj ukáže prehľad v názve'; $lang['rss_media'] = 'Aký typ zmien by mal byť zobrazený v XML feede?'; +$lang['rss_media_o_both'] = 'oboje'; +$lang['rss_media_o_pages'] = 'strany'; +$lang['rss_media_o_media'] = 'média'; $lang['updatecheck'] = 'Kontrolovať aktualizácie a bezpečnostné upozornenia? DokuWiki potrebuje pre túto funkciu prístup k update.dokuwiki.org.'; $lang['userewrite'] = 'Používať nice URLs'; $lang['useslash'] = 'Používať lomku (/) ako oddeľovač v URL'; @@ -137,6 +144,10 @@ $lang['xsendfile'] = 'Používať X-Sendfile hlavičku pre doručeni $lang['renderer_xhtml'] = 'Používané vykresľovacie jadro pre hlavný (xhtml) wiki výstup'; $lang['renderer__core'] = '%s (dokuwiki jadro)'; $lang['renderer__plugin'] = '%s (plugin)'; +$lang['search_fragment_o_exact'] = 'presne'; +$lang['search_fragment_o_starts_with'] = 'začína s'; +$lang['search_fragment_o_ends_with'] = 'končí na'; +$lang['search_fragment_o_contains'] = 'obsahuje'; $lang['dnslookups'] = 'DokuWiki hľadá mená vzdialených IP adries používateľov editujúcich stránky. Ak máte pomalý alebo nefunkčný DNS server alebo nechcete túto možnosť, deaktivujte túto voľbu'; $lang['jquerycdn'] = 'Mali by byť jQuery a jQuery UI skripty načítané z CDN? Voľba zvýši počet dodatočných HTTP požiadaviek, ale súbory sa môžu načítať rýchlejšie a používatelia ich už môžu mať vo vyrovnávacej pamäti.'; $lang['jquerycdn_o_0'] = 'Nepoužívať CDN, iba lokálne súbory'; @@ -148,12 +159,6 @@ $lang['proxy____user'] = 'Proxy server - používateľské meno'; $lang['proxy____pass'] = 'Proxy server - heslo'; $lang['proxy____ssl'] = 'Proxy server - použiť SSL'; $lang['proxy____except'] = 'Regulárny výraz popisujúci URL odkazy, pre ktoré by proxy nemala byť použitá.'; -$lang['safemodehack'] = 'Povoliť "safemode hack"'; -$lang['ftp____host'] = 'FTP server pre "safemode hack"'; -$lang['ftp____port'] = 'FTP port pre "safemode hack"'; -$lang['ftp____user'] = 'FTP používateľ pre "safemode hack"'; -$lang['ftp____pass'] = 'FTP heslo pre "safemode hack"'; -$lang['ftp____root'] = 'FTP hlavný adresár pre "safemode hack"'; $lang['license_o_'] = 'žiadna'; $lang['typography_o_0'] = 'žiadne'; $lang['typography_o_1'] = 'okrem jednoduchých úvodzoviek'; diff --git a/lib/plugins/config/lang/sl/lang.php b/lib/plugins/config/lang/sl/lang.php index 7db4b4b34..270a5a480 100644 --- a/lib/plugins/config/lang/sl/lang.php +++ b/lib/plugins/config/lang/sl/lang.php @@ -139,12 +139,6 @@ $lang['proxy____user'] = 'Uporabniško ime posredniškega strežnika'; $lang['proxy____pass'] = 'Geslo posredniškega strežnika'; $lang['proxy____ssl'] = 'Uporabi varno povezavo SSL za povezavo z posredniškim strežnikom'; $lang['proxy____except'] = 'Logični izrazi morajo biti skladni z naslovi URL, ki gredo mimo posredniškega strežnika.'; -$lang['safemodehack'] = 'Omogoči obhod načina SafeMode PHP'; -$lang['ftp____host'] = 'Strežnik FTP za obhod načina SafeMode'; -$lang['ftp____port'] = 'Vrata strežnika FTP za obhod načina SafeMode'; -$lang['ftp____user'] = 'Uporabniško ime za FTP za obhod načina SafeMode'; -$lang['ftp____pass'] = 'Geslo za strežnik FTP za obhod načina SafeMode'; -$lang['ftp____root'] = 'Korenska mapa FTP za obhod načina SafeMode'; $lang['license_o_'] = 'Ni izbranega dovoljenja'; $lang['typography_o_0'] = 'brez'; $lang['typography_o_1'] = 'izloči enojne narekovaje'; diff --git a/lib/plugins/config/lang/sq/lang.php b/lib/plugins/config/lang/sq/lang.php index 72c500a49..c231b54ab 100644 --- a/lib/plugins/config/lang/sq/lang.php +++ b/lib/plugins/config/lang/sq/lang.php @@ -126,12 +126,6 @@ $lang['proxy____port'] = 'Porta e proxy-t'; $lang['proxy____user'] = 'Emri i përdoruesit për proxy-n'; $lang['proxy____pass'] = 'Fjalëkalimi proxy-t'; $lang['proxy____ssl'] = 'Përdor SSL për tu lidhur me proxy-n'; -$lang['safemodehack'] = 'Aktivizo hack në safemode'; -$lang['ftp____host'] = 'Server FTP për safemode hack'; -$lang['ftp____port'] = 'Porta FTP për safemode hack'; -$lang['ftp____user'] = 'Emri përdoruesit për safemode hack'; -$lang['ftp____pass'] = 'Fjalëkalimi FTP për safemode hack'; -$lang['ftp____root'] = 'Direktoria rrënjë për safemode hack'; $lang['license_o_'] = 'Nuk u zgjodh asgjë'; $lang['typography_o_0'] = 'Asgjë'; $lang['typography_o_1'] = 'përjashtim i thonjëzave teke'; diff --git a/lib/plugins/config/lang/sr/lang.php b/lib/plugins/config/lang/sr/lang.php index e8f3b8335..4e5e94871 100644 --- a/lib/plugins/config/lang/sr/lang.php +++ b/lib/plugins/config/lang/sr/lang.php @@ -3,8 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Иван Петровић petrovicivan@ubuntusrbija.org - * @author Ivan Petrovic <petrovicivan@ubuntusrbija.org> + * @author Иван Петровић <petrovicivan@ubuntusrbija.org> * @author Miroslav Šolti <solti.miroslav@gmail.com> * @author Марко М. Костић <marko.m.kostic@gmail.com> */ @@ -134,12 +133,6 @@ $lang['proxy____user'] = 'Корисничко име на посред $lang['proxy____pass'] = 'Лозинка на посреднику (проксију)'; $lang['proxy____ssl'] = 'Користи ССЛ за повезивање са посредником (проксијем)'; $lang['proxy____except'] = 'Редован израз који би требало да се подудара са веб адресом странице за коју треба прескочити посредника (прокси).'; -$lang['safemodehack'] = 'Укључи преправку за безбедни режим'; -$lang['ftp____host'] = 'ФТП сервер за безбедни режим'; -$lang['ftp____port'] = 'ФТП порт за безбедни режим'; -$lang['ftp____user'] = 'ФТП корисничко име за безбедни режим'; -$lang['ftp____pass'] = 'ФТП лозинка за безбедни режим'; -$lang['ftp____root'] = 'ФТП основна фасцикла за безбедни режим'; $lang['license_o_'] = 'Није одабрано'; $lang['typography_o_0'] = 'не'; $lang['typography_o_1'] = 'Само дупли наводници'; diff --git a/lib/plugins/config/lang/sv/lang.php b/lib/plugins/config/lang/sv/lang.php index 268cc364e..6631f109a 100644 --- a/lib/plugins/config/lang/sv/lang.php +++ b/lib/plugins/config/lang/sv/lang.php @@ -146,12 +146,6 @@ $lang['proxy____user'] = 'Användarnamn för proxy'; $lang['proxy____pass'] = 'Lösenord för proxy'; $lang['proxy____ssl'] = 'Använd ssl för anslutning till proxy'; $lang['proxy____except'] = 'Regular expression för matchning av URL som proxy ska hoppa över.'; -$lang['safemodehack'] = 'Aktivera safemode hack'; -$lang['ftp____host'] = 'FTP-server för safemode hack'; -$lang['ftp____port'] = 'FTP-port för safemode hack'; -$lang['ftp____user'] = 'FTP-användarnamn för safemode hack'; -$lang['ftp____pass'] = 'FTP-lösenord för safemode hack'; -$lang['ftp____root'] = 'FTP-rotkatalog för safemode hack'; $lang['license_o_'] = 'Ingen vald'; $lang['typography_o_0'] = 'Inga'; $lang['typography_o_1'] = 'enbart dubbla citattecken'; diff --git a/lib/plugins/config/lang/th/lang.php b/lib/plugins/config/lang/th/lang.php index ce1d30d62..8d9e73439 100644 --- a/lib/plugins/config/lang/th/lang.php +++ b/lib/plugins/config/lang/th/lang.php @@ -2,11 +2,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Komgrit Niyomrath <n.komgrit@gmail.com> - * @author Kittithat Arnontavilas mrtomyum@gmail.com - * @author Arthit Suriyawongkul <arthit@gmail.com> * @author Kittithat Arnontavilas <mrtomyum@gmail.com> + * @author Arthit Suriyawongkul <arthit@gmail.com> * @author Thanasak Sompaisansin <jombthep@gmail.com> */ $lang['menu'] = 'ตั้งค่าการปรับแต่ง'; diff --git a/lib/plugins/config/lang/tr/lang.php b/lib/plugins/config/lang/tr/lang.php index 3e83d45a6..d86455d1f 100644 --- a/lib/plugins/config/lang/tr/lang.php +++ b/lib/plugins/config/lang/tr/lang.php @@ -2,12 +2,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Hakan <hakandursun2009@gmail.com> + * @author mahir <mahirtakak@gmail.com> * @author Aydın Coşkuner <aydinweb@gmail.com> * @author Cihan Kahveci <kahvecicihan@gmail.com> * @author Yavuz Selim <yavuzselim@gmail.com> * @author Caleb Maclennan <caleb@alerque.com> - * @author farukerdemoncel@gmail.com + * @author farukerdemoncel <farukerdemoncel@gmail.com> * @author Mete Cuma <mcumax@gmail.com> */ $lang['menu'] = 'Site Ayarları'; @@ -93,10 +95,6 @@ $lang['proxy____host'] = 'Proxy sunucu adı'; $lang['proxy____user'] = 'Proxy kullanıcı adı'; $lang['proxy____pass'] = 'Proxy şifresi'; $lang['proxy____ssl'] = 'Proxy ile bağlanırken ssl kullan'; -$lang['safemodehack'] = 'Safemod hackını etkili kıl'; -$lang['ftp____host'] = 'Safemod hackı için kullanılacak FTP suncusu'; -$lang['ftp____user'] = 'Safemod hackı için kullanılacak FTP kullanıcı adı'; -$lang['ftp____pass'] = 'Safemod hackı için kullanılacak FTP parolası'; $lang['license_o_'] = 'Seçilmedi'; $lang['typography_o_0'] = 'Yok'; $lang['userewrite_o_0'] = 'hiçbiri'; diff --git a/lib/plugins/config/lang/uk/lang.php b/lib/plugins/config/lang/uk/lang.php index d8b1d5b04..01e9202cd 100644 --- a/lib/plugins/config/lang/uk/lang.php +++ b/lib/plugins/config/lang/uk/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author velmyshanovnyi <velmyshanovnyi@gmail.com> + * @author Dmytro Marchenko <dmytro.marchenko1989@gmail.com> * @author Oleksii <alexey.furashev@gmail.com> * @author Vitaly <vitaly.balashov@smuzzy.com.ua> * @author Oleksiy Voronin <ovoronin@gmail.com> @@ -117,6 +119,8 @@ $lang['rss_linkto'] = 'посилання в RSS'; $lang['rss_content'] = 'Що відображати в пунктах XML-feed'; $lang['rss_update'] = 'Інтервал оновлення RSS (сек)'; $lang['rss_show_summary'] = 'Показувати підсумки змін в заголовку XML-feed'; +$lang['rss_media_o_both'] = 'обидва'; +$lang['rss_media_o_pages'] = 'сторінки'; $lang['updatecheck'] = 'Перевірити наявність оновлень чи попереджень безпеки? Для цього ДокуВікі необхідно зв\'язатися зі update.dokuwiki.org.'; $lang['userewrite'] = 'Красиві URL'; $lang['useslash'] = 'Слеш, як розділювач просторів імен в URL'; @@ -133,18 +137,13 @@ $lang['xsendfile'] = 'Використовувати заголов $lang['renderer_xhtml'] = 'Транслятор (Renderer) для основного виводу wiki (xhtml)'; $lang['renderer__core'] = '%s (ядро докуВікі)'; $lang['renderer__plugin'] = '%s (доданок)'; +$lang['search_fragment_o_exact'] = 'точно'; $lang['proxy____host'] = 'Адреса Proxy'; $lang['proxy____port'] = 'Порт Proxy'; $lang['proxy____user'] = 'Користувач Proxy'; $lang['proxy____pass'] = 'Пароль Proxy'; $lang['proxy____ssl'] = 'Використовувати ssl для з\'єднання з Proxy'; $lang['proxy____except'] = 'Регулярний вираз для веб-адреси, яку проксі-сервер пропустить.'; -$lang['safemodehack'] = 'Увімкнути хак safemode'; -$lang['ftp____host'] = 'FTP-сервер для хаку safemode'; -$lang['ftp____port'] = 'FTP-порт для хаку safemode'; -$lang['ftp____user'] = 'Користувач FTP для хаку safemode'; -$lang['ftp____pass'] = 'Пароль FTP для хаку safemode'; -$lang['ftp____root'] = 'Коренева папка FTP для хаку safemode'; $lang['license_o_'] = 'не вибрано'; $lang['typography_o_0'] = 'жодного'; $lang['typography_o_1'] = 'Лише подвійні лапки'; diff --git a/lib/plugins/config/lang/vi/intro.txt b/lib/plugins/config/lang/vi/intro.txt new file mode 100644 index 000000000..5851cec21 --- /dev/null +++ b/lib/plugins/config/lang/vi/intro.txt @@ -0,0 +1,7 @@ +====== Quản lý cấu hình ====== + +Sử dụng trang này để kiểm soát cài đặt cho trình cài đặt DokuWiki của bạn. Để được trợ giúp về cài đặt cá nhân, hãy tham khảo [[doku>config]]. Để biết thêm chi tiết về plugin này, xem [[doku>plugin:config]]. + +Các cài đặt hiển thị với nền đỏ nhạt được bảo vệ và không thể thay đổi bằng plugin này. Các cài đặt hiển thị với nền màu xanh là các giá trị mặc định và cài đặt được hiển thị với nền trắng đã được đặt cục bộ cho cài đặt cụ thể này. Cả hai cài đặt màu xanh và trắng có thể được thay đổi. + +Hãy nhớ nhấn nút **Lưu** trước khi rời trang này nếu không các thay đổi của bạn sẽ bị mất.
\ No newline at end of file diff --git a/lib/plugins/config/lang/vi/lang.php b/lib/plugins/config/lang/vi/lang.php new file mode 100644 index 000000000..e152918c8 --- /dev/null +++ b/lib/plugins/config/lang/vi/lang.php @@ -0,0 +1,198 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['menu'] = 'Thiết lập cấu hình'; +$lang['error'] = 'Không thể cập nhật cài đặt do giá trị không hợp lệ, vui lòng xem lại các thay đổi của bạn và gửi lại.'; +$lang['updated'] = 'Đã cập nhật cài đặt thành công .'; +$lang['nochoice'] = '(không có lựa chọn nào khác)'; +$lang['locked'] = 'Không thể cập nhật tập tin cài đặt, nếu điều này là vô ý, <br /> + đảm bảo tên tập tin cài đặt cục bộ và quyền là chính xác.'; +$lang['danger'] = 'Nguy hiểm: Thay đổi tùy chọn này có thể khiến wiki và menu cấu hình của bạn không thể truy cập được.'; +$lang['warning'] = 'Cảnh báo: Thay đổi tùy chọn này có thể gây ra hành vi ngoài ý muốn.'; +$lang['security'] = 'Cảnh báo bảo mật: Thay đổi tùy chọn này có thể gây rủi ro bảo mật.'; +$lang['_configuration_manager'] = 'Quản lý cấu hình'; +$lang['_header_template'] = 'Chủ đề'; +$lang['_header_undefined'] = 'Cài đặt không xác định'; +$lang['_basic'] = 'Cơ bản'; +$lang['_display'] = 'Hiển thị'; +$lang['_authentication'] = 'Xác thực'; +$lang['_editing'] = 'Sửa đổi'; +$lang['_links'] = 'Liên kết'; +$lang['_media'] = 'Phương tiện'; +$lang['_notifications'] = 'Thông báo'; +$lang['_syndication'] = 'Đồng bộ (RSS)'; +$lang['_advanced'] = 'Nâng cao'; +$lang['_network'] = 'Mạng'; +$lang['_msg_setting_undefined'] = 'Không có cài đặt siêu dữ liệu.'; +$lang['_msg_setting_no_class'] = 'Không có lớp thiết lập.'; +$lang['_msg_setting_no_known_class'] = 'Lớp thiết lập không có sẵn.'; +$lang['_msg_setting_no_default'] = 'Không có giá trị mặc định.'; +$lang['title'] = 'Tiêu đề Wiki (tên wiki của bạn)'; +$lang['start'] = 'Tên trang sử dụng làm điểm bắt đầu cho mỗi không gian tên'; +$lang['lang'] = 'Ngôn ngữ giao diện'; +$lang['template'] = 'Chủ đề (thiết kế của wiki)'; +$lang['tagline'] = 'Tagline (nếu chủ đề hỗ trợ)'; +$lang['sidebar'] = 'Tên trang thanh bên (nếu chủ đề hỗ trợ), để trống sẽ vô hiệu hóa thanh bên'; +$lang['license'] = 'Nội dung của bạn nên được phát hành dưới?'; +$lang['savedir'] = 'Đường dẫn lưu dữ liệu'; +$lang['basedir'] = 'Đường dẫn máy chủ (eg. <code>/dokuwiki/</code>). Để trống để tự động phát hiện.'; +$lang['baseurl'] = 'URL máy chủ (eg. <code>http://www.yourserver.com</code>). Để trống để tự động phát hiện.'; +$lang['cookiedir'] = 'Đường dẫn cookie. Để trống để sử dụng baseurl.'; +$lang['dmode'] = 'Chế độ tạo đường dẫn'; +$lang['fmode'] = 'Chế độ tạo tập tin'; +$lang['allowdebug'] = 'Cho phép gỡ lỗi. <b>Vô hiệu hóa nếu không cần thiết!</ b>'; +$lang['recent'] = 'Số lượng mục trên mỗi trang trong thay đổi gần đây'; +$lang['recent_days'] = 'Có bao nhiêu thay đổi gần đây được giữ (ngày)'; +$lang['breadcrumbs'] = 'Số lượng thanh điều hướng "Trang đã xem". Đặt thành 0 để vô hiệu.'; +$lang['youarehere'] = 'Sử dụng thanh điều hướng phân cấp (có thể bạn muốn tắt tùy chọn ở trên)'; +$lang['fullpath'] = 'Hiển thị đường dẫn đầy đủ của trang trong phần chân trang'; +$lang['typography'] = 'Thay thế đánh máy'; +$lang['dformat'] = 'Định dạng ngày (xem chức năng <a href="http://php.net/strftime">strftime</a> của PHP)'; +$lang['signature'] = 'Nội dung nhập vào khi nhấn nút chữ ký trong trình sửa đổi'; +$lang['showuseras'] = 'Nội dung hiển thị khi xem thành viên cuối cùng sửa đổi trang'; +$lang['toptoclevel'] = 'Cấp cao nhất cho mục lục'; +$lang['tocminheads'] = 'Số lượng đầu đề tối thiểu cần thiết để xây dựng bảng mục lục'; +$lang['maxtoclevel'] = 'Cấp tối đa cho bảng mục lục'; +$lang['maxseclevel'] = 'Cấp tối đa cho phần mục sửa đổi'; +$lang['camelcase'] = 'Sử dụng CamelCase cho các liên kết'; +$lang['deaccent'] = 'Cách làm sạch tên trang'; +$lang['useheading'] = 'Sử dụng đầu đề đầu tiên làm tên trang'; +$lang['sneaky_index'] = 'Theo mặc định, DokuWiki sẽ hiển thị tất cả các không gian tên trong sơ đồ trang web. Bật tùy chọn này sẽ ẩn những nơi mà thành viên không có quyền đọc. Điều này có thể dẫn đến việc ẩn các không gian tên con có thể truy cập, có thể làm cho chỉ mục không thể sử dụng được với các thiết lập ACL nhất định.'; +$lang['hidepages'] = 'Ẩn các trang khớp với biểu thức chính quy này khỏi tìm kiếm, sơ đồ trang web và các chỉ mục tự động khác'; +$lang['useacl'] = 'Sử dụng danh sách kiểm soát truy cập'; +$lang['autopasswd'] = 'Tự động tạo mật khẩu'; +$lang['authtype'] = 'Xác thực phụ trợ'; +$lang['passcrypt'] = 'Phương thức mã hóa mật khẩu'; +$lang['defaultgroup'] = 'Nhóm mặc định, tất cả thành viên mới sẽ được đặt trong nhóm này'; +$lang['superuser'] = 'Siêu thành viên - danh sách được phân tách bằng nhóm, thành viên hoặc dấu phẩy user1,@group1,user2 có toàn quyền truy cập vào tất cả các trang và chức năng bất kể cài đặt ACL'; +$lang['manager'] = 'Quản lý - nhóm, thành viên hoặc danh sách được phân tách bằng dấu phẩy user1,@group1,user2 có quyền truy cập vào một số chức năng quản lý'; +$lang['profileconfirm'] = 'Xác nhận thay đổi hồ sơ bằng mật khẩu'; +$lang['rememberme'] = 'Cho phép cookie đăng nhập vĩnh viễn (nhớ tôi)'; +$lang['disableactions'] = 'Vô hiệu hóa hành động DokuWiki'; +$lang['disableactions_check'] = 'Kiểm tra'; +$lang['disableactions_subscription'] = 'Đăng ký/Hủy đăng ký'; +$lang['disableactions_wikicode'] = 'Xem mã nguồn/Xuất Raw'; +$lang['disableactions_profile_delete'] = 'Xóa tài khoản riêng'; +$lang['disableactions_other'] = 'Hành động khác (được phân tách bằng dấu phẩy)'; +$lang['disableactions_rss'] = 'Đồng bộ XML (RSS)'; +$lang['auth_security_timeout'] = 'Thời gian chờ bảo mật xác thực (giây)'; +$lang['securecookie'] = 'Có nên gửi cookie qua HTTPS qua trình duyệt HTTPS không? Vô hiệu hóa tùy chọn này khi chỉ đăng nhập wiki của bạn được bảo mật bằng SSL nhưng việc duyệt wiki được thực hiện không bảo mật.'; +$lang['remote'] = 'Kích hoạt hệ thống API từ xa. Cho phép các ứng dụng khác truy cập wiki thông qua XML-RPC hoặc các cơ chế khác.'; +$lang['remoteuser'] = 'Hạn chế quyền truy cập API từ xa đối với các nhóm hoặc thành viên được phân tách bằng dấu phẩy ở đây. Để trống để cho phép mọi người truy cập.'; +$lang['usewordblock'] = 'Chặn thư rác dựa trên danh sách từ'; +$lang['relnofollow'] = 'Dùng rel="ugc nofollow" cho liên kết ngoài'; +$lang['indexdelay'] = 'Thời gian trễ trước khi lập chỉ mục (giây)'; +$lang['mailguard'] = 'Làm xáo trộn địa chỉ thư điện tử'; +$lang['iexssprotect'] = 'Kiểm tra các tệp đã tải lên có thể có mã JavaScript hoặc HTML độc hại'; +$lang['usedraft'] = 'Tự động lưu bản nháp trong khi đang sửa đổi'; +$lang['htmlok'] = 'Cho phép nhúng HTML'; +$lang['phpok'] = 'Cho phép nhúng PHP'; +$lang['locktime'] = 'Thời gian tối đa cho các tệp khóa (giây)'; +$lang['cachetime'] = 'Thời gian tối đa cho bộ đệm (giây)'; +$lang['target____wiki'] = 'Cửa sổ đích cho các liên kết nội bộ'; +$lang['target____interwiki'] = 'Cửa sổ đích cho các liên kết liên wiki'; +$lang['target____extern'] = 'Cửa sổ đích cho các liên kết ngoài'; +$lang['target____media'] = 'Cửa sổ đích cho các liên kết phương tiên'; +$lang['target____windows'] = 'Cửa sổ đích cho các liên kết cửa sổ'; +$lang['mediarevisions'] = 'Kích hoạt Mediarevisions?'; +$lang['refcheck'] = 'Kiểm tra tệp phương tiện vẫn đang được sử dụng không trước khi xóa nó'; +$lang['gdlib'] = 'Phiên bản GD Lib'; +$lang['im_convert'] = 'Đường dẫn đến công cụ chuyển đổi của ImageMagick'; +$lang['jpg_quality'] = 'Chất lượng nén JPEG (0-100)'; +$lang['fetchsize'] = 'Kích thước tối đa (byte) fetch.php có thể tải xuống từ các URL bên ngoài, ví dụ: để lưu trữ và thay đổi kích thước hình ảnh bên ngoài.'; +$lang['subscribers'] = 'Cho phép thành viên đăng ký thay đổi trang bằng thư điện tử'; +$lang['subscribe_time'] = 'Thời gian danh sách đăng ký và thông báo được gửi (giây); Thời gian này phải nhỏ hơn thời gian được chỉ định trong recent_days.'; +$lang['notify'] = 'Luôn gửi thông báo thay đổi đến địa chỉ thư điện tử này'; +$lang['registernotify'] = 'Luôn gửi thông tin về thành viên mới đăng ký đến địa chỉ thư điện tử này'; +$lang['mailfrom'] = 'Đia chỉ thư điện tử người gửi sử dụng cho thư tự động'; +$lang['mailreturnpath'] = 'Địa chỉ thư điện tử người nhận cho thông báo không cung cấp'; +$lang['mailprefix'] = 'Tiền tố chủ đề thư điện tử sử dụng cho thư tự động. Để trống nếu muốn sử dụng tiêu đề wiki'; +$lang['htmlmail'] = 'Gửi tìm kiếm tốt hơn, nhưng kích thước lớn hơn thư điện tử HTML nhiều phần. Vô hiệu hóa cho các văn bản đơn thuần chỉ thư.'; +$lang['sitemap'] = 'Tạo sơ đồ trang web của Google này thường xuyên (tính theo ngày). Đặt thành 0 để vô hiệu'; +$lang['rss_type'] = 'Loại nguồn cấp dữ liệu XML'; +$lang['rss_linkto'] = 'Liên kết đến nguồn cấp dữ liệu XML '; +$lang['rss_content'] = 'Hiển thị gì trong các mục nguồn cấp dữ liệu XML?'; +$lang['rss_update'] = 'Khoảng thời gian cập nhật nguồn cấp dữ liệu XML (giây)'; +$lang['rss_show_summary'] = 'Tóm tắt nguồn cấp dữ liệu XML trong tiêu đề'; +$lang['rss_show_deleted'] = 'Hiển thị nguồn cấp dữ liệu XML đã xóa'; +$lang['rss_media'] = 'Loại thay đổi nào sẽ được liệt kê trong nguồn cấp dữ liệu XML?'; +$lang['rss_media_o_both'] = 'cả hai'; +$lang['rss_media_o_pages'] = 'trang'; +$lang['rss_media_o_media'] = 'phương tiện'; +$lang['updatecheck'] = 'Kiểm tra cập nhật và cảnh báo bảo mật? DokuWiki cần kết nối với update.dokuwiki.org để sử dụng tính năng này.'; +$lang['userewrite'] = 'Sử dụng URL đẹp'; +$lang['useslash'] = 'Sử dụng dấu gạch chéo làm dấu phân cách không gian tên trong URL'; +$lang['sepchar'] = 'Phân cách từ trong tên trang'; +$lang['canonical'] = 'Sử dụng URL hoàn toàn kinh điển'; +$lang['fnencode'] = 'Phương pháp mã hóa tên tập tin không phải ASCII.'; +$lang['autoplural'] = 'Kiểm tra các hình thức số nhiều trong các liên kết'; +$lang['compression'] = 'Phương pháp nén cho các tập tin attic '; +$lang['gzip_output'] = 'Sử dụng mã hóa nội dung gzip cho xhtml'; +$lang['compress'] = 'Đầu ra CSS và javascript nhỏ gọn'; +$lang['cssdatauri'] = 'Kích thước tính theo byte mà hình ảnh được tham chiếu trong tập tin CSS phải được nhúng ngay vào biểu định kiểu để giảm chi phí đầu đề yêu cầu HTTP. <code>400</code> đến <code>600</code> bytes làm các giá trị tốt. Đặt thành <code>0</code> để vô hiệu.'; +$lang['send404'] = 'Gửi "HTTP 404/Không tìm thấy trang" cho các trang không tồn tại'; +$lang['broken_iua'] = 'Chức năng ign_user_abort có bị hỏng trên hệ thống của bạn không? Điều này có thể khiến chỉ mục tìm kiếm không hoạt động. IIS + PHP/CGI được biết sẽ bị hỏng. Xem <a href="http://bugs.dokuwiki.org/?do=details&task_id=852">Bug 852</a> để biết thêm thông tin.'; +$lang['xsendfile'] = 'Sử dụng đầu đề X-Sendfile cho phép máy chủ web cung cấp các tệp tĩnh? Máy chủ web của bạn cần hỗ trợ này.'; +$lang['renderer_xhtml'] = 'Trình kết xuất để sử dụng cho đầu ra wiki chính (xhtml)'; +$lang['renderer__core'] = '%s (lõi dokuwiki)'; +$lang['search_nslimit'] = 'Giới hạn tìm kiếm trong không gian tên X hiện tại. Khi tìm kiếm được thực hiện từ một trang trong không gian tên sâu hơn, không gian tên X đầu tiên sẽ được thêm vào dưới dạng bộ lọc'; +$lang['search_fragment'] = 'Chỉ định hành vi tìm kiếm đoạn mặc định'; +$lang['search_fragment_o_exact'] = 'chính xác'; +$lang['search_fragment_o_starts_with'] = 'bắt đầu với'; +$lang['search_fragment_o_ends_with'] = 'kết thúc bằng'; +$lang['search_fragment_o_contains'] = 'chứa'; +$lang['trustedproxy'] = 'Các proxy chuyển tiếp tin cậy khớp với biểu thức chính quy này về IP máy khách thực mà họ báo cáo. Mặc định phù hợp với các mạng cục bộ. Để trống để tin tưởng không có proxy.'; +$lang['_feature_flags'] = 'Cờ đặc trưng'; +$lang['defer_js'] = 'Trì hoãn javascript được thực thi sau khi HTML của trang được phân tích cú pháp. Cải thiện tốc độ trang nhận thức nhưng có thể phá vỡ một số lượng nhỏ plugin.'; +$lang['dnslookups'] = 'DokuWiki sẽ tra cứu tên máy chủ cho các địa chỉ IP từ xa của các trang sửa đổi người dùng. Nếu bạn có máy chủ DNS chậm hoặc không hoạt động hoặc không muốn tính năng này, hãy tắt tùy chọn này'; +$lang['jquerycdn'] = 'Các tập tin script jQuery và jQuery UI có nên được tải từ CDN không? Việc này thêm các yêu cầu HTTP bổ sung, nhưng có thể tải tập tin nhanh hơn và người dùng có thể đã lưu chúng vào bộ nhớ cache.'; +$lang['jquerycdn_o_0'] = 'Không có CDN, chỉ tải nội bộ'; +$lang['jquerycdn_o_jquery'] = 'CDN tại code.jquery.com'; +$lang['jquerycdn_o_cdnjs'] = 'CDN tại cdnjs.com'; +$lang['proxy____host'] = 'Tên máy chủ Proxy'; +$lang['proxy____port'] = 'Cổng Proxy '; +$lang['proxy____user'] = 'Tên thành viên Proxy '; +$lang['proxy____pass'] = 'Mật khẩu Proxy '; +$lang['proxy____ssl'] = 'Sử dụng SSL khi kết nối với proxy'; +$lang['proxy____except'] = 'Biểu thức chính quy để khớp với các URL mà proxy nên được bỏ qua.'; +$lang['license_o_'] = 'Không chọn'; +$lang['typography_o_0'] = 'Không'; +$lang['typography_o_1'] = 'không bao gồm dấu ngoặc đơn'; +$lang['typography_o_2'] = 'bao gồm cả dấu ngoặc đơn (có thể không phải lúc nào cũng hoạt động)'; +$lang['userewrite_o_0'] = 'không'; +$lang['userewrite_o_2'] = 'Nội bộ DokuWiki '; +$lang['deaccent_o_0'] = 'tắt'; +$lang['deaccent_o_1'] = 'xóa dấu'; +$lang['deaccent_o_2'] = 'La tinh hóa'; +$lang['gdlib_o_0'] = 'Không có sẵn GD Lib '; +$lang['gdlib_o_1'] = 'Phiên bản 1.x'; +$lang['gdlib_o_2'] = 'Tự động phát hiện'; +$lang['rss_content_o_abstract'] = 'Abstract'; +$lang['rss_content_o_diff'] = 'Unified Diff'; +$lang['rss_content_o_htmldiff'] = 'bảng HTML định dạng khác'; +$lang['rss_content_o_html'] = 'Nội dung trang HTML đầy đủ'; +$lang['rss_linkto_o_diff'] = 'Xem khác biệt'; +$lang['rss_linkto_o_page'] = 'Trang đã xem lại'; +$lang['rss_linkto_o_rev'] = 'Danh sách phiên bản'; +$lang['rss_linkto_o_current'] = 'trang hiện tại'; +$lang['compression_o_0'] = 'không'; +$lang['compression_o_gz'] = 'gzip'; +$lang['compression_o_bz2'] = 'bz2'; +$lang['xsendfile_o_0'] = 'không sử dụng'; +$lang['xsendfile_o_1'] = 'Đầu đề lighttpd độc quyền (trước khi phát hành 1.5)'; +$lang['xsendfile_o_2'] = 'Đầu đề X-Sendfile tiêu chuẩn'; +$lang['xsendfile_o_3'] = 'Đầu đề Nginx X-Accel-Redirect độc quyền'; +$lang['showuseras_o_loginname'] = 'Tên đăng nhập'; +$lang['showuseras_o_username'] = 'Tên đầy đủ của thành viên'; +$lang['showuseras_o_username_link'] = 'Tên đầy đủ của thành viên dưới dạng liên kết người dùng liên wiki'; +$lang['showuseras_o_email'] = 'Địa chỉ thư điện tử của thành viên (bị xáo trộn theo cài đặt mailguard)'; +$lang['showuseras_o_email_link'] = 'Địa chỉ thư điện tử của thành viên dưới dạng mailto: link'; +$lang['useheading_o_0'] = 'Không bao giờ'; +$lang['useheading_o_navigation'] = 'Chỉ điều hướng'; +$lang['useheading_o_content'] = 'Chỉ nội dung Wiki'; +$lang['useheading_o_1'] = 'Luôn luôn'; +$lang['readdircache'] = 'Thời gian tối đa cho bộ nhớ cache readdir (giây)'; diff --git a/lib/plugins/config/lang/zh-tw/lang.php b/lib/plugins/config/lang/zh-tw/lang.php index 6723fe424..677015cb8 100644 --- a/lib/plugins/config/lang/zh-tw/lang.php +++ b/lib/plugins/config/lang/zh-tw/lang.php @@ -151,12 +151,6 @@ $lang['proxy____user'] = 'Proxy 使用者名稱'; $lang['proxy____pass'] = 'Proxy 密碼'; $lang['proxy____ssl'] = '使用 SSL 連接到 Proxy'; $lang['proxy____except'] = '比對 proxy 代理時應跳過的地址的正規式。'; -$lang['safemodehack'] = '啟用 Safemode Hack'; -$lang['ftp____host'] = 'Safemode Hack 的 FTP 伺服器'; -$lang['ftp____port'] = 'Safemode Hack 的 FTP 端口'; -$lang['ftp____user'] = 'Safemode Hack 的 FTP 帳戶'; -$lang['ftp____pass'] = 'Safemode Hack 的 FTP 密碼'; -$lang['ftp____root'] = 'Safemode Hack 的 FTP 根路徑'; $lang['license_o_'] = '未選擇'; $lang['typography_o_0'] = '無'; $lang['typography_o_1'] = '只限雙引號'; diff --git a/lib/plugins/config/lang/zh/lang.php b/lib/plugins/config/lang/zh/lang.php index 6da00eeb1..205b571c3 100644 --- a/lib/plugins/config/lang/zh/lang.php +++ b/lib/plugins/config/lang/zh/lang.php @@ -3,6 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Xin <chenxin1034@gmail.com> + * @author HaoNan <haonan@zhuoming.info> + * @author Phy <dokuwiki@phy25.com> + * @author Aaron Zhou <iradio@163.com> * @author lempel <riverlempel@hotmail.com> * @author ZDYX <zhangduyixiong@gmail.com> * @author http://www.chinese-tools.com/tools/converter-tradsimp.html @@ -48,6 +52,7 @@ $lang['_advanced'] = '高级设置'; $lang['_network'] = '网络设置'; $lang['_msg_setting_undefined'] = '设置的元数据不存在。'; $lang['_msg_setting_no_class'] = '设置的分类不存在。'; +$lang['_msg_setting_no_known_class'] = '设置分类不可用'; $lang['_msg_setting_no_default'] = '设置的默认值不存在。'; $lang['title'] = '维基站点的标题'; $lang['start'] = '开始页面的名称'; @@ -158,6 +163,14 @@ $lang['xsendfile'] = '使用 X-Sendfile 头让服务器发送状态 $lang['renderer_xhtml'] = '主维基页面 (xhtml) 输出使用的渲染'; $lang['renderer__core'] = '%s(DokuWiki 内核)'; $lang['renderer__plugin'] = '%s(插件)'; +$lang['search_nslimit'] = '限制搜索范围为当前若干层命名空间。当搜索在更深的命名空间中被执行时,前若干层命名空间将会被用来筛选'; +$lang['search_fragment'] = '指定默认的分段搜索方式'; +$lang['search_fragment_o_exact'] = '精确'; +$lang['search_fragment_o_starts_with'] = '开头为'; +$lang['search_fragment_o_ends_with'] = '结尾为'; +$lang['search_fragment_o_contains'] = '包含'; +$lang['_feature_flags'] = '功能标志'; +$lang['defer_js'] = '推迟在页面HTML解析后执行的JavaScript。提高了页面的感知速度,但可能会破坏少量插件。'; $lang['dnslookups'] = 'DokuWiki 将会查询用户编辑页面的远程 IP 地址的主机名。如果您的 DNS 服务器比较缓慢或者不工作,或者您不想要这个功能,请禁用此选项。'; $lang['jquerycdn'] = 'jQuery和jQuery UI脚本文件应该从CDN加载吗? 这会增加额外的HTTP请求,但文件加载可能会更快,且用户可能已经缓存过。'; @@ -170,12 +183,6 @@ $lang['proxy____user'] = '代理服务器的用户名'; $lang['proxy____pass'] = '代理服务器的密码'; $lang['proxy____ssl'] = '使用 SSL 连接到代理服务器'; $lang['proxy____except'] = '用来匹配代理应跳过的地址的正则表达式。'; -$lang['safemodehack'] = '启用 Safemode Hack'; -$lang['ftp____host'] = 'Safemode Hack 的 FTP 服务器'; -$lang['ftp____port'] = 'Safemode Hack 的 FTP 端口'; -$lang['ftp____user'] = 'Safemode Hack 的 FTP 用户名'; -$lang['ftp____pass'] = 'Safemode Hack 的 FTP 密码'; -$lang['ftp____root'] = 'Safemode Hack 的 FTP 根路径'; $lang['license_o_'] = '什么都没有选'; $lang['typography_o_0'] = '无'; $lang['typography_o_1'] = '仅限双引号'; diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php deleted file mode 100644 index 3196d7527..000000000 --- a/lib/plugins/config/settings/config.class.php +++ /dev/null @@ -1,1430 +0,0 @@ -<?php -/** - * Configuration Class and generic setting classes - * - * @author Chris Smith <chris@jalakai.co.uk> - * @author Ben Coburn <btcoburn@silicodon.net> - */ - - -if(!defined('CM_KEYMARKER')) define('CM_KEYMARKER','____'); - -if (!class_exists('configuration')) { - /** - * Class configuration - */ - class configuration { - - var $_name = 'conf'; // name of the config variable found in the files (overridden by $config['varname']) - var $_format = 'php'; // format of the config file, supported formats - php (overridden by $config['format']) - var $_heading = ''; // heading string written at top of config file - don't include comment indicators - var $_loaded = false; // set to true after configuration files are loaded - var $_metadata = array(); // holds metadata describing the settings - /** @var setting[] */ - var $setting = array(); // array of setting objects - var $locked = false; // configuration is considered locked if it can't be updated - var $show_disabled_plugins = false; - - // configuration filenames - var $_default_files = array(); - var $_local_files = array(); // updated configuration is written to the first file - var $_protected_files = array(); - - var $_plugin_list = null; - - /** - * constructor - * - * @param string $datafile path to config metadata file - */ - public function __construct($datafile) { - global $conf, $config_cascade; - - if (!file_exists($datafile)) { - msg('No configuration metadata found at - '.htmlspecialchars($datafile),-1); - return; - } - $meta = array(); - include($datafile); - - if (isset($config['varname'])) $this->_name = $config['varname']; - if (isset($config['format'])) $this->_format = $config['format']; - if (isset($config['heading'])) $this->_heading = $config['heading']; - - $this->_default_files = $config_cascade['main']['default']; - $this->_local_files = $config_cascade['main']['local']; - $this->_protected_files = $config_cascade['main']['protected']; - - $this->locked = $this->_is_locked(); - $this->_metadata = array_merge($meta, $this->get_plugintpl_metadata($conf['template'])); - $this->retrieve_settings(); - } - - /** - * Retrieve and stores settings in setting[] attribute - */ - public function retrieve_settings() { - global $conf; - $no_default_check = array('setting_fieldset', 'setting_undefined', 'setting_no_class'); - - if (!$this->_loaded) { - $default = array_merge($this->get_plugintpl_default($conf['template']), $this->_read_config_group($this->_default_files)); - $local = $this->_read_config_group($this->_local_files); - $protected = $this->_read_config_group($this->_protected_files); - - $keys = array_merge(array_keys($this->_metadata),array_keys($default), array_keys($local), array_keys($protected)); - $keys = array_unique($keys); - - $param = null; - foreach ($keys as $key) { - if (isset($this->_metadata[$key])) { - $class = $this->_metadata[$key][0]; - - if($class && class_exists('setting_'.$class)){ - $class = 'setting_'.$class; - } else { - if($class != '') { - $this->setting[] = new setting_no_class($key,$param); - } - $class = 'setting'; - } - - $param = $this->_metadata[$key]; - array_shift($param); - } else { - $class = 'setting_undefined'; - $param = null; - } - - if (!in_array($class, $no_default_check) && !isset($default[$key])) { - $this->setting[] = new setting_no_default($key,$param); - } - - $this->setting[$key] = new $class($key,$param); - - $d = array_key_exists($key, $default) ? $default[$key] : null; - $l = array_key_exists($key, $local) ? $local[$key] : null; - $p = array_key_exists($key, $protected) ? $protected[$key] : null; - - $this->setting[$key]->initialize($d,$l,$p); - } - - $this->_loaded = true; - } - } - - /** - * Stores setting[] array to file - * - * @param string $id Name of plugin, which saves the settings - * @param string $header Text at the top of the rewritten settings file - * @param bool $backup backup current file? (remove any existing backup) - * @return bool succesful? - */ - public function save_settings($id, $header='', $backup=true) { - global $conf; - - if ($this->locked) return false; - - // write back to the last file in the local config cascade - $file = end($this->_local_files); - - // backup current file (remove any existing backup) - if (file_exists($file) && $backup) { - if (file_exists($file.'.bak')) @unlink($file.'.bak'); - if (!io_rename($file, $file.'.bak')) return false; - } - - if (!$fh = @fopen($file, 'wb')) { - io_rename($file.'.bak', $file); // problem opening, restore the backup - return false; - } - - if (empty($header)) $header = $this->_heading; - - $out = $this->_out_header($id,$header); - - foreach ($this->setting as $setting) { - $out .= $setting->out($this->_name, $this->_format); - } - - $out .= $this->_out_footer(); - - @fwrite($fh, $out); - fclose($fh); - if($conf['fperm']) chmod($file, $conf['fperm']); - return true; - } - - /** - * Update last modified time stamp of the config file - * - * @return bool - */ - public function touch_settings(){ - if ($this->locked) return false; - $file = end($this->_local_files); - return @touch($file); - } - - /** - * Read and merge given config files - * - * @param array $files file paths - * @return array config settings - */ - protected function _read_config_group($files) { - $config = array(); - foreach ($files as $file) { - $config = array_merge($config, $this->_read_config($file)); - } - - return $config; - } - - /** - * Return an array of config settings - * - * @param string $file file path - * @return array config settings - */ - function _read_config($file) { - - if (!$file) return array(); - - $config = array(); - - if ($this->_format == 'php') { - - if(file_exists($file)){ - $contents = @php_strip_whitespace($file); - }else{ - $contents = ''; - } - $pattern = '/\$'.$this->_name.'\[[\'"]([^=]+)[\'"]\] ?= ?(.*?);(?=[^;]*(?:\$'.$this->_name.'|$))/s'; - $matches=array(); - preg_match_all($pattern,$contents,$matches,PREG_SET_ORDER); - - for ($i=0; $i<count($matches); $i++) { - $value = $matches[$i][2]; - - // correct issues with the incoming data - // FIXME ... for now merge multi-dimensional array indices using ____ - $key = preg_replace('/.\]\[./',CM_KEYMARKER,$matches[$i][1]); - - // handle arrays - if(preg_match('/^array ?\((.*)\)/', $value, $match)){ - $arr = explode(',', $match[1]); - - // remove quotes from quoted strings & unescape escaped data - $len = count($arr); - for($j=0; $j<$len; $j++){ - $arr[$j] = trim($arr[$j]); - $arr[$j] = $this->_readValue($arr[$j]); - } - - $value = $arr; - }else{ - $value = $this->_readValue($value); - } - - $config[$key] = $value; - } - } - - return $config; - } - - /** - * Convert php string into value - * - * @param string $value - * @return bool|string - */ - protected function _readValue($value) { - $removequotes_pattern = '/^(\'|")(.*)(?<!\\\\)\1$/s'; - $unescape_pairs = array( - '\\\\' => '\\', - '\\\'' => '\'', - '\\"' => '"' - ); - - if($value == 'true') { - $value = true; - } elseif($value == 'false') { - $value = false; - } else { - // remove quotes from quoted strings & unescape escaped data - $value = preg_replace($removequotes_pattern,'$2',$value); - $value = strtr($value, $unescape_pairs); - } - return $value; - } - - /** - * Returns header of rewritten settings file - * - * @param string $id plugin name of which generated this output - * @param string $header additional text for at top of the file - * @return string text of header - */ - protected function _out_header($id, $header) { - $out = ''; - if ($this->_format == 'php') { - $out .= '<'.'?php'."\n". - "/*\n". - " * ".$header."\n". - " * Auto-generated by ".$id." plugin\n". - " * Run for user: ".$_SERVER['REMOTE_USER']."\n". - " * Date: ".date('r')."\n". - " */\n\n"; - } - - return $out; - } - - /** - * Returns footer of rewritten settings file - * - * @return string text of footer - */ - protected function _out_footer() { - $out = ''; - if ($this->_format == 'php') { - $out .= "\n// end auto-generated content\n"; - } - - return $out; - } - - /** - * Configuration is considered locked if there is no local settings filename - * or the directory its in is not writable or the file exists and is not writable - * - * @return bool true: locked, false: writable - */ - protected function _is_locked() { - if (!$this->_local_files) return true; - - $local = $this->_local_files[0]; - - if (!is_writable(dirname($local))) return true; - if (file_exists($local) && !is_writable($local)) return true; - - return false; - } - - /** - * not used ... conf's contents are an array! - * reduce any multidimensional settings to one dimension using CM_KEYMARKER - * - * @param $conf - * @param string $prefix - * @return array - */ - protected function _flatten($conf,$prefix='') { - - $out = array(); - - foreach($conf as $key => $value) { - if (!is_array($value)) { - $out[$prefix.$key] = $value; - continue; - } - - $tmp = $this->_flatten($value,$prefix.$key.CM_KEYMARKER); - $out = array_merge($out,$tmp); - } - - return $out; - } - - /** - * Returns array of plugin names - * - * @return array plugin names - * @triggers PLUGIN_CONFIG_PLUGINLIST event - */ - function get_plugin_list() { - if (is_null($this->_plugin_list)) { - $list = plugin_list('',$this->show_disabled_plugins); - - // remove this plugin from the list - $idx = array_search('config',$list); - unset($list[$idx]); - - trigger_event('PLUGIN_CONFIG_PLUGINLIST',$list); - $this->_plugin_list = $list; - } - - return $this->_plugin_list; - } - - /** - * load metadata for plugin and template settings - * - * @param string $tpl name of active template - * @return array metadata of settings - */ - function get_plugintpl_metadata($tpl){ - $file = '/conf/metadata.php'; - $class = '/conf/settings.class.php'; - $metadata = array(); - - foreach ($this->get_plugin_list() as $plugin) { - $plugin_dir = plugin_directory($plugin); - if (file_exists(DOKU_PLUGIN.$plugin_dir.$file)){ - $meta = array(); - @include(DOKU_PLUGIN.$plugin_dir.$file); - @include(DOKU_PLUGIN.$plugin_dir.$class); - if (!empty($meta)) { - $metadata['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.'plugin_settings_name'] = array('fieldset'); - } - foreach ($meta as $key => $value){ - if ($value[0]=='fieldset') { continue; } //plugins only get one fieldset - $metadata['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value; - } - } - } - - // the same for the active template - if (file_exists(tpl_incdir().$file)){ - $meta = array(); - @include(tpl_incdir().$file); - @include(tpl_incdir().$class); - if (!empty($meta)) { - $metadata['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.'template_settings_name'] = array('fieldset'); - } - foreach ($meta as $key => $value){ - if ($value[0]=='fieldset') { continue; } //template only gets one fieldset - $metadata['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value; - } - } - - return $metadata; - } - - /** - * Load default settings for plugins and templates - * - * @param string $tpl name of active template - * @return array default settings - */ - function get_plugintpl_default($tpl){ - $file = '/conf/default.php'; - $default = array(); - - foreach ($this->get_plugin_list() as $plugin) { - $plugin_dir = plugin_directory($plugin); - if (file_exists(DOKU_PLUGIN.$plugin_dir.$file)){ - $conf = $this->_read_config(DOKU_PLUGIN.$plugin_dir.$file); - foreach ($conf as $key => $value){ - $default['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value; - } - } - } - - // the same for the active template - if (file_exists(tpl_incdir().$file)){ - $conf = $this->_read_config(tpl_incdir().$file); - foreach ($conf as $key => $value){ - $default['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value; - } - } - - return $default; - } - - } -} - -if (!class_exists('setting')) { - /** - * Class setting - */ - class setting { - - var $_key = ''; - var $_default = null; - var $_local = null; - var $_protected = null; - - var $_pattern = ''; - var $_error = false; // only used by those classes which error check - var $_input = null; // only used by those classes which error check - var $_caution = null; // used by any setting to provide an alert along with the setting - // valid alerts, 'warning', 'danger', 'security' - // images matching the alerts are in the plugin's images directory - - static protected $_validCautions = array('warning','danger','security'); - - /** - * @param string $key - * @param array|null $params array with metadata of setting - */ - public function __construct($key, $params=null) { - $this->_key = $key; - - if (is_array($params)) { - foreach($params as $property => $value) { - $this->$property = $value; - } - } - } - - /** - * Receives current values for the setting $key - * - * @param mixed $default default setting value - * @param mixed $local local setting value - * @param mixed $protected protected setting value - */ - public function initialize($default, $local, $protected) { - if (isset($default)) $this->_default = $default; - if (isset($local)) $this->_local = $local; - if (isset($protected)) $this->_protected = $protected; - } - - /** - * update changed setting with user provided value $input - * - if changed value fails error check, save it to $this->_input (to allow echoing later) - * - if changed value passes error check, set $this->_local to the new value - * - * @param mixed $input the new value - * @return boolean true if changed, false otherwise (also on error) - */ - public function update($input) { - if (is_null($input)) return false; - if ($this->is_protected()) return false; - - $value = is_null($this->_local) ? $this->_default : $this->_local; - if ($value == $input) return false; - - if ($this->_pattern && !preg_match($this->_pattern,$input)) { - $this->_error = true; - $this->_input = $input; - return false; - } - - $this->_local = $input; - return true; - } - - /** - * Build html for label and input of setting - * - * @param admin_plugin_config $plugin object of config plugin - * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return string[] with content array(string $label_html, string $input_html) - */ - public function html(admin_plugin_config $plugin, $echo=false) { - $disable = ''; - - if ($this->is_protected()) { - $value = $this->_protected; - $disable = 'disabled="disabled"'; - } else { - if ($echo && $this->_error) { - $value = $this->_input; - } else { - $value = is_null($this->_local) ? $this->_default : $this->_local; - } - } - - $key = htmlspecialchars($this->_key); - $value = formText($value); - - $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>'; - $input = '<textarea rows="3" cols="40" id="config___'.$key.'" name="config['.$key.']" class="edit" '.$disable.'>'.$value.'</textarea>'; - return array($label,$input); - } - - /** - * Generate string to save setting value to file according to $fmt - * - * @param string $var name of variable - * @param string $fmt save format - * @return string - */ - public function out($var, $fmt='php') { - - if ($this->is_protected()) return ''; - if (is_null($this->_local) || ($this->_default == $this->_local)) return ''; - - $out = ''; - - if ($fmt=='php') { - $tr = array("\\" => '\\\\', "'" => '\\\''); - - $out = '$'.$var."['".$this->_out_key()."'] = '".strtr( cleanText($this->_local), $tr)."';\n"; - } - - return $out; - } - - /** - * Returns the localized prompt - * - * @param admin_plugin_config $plugin object of config plugin - * @return string text - */ - public function prompt(admin_plugin_config $plugin) { - $prompt = $plugin->getLang($this->_key); - if (!$prompt) $prompt = htmlspecialchars(str_replace(array('____','_'),' ',$this->_key)); - return $prompt; - } - - /** - * Is setting protected - * - * @return bool - */ - public function is_protected() { return !is_null($this->_protected); } - - /** - * Is setting the default? - * - * @return bool - */ - public function is_default() { return !$this->is_protected() && is_null($this->_local); } - - /** - * Has an error? - * - * @return bool - */ - public function error() { return $this->_error; } - - /** - * Returns caution - * - * @return false|string caution string, otherwise false for invalid caution - */ - public function caution() { - if (!empty($this->_caution)) { - if (!in_array($this->_caution, setting::$_validCautions)) { - trigger_error('Invalid caution string ('.$this->_caution.') in metadata for setting "'.$this->_key.'"', E_USER_WARNING); - return false; - } - return $this->_caution; - } - // compatibility with previous cautionList - // TODO: check if any plugins use; remove - if (!empty($this->_cautionList[$this->_key])) { - $this->_caution = $this->_cautionList[$this->_key]; - unset($this->_cautionList); - - return $this->caution(); - } - return false; - } - - /** - * Returns setting key, eventually with referer to config: namespace at dokuwiki.org - * - * @param bool $pretty create nice key - * @param bool $url provide url to config: namespace - * @return string key - */ - public function _out_key($pretty=false,$url=false) { - if($pretty){ - $out = str_replace(CM_KEYMARKER,"»",$this->_key); - if ($url && !strstr($out,'»')) {//provide no urls for plugins, etc. - if ($out == 'start') //one exception - return '<a href="http://www.dokuwiki.org/config:startpage">'.$out.'</a>'; - else - return '<a href="http://www.dokuwiki.org/config:'.$out.'">'.$out.'</a>'; - } - return $out; - }else{ - return str_replace(CM_KEYMARKER,"']['",$this->_key); - } - } - } -} - - -if (!class_exists('setting_array')) { - /** - * Class setting_array - */ - class setting_array extends setting { - - /** - * Create an array from a string - * - * @param string $string - * @return array - */ - protected function _from_string($string){ - $array = explode(',', $string); - $array = array_map('trim', $array); - $array = array_filter($array); - $array = array_unique($array); - return $array; - } - - /** - * Create a string from an array - * - * @param array $array - * @return string - */ - protected function _from_array($array){ - return join(', ', (array) $array); - } - - /** - * update setting with user provided value $input - * if value fails error check, save it - * - * @param string $input - * @return bool true if changed, false otherwise (incl. on error) - */ - function update($input) { - if (is_null($input)) return false; - if ($this->is_protected()) return false; - - $input = $this->_from_string($input); - - $value = is_null($this->_local) ? $this->_default : $this->_local; - if ($value == $input) return false; - - foreach($input as $item){ - if ($this->_pattern && !preg_match($this->_pattern,$item)) { - $this->_error = true; - $this->_input = $input; - return false; - } - } - - $this->_local = $input; - return true; - } - - /** - * Escaping - * - * @param string $string - * @return string - */ - protected function _escape($string) { - $tr = array("\\" => '\\\\', "'" => '\\\''); - return "'".strtr( cleanText($string), $tr)."'"; - } - - /** - * Generate string to save setting value to file according to $fmt - * - * @param string $var name of variable - * @param string $fmt save format - * @return string - */ - function out($var, $fmt='php') { - - if ($this->is_protected()) return ''; - if (is_null($this->_local) || ($this->_default == $this->_local)) return ''; - - $out = ''; - - if ($fmt=='php') { - $vals = array_map(array($this, '_escape'), $this->_local); - $out = '$'.$var."['".$this->_out_key()."'] = array(".join(', ',$vals).");\n"; - } - - return $out; - } - - /** - * Build html for label and input of setting - * - * @param admin_plugin_config $plugin object of config plugin - * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return string[] with content array(string $label_html, string $input_html) - */ - function html(admin_plugin_config $plugin, $echo=false) { - $disable = ''; - - if ($this->is_protected()) { - $value = $this->_protected; - $disable = 'disabled="disabled"'; - } else { - if ($echo && $this->_error) { - $value = $this->_input; - } else { - $value = is_null($this->_local) ? $this->_default : $this->_local; - } - } - - $key = htmlspecialchars($this->_key); - $value = htmlspecialchars($this->_from_array($value)); - - $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>'; - $input = '<input id="config___'.$key.'" name="config['.$key.']" type="text" class="edit" value="'.$value.'" '.$disable.'/>'; - return array($label,$input); - } - } -} - -if (!class_exists('setting_string')) { - /** - * Class setting_string - */ - class setting_string extends setting { - /** - * Build html for label and input of setting - * - * @param admin_plugin_config $plugin object of config plugin - * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return string[] with content array(string $label_html, string $input_html) - */ - function html(admin_plugin_config $plugin, $echo=false) { - $disable = ''; - - if ($this->is_protected()) { - $value = $this->_protected; - $disable = 'disabled="disabled"'; - } else { - if ($echo && $this->_error) { - $value = $this->_input; - } else { - $value = is_null($this->_local) ? $this->_default : $this->_local; - } - } - - $key = htmlspecialchars($this->_key); - $value = htmlspecialchars($value); - - $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>'; - $input = '<input id="config___'.$key.'" name="config['.$key.']" type="text" class="edit" value="'.$value.'" '.$disable.'/>'; - return array($label,$input); - } - } -} - -if (!class_exists('setting_password')) { - /** - * Class setting_password - */ - class setting_password extends setting_string { - - var $_code = 'plain'; // mechanism to be used to obscure passwords - - /** - * update changed setting with user provided value $input - * - if changed value fails error check, save it to $this->_input (to allow echoing later) - * - if changed value passes error check, set $this->_local to the new value - * - * @param mixed $input the new value - * @return boolean true if changed, false otherwise (also on error) - */ - function update($input) { - if ($this->is_protected()) return false; - if (!$input) return false; - - if ($this->_pattern && !preg_match($this->_pattern,$input)) { - $this->_error = true; - $this->_input = $input; - return false; - } - - $this->_local = conf_encodeString($input,$this->_code); - return true; - } - - /** - * Build html for label and input of setting - * - * @param admin_plugin_config $plugin object of config plugin - * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return string[] with content array(string $label_html, string $input_html) - */ - function html(admin_plugin_config $plugin, $echo=false) { - - $disable = $this->is_protected() ? 'disabled="disabled"' : ''; - - $key = htmlspecialchars($this->_key); - - $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>'; - $input = '<input id="config___'.$key.'" name="config['.$key.']" autocomplete="off" type="password" class="edit" value="" '.$disable.' />'; - return array($label,$input); - } - } -} - -if (!class_exists('setting_email')) { - /** - * Class setting_email - */ - class setting_email extends setting_string { - var $_multiple = false; - var $_placeholders = false; - - /** - * update setting with user provided value $input - * if value fails error check, save it - * - * @param mixed $input - * @return boolean true if changed, false otherwise (incl. on error) - */ - function update($input) { - if (is_null($input)) return false; - if ($this->is_protected()) return false; - - $value = is_null($this->_local) ? $this->_default : $this->_local; - if ($value == $input) return false; - if($input === ''){ - $this->_local = $input; - return true; - } - $mail = $input; - - if($this->_placeholders){ - // replace variables with pseudo values - $mail = str_replace('@USER@','joe',$mail); - $mail = str_replace('@NAME@','Joe Schmoe',$mail); - $mail = str_replace('@MAIL@','joe@example.com',$mail); - } - - // multiple mail addresses? - if ($this->_multiple) { - $mails = array_filter(array_map('trim', explode(',', $mail))); - } else { - $mails = array($mail); - } - - // check them all - foreach ($mails as $mail) { - // only check the address part - if(preg_match('#(.*?)<(.*?)>#', $mail, $matches)){ - $addr = $matches[2]; - }else{ - $addr = $mail; - } - - if (!mail_isvalid($addr)) { - $this->_error = true; - $this->_input = $input; - return false; - } - } - - $this->_local = $input; - return true; - } - } -} - -if (!class_exists('setting_numeric')) { - /** - * Class setting_numeric - */ - class setting_numeric extends setting_string { - // This allows for many PHP syntax errors... - // var $_pattern = '/^[-+\/*0-9 ]*$/'; - // much more restrictive, but should eliminate syntax errors. - var $_pattern = '/^[-+]? *[0-9]+ *(?:[-+*] *[0-9]+ *)*$/'; - var $_min = null; - var $_max = null; - - /** - * update changed setting with user provided value $input - * - if changed value fails error check, save it to $this->_input (to allow echoing later) - * - if changed value passes error check, set $this->_local to the new value - * - * @param mixed $input the new value - * @return boolean true if changed, false otherwise (also on error) - */ - function update($input) { - $local = $this->_local; - $valid = parent::update($input); - if ($valid && !(is_null($this->_min) && is_null($this->_max))) { - $numeric_local = (int) eval('return '.$this->_local.';'); - if ((!is_null($this->_min) && $numeric_local < $this->_min) || - (!is_null($this->_max) && $numeric_local > $this->_max)) { - $this->_error = true; - $this->_input = $input; - $this->_local = $local; - $valid = false; - } - } - return $valid; - } - - /** - * Generate string to save setting value to file according to $fmt - * - * @param string $var name of variable - * @param string $fmt save format - * @return string - */ - function out($var, $fmt='php') { - - if ($this->is_protected()) return ''; - if (is_null($this->_local) || ($this->_default == $this->_local)) return ''; - - $out = ''; - - if ($fmt=='php') { - $local = $this->_local === '' ? "''" : $this->_local; - $out .= '$'.$var."['".$this->_out_key()."'] = ".$local.";\n"; - } - - return $out; - } - } -} - -if (!class_exists('setting_numericopt')) { - /** - * Class setting_numericopt - */ - class setting_numericopt extends setting_numeric { - // just allow an empty config - var $_pattern = '/^(|[-]?[0-9]+(?:[-+*][0-9]+)*)$/'; - - - /** - * Empty string is valid for numericopt - * - * @param mixed $input - * - * @return bool - */ - function update($input) { - if ($input === '') { - return true; - } - - return parent::update($input); - } - } -} - -if (!class_exists('setting_onoff')) { - /** - * Class setting_onoff - */ - class setting_onoff extends setting_numeric { - /** - * Build html for label and input of setting - * - * @param admin_plugin_config $plugin object of config plugin - * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return string[] with content array(string $label_html, string $input_html) - */ - function html(admin_plugin_config $plugin, $echo = false) { - $disable = ''; - - if ($this->is_protected()) { - $value = $this->_protected; - $disable = ' disabled="disabled"'; - } else { - $value = is_null($this->_local) ? $this->_default : $this->_local; - } - - $key = htmlspecialchars($this->_key); - $checked = ($value) ? ' checked="checked"' : ''; - - $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>'; - $input = '<div class="input"><input id="config___'.$key.'" name="config['.$key.']" type="checkbox" class="checkbox" value="1"'.$checked.$disable.'/></div>'; - return array($label,$input); - } - - /** - * update changed setting with user provided value $input - * - if changed value fails error check, save it to $this->_input (to allow echoing later) - * - if changed value passes error check, set $this->_local to the new value - * - * @param mixed $input the new value - * @return boolean true if changed, false otherwise (also on error) - */ - function update($input) { - if ($this->is_protected()) return false; - - $input = ($input) ? 1 : 0; - $value = is_null($this->_local) ? $this->_default : $this->_local; - if ($value == $input) return false; - - $this->_local = $input; - return true; - } - } -} - -if (!class_exists('setting_multichoice')) { - /** - * Class setting_multichoice - */ - class setting_multichoice extends setting_string { - var $_choices = array(); - var $lang; //some custom language strings are stored in setting - - /** - * Build html for label and input of setting - * - * @param admin_plugin_config $plugin object of config plugin - * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return string[] with content array(string $label_html, string $input_html) - */ - function html(admin_plugin_config $plugin, $echo = false) { - $disable = ''; - $nochoice = ''; - - if ($this->is_protected()) { - $value = $this->_protected; - $disable = ' disabled="disabled"'; - } else { - $value = is_null($this->_local) ? $this->_default : $this->_local; - } - - // ensure current value is included - if (!in_array($value, $this->_choices)) { - $this->_choices[] = $value; - } - // disable if no other choices - if (!$this->is_protected() && count($this->_choices) <= 1) { - $disable = ' disabled="disabled"'; - $nochoice = $plugin->getLang('nochoice'); - } - - $key = htmlspecialchars($this->_key); - - $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>'; - - $input = "<div class=\"input\">\n"; - $input .= '<select class="edit" id="config___'.$key.'" name="config['.$key.']"'.$disable.'>'."\n"; - foreach ($this->_choices as $choice) { - $selected = ($value == $choice) ? ' selected="selected"' : ''; - $option = $plugin->getLang($this->_key.'_o_'.$choice); - if (!$option && isset($this->lang[$this->_key.'_o_'.$choice])) $option = $this->lang[$this->_key.'_o_'.$choice]; - if (!$option) $option = $choice; - - $choice = htmlspecialchars($choice); - $option = htmlspecialchars($option); - $input .= ' <option value="'.$choice.'"'.$selected.' >'.$option.'</option>'."\n"; - } - $input .= "</select> $nochoice \n"; - $input .= "</div>\n"; - - return array($label,$input); - } - - /** - * update changed setting with user provided value $input - * - if changed value fails error check, save it to $this->_input (to allow echoing later) - * - if changed value passes error check, set $this->_local to the new value - * - * @param mixed $input the new value - * @return boolean true if changed, false otherwise (also on error) - */ - function update($input) { - if (is_null($input)) return false; - if ($this->is_protected()) return false; - - $value = is_null($this->_local) ? $this->_default : $this->_local; - if ($value == $input) return false; - - if (!in_array($input, $this->_choices)) return false; - - $this->_local = $input; - return true; - } - } -} - - -if (!class_exists('setting_dirchoice')) { - /** - * Class setting_dirchoice - */ - class setting_dirchoice extends setting_multichoice { - - var $_dir = ''; - - /** - * Receives current values for the setting $key - * - * @param mixed $default default setting value - * @param mixed $local local setting value - * @param mixed $protected protected setting value - */ - function initialize($default,$local,$protected) { - - // populate $this->_choices with a list of directories - $list = array(); - - if ($dh = @opendir($this->_dir)) { - while (false !== ($entry = readdir($dh))) { - if ($entry == '.' || $entry == '..') continue; - if ($this->_pattern && !preg_match($this->_pattern,$entry)) continue; - - $file = (is_link($this->_dir.$entry)) ? readlink($this->_dir.$entry) : $this->_dir.$entry; - if (is_dir($file)) $list[] = $entry; - } - closedir($dh); - } - sort($list); - $this->_choices = $list; - - parent::initialize($default,$local,$protected); - } - } -} - - -if (!class_exists('setting_hidden')) { - /** - * Class setting_hidden - */ - class setting_hidden extends setting { - // Used to explicitly ignore a setting in the configuration manager. - } -} - -if (!class_exists('setting_fieldset')) { - /** - * Class setting_fieldset - */ - class setting_fieldset extends setting { - // A do-nothing class used to detect the 'fieldset' type. - // Used to start a new settings "display-group". - } -} - -if (!class_exists('setting_undefined')) { - /** - * Class setting_undefined - */ - class setting_undefined extends setting_hidden { - // A do-nothing class used to detect settings with no metadata entry. - // Used internaly to hide undefined settings, and generate the undefined settings list. - } -} - -if (!class_exists('setting_no_class')) { - /** - * Class setting_no_class - */ - class setting_no_class extends setting_undefined { - // A do-nothing class used to detect settings with a missing setting class. - // Used internaly to hide undefined settings, and generate the undefined settings list. - } -} - -if (!class_exists('setting_no_default')) { - /** - * Class setting_no_default - */ - class setting_no_default extends setting_undefined { - // A do-nothing class used to detect settings with no default value. - // Used internaly to hide undefined settings, and generate the undefined settings list. - } -} - -if (!class_exists('setting_multicheckbox')) { - /** - * Class setting_multicheckbox - */ - class setting_multicheckbox extends setting_string { - - var $_choices = array(); - var $_combine = array(); - var $_other = 'always'; - - /** - * update changed setting with user provided value $input - * - if changed value fails error check, save it to $this->_input (to allow echoing later) - * - if changed value passes error check, set $this->_local to the new value - * - * @param mixed $input the new value - * @return boolean true if changed, false otherwise (also on error) - */ - function update($input) { - if ($this->is_protected()) return false; - - // split any combined values + convert from array to comma separated string - $input = ($input) ? $input : array(); - $input = $this->_array2str($input); - - $value = is_null($this->_local) ? $this->_default : $this->_local; - if ($value == $input) return false; - - if ($this->_pattern && !preg_match($this->_pattern,$input)) { - $this->_error = true; - $this->_input = $input; - return false; - } - - $this->_local = $input; - return true; - } - - /** - * Build html for label and input of setting - * - * @param admin_plugin_config $plugin object of config plugin - * @param bool $echo true: show input value, when error occurred, otherwise the stored setting - * @return string[] with content array(string $label_html, string $input_html) - */ - function html(admin_plugin_config $plugin, $echo=false) { - - $disable = ''; - - if ($this->is_protected()) { - $value = $this->_protected; - $disable = 'disabled="disabled"'; - } else { - if ($echo && $this->_error) { - $value = $this->_input; - } else { - $value = is_null($this->_local) ? $this->_default : $this->_local; - } - } - - $key = htmlspecialchars($this->_key); - - // convert from comma separated list into array + combine complimentary actions - $value = $this->_str2array($value); - $default = $this->_str2array($this->_default); - - $input = ''; - foreach ($this->_choices as $choice) { - $idx = array_search($choice, $value); - $idx_default = array_search($choice,$default); - - $checked = ($idx !== false) ? 'checked="checked"' : ''; - - // @todo ideally this would be handled using a second class of "default" - $class = (($idx !== false) == (false !== $idx_default)) ? " selectiondefault" : ""; - - $prompt = ($plugin->getLang($this->_key.'_'.$choice) ? - $plugin->getLang($this->_key.'_'.$choice) : htmlspecialchars($choice)); - - $input .= '<div class="selection'.$class.'">'."\n"; - $input .= '<label for="config___'.$key.'_'.$choice.'">'.$prompt."</label>\n"; - $input .= '<input id="config___'.$key.'_'.$choice.'" name="config['.$key.'][]" type="checkbox" class="checkbox" value="'.$choice.'" '.$disable.' '.$checked."/>\n"; - $input .= "</div>\n"; - - // remove this action from the disabledactions array - if ($idx !== false) unset($value[$idx]); - if ($idx_default !== false) unset($default[$idx_default]); - } - - // handle any remaining values - if ($this->_other != 'never'){ - $other = join(',',$value); - // test equivalent to ($this->_other == 'always' || ($other && $this->_other == 'exists') - // use != 'exists' rather than == 'always' to ensure invalid values default to 'always' - if ($this->_other != 'exists' || $other) { - - $class = ((count($default) == count($value)) && (count($value) == count(array_intersect($value,$default)))) ? - " selectiondefault" : ""; - - $input .= '<div class="other'.$class.'">'."\n"; - $input .= '<label for="config___'.$key.'_other">'.$plugin->getLang($key.'_other')."</label>\n"; - $input .= '<input id="config___'.$key.'_other" name="config['.$key.'][other]" type="text" class="edit" value="'.htmlspecialchars($other).'" '.$disable." />\n"; - $input .= "</div>\n"; - } - } - $label = '<label>'.$this->prompt($plugin).'</label>'; - return array($label,$input); - } - - /** - * convert comma separated list to an array and combine any complimentary values - * - * @param string $str - * @return array - */ - function _str2array($str) { - $array = explode(',',$str); - - if (!empty($this->_combine)) { - foreach ($this->_combine as $key => $combinators) { - $idx = array(); - foreach ($combinators as $val) { - if (($idx[] = array_search($val, $array)) === false) break; - } - - if (count($idx) && $idx[count($idx)-1] !== false) { - foreach ($idx as $i) unset($array[$i]); - $array[] = $key; - } - } - } - - return $array; - } - - /** - * convert array of values + other back to a comma separated list, incl. splitting any combined values - * - * @param array $input - * @return string - */ - function _array2str($input) { - - // handle other - $other = trim($input['other']); - $other = !empty($other) ? explode(',',str_replace(' ','',$input['other'])) : array(); - unset($input['other']); - - $array = array_unique(array_merge($input, $other)); - - // deconstruct any combinations - if (!empty($this->_combine)) { - foreach ($this->_combine as $key => $combinators) { - - $idx = array_search($key,$array); - if ($idx !== false) { - unset($array[$idx]); - $array = array_merge($array, $combinators); - } - } - } - - return join(',',array_unique($array)); - } - } -} - -if (!class_exists('setting_regex')){ - /** - * Class setting_regex - */ - class setting_regex extends setting_string { - - var $_delimiter = '/'; // regex delimiter to be used in testing input - var $_pregflags = 'ui'; // regex pattern modifiers to be used in testing input - - /** - * update changed setting with user provided value $input - * - if changed value fails error check, save it to $this->_input (to allow echoing later) - * - if changed value passes error check, set $this->_local to the new value - * - * @param mixed $input the new value - * @return boolean true if changed, false otherwise (incl. on error) - */ - function update($input) { - - // let parent do basic checks, value, not changed, etc. - $local = $this->_local; - if (!parent::update($input)) return false; - $this->_local = $local; - - // see if the regex compiles and runs (we don't check for effectiveness) - $regex = $this->_delimiter . $input . $this->_delimiter . $this->_pregflags; - $lastError = error_get_last(); - @preg_match($regex,'testdata'); - if (preg_last_error() != PREG_NO_ERROR || error_get_last() != $lastError) { - $this->_input = $input; - $this->_error = true; - return false; - } - - $this->_local = $input; - return true; - } - } -} diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index acdf93ba7..6fdd64d6e 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -2,16 +2,15 @@ /** * Metadata for configuration manager plugin * - * Note: This file should be included within a function to ensure it - * doesn't clash with the settings it is describing. + * Note: This file is loaded in Loader::loadMeta(). * * Format: * $meta[<setting name>] = array(<handler class id>,<param name> => <param value>); * * <handler class id> is the handler class name without the "setting_" prefix * - * Defined classes: - * Generic (source: settings/config.class.php) + * Defined classes (see core/Setting/*): + * Generic * ------------------------------------------- * '' - default class ('setting'), textarea, minimal input validation, setting output in quotes * 'string' - single line text input, minimal input validation, setting output in quotes @@ -38,7 +37,7 @@ * to see if will compile & run as a regex. in addition to _pattern, also accepts _delimiter * (default '/') and _pregflags (default 'ui') * - * Single Setting (source: settings/extra.class.php) + * Single Setting * ------------------------------------------------- * 'savedir' - as 'setting', input tested against initpath() (inc/init.php) * 'sepchar' - as multichoice, selection constructed from string of valid values @@ -76,26 +75,10 @@ * 'never' as it will not discard unknown/other values. * optional for 'multicheckbox', ignored by others * + * The order of the settings influences the order in which they apppear in the config manager * * @author Chris Smith <chris@jalakai.co.uk> */ -// ---------------[ settings for settings ]------------------------------ -$config['format'] = 'php'; // format of setting files, supported formats: php -$config['varname'] = 'conf'; // name of the config variable, sans $ - -// this string is written at the top of the rewritten settings file, -// !! do not include any comment indicators !! -// this value can be overriden when calling save_settings() method -$config['heading'] = 'Dokuwiki\'s Main Configuration File - Local Settings'; - -// test value (FIXME, remove before publishing) -//$meta['test'] = array('multichoice','_choices' => array('')); - -// --------------[ setting metadata ]------------------------------------ -// - for description of format and fields see top of file -// - order the settings in the order you wish them to appear -// - any settings not mentioned will come after the last setting listed and -// will use the default class with no parameters $meta['_basic'] = array('fieldset'); $meta['title'] = array('string'); @@ -122,7 +105,10 @@ $meta['fullpath'] = array('onoff','_caution' => 'security'); $meta['typography'] = array('multichoice','_choices' => array(0,1,2)); $meta['dformat'] = array('string'); $meta['signature'] = array('string'); -$meta['showuseras'] = array('multichoice','_choices' => array('loginname','username','username_link','email','email_link')); +$meta['showuseras'] = array( + 'multichoice', + '_choices' => array('loginname', 'username', 'username_link', 'email', 'email_link') +); $meta['toptoclevel'] = array('multichoice','_choices' => array(1,2,3,4,5)); // 5 toc levels $meta['tocminheads'] = array('multichoice','_choices' => array(0,1,2,3,4,5,10,15,20)); $meta['maxtoclevel'] = array('multichoice','_choices' => array(0,1,2,3,4,5)); @@ -139,16 +125,37 @@ $meta['autopasswd'] = array('onoff'); $meta['authtype'] = array('authtype','_caution' => 'danger'); $meta['passcrypt'] = array('multichoice','_choices' => array( 'smd5','md5','apr1','sha1','ssha','lsmd5','crypt','mysql','my411','kmd5','pmd5','hmd5', - 'mediawiki','bcrypt','djangomd5','djangosha1','djangopbkdf2_sha1','djangopbkdf2_sha256','sha512' + 'mediawiki','bcrypt','djangomd5','djangosha1','djangopbkdf2_sha1','djangopbkdf2_sha256', + 'sha512','argon2i','argon2id' )); $meta['defaultgroup']= array('string'); $meta['superuser'] = array('string','_caution' => 'danger'); $meta['manager'] = array('string'); $meta['profileconfirm'] = array('onoff'); $meta['rememberme'] = array('onoff'); -$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'))); +$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') + ) +); $meta['auth_security_timeout'] = array('numeric'); $meta['securecookie'] = array('onoff'); $meta['remote'] = array('onoff','_caution' => 'security'); @@ -201,6 +208,7 @@ $meta['rss_content'] = array('multichoice','_choices' => array('abstract','diff' $meta['rss_media'] = array('multichoice','_choices' => array('both','pages','media')); $meta['rss_update'] = array('numeric'); $meta['rss_show_summary'] = array('onoff'); +$meta['rss_show_deleted'] = array('onoff'); $meta['_advanced'] = array('fieldset'); $meta['updatecheck'] = array('onoff'); @@ -221,6 +229,10 @@ $meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => ar $meta['readdircache'] = array('numeric'); $meta['search_nslimit'] = array('numeric', '_min' => 0); $meta['search_fragment'] = array('multichoice','_choices' => array('exact', 'starts_with', 'ends_with', 'contains'),); +$meta['trustedproxy'] = array('regex'); + +$meta['_feature_flags'] = ['fieldset']; +$meta['defer_js'] = ['onoff']; $meta['_network'] = array('fieldset'); $meta['dnslookups'] = array('onoff'); @@ -231,10 +243,3 @@ $meta['proxy____user'] = array('string'); $meta['proxy____pass'] = array('password','_code' => 'base64'); $meta['proxy____ssl'] = array('onoff'); $meta['proxy____except'] = array('string'); -$meta['safemodehack'] = array('onoff'); -$meta['ftp____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); -$meta['ftp____port'] = array('numericopt'); -$meta['ftp____user'] = array('string'); -$meta['ftp____pass'] = array('password','_code' => 'base64'); -$meta['ftp____root'] = array('string'); - diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php deleted file mode 100644 index 41af42247..000000000 --- a/lib/plugins/config/settings/extra.class.php +++ /dev/null @@ -1,309 +0,0 @@ -<?php -/** - * additional setting classes specific to these settings - * - * @author Chris Smith <chris@jalakai.co.uk> - */ - -if (!class_exists('setting_sepchar')) { - /** - * Class setting_sepchar - */ - class setting_sepchar extends setting_multichoice { - - /** - * @param string $key - * @param array|null $param array with metadata of setting - */ - function __construct($key,$param=null) { - $str = '_-.'; - for ($i=0;$i<strlen($str);$i++) $this->_choices[] = $str{$i}; - - // call foundation class constructor - parent::__construct($key,$param); - } - } -} - -if (!class_exists('setting_savedir')) { - /** - * Class setting_savedir - */ - class setting_savedir extends setting_string { - - /** - * update changed setting with user provided value $input - * - if changed value fails error check, save it to $this->_input (to allow echoing later) - * - if changed value passes error check, set $this->_local to the new value - * - * @param mixed $input the new value - * @return boolean true if changed, false otherwise (also on error) - */ - function update($input) { - if ($this->is_protected()) return false; - - $value = is_null($this->_local) ? $this->_default : $this->_local; - if ($value == $input) return false; - - if (!init_path($input)) { - $this->_error = true; - $this->_input = $input; - return false; - } - - $this->_local = $input; - return true; - } - } -} - -if (!class_exists('setting_authtype')) { - /** - * Class setting_authtype - */ - class setting_authtype extends setting_multichoice { - - /** - * Receives current values for the setting $key - * - * @param mixed $default default setting value - * @param mixed $local local setting value - * @param mixed $protected protected setting value - */ - function initialize($default,$local,$protected) { - /** @var $plugin_controller Doku_Plugin_Controller */ - global $plugin_controller; - - // retrieve auth types provided by plugins - foreach ($plugin_controller->getList('auth') as $plugin) { - $this->_choices[] = $plugin; - } - - parent::initialize($default,$local,$protected); - } - - /** - * update changed setting with user provided value $input - * - if changed value fails error check, save it to $this->_input (to allow echoing later) - * - if changed value passes error check, set $this->_local to the new value - * - * @param mixed $input the new value - * @return boolean true if changed, false otherwise (also on error) - */ - function update($input) { - /** @var $plugin_controller Doku_Plugin_Controller */ - global $plugin_controller; - - // is an update possible/requested? - $local = $this->_local; // save this, parent::update() may change it - if (!parent::update($input)) return false; // nothing changed or an error caught by parent - $this->_local = $local; // restore original, more error checking to come - - // attempt to load the plugin - $auth_plugin = $plugin_controller->load('auth', $input); - - // @TODO: throw an error in plugin controller instead of returning null - if (is_null($auth_plugin)) { - $this->_error = true; - msg('Cannot load Auth Plugin "' . $input . '"', -1); - return false; - } - - // verify proper instantiation (is this really a plugin?) @TODO use instanceof? implement interface? - if (is_object($auth_plugin) && !method_exists($auth_plugin, 'getPluginName')) { - $this->_error = true; - msg('Cannot create Auth Plugin "' . $input . '"', -1); - return false; - } - - // did we change the auth type? logout - global $conf; - if($conf['authtype'] != $input) { - msg('Authentication system changed. Please re-login.'); - auth_logoff(); - } - - $this->_local = $input; - return true; - } - } -} - -if (!class_exists('setting_im_convert')) { - /** - * Class setting_im_convert - */ - class setting_im_convert extends setting_string { - - /** - * update changed setting with user provided value $input - * - if changed value fails error check, save it to $this->_input (to allow echoing later) - * - if changed value passes error check, set $this->_local to the new value - * - * @param mixed $input the new value - * @return boolean true if changed, false otherwise (also on error) - */ - function update($input) { - if ($this->is_protected()) return false; - - $input = trim($input); - - $value = is_null($this->_local) ? $this->_default : $this->_local; - if ($value == $input) return false; - - if ($input && !file_exists($input)) { - $this->_error = true; - $this->_input = $input; - return false; - } - - $this->_local = $input; - return true; - } - } -} - -if (!class_exists('setting_disableactions')) { - /** - * Class setting_disableactions - */ - class setting_disableactions extends setting_multicheckbox { - - /** - * Build html for label and input of setting - * - * @param admin_plugin_config $plugin object of config plugin - * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) - */ - function html(admin_plugin_config $plugin, $echo=false) { - global $lang; - - // make some language adjustments (there must be a better way) - // transfer some DokuWiki language strings to the plugin - $plugin->addLang($this->_key.'_revisions', $lang['btn_revs']); - foreach ($this->_choices as $choice) { - if (isset($lang['btn_'.$choice])) $plugin->addLang($this->_key.'_'.$choice, $lang['btn_'.$choice]); - } - - return parent::html($plugin, $echo); - } - } -} - -if (!class_exists('setting_compression')) { - /** - * Class setting_compression - */ - class setting_compression extends setting_multichoice { - - var $_choices = array('0'); // 0 = no compression, always supported - - /** - * Receives current values for the setting $key - * - * @param mixed $default default setting value - * @param mixed $local local setting value - * @param mixed $protected protected setting value - */ - function initialize($default,$local,$protected) { - - // populate _choices with the compression methods supported by this php installation - if (function_exists('gzopen')) $this->_choices[] = 'gz'; - if (function_exists('bzopen')) $this->_choices[] = 'bz2'; - - parent::initialize($default,$local,$protected); - } - } -} - -if (!class_exists('setting_license')) { - /** - * Class setting_license - */ - class setting_license extends setting_multichoice { - - var $_choices = array(''); // none choosen - - /** - * Receives current values for the setting $key - * - * @param mixed $default default setting value - * @param mixed $local local setting value - * @param mixed $protected protected setting value - */ - function initialize($default,$local,$protected) { - global $license; - - foreach($license as $key => $data){ - $this->_choices[] = $key; - $this->lang[$this->_key.'_o_'.$key] = $data['name']; // stored in setting - } - - parent::initialize($default,$local,$protected); - } - } -} - - -if (!class_exists('setting_renderer')) { - /** - * Class setting_renderer - */ - class setting_renderer extends setting_multichoice { - var $_prompts = array(); - var $_format = null; - - /** - * Receives current values for the setting $key - * - * @param mixed $default default setting value - * @param mixed $local local setting value - * @param mixed $protected protected setting value - */ - function initialize($default,$local,$protected) { - $format = $this->_format; - - foreach (plugin_list('renderer') as $plugin) { - $renderer = plugin_load('renderer',$plugin); - if (method_exists($renderer,'canRender') && $renderer->canRender($format)) { - $this->_choices[] = $plugin; - - $info = $renderer->getInfo(); - $this->_prompts[$plugin] = $info['name']; - } - } - - parent::initialize($default,$local,$protected); - } - - /** - * Build html for label and input of setting - * - * @param admin_plugin_config $plugin object of config plugin - * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) - */ - function html(admin_plugin_config $plugin, $echo=false) { - - // make some language adjustments (there must be a better way) - // transfer some plugin names to the config plugin - foreach($this->_choices as $choice) { - if(!$plugin->getLang($this->_key . '_o_' . $choice)) { - if(!isset($this->_prompts[$choice])) { - $plugin->addLang( - $this->_key . '_o_' . $choice, - sprintf($plugin->getLang('renderer__core'), $choice) - ); - } else { - $plugin->addLang( - $this->_key . '_o_' . $choice, - sprintf($plugin->getLang('renderer__plugin'), $this->_prompts[$choice]) - ); - } - } - } - return parent::html($plugin, $echo); - } - } -} diff --git a/lib/plugins/extension/_test/extension.test.php b/lib/plugins/extension/_test/extension.test.php index d4f13201d..1f8e2fca7 100644 --- a/lib/plugins/extension/_test/extension.test.php +++ b/lib/plugins/extension/_test/extension.test.php @@ -6,8 +6,8 @@ * makes protected methods accessible */ class mock_helper_plugin_extension_extension extends helper_plugin_extension_extension { - public function find_folders(&$result, $base, $default_type = 'plugin', $dir = '') { - return parent::find_folders($result, $base, $default_type, $dir); + public function findFolders(&$result, $base, $default_type = 'plugin', $dir = '') { + return parent::findFolders($result, $base, $default_type, $dir); } } @@ -78,7 +78,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $tdir = dirname(__FILE__).'/testdata'; $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/plugin1", 'plugin'); + $ok = $extension->findFolders($result, "$tdir/plugin1", 'plugin'); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -86,7 +86,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('plugin1', $this->extdir($result['old'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/plugin2", 'plugin'); + $ok = $extension->findFolders($result, "$tdir/plugin2", 'plugin'); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('plugin', $result['new'][0]['type']); @@ -94,7 +94,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('plugin2', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/plgsub3", 'plugin'); + $ok = $extension->findFolders($result, "$tdir/plgsub3", 'plugin'); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -102,7 +102,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('plgsub3/plugin3', $this->extdir($result['old'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/plgsub4", 'plugin'); + $ok = $extension->findFolders($result, "$tdir/plgsub4", 'plugin'); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('plugin', $result['new'][0]['type']); @@ -110,7 +110,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('plgsub4/plugin4', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/plgfoo5", 'plugin'); + $ok = $extension->findFolders($result, "$tdir/plgfoo5", 'plugin'); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('plugin', $result['new'][0]['type']); @@ -118,7 +118,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('plgfoo5', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/plgsub6/plgfoo6", 'plugin'); + $ok = $extension->findFolders($result, "$tdir/plgsub6/plgfoo6", 'plugin'); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('plugin', $result['new'][0]['type']); @@ -126,7 +126,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('plgsub6/plgfoo6', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/either1", 'plugin'); + $ok = $extension->findFolders($result, "$tdir/either1", 'plugin'); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -134,7 +134,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('either1', $this->extdir($result['old'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/eithersub2/either2", 'plugin'); + $ok = $extension->findFolders($result, "$tdir/eithersub2/either2", 'plugin'); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -147,7 +147,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $tdir = dirname(__FILE__).'/testdata'; $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/template1", 'template'); + $ok = $extension->findFolders($result, "$tdir/template1", 'template'); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -155,7 +155,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('template1', $this->extdir($result['old'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/template2", 'template'); + $ok = $extension->findFolders($result, "$tdir/template2", 'template'); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('template', $result['new'][0]['type']); @@ -163,7 +163,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('template2', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/tplsub3", 'template'); + $ok = $extension->findFolders($result, "$tdir/tplsub3", 'template'); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -171,7 +171,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('tplsub3/template3', $this->extdir($result['old'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/tplsub4", 'template'); + $ok = $extension->findFolders($result, "$tdir/tplsub4", 'template'); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('template', $result['new'][0]['type']); @@ -179,7 +179,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('tplsub4/template4', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/tplfoo5", 'template'); + $ok = $extension->findFolders($result, "$tdir/tplfoo5", 'template'); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('template', $result['new'][0]['type']); @@ -187,7 +187,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('tplfoo5', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/tplsub6/tplfoo6", 'template'); + $ok = $extension->findFolders($result, "$tdir/tplsub6/tplfoo6", 'template'); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('template', $result['new'][0]['type']); @@ -195,7 +195,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('tplsub6/tplfoo6', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/either1", 'template'); + $ok = $extension->findFolders($result, "$tdir/either1", 'template'); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -203,7 +203,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('either1', $this->extdir($result['old'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/eithersub2/either2", 'template'); + $ok = $extension->findFolders($result, "$tdir/eithersub2/either2", 'template'); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -216,7 +216,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $tdir = dirname(__FILE__).'/testdata'; $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/template1"); + $ok = $extension->findFolders($result, "$tdir/template1"); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -224,7 +224,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('template1', $this->extdir($result['old'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/template2"); + $ok = $extension->findFolders($result, "$tdir/template2"); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('template', $result['new'][0]['type']); @@ -232,7 +232,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('template2', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/tplsub3"); + $ok = $extension->findFolders($result, "$tdir/tplsub3"); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -240,7 +240,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('tplsub3/template3', $this->extdir($result['old'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/tplsub4"); + $ok = $extension->findFolders($result, "$tdir/tplsub4"); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('template', $result['new'][0]['type']); @@ -248,7 +248,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('tplsub4/template4', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/tplfoo5"); + $ok = $extension->findFolders($result, "$tdir/tplfoo5"); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('template', $result['new'][0]['type']); @@ -256,7 +256,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('tplfoo5', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/tplsub6/tplfoo6"); + $ok = $extension->findFolders($result, "$tdir/tplsub6/tplfoo6"); $this->assertTrue($ok); $this->assertEquals(1, count($result['new'])); $this->assertEquals('template', $result['new'][0]['type']); @@ -264,7 +264,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('tplsub6/tplfoo6', $this->extdir($result['new'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/either1"); + $ok = $extension->findFolders($result, "$tdir/either1"); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -272,7 +272,7 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $this->assertEquals('either1', $this->extdir($result['old'][0]['tmp'])); $result = array('old' => array(), 'new' => array()); - $ok = $extension->find_folders($result, "$tdir/eithersub2/either2"); + $ok = $extension->findFolders($result, "$tdir/eithersub2/either2"); $this->assertTrue($ok); $this->assertEquals(0, count($result['new'])); $this->assertEquals(1, count($result['old'])); @@ -292,4 +292,4 @@ class helper_plugin_extension_extension_test extends DokuWikiTest { $dir = trim(substr($dir, $len), '/'); return $dir; } -}
\ No newline at end of file +} diff --git a/lib/plugins/extension/action.php b/lib/plugins/extension/action.php index 9e48f134b..3bb044825 100644 --- a/lib/plugins/extension/action.php +++ b/lib/plugins/extension/action.php @@ -5,10 +5,8 @@ * @author Andreas Gohr <andi@splitbrain.org> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -class action_plugin_extension extends DokuWiki_Action_Plugin { +class action_plugin_extension extends DokuWiki_Action_Plugin +{ /** * Registers a callback function for a given event @@ -16,10 +14,9 @@ class action_plugin_extension extends DokuWiki_Action_Plugin { * @param Doku_Event_Handler $controller DokuWiki's event controller object * @return void */ - public function register(Doku_Event_Handler $controller) { - + public function register(Doku_Event_Handler $controller) + { $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'info'); - } /** @@ -28,22 +25,25 @@ class action_plugin_extension extends DokuWiki_Action_Plugin { * @param Doku_Event $event * @param $param */ - public function info(Doku_Event &$event, $param) { + public function info(Doku_Event $event, $param) + { global $USERINFO; global $INPUT; - if($event->data != 'plugin_extension') return; + if ($event->data != 'plugin_extension') return; $event->preventDefault(); $event->stopPropagation(); - if(empty($_SERVER['REMOTE_USER']) || !auth_isadmin($_SERVER['REMOTE_USER'], $USERINFO['grps'])) { + /** @var admin_plugin_extension $admin */ + $admin = plugin_load('admin', 'extension'); + if (!$admin->isAccessibleByCurrentUser()) { http_status(403); echo 'Forbidden'; exit; } $ext = $INPUT->str('ext'); - if(!$ext) { + if (!$ext) { http_status(400); echo 'no extension given'; return; @@ -54,10 +54,9 @@ class action_plugin_extension extends DokuWiki_Action_Plugin { $extension->setExtension($ext); $act = $INPUT->str('act'); - switch($act) { + switch ($act) { case 'enable': case 'disable': - $json = new JSON(); $extension->$act(); //enables/disables $reverse = ($act == 'disable') ? 'enable' : 'disable'; @@ -69,7 +68,7 @@ class action_plugin_extension extends DokuWiki_Action_Plugin { ); header('Content-Type: application/json'); - echo $json->encode($return); + echo json_encode($return); break; case 'info': @@ -77,9 +76,7 @@ class action_plugin_extension extends DokuWiki_Action_Plugin { /** @var helper_plugin_extension_list $list */ $list = plugin_load('helper', 'extension_list'); header('Content-Type: text/html; charset=utf-8'); - echo $list->make_info($extension); + echo $list->makeInfo($extension); } } - } - diff --git a/lib/plugins/extension/admin.php b/lib/plugins/extension/admin.php index 71257cf43..7e7eb60d4 100644 --- a/lib/plugins/extension/admin.php +++ b/lib/plugins/extension/admin.php @@ -6,13 +6,11 @@ * @author Michael Hamann <michael@content-space.de> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - /** * Admin part of the extension manager */ -class admin_plugin_extension extends DokuWiki_Admin_Plugin { +class admin_plugin_extension extends DokuWiki_Admin_Plugin +{ protected $infoFor = null; /** @var helper_plugin_extension_gui */ protected $gui; @@ -22,39 +20,45 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { * * loads additional helpers */ - public function __construct() { + public function __construct() + { $this->gui = plugin_load('helper', 'extension_gui'); } /** * @return int sort number in admin menu */ - public function getMenuSort() { + public function getMenuSort() + { return 0; } /** * @return bool true if only access for superuser, false is for superusers and moderators */ - public function forAdminOnly() { + public function forAdminOnly() + { return true; } /** * Execute the requested action(s) and initialize the plugin repository */ - public function handle() { + public function handle() + { global $INPUT; // initialize the remote repository /* @var helper_plugin_extension_repository $repository */ $repository = $this->loadHelper('extension_repository'); - if(!$repository->hasAccess()) { - $url = $this->gui->tabURL('', array('purge' => 1)); - msg($this->getLang('repo_error').' [<a href="'.$url.'">'.$this->getLang('repo_retry').'</a>]', -1); + if (!$repository->hasAccess(!$INPUT->bool('purge'))) { + $url = $this->gui->tabURL('', ['purge' => 1], '&'); + msg($this->getLang('repo_error'). + ' [<a href="'.$url.'">'.$this->getLang('repo_retry').'</a>]', -1 + ); } - if(!in_array('ssl', stream_get_transports())) { + if (!in_array('ssl', stream_get_transports())) { msg($this->getLang('nossl'), -1); } @@ -62,82 +66,104 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { $extension = $this->loadHelper('extension_extension'); try { - if($INPUT->post->has('fn') && checkSecurityToken()) { + if ($INPUT->post->has('fn') && checkSecurityToken()) { $actions = $INPUT->post->arr('fn'); - foreach($actions as $action => $extensions) { - foreach($extensions as $extname => $label) { - switch($action) { + foreach ($actions as $action => $extensions) { + foreach ($extensions as $extname => $label) { + switch ($action) { case 'install': case 'reinstall': case 'update': $extension->setExtension($extname); $installed = $extension->installOrUpdate(); - foreach($installed as $ext => $info) { - msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); + foreach ($installed as $ext => $info) { + msg(sprintf( + $this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), + $info['base']), 1 + ); } break; case 'uninstall': $extension->setExtension($extname); $status = $extension->uninstall(); - if($status) { - msg(sprintf($this->getLang('msg_delete_success'), hsc($extension->getDisplayName())), 1); + if ($status) { + msg(sprintf( + $this->getLang('msg_delete_success'), + hsc($extension->getDisplayName())), 1 + ); } else { - msg(sprintf($this->getLang('msg_delete_failed'), hsc($extension->getDisplayName())), -1); + msg(sprintf( + $this->getLang('msg_delete_failed'), + hsc($extension->getDisplayName())), -1 + ); } break; - case 'enable'; + case 'enable': $extension->setExtension($extname); $status = $extension->enable(); - if($status !== true) { + if ($status !== true) { msg($status, -1); } else { - msg(sprintf($this->getLang('msg_enabled'), hsc($extension->getDisplayName())), 1); + msg(sprintf( + $this->getLang('msg_enabled'), + hsc($extension->getDisplayName())), 1 + ); } break; - case 'disable'; + case 'disable': $extension->setExtension($extname); $status = $extension->disable(); - if($status !== true) { + if ($status !== true) { msg($status, -1); } else { - msg(sprintf($this->getLang('msg_disabled'), hsc($extension->getDisplayName())), 1); + msg(sprintf( + $this->getLang('msg_disabled'), + hsc($extension->getDisplayName())), 1 + ); } break; } } } - send_redirect($this->gui->tabURL('', array(), '&', true)); - } elseif($INPUT->post->str('installurl') && checkSecurityToken()) { - $installed = $extension->installFromURL($INPUT->post->str('installurl')); - foreach($installed as $ext => $info) { - msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); + send_redirect($this->gui->tabURL('', [], '&', true)); + } elseif ($INPUT->post->str('installurl') && checkSecurityToken()) { + $installed = $extension->installFromURL( + $INPUT->post->str('installurl'), + $INPUT->post->bool('overwrite')); + foreach ($installed as $ext => $info) { + msg(sprintf( + $this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), + $info['base']), 1 + ); } - send_redirect($this->gui->tabURL('', array(), '&', true)); - } elseif(isset($_FILES['installfile']) && checkSecurityToken()) { - $installed = $extension->installFromUpload('installfile'); - foreach($installed as $ext => $info) { - msg(sprintf($this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), $info['base']), 1); + send_redirect($this->gui->tabURL('', [], '&', true)); + } elseif (isset($_FILES['installfile']) && checkSecurityToken()) { + $installed = $extension->installFromUpload('installfile', $INPUT->post->bool('overwrite')); + foreach ($installed as $ext => $info) { + msg(sprintf( + $this->getLang('msg_'.$info['type'].'_'.$info['action'].'_success'), + $info['base']), 1 + ); } - send_redirect($this->gui->tabURL('', array(), '&', true)); + send_redirect($this->gui->tabURL('', [], '&', true)); } - - } catch(Exception $e) { + } catch (Exception $e) { msg($e->getMessage(), -1); - send_redirect($this->gui->tabURL('', array(), '&', true)); + send_redirect($this->gui->tabURL('', [], '&', true)); } - } /** * Render HTML output */ - public function html() { - ptln('<h1>'.$this->getLang('menu').'</h1>'); - ptln('<div id="extension__manager">'); + public function html() + { + echo '<h1>'.$this->getLang('menu').'</h1>'.DOKU_LF; + echo '<div id="extension__manager">'.DOKU_LF; $this->gui->tabNavigation(); - switch($this->gui->currentTab()) { + switch ($this->gui->currentTab()) { case 'search': $this->gui->tabSearch(); break; @@ -152,8 +178,8 @@ class admin_plugin_extension extends DokuWiki_Admin_Plugin { $this->gui->tabPlugins(); } - ptln('</div>'); + echo '</div>'.DOKU_LF; } } -// vim:ts=4:sw=4:et:
\ No newline at end of file +// vim:ts=4:sw=4:et: diff --git a/lib/plugins/extension/cli.php b/lib/plugins/extension/cli.php new file mode 100644 index 000000000..a293f8728 --- /dev/null +++ b/lib/plugins/extension/cli.php @@ -0,0 +1,372 @@ +<?php + +use splitbrain\phpcli\Colors; + +/** + * Class cli_plugin_extension + * + * Command Line component for the extension manager + * + * @license GPL2 + * @author Andreas Gohr <andi@splitbrain.org> + */ +class cli_plugin_extension extends DokuWiki_CLI_Plugin +{ + /** @inheritdoc */ + protected function setup(\splitbrain\phpcli\Options $options) + { + // general setup + $options->setHelp( + "Manage plugins and templates for this DokuWiki instance\n\n" . + "Status codes:\n" . + " i - installed\n" . + " b - bundled with DokuWiki\n" . + " g - installed via git\n" . + " d - disabled\n" . + " u - update available\n" + ); + + // search + $options->registerCommand('search', 'Search for an extension'); + $options->registerOption('max', 'Maximum number of results (default 10)', 'm', 'number', 'search'); + $options->registerOption('verbose', 'Show detailed extension information', 'v', false, 'search'); + $options->registerArgument('query', 'The keyword(s) to search for', true, 'search'); + + // list + $options->registerCommand('list', 'List installed extensions'); + $options->registerOption('verbose', 'Show detailed extension information', 'v', false, 'list'); + $options->registerOption('filter', 'Filter by this status', 'f', 'status', 'list'); + + // upgrade + $options->registerCommand('upgrade', 'Update all installed extensions to their latest versions'); + + // install + $options->registerCommand('install', 'Install or upgrade extensions'); + $options->registerArgument('extensions...', 'One or more extensions to install', true, 'install'); + + // uninstall + $options->registerCommand('uninstall', 'Uninstall a new extension'); + $options->registerArgument('extensions...', 'One or more extensions to install', true, 'uninstall'); + + // enable + $options->registerCommand('enable', 'Enable installed extensions'); + $options->registerArgument('extensions...', 'One or more extensions to enable', true, 'enable'); + + // disable + $options->registerCommand('disable', 'Disable installed extensions'); + $options->registerArgument('extensions...', 'One or more extensions to disable', true, 'disable'); + + + } + + /** @inheritdoc */ + protected function main(\splitbrain\phpcli\Options $options) + { + /** @var helper_plugin_extension_repository $repo */ + $repo = plugin_load('helper', 'extension_repository'); + if (!$repo->hasAccess(false)) { + $this->warning('Extension Repository API is not accessible, no remote info available!'); + } + + switch ($options->getCmd()) { + case 'list': + $ret = $this->cmdList($options->getOpt('verbose'), $options->getOpt('filter', '')); + break; + case 'search': + $ret = $this->cmdSearch( + implode(' ', $options->getArgs()), + $options->getOpt('verbose'), + (int)$options->getOpt('max', 10) + ); + break; + case 'install': + $ret = $this->cmdInstall($options->getArgs()); + break; + case 'uninstall': + $ret = $this->cmdUnInstall($options->getArgs()); + break; + case 'enable': + $ret = $this->cmdEnable(true, $options->getArgs()); + break; + case 'disable': + $ret = $this->cmdEnable(false, $options->getArgs()); + break; + case 'upgrade': + $ret = $this->cmdUpgrade(); + break; + default: + echo $options->help(); + $ret = 0; + } + + exit($ret); + } + + /** + * Upgrade all extensions + * + * @return int + */ + protected function cmdUpgrade() + { + /* @var helper_plugin_extension_extension $ext */ + $ext = $this->loadHelper('extension_extension'); + $list = $this->getInstalledExtensions(); + + $ok = 0; + foreach ($list as $extname) { + $ext->setExtension($extname); + $date = $ext->getInstalledVersion(); + $avail = $ext->getLastUpdate(); + if ($avail && $avail > $date) { + $ok += $this->cmdInstall([$extname]); + } + } + + return $ok; + } + + /** + * Enable or disable one or more extensions + * + * @param bool $set + * @param string[] $extensions + * @return int + */ + protected function cmdEnable($set, $extensions) + { + /* @var helper_plugin_extension_extension $ext */ + $ext = $this->loadHelper('extension_extension'); + + $ok = 0; + foreach ($extensions as $extname) { + $ext->setExtension($extname); + if (!$ext->isInstalled()) { + $this->error(sprintf('Extension %s is not installed', $ext->getID())); + $ok += 1; + continue; + } + + if ($set) { + $status = $ext->enable(); + $msg = 'msg_enabled'; + } else { + $status = $ext->disable(); + $msg = 'msg_disabled'; + } + + if ($status !== true) { + $this->error($status); + $ok += 1; + continue; + } else { + $this->success(sprintf($this->getLang($msg), $ext->getID())); + } + } + + return $ok; + } + + /** + * Uninstall one or more extensions + * + * @param string[] $extensions + * @return int + */ + protected function cmdUnInstall($extensions) + { + /* @var helper_plugin_extension_extension $ext */ + $ext = $this->loadHelper('extension_extension'); + + $ok = 0; + foreach ($extensions as $extname) { + $ext->setExtension($extname); + if (!$ext->isInstalled()) { + $this->error(sprintf('Extension %s is not installed', $ext->getID())); + $ok += 1; + continue; + } + + $status = $ext->uninstall(); + if ($status) { + $this->success(sprintf($this->getLang('msg_delete_success'), $ext->getID())); + } else { + $this->error(sprintf($this->getLang('msg_delete_failed'), hsc($ext->getID()))); + $ok = 1; + } + } + + return $ok; + } + + /** + * Install one or more extensions + * + * @param string[] $extensions + * @return int + */ + protected function cmdInstall($extensions) + { + /* @var helper_plugin_extension_extension $ext */ + $ext = $this->loadHelper('extension_extension'); + + $ok = 0; + foreach ($extensions as $extname) { + $ext->setExtension($extname); + + if (!$ext->getDownloadURL()) { + $ok += 1; + $this->error( + sprintf('Could not find download for %s', $ext->getID()) + ); + continue; + } + + try { + $installed = $ext->installOrUpdate(); + foreach ($installed as $name => $info) { + $this->success(sprintf( + $this->getLang('msg_' . $info['type'] . '_' . $info['action'] . '_success'), + $info['base']) + ); + } + } catch (Exception $e) { + $this->error($e->getMessage()); + $ok += 1; + } + } + return $ok; + } + + /** + * Search for an extension + * + * @param string $query + * @param bool $showdetails + * @param int $max + * @return int + * @throws \splitbrain\phpcli\Exception + */ + protected function cmdSearch($query, $showdetails, $max) + { + /** @var helper_plugin_extension_repository $repository */ + $repository = $this->loadHelper('extension_repository'); + $result = $repository->search($query); + if ($max) { + $result = array_slice($result, 0, $max); + } + + $this->listExtensions($result, $showdetails); + return 0; + } + + /** + * @param bool $showdetails + * @param string $filter + * @return int + * @throws \splitbrain\phpcli\Exception + */ + protected function cmdList($showdetails, $filter) + { + $list = $this->getInstalledExtensions(); + $this->listExtensions($list, $showdetails, $filter); + + return 0; + } + + /** + * Get all installed extensions + * + * @return array + */ + protected function getInstalledExtensions() + { + /** @var Doku_Plugin_Controller $plugin_controller */ + global $plugin_controller; + $pluginlist = $plugin_controller->getList('', true); + $tpllist = glob(DOKU_INC . 'lib/tpl/*', GLOB_ONLYDIR); + $tpllist = array_map(function ($path) { + return 'template:' . basename($path); + }, $tpllist); + $list = array_merge($pluginlist, $tpllist); + sort($list); + return $list; + } + + /** + * List the given extensions + * + * @param string[] $list + * @param bool $details display details + * @param string $filter filter for this status + * @throws \splitbrain\phpcli\Exception + */ + protected function listExtensions($list, $details, $filter = '') + { + /** @var helper_plugin_extension_extension $ext */ + $ext = $this->loadHelper('extension_extension'); + $tr = new \splitbrain\phpcli\TableFormatter($this->colors); + + + foreach ($list as $name) { + $ext->setExtension($name); + + $status = ''; + if ($ext->isInstalled()) { + $date = $ext->getInstalledVersion(); + $avail = $ext->getLastUpdate(); + $status = 'i'; + if ($avail && $avail > $date) { + $vcolor = Colors::C_RED; + $status .= 'u'; + } else { + $vcolor = Colors::C_GREEN; + } + if ($ext->isGitControlled()) $status = 'g'; + if ($ext->isBundled()) $status = 'b'; + if ($ext->isEnabled()) { + $ecolor = Colors::C_BROWN; + } else { + $ecolor = Colors::C_DARKGRAY; + $status .= 'd'; + } + } else { + $ecolor = null; + $date = $ext->getLastUpdate(); + $vcolor = null; + } + + if ($filter && strpos($status, $filter) === false) { + continue; + } + + echo $tr->format( + [20, 3, 12, '*'], + [ + $ext->getID(), + $status, + $date, + strip_tags(sprintf( + $this->getLang('extensionby'), + $ext->getDisplayName(), + $this->colors->wrap($ext->getAuthor(), Colors::C_PURPLE)) + ) + ], + [ + $ecolor, + Colors::C_YELLOW, + $vcolor, + null, + ] + ); + + if (!$details) continue; + + echo $tr->format( + [5, '*'], + ['', $ext->getDescription()], + [null, Colors::C_CYAN] + ); + } + } +} diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index e77528b97..5ddf3323e 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -6,14 +6,14 @@ * @author Michael Hamann <michael@content-space.de> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); -if(!defined('DOKU_TPLLIB')) define('DOKU_TPLLIB', DOKU_INC.'lib/tpl/'); +use dokuwiki\HTTP\DokuHTTPClient; +use dokuwiki\Extension\PluginController; /** * Class helper_plugin_extension_extension represents a single extension (plugin or template) */ -class helper_plugin_extension_extension extends DokuWiki_Plugin { +class helper_plugin_extension_extension extends DokuWiki_Plugin +{ private $id; private $base; private $is_template = false; @@ -26,13 +26,25 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** @var array list of temporary directories */ private $temporary = array(); + /** @var string where templates are installed to */ + private $tpllib = ''; + + /** + * helper_plugin_extension_extension constructor. + */ + public function __construct() + { + $this->tpllib = dirname(tpl_incdir()).'/'; + } + /** * Destructor * * deletes any dangling temporary directories */ - public function __destruct() { - foreach($this->temporary as $dir){ + public function __destruct() + { + foreach ($this->temporary as $dir) { io_rmdir($dir, true); } } @@ -40,7 +52,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * @return bool false, this component is not a singleton */ - public function isSingleton() { + public function isSingleton() + { return false; } @@ -50,12 +63,13 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @param string $id The id of the extension (prefixed with template: for templates) * @return bool If some (local or remote) data was found */ - public function setExtension($id) { + public function setExtension($id) + { $id = cleanID($id); $this->id = $id; $this->base = $id; - if(substr($id, 0 , 9) == 'template:'){ + if (substr($id, 0, 9) == 'template:') { $this->base = substr($id, 9); $this->is_template = true; } else { @@ -85,7 +99,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool If the extension is installed locally */ - public function isInstalled() { + public function isInstalled() + { return is_dir($this->getInstallDir()); } @@ -94,8 +109,9 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool */ - public function isGitControlled() { - if(!$this->isInstalled()) return false; + public function isGitControlled() + { + if (!$this->isInstalled()) return false; return is_dir($this->getInstallDir().'/.git'); } @@ -104,13 +120,17 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool If the extension is bundled */ - public function isBundled() { + public function isBundled() + { if (!empty($this->remoteInfo['bundled'])) return $this->remoteInfo['bundled']; - return in_array($this->id, - array( - 'authad', 'authldap', 'authmysql', 'authpdo', 'authpgsql', 'authplain', 'acl', 'info', 'extension', - 'revert', 'popularity', 'config', 'safefnrecode', 'styling', 'testing', 'template:dokuwiki' - ) + return in_array( + $this->id, + array( + 'authad', 'authldap', 'authpdo', 'authplain', + 'acl', 'config', 'extension', 'info', 'popularity', 'revert', + 'safefnrecode', 'styling', 'testing', 'usermanager', + 'template:dokuwiki', + ) ); } @@ -119,12 +139,13 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool if the extension is protected */ - public function isProtected() { + public function isProtected() + { // never allow deinstalling the current auth plugin: global $conf; if ($this->id == $conf['authtype']) return true; - /** @var Doku_Plugin_Controller $plugin_controller */ + /** @var PluginController $plugin_controller */ global $plugin_controller; $cascade = $plugin_controller->getCascade(); return (isset($cascade['protected'][$this->id]) && $cascade['protected'][$this->id]); @@ -135,7 +156,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool If the extension is installed in the correct directory */ - public function isInWrongFolder() { + public function isInWrongFolder() + { return $this->base != $this->getBase(); } @@ -144,15 +166,16 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool If the extension is enabled */ - public function isEnabled() { + public function isEnabled() + { global $conf; - if($this->isTemplate()){ + if ($this->isTemplate()) { return ($conf['template'] == $this->getBase()); } - /* @var Doku_Plugin_Controller $plugin_controller */ + /* @var PluginController $plugin_controller */ global $plugin_controller; - return !$plugin_controller->isdisabled($this->base); + return $plugin_controller->isEnabled($this->base); } /** @@ -160,9 +183,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool If an update is available */ - public function updateAvailable() { - if(!$this->isInstalled()) return false; - if($this->isBundled()) return false; + public function updateAvailable() + { + if (!$this->isInstalled()) return false; + if ($this->isBundled()) return false; $lastupdate = $this->getLastUpdate(); if ($lastupdate === false) return false; $installed = $this->getInstalledVersion(); @@ -175,7 +199,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool If this extension is a template */ - public function isTemplate() { + public function isTemplate() + { return $this->is_template; } @@ -186,7 +211,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string */ - public function getID() { + public function getID() + { return $this->id; } @@ -195,7 +221,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string The name of the installation directory */ - public function getInstallName() { + public function getInstallName() + { return $this->base; } @@ -205,7 +232,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string The basename */ - public function getBase() { + public function getBase() + { if (!empty($this->localInfo['base'])) return $this->localInfo['base']; return $this->base; } @@ -215,7 +243,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string The display name */ - public function getDisplayName() { + public function getDisplayName() + { if (!empty($this->localInfo['name'])) return $this->localInfo['name']; if (!empty($this->remoteInfo['name'])) return $this->remoteInfo['name']; return $this->base; @@ -226,7 +255,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The name of the author or false if there is none */ - public function getAuthor() { + public function getAuthor() + { if (!empty($this->localInfo['author'])) return $this->localInfo['author']; if (!empty($this->remoteInfo['author'])) return $this->remoteInfo['author']; return false; @@ -237,7 +267,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The email address or false if there is none */ - public function getEmail() { + public function getEmail() + { // email is only in the local data if (!empty($this->localInfo['email'])) return $this->localInfo['email']; return false; @@ -248,7 +279,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The md5sum of the email if there is any, false otherwise */ - public function getEmailID() { + public function getEmailID() + { if (!empty($this->remoteInfo['emailid'])) return $this->remoteInfo['emailid']; if (!empty($this->localInfo['email'])) return md5($this->localInfo['email']); return false; @@ -259,7 +291,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string The description */ - public function getDescription() { + public function getDescription() + { if (!empty($this->localInfo['desc'])) return $this->localInfo['desc']; if (!empty($this->remoteInfo['description'])) return $this->remoteInfo['description']; return ''; @@ -270,9 +303,11 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string The URL */ - public function getURL() { + public function getURL() + { if (!empty($this->localInfo['url'])) return $this->localInfo['url']; - return 'https://www.dokuwiki.org/'.($this->isTemplate() ? 'template' : 'plugin').':'.$this->getBase(); + return 'https://www.dokuwiki.org/'. + ($this->isTemplate() ? 'template' : 'plugin').':'.$this->getBase(); } /** @@ -280,7 +315,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The version, usually in the form yyyy-mm-dd if there is any */ - public function getInstalledVersion() { + public function getInstalledVersion() + { if (!empty($this->localInfo['date'])) return $this->localInfo['date']; if ($this->isInstalled()) return $this->getLang('unknownversion'); return false; @@ -291,7 +327,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The date of the last update or false if not available */ - public function getUpdateDate() { + public function getUpdateDate() + { if (!empty($this->managerData['updated'])) return $this->managerData['updated']; return $this->getInstallDate(); } @@ -301,7 +338,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The date of the installation or false if not available */ - public function getInstallDate() { + public function getInstallDate() + { if (!empty($this->managerData['installed'])) return $this->managerData['installed']; return false; } @@ -311,7 +349,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return array The base names of the dependencies */ - public function getDependencies() { + public function getDependencies() + { if (!empty($this->remoteInfo['dependencies'])) return $this->remoteInfo['dependencies']; return array(); } @@ -321,13 +360,14 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return array The base names of the missing dependencies */ - public function getMissingDependencies() { - /* @var Doku_Plugin_Controller $plugin_controller */ + public function getMissingDependencies() + { + /* @var PluginController $plugin_controller */ global $plugin_controller; $dependencies = $this->getDependencies(); $missing_dependencies = array(); foreach ($dependencies as $dependency) { - if ($plugin_controller->isdisabled($dependency)) { + if (!$plugin_controller->isEnabled($dependency)) { $missing_dependencies[] = $dependency; } } @@ -339,7 +379,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return array The names of the conflicting extensions */ - public function getConflicts() { + public function getConflicts() + { if (!empty($this->remoteInfo['conflicts'])) return $this->remoteInfo['conflicts']; return array(); } @@ -349,7 +390,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return array The names of similar extensions */ - public function getSimilarExtensions() { + public function getSimilarExtensions() + { if (!empty($this->remoteInfo['similar'])) return $this->remoteInfo['similar']; return array(); } @@ -359,7 +401,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return array The names of the tags of the extension */ - public function getTags() { + public function getTags() + { if (!empty($this->remoteInfo['tags'])) return $this->remoteInfo['tags']; return array(); } @@ -369,7 +412,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return float|bool The popularity information or false if it isn't available */ - public function getPopularity() { + public function getPopularity() + { if (!empty($this->remoteInfo['popularity'])) return $this->remoteInfo['popularity']; return false; } @@ -380,7 +424,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The security warning if there is any, false otherwise */ - public function getSecurityWarning() { + public function getSecurityWarning() + { if (!empty($this->remoteInfo['securitywarning'])) return $this->remoteInfo['securitywarning']; return false; } @@ -390,7 +435,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The security issue if there is any, false otherwise */ - public function getSecurityIssue() { + public function getSecurityIssue() + { if (!empty($this->remoteInfo['securityissue'])) return $this->remoteInfo['securityissue']; return false; } @@ -400,7 +446,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The screenshot URL if there is any, false otherwise */ - public function getScreenshotURL() { + public function getScreenshotURL() + { if (!empty($this->remoteInfo['screenshoturl'])) return $this->remoteInfo['screenshoturl']; return false; } @@ -410,7 +457,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The thumbnail URL if there is any, false otherwise */ - public function getThumbnailURL() { + public function getThumbnailURL() + { if (!empty($this->remoteInfo['thumbnailurl'])) return $this->remoteInfo['thumbnailurl']; return false; } @@ -419,7 +467,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The previously used download URL, false if the extension has been installed manually */ - public function getLastDownloadURL() { + public function getLastDownloadURL() + { if (!empty($this->managerData['downloadurl'])) return $this->managerData['downloadurl']; return false; } @@ -429,7 +478,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The download URL if there is any, false otherwise */ - public function getDownloadURL() { + public function getDownloadURL() + { if (!empty($this->remoteInfo['downloadurl'])) return $this->remoteInfo['downloadurl']; return false; } @@ -439,7 +489,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool If the download URL has changed */ - public function hasDownloadURLChanged() { + public function hasDownloadURLChanged() + { $lasturl = $this->getLastDownloadURL(); $currenturl = $this->getDownloadURL(); return ($lasturl && $currenturl && $lasturl != $currenturl); @@ -450,7 +501,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The bug tracker URL if there is any, false otherwise */ - public function getBugtrackerURL() { + public function getBugtrackerURL() + { if (!empty($this->remoteInfo['bugtracker'])) return $this->remoteInfo['bugtracker']; return false; } @@ -460,7 +512,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The URL of the source repository if there is any, false otherwise */ - public function getSourcerepoURL() { + public function getSourcerepoURL() + { if (!empty($this->remoteInfo['sourcerepo'])) return $this->remoteInfo['sourcerepo']; return false; } @@ -470,7 +523,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The donation URL if there is any, false otherwise */ - public function getDonationURL() { + public function getDonationURL() + { if (!empty($this->remoteInfo['donationurl'])) return $this->remoteInfo['donationurl']; return false; } @@ -480,7 +534,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return array The type(s) as array of strings */ - public function getTypes() { + public function getTypes() + { if (!empty($this->remoteInfo['types'])) return $this->remoteInfo['types']; if ($this->isTemplate()) return array(32 => 'template'); return array(); @@ -491,7 +546,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return array The versions in the form yyyy-mm-dd => ('label' => label, 'implicit' => implicit) */ - public function getCompatibleVersions() { + public function getCompatibleVersions() + { if (!empty($this->remoteInfo['compatible'])) return $this->remoteInfo['compatible']; return array(); } @@ -501,7 +557,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string|bool The last available update in the form yyyy-mm-dd if there is any, false otherwise */ - public function getLastUpdate() { + public function getLastUpdate() + { if (!empty($this->remoteInfo['lastupdate'])) return $this->remoteInfo['lastupdate']; return false; } @@ -511,9 +568,10 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string The base path of the extension */ - public function getInstallDir() { + public function getInstallDir() + { if ($this->isTemplate()) { - return DOKU_TPLLIB.$this->base; + return $this->tpllib.$this->base; } else { return DOKU_PLUGIN.$this->base; } @@ -524,7 +582,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return string One of "none", "manual", "git" or "automatic" */ - public function getInstallType() { + public function getInstallType() + { if (!$this->isInstalled()) return 'none'; if (!empty($this->managerData)) return 'automatic'; if (is_dir($this->getInstallDir().'/.git')) return 'git'; @@ -536,17 +595,17 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool|string True or error string */ - public function canModify() { - if($this->isInstalled()) { - if(!is_writable($this->getInstallDir())) { + public function canModify() + { + if ($this->isInstalled()) { + if (!is_writable($this->getInstallDir())) { return 'noperms'; } } - if($this->isTemplate() && !is_writable(DOKU_TPLLIB)) { + if ($this->isTemplate() && !is_writable($this->tpllib)) { return 'notplperms'; - - } elseif(!is_writable(DOKU_PLUGIN)) { + } elseif (!is_writable(DOKU_PLUGIN)) { return 'nopluginperms'; } return true; @@ -556,33 +615,35 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * Install an extension from a user upload * * @param string $field name of the upload file + * @param boolean $overwrite overwrite folder if the extension name is the same * @throws Exception when something goes wrong * @return array The list of installed extensions */ - public function installFromUpload($field){ - if($_FILES[$field]['error']){ + public function installFromUpload($field, $overwrite = true) + { + if ($_FILES[$field]['error']) { throw new Exception($this->getLang('msg_upload_failed').' ('.$_FILES[$field]['error'].')'); } $tmp = $this->mkTmpDir(); - if(!$tmp) throw new Exception($this->getLang('error_dircreate')); + if (!$tmp) throw new Exception($this->getLang('error_dircreate')); // filename may contain the plugin name for old style plugins... $basename = basename($_FILES[$field]['name']); $basename = preg_replace('/\.(tar\.gz|tar\.bz|tar\.bz2|tar|tgz|tbz|zip)$/', '', $basename); $basename = preg_replace('/[\W]+/', '', $basename); - if(!move_uploaded_file($_FILES[$field]['tmp_name'], "$tmp/upload.archive")){ + if (!move_uploaded_file($_FILES[$field]['tmp_name'], "$tmp/upload.archive")) { throw new Exception($this->getLang('msg_upload_failed')); } try { - $installed = $this->installArchive("$tmp/upload.archive", true, $basename); + $installed = $this->installArchive("$tmp/upload.archive", $overwrite, $basename); $this->updateManagerData('', $installed); $this->removeDeletedfiles($installed); // purge cache $this->purgeCache(); - }catch (Exception $e){ + } catch (Exception $e) { throw $e; } return $installed; @@ -592,19 +653,21 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * Install an extension from a remote URL * * @param string $url + * @param boolean $overwrite overwrite folder if the extension name is the same * @throws Exception when something goes wrong * @return array The list of installed extensions */ - public function installFromURL($url){ + public function installFromURL($url, $overwrite = true) + { try { $path = $this->download($url); - $installed = $this->installArchive($path, true); + $installed = $this->installArchive($path, $overwrite); $this->updateManagerData($url, $installed); $this->removeDeletedfiles($installed); // purge cache $this->purgeCache(); - }catch (Exception $e){ + } catch (Exception $e) { throw $e; } return $installed; @@ -616,7 +679,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @throws \Exception when something goes wrong * @return array The list of installed extensions */ - public function installOrUpdate() { + public function installOrUpdate() + { $url = $this->getDownloadURL(); $path = $this->download($url); $installed = $this->installArchive($path, $this->isInstalled(), $this->getBase()); @@ -637,7 +701,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool If the plugin was sucessfully uninstalled */ - public function uninstall() { + public function uninstall() + { $this->purgeCache(); return io_rmdir($this->getInstallDir(), true); } @@ -647,12 +712,13 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool|string True or an error message */ - public function enable() { + public function enable() + { if ($this->isTemplate()) return $this->getLang('notimplemented'); if (!$this->isInstalled()) return $this->getLang('notinstalled'); if ($this->isEnabled()) return $this->getLang('alreadyenabled'); - /* @var Doku_Plugin_Controller $plugin_controller */ + /* @var PluginController $plugin_controller */ global $plugin_controller; if ($plugin_controller->enable($this->base)) { $this->purgeCache(); @@ -667,10 +733,11 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return bool|string True or an error message */ - public function disable() { + public function disable() + { if ($this->isTemplate()) return $this->getLang('notimplemented'); - /* @var Doku_Plugin_Controller $plugin_controller */ + /* @var PluginController $plugin_controller */ global $plugin_controller; if (!$this->isInstalled()) return $this->getLang('notinstalled'); if (!$this->isEnabled()) return $this->getLang('alreadydisabled'); @@ -685,7 +752,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * Purge the cache by touching the main configuration file */ - protected function purgeCache() { + protected function purgeCache() + { global $config_cascade; // expire dokuwiki caches @@ -696,7 +764,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * Read local extension data either from info.txt or getInfo() */ - protected function readLocalData() { + protected function readLocalData() + { if ($this->isTemplate()) { $infopath = $this->getInstallDir().'/template.info.txt'; } else { @@ -706,19 +775,18 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { if (is_readable($infopath)) { $this->localInfo = confToHash($infopath); } elseif (!$this->isTemplate() && $this->isEnabled()) { - global $plugin_types; - $path = $this->getInstallDir().'/'; - $plugin = null; + $path = $this->getInstallDir().'/'; + $plugin = null; - foreach($plugin_types as $type) { - if(file_exists($path.$type.'.php')) { + foreach (PluginController::PLUGIN_TYPES as $type) { + if (file_exists($path.$type.'.php')) { $plugin = plugin_load($type, $this->base); if ($plugin) break; } - if($dh = @opendir($path.$type.'/')) { - while(false !== ($cp = readdir($dh))) { - if($cp == '.' || $cp == '..' || strtolower(substr($cp, -4)) != '.php') continue; + if ($dh = @opendir($path.$type.'/')) { + while (false !== ($cp = readdir($dh))) { + if ($cp == '.' || $cp == '..' || strtolower(substr($cp, -4)) != '.php') continue; $plugin = plugin_load($type, $this->base.'_'.substr($cp, 0, -4)); if ($plugin) break; @@ -741,21 +809,22 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @param string $url Where the extension was downloaded from. (empty for manual installs via upload) * @param array $installed Optional list of installed plugins */ - protected function updateManagerData($url = '', $installed = null) { + protected function updateManagerData($url = '', $installed = null) + { $origID = $this->getID(); - if(is_null($installed)) { + if (is_null($installed)) { $installed = array($origID); } - foreach($installed as $ext => $info) { - if($this->getID() != $ext) $this->setExtension($ext); - if($url) { + foreach ($installed as $ext => $info) { + if ($this->getID() != $ext) $this->setExtension($ext); + if ($url) { $this->managerData['downloadurl'] = $url; - } elseif(isset($this->managerData['downloadurl'])) { + } elseif (isset($this->managerData['downloadurl'])) { unset($this->managerData['downloadurl']); } - if(isset($this->managerData['installed'])) { + if (isset($this->managerData['installed'])) { $this->managerData['updated'] = date('r'); } else { $this->managerData['installed'] = date('r'); @@ -763,23 +832,24 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $this->writeManagerData(); } - if($this->getID() != $origID) $this->setExtension($origID); + if ($this->getID() != $origID) $this->setExtension($origID); } /** * Read the manager.dat file */ - protected function readManagerData() { + protected function readManagerData() + { $managerpath = $this->getInstallDir().'/manager.dat'; if (is_readable($managerpath)) { $file = @file($managerpath); - if(!empty($file)) { - foreach($file as $line) { + if (!empty($file)) { + foreach ($file as $line) { list($key, $value) = explode('=', trim($line, DOKU_LF), 2); $key = trim($key); $value = trim($value); // backwards compatible with old plugin manager - if($key == 'url') $key = 'downloadurl'; + if ($key == 'url') $key = 'downloadurl'; $this->managerData[$key] = $value; } } @@ -789,7 +859,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { /** * Write the manager.data file */ - protected function writeManagerData() { + protected function writeManagerData() + { $managerpath = $this->getInstallDir().'/manager.dat'; $data = ''; foreach ($this->managerData as $k => $v) { @@ -805,43 +876,101 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @return false|string */ - protected function mkTmpDir(){ + protected function mkTmpDir() + { $dir = io_mktmpdir(); - if(!$dir) return false; + if (!$dir) return false; $this->temporary[] = $dir; return $dir; } /** + * downloads a file from the net and saves it + * + * - $file is the directory where the file should be saved + * - if successful will return the name used for the saved file, false otherwise + * + * @author Andreas Gohr <andi@splitbrain.org> + * @author Chris Smith <chris@jalakai.co.uk> + * + * @param string $url url to download + * @param string $file path to file or directory where to save + * @param string $defaultName fallback for name of download + * @return bool|string if failed false, otherwise true or the name of the file in the given dir + */ + protected function downloadToFile($url, $file, $defaultName = '') + { + global $conf; + $http = new DokuHTTPClient(); + $http->max_bodysize = 0; + $http->timeout = 25; //max. 25 sec + $http->keep_alive = false; // we do single ops here, no need for keep-alive + $http->agent = 'DokuWiki HTTP Client (Extension Manager)'; + + $data = $http->get($url); + if ($data === false) return false; + + $name = ''; + if (isset($http->resp_headers['content-disposition'])) { + $content_disposition = $http->resp_headers['content-disposition']; + $match = array(); + if (is_string($content_disposition) && + preg_match('/attachment;\s*filename\s*=\s*"([^"]*)"/i', $content_disposition, $match) + ) { + $name = \dokuwiki\Utf8\PhpString::basename($match[1]); + } + + } + + if (!$name) { + if (!$defaultName) return false; + $name = $defaultName; + } + + $file = $file.$name; + + $fileexists = file_exists($file); + $fp = @fopen($file,"w"); + if (!$fp) return false; + fwrite($fp, $data); + fclose($fp); + if (!$fileexists and $conf['fperm']) chmod($file, $conf['fperm']); + return $name; + } + + /** * Download an archive to a protected path * * @param string $url The url to get the archive from * @throws Exception when something goes wrong * @return string The path where the archive was saved */ - public function download($url) { + public function download($url) + { // check the url - if(!preg_match('/https?:\/\//i', $url)){ + if (!preg_match('/https?:\/\//i', $url)) { throw new Exception($this->getLang('error_badurl')); } // try to get the file from the path (used as plugin name fallback) $file = parse_url($url, PHP_URL_PATH); - if(is_null($file)){ + if (is_null($file)) { $file = md5($url); - }else{ - $file = utf8_basename($file); + } else { + $file = \dokuwiki\Utf8\PhpString::basename($file); } // create tmp directory for download - if(!($tmp = $this->mkTmpDir())) { + if (!($tmp = $this->mkTmpDir())) { throw new Exception($this->getLang('error_dircreate')); } // download - if(!$file = io_download($url, $tmp.'/', true, $file, 0)) { + if (!$file = $this->downloadToFile($url, $tmp.'/', $file)) { io_rmdir($tmp, true); - throw new Exception(sprintf($this->getLang('error_download'), '<bdi>'.hsc($url).'</bdi>')); + throw new Exception(sprintf($this->getLang('error_download'), + '<bdi>'.hsc($url).'</bdi>') + ); } return $tmp.'/'.$file; @@ -854,16 +983,17 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @throws Exception when something went wrong * @return array list of installed extensions */ - public function installArchive($file, $overwrite=false, $base = '') { + public function installArchive($file, $overwrite = false, $base = '') + { $installed_extensions = array(); // create tmp directory for decompression - if(!($tmp = $this->mkTmpDir())) { + if (!($tmp = $this->mkTmpDir())) { throw new Exception($this->getLang('error_dircreate')); } // add default base folder if specified to handle case where zip doesn't contain this - if($base && !@mkdir($tmp.'/'.$base)) { + if ($base && !@mkdir($tmp.'/'.$base)) { throw new Exception($this->getLang('error_dircreate')); } @@ -874,33 +1004,33 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { // move the folder(s) to lib/.. $result = array('old'=>array(), 'new'=>array()); $default = ($this->isTemplate() ? 'template' : 'plugin'); - if(!$this->find_folders($result, $tmp.'/'.$base, $default)) { + if (!$this->findFolders($result, $tmp.'/'.$base, $default)) { throw new Exception($this->getLang('error_findfolder')); } // choose correct result array - if(count($result['new'])) { + if (count($result['new'])) { $install = $result['new']; - }else{ + } else { $install = $result['old']; } - if(!count($install)){ + if (!count($install)) { throw new Exception($this->getLang('error_findfolder')); } // now install all found items - foreach($install as $item) { + foreach ($install as $item) { // where to install? - if($item['type'] == 'template') { - $target_base_dir = DOKU_TPLLIB; - }else{ + if ($item['type'] == 'template') { + $target_base_dir = $this->tpllib; + } else { $target_base_dir = DOKU_PLUGIN; } - if(!empty($item['base'])) { + if (!empty($item['base'])) { // use base set in info.txt - } elseif($base && count($install) == 1) { + } elseif ($base && count($install) == 1) { $item['base'] = $base; } else { // default - use directory as found in zip @@ -911,18 +1041,20 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { // check to make sure we aren't overwriting anything $target = $target_base_dir.$item['base']; - if(!$overwrite && file_exists($target)) { - // TODO remember our settings, ask the user to confirm overwrite + if (!$overwrite && file_exists($target)) { + // this info message is not being exposed via exception, + // so that it's not interrupting the installation + msg(sprintf($this->getLang('msg_nooverwrite'), $item['base'])); continue; } $action = file_exists($target) ? 'update' : 'install'; // copy action - if($this->dircopy($item['tmp'], $target)) { + if ($this->dircopy($item['tmp'], $target)) { // return info $id = $item['base']; - if($item['type'] == 'template') { + if ($item['type'] == 'template') { $id = 'template:'.$id; } $installed_extensions[$id] = array( @@ -931,12 +1063,14 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { 'action' => $action ); } else { - throw new Exception(sprintf($this->getLang('error_copy').DOKU_LF, '<bdi>'.$item['base'].'</bdi>')); + throw new Exception(sprintf($this->getLang('error_copy').DOKU_LF, + '<bdi>'.$item['base'].'</bdi>') + ); } } // cleanup - if($tmp) io_rmdir($tmp, true); + if ($tmp) io_rmdir($tmp, true); return $installed_extensions; } @@ -962,20 +1096,20 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @param string $subdir - a subdirectory. do not set. used by recursion * @return bool - false on error */ - protected function find_folders(&$result, $directory, $default_type='plugin', $subdir='') { + protected function findFolders(&$result, $directory, $default_type = 'plugin', $subdir = '') + { $this_dir = "$directory$subdir"; $dh = @opendir($this_dir); - if(!$dh) return false; + if (!$dh) return false; $found_dirs = array(); $found_files = 0; $found_template_parts = 0; while (false !== ($f = readdir($dh))) { - if($f == '.' || $f == '..') continue; + if ($f == '.' || $f == '..') continue; - if(is_dir("$this_dir/$f")) { + if (is_dir("$this_dir/$f")) { $found_dirs[] = "$subdir/$f"; - } else { // it's a file -> check for config $found_files++; @@ -1004,14 +1138,14 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { closedir($dh); // files where found but no info.txt - use old method - if($found_files){ - $info = array(); - $info['tmp'] = $this_dir; + if ($found_files) { + $info = array(); + $info['tmp'] = $this_dir; // does this look like a template or should we use the default type? - if($found_template_parts >= 2) { - $info['type'] = 'template'; + if ($found_template_parts >= 2) { + $info['type'] = 'template'; } else { - $info['type'] = $default_type; + $info['type'] = $default_type; } $result['old'][] = $info; @@ -1020,7 +1154,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { // we have no files yet -> recurse foreach ($found_dirs as $found_dir) { - $this->find_folders($result, $directory, $default_type, "$found_dir"); + $this->findFolders($result, $directory, $default_type, "$found_dir"); } return true; } @@ -1035,13 +1169,13 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @throws Exception * @return bool */ - private function decompress($file, $target) { + private function decompress($file, $target) + { // decompression library doesn't like target folders ending in "/" - if(substr($target, -1) == "/") $target = substr($target, 0, -1); - - $ext = $this->guess_archive($file); - if(in_array($ext, array('tar', 'bz', 'gz'))) { + if (substr($target, -1) == "/") $target = substr($target, 0, -1); + $ext = $this->guessArchiveType($file); + if (in_array($ext, array('tar', 'bz', 'gz'))) { try { $tar = new \splitbrain\PHPArchive\Tar(); $tar->open($file); @@ -1051,8 +1185,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { } return true; - } elseif($ext == 'zip') { - + } elseif ($ext == 'zip') { try { $zip = new \splitbrain\PHPArchive\Zip(); $zip->open($file); @@ -1064,7 +1197,8 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return true; } - // the only case when we don't get one of the recognized archive types is when the archive file can't be read + // the only case when we don't get one of the recognized archive types is + // when the archive file can't be read throw new Exception($this->getLang('error_decompress').' Couldn\'t read archive file'); } @@ -1078,15 +1212,16 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @param string $file The file to analyze * @return string|false false if the file can't be read, otherwise an "extension" */ - private function guess_archive($file) { + private function guessArchiveType($file) + { $fh = fopen($file, 'rb'); - if(!$fh) return false; + if (!$fh) return false; $magic = fread($fh, 5); fclose($fh); - if(strpos($magic, "\x42\x5a") === 0) return 'bz'; - if(strpos($magic, "\x1f\x8b") === 0) return 'gz'; - if(strpos($magic, "\x50\x4b\x03\x04") === 0) return 'zip'; + if (strpos($magic, "\x42\x5a") === 0) return 'bz'; + if (strpos($magic, "\x1f\x8b") === 0) return 'gz'; + if (strpos($magic, "\x50\x4b\x03\x04") === 0) return 'zip'; return 'tar'; } @@ -1097,27 +1232,27 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * @param string $dst filename path to file * @return bool|int|string */ - private function dircopy($src, $dst) { + private function dircopy($src, $dst) + { global $conf; - if(is_dir($src)) { - if(!$dh = @opendir($src)) return false; + if (is_dir($src)) { + if (!$dh = @opendir($src)) return false; - if($ok = io_mkdir_p($dst)) { + if ($ok = io_mkdir_p($dst)) { while ($ok && (false !== ($f = readdir($dh)))) { - if($f == '..' || $f == '.') continue; + if ($f == '..' || $f == '.') continue; $ok = $this->dircopy("$src/$f", "$dst/$f"); } } closedir($dh); return $ok; - } else { - $exists = file_exists($dst); + $existed = file_exists($dst); - if(!@copy($src, $dst)) return false; - if(!$exists && !empty($conf['fperm'])) chmod($dst, $conf['fperm']); + if (!@copy($src, $dst)) return false; + if (!$existed && $conf['fperm']) chmod($dst, $conf['fperm']); @touch($dst, filemtime($src)); } @@ -1129,29 +1264,30 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { * * @param array $installed */ - private function removeDeletedfiles($installed) { - foreach($installed as $id => $extension) { + private function removeDeletedfiles($installed) + { + foreach ($installed as $id => $extension) { // only on update - if($extension['action'] == 'install') continue; + if ($extension['action'] == 'install') continue; // get definition file - if($extension['type'] == 'template') { - $extensiondir = DOKU_TPLLIB; - }else{ + if ($extension['type'] == 'template') { + $extensiondir = $this->tpllib; + } else { $extensiondir = DOKU_PLUGIN; } $extensiondir = $extensiondir . $extension['base'] .'/'; $definitionfile = $extensiondir . 'deleted.files'; - if(!file_exists($definitionfile)) continue; + if (!file_exists($definitionfile)) continue; // delete the old files $list = file($definitionfile); - foreach($list as $line) { + foreach ($list as $line) { $line = trim(preg_replace('/#.*$/', '', $line)); - if(!$line) continue; + if (!$line) continue; $file = $extensiondir . $line; - if(!file_exists($file)) continue; + if (!file_exists($file)) continue; io_rmdir($file, true); } diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 4ec6fec85..919eb2c0b 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -6,14 +6,13 @@ * @author Andreas Gohr <andi@splitbrain.org> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); +use dokuwiki\Form\Form; /** * Class helper_plugin_extension_list takes care of the overall GUI */ -class helper_plugin_extension_gui extends DokuWiki_Plugin { - +class helper_plugin_extension_gui extends DokuWiki_Plugin +{ protected $tabs = array('plugins', 'templates', 'search', 'install'); /** @var string the extension that should have an open info window FIXME currently broken */ @@ -24,7 +23,8 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { * * initializes requested info window */ - public function __construct() { + public function __construct() + { global $INPUT; $this->infoFor = $INPUT->str('info'); } @@ -32,33 +32,37 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { /** * display the plugin tab */ - public function tabPlugins() { - /* @var Doku_Plugin_Controller $plugin_controller */ - global $plugin_controller; - + public function tabPlugins() + { echo '<div class="panelHeader">'; echo $this->locale_xhtml('intro_plugins'); echo '</div>'; - $pluginlist = $plugin_controller->getList('', true); - sort($pluginlist); + $pluginlist = plugin_list('', true); /* @var helper_plugin_extension_extension $extension */ $extension = $this->loadHelper('extension_extension'); /* @var helper_plugin_extension_list $list */ $list = $this->loadHelper('extension_list'); - $list->start_form(); - foreach($pluginlist as $name) { + + $form = new Form([ + 'action' => $this->tabURL('', [], '&'), + 'id' => 'extension__list', + ]); + $list->startForm(); + foreach ($pluginlist as $name) { $extension->setExtension($name); - $list->add_row($extension, $extension->getID() == $this->infoFor); + $list->addRow($extension, $extension->getID() == $this->infoFor); } - $list->end_form(); - $list->render(); + $list->endForm(); + $form->addHTML($list->render(true)); + echo $form->toHTML(); } /** * Display the template tab */ - public function tabTemplates() { + public function tabTemplates() + { echo '<div class="panelHeader">'; echo $this->locale_xhtml('intro_templates'); echo '</div>'; @@ -72,30 +76,45 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { $extension = $this->loadHelper('extension_extension'); /* @var helper_plugin_extension_list $list */ $list = $this->loadHelper('extension_list'); - $list->start_form(); - foreach($tpllist as $name) { + + $form = new Form([ + 'action' => $this->tabURL('', [], '&'), + 'id' => 'extension__list', + ]); + $list->startForm(); + foreach ($tpllist as $name) { $extension->setExtension("template:$name"); - $list->add_row($extension, $extension->getID() == $this->infoFor); + $list->addRow($extension, $extension->getID() == $this->infoFor); } - $list->end_form(); - $list->render(); + $list->endForm(); + $form->addHTML($list->render(true)); + echo $form->toHTML(); } /** * Display the search tab */ - public function tabSearch() { + public function tabSearch() + { global $INPUT; echo '<div class="panelHeader">'; echo $this->locale_xhtml('intro_search'); echo '</div>'; - $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'), 'class' => 'search')); - $form->addElement(form_makeTextField('q', $INPUT->str('q'), $this->getLang('search_for'))); - $form->addElement(form_makeButton('submit', '', $this->getLang('search'))); - $form->printForm(); - - if(!$INPUT->bool('q')) return; + $form = new Form([ + 'action' => $this->tabURL('', [], '&'), + 'class' => 'search', + ]); + $form->addTagOpen('div')->addClass('no'); + $form->addTextInput('q', $this->getLang('search_for')) + ->addClass('edit') + ->val($INPUT->str('q')); + $form->addButton('submit', $this->getLang('search')) + ->attrs(['type' => 'submit', 'title' => $this->getLang('search')]); + $form->addTagClose('div'); + echo $form->toHTML(); + + if (!$INPUT->bool('q')) return; /* @var helper_plugin_extension_repository $repository FIXME should we use some gloabl instance? */ $repository = $this->loadHelper('extension_repository'); @@ -105,33 +124,56 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { $extension = $this->loadHelper('extension_extension'); /* @var helper_plugin_extension_list $list */ $list = $this->loadHelper('extension_list'); - $list->start_form(); - if($result){ - foreach($result as $name) { + + $form = new Form([ + 'action' => $this->tabURL('', [], '&'), + 'id' => 'extension__list', + ]); + $list->startForm(); + if ($result) { + foreach ($result as $name) { $extension->setExtension($name); - $list->add_row($extension, $extension->getID() == $this->infoFor); + $list->addRow($extension, $extension->getID() == $this->infoFor); } } else { - $list->nothing_found(); + $list->nothingFound(); } - $list->end_form(); - $list->render(); - + $list->endForm(); + $form->addHTML($list->render(true)); + echo $form->toHTML(); } /** * Display the template tab */ - public function tabInstall() { + public function tabInstall() + { + global $lang; echo '<div class="panelHeader">'; echo $this->locale_xhtml('intro_install'); echo '</div>'; - $form = new Doku_Form(array('action' => $this->tabURL('', array(), '&'), 'enctype' => 'multipart/form-data', 'class' => 'install')); - $form->addElement(form_makeTextField('installurl', '', $this->getLang('install_url'), '', 'block')); - $form->addElement(form_makeFileField('installfile', $this->getLang('install_upload'), '', 'block')); - $form->addElement(form_makeButton('submit', '', $this->getLang('btn_install'))); - $form->printForm(); + $form = new Form([ + 'action' => $this->tabURL('', [], '&'), + 'enctype' => 'multipart/form-data', + 'class' => 'install', + ]); + $form->addTagOpen('div')->addClass('no'); + $form->addTextInput('installurl', $this->getLang('install_url')) + ->addClass('block') + ->attrs(['type' => 'url']); + $form->addTag('br'); + $form->addTextInput('installfile', $this->getLang('install_upload')) + ->addClass('block') + ->attrs(['type' => 'file']); + $form->addTag('br'); + $form->addCheckbox('overwrite', $lang['js']['media_overwrt']) + ->addClass('block'); + $form->addTag('br'); + $form->addButton('', $this->getLang('btn_install')) + ->attrs(['type' => 'submit', 'title' => $this->getLang('btn_install')]); + $form->addTagClose('div'); + echo $form->toHTML(); } /** @@ -139,11 +181,12 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { * * @fixme style active one */ - public function tabNavigation() { + public function tabNavigation() + { echo '<ul class="tabs">'; - foreach($this->tabs as $tab) { + foreach ($this->tabs as $tab) { $url = $this->tabURL($tab); - if($this->currentTab() == $tab) { + if ($this->currentTab() == $tab) { $class = ' active'; } else { $class = ''; @@ -158,11 +201,12 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { * * @return string */ - public function currentTab() { + public function currentTab() + { global $INPUT; $tab = $INPUT->str('tab', 'plugins', true); - if(!in_array($tab, $this->tabs)) $tab = 'plugins'; + if (!in_array($tab, $this->tabs)) $tab = 'plugins'; return $tab; } @@ -175,19 +219,19 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { * @param bool $absolute create absolute URLs? * @return string */ - public function tabURL($tab = '', $params = array(), $sep = '&', $absolute = false) { + public function tabURL($tab = '', $params = [], $sep = '&', $absolute = false) + { global $ID; global $INPUT; - if(!$tab) $tab = $this->currentTab(); + if (!$tab) $tab = $this->currentTab(); $defaults = array( 'do' => 'admin', 'page' => 'extension', 'tab' => $tab, ); - if($tab == 'search') $defaults['q'] = $INPUT->str('q'); + if ($tab == 'search') $defaults['q'] = $INPUT->str('q'); return wl($ID, array_merge($defaults, $params), $absolute, $sep); } - } diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index 656b4ea09..647575b10 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -6,13 +6,11 @@ * @author Michael Hamann <michael@content-space.de> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - /** * Class helper_plugin_extension_list takes care of creating a HTML list of extensions */ -class helper_plugin_extension_list extends DokuWiki_Plugin { +class helper_plugin_extension_list extends DokuWiki_Plugin +{ protected $form = ''; /** @var helper_plugin_extension_gui */ protected $gui; @@ -22,30 +20,31 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * * loads additional helpers */ - public function __construct(){ + public function __construct() + { $this->gui = plugin_load('helper', 'extension_gui'); } - function start_form() { - $this->form .= '<form id="extension__list" accept-charset="utf-8" method="post" action="">'; - $hidden = array( - 'do'=>'admin', - 'page'=>'extension', - 'sectok'=>getSecurityToken() - ); - $this->add_hidden($hidden); + /** + * Initialize the extension table form + */ + public function startForm() + { $this->form .= '<ul class="extensionList">'; } + /** * Build single row of extension table + * * @param helper_plugin_extension_extension $extension The extension that shall be added * @param bool $showinfo Show the info area */ - function add_row(helper_plugin_extension_extension $extension, $showinfo = false) { - $this->start_row($extension); - $this->populate_column('legend', $this->make_legend($extension, $showinfo)); - $this->populate_column('actions', $this->make_actions($extension)); - $this->end_row(); + public function addRow(helper_plugin_extension_extension $extension, $showinfo = false) + { + $this->startRow($extension); + $this->populateColumn('legend', $this->makeLegend($extension, $showinfo)); + $this->populateColumn('actions', $this->makeActions($extension)); + $this->endRow(); } /** @@ -55,7 +54,8 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param string $header The content of the header * @param int $level The level of the header */ - function add_header($id, $header, $level = 2) { + public function addHeader($id, $header, $level = 2) + { $this->form .='<h'.$level.' id="'.$id.'">'.hsc($header).'</h'.$level.'>'.DOKU_LF; } @@ -64,17 +64,20 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * * @param string $data The content */ - function add_p($data) { + public function addParagraph($data) + { $this->form .= '<p>'.hsc($data).'</p>'.DOKU_LF; } /** * Add hidden fields to the form with the given data - * @param array $array + * + * @param array $data key-value list of fields and their values to add */ - function add_hidden(array $array) { + public function addHidden(array $data) + { $this->form .= '<div class="no">'; - foreach ($array as $key => $value) { + foreach ($data as $key => $value) { $this->form .= '<input type="hidden" name="'.hsc($key).'" value="'.hsc($value).'" />'; } $this->form .= '</div>'.DOKU_LF; @@ -83,23 +86,28 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { /** * Add closing tags */ - function end_form() { + public function endForm() + { $this->form .= '</ul>'; - $this->form .= '</form>'.DOKU_LF; } /** * Show message when no results are found */ - function nothing_found() { + public function nothingFound() + { global $lang; $this->form .= '<li class="notfound">'.$lang['nothingfound'].'</li>'; } /** * Print the form + * + * @param bool $returnonly whether to return html or print */ - function render() { + public function render($returnonly = false) + { + if ($returnonly) return $this->form; echo $this->form; } @@ -108,8 +116,10 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * * @param helper_plugin_extension_extension $extension The extension */ - private function start_row(helper_plugin_extension_extension $extension) { - $this->form .= '<li id="extensionplugin__'.hsc($extension->getID()).'" class="'.$this->make_class($extension).'">'; + private function startRow(helper_plugin_extension_extension $extension) + { + $this->form .= '<li id="extensionplugin__'.hsc($extension->getID()). + '" class="'.$this->makeClass($extension).'">'; } /** @@ -117,14 +127,16 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param string $class The class name * @param string $html The content */ - private function populate_column($class, $html) { + private function populateColumn($class, $html) + { $this->form .= '<div class="'.$class.' col">'.$html.'</div>'.DOKU_LF; } /** * End the row */ - private function end_row() { + private function endRow() + { $this->form .= '</li>'.DOKU_LF; } @@ -134,27 +146,46 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param helper_plugin_extension_extension $extension The extension * @return string The HTML code */ - function make_homepagelink(helper_plugin_extension_extension $extension) { - $text = $this->getLang('homepage_link'); - $url = hsc($extension->getURL()); - return '<a href="'.$url.'" title="'.$url.'" class ="urlextern">'.$text.'</a> '; + public function makeHomepageLink(helper_plugin_extension_extension $extension) + { + global $conf; + $url = $extension->getURL(); + if (strtolower(parse_url($url, PHP_URL_HOST)) == 'www.dokuwiki.org') { + $linktype = 'interwiki'; + } else { + $linktype = 'extern'; + } + $param = array( + 'href' => $url, + 'title' => $url, + 'class' => ($linktype == 'extern') ? 'urlextern' : 'interwiki iw_doku', + 'target' => $conf['target'][$linktype], + 'rel' => ($linktype == 'extern') ? 'noopener' : '', + ); + if ($linktype == 'extern' && $conf['relnofollow']) { + $param['rel'] = implode(' ', [$param['rel'], 'ugc nofollow']); + } + $html = ' <a '. buildAttributes($param, true).'>'. + $this->getLang('homepage_link').'</a>'; + return $html; } /** - * Generate the class name for the row of the extensio + * Generate the class name for the row of the extension * * @param helper_plugin_extension_extension $extension The extension object * @return string The class name */ - function make_class(helper_plugin_extension_extension $extension) { + public function makeClass(helper_plugin_extension_extension $extension) + { $class = ($extension->isTemplate()) ? 'template' : 'plugin'; - if($extension->isInstalled()) { + if ($extension->isInstalled()) { $class.=' installed'; $class.= ($extension->isEnabled()) ? ' enabled':' disabled'; - if($extension->updateAvailable()) $class .= ' updatable'; + if ($extension->updateAvailable()) $class .= ' updatable'; } - if(!$extension->canModify()) $class.= ' notselect'; - if($extension->isProtected()) $class.= ' protected'; + if (!$extension->canModify()) $class.= ' notselect'; + if ($extension->isProtected()) $class.= ' protected'; //if($this->showinfo) $class.= ' showinfo'; return $class; } @@ -165,21 +196,24 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param helper_plugin_extension_extension $extension The extension object * @return string The HTML code of the link */ - function make_author(helper_plugin_extension_extension $extension) { - global $ID; - - if($extension->getAuthor()) { - + public function makeAuthor(helper_plugin_extension_extension $extension) + { + if ($extension->getAuthor()) { $mailid = $extension->getEmailID(); - if($mailid){ + if ($mailid) { $url = $this->gui->tabURL('search', array('q' => 'authorid:'.$mailid)); - return '<bdi><a href="'.$url.'" class="author" title="'.$this->getLang('author_hint').'" ><img src="//www.gravatar.com/avatar/'.$mailid.'?s=20&d=mm" width="20" height="20" alt="" /> '.hsc($extension->getAuthor()).'</a></bdi>'; - - }else{ - return '<bdi><span class="author">'.hsc($extension->getAuthor()).'</span></bdi>'; + $html = '<a href="'.$url.'" class="author" title="'.$this->getLang('author_hint').'" >'. + '<img src="//www.gravatar.com/avatar/'.$mailid. + '?s=20&d=mm" width="20" height="20" alt="" /> '. + hsc($extension->getAuthor()).'</a>'; + } else { + $html = '<span class="author">'.hsc($extension->getAuthor()).'</span>'; } + $html = '<bdi>'.$html.'</bdi>'; + } else { + $html = '<em class="author">'.$this->getLang('unknown_author').'</em>'.DOKU_LF; } - return "<em class=\"author\">".$this->getLang('unknown_author')."</em>".DOKU_LF; + return $html; } /** @@ -188,11 +222,12 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param helper_plugin_extension_extension $extension The extension object * @return string The HTML code */ - function make_screenshot(helper_plugin_extension_extension $extension) { + public function makeScreenshot(helper_plugin_extension_extension $extension) + { $screen = $extension->getScreenshotURL(); $thumb = $extension->getThumbnailURL(); - if($screen) { + if ($screen) { // use protocol independent URLs for images coming from us #595 $screen = str_replace('http://www.dokuwiki.org', '//www.dokuwiki.org', $screen); $thumb = str_replace('http://www.dokuwiki.org', '//www.dokuwiki.org', $thumb); @@ -201,13 +236,15 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $img = '<a href="'.hsc($screen).'" target="_blank" class="extension_screenshot">'. '<img alt="'.$title.'" width="120" height="70" src="'.hsc($thumb).'" />'. '</a>'; - } elseif($extension->isTemplate()) { - $img = '<img alt="" width="120" height="70" src="'.DOKU_BASE.'lib/plugins/extension/images/template.png" />'; - + } elseif ($extension->isTemplate()) { + $img = '<img alt="" width="120" height="70" src="'.DOKU_BASE. + 'lib/plugins/extension/images/template.png" />'; } else { - $img = '<img alt="" width="120" height="70" src="'.DOKU_BASE.'lib/plugins/extension/images/plugin.png" />'; + $img = '<img alt="" width="120" height="70" src="'.DOKU_BASE. + 'lib/plugins/extension/images/plugin.png" />'; } - return '<div class="screenshot" >'.$img.'<span></span></div>'.DOKU_LF; + $html = '<div class="screenshot" >'.$img.'<span></span></div>'.DOKU_LF; + return $html; } /** @@ -217,43 +254,53 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param bool $showinfo Show the info section * @return string The HTML code */ - function make_legend(helper_plugin_extension_extension $extension, $showinfo = false) { - $return = '<div>'; - $return .= '<h2>'; - $return .= sprintf($this->getLang('extensionby'), '<bdi>'.hsc($extension->getDisplayName()).'</bdi>', $this->make_author($extension)); - $return .= '</h2>'.DOKU_LF; + public function makeLegend(helper_plugin_extension_extension $extension, $showinfo = false) + { + $html = '<div>'; + $html .= '<h2>'; + $html .= sprintf( + $this->getLang('extensionby'), + '<bdi>'.hsc($extension->getDisplayName()).'</bdi>', + $this->makeAuthor($extension) + ); + $html .= '</h2>'.DOKU_LF; - $return .= $this->make_screenshot($extension); + $html .= $this->makeScreenshot($extension); $popularity = $extension->getPopularity(); if ($popularity !== false && !$extension->isBundled()) { $popularityText = sprintf($this->getLang('popularity'), round($popularity*100, 2)); - $return .= '<div class="popularity" title="'.$popularityText.'"><div style="width: '.($popularity * 100).'%;"><span class="a11y">'.$popularityText.'</span></div></div>'.DOKU_LF; + $html .= '<div class="popularity" title="'.$popularityText.'">'. + '<div style="width: '.($popularity * 100).'%;">'. + '<span class="a11y">'.$popularityText.'</span>'. + '</div></div>'.DOKU_LF; } - if($extension->getDescription()) { - $return .= '<p><bdi>'; - $return .= hsc($extension->getDescription()).' '; - $return .= '</bdi></p>'.DOKU_LF; + if ($extension->getDescription()) { + $html .= '<p><bdi>'; + $html .= hsc($extension->getDescription()).' '; + $html .= '</bdi></p>'.DOKU_LF; } - $return .= $this->make_linkbar($extension); + $html .= $this->makeLinkbar($extension); - if($showinfo){ + if ($showinfo) { $url = $this->gui->tabURL(''); $class = 'close'; - }else{ + } else { $url = $this->gui->tabURL('', array('info' => $extension->getID())); $class = ''; } - $return .= ' <a href="'.$url.'#extensionplugin__'.$extension->getID().'" class="info '.$class.'" title="'.$this->getLang('btn_info').'" data-extid="'.$extension->getID().'">'.$this->getLang('btn_info').'</a>'; + $html .= ' <a href="'.$url.'#extensionplugin__'.$extension->getID(). + '" class="info '.$class.'" title="'.$this->getLang('btn_info'). + '" data-extid="'.$extension->getID().'">'.$this->getLang('btn_info').'</a>'; if ($showinfo) { - $return .= $this->make_info($extension); + $html .= $this->makeInfo($extension); } - $return .= $this->make_noticearea($extension); - $return .= '</div>'.DOKU_LF; - return $return; + $html .= $this->makeNoticeArea($extension); + $html .= '</div>'.DOKU_LF; + return $html; } /** @@ -262,28 +309,48 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param helper_plugin_extension_extension $extension The extension instance * @return string The HTML code */ - function make_linkbar(helper_plugin_extension_extension $extension) { - $return = '<div class="linkbar">'; - $return .= $this->make_homepagelink($extension); - if ($extension->getBugtrackerURL()) { - $return .= ' <a href="'.hsc($extension->getBugtrackerURL()).'" title="'.hsc($extension->getBugtrackerURL()).'" class ="bugs">'.$this->getLang('bugs_features').'</a> '; + public function makeLinkbar(helper_plugin_extension_extension $extension) + { + global $conf; + $html = '<div class="linkbar">'; + $html .= $this->makeHomepageLink($extension); + + $bugtrackerURL = $extension->getBugtrackerURL(); + if ($bugtrackerURL) { + if (strtolower(parse_url($bugtrackerURL, PHP_URL_HOST)) == 'www.dokuwiki.org') { + $linktype = 'interwiki'; + } else { + $linktype = 'extern'; + } + $param = array( + 'href' => $bugtrackerURL, + 'title' => $bugtrackerURL, + 'class' => 'bugs', + 'target' => $conf['target'][$linktype], + 'rel' => ($linktype == 'extern') ? 'noopener' : '', + ); + if ($conf['relnofollow']) { + $param['rel'] = implode(' ', [$param['rel'], 'ugc nofollow']); + } + $html .= ' <a '.buildAttributes($param, true).'>'. + $this->getLang('bugs_features').'</a>'; } - if ($extension->getTags()){ + if ($extension->getTags()) { $first = true; - $return .= '<span class="tags">'.$this->getLang('tags').' '; + $html .= ' <span class="tags">'.$this->getLang('tags').' '; foreach ($extension->getTags() as $tag) { - if (!$first){ - $return .= ', '; + if (!$first) { + $html .= ', '; } else { $first = false; } - $url = $this->gui->tabURL('search', array('q' => 'tag:'.$tag)); - $return .= '<bdi><a href="'.$url.'">'.hsc($tag).'</a></bdi>'; + $url = $this->gui->tabURL('search', ['q' => 'tag:'.$tag]); + $html .= '<bdi><a href="'.$url.'">'.hsc($tag).'</a></bdi>'; } - $return .= '</span>'; + $html .= '</span>'; } - $return .= '</div>'.DOKU_LF; - return $return; + $html .= '</div>'.DOKU_LF; + return $html; } /** @@ -292,40 +359,52 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param helper_plugin_extension_extension $extension The extension * @return string The HTML code */ - function make_noticearea(helper_plugin_extension_extension $extension) { - $return = ''; + public function makeNoticeArea(helper_plugin_extension_extension $extension) + { + $html = ''; $missing_dependencies = $extension->getMissingDependencies(); - if(!empty($missing_dependencies)) { - $return .= '<div class="msg error">'. - sprintf($this->getLang('missing_dependency'), '<bdi>'.implode(', ', /*array_map(array($this->helper, 'make_extensionsearchlink'),*/ $missing_dependencies).'</bdi>'). + if (!empty($missing_dependencies)) { + $html .= '<div class="msg error">' . + sprintf( + $this->getLang('missing_dependency'), + '<bdi>' . implode(', ', $missing_dependencies) . '</bdi>' + ) . '</div>'; } - if($extension->isInWrongFolder()) { - $return .= '<div class="msg error">'. - sprintf($this->getLang('wrong_folder'), '<bdi>'.hsc($extension->getInstallName()).'</bdi>', '<bdi>'.hsc($extension->getBase()).'</bdi>'). + if ($extension->isInWrongFolder()) { + $html .= '<div class="msg error">' . + sprintf( + $this->getLang('wrong_folder'), + '<bdi>' . hsc($extension->getInstallName()) . '</bdi>', + '<bdi>' . hsc($extension->getBase()) . '</bdi>' + ) . '</div>'; } - if(($securityissue = $extension->getSecurityIssue()) !== false) { - $return .= '<div class="msg error">'. + if (($securityissue = $extension->getSecurityIssue()) !== false) { + $html .= '<div class="msg error">'. sprintf($this->getLang('security_issue'), '<bdi>'.hsc($securityissue).'</bdi>'). '</div>'; } - if(($securitywarning = $extension->getSecurityWarning()) !== false) { - $return .= '<div class="msg notify">'. + if (($securitywarning = $extension->getSecurityWarning()) !== false) { + $html .= '<div class="msg notify">'. sprintf($this->getLang('security_warning'), '<bdi>'.hsc($securitywarning).'</bdi>'). '</div>'; } - if($extension->updateAvailable()) { - $return .= '<div class="msg notify">'. + if ($extension->updateAvailable()) { + $html .= '<div class="msg notify">'. sprintf($this->getLang('update_available'), hsc($extension->getLastUpdate())). '</div>'; } - if($extension->hasDownloadURLChanged()) { - $return .= '<div class="msg notify">'. - sprintf($this->getLang('url_change'), '<bdi>'.hsc($extension->getDownloadURL()).'</bdi>', '<bdi>'.hsc($extension->getLastDownloadURL()).'</bdi>'). + if ($extension->hasDownloadURLChanged()) { + $html .= '<div class="msg notify">' . + sprintf( + $this->getLang('url_change'), + '<bdi>' . hsc($extension->getDownloadURL()) . '</bdi>', + '<bdi>' . hsc($extension->getLastDownloadURL()) . '</bdi>' + ) . '</div>'; } - return $return.DOKU_LF; + return $html.DOKU_LF; } /** @@ -336,17 +415,19 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param string $url * @return string HTML link */ - function shortlink($url){ + public function shortlink($url) + { $link = parse_url($url); $base = $link['host']; - if(!empty($link['port'])) $base .= $base.':'.$link['port']; + if (!empty($link['port'])) $base .= $base.':'.$link['port']; $long = $link['path']; - if(!empty($link['query'])) $long .= $link['query']; + if (!empty($link['query'])) $long .= $link['query']; $name = shorten($base, $long, 55); - return '<a href="'.hsc($url).'" class="urlextern">'.hsc($name).'</a>'; + $html = '<a href="'.hsc($url).'" class="urlextern">'.hsc($name).'</a>'; + return $html; } /** @@ -355,89 +436,101 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param helper_plugin_extension_extension $extension The extension * @return string The HTML code */ - function make_info(helper_plugin_extension_extension $extension) { + public function makeInfo(helper_plugin_extension_extension $extension) + { $default = $this->getLang('unknown'); - $return = '<dl class="details">'; + $html = '<dl class="details">'; - $return .= '<dt>'.$this->getLang('status').'</dt>'; - $return .= '<dd>'.$this->make_status($extension).'</dd>'; + $html .= '<dt>'.$this->getLang('status').'</dt>'; + $html .= '<dd>'.$this->makeStatus($extension).'</dd>'; if ($extension->getDonationURL()) { - $return .= '<dt>'.$this->getLang('donate').'</dt>'; - $return .= '<dd>'; - $return .= '<a href="'.$extension->getDonationURL().'" class="donate">'.$this->getLang('donate_action').'</a>'; - $return .= '</dd>'; + $html .= '<dt>'.$this->getLang('donate').'</dt>'; + $html .= '<dd>'; + $html .= '<a href="'.$extension->getDonationURL().'" class="donate">'. + $this->getLang('donate_action').'</a>'; + $html .= '</dd>'; } if (!$extension->isBundled()) { - $return .= '<dt>'.$this->getLang('downloadurl').'</dt>'; - $return .= '<dd><bdi>'; - $return .= ($extension->getDownloadURL() ? $this->shortlink($extension->getDownloadURL()) : $default); - $return .= '</bdi></dd>'; - - $return .= '<dt>'.$this->getLang('repository').'</dt>'; - $return .= '<dd><bdi>'; - $return .= ($extension->getSourcerepoURL() ? $this->shortlink($extension->getSourcerepoURL()) : $default); - $return .= '</bdi></dd>'; + $html .= '<dt>'.$this->getLang('downloadurl').'</dt>'; + $html .= '<dd><bdi>'; + $html .= ($extension->getDownloadURL() + ? $this->shortlink($extension->getDownloadURL()) + : $default); + $html .= '</bdi></dd>'; + + $html .= '<dt>'.$this->getLang('repository').'</dt>'; + $html .= '<dd><bdi>'; + $html .= ($extension->getSourcerepoURL() + ? $this->shortlink($extension->getSourcerepoURL()) + : $default); + $html .= '</bdi></dd>'; } if ($extension->isInstalled()) { if ($extension->getInstalledVersion()) { - $return .= '<dt>'.$this->getLang('installed_version').'</dt>'; - $return .= '<dd>'; - $return .= hsc($extension->getInstalledVersion()); - $return .= '</dd>'; + $html .= '<dt>'.$this->getLang('installed_version').'</dt>'; + $html .= '<dd>'; + $html .= hsc($extension->getInstalledVersion()); + $html .= '</dd>'; } if (!$extension->isBundled()) { - $return .= '<dt>'.$this->getLang('install_date').'</dt>'; - $return .= '<dd>'; - $return .= ($extension->getUpdateDate() ? hsc($extension->getUpdateDate()) : $this->getLang('unknown')); - $return .= '</dd>'; + $html .= '<dt>'.$this->getLang('install_date').'</dt>'; + $html .= '<dd>'; + $html .= ($extension->getUpdateDate() + ? hsc($extension->getUpdateDate()) + : $this->getLang('unknown')); + $html .= '</dd>'; } } if (!$extension->isInstalled() || $extension->updateAvailable()) { - $return .= '<dt>'.$this->getLang('available_version').'</dt>'; - $return .= '<dd>'; - $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')); - $return .= '</dd>'; + $html .= '<dt>'.$this->getLang('available_version').'</dt>'; + $html .= '<dd>'; + $html .= ($extension->getLastUpdate() + ? hsc($extension->getLastUpdate()) + : $this->getLang('unknown')); + $html .= '</dd>'; } - $return .= '<dt>'.$this->getLang('provides').'</dt>'; - $return .= '<dd><bdi>'; - $return .= ($extension->getTypes() ? hsc(implode(', ', $extension->getTypes())) : $default); - $return .= '</bdi></dd>'; + $html .= '<dt>'.$this->getLang('provides').'</dt>'; + $html .= '<dd><bdi>'; + $html .= ($extension->getTypes() + ? hsc(implode(', ', $extension->getTypes())) + : $default); + $html .= '</bdi></dd>'; - if(!$extension->isBundled() && $extension->getCompatibleVersions()) { - $return .= '<dt>'.$this->getLang('compatible').'</dt>'; - $return .= '<dd>'; + if (!$extension->isBundled() && $extension->getCompatibleVersions()) { + $html .= '<dt>'.$this->getLang('compatible').'</dt>'; + $html .= '<dd>'; foreach ($extension->getCompatibleVersions() as $date => $version) { - $return .= '<bdi>'.$version['label'].' ('.$date.')</bdi>, '; + $html .= '<bdi>'.$version['label'].' ('.$date.')</bdi>, '; } - $return = rtrim($return, ', '); - $return .= '</dd>'; + $html = rtrim($html, ', '); + $html .= '</dd>'; } - if($extension->getDependencies()) { - $return .= '<dt>'.$this->getLang('depends').'</dt>'; - $return .= '<dd>'; - $return .= $this->make_linklist($extension->getDependencies()); - $return .= '</dd>'; + if ($extension->getDependencies()) { + $html .= '<dt>'.$this->getLang('depends').'</dt>'; + $html .= '<dd>'; + $html .= $this->makeLinkList($extension->getDependencies()); + $html .= '</dd>'; } - if($extension->getSimilarExtensions()) { - $return .= '<dt>'.$this->getLang('similar').'</dt>'; - $return .= '<dd>'; - $return .= $this->make_linklist($extension->getSimilarExtensions()); - $return .= '</dd>'; + if ($extension->getSimilarExtensions()) { + $html .= '<dt>'.$this->getLang('similar').'</dt>'; + $html .= '<dd>'; + $html .= $this->makeLinkList($extension->getSimilarExtensions()); + $html .= '</dd>'; } - if($extension->getConflicts()) { - $return .= '<dt>'.$this->getLang('conflicts').'</dt>'; - $return .= '<dd>'; - $return .= $this->make_linklist($extension->getConflicts()); - $return .= '</dd>'; + if ($extension->getConflicts()) { + $html .= '<dt>'.$this->getLang('conflicts').'</dt>'; + $html .= '<dd>'; + $html .= $this->makeLinkList($extension->getConflicts()); + $html .= '</dd>'; } - $return .= '</dl>'.DOKU_LF; - return $return; + $html .= '</dl>'.DOKU_LF; + return $html; } /** @@ -446,12 +539,15 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param array $ext The extensions * @return string The HTML code */ - function make_linklist($ext) { - $return = ''; + public function makeLinkList($ext) + { + $html = ''; foreach ($ext as $link) { - $return .= '<bdi><a href="'.$this->gui->tabURL('search', array('q'=>'ext:'.$link)).'">'.hsc($link).'</a></bdi>, '; + $html .= '<bdi><a href="'. + $this->gui->tabURL('search', array('q'=>'ext:'.$link)).'">'. + hsc($link).'</a></bdi>, '; } - return rtrim($return, ', '); + return rtrim($html, ', '); } /** @@ -460,59 +556,64 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param helper_plugin_extension_extension $extension The extension * @return string The HTML code */ - function make_actions(helper_plugin_extension_extension $extension) { + public function makeActions(helper_plugin_extension_extension $extension) + { global $conf; - $return = ''; + $html = ''; $errors = ''; if ($extension->isInstalled()) { if (($canmod = $extension->canModify()) === true) { if (!$extension->isProtected()) { - $return .= $this->make_action('uninstall', $extension); + $html .= $this->makeAction('uninstall', $extension); } if ($extension->getDownloadURL()) { if ($extension->updateAvailable()) { - $return .= $this->make_action('update', $extension); + $html .= $this->makeAction('update', $extension); } else { - $return .= $this->make_action('reinstall', $extension); + $html .= $this->makeAction('reinstall', $extension); } } - }else{ + } else { $errors .= '<p class="permerror">'.$this->getLang($canmod).'</p>'; } if (!$extension->isProtected() && !$extension->isTemplate()) { // no enable/disable for templates if ($extension->isEnabled()) { - $return .= $this->make_action('disable', $extension); + $html .= $this->makeAction('disable', $extension); } else { - $return .= $this->make_action('enable', $extension); + $html .= $this->makeAction('enable', $extension); } } - if ($extension->isGitControlled()){ + if ($extension->isGitControlled()) { $errors .= '<p class="permerror">'.$this->getLang('git').'</p>'; } - if ($extension->isEnabled() && in_array('Auth', $extension->getTypes()) && $conf['authtype'] != $extension->getID()) { + if ($extension->isEnabled() && + in_array('Auth', $extension->getTypes()) && + $conf['authtype'] != $extension->getID() + ) { $errors .= '<p class="permerror">'.$this->getLang('auth').'</p>'; } - - }else{ + } else { if (($canmod = $extension->canModify()) === true) { if ($extension->getDownloadURL()) { - $return .= $this->make_action('install', $extension); + $html .= $this->makeAction('install', $extension); } - }else{ + } else { $errors .= '<div class="permerror">'.$this->getLang($canmod).'</div>'; } } if (!$extension->isInstalled() && $extension->getDownloadURL()) { - $return .= ' <span class="version">'.$this->getLang('available_version').' '; - $return .= ($extension->getLastUpdate() ? hsc($extension->getLastUpdate()) : $this->getLang('unknown')).'</span>'; + $html .= ' <span class="version">'.$this->getLang('available_version').' '; + $html .= ($extension->getLastUpdate() + ? hsc($extension->getLastUpdate()) + : $this->getLang('unknown')).'</span>'; } - return $return.' '.$errors.DOKU_LF; + return $html.' '.$errors.DOKU_LF; } /** @@ -522,7 +623,8 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param helper_plugin_extension_extension $extension The extension * @return string The HTML code */ - function make_action($action, $extension) { + public function makeAction($action, $extension) + { $title = ''; switch ($action) { @@ -535,7 +637,9 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { $classes = 'button '.$action; $name = 'fn['.$action.']['.hsc($extension->getID()).']'; - return '<button class="'.$classes.'" name="'.$name.'" type="submit" '.$title.'>'.$this->getLang('btn_'.$action).'</button> '; + $html = '<button class="'.$classes.'" name="'.$name.'" type="submit" '.$title.'>'. + $this->getLang('btn_'.$action).'</button> '; + return $html; } /** @@ -544,24 +648,27 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { * @param helper_plugin_extension_extension $extension The extension * @return string The description of all relevant statusses */ - function make_status(helper_plugin_extension_extension $extension) { + public function makeStatus(helper_plugin_extension_extension $extension) + { $status = array(); - if ($extension->isInstalled()) { $status[] = $this->getLang('status_installed'); if ($extension->isProtected()) { $status[] = $this->getLang('status_protected'); } else { - $status[] = $extension->isEnabled() ? $this->getLang('status_enabled') : $this->getLang('status_disabled'); + $status[] = $extension->isEnabled() + ? $this->getLang('status_enabled') + : $this->getLang('status_disabled'); } } else { $status[] = $this->getLang('status_not_installed'); } - if(!$extension->canModify()) $status[] = $this->getLang('status_unmodifiable'); - if($extension->isBundled()) $status[] = $this->getLang('status_bundled'); - $status[] = $extension->isTemplate() ? $this->getLang('status_template') : $this->getLang('status_plugin'); - return join(', ', $status); + if (!$extension->canModify()) $status[] = $this->getLang('status_unmodifiable'); + if ($extension->isBundled()) $status[] = $this->getLang('status_bundled'); + $status[] = $extension->isTemplate() + ? $this->getLang('status_template') + : $this->getLang('status_plugin'); + return implode(', ', $status); } - } diff --git a/lib/plugins/extension/helper/repository.php b/lib/plugins/extension/helper/repository.php index 5dc2707cf..712baa05c 100644 --- a/lib/plugins/extension/helper/repository.php +++ b/lib/plugins/extension/helper/repository.php @@ -6,34 +6,39 @@ * @author Michael Hamann <michael@content-space.de> */ -#define('EXTENSION_REPOSITORY_API', 'http://localhost/dokuwiki/lib/plugins/pluginrepo/api.php'); - -if (!defined('EXTENSION_REPOSITORY_API_ENDPOINT')) - define('EXTENSION_REPOSITORY_API', 'http://www.dokuwiki.org/lib/plugins/pluginrepo/api.php'); - -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); +use dokuwiki\Cache\Cache; +use dokuwiki\HTTP\DokuHTTPClient; +use dokuwiki\Extension\PluginController; /** * Class helper_plugin_extension_repository provides access to the extension repository on dokuwiki.org */ -class helper_plugin_extension_repository extends DokuWiki_Plugin { +class helper_plugin_extension_repository extends DokuWiki_Plugin +{ + + const EXTENSION_REPOSITORY_API = 'http://www.dokuwiki.org/lib/plugins/pluginrepo/api.php'; + private $loaded_extensions = array(); private $has_access = null; + /** * Initialize the repository (cache), fetches data for all installed plugins */ - public function init() { - /* @var Doku_Plugin_Controller $plugin_controller */ + public function init() + { + /* @var PluginController $plugin_controller */ global $plugin_controller; if ($this->hasAccess()) { $list = $plugin_controller->getList('', true); $request_data = array('fmt' => 'php'); $request_needed = false; foreach ($list as $name) { - $cache = new cache('##extension_manager##'.$name, '.repo'); + $cache = new Cache('##extension_manager##'.$name, '.repo'); - if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { + if (!isset($this->loaded_extensions[$name]) && + $this->hasAccess() && + !$cache->useCache(array('age' => 3600 * 24)) + ) { $this->loaded_extensions[$name] = true; $request_data['ext'][] = $name; $request_needed = true; @@ -42,11 +47,11 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { if ($request_needed) { $httpclient = new DokuHTTPClient(); - $data = $httpclient->post(EXTENSION_REPOSITORY_API, $request_data); + $data = $httpclient->post(self::EXTENSION_REPOSITORY_API, $request_data); if ($data !== false) { $extensions = unserialize($data); foreach ($extensions as $extension) { - $cache = new cache('##extension_manager##'.$extension['plugin'], '.repo'); + $cache = new Cache('##extension_manager##'.$extension['plugin'], '.repo'); $cache->storeCache(serialize($extension)); } } else { @@ -59,16 +64,17 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { /** * If repository access is available * + * @param bool $usecache use cached result if still valid * @return bool If repository access is available */ - public function hasAccess() { + public function hasAccess($usecache = true) { if ($this->has_access === null) { - $cache = new cache('##extension_manager###hasAccess', '.repo'); + $cache = new Cache('##extension_manager###hasAccess', '.repo'); - if (!$cache->useCache(array('age' => 3600 * 24, 'purge'=>1))) { + if (!$cache->useCache(array('age' => 60*10, 'purge' => !$usecache))) { $httpclient = new DokuHTTPClient(); $httpclient->timeout = 5; - $data = $httpclient->get(EXTENSION_REPOSITORY_API.'?cmd=ping'); + $data = $httpclient->get(self::EXTENSION_REPOSITORY_API.'?cmd=ping'); if ($data !== false) { $this->has_access = true; $cache->storeCache(1); @@ -89,13 +95,17 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { * @param string $name The plugin name to get the data for, template names need to be prefix by 'template:' * @return array The data or null if nothing was found (possibly no repository access) */ - public function getData($name) { - $cache = new cache('##extension_manager##'.$name, '.repo'); - - if (!isset($this->loaded_extensions[$name]) && $this->hasAccess() && !$cache->useCache(array('age' => 3600 * 24))) { + public function getData($name) + { + $cache = new Cache('##extension_manager##'.$name, '.repo'); + + if (!isset($this->loaded_extensions[$name]) && + $this->hasAccess() && + !$cache->useCache(array('age' => 3600 * 24)) + ) { $this->loaded_extensions[$name] = true; $httpclient = new DokuHTTPClient(); - $data = $httpclient->get(EXTENSION_REPOSITORY_API.'?fmt=php&ext[]='.urlencode($name)); + $data = $httpclient->get(self::EXTENSION_REPOSITORY_API.'?fmt=php&ext[]='.urlencode($name)); if ($data !== false) { $result = unserialize($data); $cache->storeCache(serialize($result[0])); @@ -116,21 +126,22 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { * @param string $q the query string * @return array a list of matching extensions */ - public function search($q){ - $query = $this->parse_query($q); + public function search($q) + { + $query = $this->parseQuery($q); $query['fmt'] = 'php'; $httpclient = new DokuHTTPClient(); - $data = $httpclient->post(EXTENSION_REPOSITORY_API, $query); + $data = $httpclient->post(self::EXTENSION_REPOSITORY_API, $query); if ($data === false) return array(); $result = unserialize($data); $ids = array(); // store cache info for each extension - foreach($result as $ext){ + foreach ($result as $ext) { $name = $ext['plugin']; - $cache = new cache('##extension_manager##'.$name, '.repo'); + $cache = new Cache('##extension_manager##'.$name, '.repo'); $cache->storeCache(serialize($ext)); $ids[] = $name; } @@ -144,7 +155,8 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { * @param string $q * @return array */ - protected function parse_query($q){ + protected function parseQuery($q) + { $parameters = array( 'tag' => array(), 'mail' => array(), @@ -153,29 +165,29 @@ class helper_plugin_extension_repository extends DokuWiki_Plugin { ); // extract tags - if(preg_match_all('/(^|\s)(tag:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ - foreach($matches as $m){ + if (preg_match_all('/(^|\s)(tag:([\S]+))/', $q, $matches, PREG_SET_ORDER)) { + foreach ($matches as $m) { $q = str_replace($m[2], '', $q); $parameters['tag'][] = $m[3]; } } // extract author ids - if(preg_match_all('/(^|\s)(authorid:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ - foreach($matches as $m){ + if (preg_match_all('/(^|\s)(authorid:([\S]+))/', $q, $matches, PREG_SET_ORDER)) { + foreach ($matches as $m) { $q = str_replace($m[2], '', $q); $parameters['mail'][] = $m[3]; } } // extract extensions - if(preg_match_all('/(^|\s)(ext:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ - foreach($matches as $m){ + if (preg_match_all('/(^|\s)(ext:([\S]+))/', $q, $matches, PREG_SET_ORDER)) { + foreach ($matches as $m) { $q = str_replace($m[2], '', $q); $parameters['ext'][] = $m[3]; } } // extract types - if(preg_match_all('/(^|\s)(type:([\S]+))/', $q, $matches, PREG_SET_ORDER)){ - foreach($matches as $m){ + if (preg_match_all('/(^|\s)(type:([\S]+))/', $q, $matches, PREG_SET_ORDER)) { + foreach ($matches as $m) { $q = str_replace($m[2], '', $q); $parameters['type'][] = $m[3]; } diff --git a/lib/plugins/extension/lang/bg/intro_search.txt b/lib/plugins/extension/lang/bg/intro_search.txt index cec4cd243..f41c8c6df 100644 --- a/lib/plugins/extension/lang/bg/intro_search.txt +++ b/lib/plugins/extension/lang/bg/intro_search.txt @@ -1 +1 @@ -От тук имате достъп до всички налични приставки и шаблони за DokuWiki, които са дело на трети лица. Имайте предвид, че кодът им е потенциален **риск за сигурността на сървъра**! Повече по темата можете да прочетете в [[doku>security#plugin_security|plugin security]] first.
\ No newline at end of file +От тук имате достъп до всички налични [[doku>plugins|приставки]] и [[doku>template|шаблони]] за DokuWiki, които са дело на трети лица. Имайте предвид, че кодът им е потенциален **риск за сигурността на сървъра**! Повече по темата можете да прочетете в [[doku>security#plugin_security|plugin security]] first. diff --git a/lib/plugins/extension/lang/bg/lang.php b/lib/plugins/extension/lang/bg/lang.php index dda69a4b9..69ec260ef 100644 --- a/lib/plugins/extension/lang/bg/lang.php +++ b/lib/plugins/extension/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Kiril <neohidra@gmail.com> */ $lang['menu'] = 'Диспечер на приставки'; diff --git a/lib/plugins/extension/lang/ca/lang.php b/lib/plugins/extension/lang/ca/lang.php new file mode 100644 index 000000000..76fe584e8 --- /dev/null +++ b/lib/plugins/extension/lang/ca/lang.php @@ -0,0 +1,73 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> + */ +$lang['menu'] = 'Gestor d’extensions'; +$lang['tab_plugins'] = 'Connectors instal·lats'; +$lang['tab_templates'] = 'Plantilles instal·lades'; +$lang['tab_search'] = 'Cerca i instal·la'; +$lang['tab_install'] = 'Instal·lació manual'; +$lang['notimplemented'] = 'Encara no s’ha implementat aquesta prestació'; +$lang['notinstalled'] = 'No s’ha instal·lat aquesta extensió'; +$lang['alreadyenabled'] = 'Ja s’ha activat aquesta extensió'; +$lang['alreadydisabled'] = 'Ja s’ha desactivat aquesta extensió'; +$lang['pluginlistsaveerror'] = 'S’ha produït un error en desar la llista de connectors'; +$lang['unknownauthor'] = 'Autor desconegut'; +$lang['unknownversion'] = 'Versió desconeguda'; +$lang['btn_info'] = 'Mostra’n més informació'; +$lang['btn_update'] = 'Actualitza'; +$lang['btn_uninstall'] = 'Desinstal·la'; +$lang['btn_enable'] = 'Activa'; +$lang['btn_disable'] = 'Desactiva'; +$lang['btn_install'] = 'Instal·la'; +$lang['btn_reinstall'] = 'Reinstal·la'; +$lang['js']['reallydel'] = 'Esteu segur que voleu desinstal·lar aquesta extensió?'; +$lang['js']['display_viewoptions'] = 'Opcions de visualització:'; +$lang['js']['display_enabled'] = 'activat'; +$lang['js']['display_disabled'] = 'desactivat'; +$lang['js']['display_updatable'] = 'actualitzable'; +$lang['search_for'] = 'Cerca l’extensió:'; +$lang['search'] = 'Cerca'; +$lang['extensionby'] = '<strong>%s</strong> de %s'; +$lang['screenshot'] = 'Captura de pantalla de %s'; +$lang['popularity'] = 'Popularitat: %s %%'; +$lang['homepage_link'] = 'Documentació'; +$lang['bugs_features'] = 'Problemes'; +$lang['tags'] = 'Etiquetes:'; +$lang['author_hint'] = 'Cerca extensions d’aquest autor'; +$lang['installed'] = 'Instal·lat:'; +$lang['downloadurl'] = 'URL de baixada:'; +$lang['repository'] = 'Repositori:'; +$lang['unknown'] = '<em>desconegut</em>'; +$lang['installed_version'] = 'Versió instal·lada:'; +$lang['install_date'] = 'La darrera actualització:'; +$lang['available_version'] = 'Versió disponible:'; +$lang['compatible'] = 'Compatible amb:'; +$lang['depends'] = 'Depèn de:'; +$lang['similar'] = 'Semblant a:'; +$lang['conflicts'] = 'Entra en conflicte amb:'; +$lang['donate'] = 'Us agrada això?'; +$lang['donate_action'] = 'Compreu un cafè a l’autor!'; +$lang['repo_retry'] = 'Torna a provar'; +$lang['provides'] = 'Proporciona:'; +$lang['status'] = 'Estat:'; +$lang['status_installed'] = 'instal·lat'; +$lang['status_not_installed'] = 'no instal·lat'; +$lang['status_protected'] = 'protegit'; +$lang['status_enabled'] = 'activat'; +$lang['status_disabled'] = 'desactivat'; +$lang['status_unmodifiable'] = 'immodificable'; +$lang['status_plugin'] = 'connector'; +$lang['status_template'] = 'plantilla'; +$lang['msg_delete_failed'] = 'Ha fallat la desinstal·lació de l’extensió %s'; +$lang['msg_upload_failed'] = 'Ha fallat l’actualització del fitxer'; +$lang['security_issue'] = '<strong>Problema de seguretat:</strong> %s '; +$lang['security_warning'] = '<strong>Avís de seguretat:</strong> %s'; +$lang['wrong_folder'] = '<strong>El connector s’ha instal·lat incorrectament:</strong> canvieu el nom del directori del connector «%s» a «%s». '; +$lang['url_change'] = '<strong>L’URL ha canviat:</strong> l’URL de baixada ha canviat des de la darrera baixada. Reviseu que l’URL nou sigui vàlid abans d’actualitzar l’extensió.<br />Nou: %s<br />Anterior: %s '; +$lang['error_badurl'] = 'Els URL han de començar per http o https'; +$lang['error_download'] = 'No es pot baixar el fitxer: %s'; +$lang['install_url'] = 'Instal·la a partir d’un URL:'; diff --git a/lib/plugins/extension/lang/cs/intro_search.txt b/lib/plugins/extension/lang/cs/intro_search.txt index 4258ac4f2..b1659a577 100644 --- a/lib/plugins/extension/lang/cs/intro_search.txt +++ b/lib/plugins/extension/lang/cs/intro_search.txt @@ -1 +1 @@ -Tato záložka poskytuje náhled na všechny dostupné moduly a šablony třetích stran pro DokuWiki. Jejich instalací se múžete vystavit **bezpečnostním rizikům** o kterých se můžete více dočíst v oddíle [[doku>security#plugin_security|plugin security]].
\ No newline at end of file +Tato záložka poskytuje náhled na všechny dostupné [[doku>plugins|moduly]] a [[doku>cs:template|šablony]] třetích stran pro DokuWiki. Jejich instalací se múžete vystavit **bezpečnostním rizikům** o kterých se můžete více dočíst v oddíle [[doku>security#plugin_security|plugin security]]. diff --git a/lib/plugins/extension/lang/cy/intro_search.txt b/lib/plugins/extension/lang/cy/intro_search.txt index 8aef96039..d60f70fff 100644 --- a/lib/plugins/extension/lang/cy/intro_search.txt +++ b/lib/plugins/extension/lang/cy/intro_search.txt @@ -1 +1 @@ -Mae'r tab hwn yn rhoi mynediad i bob ategyn a thempled 3ydd parti ar gael ar gyfer DokuWiki. Sylwch fod arsefydlu cod 3ydd parti yn achosi **risg diogelwch**. Efallai hoffech chi ddarllen mwy ar [[doku>security#plugin_security|ddiogelwch ategion]] yn gyntaf.
\ No newline at end of file +Mae'r tab hwn yn rhoi mynediad i bob [[doku>plugins|ategyn]] a [[doku>template|thempled]] 3ydd parti ar gael ar gyfer DokuWiki. Sylwch fod arsefydlu cod 3ydd parti yn achosi **risg diogelwch**. Efallai hoffech chi ddarllen mwy ar [[doku>security#plugin_security|ddiogelwch ategion]] yn gyntaf. diff --git a/lib/plugins/extension/lang/da/intro_install.txt b/lib/plugins/extension/lang/da/intro_install.txt index e5657f218..b686f3fb6 100644 --- a/lib/plugins/extension/lang/da/intro_install.txt +++ b/lib/plugins/extension/lang/da/intro_install.txt @@ -1 +1 @@ -Her kan du installerer plugins eller templates manuelt, ved enten at uploade dem eller angive en direkte URL til download.
\ No newline at end of file +Her kan du installerer udvidelser eller temaer manuelt, ved enten at uploade dem eller angive en direkte URL til download.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/da/intro_plugins.txt b/lib/plugins/extension/lang/da/intro_plugins.txt index 5d9deaf1e..1c4e7877a 100644 --- a/lib/plugins/extension/lang/da/intro_plugins.txt +++ b/lib/plugins/extension/lang/da/intro_plugins.txt @@ -1 +1 @@ -Dette er de plugins du aktuelt har installeret i din DokuWiki. Du kan aktivere, deaktiver eller fjerne plugins fra denne side. Opdateringer til plugins vises også her - husk at læse dokumentationen til et plugin inden du opdaterer det.
\ No newline at end of file +Dette er de udvidelser du aktuelt har installeret i din DokuWiki. Du kan aktivere, deaktive eller fjerne udvidelser fra denne side. Opdateringer til udvidelser vises også her - husk at læse dokumentationen til en udvidelse inden du opdaterer den.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/da/intro_search.txt b/lib/plugins/extension/lang/da/intro_search.txt new file mode 100644 index 000000000..11caf32f7 --- /dev/null +++ b/lib/plugins/extension/lang/da/intro_search.txt @@ -0,0 +1 @@ +Denne fane giver dig adgang til alle tredje-parts [[doku>plugins|udvidelser]] og [[doku>template|temaer]] til DokuWiki. Vær opmærksom på at installation af tredje-parts kode kan være en **sikkerhedsrisiko**. Overvej at læse dokumentation af [[doku>security#plugin_security|sikkerhed vedr. udvidelser]] først.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/da/intro_templates.txt b/lib/plugins/extension/lang/da/intro_templates.txt index 1914500b1..fb1868b1d 100644 --- a/lib/plugins/extension/lang/da/intro_templates.txt +++ b/lib/plugins/extension/lang/da/intro_templates.txt @@ -1 +1 @@ -Dette er de templates du aktuelt har installeret i din DokuWiki. Du kan vælge det template du vil benytte under [[?do=admin&page=config|Opsætningsstyring]].
\ No newline at end of file +Dette er de temaer du aktuelt har installeret i din DokuWiki. Du kan vælge det tema du vil benytte under [[?do=admin&page=config|Opsætningsstyring]].
\ No newline at end of file diff --git a/lib/plugins/extension/lang/da/lang.php b/lib/plugins/extension/lang/da/lang.php index 5d31357ca..83a0223b6 100644 --- a/lib/plugins/extension/lang/da/lang.php +++ b/lib/plugins/extension/lang/da/lang.php @@ -3,15 +3,20 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jacob Palm <jacobpalmdk@icloud.com> * @author Søren Birk <soer9648@eucl.dk> - * @author Jacob Palm <mail@jacobpalm.dk> */ -$lang['tab_plugins'] = 'Installerede plugins'; -$lang['tab_templates'] = 'Installerede templates'; +$lang['menu'] = 'Udvidelseshåndtering'; +$lang['tab_plugins'] = 'Installerede udvidelser'; +$lang['tab_templates'] = 'Installerede temaer'; $lang['tab_search'] = 'Søg og installer'; $lang['tab_install'] = 'Manuel installation'; $lang['notimplemented'] = 'Denne funktion er ikke implementeret endnu'; -$lang['unknownauthor'] = 'Ukendt udgiver'; +$lang['notinstalled'] = 'Denne udvidelse er ikke installeret'; +$lang['alreadyenabled'] = 'Denne udvidelse er allerede aktiveret'; +$lang['alreadydisabled'] = 'Denne udvidelse er allerede deaktiveret'; +$lang['pluginlistsaveerror'] = 'Der opstod en fejl under opdatering af udvidelseslisten'; +$lang['unknownauthor'] = 'Ukendt udvikler'; $lang['unknownversion'] = 'Ukendt version'; $lang['btn_info'] = 'Vis mere information'; $lang['btn_update'] = 'Opdater'; @@ -21,6 +26,10 @@ $lang['btn_disable'] = 'Deaktiver'; $lang['btn_install'] = 'Installer'; $lang['btn_reinstall'] = 'Geninstaller'; $lang['js']['reallydel'] = 'Er du sikker på at du vil afinstallere denne udvidelse?'; +$lang['js']['display_viewoptions'] = 'Visningsindstillinger:'; +$lang['js']['display_enabled'] = 'aktiveret'; +$lang['js']['display_disabled'] = 'deaktiveret'; +$lang['js']['display_updatable'] = 'kan opdateres'; $lang['search_for'] = 'Søg efter udvidelse:'; $lang['search'] = 'Søg'; $lang['extensionby'] = '<strong>%s</strong> af %s'; @@ -29,9 +38,10 @@ $lang['popularity'] = 'Popularitet: %s%%'; $lang['homepage_link'] = 'Dokumenter'; $lang['bugs_features'] = 'Fejl'; $lang['tags'] = 'Tags:'; -$lang['author_hint'] = 'Søg efter udvidelse af denne udgiver'; +$lang['author_hint'] = 'Søg efter udvidelser udgivet af denne udvikler'; $lang['installed'] = 'Installeret:'; $lang['downloadurl'] = 'Download URL:'; +$lang['repository'] = 'Arkiv:'; $lang['unknown'] = '<em>ukendt</em>'; $lang['installed_version'] = 'Installeret version:'; $lang['install_date'] = 'Din sidste opdatering:'; @@ -39,9 +49,11 @@ $lang['available_version'] = 'Tilgængelig version:'; $lang['compatible'] = 'Kompatibel med:'; $lang['depends'] = 'Afhængig af:'; $lang['similar'] = 'Ligner:'; +$lang['conflicts'] = 'Konflikter med:'; $lang['donate'] = 'Synes du om denne?'; $lang['donate_action'] = 'Køb en kop kaffe til udvikleren!'; $lang['repo_retry'] = 'Førsøg igen'; +$lang['provides'] = 'Giver:'; $lang['status'] = 'Status:'; $lang['status_installed'] = 'installeret'; $lang['status_not_installed'] = 'ikke installeret'; @@ -49,32 +61,37 @@ $lang['status_protected'] = 'beskyttet'; $lang['status_enabled'] = 'aktiveret'; $lang['status_disabled'] = 'deaktiveret'; $lang['status_unmodifiable'] = 'låst for ændringer'; -$lang['status_plugin'] = 'plugin'; -$lang['status_template'] = 'template'; -$lang['msg_enabled'] = 'Plugin %s aktiveret'; -$lang['msg_disabled'] = 'Plugin %s deaktiveret'; -$lang['msg_delete_success'] = 'Udvidelse %s afinstalleret'; +$lang['status_plugin'] = 'udvidelse'; +$lang['status_template'] = 'tema'; +$lang['status_bundled'] = 'inkluderet'; +$lang['msg_enabled'] = 'Udvidelsen %s aktiveret'; +$lang['msg_disabled'] = 'Udvidelsen %s deaktiveret'; +$lang['msg_delete_success'] = 'Udvidelsen %s afinstalleret'; $lang['msg_delete_failed'] = 'Kunne ikke afinstallere udvidelsen %s'; -$lang['msg_template_install_success'] = 'Template %s blev installeret'; -$lang['msg_template_update_success'] = 'Template %s blev opdateret'; -$lang['msg_plugin_install_success'] = 'Plugin %s blev installeret'; -$lang['msg_plugin_update_success'] = 'Plugin %s blev opdateret'; +$lang['msg_template_install_success'] = 'Temaet %s blev installeret'; +$lang['msg_template_update_success'] = 'Temaet %s blev opdateret'; +$lang['msg_plugin_install_success'] = 'Udvidelsen %s blev installeret'; +$lang['msg_plugin_update_success'] = 'Udvidelsen %s blev opdateret'; $lang['msg_upload_failed'] = 'Kunne ikke uploade filen'; +$lang['msg_nooverwrite'] = 'Udvidelsen %s findes allerede og overskrives ikke. For at overskrive, marker indstillingen for overskrivelse'; +$lang['missing_dependency'] = '<strong>Manglende eller deaktiveret afhængighed:</strong> %s'; +$lang['security_issue'] = '<strong>Sikkerhedsproblem:</strong> %s'; +$lang['security_warning'] = '<strong>Sikkerhedsadvarsel:</strong> %s'; $lang['update_available'] = '<strong>Opdatering:</strong> Ny version %s er tilgængelig.'; -$lang['wrong_folder'] = '<strong>Plugin ikke installeret korrekt:</strong> Omdøb plugin-mappe "%s" til "%s".'; +$lang['wrong_folder'] = '<strong>Udvidelse ikke installeret korrekt:</strong> Omdøb udvidelses-mappe "%s" til "%s".'; $lang['url_change'] = '<strong>URL ændret:</strong> Download-URL er blevet ændret siden sidste download. Kontrollér om den nye URL er valid, inden udvidelsen opdateres.<br />Ny: %s<br />Gammel: %s'; $lang['error_badurl'] = 'URL\'er skal starte med http eller https'; $lang['error_dircreate'] = 'Ikke i stand til at oprette midlertidig mappe til modtagelse af download'; $lang['error_download'] = 'Ikke i stand til at downloade filen: %s'; -$lang['error_decompress'] = 'Ikke i stand til at dekomprimere den downloadede fil. Dette kan være et resultat af en dårlig download, hvor du i så fald bør du prøve igen; eller komprimeringsformatet kan være ukendt, hvor du i så fald bliver nød til at downloade og installere manuelt.'; +$lang['error_decompress'] = 'Ikke i stand til at dekomprimere den downloadede fil. Dette kan være et resultat af en dårlig download (i så fald bør du prøve igen), eller komprimeringsformatet kan være ukendt - i så fald bliver nød til at downloade og installere manuelt.'; $lang['error_findfolder'] = 'Ikke i stand til at identificere udvidelsesmappe - du bliver nød til at downloade og installere manuelt.'; -$lang['error_copy'] = 'Der opstod en kopieringsfejl under installation af filer til mappen <em>%s</em>: disken kan være fuld, eller mangel på fil-tilladelser. Dette kan have resulteret i et delvist installeret plugin, og efterladt din wiki-installation ustabil.'; +$lang['error_copy'] = 'Der opstod en kopieringsfejl under installation af filer til mappen <em>%s</em>: disken kan være fuld, eller mangel på fil-tilladelser. Dette kan have resulteret i en delvist installeret udvidelse, hvilket kan gøre din wiki-installation ustabil.'; $lang['noperms'] = 'Udvidelsesmappe er ikke skrivbar'; -$lang['notplperms'] = 'Skabelonmappe er ikke skrivbar'; -$lang['nopluginperms'] = 'Pluginmappe er ikke skrivbar'; -$lang['git'] = 'Udvidelsen blev installeret via git - du vil muligvis ikke opdatere herfra.'; -$lang['auth'] = 'Auth-plugin er ikke aktiveret i konfigurationen - overvej at deaktivere den.'; +$lang['notplperms'] = 'Temamappe er ikke skrivbar'; +$lang['nopluginperms'] = 'Udvidelsesmappe er ikke skrivbar'; +$lang['git'] = 'Udvidelsen blev installeret via git - du bør muligvis ikke opdatere herfra.'; +$lang['auth'] = 'Auth-udvidelse er ikke aktiveret i konfigurationen - overvej at deaktivere den.'; $lang['install_url'] = 'Installér fra URL:'; -$lang['install_upload'] = 'Upload Udvidelse:'; -$lang['repo_error'] = 'Plugin-arkivet kunne ikke kontaktes. Kontrollér at din server kan kontakte www.dokuwiki.org kontrollér dine proxy-indstillinger.'; +$lang['install_upload'] = 'Upload udvidelse:'; +$lang['repo_error'] = 'Udvidelses-arkivet kunne ikke kontaktes. Kontrollér at din server kan kontakte www.dokuwiki.org kontrollér dine proxy-indstillinger.'; $lang['nossl'] = 'Din PHP lader til at mangle understøttelse for SSL. Mange DokuWiki udvidelser vil ikke kunne downloades.'; diff --git a/lib/plugins/extension/lang/de-informal/intro_plugins.txt b/lib/plugins/extension/lang/de-informal/intro_plugins.txt index 13ba70519..b02041e3a 100644 --- a/lib/plugins/extension/lang/de-informal/intro_plugins.txt +++ b/lib/plugins/extension/lang/de-informal/intro_plugins.txt @@ -1 +1 @@ -Dies sind die Plugins, die bereits installiert sind. Du kannst sie hier an- oder abschalten oder sie komplett deinstallieren. Außerdem werden hier Updates zu den installiereten Plugins angezeigt. Bitte lies vor einem Update die zugehörige Dokumentation.
\ No newline at end of file +Dies sind die Plugins, die bereits installiert sind. Du kannst sie hier an- oder abschalten oder sie komplett deinstallieren. Außerdem werden hier Updates zu den installierten Plugins angezeigt. Bitte lies vor einem Update die zugehörige Dokumentation. diff --git a/lib/plugins/extension/lang/de-informal/intro_search.txt b/lib/plugins/extension/lang/de-informal/intro_search.txt index 9300f9edf..2c2191b64 100644 --- a/lib/plugins/extension/lang/de-informal/intro_search.txt +++ b/lib/plugins/extension/lang/de-informal/intro_search.txt @@ -1 +1 @@ -Dieser Tab gibt Dir Zugriff auf alle vorhandenen Plugins und Templates für DokuWiki. Bitte bedenke, dass jede installierte Erweiterung ein Sicherheitsrisiko darstellen kann. Du solltest vor einer Installation die [[doku>security#plugin_security|Plugin Security]] Informationen lesen.
\ No newline at end of file +Dieser Tab gibt Dir Zugriff auf alle vorhandenen [[doku>de:plugins|Plugins]] und [[doku>de:template|Templates]] für DokuWiki. Bitte bedenke, dass jede installierte Erweiterung ein Sicherheitsrisiko darstellen kann. Du solltest vor einer Installation die [[doku>security#plugin_security|Plugin Security]] Informationen lesen. diff --git a/lib/plugins/extension/lang/de-informal/lang.php b/lib/plugins/extension/lang/de-informal/lang.php index 4daec7f65..10401061e 100644 --- a/lib/plugins/extension/lang/de-informal/lang.php +++ b/lib/plugins/extension/lang/de-informal/lang.php @@ -77,19 +77,19 @@ $lang['security_issue'] = '<strong>Sicherheitsproblem:</strong> %s'; $lang['security_warning'] = '<strong>Sicherheitswarnung:</strong> %s'; $lang['update_available'] = '<strong>Update:</strong> Version %s steht zum Download bereit.'; $lang['wrong_folder'] = '<strong>Plugin wurde nicht korrekt installiert:</strong> Benenne das Plugin-Verzeichnis "%s" in "%s" um.'; -$lang['url_change'] = '<strong>URL geändert:</strong> Die Download URL wurde seit dem letzten Download geändert. Internetadresse vor Aktualisierung der Erweiterung auf Gültigkeit prüfen.<br />Neu: %s<br />Alt: %s'; +$lang['url_change'] = '<strong>URL geändert:</strong> Die Download-URL wurde seit dem letzten Download geändert. Internetadresse vor Aktualisierung der Erweiterung auf Gültigkeit prüfen.<br />Neu: %s<br />Alt: %s'; $lang['error_badurl'] = 'URLs sollten mit http oder https beginnen'; $lang['error_dircreate'] = 'Temporärer Ordner konnte nicht erstellt werden um Download zu abzuspeichern'; $lang['error_download'] = 'Download der Datei: %s nicht möglich.'; -$lang['error_decompress'] = 'Die heruntergeladene Datei konnte nicht entpackt werden. Dies kann die Folge eines fehlerhaften Downloads sein. In diesem Fall solltest du versuchen den Vorgang zu wiederholen. Es kann auch die Folge eines unbekannten Kompressionsformates sein, in diesem Fall musst du die Datei selber herunterladen und manuell installieren.'; +$lang['error_decompress'] = 'Die heruntergeladene Datei konnte nicht entpackt werden. Dies kann die Folge eines fehlerhaften Downloads sein. In diesem Fall solltest du versuchen den Vorgang zu wiederholen. Es kann auch die Folge eines unbekannten Kompressionsformates sein, in diesem Fall musst du die Datei selber herunterladen und manuell installieren.'; $lang['error_findfolder'] = 'Das Erweiterungs-Verzeichnis konnte nicht identifiziert werden, lade die Datei herunter und installiere sie manuell.'; $lang['error_copy'] = 'Beim Versuch Dateien in den Ordner <em>%s</em>: zu installieren trat ein Kopierfehler auf. Die Dateizugriffsberechtigungen könnten falsch sein. Dies kann an einem unvollständig installierten Plugin liegen und beeinträchtigt somit die Stabilität deiner Wiki-Installation.'; $lang['noperms'] = 'Das Erweiterungs-Verzeichnis ist schreibgeschützt'; $lang['notplperms'] = 'Das Template-Verzeichnis ist schreibgeschützt'; $lang['nopluginperms'] = 'Das Plugin-Verzeichnis ist schreibgeschützt'; $lang['git'] = 'Diese Erweiterung wurde über git installiert und sollte daher nicht hier aktualisiert werden.'; -$lang['auth'] = 'Dieses Auth Plugin ist in der Konfiguration nicht aktiviert, Du solltest es deaktivieren.'; +$lang['auth'] = 'Dieses Auth-Plugin ist in der Konfiguration nicht aktiviert, Du solltest es deaktivieren.'; $lang['install_url'] = 'Von URL installieren:'; $lang['install_upload'] = 'Erweiterung hochladen:'; -$lang['repo_error'] = 'Es konnte keine Verbindung zum Plugin-Verzeichnis hergestellt werden. Stelle sicher dass der Server Verbindung mit www.dokuwiki.org aufnehmen darf und überprüfe deine Proxy-Einstellungen.'; -$lang['nossl'] = 'Deine PHP-Installation scheint SSL nicht zu unterstützen. Das Herunterladen vieler DokuWiki Erweiterungen wird scheitern.'; +$lang['repo_error'] = 'Es konnte keine Verbindung zum Plugin-Verzeichnis hergestellt werden. Stelle sicher, dass der Server Verbindung mit www.dokuwiki.org aufnehmen darf und überprüfe deine Proxy-Einstellungen.'; +$lang['nossl'] = 'Deine PHP-Installation scheint SSL nicht zu unterstützen. Das Herunterladen vieler DokuWiki-Erweiterungen wird scheitern.'; diff --git a/lib/plugins/extension/lang/de/intro_plugins.txt b/lib/plugins/extension/lang/de/intro_plugins.txt index 1a1521050..5ea4cf12c 100644 --- a/lib/plugins/extension/lang/de/intro_plugins.txt +++ b/lib/plugins/extension/lang/de/intro_plugins.txt @@ -1 +1 @@ -Dies sind die Plugins, die bereits installiert sind. Sie können sie hier an- oder abschalten oder sie komplett deinstallieren. Außerdem werden hier Updates zu den installiereten Plugins angezeigt. Bitte lesen Sie vor einem Update die zugehörige Dokumentation.
\ No newline at end of file +Dies sind die Plugins, die bereits installiert sind. Sie können sie hier an- oder abschalten oder sie komplett deinstallieren. Außerdem werden hier Updates zu den installierten Plugins angezeigt. Bitte lesen Sie vor einem Update die zugehörige Dokumentation. diff --git a/lib/plugins/extension/lang/de/intro_search.txt b/lib/plugins/extension/lang/de/intro_search.txt index 366925b92..12b439d38 100644 --- a/lib/plugins/extension/lang/de/intro_search.txt +++ b/lib/plugins/extension/lang/de/intro_search.txt @@ -1 +1 @@ -Dieser Tab gibt Ihnen Zugriff auf alle vorhandenen Plugins und Templates für DokuWiki. Bitte bedenken Sie, dass jede installierte Erweiterung ein Sicherheitsrisiko darstellen kann. Sie sollten vor einer Installation die [[doku>security#plugin_security|Plugin Security]] Informationen lesen.
\ No newline at end of file +Dieser Tab gibt Ihnen Zugriff auf alle vorhandenen [[doku>de:plugins|Plugins]] und [[doku>de:template|Templates]] für DokuWiki. Bitte bedenken Sie, dass jede installierte Erweiterung ein Sicherheitsrisiko darstellen kann. Sie sollten vor einer Installation die [[doku>security#plugin_security|Plugin Security]] Informationen lesen. diff --git a/lib/plugins/extension/lang/de/lang.php b/lib/plugins/extension/lang/de/lang.php index 68ce0adb5..f2dd77cc4 100644 --- a/lib/plugins/extension/lang/de/lang.php +++ b/lib/plugins/extension/lang/de/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Benjamin Molitor <bmolitor@uos.de> * @author H. Richard <wanderer379@t-online.de> * @author Joerg <scooter22@gmx.de> * @author Simon <st103267@stud.uni-stuttgart.de> @@ -46,7 +47,7 @@ $lang['bugs_features'] = 'Bugs'; $lang['tags'] = 'Schlagworte'; $lang['author_hint'] = 'Suche weitere Erweiterungen dieses Autors'; $lang['installed'] = 'Installiert:'; -$lang['downloadurl'] = 'URL zum Herunterladen:'; +$lang['downloadurl'] = 'Download-URL:'; $lang['repository'] = 'Quelle:'; $lang['unknown'] = '<em>unbekannt</em>'; $lang['installed_version'] = 'Installierte Version:'; @@ -84,19 +85,19 @@ $lang['security_issue'] = '<strong>Sicherheitsproblem:</strong> %s'; $lang['security_warning'] = '<strong>Sicherheitswarnung:</strong> %s'; $lang['update_available'] = '<strong>Update:</strong> Version %s steht zum Download bereit.'; $lang['wrong_folder'] = '<strong>Plugin wurde nicht korrekt installiert:</strong> Benennen Sie das Plugin-Verzeichnis "%s" in "%s" um.'; -$lang['url_change'] = '<strong>URL geändert:</strong> Die Download URL wurde seit dem letzten Download geändert. Internetadresse vor Aktualisierung der Erweiterung auf Gültigkeit prüfen.<br />Neu: %s<br />Alt: %s'; +$lang['url_change'] = '<strong>URL geändert:</strong> Die Download-URL wurde seit dem letzten Download geändert. Internetadresse vor Aktualisierung der Erweiterung auf Gültigkeit prüfen.<br />Neu: %s<br />Alt: %s'; $lang['error_badurl'] = 'URLs sollten mit http oder https beginnen'; $lang['error_dircreate'] = 'Temporärer Ordner konnte nicht erstellt werden, um Download zu abzuspeichern'; $lang['error_download'] = 'Download der Datei: %s nicht möglich.'; -$lang['error_decompress'] = 'Die heruntergeladene Datei konnte nicht entpackt werden. Dies kann die Folge eines fehlerhaften Downloads sein. In diesem Fall sollten Sie versuchen den Vorgang zu wiederholen. Es kann auch die Folge eines unbekannten Kompressionsformates sein, in diesem Fall müssen Sie die Datei selber herunterladen und manuell installieren.'; +$lang['error_decompress'] = 'Die heruntergeladene Datei konnte nicht entpackt werden. Dies kann die Folge eines fehlerhaften Downloads sein. In diesem Fall sollten Sie versuchen den Vorgang zu wiederholen. Es kann auch die Folge eines unbekannten Kompressionsformates sein, in diesem Fall müssen Sie die Datei selber herunterladen und manuell installieren.'; $lang['error_findfolder'] = 'Das Erweiterungs-Verzeichnis konnte nicht identifiziert werden, laden und installieren Sie die Datei manuell.'; $lang['error_copy'] = 'Beim Versuch Dateien in den Ordner <em>%s</em>: zu installieren trat ein Kopierfehler auf. Die Dateizugriffsberechtigungen könnten falsch sein. Dies kann an einem unvollständig installierten Plugin liegen und beeinträchtigt somit die Stabilität Ihre Wiki-Installation.'; $lang['noperms'] = 'Das Erweiterungs-Verzeichnis ist schreibgeschützt'; $lang['notplperms'] = 'Das Template-Verzeichnis ist schreibgeschützt'; $lang['nopluginperms'] = 'Das Plugin-Verzeichnis ist schreibgeschützt'; $lang['git'] = 'Diese Erweiterung wurde über git installiert und sollte daher nicht hier aktualisiert werden.'; -$lang['auth'] = 'Dieses Auth Plugin ist in der Konfiguration nicht aktiviert, Sie sollten es deaktivieren.'; +$lang['auth'] = 'Dieses Auth-Plugin ist in der Konfiguration nicht aktiviert, Sie sollten es deaktivieren.'; $lang['install_url'] = 'Von Webadresse (URL) installieren'; $lang['install_upload'] = 'Erweiterung hochladen:'; -$lang['repo_error'] = 'Es konnte keine Verbindung zum Plugin-Verzeichnis hergestellt werden. Stellen sie sicher das der Server Verbindung mit www.dokuwiki.org aufnehmen darf und überprüfen sie ihre Proxy Einstellungen.'; -$lang['nossl'] = 'Ihr PHP scheint SSL nicht zu unterstützen. Das Herunterladen vieler DokuWiki Erweiterungen wird scheitern.'; +$lang['repo_error'] = 'Es konnte keine Verbindung zum Plugin-Verzeichnis hergestellt werden. Stellen Sie sicher, dass der Server Verbindung mit www.dokuwiki.org aufnehmen darf und überprüfen Sie ihre Proxy-Einstellungen.'; +$lang['nossl'] = 'Ihr PHP scheint SSL nicht zu unterstützen. Das Herunterladen vieler DokuWiki-Erweiterungen wird scheitern.'; diff --git a/lib/plugins/extension/lang/el/intro_install.txt b/lib/plugins/extension/lang/el/intro_install.txt new file mode 100644 index 000000000..bdb342d8b --- /dev/null +++ b/lib/plugins/extension/lang/el/intro_install.txt @@ -0,0 +1 @@ +Εδώ μπορείτε να φορτώσετε επιπρόσθετα με το χέρι και πρότυπα είτε με αποστολή από τον υπολογιστή ή με την παροχή ενός URLμε άμεσο κατέβασμα από τον υπολογιστή.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/el/intro_plugins.txt b/lib/plugins/extension/lang/el/intro_plugins.txt new file mode 100644 index 000000000..189a27c4e --- /dev/null +++ b/lib/plugins/extension/lang/el/intro_plugins.txt @@ -0,0 +1 @@ +Αυτά είναι το επιπρόσθετα που εισήχθηκαν τώρα στο DokuWiki. Μπορείτε να ενεργοποιήσετε ή απενεργοποιήσετε ή να ακυρώσετε την εγκατάσταση εδώ. Οι ενημερώσεις των επιπρόσθετων προβάλλονται εδώ επίσης, βεβαιωθείτε πως διαβάσατε τα σχετικά έγγραφα πριν την ενημέρωση.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/el/intro_search.txt b/lib/plugins/extension/lang/el/intro_search.txt new file mode 100644 index 000000000..1fdbfe10e --- /dev/null +++ b/lib/plugins/extension/lang/el/intro_search.txt @@ -0,0 +1 @@ +Πατώντας στο τόξο έχετε πρόσβαση σε στοιχεία τρίτων του [[doku>plugins|plugins]] and [[doku>template|templates]] DokuWiki. Παρακαλώ να γνωρίζετε ότι η εγκατάσταση κωδικού τρίτου μπορεί να θέσει θέμα **ρίσκου ασφάλειας**, για την οποία μπορεί να θέλετε να διαβάζετε πρώτα.you[[doku>security#plugin_security|plugin security]] diff --git a/lib/plugins/extension/lang/el/intro_templates.txt b/lib/plugins/extension/lang/el/intro_templates.txt new file mode 100644 index 000000000..d8d212ea2 --- /dev/null +++ b/lib/plugins/extension/lang/el/intro_templates.txt @@ -0,0 +1 @@ +Αυτά είναι τα πρότυπα που είναι τώρα εγκαταστημένα στο DokuWiki. σας. Μπορείτε να επιλέξετε αυτό που θα χρησιμοποιήσετε [[?do=admin&page=config|Configuration Manager]]. diff --git a/lib/plugins/extension/lang/el/lang.php b/lib/plugins/extension/lang/el/lang.php new file mode 100644 index 000000000..cfbea5d0d --- /dev/null +++ b/lib/plugins/extension/lang/el/lang.php @@ -0,0 +1,89 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Katerina Katapodi <extragold1234@hotmail.com> + */ +$lang['menu'] = 'Κύρια Παράταση'; +$lang['tab_plugins'] = 'Εγκαταστημένα Επιπρόσθετα'; +$lang['tab_templates'] = 'Εγκατεστημένα μοντέλα'; +$lang['tab_search'] = 'Αναζήτηση και Εγκατάσταση'; +$lang['tab_install'] = 'Εγκατάσταση Χειροκίνητα'; +$lang['notimplemented'] = 'Αυτό το χαρακτηριστικό δεν έχει καθιερωθεί ακόμα'; +$lang['notinstalled'] = 'Αυτή η προέκταση δεν έχει εγκαταταθεί'; +$lang['alreadyenabled'] = 'Αυτή το επιπρόσθετο έχει ήδη ενεργοποιηθεί.'; +$lang['alreadydisabled'] = 'Το επιπρόσθετο έχει ήδη απενεργοποιηθεί.'; +$lang['pluginlistsaveerror'] = 'Υπήρξε σφάλμα κατά την αποθήκευση της λίστας επιπρόσθετων.'; +$lang['unknownauthor'] = 'Άγνωστος συγγραφέας '; +$lang['unknownversion'] = 'Άγνωστη εκδοχή '; +$lang['btn_info'] = 'Προβάλλετε περισσότερες πληροφορίες'; +$lang['btn_update'] = 'Ενημέρωση'; +$lang['btn_uninstall'] = 'Ακύρωση εγκατάστασης'; +$lang['btn_enable'] = 'Ενεργοποίηση'; +$lang['btn_disable'] = 'Απενεργοποίηση'; +$lang['btn_install'] = 'Ρύθμιση, εγκατάσταση'; +$lang['btn_reinstall'] = 'Εγκαταστήστε ξανά'; +$lang['js']['reallydel'] = 'Θέλετε οπωσδήποτε να ακυρώσετε αυτήν την προέκταση?'; +$lang['js']['display_viewoptions'] = 'Επιλογές:'; +$lang['js']['display_enabled'] = 'ενεργοποίηση'; +$lang['js']['display_disabled'] = 'απενεργοποίηση'; +$lang['js']['display_updatable'] = 'πρέπει να ενημερωθεί'; +$lang['search_for'] = 'Προέκταση Αναζήτησης'; +$lang['search'] = 'Αναζήτηση'; +$lang['extensionby'] = '<strong>%s</strong> από %s '; +$lang['screenshot'] = 'Εικονίδιο %s '; +$lang['popularity'] = 'Φήμη: %s%%'; +$lang['homepage_link'] = 'Έγγραφα '; +$lang['bugs_features'] = 'Λάθη'; +$lang['tags'] = 'Tags '; +$lang['author_hint'] = 'Αναζητήστε περαιτέρω από αυτόν τον συγγραφέα'; +$lang['installed'] = 'Εγκατάσταση:'; +$lang['downloadurl'] = 'Κατεβάστε URL:'; +$lang['repository'] = 'Χώρος αρχείων'; +$lang['unknown'] = '<em>άγνωστο</em> '; +$lang['installed_version'] = 'Μορφή εγκατάστασης:'; +$lang['install_date'] = 'Η τελευταία σας ενημέρωση:'; +$lang['available_version'] = 'Διαθέσιμη μορφή;'; +$lang['compatible'] = 'Συμβατό με:'; +$lang['depends'] = 'Εξαρτάται από:'; +$lang['similar'] = 'Όμοιο με : '; +$lang['conflicts'] = 'Αντιτίθεται στο:'; +$lang['donate'] = 'Έτσι? '; +$lang['donate_action'] = 'Αγόρασε στον συγγραφέα έναν καφέ'; +$lang['repo_retry'] = 'Προσπαθήστε πάλι'; +$lang['provides'] = 'Παρέχει; '; +$lang['status'] = 'Στάτους;'; +$lang['status_installed'] = 'εγκαταστημένο'; +$lang['status_not_installed'] = 'μη εγκαταστημένο'; +$lang['status_protected'] = 'προστατευμένο'; +$lang['status_enabled'] = 'ενεργοποιημένο'; +$lang['status_disabled'] = 'απενεργοποιημένο'; +$lang['status_unmodifiable'] = 'δεν μπορεί να τροποποιηθεί'; +$lang['status_plugin'] = 'επιπρόσθετο'; +$lang['status_template'] = 'μοντέλο'; +$lang['status_bundled'] = 'δεμένο'; +$lang['msg_enabled'] = 'Το επιπρόσθετο %s ενεργοποιήθηκε'; +$lang['msg_disabled'] = 'Το επιπρόσθετο %s απενεργοποιήθηκε'; +$lang['msg_delete_success'] = 'Η προέκταση %s δεν εγκαταστάθηκε '; +$lang['msg_delete_failed'] = 'Η ακύρωση εγκατάστασης Προέκτασης %s απέτυχε'; +$lang['msg_template_install_success'] = 'Το μοντέλο %s εγκαταστάθηκε με επιτυχία '; +$lang['msg_template_update_success'] = 'Το μοντέλο %s ενημερώθηκε με επιτυχία '; +$lang['msg_plugin_install_success'] = 'Το επιπρόσθετο %s εγκαταστάθηκε με επιτυχία '; +$lang['msg_plugin_update_success'] = 'Το επιπρόσθετο %s ενημερώθηκε με επιτυχία '; +$lang['msg_upload_failed'] = 'Το ανέβασμα του φακέλλου απέτυχε'; +$lang['missing_dependency'] = '<strong>Ιδιότητα που λείπει ή απενεργοποιήθηκε:</strong> %s '; +$lang['security_issue'] = '<strong>Δεν είναι ασφαλές:</strong> %s '; +$lang['security_warning'] = '<strong>Προειδοποίηση Ασφάλειας:</strong> %s '; +$lang['update_available'] = '<strong>Ενημέρωση:</strong> Η νέα εκδοχή %s είναι διαθέσιμη. '; +$lang['wrong_folder'] = '<strong>Λάθος εγκατάσταση του επιπρόσθετου:</strong> Δώστε όνομα ξανά στην λίστα διευθύνσεων του επιπρόσθετου "%s" στο "%s". '; +$lang['url_change'] = '<strong>URL άλλαξε:</strong> Ο τρόπος κατεβάσματος του URL έχει ανοίξει μια φορά από το πρώτο κατέβασμα. Ελέγξετε αν το νέο URL ισχύει πριν την ενημέρωση της επέκτασης. (επιπρόσθετου).<br />Καινούργιο: %s<br />Παλιό: %s '; +$lang['error_badurl'] = 'Τα URLs πρέπει να αρχίζουν με http ή https '; +$lang['error_dircreate'] = 'Δεν μπόρεσε να δημιουργήσει προσωρινό φάκελλο για να κατεβάσει αρχεία'; +$lang['error_download'] = 'Δεν μπόρεσε να κατεβάσει τον φάκελλο : %s'; +$lang['error_findfolder'] = 'Δεν μπόρεσε να εντοπίσει την λίστα διευθύνσεως επέκτασης, πρέπει να κατεβάσετε και εγκαταστήσετε χειροκίνητα'; +$lang['git'] = 'Αυτή η περαιτέρω ρύθμιση εγκαταστάθηκε μέσω git, μπορεί να μην θέλετε να την ανανεώσετε εδώ.'; +$lang['auth'] = 'Αυτό το αυθεντικό plugin(επιπρόσθετο) δεν έχει ενεργοποιηθεί κατά την διαμόρφωση, προσπαθήστε να το απενεργοποιήσετε. '; +$lang['install_url'] = 'Εγκαταστήσετε από το URL:'; +$lang['install_upload'] = 'Ανεβάστε στον υπολογιστή την Προέκταση:'; +$lang['repo_error'] = 'Δεν μπόρεσε να υπάρξει πρόσβαση στον χώρο αποθήκευσης επιπρόσθετων. Βεβαιωθείτε πως ο διακομιστής σας μπορεί να επικοινωνήσει με το www.dokuwiki.org για να ελέγξετε τις σχετικές ρυθμίσεις.'; diff --git a/lib/plugins/extension/lang/en/intro_search.txt b/lib/plugins/extension/lang/en/intro_search.txt index 244cd6812..81aa4314d 100644 --- a/lib/plugins/extension/lang/en/intro_search.txt +++ b/lib/plugins/extension/lang/en/intro_search.txt @@ -1 +1 @@ -This tab gives you access to all available 3rd party plugins and templates for DokuWiki. Please be aware that installing 3rd party code may pose a **security risk**, you may want to read about [[doku>security#plugin_security|plugin security]] first.
\ No newline at end of file +This tab gives you access to all available 3rd party [[doku>plugins|plugins]] and [[doku>template|templates]] for DokuWiki. Please be aware that installing 3rd party code may pose a **security risk**, you may want to read about [[doku>security#plugin_security|plugin security]] first. diff --git a/lib/plugins/extension/lang/en/lang.php b/lib/plugins/extension/lang/en/lang.php index 79f643629..f9753ae4d 100644 --- a/lib/plugins/extension/lang/en/lang.php +++ b/lib/plugins/extension/lang/en/lang.php @@ -76,6 +76,7 @@ $lang['msg_template_update_success'] = 'Template %s updated successfully'; $lang['msg_plugin_install_success'] = 'Plugin %s installed successfully'; $lang['msg_plugin_update_success'] = 'Plugin %s updated successfully'; $lang['msg_upload_failed'] = 'Uploading the file failed'; +$lang['msg_nooverwrite'] = 'Extension %s already exists so it is not being overwritten; to overwrite, tick the overwrite option'; $lang['missing_dependency'] = '<strong>Missing or disabled dependency:</strong> %s'; $lang['security_issue'] = '<strong>Security Issue:</strong> %s'; diff --git a/lib/plugins/extension/lang/eo/intro_search.txt b/lib/plugins/extension/lang/eo/intro_search.txt index 5d194948c..c42096aa9 100644 --- a/lib/plugins/extension/lang/eo/intro_search.txt +++ b/lib/plugins/extension/lang/eo/intro_search.txt @@ -1 +1 @@ -Tiu tabelo donas aliron al ĉiuj haveblaj eksteraj kromaĵoj kaj ŝablonoj por DokuWiki. Bonvolu konscii, ke instali eksteran kodaĵon povas enkonduki **sekurecriskon**, prefere legu antaŭe pri [[doku>security#plugin_security|sekureco de kromaĵo]].
\ No newline at end of file +Tiu tabelo donas aliron al ĉiuj haveblaj eksteraj [[doku>plugins|kromaĵoj]] kaj [[doku>template|ŝablonoj]] por DokuWiki. Bonvolu konscii, ke instali eksteran kodaĵon povas enkonduki **sekurecriskon**, prefere legu antaŭe pri [[doku>security#plugin_security|sekureco de kromaĵo]]. diff --git a/lib/plugins/extension/lang/es/intro_search.txt b/lib/plugins/extension/lang/es/intro_search.txt index f59bb33df..0942262a6 100644 --- a/lib/plugins/extension/lang/es/intro_search.txt +++ b/lib/plugins/extension/lang/es/intro_search.txt @@ -1 +1 @@ -Esta pestaña te da acceso a todos los plugins de 3as partes disponibles y plantillas para DokuWiki. Tenga en cuenta que la instalación de código de terceras partes puede plantear un **riesgo de seguridad**, es posible que desee leer primero sobre [[doku>security#plugin_security|plugin security]].
\ No newline at end of file +Esta pestaña te da acceso a todos los [[doku>es:plugins]] de 3as partes disponibles y [[doku>es:template|plantillas]] para DokuWiki. Tenga en cuenta que la instalación de código de terceras partes puede plantear un **riesgo de seguridad**, es posible que desee leer primero sobre [[doku>security#plugin_security|plugin security]]. diff --git a/lib/plugins/extension/lang/fa/intro_search.txt b/lib/plugins/extension/lang/fa/intro_search.txt index 07fde76c1..f47b24262 100644 --- a/lib/plugins/extension/lang/fa/intro_search.txt +++ b/lib/plugins/extension/lang/fa/intro_search.txt @@ -1 +1 @@ -این شاخه به تمام افزونهها و قالبهای نسل سوم داکو ویکی دسترسی میدهد. لطفا دقت کنید که نصب کد نسل سوم یک **ریسک امنیتی** است برای همین بهتر است که ابتدا [[doku>security#plugin_security|امنیت افزونه]] را مطالعه نمایید.
\ No newline at end of file +این شاخه به تمام [[doku>plugins|افزونهها]] و [[doku>template|قالبهای]] نسل سوم داکو ویکی دسترسی میدهد. لطفا دقت کنید که نصب کد نسل سوم یک **ریسک امنیتی** است برای همین بهتر است که ابتدا [[doku>security#plugin_security|امنیت افزونه]] را مطالعه نمایید. diff --git a/lib/plugins/extension/lang/fi/lang.php b/lib/plugins/extension/lang/fi/lang.php index a154f2563..08052fe47 100644 --- a/lib/plugins/extension/lang/fi/lang.php +++ b/lib/plugins/extension/lang/fi/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Jussi Takala <jussi.takala@live.fi> */ $lang['tab_plugins'] = 'Asennetut liitännäiset'; diff --git a/lib/plugins/extension/lang/fr/intro_search.txt b/lib/plugins/extension/lang/fr/intro_search.txt index 418e35972..b51fb9570 100644 --- a/lib/plugins/extension/lang/fr/intro_search.txt +++ b/lib/plugins/extension/lang/fr/intro_search.txt @@ -1 +1 @@ -Cet onglet vous donne accès à toutes les extensions de tierces parties. Restez conscients qu'installer du code de tierce partie peut poser un problème de **sécurité**. Vous voudrez peut-être au préalable lire l'article sur la [[doku>fr:security##securite_des_plugins|sécurité des plugins]].
\ No newline at end of file +Cet onglet vous donne accès à toutes les [[doku>fr:plugins|extensions]] et les [[doku>fr:template|thèmes]] de tierces parties. Restez conscients qu'installer du code de tierce partie peut poser un problème de **sécurité**. Vous voudrez peut-être au préalable lire l'article sur la [[doku>fr:security##securite_des_plugins|sécurité des plugins]]. diff --git a/lib/plugins/extension/lang/fr/lang.php b/lib/plugins/extension/lang/fr/lang.php index 9a578516a..29616080f 100644 --- a/lib/plugins/extension/lang/fr/lang.php +++ b/lib/plugins/extension/lang/fr/lang.php @@ -3,8 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Schplurtz le Déboulonné <Schplurtz@laposte.net> * @author Damien Regad <dregad@mantisbt.org> - * @author Schplurtz le Déboulonné <schplurtz@laposte.net> * @author Yves Grandvalet <Yves.Grandvalet@laposte.net> * @author Carbain Frédéric <fcarbain@yahoo.fr> * @author Nicolas Friedli <nicolas@theologique.ch> @@ -43,11 +43,11 @@ $lang['bugs_features'] = 'Bogues'; $lang['tags'] = 'Étiquettes :'; $lang['author_hint'] = 'Chercher les extensions de cet auteur'; $lang['installed'] = 'Installés :'; -$lang['downloadurl'] = 'URL de téléchargement :'; +$lang['downloadurl'] = 'Téléchargement :'; $lang['repository'] = 'Dépôt : '; $lang['unknown'] = '<em>inconnu</em>'; $lang['installed_version'] = 'Version installée :'; -$lang['install_date'] = 'Votre dernière mise à jour :'; +$lang['install_date'] = 'Dernière mise à jour :'; $lang['available_version'] = 'Version disponible :'; $lang['compatible'] = 'Compatible avec :'; $lang['depends'] = 'Dépend de :'; @@ -76,6 +76,7 @@ $lang['msg_template_update_success'] = 'Thème %s mis à jour avec succès'; $lang['msg_plugin_install_success'] = 'Greffon %s installé avec succès'; $lang['msg_plugin_update_success'] = 'Greffon %s mis à jour avec succès'; $lang['msg_upload_failed'] = 'Téléversement échoué'; +$lang['msg_nooverwrite'] = 'L\'extension %s existe déjà et ne sera pas remplacée. Pour la remplacer, cocher l\'option de remplacement d\'extension.'; $lang['missing_dependency'] = '<strong>Dépendance absente ou désactivée :</strong> %s'; $lang['security_issue'] = '<strong>Problème de sécurité :</strong> %s'; $lang['security_warning'] = '<strong>Avertissement de sécurité :</strong> %s'; diff --git a/lib/plugins/extension/lang/hr/intro_search.txt b/lib/plugins/extension/lang/hr/intro_search.txt index 405690581..88b6c3ad5 100644 --- a/lib/plugins/extension/lang/hr/intro_search.txt +++ b/lib/plugins/extension/lang/hr/intro_search.txt @@ -1 +1 @@ -Ovdje možete potražiti i druge dostupne dodatke i predloške za DokuWiki. Molimo budite svjesni da postavljanje koda razvijenog od treće strane može biti **sigurnosni rizik**, možda želite prvo pročitati o [[doku>security#plugin_security|sigurnosti dodataka]].
\ No newline at end of file +Ovdje možete potražiti i druge dostupne [[doku>plugins|dodatke]] i [[doku>template|predloške]] za DokuWiki. Molimo budite svjesni da postavljanje koda razvijenog od treće strane može biti **sigurnosni rizik**, možda želite prvo pročitati o [[doku>security#plugin_security|sigurnosti dodataka]]. diff --git a/lib/plugins/extension/lang/hu/intro_search.txt b/lib/plugins/extension/lang/hu/intro_search.txt index 87a2a5d64..aaa34eb59 100644 --- a/lib/plugins/extension/lang/hu/intro_search.txt +++ b/lib/plugins/extension/lang/hu/intro_search.txt @@ -1 +1 @@ -Ezen a fülön harmadik fél által készített modulokat és sablonokat találsz a DokuWiki-hez. Ne feledd, hogy a harmadik féltől származó kódok **biztonsági kockázatot** jelenthetnek, ennek a [[doku>security#plugin_security|modulok biztonsága]] oldalon olvashatsz utána a telepítés előtt.
\ No newline at end of file +Ezen a fülön harmadik fél által készített [[doku>plugins|modulokat]] és [[doku>template|sablonokat]] találsz a DokuWiki-hez. Ne feledd, hogy a harmadik féltől származó kódok **biztonsági kockázatot** jelenthetnek, ennek a [[doku>security#plugin_security|modulok biztonsága]] oldalon olvashatsz utána a telepítés előtt. diff --git a/lib/plugins/extension/lang/it/intro_search.txt b/lib/plugins/extension/lang/it/intro_search.txt index fb77d3683..40eace508 100644 --- a/lib/plugins/extension/lang/it/intro_search.txt +++ b/lib/plugins/extension/lang/it/intro_search.txt @@ -1 +1 @@ -Questa sezione ti da accesso a tutti i plugin e temi di terze parti disponibili per DokuWiki. Sappi che l'installazione di codice di terze parti potrebbe rappresentare un **rischio di sicurezza**, quindi, forse, prima vorresti informarti a proposito della [[doku>security#plugin_security|sicurezza dei plugin]].
\ No newline at end of file +Questa sezione ti da accesso a tutti i [[doku>it:plugins|plugin]] e [[doku>it:template|temi]] di terze parti disponibili per DokuWiki. Sappi che l'installazione di codice di terze parti potrebbe rappresentare un **rischio di sicurezza**, quindi, forse, prima vorresti informarti a proposito della [[doku>security#plugin_security|sicurezza dei plugin]]. diff --git a/lib/plugins/extension/lang/ja/intro_search.txt b/lib/plugins/extension/lang/ja/intro_search.txt index 66d977b1b..1998e8dde 100644 --- a/lib/plugins/extension/lang/ja/intro_search.txt +++ b/lib/plugins/extension/lang/ja/intro_search.txt @@ -1 +1 @@ -このタブでは、DokuWiki用の利用可能なすべてのサードパーティのプラグインとテンプレートにアクセスできます。サードパーティ製のコードには、**セキュリティ上のリスク**の可能性があることに注意してください、最初に[[doku>ja:security#プラグインのセキュリティ|プラグインのセキュリティ]]を読むことをお勧めします。
\ No newline at end of file +このタブでは、DokuWiki用の利用可能なすべてのサードパーティの[[doku>ja:plugins|プラグイン]]と[[doku>ja:template|テンプレート]]にアクセスできます。サードパーティ製のコードには、**セキュリティ上のリスク**の可能性があることに注意してください。最初に[[doku>ja:security#プラグインのセキュリティ|プラグインのセキュリティ]]を読むことをお勧めします。 diff --git a/lib/plugins/extension/lang/ja/lang.php b/lib/plugins/extension/lang/ja/lang.php index 6b3ef676a..1d288fa99 100644 --- a/lib/plugins/extension/lang/ja/lang.php +++ b/lib/plugins/extension/lang/ja/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> * @author Hideaki SAWADA <chuno@live.jp> * @author PzF_X <jp_minecraft@yahoo.co.jp> * @author Satoshi Sahara <sahara.satoshi@gmail.com> @@ -20,7 +21,7 @@ $lang['alreadydisabled'] = 'この拡張機能は無効です。'; $lang['pluginlistsaveerror'] = 'プラグイン一覧の保存中にエラーが発生しました。'; $lang['unknownauthor'] = '作者不明'; $lang['unknownversion'] = 'バージョン不明'; -$lang['btn_info'] = '詳細情報を表示する。'; +$lang['btn_info'] = '詳細情報を表示する'; $lang['btn_update'] = '更新'; $lang['btn_uninstall'] = 'アンインストール'; $lang['btn_enable'] = '有効化'; @@ -48,14 +49,14 @@ $lang['unknown'] = '<em>不明</em>'; $lang['installed_version'] = 'インストール済バージョン:'; $lang['install_date'] = '最終更新日:'; $lang['available_version'] = '利用可能バージョン:'; -$lang['compatible'] = '互換:'; -$lang['depends'] = '依存:'; -$lang['similar'] = '類似:'; -$lang['conflicts'] = '競合:'; -$lang['donate'] = 'お気に入り?'; -$lang['donate_action'] = '寄付先'; +$lang['compatible'] = '互換性のあるバージョン:'; +$lang['depends'] = '必須プラグイン:'; +$lang['similar'] = '類似しているプラグイン:'; +$lang['conflicts'] = '競合するプラグイン:'; +$lang['donate'] = '気に入りましたか?'; +$lang['donate_action'] = '寄付先はこちら'; $lang['repo_retry'] = '再実行'; -$lang['provides'] = '提供:'; +$lang['provides'] = '機能:'; $lang['status'] = '状態:'; $lang['status_installed'] = 'インストール済'; $lang['status_not_installed'] = '未インストール'; @@ -70,13 +71,13 @@ $lang['msg_enabled'] = '%s プラグインを有効化しました。' $lang['msg_disabled'] = '%s プラグインを無効化しました。'; $lang['msg_delete_success'] = '拡張機能 %s をアンインストールしました。'; $lang['msg_delete_failed'] = '拡張機能 %s のアンインストールに失敗しました。'; -$lang['msg_template_install_success'] = '%s テンプレートをインストールできました。'; -$lang['msg_template_update_success'] = '%s テンプレートを更新できました。'; -$lang['msg_plugin_install_success'] = '%s プラグインをインストールできました。'; -$lang['msg_plugin_update_success'] = '%s プラグインを更新できました。'; +$lang['msg_template_install_success'] = '%s テンプレートは正常にインストールされました。'; +$lang['msg_template_update_success'] = '%s テンプレートは正常に更新されました。'; +$lang['msg_plugin_install_success'] = '%s プラグインは正常にインストールされました。'; +$lang['msg_plugin_update_success'] = '%s プラグインは正常に更新されました。'; $lang['msg_upload_failed'] = 'ファイルのアップロードに失敗しました。'; $lang['missing_dependency'] = '<strong>依存関係が欠落または無効:</strong> %s'; -$lang['security_issue'] = '<strong>セキュリティ問題:</strong> %s'; +$lang['security_issue'] = '<strong>セキュリティ上の問題:</strong> %s'; $lang['security_warning'] = '<strong>セキュリティ警告:</strong> %s'; $lang['update_available'] = '<strong>更新:</strong> %sの新バージョンが利用可能です。'; $lang['wrong_folder'] = '<strong>プラグインは正しくインストールされませんでした:</strong> プラグインのディレクトリを "%s" から "%s" へ変更して下さい。'; @@ -86,13 +87,13 @@ $lang['error_dircreate'] = 'ダウンロード用の一時フォルダが $lang['error_download'] = 'ファイルをダウンロードできません:%s'; $lang['error_decompress'] = 'ダウンロードしたファイルを解凍できません。ダウンロードの失敗の結果であれば、再度試して下さい。圧縮形式が不明の場合は、手動でダウンロード・インストールしてください。'; $lang['error_findfolder'] = '拡張機能ディレクトリを認識できません。手動でダウンロード・インストールしてください。'; -$lang['error_copy'] = '<em>%s</em> ディレクトリのファイルをインストールしようとした時、ファイルコピーエラーが発生しました:ディスクがいっぱいかもしれませんし、ファイルのアクセス権が正しくないかもしれません。プラグインが一部分インストールされ、wiki が不安定になるかもしれません。'; +$lang['error_copy'] = '<em>%s</em> ディレクトリのファイルをインストールしようとした時、ファイルコピーエラーが発生しました。ディスクの空き容量が不足しているかもしれませんし、ファイルのアクセス権が正しくないかもしれません。今回の操作の結果、プラグインが一部分インストールされ、wiki が不安定になるかもしれません。'; $lang['noperms'] = '拡張機能ディレクトリが書き込み不可です。'; $lang['notplperms'] = 'テンプレートディレクトリが書き込み不可です。'; $lang['nopluginperms'] = 'プラグインディレクトリが書き込み不可です。'; $lang['git'] = 'この拡張機能は Git 経由でインストールされており、ここで更新すべきでないかもしれません。'; -$lang['auth'] = 'この認証プラグインは設定管理画面で無効化されています。'; +$lang['auth'] = 'この認証プラグインは設定管理画面で有効化されていません。この画面で無効化する事もご検討頂けます。'; $lang['install_url'] = 'URL からインストール:'; $lang['install_upload'] = '拡張機能をアップロード:'; $lang['repo_error'] = 'プラグインのリポジトリに接続できません。サーバーが www.dokuwiki.org に接続できることやプロキシの設定を確認して下さい。'; -$lang['nossl'] = 'PHP機能がSSLをサポートしていないため、拡張機能のダウンロードが正常に動作しません。'; +$lang['nossl'] = 'お使いのPHP機能がSSLをサポートしていないため、拡張機能のダウンロードが正常に動作しません。'; diff --git a/lib/plugins/extension/lang/ko/intro_search.txt b/lib/plugins/extension/lang/ko/intro_search.txt index b6760264e..e7bfca522 100644 --- a/lib/plugins/extension/lang/ko/intro_search.txt +++ b/lib/plugins/extension/lang/ko/intro_search.txt @@ -1 +1 @@ -이 탭은 도쿠위키를 위한 사용할 수 있는 모든 타사 플러그인과 템플릿에 접근하도록 제공합니다. 타사 코드를 설치하면 **보안 위험에 노출**될 수 있음을 유의하십시오, 먼저 [[doku>security#plugin_security|플러그인 보안]]에 대해 읽을 수 있습니다.
\ No newline at end of file +이 탭은 도쿠위키를 위한 사용할 수 있는 모든 타사 [[doku>ko:plugins|플러그인]]과 [[doku>ko:template|템플릿에]] 접근하도록 제공합니다. 타사 코드를 설치하면 **보안 위험에 노출**될 수 있음을 유의하십시오, 먼저 [[doku>security#plugin_security|플러그인 보안]]에 대해 읽을 수 있습니다. diff --git a/lib/plugins/extension/lang/nl/intro_search.txt b/lib/plugins/extension/lang/nl/intro_search.txt index f0c8d7435..0530f13a5 100644 --- a/lib/plugins/extension/lang/nl/intro_search.txt +++ b/lib/plugins/extension/lang/nl/intro_search.txt @@ -1 +1 @@ -Deze tab verschaft u toegang tot alle plugins en templates vervaardigd door derden en bestemd voor Dokuwiki. Houdt er rekening mee dat indien u Plugins van derden installeert deze een **veiligheids risico ** kunnen bevatten, geadviseerd wordt om eerst te lezen [[doku>security#plugin_security|plugin security]].
\ No newline at end of file +Deze tab verschaft u toegang tot alle [[doku>nl:plugins|plugins]] en [[doku>nl:template|templates]] vervaardigd door derden en bestemd voor Dokuwiki. Houdt er rekening mee dat indien u Plugins van derden installeert deze een **veiligheids risico ** kunnen bevatten, geadviseerd wordt om eerst te lezen [[doku>security#plugin_security|plugin security]]. diff --git a/lib/plugins/extension/lang/no/intro_search.txt b/lib/plugins/extension/lang/no/intro_search.txt index d139fe930..32af4ff66 100644 --- a/lib/plugins/extension/lang/no/intro_search.txt +++ b/lib/plugins/extension/lang/no/intro_search.txt @@ -1 +1 @@ -Denne fanen gir deg tillgang til alle tilgjengelige tredjeparts programtillegg og maler for DokuWiki. Merk at det å installere tillegg fra tredjepart kan innebære en **sikerhetsrisiko**. Les mer om [[doku>security#plugin_security|sikkerhet og tillegg ]] før installasjon av disse.
\ No newline at end of file +Denne fanen gir deg tillgang til alle tilgjengelige tredjeparts [[doku>plugins|programtillegg]] og [[doku>template|maler]] for DokuWiki. Merk at det å installere tillegg fra tredjepart kan innebære en **sikerhetsrisiko**. Les mer om [[doku>security#plugin_security|sikkerhet og tillegg ]] før installasjon av disse. diff --git a/lib/plugins/extension/lang/pl/intro_search.txt b/lib/plugins/extension/lang/pl/intro_search.txt index d1773fa02..b6e497fb1 100644 --- a/lib/plugins/extension/lang/pl/intro_search.txt +++ b/lib/plugins/extension/lang/pl/intro_search.txt @@ -1 +1 @@ -W tej zakładka znajdziesz wszystkie wtyczki i szablony przygotowane dla DokuWiki przez osoby trzecie. Należy pamiętać, że instalacja kodu zewnętrznego może stwarzać ** zagrożenie bezpieczeństwa **. Koniecznie przeczytaj o [[doku>security#plugin_security|bezpieczeństwie wtyczek]].
\ No newline at end of file +W tej zakładka znajdziesz wszystkie [[doku>pl:plugins|wtyczki]] i [[doku>pl:template|szablony]] przygotowane dla DokuWiki przez osoby trzecie. Należy pamiętać, że instalacja kodu zewnętrznego może stwarzać ** zagrożenie bezpieczeństwa **. Koniecznie przeczytaj o [[doku>security#plugin_security|bezpieczeństwie wtyczek]]. diff --git a/lib/plugins/extension/lang/pt-br/intro_search.txt b/lib/plugins/extension/lang/pt-br/intro_search.txt index f2101d73b..965ac306b 100644 --- a/lib/plugins/extension/lang/pt-br/intro_search.txt +++ b/lib/plugins/extension/lang/pt-br/intro_search.txt @@ -1 +1 @@ -Esta aba lhe dá acesso a extensões e modelos disponibilizados por terceiros para o DokuWiki. Favor ter cuidado pois instalar código de terceiros pode acarretar um **risco de segurança**, você poderia ler sobre [[doku>security#plugin_security|segurança de extensões]] primeiramente.
\ No newline at end of file +Esta aba lhe dá acesso a [[doku>plugins|extensões]] e [[doku>template|modelos]] disponibilizados por terceiros para o DokuWiki. Favor ter cuidado pois instalar código de terceiros pode acarretar um **risco de segurança**, você poderia ler sobre [[doku>security#plugin_security|segurança de extensões]] primeiramente. diff --git a/lib/plugins/extension/lang/pt-br/lang.php b/lib/plugins/extension/lang/pt-br/lang.php index ce4c3b819..79cb3b072 100644 --- a/lib/plugins/extension/lang/pt-br/lang.php +++ b/lib/plugins/extension/lang/pt-br/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + * @author Davi Jorge <davimoises2015@hotmail.com> * @author Felipe Castro <fefcas@gmail.com> * @author Hudson FAS <hudsonfas@gmail.com> * @author Frederico Gonçalves Guimarães <frederico@teia.bio.br> @@ -74,6 +76,7 @@ $lang['msg_template_update_success'] = 'Modelo %s atualizado com sucesso'; $lang['msg_plugin_install_success'] = 'Extensão %s instalada com sucesso'; $lang['msg_plugin_update_success'] = 'Extensão %s atualizada com sucesso'; $lang['msg_upload_failed'] = 'Subida do arquivo falhou'; +$lang['msg_nooverwrite'] = 'A extensão %s já existe e, portanto, não está sendo substituída; para substituir, marque a opção de substituição'; $lang['missing_dependency'] = '<strong>Dependência faltante ou desabilitada:</strong> %s'; $lang['security_issue'] = '<strong>Problema com segurança:</strong> %s'; $lang['security_warning'] = '<strong>Aviso sobre segurança:</strong> %s'; diff --git a/lib/plugins/extension/lang/pt/intro_install.txt b/lib/plugins/extension/lang/pt/intro_install.txt index 5e5871391..049cc8c0c 100644 --- a/lib/plugins/extension/lang/pt/intro_install.txt +++ b/lib/plugins/extension/lang/pt/intro_install.txt @@ -1 +1 @@ -Aqui você pode instalar manualmente plugins e modelos ou enviando-os (upload) ou fornecendo uma URL de download direto.
\ No newline at end of file +Aqui você pode instalar manualmente plugins e modelos enviando-os ou fornecendo uma URL de download direto.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/pt/intro_plugins.txt b/lib/plugins/extension/lang/pt/intro_plugins.txt index fcfaa5cea..a789250ba 100644 --- a/lib/plugins/extension/lang/pt/intro_plugins.txt +++ b/lib/plugins/extension/lang/pt/intro_plugins.txt @@ -1 +1 @@ -Estes são os plugins instalados atualmente em seu DokuWiki. Você pode ativar ou desativar ou desinstala-los completamente aqui. Atualizações de plugins também são mostradas aqui, não se esqueça de ler a documentação do plug-in antes de atualizar.
\ No newline at end of file +Estes são os plugins instalados atualmente em seu DokuWiki. Você pode ativar, desativar ou desinstalá-los completamente aqui. Atualizações de plugins também são mostradas aqui, não se esqueça de ler a documentação do plug-in antes de atualizar.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/pt/intro_search.txt b/lib/plugins/extension/lang/pt/intro_search.txt index be39a9860..565f5b7f6 100644 --- a/lib/plugins/extension/lang/pt/intro_search.txt +++ b/lib/plugins/extension/lang/pt/intro_search.txt @@ -1 +1 @@ -Esta guia lhe dá acesso a todos os plugins e modelos de terceiros disponíveis DokuWiki. Por favor, esteja ciente de que a instalação de componentes de terceiros pode representar um risco de segurança ** **, você pode querer ler sobre [[doku> segurança # plugin_security | segurança plug-in]] antes de realizar a instalação de módulos de terceiros.
\ No newline at end of file +Esta aba lhe dá acesso a todos os [[doku>plugins|plugins]] e [[doku>template|modelos]] de terceiros disponíveis para o DokuWiki. Esteja ciente de que a instalação de componentes de terceiros pode representar um **risco de segurança**. Você pode querer ler sobre [[doku>segurança#plugin_security|segurança de plug-ins]] antes de realizar a instalação de módulos. diff --git a/lib/plugins/extension/lang/pt/intro_templates.txt b/lib/plugins/extension/lang/pt/intro_templates.txt index 02bc33643..405141a81 100644 --- a/lib/plugins/extension/lang/pt/intro_templates.txt +++ b/lib/plugins/extension/lang/pt/intro_templates.txt @@ -1 +1 @@ -Estes são os modelos atualmente instalados em seu DokuWiki. Você pode selecionar o modelo a ser usado no [[?do=admin&page=config|Configuration Manager]]. +Estes são os modelos atualmente instalados em seu DokuWiki. Você pode selecionar o modelo a ser usado no [[?do=admin&page=config|Gerenciador de Configuração]]. diff --git a/lib/plugins/extension/lang/pt/lang.php b/lib/plugins/extension/lang/pt/lang.php index e31907c5c..2c066eab0 100644 --- a/lib/plugins/extension/lang/pt/lang.php +++ b/lib/plugins/extension/lang/pt/lang.php @@ -3,6 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> + * @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com> + * @author Maykon Oliveira <maykonoliveira850@gmail.com> + * @author José Vieira <jmsv63@gmail.com> * @author Guido Salatino <guidorafael23@gmail.com> * @author Romulo Pereira <romuloccomp@gmail.com> * @author Paulo Carmino <contato@paulocarmino.com> @@ -24,23 +28,23 @@ $lang['unknownversion'] = 'Versão desconhecida'; $lang['btn_info'] = 'Mostrar mais informações'; $lang['btn_update'] = 'Atualizar'; $lang['btn_uninstall'] = 'Desinstalar'; -$lang['btn_enable'] = 'Habilitar'; -$lang['btn_disable'] = 'Desabilitar'; +$lang['btn_enable'] = 'Ativar'; +$lang['btn_disable'] = 'Desativar'; $lang['btn_install'] = 'Instalar'; $lang['btn_reinstall'] = 'Reinstalar'; $lang['js']['reallydel'] = 'Confirma a desinstalação desta extensão?'; -$lang['js']['display_viewoptions'] = 'Ver Opções:'; +$lang['js']['display_viewoptions'] = 'Opções de Visualização:'; $lang['js']['display_enabled'] = 'ativado'; $lang['js']['display_disabled'] = 'desativado'; $lang['js']['display_updatable'] = 'atualizável'; $lang['search_for'] = 'Pesquisar Extensão:'; $lang['search'] = 'Pesquisar'; $lang['extensionby'] = '<strong>%s</strong> by %s'; -$lang['screenshot'] = 'Screenshot of %s'; +$lang['screenshot'] = 'Screenshot de %s'; $lang['popularity'] = 'Popularidade: %s%%'; $lang['homepage_link'] = 'Documentos'; $lang['bugs_features'] = 'Erros'; -$lang['tags'] = 'Tags:'; +$lang['tags'] = 'Rótulos:'; $lang['author_hint'] = 'Pesquisar extensões deste autor'; $lang['installed'] = 'Instalado: '; @@ -48,7 +52,7 @@ $lang['downloadurl'] = 'Baixar URL: '; $lang['repository'] = 'Repositório: '; -$lang['unknown'] = '<em> desconhecido </em> +$lang['unknown'] = '<em>desconhecido</em> '; $lang['installed_version'] = 'Versão instalada:'; $lang['install_date'] = 'Sua última atualização:'; @@ -59,7 +63,7 @@ $lang['depends'] = 'Depende de: '; $lang['similar'] = 'Semelhante a: '; -$lang['conflicts'] = 'Conflitos com: +$lang['conflicts'] = 'Conflita com: '; $lang['donate'] = 'Assim? '; @@ -76,21 +80,20 @@ $lang['status_not_installed'] = 'não instalado '; $lang['status_protected'] = 'protegido '; -$lang['status_enabled'] = 'habilitado'; -$lang['status_disabled'] = 'desabilitado'; -$lang['status_unmodifiable'] = 'imodificável -'; +$lang['status_enabled'] = 'ativado'; +$lang['status_disabled'] = 'desativado'; +$lang['status_unmodifiable'] = 'inalterável'; $lang['status_plugin'] = 'plugin '; $lang['status_template'] = 'modelo '; $lang['status_bundled'] = 'empacotado '; -$lang['msg_enabled'] = 'Plugin %s habilitado +$lang['msg_enabled'] = 'Plugin %s ativado '; -$lang['msg_disabled'] = 'Plugin %s desabilitado'; +$lang['msg_disabled'] = 'Plugin %s desativado'; $lang['msg_delete_success'] = 'Extensão %s desinstalada'; -$lang['msg_delete_failed'] = 'Desinstalar Extensão %s falhou +$lang['msg_delete_failed'] = 'A desinstalação da Extensão %s falhou '; $lang['msg_template_install_success'] = 'Modelo %s instalado com sucesso'; $lang['msg_template_update_success'] = 'Modelo %s atualizado com sucesso @@ -99,18 +102,19 @@ $lang['msg_plugin_install_success'] = 'Plugin %s instalado com sucesso '; $lang['msg_plugin_update_success'] = 'Plugin %s atualizado com sucesso '; -$lang['msg_upload_failed'] = 'Enviando o arquivo falhou +$lang['msg_upload_failed'] = 'O envio do arquivo falhou '; +$lang['msg_nooverwrite'] = 'A extensão %s já existe e não será substituída. Para substituir, marque a opção de substituição'; $lang['missing_dependency'] = '<strong>dependência ausente ou desabilitada:</strong> %s '; -$lang['security_issue'] = '<strong> Questão de segurança:</strong> %s +$lang['security_issue'] = '<strong>Questão de Segurança:</strong> %s '; -$lang['security_warning'] = '<strong> Aviso de segurança:</strong> %s'; +$lang['security_warning'] = '<strong>Aviso de Segurança:</strong> %s'; $lang['update_available'] = '<strong>Atualização:</strong> Nova versão %s está disponível. '; -$lang['wrong_folder'] = '<strong>Plugin instalado incorretamente: </strong> Renomear pasta de plugins de "%s" para "%s". +$lang['wrong_folder'] = '<strong>Plugin instalado incorretamente:</strong> Renomear pasta de plugins de "%s" para "%s". '; -$lang['url_change'] = '<strong>URL mudou: </strong> URL para download mudou desde o último download. Verifique se a nova URL é válida antes de atualizar a extensão <br/> Nova:%s<br/>Antiga:%s +$lang['url_change'] = '<strong>A URL mudou: </strong> A URL para download mudou desde o último download. Verifique se a nova URL é válida antes de atualizar a extensão <br/> Nova:%s<br/>Antiga:%s '; $lang['error_badurl'] = 'URLs deve começar com http ou https '; @@ -118,10 +122,10 @@ $lang['error_dircreate'] = 'Não é possível criar pasta temporária para '; $lang['error_download'] = 'Não é possível baixar o arquivo:%s '; -$lang['error_decompress'] = 'Não é possível descompactar o arquivo baixado. Talvez seja resultado de um download ruim, nesse caso, você deve tentar novamente; ou o formato de compressão pode ser desconhecido, nesse caso, você precisará baixar e instalar manualmente.'; +$lang['error_decompress'] = 'Não é possível descompactar o arquivo baixado. Talvez seja resultado de um download ruim e nesse caso você deve tentar novamente; ou o formato de compressão pode ser desconhecido e nesse caso, você precisará baixar e instalar manualmente.'; $lang['error_findfolder'] = 'Não foi possível identificar diretório de extensão, você precisa baixar e instalar manualmente '; -$lang['error_copy'] = 'Houve um erro na cópia do arquivo durante a tentativa de instalar os arquivos para o diretório <em>%s </em>: o disco pode estar cheio ou as permissões de acesso ao arquivo podem estar incorretas. Isso pode ter resultado em um plugin parcialmente instalado e tornar instável a sua instalação wiki +$lang['error_copy'] = 'Houve um erro na cópia do arquivo durante a tentativa de instalar os arquivos para o diretório <em>%s</em>: o disco pode estar cheio ou as permissões de acesso incorretas. Isso pode ter resultado em um plugin parcialmente instalado e tornar instável seu wiki '; $lang['noperms'] = 'Diretório da extensão não é gravável '; @@ -129,12 +133,12 @@ $lang['notplperms'] = 'Diretório do modelo não é gravável '; $lang['nopluginperms'] = 'Diretório do plugin não é gravável '; -$lang['git'] = 'Esta extensão foi instalada via git, você não pode querer atualizá-la aqui. +$lang['git'] = 'Esta extensão foi instalada via git, você pode não querer atualizá-la aqui. '; -$lang['auth'] = 'Este plugin não está habilitado na configuração, considere desabilita-lo.'; +$lang['auth'] = 'Este plugin não está ativado na configuração, considere desativá-lo.'; $lang['install_url'] = 'Instalar a partir da URL:'; -$lang['install_upload'] = 'Publique a Extensão:'; -$lang['repo_error'] = 'O repositório do plugin não pôde ser conectado. Verifique se o seu servidor está autorizado a conectar com www.dokuwiki.org e verifique as configurações de proxy do servidor. +$lang['install_upload'] = 'Enviar Extensão:'; +$lang['repo_error'] = 'O repositório do plugin não pôde ser contactado. Verifique se o seu servidor está autorizado a conectar com www.dokuwiki.org e verifique as configurações de proxy do servidor. '; $lang['nossl'] = 'Seu PHP parece que perdeu o suporte a SSL. O download não vai funcionar para muitas extensões DokuWiki. '; diff --git a/lib/plugins/extension/lang/ru/intro_install.txt b/lib/plugins/extension/lang/ru/intro_install.txt index 0c555aee2..94382dbd7 100644 --- a/lib/plugins/extension/lang/ru/intro_install.txt +++ b/lib/plugins/extension/lang/ru/intro_install.txt @@ -1 +1 @@ -Здесь вы можете самостоятельно установить плагины и шаблоны, загрузив их или предоставив прямой URL для скачивания.
\ No newline at end of file +Здесь вы можете самостоятельно установить плагины и шаблоны, загрузив их или указав прямую (direct) ссылку для скачивания.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/ru/intro_search.txt b/lib/plugins/extension/lang/ru/intro_search.txt index 609985bf4..c60bfdc4a 100644 --- a/lib/plugins/extension/lang/ru/intro_search.txt +++ b/lib/plugins/extension/lang/ru/intro_search.txt @@ -1 +1 @@ -Вкладка даёт вам доступ ко всем имеющимся сторонним плагинам и шаблонам для «Докувики». Имейте в виду, что установка стороннего кода может представлять **угрозу безопасности,** возможно вам нужно сперва прочитать о [[doku>security#plugin_security|безопасности плагинов]].
\ No newline at end of file +Вкладка даёт вам доступ ко всем имеющимся сторонним [[doku>ru:plugins|плагинам]] и [[doku>ru:template|шаблонам]] для «Докувики». Имейте в виду, что установка стороннего кода может представлять **угрозу безопасности**. Возможно, вам нужно сперва прочитать о [[doku>security#plugin_security|безопасности плагинов]]. diff --git a/lib/plugins/extension/lang/ru/lang.php b/lib/plugins/extension/lang/ru/lang.php index 97ad123db..6699b746a 100644 --- a/lib/plugins/extension/lang/ru/lang.php +++ b/lib/plugins/extension/lang/ru/lang.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + * @author Анатолий <anatol_m@mail.ru> * @author Igor Degraf <igordegraf@gmail.com> * @author Type-kun <workwork-1@yandex.ru> * @author Vitaly Filatenko <kot@hacktest.net> @@ -77,6 +78,7 @@ $lang['msg_template_update_success'] = 'Шаблон %s успешно обно $lang['msg_plugin_install_success'] = 'Плагин %s успешно установлен'; $lang['msg_plugin_update_success'] = 'Плагин %s успешно обновлён'; $lang['msg_upload_failed'] = 'Не удалось загрузить файл'; +$lang['msg_nooverwrite'] = 'Расширение %s уже существует, поэтому оно не перезаписано; для перезаписи отметьте опцию перезаписи'; $lang['missing_dependency'] = '<strong>Отсутствует или отключена зависимость:</strong> %s'; $lang['security_issue'] = '<strong>Проблема безопасности:</strong> %s'; $lang['security_warning'] = '<strong>Предупреждение безопасности:</strong> %s'; @@ -96,5 +98,5 @@ $lang['git'] = 'Это дополнение было уста $lang['auth'] = 'Этот auth-плагин не включён в конфигурации, подумайте об его отключении'; $lang['install_url'] = 'Установить с адреса'; $lang['install_upload'] = 'Загрузить дополнение'; -$lang['repo_error'] = 'Сайт с плагинами недоступен. Убедитесь, что у сайта есть доступ на www.dokuwiki.org, а также проверьте настройки соединения прокси.'; -$lang['nossl'] = 'Ваша PHP-конфигурация не имеет SSL-поддержки. Это нарушит скачивание для многих дополнений.'; +$lang['repo_error'] = 'Репозиторий плагина недоступен. Убедитесь, что у вашей вики есть доступ к www.dokuwiki.org, а также проверьте настройки соединения прокси.'; +$lang['nossl'] = 'Ваша конфигурация PHP не имеет поддержки SSL. Это нарушит скачивание для многих дополнений.'; diff --git a/lib/plugins/extension/lang/sk/intro_install.txt b/lib/plugins/extension/lang/sk/intro_install.txt new file mode 100644 index 000000000..bfff6a4ce --- /dev/null +++ b/lib/plugins/extension/lang/sk/intro_install.txt @@ -0,0 +1 @@ +Tu môžete manuálne nainštalovať rozšírenia a témy. Buď ich nahráte, alebo zadáte priamu adresu na stiahnutie. diff --git a/lib/plugins/extension/lang/sk/intro_plugins.txt b/lib/plugins/extension/lang/sk/intro_plugins.txt new file mode 100644 index 000000000..381341bb5 --- /dev/null +++ b/lib/plugins/extension/lang/sk/intro_plugins.txt @@ -0,0 +1 @@ +Toto sú aktuálne nainštalované rozšírenia vo Vašom systéme DokuWiki. Tu ich môžete povoliť, zakázať alebo odinštalovať. Tiež tu nájdete aj aktualizácie rozšírení. Pred aktualizovaním si prečítajte dokumentáciu rozšírenia. diff --git a/lib/plugins/extension/lang/sk/intro_search.txt b/lib/plugins/extension/lang/sk/intro_search.txt new file mode 100644 index 000000000..920193ad8 --- /dev/null +++ b/lib/plugins/extension/lang/sk/intro_search.txt @@ -0,0 +1 @@ +Táto záložka vám dáva prístup k všetkým dostupným rozšíreniam a témam pre DokuWiki od tretích strán. Prosím, myslite na to, že inštalácia kódu od tretích strán môže predstavovať **bezpečnostné riziko**. Prečítajte si najskôr [[doku>security#plugin_security|o zabezpečení rozšírení]]. diff --git a/lib/plugins/extension/lang/sk/intro_templates.txt b/lib/plugins/extension/lang/sk/intro_templates.txt new file mode 100644 index 000000000..ca1c4ed4b --- /dev/null +++ b/lib/plugins/extension/lang/sk/intro_templates.txt @@ -0,0 +1 @@ +Toto sú aktuálne nainštalované témy vo Vašom systéme DokuWiki. Tému, ktorú chcete použiť, môžete vybrať v [[?do=admin&page=config|Nastavení konfigurácie]]. diff --git a/lib/plugins/extension/lang/sk/lang.php b/lib/plugins/extension/lang/sk/lang.php index 775e89a6b..32f3239dc 100644 --- a/lib/plugins/extension/lang/sk/lang.php +++ b/lib/plugins/extension/lang/sk/lang.php @@ -1,15 +1,23 @@ <?php /** + * Slovak language file for extension plugin + * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Martin Michalek <michalek.dev@gmail.com> + * @author Tibor Repček <tiborepcek@gmail.com> */ -$lang['tab_plugins'] = 'Inštalované pluginy'; +$lang['menu'] = 'Správca rozšírení'; +$lang['tab_plugins'] = 'Inštalované rozšírenia'; $lang['tab_templates'] = 'Inštalované šablóny'; -$lang['tab_search'] = 'Hľadanie e inštalácia'; +$lang['tab_search'] = 'Hľadanie a inštalácia'; $lang['tab_install'] = 'Manuálna inštalácia'; $lang['notimplemented'] = 'Táto vlastnosť ešte nebola implementovaná'; +$lang['notinstalled'] = 'Toto rozšírenie nie je nainštalované'; +$lang['alreadyenabled'] = 'Toto rozšírenie už bolo povolené'; +$lang['alreadydisabled'] = 'Toto rozšírenie už bolo zakázané'; +$lang['pluginlistsaveerror'] = 'Pri ukladaní zoznamu rozšírení sa vyskytla chyba'; $lang['unknownauthor'] = 'Neznámy autor'; $lang['unknownversion'] = 'Neznáma verzia'; $lang['btn_info'] = 'Viac informácií'; @@ -19,6 +27,12 @@ $lang['btn_enable'] = 'Povolenie'; $lang['btn_disable'] = 'Zablokovanie'; $lang['btn_install'] = 'Inštalácia'; $lang['btn_reinstall'] = 'Re-Inštalácia'; +$lang['js']['reallydel'] = 'Naozaj chcete toto rozšírenie odinštalovať?'; +$lang['js']['display_viewoptions'] = 'Zobraziť možnosti:'; +$lang['js']['display_enabled'] = 'povolené'; +$lang['js']['display_disabled'] = 'zakázané'; +$lang['js']['display_updatable'] = 'aktualizovateľné'; +$lang['search_for'] = 'Hľadať rozšírenie:'; $lang['search'] = 'Vyhľadávanie'; $lang['extensionby'] = '<strong>%s</strong> od %s'; $lang['screenshot'] = 'Obrázok od %s'; @@ -26,22 +40,36 @@ $lang['popularity'] = 'Popularita: %s%%'; $lang['homepage_link'] = 'Dokumentácia'; $lang['bugs_features'] = 'Chyby:'; $lang['tags'] = 'Kľúčové slová:'; +$lang['author_hint'] = 'Hľadať rozšírenia podľa autora'; +$lang['installed'] = 'Nainštalované:'; +$lang['downloadurl'] = 'Stiahnuť z:'; +$lang['repository'] = 'Repozitár:'; $lang['unknown'] = '<em>neznámy</em>'; $lang['installed_version'] = 'Inštalovaná verzia:'; $lang['install_date'] = 'Posledná aktualizácia:'; $lang['available_version'] = 'Dostupné verzie:'; $lang['compatible'] = 'Kompaktibilita:'; +$lang['depends'] = 'Závislé na:'; $lang['similar'] = 'Podobné:'; $lang['conflicts'] = 'V konflikte:'; +$lang['donate'] = 'Páči sa Vám?'; +$lang['donate_action'] = 'Kúpte autorovi kávu!'; +$lang['repo_retry'] = 'Znovu skúsiť'; +$lang['provides'] = 'Poskytuje:'; +$lang['status'] = 'Stav:'; $lang['status_installed'] = 'inštalovaný'; $lang['status_not_installed'] = 'neinštalovaný'; $lang['status_protected'] = 'chránený'; $lang['status_enabled'] = 'povolený'; $lang['status_disabled'] = 'nepovolený'; +$lang['status_unmodifiable'] = 'nezmeniteľný'; $lang['status_plugin'] = 'plugin'; $lang['status_template'] = 'šablóna'; +$lang['status_bundled'] = 'vstavaný'; $lang['msg_enabled'] = 'Plugin %s povolený'; $lang['msg_disabled'] = 'Plugin %s nepovolený'; +$lang['msg_delete_success'] = 'Rozšírenie %s odinštalované'; +$lang['msg_delete_failed'] = 'Odinštalovanie rozšírenia %s sa nepodarilo'; $lang['msg_template_install_success'] = 'Šablóna %s úspešne nainštalovaná'; $lang['msg_template_update_success'] = 'Šablóna %s úspešne aktualizovaná'; $lang['msg_plugin_install_success'] = 'Plugin %s úspešne nainštalovaný'; @@ -52,10 +80,19 @@ $lang['security_issue'] = '<strong>Bezpečnostný problém:</strong> %s'; $lang['security_warning'] = '<strong>Bezpečnostné upozornenie:</strong> %s'; $lang['update_available'] = '<strong>Aktualizácia:</strong> Nová verzia %s.'; $lang['wrong_folder'] = '<strong>Plugin nesprávne nainštalovaný:</strong> Premenujte adresár s pluginom "%s" na "%s".'; +$lang['url_change'] = '<strong>URL sa zmenila:</strong> URL na stiahnutie sa od posledného sťahovania zmenila. Pred aktualizáciou rozšírenia skontrolujte, či je nová URL správna. <br />Nová: %s<br />Stará: %s'; $lang['error_badurl'] = 'URL by mali mať na začiatku http alebo https'; $lang['error_dircreate'] = 'Nie je možné vytvoriť dočasný adresár pre uloženie sťahovaného súboru'; $lang['error_download'] = 'Nie je možné stiahnuť súbor: %s'; $lang['error_decompress'] = 'Nie je možné dekomprimovať stiahnutý súbor. Môže to byť dôvodom chyby sťahovania (v tom prípade to skúste znova) alebo neznámym kompresným formátom (v tom prípade musíte stiahnuť a inštalovať manuálne).'; +$lang['error_findfolder'] = 'Nepodarilo sa identifikovať cestu rozšírenia. Rozšírenie musíte stiahnuť a inštalovať manuálne.'; $lang['error_copy'] = 'Chyba kopírovania pri inštalácii do adresára <em>%s</em>: disk môže byť plný alebo nemáte potrebné prístupové oprávnenie. Dôsledkom može byť čiastočne inštalovaný plugin a nestabilná wiki inštalácia.'; -$lang['nopluginperms'] = 'Adresár s pluginom nie je zapisovateľný.'; +$lang['noperms'] = 'Do priečinka rozšírenia sa nedá zapisovať.'; +$lang['notplperms'] = 'Do priečinka s témou sa nedá zapisovať.'; +$lang['nopluginperms'] = 'Do priečinka s pluginom sa nedá zapisovať.'; +$lang['git'] = 'Toto rozšírenie bolo nainštalované cez git. Nemali by ste ho tu aktualizovať.'; +$lang['auth'] = 'Toto rozšírenie nie je povolené v nastaveniach. Zvážte jeho zakázanie.'; $lang['install_url'] = 'Inštalácia z URL:'; +$lang['install_upload'] = 'Nahrať rozšírenie:'; +$lang['repo_error'] = 'Nepodarilo sa kontaktovať repozitár rozšírenia. Uistite sa, že váš server má povolené kontaktovať www.dokuwiki.org a skontrolujte nastavenia proxy.'; +$lang['nossl'] = 'Vaše PHP zrejme nepodporuje SSL. Sťahovanie nebude funkčné pre mnohé rozšírenia.'; diff --git a/lib/plugins/extension/lang/tr/lang.php b/lib/plugins/extension/lang/tr/lang.php index c90b7b1c5..bddb9e522 100644 --- a/lib/plugins/extension/lang/tr/lang.php +++ b/lib/plugins/extension/lang/tr/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author İlker R. Kapaç <irifat@gmail.com> * @author Mete Cuma <mcumax@gmail.com> */ diff --git a/lib/plugins/extension/lang/uk/lang.php b/lib/plugins/extension/lang/uk/lang.php new file mode 100644 index 000000000..3414ea7d8 --- /dev/null +++ b/lib/plugins/extension/lang/uk/lang.php @@ -0,0 +1,38 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Dmytro Marchenko <dmytro.marchenko1989@gmail.com> + */ +$lang['menu'] = 'Менеджер розширень'; +$lang['tab_plugins'] = 'Встановлені плагіни'; +$lang['tab_templates'] = 'Встановлені шаблони'; +$lang['tab_search'] = 'Пошук та встановлення'; +$lang['tab_install'] = 'Встановити вручну'; +$lang['notimplemented'] = 'Ця функція ще не була реалізована'; +$lang['notinstalled'] = 'Це розширення не встановлено'; +$lang['alreadyenabled'] = 'Це розширення вже ввімкнено'; +$lang['alreadydisabled'] = 'Це розширення вже вимкнено'; +$lang['pluginlistsaveerror'] = 'Під час збереження списку плагінів сталася помилка'; +$lang['unknownauthor'] = 'Невідомий автор'; +$lang['unknownversion'] = 'Невідома версія'; +$lang['btn_info'] = 'Показати більше інформації'; +$lang['btn_update'] = 'Оновити'; +$lang['btn_uninstall'] = 'Видалити'; +$lang['btn_enable'] = 'Увімкнути'; +$lang['btn_disable'] = 'Вимкнути'; +$lang['btn_install'] = 'Встановити'; +$lang['btn_reinstall'] = 'Перевстановити'; +$lang['js']['reallydel'] = 'Дійсно видалити це розширення?'; +$lang['js']['display_viewoptions'] = 'Параметри перегляду:'; +$lang['js']['display_enabled'] = 'увімкнено'; +$lang['js']['display_disabled'] = 'вимкнено'; +$lang['js']['display_updatable'] = 'оновлюваний'; +$lang['search_for'] = 'Пошук розширень:'; +$lang['search'] = 'Пошук'; +$lang['bugs_features'] = 'Помилки'; +$lang['tags'] = 'Теги:'; +$lang['repo_retry'] = 'Спробувати знову'; +$lang['status_installed'] = 'Статус:'; +$lang['install_url'] = 'Встановити з URL-адреси:'; diff --git a/lib/plugins/extension/lang/vi/intro_install.txt b/lib/plugins/extension/lang/vi/intro_install.txt new file mode 100644 index 000000000..91d6d2d4e --- /dev/null +++ b/lib/plugins/extension/lang/vi/intro_install.txt @@ -0,0 +1 @@ +Tại đây, bạn có thể cài đặt thủ công các plugin và chủ đề bằng cách tải chúng lên hoặc cung cấp URL tải xuống trực tiếp.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/vi/intro_plugins.txt b/lib/plugins/extension/lang/vi/intro_plugins.txt new file mode 100644 index 000000000..028be57dd --- /dev/null +++ b/lib/plugins/extension/lang/vi/intro_plugins.txt @@ -0,0 +1 @@ +Đây là những plugin hiện đã được cài đặt trong DokuWiki của bạn. Bạn có thể bật hoặc tắt hoặc thậm chí gỡ cài đặt hoàn toàn chúng ở đây. Cập nhật plugin cũng được hiển thị ở đây, hãy nhớ đọc tài liệu của plugin trước khi cập nhật.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/vi/intro_search.txt b/lib/plugins/extension/lang/vi/intro_search.txt new file mode 100644 index 000000000..a5183b945 --- /dev/null +++ b/lib/plugins/extension/lang/vi/intro_search.txt @@ -0,0 +1 @@ +Tab này cho phép bạn truy cập vào tất cả [[doku>plugins|plugins]] và [[doku>template|chủ đề]] có sẵn cho DokuWiki của các bên thứ 3. Xin lưu ý rằng việc cài đặt mã của bên thứ 3 có thể gây ra **rủi ro bảo mật**, bạn có thể muốn đọc về [[doku>security#plugin_security|bảo mật plugin]] trước.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/vi/intro_templates.txt b/lib/plugins/extension/lang/vi/intro_templates.txt new file mode 100644 index 000000000..23831d218 --- /dev/null +++ b/lib/plugins/extension/lang/vi/intro_templates.txt @@ -0,0 +1 @@ +Đây là các chủ đề hiện được cài đặt trong DokuWiki của bạn. Bạn có thể chọn sử dụng chủ đề trong [[?do=admin&page=config|Quản lý cấu hình]].
\ No newline at end of file diff --git a/lib/plugins/extension/lang/vi/lang.php b/lib/plugins/extension/lang/vi/lang.php new file mode 100644 index 000000000..98f233217 --- /dev/null +++ b/lib/plugins/extension/lang/vi/lang.php @@ -0,0 +1,96 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['menu'] = 'Quản lý phần mở rộng'; +$lang['tab_plugins'] = 'Plugin đã cài đặt'; +$lang['tab_templates'] = 'Chủ đề đã cài đặt'; +$lang['tab_search'] = 'Tìm kiếm và Cài đặt'; +$lang['tab_install'] = 'Cài đặt thủ công'; +$lang['notimplemented'] = 'Tính năng này chưa được triển khai'; +$lang['notinstalled'] = 'Phần mở rộng này chưa được cài đặt'; +$lang['alreadyenabled'] = 'Phần mở rộng này đã được kích hoạt'; +$lang['alreadydisabled'] = 'Phần mở rộng này đã bị vô hiệu hóa'; +$lang['pluginlistsaveerror'] = 'Có lỗi khi lưu danh sách plugin'; +$lang['unknownauthor'] = 'Không rõ tác giả'; +$lang['unknownversion'] = 'Không rõ phiên bản'; +$lang['btn_info'] = 'Hiện thêm thông tin'; +$lang['btn_update'] = 'Cập nhật'; +$lang['btn_uninstall'] = 'Gỡ bỏ'; +$lang['btn_enable'] = 'Kích hoạt'; +$lang['btn_disable'] = 'Vô hiệu'; +$lang['btn_install'] = 'Cài đặt'; +$lang['btn_reinstall'] = 'Cài đặt lại'; +$lang['js']['reallydel'] = 'Bạn thực sự muốn gỡ cài đặt phần mở rộng này?'; +$lang['js']['display_viewoptions'] = 'Tùy chọn xem:'; +$lang['js']['display_enabled'] = 'đã kích hoạt'; +$lang['js']['display_disabled'] = 'đã vô hiệu'; +$lang['js']['display_updatable'] = 'có sẫn cập nhật'; +$lang['search_for'] = 'Tìm kiếm Phần mở rộng:'; +$lang['search'] = 'Tìm kiếm'; +$lang['extensionby'] = '<strong>%s</strong> bởi %s'; +$lang['screenshot'] = 'Ảnh chụp màn hình của %s'; +$lang['popularity'] = 'Độ phổ biến: %s%%'; +$lang['homepage_link'] = 'Tài liệu'; +$lang['bugs_features'] = 'Lỗi'; +$lang['tags'] = 'Thẻ'; +$lang['author_hint'] = 'Tìm kiếm phần mở rộng của tác giả này'; +$lang['installed'] = 'Đã cài đặt:'; +$lang['downloadurl'] = 'URL tải về:'; +$lang['repository'] = 'Repository:'; +$lang['unknown'] = '<em>không rõ</em>'; +$lang['installed_version'] = 'Phiên bản đã cài đặt:'; +$lang['install_date'] = 'Cập nhật cuối cùng của bạn:'; +$lang['available_version'] = 'Có sẵn phiên bản:'; +$lang['compatible'] = 'Tương thích với:'; +$lang['depends'] = 'Phụ thuộc vào:'; +$lang['similar'] = 'Tương tự như:'; +$lang['conflicts'] = 'Xung đột với:'; +$lang['donate'] = 'Thích thứ này?'; +$lang['donate_action'] = 'Mua cho tác giả một ly cà phê!'; +$lang['repo_retry'] = 'Thử lại'; +$lang['provides'] = 'Cung cấp:'; +$lang['status'] = 'Trạng thái:'; +$lang['status_installed'] = 'đã cài đặt'; +$lang['status_not_installed'] = 'chưa cài đặt'; +$lang['status_protected'] = 'đã bảo vệ'; +$lang['status_enabled'] = 'đã kích hoạt'; +$lang['status_disabled'] = 'đã vô hiệu'; +$lang['status_unmodifiable'] = 'không thể thay đổi'; +$lang['status_plugin'] = 'plugin'; +$lang['status_template'] = 'chủ đề'; +$lang['status_bundled'] = 'đi kèm'; +$lang['msg_enabled'] = 'Plugin %s đã được kích hoạt'; +$lang['msg_disabled'] = 'Plugin %s đã bị vô hiệu'; +$lang['msg_delete_success'] = 'Đã gỡ cài đặt phần mở rộng %s'; +$lang['msg_delete_failed'] = 'Thất bại khi gỡ cài đặt phần mở rộng %s'; +$lang['msg_template_install_success'] = 'Cài đặt thành công chủ đề %s'; +$lang['msg_template_update_success'] = 'Cập nhật thành công chủ đề %s'; +$lang['msg_plugin_install_success'] = 'Cài đặt thành công chủ đề %s'; +$lang['msg_plugin_update_success'] = 'Cập nhật thành công chủ đề %s'; +$lang['msg_upload_failed'] = 'Tải tập tin không thành công'; +$lang['msg_nooverwrite'] = 'Phần mở rộng %s đã tồn tại để không bị ghi đè; để ghi đè, đánh dấu tùy chọn ghi đè'; +$lang['missing_dependency'] = '<strong>Thiếu hoặc đã vô hiệu phần phụ thuộc:</strong> %s'; +$lang['security_issue'] = '<strong>Vấn đề bảo mật:</strong> %s'; +$lang['security_warning'] = '<strong>Cảnh báo bảo mật:</strong> %s'; +$lang['update_available'] = '<strong>Cập nhật:</strong> Phiên bản mới %s hiện có sẵn.'; +$lang['wrong_folder'] = '<strong>Plugin đã được cài đặt không đúng:</strong> Đổi tên đường dẫn plugin "%s" thành "%s".'; +$lang['url_change'] = '<strong>URL thay đổi:</strong>URL tải xuống đã thay đổi kể từ lần tải xuống trước. Kiểm tra xem URL mới có hợp lệ không trước khi cập nhật phần mở rộng.<br />Mới: %s<br />Cũ: %s'; +$lang['error_badurl'] = 'URL phải bắt đầu bằng http hoặc https'; +$lang['error_dircreate'] = 'Không thể tạo thư mục tạm thời để nhận tải xuống'; +$lang['error_download'] = 'Không thể tải xuống tập tin: %s'; +$lang['error_decompress'] = 'Không thể giải nén tập tin đã tải xuống. Việc này có thể là kết quả của một tải xuống xấu, trường hợp này bạn nên thử lại; hoặc nếu định dạng nén có thể không xác định, bạn sẽ cần phải tải xuống và cài đặt thủ công.'; +$lang['error_findfolder'] = 'Không thể xác định đường dẫn phần mở rộng, bạn cần tải xuống và cài đặt thủ công'; +$lang['error_copy'] = 'Có lỗi sao chép tập tin trong khi cố gắng cài đặt tập tin cho đường dẫn <em>%s</em>: đĩa có thể đầy hoặc quyền truy cập tập tin có thể không chính xác. Việc này có thể đã dẫn đến plugin được cài đặt một phần và khiến cài đặt wiki của bạn không ổn định'; +$lang['noperms'] = 'Không thể ghi đường dẫn Phần mở rộng'; +$lang['notplperms'] = 'Không thể ghi đường dẫn Chủ đề'; +$lang['nopluginperms'] = 'Không thể ghi đường dẫn Plugin'; +$lang['git'] = 'Phần mở rộng này đã được cài đặt qua git, bạn có thể không muốn cập nhật nó ở đây.'; +$lang['auth'] = 'Plugin xác thực này không được kích hoạt trong cấu hình, hãy xem xét việc vô hiệu hóa nó.'; +$lang['install_url'] = 'Cài đặt từ URL:'; +$lang['install_upload'] = 'Tải lên Phần mở rộng:'; +$lang['repo_error'] = 'Không thể kết nối đến Kho lưu trữ plugin. Đảm bảo rằng máy chủ của bạn được phép kết nối với www.dokuwiki.org và kiểm tra cài đặt proxy của bạn.'; +$lang['nossl'] = 'PHP của bạn dường như bỏ lỡ hỗ trợ SSL. Tải xuống sẽ không hoạt động đối với nhiều phần mở rộng DokuWiki.'; diff --git a/lib/plugins/extension/lang/zh/intro_search.txt b/lib/plugins/extension/lang/zh/intro_search.txt index ebc7e99ad..aa979ab87 100644 --- a/lib/plugins/extension/lang/zh/intro_search.txt +++ b/lib/plugins/extension/lang/zh/intro_search.txt @@ -1 +1 @@ -这个标签会为你展示所有 DokuWiki 的第三方插件和模板。但你需要知道这些由第三方提供的代码可能会给你带来**安全方面的风险**,你最好先读一下[[doku>security#plugin_security|插件安全性]]。
\ No newline at end of file +这个标签会为你展示所有 DokuWiki 的第三方[[doku>zh:plugins|插件]]和[[doku>zh:template|模板]]。但你需要知道这些由第三方提供的代码可能会给你带来**安全方面的风险**,你最好先读一下[[doku>security#plugin_security|插件安全性]]。 diff --git a/lib/plugins/extension/lang/zh/lang.php b/lib/plugins/extension/lang/zh/lang.php index 622a007b4..6d0b321be 100644 --- a/lib/plugins/extension/lang/zh/lang.php +++ b/lib/plugins/extension/lang/zh/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Xin <chenxin1034@gmail.com> * @author lempel <riverlempel@hotmail.com> * @author Cupen <Cupenoruler@foxmail.com> * @author xiqingongzi <Xiqingongzi@Gmail.com> @@ -10,17 +11,18 @@ * @author lainme <lainme993@gmail.com> * @author Errol <errol@hotmail.com> * @author phy25 <git@phy25.com> + * @author fengyqf <fengyqf@gmail.com> */ $lang['menu'] = '扩展管理器'; -$lang['tab_plugins'] = '安装插件'; -$lang['tab_templates'] = '安装模板'; -$lang['tab_search'] = '搜索和安装'; +$lang['tab_plugins'] = '现有插件'; +$lang['tab_templates'] = '现有模板'; +$lang['tab_search'] = '搜索安装'; $lang['tab_install'] = '手动安装'; $lang['notimplemented'] = '未实现的特性'; $lang['notinstalled'] = '该扩展未安装'; $lang['alreadyenabled'] = '该扩展已激活'; $lang['alreadydisabled'] = '该扩展已关闭'; -$lang['pluginlistsaveerror'] = '保存插件列表时碰到个错误'; +$lang['pluginlistsaveerror'] = '保存插件列表时出现错误'; $lang['unknownauthor'] = '未知作者'; $lang['unknownversion'] = '未知版本'; $lang['btn_info'] = '查看更多信息'; @@ -30,8 +32,8 @@ $lang['btn_enable'] = '激活'; $lang['btn_disable'] = '关闭'; $lang['btn_install'] = '安装'; $lang['btn_reinstall'] = '重新安装'; -$lang['js']['reallydel'] = '确定卸载这个扩展么?'; -$lang['js']['display_viewoptions'] = '查看选项:'; +$lang['js']['reallydel'] = '确定卸载这个扩展吗?'; +$lang['js']['display_viewoptions'] = '查看选项:'; $lang['js']['display_enabled'] = '启用'; $lang['js']['display_disabled'] = '禁用'; $lang['js']['display_updatable'] = '可更新'; @@ -43,7 +45,7 @@ $lang['popularity'] = '人气: %s%%'; $lang['homepage_link'] = '文档'; $lang['bugs_features'] = '错误'; $lang['tags'] = '标签:'; -$lang['author_hint'] = '搜索这个作者的插件'; +$lang['author_hint'] = '搜索这个作者的扩展'; $lang['installed'] = '已安装的:'; $lang['downloadurl'] = '下载地址:'; $lang['repository'] = '版本库:'; @@ -55,11 +57,11 @@ $lang['compatible'] = '兼容于:'; $lang['depends'] = '依赖于:'; $lang['similar'] = '相似于:'; $lang['conflicts'] = '冲突于:'; -$lang['donate'] = '喜欢?'; -$lang['donate_action'] = '捐给作者一杯咖啡钱!'; +$lang['donate'] = '喜欢吗?'; +$lang['donate_action'] = '赞赏作者一杯咖啡的钱!'; $lang['repo_retry'] = '重试'; $lang['provides'] = '提供:'; -$lang['status'] = '现状:'; +$lang['status'] = '状态:'; $lang['status_installed'] = '已安装的'; $lang['status_not_installed'] = '未安装'; $lang['status_protected'] = '受保护'; @@ -78,18 +80,19 @@ $lang['msg_template_update_success'] = '模板 %s 更新成功'; $lang['msg_plugin_install_success'] = '插件 %s 安装成功'; $lang['msg_plugin_update_success'] = '插件 %s 更新成功'; $lang['msg_upload_failed'] = '上传文件失败'; -$lang['missing_dependency'] = '<strong>缺少或者被禁用依赖:</strong> %s'; +$lang['msg_nooverwrite'] = '扩展名 %s 已存在,因此不会被覆盖;要覆盖,请选中覆盖选项。'; +$lang['missing_dependency'] = '<strong>缺少或者被禁用的依赖:</strong> %s'; $lang['security_issue'] = '<strong>安全问题:</strong> %s'; $lang['security_warning'] = '<strong>安全警告:</strong> %s'; $lang['update_available'] = '<strong>更新:</strong>新版本 %s 已经可用。'; -$lang['wrong_folder'] = '<strong>插件安装不正确:</strong>重命名插件目录 "%s" 为 "%s"。'; -$lang['url_change'] = '<strong>URL已改变:</strong>自上次下载以来的下载 URL 已经改变。请在更新扩展前检查新 URL 是否有效。<br />新的:%s<br />旧的:%s'; +$lang['wrong_folder'] = '<strong>扩展安装错误:</strong>请将扩展目录 "%s" 重命名为 "%s"。'; +$lang['url_change'] = '<strong>URL 已改变:</strong>自上次下载以来的下载 URL 已经改变。请在更新扩展前检查新 URL 是否有效。<br />新的:%s<br />旧的:%s'; $lang['error_badurl'] = 'URL 应当以 http 或者 https 作为开头'; $lang['error_dircreate'] = '无法创建用于保存下载的临时文件夹'; $lang['error_download'] = '无法下载文件:%s'; $lang['error_decompress'] = '无法解压下载的文件。这可能是由于文件损坏,在这种情况下您可以重试。这也可能是由于压缩格式是未知的,在这种情况下您需要手动下载并且安装。'; $lang['error_findfolder'] = '无法识别扩展目录,您需要手动下载和安装'; -$lang['error_copy'] = '在尝试安装文件到目录 <em>%s</em> 时出现文件复制错误:磁盘可能已满或者文件访问权限不正确。这可能导致插件被部分安装并使您的维基处在不稳定状态'; +$lang['error_copy'] = '在尝试安装文件到目录 <em>%s</em> 时出现文件复制错误:可能磁盘已满或文件权限不正确。这可能导致扩展安装不完整,并使您的维基处在不稳定状态'; $lang['noperms'] = '扩展目录不可写'; $lang['notplperms'] = '模板目录不可写'; $lang['nopluginperms'] = '插件目录不可写'; @@ -97,5 +100,5 @@ $lang['git'] = '这个扩展是通过 Git 安装的,您可 $lang['auth'] = '这个认证插件没有在配置中启用,请考虑禁用它。'; $lang['install_url'] = '从 URL 安装:'; $lang['install_upload'] = '上传扩展:'; -$lang['repo_error'] = '无法连接到插件仓库。请确定您的服务器可以连接 www.dokuwiki.org 并检查您的代理设置。'; -$lang['nossl'] = '您的 PHP 似乎不支持 SSL。很多 DokuWiki 扩展将无法下载。'; +$lang['repo_error'] = '无法连接到扩展库。请确定您的服务器可以连接 www.dokuwiki.org 并检查您的代理设置。'; +$lang['nossl'] = '您的 PHP 似乎不支持 SSL,这将导致无法下载多数 DokuWiki 扩展。'; diff --git a/lib/plugins/extension/script.js b/lib/plugins/extension/script.js index 8627db420..7c915808e 100644 --- a/lib/plugins/extension/script.js +++ b/lib/plugins/extension/script.js @@ -5,7 +5,7 @@ jQuery(function(){ /** * Confirm uninstalling */ - $extmgr.find('button.uninstall').click(function(e){ + $extmgr.find('button.uninstall').on('click', function(e){ if(!window.confirm(LANG.plugins.extension.reallydel)){ e.preventDefault(); return false; @@ -17,7 +17,7 @@ jQuery(function(){ * very simple lightbox * @link http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/super-simple-lightbox-with-css-and-jquery/ */ - $extmgr.find('a.extension_screenshot').click(function(e) { + $extmgr.find('a.extension_screenshot').on('click', function(e) { e.preventDefault(); //Get clicked link href @@ -29,7 +29,7 @@ jQuery(function(){ $lightbox = jQuery('<div id="plugin__extensionlightbox"><p>Click to close</p><div></div></div>') .appendTo(jQuery('body')) .hide() - .click(function(){ + .on('click', function(){ $lightbox.hide(); }); } @@ -46,7 +46,7 @@ jQuery(function(){ /** * Enable/Disable extension via AJAX */ - $extmgr.find('button.disable, button.enable').click(function (e) { + $extmgr.find('button.disable, button.enable').on('click', function (e) { e.preventDefault(); var $btn = jQuery(this); @@ -85,7 +85,7 @@ jQuery(function(){ /** * AJAX detail infos */ - $extmgr.find('a.info').click(function(e){ + $extmgr.find('a.info').on('click', function(e){ e.preventDefault(); var $link = jQuery(this); @@ -129,12 +129,12 @@ jQuery(function(){ var $label = jQuery( '<label></label>' ) .appendTo($displayOpts); var $input = jQuery( '<input />', { type: 'checkbox', name: chkName }) - .change(displayOptionsHandler) + .on('change', displayOptionsHandler) .appendTo($label); var previous = DokuCookie.getValue('ext_'+chkName); if(typeof previous === "undefined" || previous == '1') { - $input.click(); + $input.trigger('click'); } jQuery( '<span/>' ) diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php index 773256faf..19e49bfcd 100644 --- a/lib/plugins/info/syntax.php +++ b/lib/plugins/info/syntax.php @@ -6,33 +6,30 @@ * @author Andreas Gohr <andi@splitbrain.org> * @author Esther Brunner <wikidesign@gmail.com> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -/** - * All DokuWiki plugins to extend the parser/rendering mechanism - * need to inherit from this class - */ -class syntax_plugin_info extends DokuWiki_Syntax_Plugin { +class syntax_plugin_info extends DokuWiki_Syntax_Plugin +{ /** * What kind of syntax are we? */ - function getType(){ + public function getType() + { return 'substition'; } /** * What about paragraphs? */ - function getPType(){ + public function getPType() + { return 'block'; } /** * Where to sort in? */ - function getSort(){ + public function getSort() + { return 155; } @@ -40,8 +37,9 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { /** * Connect pattern to lexer */ - function connectTo($mode) { - $this->Lexer->addSpecialPattern('~~INFO:\w+~~',$mode,'plugin_info'); + public function connectTo($mode) + { + $this->Lexer->addSpecialPattern('~~INFO:\w+~~', $mode, 'plugin_info'); } /** @@ -53,8 +51,9 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * @param Doku_Handler $handler The Doku_Handler object * @return array Return an array with all data you want to use in render */ - function handle($match, $state, $pos, Doku_Handler $handler){ - $match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end + public function handle($match, $state, $pos, Doku_Handler $handler) + { + $match = substr($match, 7, -2); //strip ~~INFO: from start and ~~ from end return array(strtolower($match)); } @@ -66,40 +65,41 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * @param array $data data created by handler() * @return boolean rendered correctly? */ - function render($format, Doku_Renderer $renderer, $data) { - if($format == 'xhtml'){ + public function render($format, Doku_Renderer $renderer, $data) + { + if ($format == 'xhtml') { /** @var Doku_Renderer_xhtml $renderer */ //handle various info stuff - switch ($data[0]){ + switch ($data[0]) { case 'syntaxmodes': - $renderer->doc .= $this->_syntaxmodes_xhtml(); + $renderer->doc .= $this->renderSyntaxModes(); break; case 'syntaxtypes': - $renderer->doc .= $this->_syntaxtypes_xhtml(); + $renderer->doc .= $this->renderSyntaxTypes(); break; case 'syntaxplugins': - $this->_plugins_xhtml('syntax', $renderer); + $this->renderPlugins('syntax', $renderer); break; case 'adminplugins': - $this->_plugins_xhtml('admin', $renderer); + $this->renderPlugins('admin', $renderer); break; case 'actionplugins': - $this->_plugins_xhtml('action', $renderer); + $this->renderPlugins('action', $renderer); break; case 'rendererplugins': - $this->_plugins_xhtml('renderer', $renderer); + $this->renderPlugins('renderer', $renderer); break; case 'helperplugins': - $this->_plugins_xhtml('helper', $renderer); + $this->renderPlugins('helper', $renderer); break; case 'authplugins': - $this->_plugins_xhtml('auth', $renderer); + $this->renderPlugins('auth', $renderer); break; case 'remoteplugins': - $this->_plugins_xhtml('remote', $renderer); + $this->renderPlugins('remote', $renderer); break; case 'helpermethods': - $this->_helpermethods_xhtml($renderer); + $this->renderHelperMethods($renderer); break; default: $renderer->doc .= "no info about ".htmlspecialchars($data[0]); @@ -117,7 +117,8 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * @param string $type * @param Doku_Renderer_xhtml $renderer */ - function _plugins_xhtml($type, Doku_Renderer_xhtml $renderer){ + protected function renderPlugins($type, Doku_Renderer_xhtml $renderer) + { global $lang; $renderer->doc .= '<ul>'; @@ -125,24 +126,24 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { $plginfo = array(); // remove subparts - foreach($plugins as $p){ - if (!$po = plugin_load($type,$p)) continue; - list($name,/* $part */) = explode('_',$p,2); + foreach ($plugins as $p) { + if (!$po = plugin_load($type, $p)) continue; + list($name,/* $part */) = explode('_', $p, 2); $plginfo[$name] = $po->getInfo(); } // list them - foreach($plginfo as $info){ + foreach ($plginfo as $info) { $renderer->doc .= '<li><div class="li">'; - $renderer->externallink($info['url'],$info['name']); + $renderer->externallink($info['url'], $info['name']); $renderer->doc .= ' '; $renderer->doc .= '<em>'.$info['date'].'</em>'; $renderer->doc .= ' '; $renderer->doc .= $lang['by']; $renderer->doc .= ' '; - $renderer->emaillink($info['email'],$info['author']); + $renderer->emaillink($info['email'], $info['author']); $renderer->doc .= '<br />'; - $renderer->doc .= strtr(hsc($info['desc']),array("\n"=>"<br />")); + $renderer->doc .= strtr(hsc($info['desc']), array("\n"=>"<br />")); $renderer->doc .= '</div></li>'; unset($po); } @@ -157,39 +158,40 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * * @param Doku_Renderer_xhtml $renderer */ - function _helpermethods_xhtml(Doku_Renderer_xhtml $renderer){ + protected function renderHelperMethods(Doku_Renderer_xhtml $renderer) + { $plugins = plugin_list('helper'); - foreach($plugins as $p){ - if (!$po = plugin_load('helper',$p)) continue; + foreach ($plugins as $p) { + if (!$po = plugin_load('helper', $p)) continue; if (!method_exists($po, 'getMethods')) continue; $methods = $po->getMethods(); $info = $po->getInfo(); - $hid = $this->_addToTOC($info['name'], 2, $renderer); + $hid = $this->addToToc($info['name'], 2, $renderer); $doc = '<h2><a name="'.$hid.'" id="'.$hid.'">'.hsc($info['name']).'</a></h2>'; $doc .= '<div class="level2">'; $doc .= '<p>'.strtr(hsc($info['desc']), array("\n"=>"<br />")).'</p>'; $doc .= '<pre class="code">$'.$p." = plugin_load('helper', '".$p."');</pre>"; $doc .= '</div>'; - foreach ($methods as $method){ + foreach ($methods as $method) { $title = '$'.$p.'->'.$method['name'].'()'; - $hid = $this->_addToTOC($title, 3, $renderer); + $hid = $this->addToToc($title, 3, $renderer); $doc .= '<h3><a name="'.$hid.'" id="'.$hid.'">'.hsc($title).'</a></h3>'; $doc .= '<div class="level3">'; $doc .= '<div class="table"><table class="inline"><tbody>'; $doc .= '<tr><th>Description</th><td colspan="2">'.$method['desc']. '</td></tr>'; - if ($method['params']){ + if ($method['params']) { $c = count($method['params']); $doc .= '<tr><th rowspan="'.$c.'">Parameters</th><td>'; $params = array(); - foreach ($method['params'] as $desc => $type){ + foreach ($method['params'] as $desc => $type) { $params[] = hsc($desc).'</td><td>'.hsc($type); } - $doc .= join($params, '</td></tr><tr><td>').'</td></tr>'; + $doc .= join('</td></tr><tr><td>', $params).'</td></tr>'; } - if ($method['return']){ + if ($method['return']) { $doc .= '<tr><th>Return value</th><td>'.hsc(key($method['return'])). '</td><td>'.hsc(current($method['return'])).'</td></tr>'; } @@ -207,18 +209,19 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * * @return string */ - function _syntaxtypes_xhtml(){ + protected function renderSyntaxTypes() + { global $PARSER_MODES; $doc = ''; $doc .= '<div class="table"><table class="inline"><tbody>'; - foreach($PARSER_MODES as $mode => $modes){ + foreach ($PARSER_MODES as $mode => $modes) { $doc .= '<tr>'; $doc .= '<td class="leftalign">'; $doc .= $mode; $doc .= '</td>'; $doc .= '<td class="leftalign">'; - $doc .= join(', ',$modes); + $doc .= join(', ', $modes); $doc .= '</td>'; $doc .= '</tr>'; } @@ -231,29 +234,30 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * * @return string */ - function _syntaxmodes_xhtml(){ + protected function renderSyntaxModes() + { $modes = p_get_parsermodes(); $compactmodes = array(); - foreach($modes as $mode){ + foreach ($modes as $mode) { $compactmodes[$mode['sort']][] = $mode['mode']; } $doc = ''; $doc .= '<div class="table"><table class="inline"><tbody>'; - foreach($compactmodes as $sort => $modes){ + foreach ($compactmodes as $sort => $modes) { $rowspan = ''; - if(count($modes) > 1) { + if (count($modes) > 1) { $rowspan = ' rowspan="'.count($modes).'"'; } - foreach($modes as $index => $mode) { + foreach ($modes as $index => $mode) { $doc .= '<tr>'; $doc .= '<td class="leftalign">'; $doc .= $mode; $doc .= '</td>'; - if($index === 0) { + if ($index === 0) { $doc .= '<td class="rightalign" '.$rowspan.'>'; $doc .= $sort; $doc .= '</td>'; @@ -274,11 +278,12 @@ class syntax_plugin_info extends DokuWiki_Syntax_Plugin { * @param Doku_Renderer_xhtml $renderer * @return string */ - protected function _addToTOC($text, $level, Doku_Renderer_xhtml $renderer){ + protected function addToToc($text, $level, Doku_Renderer_xhtml $renderer) + { global $conf; $hid = ''; - if (($level >= $conf['toptoclevel']) && ($level <= $conf['maxtoclevel'])){ + if (($level >= $conf['toptoclevel']) && ($level <= $conf['maxtoclevel'])) { $hid = $renderer->_headerToLink($text, true); $renderer->toc[] = array( 'hid' => $hid, diff --git a/lib/plugins/popularity/action.php b/lib/plugins/popularity/action.php index d5ec0f5c5..fac610735 100644 --- a/lib/plugins/popularity/action.php +++ b/lib/plugins/popularity/action.php @@ -5,44 +5,49 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) */ -require_once(DOKU_PLUGIN.'action.php'); -require_once(DOKU_PLUGIN.'popularity/admin.php'); - -class action_plugin_popularity extends Dokuwiki_Action_Plugin { +class action_plugin_popularity extends DokuWiki_Action_Plugin +{ /** * @var helper_plugin_popularity */ - var $helper; + protected $helper; - function __construct(){ + public function __construct() + { $this->helper = $this->loadHelper('popularity', false); } - /** - * Register its handlers with the dokuwiki's event controller - */ - function register(Doku_Event_Handler $controller) { - $controller->register_hook('INDEXER_TASKS_RUN', 'AFTER', $this, '_autosubmit', array()); + /** @inheritdoc */ + public function register(Doku_Event_Handler $controller) + { + $controller->register_hook('INDEXER_TASKS_RUN', 'AFTER', $this, 'autosubmit', array()); } - function _autosubmit(Doku_Event &$event, $param){ + /** + * Event handler + * + * @param Doku_Event $event + * @param $param + */ + public function autosubmit(Doku_Event &$event, $param) + { //Do we have to send the data now - if ( !$this->helper->isAutosubmitEnabled() || $this->_isTooEarlyToSubmit() ){ + if (!$this->helper->isAutosubmitEnabled() || $this->isTooEarlyToSubmit()) { return; } //Actually send it - $status = $this->helper->sendData( $this->helper->gatherAsString() ); + $status = $this->helper->sendData($this->helper->gatherAsString()); - if ( $status !== '' ){ + if ($status !== '') { //If an error occured, log it - io_saveFile( $this->helper->autosubmitErrorFile, $status ); + io_saveFile($this->helper->autosubmitErrorFile, $status); } else { //If the data has been sent successfully, previous log of errors are useless @unlink($this->helper->autosubmitErrorFile); //Update the last time we sent data - touch ( $this->helper->autosubmitFile ); + touch($this->helper->autosubmitFile); } $event->stopPropagation(); @@ -53,7 +58,8 @@ class action_plugin_popularity extends Dokuwiki_Action_Plugin { * Check if it's time to send autosubmit data * (we should have check if autosubmit is enabled first) */ - function _isTooEarlyToSubmit(){ + protected function isTooEarlyToSubmit() + { $lastSubmit = $this->helper->lastSentTime(); return $lastSubmit + 24*60*60*30 > time(); } diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index 0cf174e0d..61d8cc3bf 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -5,43 +5,44 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Andreas Gohr <andi@splitbrain.org> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); +class admin_plugin_popularity extends DokuWiki_Admin_Plugin +{ -/** - * All DokuWiki plugins to extend the admin function - * need to inherit from this class - */ -class admin_plugin_popularity extends DokuWiki_Admin_Plugin { + /** @var helper_plugin_popularity */ + protected $helper; + protected $sentStatus = null; /** - * @var helper_plugin_popularity + * admin_plugin_popularity constructor. */ - var $helper; - var $sentStatus = null; - - function __construct(){ + public function __construct() + { $this->helper = $this->loadHelper('popularity', false); } /** * return prompt for admin menu + * @param $language + * @return string */ - function getMenuText($language) { + public function getMenuText($language) + { return $this->getLang('name'); } /** * return sort order for position in admin menu */ - function getMenuSort() { + public function getMenuSort() + { return 2000; } /** * Accessible for managers */ - function forAdminOnly() { + public function forAdminOnly() + { return false; } @@ -49,18 +50,19 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { /** * handle user request */ - function handle() { + public function handle() + { global $INPUT; //Send the data - if ( $INPUT->has('data') ){ - $this->sentStatus = $this->helper->sendData( $INPUT->str('data') ); - if ( $this->sentStatus === '' ){ + if ($INPUT->has('data')) { + $this->sentStatus = $this->helper->sendData($INPUT->str('data')); + if ($this->sentStatus === '') { //Update the last time we sent the data - touch ( $this->helper->popularityLastSubmitFile ); + touch($this->helper->popularityLastSubmitFile); } //Deal with the autosubmit option - $this->_enableAutosubmit( $INPUT->has('autosubmit') ); + $this->enableAutosubmit($INPUT->has('autosubmit')); } } @@ -68,9 +70,10 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { * Enable or disable autosubmit * @param bool $enable If TRUE, it will enable autosubmit. Else, it will disable it. */ - function _enableAutosubmit( $enable ){ - if ( $enable ){ - io_saveFile( $this->helper->autosubmitFile, ' '); + protected function enableAutosubmit($enable) + { + if ($enable) { + io_saveFile($this->helper->autosubmitFile, ' '); } else { @unlink($this->helper->autosubmitFile); } @@ -79,17 +82,18 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { /** * Output HTML form */ - function html() { + public function html() + { global $INPUT; - if ( ! $INPUT->has('data') ){ + if (! $INPUT->has('data')) { echo $this->locale_xhtml('intro'); //If there was an error the last time we tried to autosubmit, warn the user - if ( $this->helper->isAutoSubmitEnabled() ){ - if ( file_exists($this->helper->autosubmitErrorFile) ){ + if ($this->helper->isAutoSubmitEnabled()) { + if (file_exists($this->helper->autosubmitErrorFile)) { echo $this->getLang('autosubmitError'); - echo io_readFile( $this->helper->autosubmitErrorFile ); + echo io_readFile($this->helper->autosubmitErrorFile); } } @@ -98,12 +102,12 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { //Print the last time the data was sent $lastSent = $this->helper->lastSentTime(); - if ( $lastSent !== 0 ){ + if ($lastSent !== 0) { echo $this->getLang('lastSent') . ' ' . datetime_h($lastSent); } } else { //If we just submitted the form - if ( $this->sentStatus === '' ){ + if ($this->sentStatus === '') { //If we successfully sent the data echo $this->locale_xhtml('submitted'); } else { @@ -122,9 +126,10 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { * @param string $data The popularity data, if it has already been computed. NULL otherwise. * @return string The form, as an html string */ - function buildForm($submissionMode, $data = null){ + protected function buildForm($submissionMode, $data = null) + { $url = ($submissionMode === 'browser' ? $this->helper->submitUrl : script()); - if ( is_null($data) ){ + if (is_null($data)) { $data = $this->helper->gatherAsString(); } @@ -135,7 +140,7 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { .'</textarea><br />'; //If we submit via the server, we give the opportunity to suscribe to the autosubmission option - if ( $submissionMode !== 'browser' ){ + if ($submissionMode !== 'browser') { $form .= '<label for="autosubmit">' .'<input type="checkbox" name="autosubmit" id="autosubmit" ' .($this->helper->isAutosubmitEnabled() ? 'checked' : '' ) diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index b81ab7005..4537976ae 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -1,36 +1,43 @@ <?php + +use dokuwiki\HTTP\DokuHTTPClient; +use dokuwiki\Extension\Event; + /** * Popularity Feedback Plugin * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) */ - -class helper_plugin_popularity extends Dokuwiki_Plugin { +class helper_plugin_popularity extends Dokuwiki_Plugin +{ /** * The url where the data should be sent */ - var $submitUrl = 'http://update.dokuwiki.org/popularity.php'; + public $submitUrl = 'http://update.dokuwiki.org/popularity.php'; /** * Name of the file which determine if the the autosubmit is enabled, * and when it was submited for the last time */ - var $autosubmitFile; + public $autosubmitFile; /** * File where the last error which happened when we tried to autosubmit, will be log */ - var $autosubmitErrorFile; + public $autosubmitErrorFile; /** * Name of the file which determine when the popularity data was manually * submitted for the last time * (If this file doesn't exist, the data has never been sent) */ - var $popularityLastSubmitFile; + public $popularityLastSubmitFile; - - function __construct(){ + /** + * helper_plugin_popularity constructor. + */ + public function __construct() + { global $conf; $this->autosubmitFile = $conf['cachedir'].'/autosubmit.txt'; $this->autosubmitErrorFile = $conf['cachedir'].'/autosubmitError.txt'; @@ -38,46 +45,12 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { } /** - * Return methods of this helper - * - * @return array with methods description - */ - function getMethods(){ - $result = array(); - $result[] = array( - 'name' => 'isAutoSubmitEnabled', - 'desc' => 'Check if autosubmit is enabled', - 'params' => array(), - 'return' => array('result' => 'bool') - ); - $result[] = array( - 'name' => 'sendData', - 'desc' => 'Send the popularity data', - 'params' => array('data' => 'string'), - 'return' => array() - ); - $result[] = array( - 'name' => 'gatherAsString', - 'desc' => 'Gather the popularity data', - 'params' => array(), - 'return' => array('data' => 'string') - ); - $result[] = array( - 'name' => 'lastSentTime', - 'desc' => 'Compute the last time popularity data was sent', - 'params' => array(), - 'return' => array('data' => 'int') - ); - return $result; - - } - - /** * Check if autosubmit is enabled * * @return boolean TRUE if we should send data once a month, FALSE otherwise */ - function isAutoSubmitEnabled(){ + public function isAutoSubmitEnabled() + { return file_exists($this->autosubmitFile); } @@ -87,11 +60,12 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { * @param string $data The popularity data * @return string An empty string if everything worked fine, a string describing the error otherwise */ - function sendData($data){ + public function sendData($data) + { $error = ''; $httpClient = new DokuHTTPClient(); $status = $httpClient->sendRequest($this->submitUrl, array('data' => $data), 'POST'); - if ( ! $status ){ + if (! $status) { $error = $httpClient->error; } return $error; @@ -102,7 +76,8 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { * * @return int */ - function lastSentTime(){ + public function lastSentTime() + { $manualSubmission = @filemtime($this->popularityLastSubmitFile); $autoSubmission = @filemtime($this->autosubmitFile); @@ -114,13 +89,14 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { * * @return string The popularity data as a string */ - function gatherAsString(){ - $data = $this->_gather(); + public function gatherAsString() + { + $data = $this->gather(); $string = ''; - foreach($data as $key => $val){ - if(is_array($val)) foreach($val as $v){ + foreach ($data as $key => $val) { + if (is_array($val)) foreach ($val as $v) { $string .= hsc($key)."\t".hsc($v)."\n"; - }else{ + } else { $string .= hsc($key)."\t".hsc($val)."\n"; } } @@ -132,7 +108,8 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { * * @return array The popularity data as an array */ - function _gather(){ + protected function gather() + { global $conf; /** @var $auth DokuWiki_Auth_Plugin */ global $auth; @@ -156,81 +133,81 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { // number and size of pages $list = array(); - search($list,$conf['datadir'],array($this,'_search_count'),array('all'=>false),''); + search($list, $conf['datadir'], array($this, 'searchCountCallback'), array('all'=>false), ''); $data['page_count'] = $list['file_count']; $data['page_size'] = $list['file_size']; $data['page_biggest'] = $list['file_max']; $data['page_smallest'] = $list['file_min']; $data['page_nscount'] = $list['dir_count']; $data['page_nsnest'] = $list['dir_nest']; - if($list['file_count']) $data['page_avg'] = $list['file_size'] / $list['file_count']; + if ($list['file_count']) $data['page_avg'] = $list['file_size'] / $list['file_count']; $data['page_oldest'] = $list['file_oldest']; unset($list); // number and size of media $list = array(); - search($list,$conf['mediadir'],array($this,'_search_count'),array('all'=>true)); + search($list, $conf['mediadir'], array($this, 'searchCountCallback'), array('all'=>true)); $data['media_count'] = $list['file_count']; $data['media_size'] = $list['file_size']; $data['media_biggest'] = $list['file_max']; $data['media_smallest'] = $list['file_min']; $data['media_nscount'] = $list['dir_count']; $data['media_nsnest'] = $list['dir_nest']; - if($list['file_count']) $data['media_avg'] = $list['file_size'] / $list['file_count']; + if ($list['file_count']) $data['media_avg'] = $list['file_size'] / $list['file_count']; unset($list); // number and size of cache $list = array(); - search($list,$conf['cachedir'],array($this,'_search_count'),array('all'=>true)); + search($list, $conf['cachedir'], array($this, 'searchCountCallback'), array('all'=>true)); $data['cache_count'] = $list['file_count']; $data['cache_size'] = $list['file_size']; $data['cache_biggest'] = $list['file_max']; $data['cache_smallest'] = $list['file_min']; - if($list['file_count']) $data['cache_avg'] = $list['file_size'] / $list['file_count']; + if ($list['file_count']) $data['cache_avg'] = $list['file_size'] / $list['file_count']; unset($list); // number and size of index $list = array(); - search($list,$conf['indexdir'],array($this,'_search_count'),array('all'=>true)); + search($list, $conf['indexdir'], array($this, 'searchCountCallback'), array('all'=>true)); $data['index_count'] = $list['file_count']; $data['index_size'] = $list['file_size']; $data['index_biggest'] = $list['file_max']; $data['index_smallest'] = $list['file_min']; - if($list['file_count']) $data['index_avg'] = $list['file_size'] / $list['file_count']; + if ($list['file_count']) $data['index_avg'] = $list['file_size'] / $list['file_count']; unset($list); // number and size of meta $list = array(); - search($list,$conf['metadir'],array($this,'_search_count'),array('all'=>true)); + search($list, $conf['metadir'], array($this, 'searchCountCallback'), array('all'=>true)); $data['meta_count'] = $list['file_count']; $data['meta_size'] = $list['file_size']; $data['meta_biggest'] = $list['file_max']; $data['meta_smallest'] = $list['file_min']; - if($list['file_count']) $data['meta_avg'] = $list['file_size'] / $list['file_count']; + if ($list['file_count']) $data['meta_avg'] = $list['file_size'] / $list['file_count']; unset($list); // number and size of attic $list = array(); - search($list,$conf['olddir'],array($this,'_search_count'),array('all'=>true)); + search($list, $conf['olddir'], array($this, 'searchCountCallback'), array('all'=>true)); $data['attic_count'] = $list['file_count']; $data['attic_size'] = $list['file_size']; $data['attic_biggest'] = $list['file_max']; $data['attic_smallest'] = $list['file_min']; - if($list['file_count']) $data['attic_avg'] = $list['file_size'] / $list['file_count']; + if ($list['file_count']) $data['attic_avg'] = $list['file_size'] / $list['file_count']; $data['attic_oldest'] = $list['file_oldest']; unset($list); // user count - if($auth && $auth->canDo('getUserCount')){ + if ($auth && $auth->canDo('getUserCount')) { $data['user_count'] = $auth->getUserCount(); } // calculate edits per day $list = @file($conf['metadir'].'/_dokuwiki.changes'); $count = count($list); - if($count > 2){ - $first = (int) substr(array_shift($list),0,10); - $last = (int) substr(array_pop($list),0,10); + if ($count > 2) { + $first = (int) substr(array_shift($list), 0, 10); + $last = (int) substr(array_pop($list), 0, 10); $dur = ($last - $first)/(60*60*24); // number of days in the changelog $data['edits_per_day'] = $count/$dur; } @@ -240,7 +217,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { $data['plugin'] = plugin_list(); // pcre info - if(defined('PCRE_VERSION')) $data['pcre_version'] = PCRE_VERSION; + if (defined('PCRE_VERSION')) $data['pcre_version'] = PCRE_VERSION; $data['pcre_backtrack'] = ini_get('pcre.backtrack_limit'); $data['pcre_recursion'] = ini_get('pcre.recursion_limit'); @@ -249,27 +226,33 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { $data['webserver'] = $_SERVER['SERVER_SOFTWARE']; $data['php_version'] = phpversion(); $data['php_sapi'] = php_sapi_name(); - $data['php_memory'] = $this->_to_byte(ini_get('memory_limit')); + $data['php_memory'] = php_to_byte(ini_get('memory_limit')); $data['php_exectime'] = $phptime; $data['php_extension'] = get_loaded_extensions(); // plugin usage data - $this->_add_plugin_usage_data($data); + $this->addPluginUsageData($data); return $data; } - protected function _add_plugin_usage_data(&$data){ + /** + * Triggers event to let plugins add their own data + * + * @param $data + */ + protected function addPluginUsageData(&$data) + { $pluginsData = array(); - trigger_event('PLUGIN_POPULARITY_DATA_SETUP', $pluginsData); - foreach($pluginsData as $plugin => $d){ - if ( is_array($d) ) { - foreach($d as $key => $value){ - $data['plugin_' . $plugin . '_' . $key] = $value; - } - } else { - $data['plugin_' . $plugin] = $d; - } + Event::createAndTrigger('PLUGIN_POPULARITY_DATA_SETUP', $pluginsData); + foreach ($pluginsData as $plugin => $d) { + if (is_array($d)) { + foreach ($d as $key => $value) { + $data['plugin_' . $plugin . '_' . $key] = $value; + } + } else { + $data['plugin_' . $plugin] = $d; + } } } @@ -284,57 +267,26 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { * @param array $opts option array as given to search() * @return bool */ - function _search_count(&$data,$base,$file,$type,$lvl,$opts){ + public function searchCountCallback(&$data, $base, $file, $type, $lvl, $opts) + { // traverse - if($type == 'd'){ - if($data['dir_nest'] < $lvl) $data['dir_nest'] = $lvl; + if ($type == 'd') { + if ($data['dir_nest'] < $lvl) $data['dir_nest'] = $lvl; $data['dir_count']++; return true; } //only search txt files if 'all' option not set - if($opts['all'] || substr($file,-4) == '.txt'){ + if ($opts['all'] || substr($file, -4) == '.txt') { $size = filesize($base.'/'.$file); $date = filemtime($base.'/'.$file); $data['file_count']++; $data['file_size'] += $size; - if(!isset($data['file_min']) || $data['file_min'] > $size) $data['file_min'] = $size; - if($data['file_max'] < $size) $data['file_max'] = $size; - if(!isset($data['file_oldest']) || $data['file_oldest'] > $date) $data['file_oldest'] = $date; + if (!isset($data['file_min']) || $data['file_min'] > $size) $data['file_min'] = $size; + if ($data['file_max'] < $size) $data['file_max'] = $size; + if (!isset($data['file_oldest']) || $data['file_oldest'] > $date) $data['file_oldest'] = $date; } return false; } - - /** - * Convert php.ini shorthands to byte - * - * @author <gilthans dot NO dot SPAM at gmail dot com> - * @link http://php.net/manual/en/ini.core.php#79564 - * - * @param string $v - * @return int|string - */ - function _to_byte($v){ - $l = substr($v, -1); - $ret = substr($v, 0, -1); - switch(strtoupper($l)){ - /** @noinspection PhpMissingBreakStatementInspection */ - case 'P': - $ret *= 1024; - /** @noinspection PhpMissingBreakStatementInspection */ - case 'T': - $ret *= 1024; - /** @noinspection PhpMissingBreakStatementInspection */ - case 'G': - $ret *= 1024; - /** @noinspection PhpMissingBreakStatementInspection */ - case 'M': - $ret *= 1024; - case 'K': - $ret *= 1024; - break; - } - return $ret; - } } diff --git a/lib/plugins/popularity/lang/ar/lang.php b/lib/plugins/popularity/lang/ar/lang.php index c3e21868f..0006ed216 100644 --- a/lib/plugins/popularity/lang/ar/lang.php +++ b/lib/plugins/popularity/lang/ar/lang.php @@ -2,10 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Yaman Hokan <always.smile.yh@hotmail.com> * @author Usama Akkad <uahello@gmail.com> - * @author uahello@gmail.com */ $lang['name'] = 'رد الشعبية (قد يأخذ بعض الوقت ليحمل)'; $lang['submit'] = 'أرسل البيانات'; diff --git a/lib/plugins/popularity/lang/bg/lang.php b/lib/plugins/popularity/lang/bg/lang.php index 963b50e84..f60c44142 100644 --- a/lib/plugins/popularity/lang/bg/lang.php +++ b/lib/plugins/popularity/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Viktor Usunov <usun0v@mail.bg> * @author Kiril <neohidra@gmail.com> */ diff --git a/lib/plugins/popularity/lang/ca/lang.php b/lib/plugins/popularity/lang/ca/lang.php index 9c1759726..a3e50520a 100644 --- a/lib/plugins/popularity/lang/ca/lang.php +++ b/lib/plugins/popularity/lang/ca/lang.php @@ -3,10 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> * @author Carles Bellver <carles.bellver@cent.uji.es> - * @author Carles Bellver <carles.bellver@gmail.com> - * @author carles.bellver@cent.uji.es - * @author daniel@6temes.cat + * @author daniel <daniel@6temes.cat> */ $lang['name'] = 'Retroacció sobre popularitat (pot trigar una mica a carregar)'; $lang['submit'] = 'Envia dades'; +$lang['lastSent'] = 'S’han enviat les dades'; diff --git a/lib/plugins/popularity/lang/da/intro.txt b/lib/plugins/popularity/lang/da/intro.txt index e2122c94d..9af7ce948 100644 --- a/lib/plugins/popularity/lang/da/intro.txt +++ b/lib/plugins/popularity/lang/da/intro.txt @@ -4,6 +4,6 @@ Dette værktøj samler anonyme oplysninge rom din wiki og giver dig mulighed for Vi anbefaler dig til at gentage dette trin fra tid til anden for at holde udviklerne underrettede eftersom din wiki vokser. Dine anonyme datasamlinger vil blive tilkendegivet ved et anonymt navn. -Opsamlede data indeholder oplysninger som eksempelvis din udgave af DokuWiki, antallet og størrelsen af dens sider, tilføjede udvidelse og oplysninger om din PHP-opsætning. +Opsamlede data indeholder oplysninger som eksempelvis din udgave af DokuWiki, antallet og størrelsen af dens sider, tilføjede udvidelser og oplysninger om din PHP-opsætning. De egentlige data, som vil blive sendt, er vist herunder. Brug venligst knappen 'Send Data' for at videresende oplysningerne.
\ No newline at end of file diff --git a/lib/plugins/popularity/lang/da/lang.php b/lib/plugins/popularity/lang/da/lang.php index 715d6ac93..5e22a4b37 100644 --- a/lib/plugins/popularity/lang/da/lang.php +++ b/lib/plugins/popularity/lang/da/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jacob Palm <mail@jacobpalm.dk> * @author Kalle Sommer Nielsen <kalle@php.net> * @author Esben Laursen <hyber@hyber.dk> * @author Harith <haj@berlingske.dk> @@ -13,7 +14,7 @@ */ $lang['name'] = 'Tilbagemelding om popularitet (vil måske tage en del tid at indlæse)'; $lang['submit'] = 'Send data'; -$lang['autosubmit'] = 'Automatisk sende data en gang om måneden'; +$lang['autosubmit'] = 'Send automatisk data en gang om måneden'; $lang['submissionFailed'] = 'Dataene kunne ikke sendes pga. følgende fejl:'; $lang['submitDirectly'] = 'Du kan sende dataene manuelt ved at sende følgende formular.'; $lang['autosubmitError'] = 'Den sidste automatiske fremsendelse fejlede pga. følgende fejl:'; diff --git a/lib/plugins/popularity/lang/el/lang.php b/lib/plugins/popularity/lang/el/lang.php index fe38a98f7..8e285cbe0 100644 --- a/lib/plugins/popularity/lang/el/lang.php +++ b/lib/plugins/popularity/lang/el/lang.php @@ -6,7 +6,7 @@ * @author Konstantinos Koryllos <koryllos@gmail.com> * @author George Petsagourakis <petsagouris@gmail.com> * @author Petros Vidalis <pvidalis@gmail.com> - * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com + * @author Vasileios Karavasilis <vasileioskaravasilis@gmail.com> */ $lang['name'] = 'Αναφορά Δημοτικότητας (ίσως αργήσει λίγο να εμφανιστεί)'; $lang['submit'] = 'Αποστολή Δεδομένων'; diff --git a/lib/plugins/popularity/lang/fa/lang.php b/lib/plugins/popularity/lang/fa/lang.php index e6c642dc5..a13727d83 100644 --- a/lib/plugins/popularity/lang/fa/lang.php +++ b/lib/plugins/popularity/lang/fa/lang.php @@ -5,8 +5,7 @@ * * @author behrad eslamifar <behrad_es@yahoo.com) * @author Mohsen Firoozmandan <info@mambolearn.com> - * @author omidmr@gmail.com - * @author Omid Mottaghi <omidmr@gmail.com> + * @author omidmr <omidmr@gmail.com> * @author Mohammad Reza Shoaei <shoaei@gmail.com> * @author Milad DZand <M.DastanZand@gmail.com> * @author AmirH Hassaneini <mytechmix@gmail.com> diff --git a/lib/plugins/popularity/lang/fi/lang.php b/lib/plugins/popularity/lang/fi/lang.php index ec0fc4071..bea4f758b 100644 --- a/lib/plugins/popularity/lang/fi/lang.php +++ b/lib/plugins/popularity/lang/fi/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Otto Vainio <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> * @author Sami Olmari <sami@olmari.fi> diff --git a/lib/plugins/popularity/lang/is/lang.php b/lib/plugins/popularity/lang/is/lang.php index 9add4cae4..0270d3fe2 100644 --- a/lib/plugins/popularity/lang/is/lang.php +++ b/lib/plugins/popularity/lang/is/lang.php @@ -1,5 +1,8 @@ <?php + /** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * Icelandic language file * * @author Hrannar Baldursson <hrannar.baldursson@gmail.com> diff --git a/lib/plugins/popularity/lang/lt/lang.php b/lib/plugins/popularity/lang/lt/lang.php index dca350475..c0cc342c7 100644 --- a/lib/plugins/popularity/lang/lt/lang.php +++ b/lib/plugins/popularity/lang/lt/lang.php @@ -2,8 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author audrius.klevas@gmail.com + * + * @author audrius.klevas <audrius.klevas@gmail.com> * @author Arunas Vaitekunas <aras@fan.lt> */ $lang['name'] = 'Populiarumo apklausa (gali užtrukti pakrovimas)'; diff --git a/lib/plugins/popularity/lang/no/lang.php b/lib/plugins/popularity/lang/no/lang.php index 688cc4ff6..800c8a1cc 100644 --- a/lib/plugins/popularity/lang/no/lang.php +++ b/lib/plugins/popularity/lang/no/lang.php @@ -9,8 +9,7 @@ * @author Knut Staring <knutst@gmail.com> * @author Lisa Ditlefsen <lisa@vervesearch.com> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author Rune Rasmussen syntaxerror.no@gmail.com + * @author Rune Rasmussen <syntaxerror.no@gmail.com> * @author Thomas Nygreen <nygreen@gmail.com> * @author Jon Bøe <jonmagneboe@hotmail.com> * @author Egil Hansen <egil@rosetta.no> diff --git a/lib/plugins/popularity/lang/pt/intro.txt b/lib/plugins/popularity/lang/pt/intro.txt index 9ec37e208..4a4bccc48 100644 --- a/lib/plugins/popularity/lang/pt/intro.txt +++ b/lib/plugins/popularity/lang/pt/intro.txt @@ -1,9 +1,9 @@ ====== Retorno de Popularidade ====== -Esta ferramenta junta dados anónimos sobre o seu wiki e permite estes sejam enviados para a equipa de desenvolvimento do DokuWiki. Isto ajuda-os a compreender como o DokuWiki é usado pelos seus utilizadores de forma a permitir que desenvolvimentos futuros sejam baseadas em estatísticas de uso real. +Esta [[doku>popularity|ferramenta]] junta dados anônimos sobre o seu wiki e envia-os para a equipe de desenvolvimento do DokuWiki. Isto ajuda-os a compreender como o DokuWiki é usado pelos seus usuários de forma a permitir que desenvolvimentos futuros sejam baseadas em estatísticas de uso real. -Você é encorajado a repetir este passo regularmente para manter a equipa informada quando o seu wiki crescer. Os seus dados permanecerão sempre anónimos. +Você é encorajado a repetir este passo regularmente para manter a equipe informada quando o seu wiki crescer. Os seus dados permanecerão sempre anônimos. -Os dados colectados contêm informação como a versão do DokuWiki que você utiliza, o número e tamanho das suas páginas e ficheiros, os plugins instalados e informação sobre a sua instalação do PHP. +Os dados coletados contêm informação como a versão do DokuWiki que você utiliza, o número e tamanho das suas páginas e ficheiros, os plugins instalados e informação sobre a sua instalação do PHP. Os dados que serão enviados são mostrados abaixo. Use o botão "Enviar Dados" para transferir a informação.
\ No newline at end of file diff --git a/lib/plugins/popularity/lang/pt/lang.php b/lib/plugins/popularity/lang/pt/lang.php index a14d176d7..792fb3797 100644 --- a/lib/plugins/popularity/lang/pt/lang.php +++ b/lib/plugins/popularity/lang/pt/lang.php @@ -3,12 +3,13 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> * @author Enrico Nicoletto <liverig@gmail.com> * @author Fil <fil@meteopt.com> * @author André Neves <drakferion@gmail.com> - * @author José Campos zecarlosdecampos@gmail.com + * @author José Campos <zecarlosdecampos@gmail.com> */ -$lang['name'] = 'Retorno (feedback) de Popularidade (pode levar algum tempo a carregar)'; +$lang['name'] = 'Retorno de Popularidade (pode levar algum tempo a carregar)'; $lang['submit'] = 'Enviar Dados'; $lang['autosubmit'] = 'Enviar dados automáticamente uma vez por mês'; $lang['submissionFailed'] = 'Os dados não foram enviados devido ao seguinte erro:'; diff --git a/lib/plugins/popularity/lang/ro/lang.php b/lib/plugins/popularity/lang/ro/lang.php index 4a3130ad5..4f6c8476b 100644 --- a/lib/plugins/popularity/lang/ro/lang.php +++ b/lib/plugins/popularity/lang/ro/lang.php @@ -4,12 +4,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Emanuel-Emeric Andrasi <n30@mandrivausers.ro> - * @author Emanuel-Emeric Andrași <n30@mandrivausers.ro> * @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro> - * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> - * @author Marius Olar <olarmariusalex@yahoo.com> - * @author Emanuel-Emeric Andrași <em.andrasi@mandrivausers.ro> */ $lang['name'] = 'Feedback de popularitate (încărcarea poate dura mai mult)'; $lang['submit'] = 'Trimite datele'; diff --git a/lib/plugins/popularity/lang/sr/lang.php b/lib/plugins/popularity/lang/sr/lang.php index b67aaa8ef..fe768f370 100644 --- a/lib/plugins/popularity/lang/sr/lang.php +++ b/lib/plugins/popularity/lang/sr/lang.php @@ -3,8 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Иван Петровић petrovicivan@ubuntusrbija.org - * @author Ivan Petrovic <petrovicivan@ubuntusrbija.org> + * @author Иван Петровић <petrovicivan@ubuntusrbija.org> * @author Miroslav Šolti <solti.miroslav@gmail.com> */ $lang['name'] = 'Мерење популарности (може потрајати док се не учита)'; diff --git a/lib/plugins/popularity/lang/th/lang.php b/lib/plugins/popularity/lang/th/lang.php index f6a736a06..5601acfd2 100644 --- a/lib/plugins/popularity/lang/th/lang.php +++ b/lib/plugins/popularity/lang/th/lang.php @@ -2,9 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Komgrit Niyomrath <n.komgrit@gmail.com> - * @author Kittithat Arnontavilas mrtomyum@gmail.com * @author Kittithat Arnontavilas <mrtomyum@gmail.com> * @author Thanasak Sompaisansin <jombthep@gmail.com> */ diff --git a/lib/plugins/popularity/lang/tr/lang.php b/lib/plugins/popularity/lang/tr/lang.php index 696ee38dc..7e837efeb 100644 --- a/lib/plugins/popularity/lang/tr/lang.php +++ b/lib/plugins/popularity/lang/tr/lang.php @@ -2,12 +2,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aydın Coşkuner <aydinweb@gmail.com> * @author Cihan Kahveci <kahvecicihan@gmail.com> * @author Yavuz Selim <yavuzselim@gmail.com> * @author Caleb Maclennan <caleb@alerque.com> - * @author farukerdemoncel@gmail.com + * @author farukerdemoncel <farukerdemoncel@gmail.com> */ $lang['name'] = 'Popülerlik Geribeslemesi (yüklemesi uzun sürebilir)'; $lang['submit'] = 'Verileri Gönder'; diff --git a/lib/plugins/popularity/lang/vi/intro.txt b/lib/plugins/popularity/lang/vi/intro.txt new file mode 100644 index 000000000..4f06b394e --- /dev/null +++ b/lib/plugins/popularity/lang/vi/intro.txt @@ -0,0 +1,9 @@ +====== Phản hồi độ phổ biến ====== + +[[doku>popularity|Công cụ này]] thu thập dữ liệu ẩn danh về wiki của bạn và cho phép bạn gửi lại cho nhà phát triển DokuWiki. Điều này giúp họ hiểu cách người dùng sử dụng DokuWiki và đảm bảo các quyết định phát triển trong tương lai được hỗ trợ bởi các thống kê sử dụng trong thế giới thực. + +Thỉnh thoảng bạn nên lặp lại bước này để thông báo cho các nhà phát triển khi wiki của bạn phát triển. Bộ dữ liệu lặp lại của bạn sẽ được xác định bởi một ID ẩn danh. + +Dữ liệu được thu thập chứa thông tin như phiên bản DokuWiki của bạn, số lượng, kích thước của các trang và tập tin của bạn, các plugin đã cài đặt và thông tin về cài đặt PHP của bạn. + +Dữ liệu thô sẽ gửi được hiển thị dưới đây. Vui lòng sử dụng nút "Gửi dữ liệu" để chuyển thông tin.
\ No newline at end of file diff --git a/lib/plugins/popularity/lang/vi/lang.php b/lib/plugins/popularity/lang/vi/lang.php new file mode 100644 index 000000000..f8be56793 --- /dev/null +++ b/lib/plugins/popularity/lang/vi/lang.php @@ -0,0 +1,14 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['name'] = 'Phản hồi độ phổ biến (có thể mất một chút thời gian tải)'; +$lang['submit'] = 'Gửi dữ liệu'; +$lang['autosubmit'] = 'Tự động gửi dữ liệu mỗi tháng một lần'; +$lang['submissionFailed'] = 'Dữ liệu không thể được gửi do lỗi sau:'; +$lang['submitDirectly'] = 'Bạn có thể gửi dữ liệu theo cách thủ công bằng cách gửi biểu mẫu sau.'; +$lang['autosubmitError'] = 'Tự động gửi cuối cùng không thành công, vì lỗi sau:'; +$lang['lastSent'] = 'Dữ liệu đã được gửi'; diff --git a/lib/plugins/popularity/lang/vi/submitted.txt b/lib/plugins/popularity/lang/vi/submitted.txt new file mode 100644 index 000000000..8c4abc745 --- /dev/null +++ b/lib/plugins/popularity/lang/vi/submitted.txt @@ -0,0 +1,3 @@ +====== Phản hồi độ phổ biến ====== + +Dữ liệu đã được gửi thành công.
\ No newline at end of file diff --git a/lib/plugins/remote.php b/lib/plugins/remote.php index c2253dbd5..a3cbec722 100644 --- a/lib/plugins/remote.php +++ b/lib/plugins/remote.php @@ -1,104 +1,2 @@ <?php - -/** - * Class DokuWiki_Remote_Plugin - */ -abstract class DokuWiki_Remote_Plugin extends DokuWiki_Plugin { - - private $api; - - /** - * Constructor - */ - public function __construct() { - $this->api = new RemoteAPI(); - } - - /** - * Get all available methods with remote access. - * - * By default it exports all public methods of a remote plugin. Methods beginning - * with an underscore are skipped. - * - * @return array Information about all provided methods. {@see RemoteAPI}. - */ - public function _getMethods() { - $result = array(); - - $reflection = new \ReflectionClass($this); - foreach($reflection->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { - // skip parent methods, only methods further down are exported - $declaredin = $method->getDeclaringClass()->name; - if($declaredin == 'DokuWiki_Plugin' || $declaredin == 'DokuWiki_Remote_Plugin') continue; - $method_name = $method->name; - if(substr($method_name, 0, 1) == '_') continue; - - // strip asterisks - $doc = $method->getDocComment(); - $doc = preg_replace( - array('/^[ \t]*\/\*+[ \t]*/m', '/[ \t]*\*+[ \t]*/m', '/\*+\/\s*$/m','/\s*\/\s*$/m'), - array('', '', '', ''), - $doc - ); - - // prepare data - $data = array(); - $data['name'] = $method_name; - $data['public'] = 0; - $data['doc'] = $doc; - $data['args'] = array(); - - // get parameter type from doc block type hint - foreach($method->getParameters() as $parameter) { - $name = $parameter->name; - $type = 'string'; // we default to string - if(preg_match('/^@param[ \t]+([\w|\[\]]+)[ \t]\$'.$name.'/m', $doc, $m)){ - $type = $this->cleanTypeHint($m[1]); - } - $data['args'][] = $type; - } - - // get return type from doc block type hint - if(preg_match('/^@return[ \t]+([\w|\[\]]+)/m', $doc, $m)){ - $data['return'] = $this->cleanTypeHint($m[1]); - } else { - $data['return'] = 'string'; - } - - // add to result - $result[$method_name] = $data; - } - - return $result; - } - - /** - * Matches the given type hint against the valid options for the remote API - * - * @param string $hint - * @return string - */ - protected function cleanTypeHint($hint) { - $types = explode('|', $hint); - foreach($types as $t) { - if(substr($t, -2) == '[]') { - return 'array'; - } - if($t == 'boolean') { - return 'bool'; - } - if(in_array($t, array('array', 'string', 'int', 'double', 'bool', 'null', 'date', 'file'))) { - return $t; - } - } - return 'string'; - } - - /** - * @return RemoteAPI - */ - protected function getApi() { - return $this->api; - } - -} +dbg_deprecated('Autoloading. Do not require() files yourself.'); diff --git a/lib/plugins/revert/admin.php b/lib/plugins/revert/admin.php index 1a0300585..2d11dc05a 100644 --- a/lib/plugins/revert/admin.php +++ b/lib/plugins/revert/admin.php @@ -1,66 +1,73 @@ <?php -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); + +use dokuwiki\ChangeLog\PageChangeLog; /** * All DokuWiki plugins to extend the admin function * need to inherit from this class */ -class admin_plugin_revert extends DokuWiki_Admin_Plugin { - var $cmd; +class admin_plugin_revert extends DokuWiki_Admin_Plugin +{ + protected $cmd; // some vars which might need tuning later - var $max_lines = 800; // lines to read from changelog - var $max_revs = 20; // numer of old revisions to check + protected $max_lines = 800; // lines to read from changelog + protected $max_revs = 20; // numer of old revisions to check /** * Constructor */ - function __construct(){ + public function __construct() + { $this->setupLocale(); } /** * access for managers */ - function forAdminOnly(){ + public function forAdminOnly() + { return false; } /** * return sort order for position in admin menu */ - function getMenuSort() { + public function getMenuSort() + { return 40; } /** * handle user request */ - function handle() { + public function handle() + { } /** * output appropriate html */ - function html() { + public function html() + { global $INPUT; echo $this->locale_xhtml('intro'); - $this->_searchform(); + $this->printSearchForm(); - if(is_array($INPUT->param('revert')) && checkSecurityToken()){ - $this->_revert($INPUT->arr('revert'),$INPUT->str('filter')); - }elseif($INPUT->has('filter')){ - $this->_list($INPUT->str('filter')); + if (is_array($INPUT->param('revert')) && checkSecurityToken()) { + $this->revertEdits($INPUT->arr('revert'), $INPUT->str('filter')); + } elseif ($INPUT->has('filter')) { + $this->listEdits($INPUT->str('filter')); } } /** * Display the form for searching spam pages */ - function _searchform(){ + protected function printSearchForm() + { global $lang, $INPUT; echo '<form action="" method="post"><div class="no">'; echo '<label>'.$this->getLang('filter').': </label>'; @@ -73,31 +80,32 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { /** * Start the reversion process */ - function _revert($revert,$filter){ + protected function revertEdits($revert, $filter) + { echo '<hr /><br />'; echo '<p>'.$this->getLang('revstart').'</p>'; echo '<ul>'; - foreach($revert as $id){ + foreach ($revert as $id) { global $REV; // find the last non-spammy revision $data = ''; $pagelog = new PageChangeLog($id); $old = $pagelog->getRevisions(0, $this->max_revs); - if(count($old)){ - foreach($old as $REV){ - $data = rawWiki($id,$REV); - if(strpos($data,$filter) === false) break; + if (count($old)) { + foreach ($old as $REV) { + $data = rawWiki($id, $REV); + if (strpos($data, $filter) === false) break; } } - if($data){ - saveWikiText($id,$data,'old revision restored',false); - printf('<li><div class="li">'.$this->getLang('reverted').'</div></li>',$id,$REV); - }else{ - saveWikiText($id,'','',false); - printf('<li><div class="li">'.$this->getLang('removed').'</div></li>',$id); + if ($data) { + saveWikiText($id, $data, 'old revision restored', false); + printf('<li><div class="li">'.$this->getLang('reverted').'</div></li>', $id, $REV); + } else { + saveWikiText($id, '', '', false); + printf('<li><div class="li">'.$this->getLang('removed').'</div></li>', $id); } @set_time_limit(10); flush(); @@ -110,7 +118,8 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { /** * List recent edits matching the given filter */ - function _list($filter){ + protected function listEdits($filter) + { global $conf; global $lang; echo '<hr /><br />'; @@ -118,13 +127,13 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { echo '<input type="hidden" name="filter" value="'.hsc($filter).'" />'; formSecurityToken(); - $recents = getRecents(0,$this->max_lines); + $recents = getRecents(0, $this->max_lines); echo '<ul>'; $cnt = 0; - foreach($recents as $recent){ - if($filter){ - if(strpos(rawWiki($recent['id']),$filter) === false) continue; + foreach ($recents as $recent) { + if ($filter) { + if (strpos(rawWiki($recent['id']), $filter) === false) continue; } $cnt++; @@ -132,10 +141,11 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { echo ($recent['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) ? '<li class="minor">' : '<li>'; echo '<div class="li">'; - echo '<input type="checkbox" name="revert[]" value="'.hsc($recent['id']).'" checked="checked" id="revert__'.$cnt.'" />'; + echo '<input type="checkbox" name="revert[]" value="'.hsc($recent['id']). + '" checked="checked" id="revert__'.$cnt.'" />'; echo ' <label for="revert__'.$cnt.'">'.$date.'</label> '; - echo '<a href="'.wl($recent['id'],"do=diff").'">'; + echo '<a href="'.wl($recent['id'], "do=diff").'">'; $p = array(); $p['src'] = DOKU_BASE.'lib/images/diff.png'; $p['width'] = 15; @@ -146,7 +156,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { echo "<img $att />"; echo '</a> '; - echo '<a href="'.wl($recent['id'],"do=revisions").'">'; + echo '<a href="'.wl($recent['id'], "do=revisions").'">'; $p = array(); $p['src'] = DOKU_BASE.'lib/images/history.png'; $p['width'] = 12; @@ -157,7 +167,7 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { echo "<img $att />"; echo '</a> '; - echo html_wikilink(':'.$recent['id'],(useHeading('navigation'))?null:$recent['id']); + echo html_wikilink(':'.$recent['id'], (useHeading('navigation'))?null:$recent['id']); echo ' – '.htmlspecialchars($recent['sum']); echo ' <span class="user">'; @@ -174,11 +184,10 @@ class admin_plugin_revert extends DokuWiki_Admin_Plugin { echo '<p>'; echo '<button type="submit">'.$this->getLang('revert').'</button> '; - printf($this->getLang('note2'),hsc($filter)); + printf($this->getLang('note2'), hsc($filter)); echo '</p>'; echo '</div></form>'; } - } //Setup VIM: ex: et ts=4 : diff --git a/lib/plugins/revert/lang/ar/lang.php b/lib/plugins/revert/lang/ar/lang.php index 6262cc674..57e1b32b4 100644 --- a/lib/plugins/revert/lang/ar/lang.php +++ b/lib/plugins/revert/lang/ar/lang.php @@ -2,10 +2,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * + * @author Khalid <khalid.aljahil@gmail.com> * @author Yaman Hokan <always.smile.yh@hotmail.com> * @author Usama Akkad <uahello@gmail.com> - * @author uahello@gmail.com * @author Ahmad Abd-Elghany <tolpa1@gmail.com> * @author alhajr <alhajr300@gmail.com> * @author Mohamed Belhsine <b.mohamed897@gmail.com> diff --git a/lib/plugins/revert/lang/bg/lang.php b/lib/plugins/revert/lang/bg/lang.php index 5062a12ad..f68db5b0e 100644 --- a/lib/plugins/revert/lang/bg/lang.php +++ b/lib/plugins/revert/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Nikolay Vladimirov <nikolay@vladimiroff.com> * @author Viktor Usunov <usun0v@mail.bg> * @author Kiril <neohidra@gmail.com> diff --git a/lib/plugins/revert/lang/ca/lang.php b/lib/plugins/revert/lang/ca/lang.php index a2a7915f3..15223578e 100644 --- a/lib/plugins/revert/lang/ca/lang.php +++ b/lib/plugins/revert/lang/ca/lang.php @@ -4,10 +4,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Carles Bellver <carles.bellver@gmail.com> - * @author carles.bellver@gmail.com - * @author carles.bellver@cent.uji.es - * @author Carles Bellver <carles.bellver@cent.uji.es> - * @author daniel@6temes.cat + * @author carles.bellver <carles.bellver@cent.uji.es> + * @author daniel <daniel@6temes.cat> */ $lang['menu'] = 'Gestió de reversions'; $lang['filter'] = 'Cerca pàgines brossa'; diff --git a/lib/plugins/revert/lang/cs/lang.php b/lib/plugins/revert/lang/cs/lang.php index fd9e332c8..98d6e9e57 100644 --- a/lib/plugins/revert/lang/cs/lang.php +++ b/lib/plugins/revert/lang/cs/lang.php @@ -3,6 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> + * @author Petr Kajzar <petr.kajzar@lf1.cuni.cz> + * @author Robert Surý <rsurycz@seznam.cz> + * @author Martin Hořínek <hev@hev.cz> * @author Jonáš Dyba <jonas.dyba@gmail.com> * @author Bohumir Zamecnik <bohumir@zamecnik.org> * @author Zbynek Krivka <zbynek.krivka@seznam.cz> diff --git a/lib/plugins/revert/lang/da/intro.txt b/lib/plugins/revert/lang/da/intro.txt index fdb0c5f32..9ce18ec43 100644 --- a/lib/plugins/revert/lang/da/intro.txt +++ b/lib/plugins/revert/lang/da/intro.txt @@ -1,3 +1,3 @@ ===== Gendannelsesstyring ===== -Denne side hjælper dig med at gendanne sider efter et angreb af uønskede indlæg. For at finde en liste af sider, der muligvis er blevet ændret, så skriv en søgestreng (for eksempel. en uønsket netadresse) og bekræft, at de fundne sider virkeligt er uønskede og gendan ændringerne.
\ No newline at end of file +Denne side hjælper dig med at gendanne sider efter et angreb af spam. For at finde en liste af sider, der muligvis er blevet ændret, så skriv en søgestreng (f.eks. en uønsket netadresse) og bekræft, at de fundne sider virkeligt er uønskede og gendan ændringerne.
\ No newline at end of file diff --git a/lib/plugins/revert/lang/da/lang.php b/lib/plugins/revert/lang/da/lang.php index 11114bd1b..2dee82ff7 100644 --- a/lib/plugins/revert/lang/da/lang.php +++ b/lib/plugins/revert/lang/da/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jacob Palm <mail@jacobpalm.dk> * @author Kalle Sommer Nielsen <kalle@php.net> * @author Esben Laursen <hyber@hyber.dk> * @author Harith <haj@berlingske.dk> @@ -14,7 +15,7 @@ $lang['menu'] = 'Gendannelsesstyring'; $lang['filter'] = 'Søg efter uønskede sider'; $lang['revert'] = 'Gendan valgte sider'; -$lang['reverted'] = '%s gendannet til ændring %s'; +$lang['reverted'] = '%s gendannet til revision %s'; $lang['removed'] = '%s fjernet'; $lang['revstart'] = 'Gendannelsesforløbet er startet. Dette kan tage et stykke tid. Hvis kodefilen giver "time out" før processen færdiggøres, skal du gendanne i mindre dele.'; $lang['revstop'] = 'Gendannelsesforløbet fuldført uden fejl'; diff --git a/lib/plugins/revert/lang/el/lang.php b/lib/plugins/revert/lang/el/lang.php index 48bbb22d0..5f1e345c6 100644 --- a/lib/plugins/revert/lang/el/lang.php +++ b/lib/plugins/revert/lang/el/lang.php @@ -8,7 +8,7 @@ * @author Konstantinos Koryllos <koryllos@gmail.com> * @author George Petsagourakis <petsagouris@gmail.com> * @author Petros Vidalis <pvidalis@gmail.com> - * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com + * @author Vasileios Karavasilis <vasileioskaravasilis@gmail.com> */ $lang['menu'] = 'Αποκατάσταση κακόβουλων αλλαγών σελίδων'; $lang['filter'] = 'Αναζήτηση σελίδων που περιέχουν spam'; diff --git a/lib/plugins/revert/lang/fa/lang.php b/lib/plugins/revert/lang/fa/lang.php index c6e41ea22..073b254e8 100644 --- a/lib/plugins/revert/lang/fa/lang.php +++ b/lib/plugins/revert/lang/fa/lang.php @@ -5,8 +5,7 @@ * * @author behrad eslamifar <behrad_es@yahoo.com) * @author Mohsen Firoozmandan <info@mambolearn.com> - * @author omidmr@gmail.com - * @author Omid Mottaghi <omidmr@gmail.com> + * @author omidmr <omidmr@gmail.com> * @author Mohammad Reza Shoaei <shoaei@gmail.com> * @author Milad DZand <M.DastanZand@gmail.com> * @author AmirH Hassaneini <mytechmix@gmail.com> diff --git a/lib/plugins/revert/lang/fi/lang.php b/lib/plugins/revert/lang/fi/lang.php index d14f527f9..02b4d35b2 100644 --- a/lib/plugins/revert/lang/fi/lang.php +++ b/lib/plugins/revert/lang/fi/lang.php @@ -2,9 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author otto@valjakko.net - * @author Otto Vainio <otto@valjakko.net> + * + * @author otto <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> * @author Sami Olmari <sami@olmari.fi> */ diff --git a/lib/plugins/revert/lang/is/lang.php b/lib/plugins/revert/lang/is/lang.php index 9de404992..6923395cd 100644 --- a/lib/plugins/revert/lang/is/lang.php +++ b/lib/plugins/revert/lang/is/lang.php @@ -1,5 +1,8 @@ <?php + /** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * Icelandic language file * * @author Hrannar Baldursson <hrannar.baldursson@gmail.com> diff --git a/lib/plugins/revert/lang/ja/lang.php b/lib/plugins/revert/lang/ja/lang.php index 1bca8a7c4..60423e8b0 100644 --- a/lib/plugins/revert/lang/ja/lang.php +++ b/lib/plugins/revert/lang/ja/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> * @author Yuji Takenaka <webmaster@davilin.com> * @author Ikuo Obataya <i.obataya@gmail.com> * @author Daniel Dupriest <kououken@gmail.com> @@ -12,10 +13,10 @@ */ $lang['menu'] = '復元管理'; $lang['filter'] = 'スパムを受けたページを検索'; -$lang['revert'] = '選択したページを検索'; +$lang['revert'] = '選択したページを復元'; $lang['reverted'] = '%s はリビジョン %s へ復元されました'; $lang['removed'] = '%s は削除されました'; -$lang['revstart'] = '復元処理中です。時間が掛かる可能性がありますが、もしタイムアウトした場合は、復元を複数回に分けて行ってください。'; +$lang['revstart'] = '復元処理中です。処理には時間が掛かる可能性があります。もしタイムアウトした場合は、復元を複数回に分けて行ってください。'; $lang['revstop'] = '復元処理が正しく完了しました。'; $lang['note1'] = '注意:検索語句は大文字・小文字を区別します'; -$lang['note2'] = '注意:最新の内容に検索したスパムキーワード <i>%s</i> が含まれていないページが復元されます。'; +$lang['note2'] = '注意:検索したスパムキーワード <i>%s</i> が含まれていない版のうち、最新のものに復元されます。'; diff --git a/lib/plugins/revert/lang/ko/lang.php b/lib/plugins/revert/lang/ko/lang.php index f9e16cc09..a71dc067a 100644 --- a/lib/plugins/revert/lang/ko/lang.php +++ b/lib/plugins/revert/lang/ko/lang.php @@ -3,6 +3,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author pavement <pavement@rael.cc> + * @author Traend <Traend@ruu.kr> * @author Seungheon Song <esketch@gmail.com> * @author jk Lee * @author dongnak <dongnak@gmail.com> diff --git a/lib/plugins/revert/lang/no/lang.php b/lib/plugins/revert/lang/no/lang.php index 88c25af36..3e65a94b5 100644 --- a/lib/plugins/revert/lang/no/lang.php +++ b/lib/plugins/revert/lang/no/lang.php @@ -3,6 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Torgeir Blesvik <bletor@banenor.no> + * @author Rut Kristin Aanestad <dark@met.no> + * @author ThorPrestboen <thor.erling.prestboen@gmail.com> + * @author Christian McKenna <mckchr@banenor.no> * @author Thomas Nygreen <nygreen@gmail.com> * @author Arild Burud <arildb@met.no> * @author Torkill Bruland <torkar-b@online.no> @@ -12,8 +16,7 @@ * @author Knut Staring <knutst@gmail.com> * @author Lisa Ditlefsen <lisa@vervesearch.com> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author Rune Rasmussen syntaxerror.no@gmail.com + * @author Rune Rasmussen <syntaxerror.no@gmail.com> * @author Jon Bøe <jonmagneboe@hotmail.com> * @author Egil Hansen <egil@rosetta.no> * @author Thomas Juberg <Thomas.Juberg@Gmail.com> @@ -22,7 +25,6 @@ * @author Patrick <spill.p@hotmail.com> * @author Danny Buckhof <daniel.raknes@hotmail.no> * @author Arne Hanssen <arne.hanssen@getmail.no> - * @author Arne Hanssen <arnehans@getmail.no> * @author Patrick Sletvold <patricksletvold@hotmail.com> */ $lang['menu'] = 'Tilbakestillingsbehandler'; diff --git a/lib/plugins/revert/lang/pt/intro.txt b/lib/plugins/revert/lang/pt/intro.txt index 7adfe5f21..f5514839c 100644 --- a/lib/plugins/revert/lang/pt/intro.txt +++ b/lib/plugins/revert/lang/pt/intro.txt @@ -1,3 +1,3 @@ -====== Gerir Reversões ====== +====== Gerenciar Reversões ====== -Esta página ajuda a reverter automaticamente de um ataque spam. Para encontrar as páginas afectadas insira primeiro um texto de pesquisa (i.e spam URL), confirme as páginas encontradas como sendo resultantes de um ataque spam e reverta essas edições.
\ No newline at end of file +Esta página ajuda a reverter automaticamente de um ataque de spam. Para encontrar as páginas afetadas insira primeiro um texto de pesquisa (ie, uma URL de spam), confirme as páginas encontradas como sendo resultantes de um ataque spam e reverta essas edições.
\ No newline at end of file diff --git a/lib/plugins/revert/lang/pt/lang.php b/lib/plugins/revert/lang/pt/lang.php index 665b846bf..73c5db72d 100644 --- a/lib/plugins/revert/lang/pt/lang.php +++ b/lib/plugins/revert/lang/pt/lang.php @@ -3,18 +3,19 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> * @author José Monteiro <Jose.Monteiro@DoWeDo-IT.com> * @author Enrico Nicoletto <liverig@gmail.com> * @author Fil <fil@meteopt.com> * @author André Neves <drakferion@gmail.com> - * @author José Campos zecarlosdecampos@gmail.com + * @author José Campos <zecarlosdecampos@gmail.com> */ -$lang['menu'] = 'Gestor de Reversões'; +$lang['menu'] = 'Gerenciador de Reversões'; $lang['filter'] = 'Pesquisar por páginas "spammy"'; -$lang['revert'] = 'Reverter páginas seleccionadas'; +$lang['revert'] = 'Reverter páginas selecionadas'; $lang['reverted'] = '%s revertida para revisão %s'; -$lang['removed'] = '%s removidas.'; +$lang['removed'] = '%s removidas'; $lang['revstart'] = 'Processo de reversão iniciado. A sua execução pode demorar. Se der timeout antes de terminar então é preciso escolher quantidades menores de páginas a reverter.'; $lang['revstop'] = 'Processo de reversão bem sucedido.'; -$lang['note1'] = 'Nota: a pesquisa é case-sensitive'; +$lang['note1'] = 'Nota: esta pesquisa é case-sensitive'; $lang['note2'] = 'Nota: a página será revertida para a versão anterior que não contém os termos spam pesquisados: <i>%s</i>.'; diff --git a/lib/plugins/revert/lang/ro/lang.php b/lib/plugins/revert/lang/ro/lang.php index 663447e6a..6fde325db 100644 --- a/lib/plugins/revert/lang/ro/lang.php +++ b/lib/plugins/revert/lang/ro/lang.php @@ -4,14 +4,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Sergiu Baltariu <s_baltariu@yahoo.com> - * @author s_baltariu@yahoo.com * @author Emanuel-Emeric Andrasi <n30@mandrivausers.ro> - * @author Emanuel-Emeric Andrași <n30@mandrivausers.ro> * @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro> - * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> - * @author Marius Olar <olarmariusalex@yahoo.com> - * @author Emanuel-Emeric Andrași <em.andrasi@mandrivausers.ro> */ $lang['menu'] = 'Manager Reveniri'; $lang['filter'] = 'Caută pagini cu posibil spam'; diff --git a/lib/plugins/revert/lang/ru/intro.txt b/lib/plugins/revert/lang/ru/intro.txt index 52d1f8d3d..93f8b8286 100644 --- a/lib/plugins/revert/lang/ru/intro.txt +++ b/lib/plugins/revert/lang/ru/intro.txt @@ -1,3 +1,3 @@ ====== Менеджер откаток ====== -Эта страница поможет вам в автоматической откатке изменений после спам-атаки. Для того, чтобы найти спам-страницы, введите ключевые слова и произведите поиск (например, по URL спамера). Затем убедитесь, что найденные страницы действительно содержат спам и сделайте откатку изменений. +Эта страница поможет вам в автоматической откатке изменений после спам-атаки. Для того чтобы найти спам-страницы, введите ключевые слова и произведите поиск (например, по URL спамера). Затем убедитесь, что найденные страницы действительно содержат спам и сделайте откатку изменений. diff --git a/lib/plugins/revert/lang/ru/lang.php b/lib/plugins/revert/lang/ru/lang.php index 5de67b470..3890db44b 100644 --- a/lib/plugins/revert/lang/ru/lang.php +++ b/lib/plugins/revert/lang/ru/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Denis Simakov <akinoame1@gmail.com> * @author Andrew Pleshakov <beotiger@mail.ru> * @author Змей Этерийский <evil_snake@eternion.ru> @@ -12,7 +13,6 @@ * @author Kirill Krasnov <krasnovforum@gmail.com> * @author Vlad Tsybenko <vlad.development@gmail.com> * @author Aleksey Osadchiy <rfc@nm.ru> - * @author Aleksandr Selivanov <alexgearbox@gmail.com> * @author Ladyko Andrey <fylh@succexy.spb.ru> * @author Eugene <windy.wanderer@gmail.com> * @author Johnny Utah <pcpa@cyberpunk.su> @@ -22,7 +22,7 @@ $lang['filter'] = 'Поиск спам-страниц'; $lang['revert'] = 'Откатить изменения для выбранных страниц'; $lang['reverted'] = '%s возвращена к версии %s'; $lang['removed'] = '%s удалена'; -$lang['revstart'] = 'Начат процесс откатки. Он может занять много времени. Если скрипт не успевает завершить работу и выдаёт ошибку, необходимо произвести откатку более маленькими частями.'; +$lang['revstart'] = 'Начат процесс откатки. Он может занять много времени. Если скрипт не успевает завершить работу и выдаёт ошибку, необходимо произвести откатку небольшими частями.'; $lang['revstop'] = 'Процесс откатки успешно завершён.'; $lang['note1'] = 'Замечание: поиск с учётом регистра'; $lang['note2'] = 'Замечание: страница будет восстановлена до последней версии, не содержащей спам-термин <i>%s</i>.'; diff --git a/lib/plugins/revert/lang/sr/lang.php b/lib/plugins/revert/lang/sr/lang.php index e0ac43971..2a3d9432d 100644 --- a/lib/plugins/revert/lang/sr/lang.php +++ b/lib/plugins/revert/lang/sr/lang.php @@ -3,8 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Иван Петровић petrovicivan@ubuntusrbija.org - * @author Ivan Petrovic <petrovicivan@ubuntusrbija.org> + * @author Иван Петровић <petrovicivan@ubuntusrbija.org> * @author Miroslav Šolti <solti.miroslav@gmail.com> */ $lang['menu'] = 'Управљач за враћање'; diff --git a/lib/plugins/revert/lang/th/lang.php b/lib/plugins/revert/lang/th/lang.php index 7b6217b7c..0df04c322 100644 --- a/lib/plugins/revert/lang/th/lang.php +++ b/lib/plugins/revert/lang/th/lang.php @@ -2,11 +2,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Komgrit Niyomrath <n.komgrit@gmail.com> - * @author Kittithat Arnontavilas mrtomyum@gmail.com - * @author Arthit Suriyawongkul <arthit@gmail.com> * @author Kittithat Arnontavilas <mrtomyum@gmail.com> + * @author Arthit Suriyawongkul <arthit@gmail.com> * @author Thanasak Sompaisansin <jombthep@gmail.com> */ $lang['menu'] = 'ตัวจัดการคืนสภาพเอกสารฉบับเดิม'; diff --git a/lib/plugins/revert/lang/tr/lang.php b/lib/plugins/revert/lang/tr/lang.php index 52d28c6fa..ca903cdac 100644 --- a/lib/plugins/revert/lang/tr/lang.php +++ b/lib/plugins/revert/lang/tr/lang.php @@ -2,12 +2,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aydın Coşkuner <aydinweb@gmail.com> * @author Cihan Kahveci <kahvecicihan@gmail.com> * @author Yavuz Selim <yavuzselim@gmail.com> * @author Caleb Maclennan <caleb@alerque.com> - * @author farukerdemoncel@gmail.com + * @author farukerdemoncel <farukerdemoncel@gmail.com> */ $lang['menu'] = 'Eskiye Döndürme'; $lang['filter'] = 'Spam bulunan sayfaları ara'; diff --git a/lib/plugins/revert/lang/vi/intro.txt b/lib/plugins/revert/lang/vi/intro.txt new file mode 100644 index 000000000..9b26a28bf --- /dev/null +++ b/lib/plugins/revert/lang/vi/intro.txt @@ -0,0 +1,3 @@ +====== Quản lý lùi sửa ====== + +Trang này giúp bạn hồi sửa tự động các cuộc spam tấn công. Để tìm danh sách các trang spam, trước tiên, hãy nhập chuỗi tìm kiếm (ví dụ: URL spam), sau đó xác nhận rằng các trang tìm thấy thực sự là spam và lùi lại các sửa đổi.
\ No newline at end of file diff --git a/lib/plugins/revert/lang/vi/lang.php b/lib/plugins/revert/lang/vi/lang.php new file mode 100644 index 000000000..eb86c66c0 --- /dev/null +++ b/lib/plugins/revert/lang/vi/lang.php @@ -0,0 +1,17 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['menu'] = 'Quản lý lùi sửa'; +$lang['filter'] = 'Tìm kiếm các trang spam'; +$lang['revert'] = 'Lùi sửa các trang đã chọn'; +$lang['reverted'] = 'Đã lùi sửa %s về phiên bản %s'; +$lang['removed'] = 'Đã xóa %s'; +$lang['revstart'] = 'Quá trình đảo ngược bắt đầu. Việc này có thể mất một thời gian. Nếu + kịch bản hết thời gian trước khi hoàn thành, bạn cần lùi sửa nhỏ hơn, đơn lẻ.'; +$lang['revstop'] = 'Quá trình đảo ngược kết thúc thành công.'; +$lang['note1'] = 'Lưu ý: tìm kiếm này là trường hợp nhạy cảm'; +$lang['note2'] = 'Lưu ý: trang sẽ được lùi sửa về phiên bản cuối cùng không chứa thuật ngữ spam đã cho <i>%s</i>.'; diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php index 9127f8df2..952d95c90 100644 --- a/lib/plugins/safefnrecode/action.php +++ b/lib/plugins/safefnrecode/action.php @@ -6,63 +6,63 @@ * @author Andreas Gohr <andi@splitbrain.org> */ -// must be run within Dokuwiki -if (!defined('DOKU_INC')) die(); - -require_once DOKU_PLUGIN.'action.php'; - -class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { - - public function register(Doku_Event_Handler $controller) { - - $controller->register_hook('INDEXER_TASKS_RUN', 'BEFORE', $this, 'handle_indexer_tasks_run'); +class action_plugin_safefnrecode extends DokuWiki_Action_Plugin +{ + /** @inheritdoc */ + public function register(Doku_Event_Handler $controller) + { + $controller->register_hook('INDEXER_TASKS_RUN', 'BEFORE', $this, 'handleIndexerTasksRun'); } - public function handle_indexer_tasks_run(Doku_Event &$event, $param) { + /** + * Handle indexer event + * + * @param Doku_Event $event + * @param $param + */ + public function handleIndexerTasksRun(Doku_Event $event, $param) + { global $conf; - if($conf['fnencode'] != 'safe') return; + if ($conf['fnencode'] != 'safe') return; - if(!file_exists($conf['datadir'].'_safefn.recoded')){ + if (!file_exists($conf['datadir'].'_safefn.recoded')) { $this->recode($conf['datadir']); touch($conf['datadir'].'_safefn.recoded'); } - if(!file_exists($conf['olddir'].'_safefn.recoded')){ + if (!file_exists($conf['olddir'].'_safefn.recoded')) { $this->recode($conf['olddir']); touch($conf['olddir'].'_safefn.recoded'); } - if(!file_exists($conf['metadir'].'_safefn.recoded')){ + if (!file_exists($conf['metadir'].'_safefn.recoded')) { $this->recode($conf['metadir']); touch($conf['metadir'].'_safefn.recoded'); } - if(!file_exists($conf['mediadir'].'_safefn.recoded')){ + if (!file_exists($conf['mediadir'].'_safefn.recoded')) { $this->recode($conf['mediadir']); touch($conf['mediadir'].'_safefn.recoded'); } - } /** * Recursive function to rename all safe encoded files to use the new * square bracket post indicator */ - private function recode($dir){ + private function recode($dir) + { $dh = opendir($dir); - if(!$dh) return; + if (!$dh) return; while (($file = readdir($dh)) !== false) { - if($file == '.' || $file == '..') continue; # cur and upper dir - if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse - if(strpos($file,'%') === false) continue; # no encoding used - $new = preg_replace('/(%[^\]]*?)\./','\1]',$file); # new post indicator - if(preg_match('/%[^\]]+$/',$new)) $new .= ']'; # fix end FS#2122 - rename("$dir/$file","$dir/$new"); # rename it + if ($file == '.' || $file == '..') continue; # cur and upper dir + if (is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse + if (strpos($file, '%') === false) continue; # no encoding used + $new = preg_replace('/(%[^\]]*?)\./', '\1]', $file); # new post indicator + if (preg_match('/%[^\]]+$/', $new)) $new .= ']'; # fix end FS#2122 + rename("$dir/$file", "$dir/$new"); # rename it } closedir($dh); } - } - -// vim:ts=4:sw=4:et: diff --git a/lib/plugins/styling/action.php b/lib/plugins/styling/action.php index 896e14bef..46245ca75 100644 --- a/lib/plugins/styling/action.php +++ b/lib/plugins/styling/action.php @@ -5,19 +5,8 @@ * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html * @author Andreas Gohr <andi@splitbrain.org> */ - -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -/** - * Class action_plugin_styling - * - * This handles all the save actions and loading the interface - * - * All this usually would be done within an admin plugin, but we want to have this available outside - * the admin interface using our floating dialog. - */ -class action_plugin_styling extends DokuWiki_Action_Plugin { +class action_plugin_styling extends DokuWiki_Action_Plugin +{ /** * Registers a callback functions @@ -25,8 +14,9 @@ class action_plugin_styling extends DokuWiki_Action_Plugin { * @param Doku_Event_Handler $controller DokuWiki's event controller object * @return void */ - public function register(Doku_Event_Handler $controller) { - $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_header'); + public function register(Doku_Event_Handler $controller) + { + $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handleHeader'); } /** @@ -37,24 +27,25 @@ class action_plugin_styling extends DokuWiki_Action_Plugin { * handler was registered] * @return void */ - public function handle_header(Doku_Event &$event, $param) { + public function handleHeader(Doku_Event &$event, $param) + { global $ACT; global $INPUT; - if($ACT != 'admin' || $INPUT->str('page') != 'styling') return; - if(!auth_isadmin()) return; + if ($ACT != 'admin' || $INPUT->str('page') != 'styling') return; + /** @var admin_plugin_styling $admin */ + $admin = plugin_load('admin', 'styling'); + if (!$admin->isAccessibleByCurrentUser()) return; // set preview $len = count($event->data['link']); - for($i = 0; $i < $len; $i++) { - if( - $event->data['link'][$i]['rel'] == 'stylesheet' && + for ($i = 0; $i < $len; $i++) { + if ($event->data['link'][$i]['rel'] == 'stylesheet' && strpos($event->data['link'][$i]['href'], 'lib/exe/css.php') !== false ) { $event->data['link'][$i]['href'] .= '&preview=1&tseed='.time(); } } } - } // vim:ts=4:sw=4:et: diff --git a/lib/plugins/styling/admin.php b/lib/plugins/styling/admin.php index 055ac2279..70c0572ea 100644 --- a/lib/plugins/styling/admin.php +++ b/lib/plugins/styling/admin.php @@ -5,45 +5,46 @@ * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html * @author Andreas Gohr <andi@splitbrain.org> */ - -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -class admin_plugin_styling extends DokuWiki_Admin_Plugin { +class admin_plugin_styling extends DokuWiki_Admin_Plugin +{ public $ispopup = false; /** * @return int sort number in admin menu */ - public function getMenuSort() { + public function getMenuSort() + { return 1000; } /** * @return bool true if only access for superuser, false is for superusers and moderators */ - public function forAdminOnly() { + public function forAdminOnly() + { return true; } /** * handle the different actions (also called from ajax) */ - public function handle() { + public function handle() + { global $INPUT; $run = $INPUT->extract('run')->str('run'); - if(!$run) return; - $run = "run_$run"; + if (!$run) return; + $run = 'run'.ucfirst($run); $this->$run(); } /** * Render HTML output, e.g. helpful text and a form */ - public function html() { + public function html() + { $class = 'nopopup'; - if($this->ispopup) $class = 'ispopup page'; + if ($this->ispopup) $class = 'ispopup page'; echo '<div id="plugin__styling" class="'.$class.'">'; ptln('<h1>'.$this->getLang('menu').'</h1>'); @@ -54,21 +55,22 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { /** * Create the actual editing form */ - public function form() { + public function form() + { global $conf; global $ID; - $styleUtil = new \dokuwiki\StyleUtils(); - $styleini = $styleUtil->cssStyleini($conf['template'], true); + $styleUtil = new \dokuwiki\StyleUtils($conf['template'], true); + $styleini = $styleUtil->cssStyleini(); $replacements = $styleini['replacements']; - if($this->ispopup) { + if ($this->ispopup) { $target = DOKU_BASE.'lib/plugins/styling/popup.php'; } else { $target = wl($ID, array('do' => 'admin', 'page' => 'styling')); } - if(empty($replacements)) { + if (empty($replacements)) { echo '<p class="error">'.$this->getLang('error').'</p>'; } else { echo $this->locale_xhtml('intro'); @@ -76,21 +78,24 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { echo '<form class="styling" method="post" action="'.$target.'">'; echo '<table><tbody>'; - foreach($replacements as $key => $value) { + foreach ($replacements as $key => $value) { $name = tpl_getLang($key); - if(empty($name)) $name = $this->getLang($key); - if(empty($name)) $name = $key; + if (empty($name)) $name = $this->getLang($key); + if (empty($name)) $name = $key; echo '<tr>'; echo '<td><label for="tpl__'.hsc($key).'">'.$name.'</label></td>'; - echo '<td><input type="text" name="tpl['.hsc($key).']" id="tpl__'.hsc($key).'" value="'.hsc($value).'" '.$this->colorClass($key).' dir="ltr" /></td>'; + echo '<td><input type="'.$this->colorType($key).'" name="tpl['.hsc($key).']" id="tpl__'.hsc($key).'" + value="'.hsc($value).'" dir="ltr" /></td>'; echo '</tr>'; } echo '</tbody></table>'; echo '<p>'; - echo '<button type="submit" name="run[preview]" class="btn_preview primary">'.$this->getLang('btn_preview').'</button> '; - echo '<button type="submit" name="run[reset]">'.$this->getLang('btn_reset').'</button>'; #FIXME only if preview.ini exists + echo '<button type="submit" name="run[preview]" class="btn_preview primary">'. + $this->getLang('btn_preview').'</button> '; + #FIXME only if preview.ini exists: + echo '<button type="submit" name="run[reset]">'.$this->getLang('btn_reset').'</button>'; echo '</p>'; echo '<p>'; @@ -98,20 +103,24 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { echo '</p>'; echo '<p>'; - echo '<button type="submit" name="run[revert]">'.$this->getLang('btn_revert').'</button>'; #FIXME only if local.ini exists + #FIXME only if local.ini exists: + echo '<button type="submit" name="run[revert]">'.$this->getLang('btn_revert').'</button>'; echo '</p>'; echo '</form>'; echo tpl_locale_xhtml('style'); - } } /** - * set the color class attribute + * Decide the input type based on the key name + * + * @param string $key + * @return string color|text */ - protected function colorClass($key) { + protected function colorType($key) + { static $colors = array( 'text', 'background', @@ -127,17 +136,18 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { 'missing', ); - if(preg_match('/colou?r/', $key) || in_array(trim($key,'_'), $colors)) { - return 'class="color"'; + if (preg_match('/colou?r/', $key) || in_array(trim($key, '_'), $colors)) { + return 'color'; } else { - return ''; + return 'text'; } } /** * saves the preview.ini (alos called from ajax directly) */ - public function run_preview() { + public function runPreview() + { global $conf; $ini = $conf['cachedir'].'/preview.ini'; io_saveFile($ini, $this->makeini()); @@ -146,7 +156,8 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { /** * deletes the preview.ini */ - protected function run_reset() { + protected function runReset() + { global $conf; $ini = $conf['cachedir'].'/preview.ini'; io_saveFile($ini, ''); @@ -155,17 +166,19 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { /** * deletes the local style.ini replacements */ - protected function run_revert() { - $this->replaceini(''); - $this->run_reset(); + protected function runRevert() + { + $this->replaceIni(''); + $this->runReset(); } /** * save the local style.ini replacements */ - protected function run_save() { - $this->replaceini($this->makeini()); - $this->run_reset(); + protected function runSave() + { + $this->replaceIni($this->makeini()); + $this->runReset(); } /** @@ -173,13 +186,14 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { * * @return string */ - protected function makeini() { + protected function makeini() + { global $INPUT; $ini = "[replacements]\n"; $ini .= ";These overwrites have been generated from the Template styling Admin interface\n"; $ini .= ";Any values in this section will be overwritten by that tool again\n"; - foreach($INPUT->arr('tpl') as $key => $val) { + foreach ($INPUT->arr('tpl') as $key => $val) { $ini .= $key.' = "'.addslashes($val).'"'."\n"; } @@ -191,10 +205,11 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { * * @param string $new the new ini contents */ - protected function replaceini($new) { + protected function replaceIni($new) + { global $conf; $ini = DOKU_CONF."tpl/".$conf['template']."/style.ini"; - if(file_exists($ini)) { + if (file_exists($ini)) { $old = io_readFile($ini); $old = preg_replace('/\[replacements\]\n.*?(\n\[.*]|$)/s', '\\1', $old); $old = trim($old); @@ -205,7 +220,6 @@ class admin_plugin_styling extends DokuWiki_Admin_Plugin { io_makeFileDir($ini); io_saveFile($ini, "$old\n\n$new"); } - } // vim:ts=4:sw=4:et: diff --git a/lib/plugins/styling/iris.js b/lib/plugins/styling/iris.js deleted file mode 100644 index 4eda5022e..000000000 --- a/lib/plugins/styling/iris.js +++ /dev/null @@ -1,1488 +0,0 @@ -/*! Iris Color Picker - v1.0.7 - 2014-11-28 -* https://github.com/Automattic/Iris -* Copyright (c) 2014 Matt Wiebe; Licensed GPLv2 */ -(function( $, undef ){ - var _html, nonGradientIE, gradientType, vendorPrefixes, _css, Iris, UA, isIE, IEVersion; - - _html = '<div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="#"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div>'; - _css = '.iris-picker{display:block;position:relative}.iris-picker,.iris-picker *{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input+.iris-picker{margin-top:4px}.iris-error{background-color:#ffafaf}.iris-border{border-radius:3px;border:1px solid #aaa;width:200px;background-color:#fff}.iris-picker-inner{position:absolute;top:0;right:0;left:0;bottom:0}.iris-border .iris-picker-inner{top:10px;right:10px;left:10px;bottom:10px}.iris-picker .iris-square-inner{position:absolute;left:0;right:0;top:0;bottom:0}.iris-picker .iris-square,.iris-picker .iris-slider,.iris-picker .iris-square-inner,.iris-picker .iris-palette{border-radius:3px;box-shadow:inset 0 0 5px rgba(0,0,0,.4);height:100%;width:12.5%;float:left;margin-right:5%}.iris-picker .iris-square{width:76%;margin-right:10%;position:relative}.iris-picker .iris-square-inner{width:auto;margin:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-square-inner,.iris-ie-9 .iris-palette{box-shadow:none;border-radius:0}.iris-ie-9 .iris-square,.iris-ie-9 .iris-slider,.iris-ie-9 .iris-palette{outline:1px solid rgba(0,0,0,.1)}.iris-ie-lt9 .iris-square,.iris-ie-lt9 .iris-slider,.iris-ie-lt9 .iris-square-inner,.iris-ie-lt9 .iris-palette{outline:1px solid #aaa}.iris-ie-lt9 .iris-square .ui-slider-handle{outline:1px solid #aaa;background-color:#fff;-ms-filter:"alpha(Opacity=30)"}.iris-ie-lt9 .iris-square .iris-square-handle{background:0;border:3px solid #fff;-ms-filter:"alpha(Opacity=50)"}.iris-picker .iris-strip{margin-right:0;position:relative}.iris-picker .iris-strip .ui-slider-handle{position:absolute;background:0;margin:0;right:-3px;left:-3px;border:4px solid #aaa;border-width:4px 3px;width:auto;height:6px;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);opacity:.9;z-index:5;cursor:ns-resize}.iris-strip .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.iris-picker .iris-slider-offset{position:absolute;top:11px;left:0;right:0;bottom:-3px;width:auto;height:auto;background:transparent;border:0;border-radius:0}.iris-picker .iris-square-handle{background:transparent;border:5px solid #aaa;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.iris-picker .iris-square-handle:hover{border-color:#999}.iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.iris-picker .iris-square-handle:hover::after{border-color:#fff}.iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.iris-palette-container{position:absolute;bottom:0;left:0;margin:0;padding:0}.iris-border .iris-palette-container{left:10px;bottom:10px}.iris-picker .iris-palette{margin:0;cursor:pointer}.iris-square-handle,.ui-slider-handle{border:0;outline:0}'; - - // Even IE9 dosen't support gradients. Elaborate sigh. - UA = navigator.userAgent.toLowerCase(); - isIE = navigator.appName === 'Microsoft Internet Explorer'; - IEVersion = isIE ? parseFloat( UA.match( /msie ([0-9]{1,}[\.0-9]{0,})/ )[1] ) : 0; - nonGradientIE = ( isIE && IEVersion < 10 ); - gradientType = false; - - // we don't bother with an unprefixed version, as it has a different syntax - vendorPrefixes = [ '-moz-', '-webkit-', '-o-', '-ms-' ]; - - // Bail for IE <= 7 - if ( nonGradientIE && IEVersion <= 7 ) { - $.fn.iris = $.noop; - $.support.iris = false; - return; - } - - $.support.iris = true; - - function testGradientType() { - var el, base, - bgImageString = 'backgroundImage'; - - if ( nonGradientIE ) { - gradientType = 'filter'; - } - else { - el = $( '<div id="iris-gradtest" />' ); - base = 'linear-gradient(top,#fff,#000)'; - $.each( vendorPrefixes, function( i, val ){ - el.css( bgImageString, val + base ); - if ( el.css( bgImageString ).match( 'gradient' ) ) { - gradientType = i; - return false; - } - }); - // check for legacy webkit gradient syntax - if ( gradientType === false ) { - el.css( 'background', '-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))' ); - if ( el.css( bgImageString ).match( 'gradient' ) ) { - gradientType = 'webkit'; - } - } - el.remove(); - } - - } - - /** - * Only for CSS3 gradients. oldIE will use a separate function. - * - * Accepts as many color stops as necessary from 2nd arg on, or 2nd - * arg can be an array of color stops - * - * @param {string} origin Gradient origin - top or left, defaults to left. - * @return {string} Appropriate CSS3 gradient string for use in - */ - function createGradient( origin, stops ) { - origin = ( origin === 'top' ) ? 'top' : 'left'; - stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 ); - if ( gradientType === 'webkit' ) { - return legacyWebkitGradient( origin, stops ); - } else { - return vendorPrefixes[ gradientType ] + 'linear-gradient(' + origin + ', ' + stops.join(', ') + ')'; - } - } - - /** - * Stupid gradients for a stupid browser. - */ - function stupidIEGradient( origin, stops ) { - var type, self, lastIndex, filter, startPosProp, endPosProp, dimensionProp, template, html; - - origin = ( origin === 'top' ) ? 'top' : 'left'; - stops = $.isArray( stops ) ? stops : Array.prototype.slice.call( arguments, 1 ); - // 8 hex: AARRGGBB - // GradientType: 0 vertical, 1 horizontal - type = ( origin === 'top' ) ? 0 : 1; - self = $( this ); - lastIndex = stops.length - 1; - filter = 'filter'; - startPosProp = ( type === 1 ) ? 'left' : 'top'; - endPosProp = ( type === 1 ) ? 'right' : 'bottom'; - dimensionProp = ( type === 1 ) ? 'height' : 'width'; - template = '<div class="iris-ie-gradient-shim" style="position:absolute;' + dimensionProp + ':100%;' + startPosProp + ':%start%;' + endPosProp + ':%end%;' + filter + ':%filter%;" data-color:"%color%"></div>'; - html = ''; - // need a positioning context - if ( self.css('position') === 'static' ) { - self.css( {position: 'relative' } ); - } - - stops = fillColorStops( stops ); - $.each(stops, function( i, startColor ) { - var endColor, endStop, filterVal; - - // we want two at a time. if we're on the last pair, bail. - if ( i === lastIndex ) { - return false; - } - - endColor = stops[ i + 1 ]; - //if our pairs are at the same color stop, moving along. - if ( startColor.stop === endColor.stop ) { - return; - } - - endStop = 100 - parseFloat( endColor.stop ) + '%'; - startColor.octoHex = new Color( startColor.color ).toIEOctoHex(); - endColor.octoHex = new Color( endColor.color ).toIEOctoHex(); - - filterVal = 'progid:DXImageTransform.Microsoft.Gradient(GradientType=' + type + ', StartColorStr=\'' + startColor.octoHex + '\', EndColorStr=\'' + endColor.octoHex + '\')'; - html += template.replace( '%start%', startColor.stop ).replace( '%end%', endStop ).replace( '%filter%', filterVal ); - }); - self.find( '.iris-ie-gradient-shim' ).remove(); - $( html ).prependTo( self ); - } - - function legacyWebkitGradient( origin, colorList ) { - var stops = []; - origin = ( origin === 'top' ) ? '0% 0%,0% 100%,' : '0% 100%,100% 100%,'; - colorList = fillColorStops( colorList ); - $.each( colorList, function( i, val ){ - stops.push( 'color-stop(' + ( parseFloat( val.stop ) / 100 ) + ', ' + val.color + ')' ); - }); - return '-webkit-gradient(linear,' + origin + stops.join(',') + ')'; - } - - function fillColorStops( colorList ) { - var colors = [], - percs = [], - newColorList = [], - lastIndex = colorList.length - 1; - - $.each( colorList, function( index, val ) { - var color = val, - perc = false, - match = val.match( /1?[0-9]{1,2}%$/ ); - - if ( match ) { - color = val.replace( /\s?1?[0-9]{1,2}%$/, '' ); - perc = match.shift(); - } - colors.push( color ); - percs.push( perc ); - }); - - // back fill first and last - if ( percs[0] === false ) { - percs[0] = '0%'; - } - - if ( percs[lastIndex] === false ) { - percs[lastIndex] = '100%'; - } - - percs = backFillColorStops( percs ); - - $.each( percs, function( i ){ - newColorList[i] = { color: colors[i], stop: percs[i] }; - }); - return newColorList; - } - - function backFillColorStops( stops ) { - var first = 0, - last = stops.length - 1, - i = 0, - foundFirst = false, - incr, - steps, - step, - firstVal; - - if ( stops.length <= 2 || $.inArray( false, stops ) < 0 ) { - return stops; - } - while ( i < stops.length - 1 ) { - if ( ! foundFirst && stops[i] === false ) { - first = i - 1; - foundFirst = true; - } else if ( foundFirst && stops[i] !== false ) { - last = i; - i = stops.length; - } - i++; - } - steps = last - first; - firstVal = parseInt( stops[first].replace('%'), 10 ); - incr = ( parseFloat( stops[last].replace('%') ) - firstVal ) / steps; - i = first + 1; - step = 1; - while ( i < last ) { - stops[i] = ( firstVal + ( step * incr ) ) + '%'; - step++; - i++; - } - return backFillColorStops( stops ); - } - - $.fn.gradient = function() { - var args = arguments; - return this.each( function() { - // this'll be oldishIE - if ( nonGradientIE ) { - stupidIEGradient.apply( this, args ); - } else { - // new hotness - $( this ).css( 'backgroundImage', createGradient.apply( this, args ) ); - } - }); - }; - - $.fn.raninbowGradient = function( origin, args ) { - var opts, template, i, steps; - - origin = origin || 'top'; - opts = $.extend( {}, { s: 100, l: 50 }, args ); - template = 'hsl(%h%,' + opts.s + '%,' + opts.l + '%)'; - i = 0; - steps = []; - while ( i <= 360 ) { - steps.push( template.replace('%h%', i) ); - i += 30; - } - return this.each(function() { - $(this).gradient( origin, steps ); - }); - }; - - // the colorpicker widget def. - Iris = { - options: { - color: false, - mode: 'hsl', - controls: { - horiz: 's', // horizontal defaults to saturation - vert: 'l', // vertical defaults to lightness - strip: 'h' // right strip defaults to hue - }, - hide: true, // hide the color picker by default - border: true, // draw a border around the collection of UI elements - target: false, // a DOM element / jQuery selector that the element will be appended within. Only used when called on an input. - width: 200, // the width of the collection of UI elements - palettes: false // show a palette of basic colors beneath the square. - }, - _color: '', - _palettes: [ '#000', '#fff', '#d33', '#d93', '#ee2', '#81d742', '#1e73be', '#8224e3' ], - _inited: false, - _defaultHSLControls: { - horiz: 's', - vert: 'l', - strip: 'h' - }, - _defaultHSVControls: { - horiz: 'h', - vert: 'v', - strip: 's' - }, - _scale: { - h: 360, - s: 100, - l: 100, - v: 100 - }, - _create: function() { - var self = this, - el = self.element, - color = self.options.color || el.val(); - - if ( gradientType === false ) { - testGradientType(); - } - - if ( el.is( 'input' ) ) { - if ( self.options.target ) { - self.picker = $( _html ).appendTo( self.options.target ); - } else { - self.picker = $( _html ).insertAfter( el ); - } - - self._addInputListeners( el ); - } else { - el.append( _html ); - self.picker = el.find( '.iris-picker' ); - } - - // Browsers / Versions - // Feature detection doesn't work for these, and $.browser is deprecated - if ( isIE ) { - if ( IEVersion === 9 ) { - self.picker.addClass( 'iris-ie-9' ); - } else if ( IEVersion <= 8 ) { - self.picker.addClass( 'iris-ie-lt9' ); - } - } else if ( UA.indexOf('compatible') < 0 && UA.indexOf('khtml') < 0 && UA.match( /mozilla/ ) ) { - self.picker.addClass( 'iris-mozilla' ); - } - - if ( self.options.palettes ) { - self._addPalettes(); - } - - self._color = new Color( color ).setHSpace( self.options.mode ); - self.options.color = self._color.toString(); - - // prep 'em for re-use - self.controls = { - square: self.picker.find( '.iris-square' ), - squareDrag: self.picker.find( '.iris-square-value' ), - horiz: self.picker.find( '.iris-square-horiz' ), - vert: self.picker.find( '.iris-square-vert' ), - strip: self.picker.find( '.iris-strip' ), - stripSlider: self.picker.find( '.iris-strip .iris-slider-offset' ) - }; - - // small sanity check - if we chose hsv, change default controls away from hsl - if ( self.options.mode === 'hsv' && self._has('l', self.options.controls) ) { - self.options.controls = self._defaultHSVControls; - } else if ( self.options.mode === 'hsl' && self._has('v', self.options.controls) ) { - self.options.controls = self._defaultHSLControls; - } - - // store it. HSL gets squirrely - self.hue = self._color.h(); - - if ( self.options.hide ) { - self.picker.hide(); - } - - if ( self.options.border ) { - self.picker.addClass( 'iris-border' ); - } - - self._initControls(); - self.active = 'external'; - self._dimensions(); - self._change(); - }, - _has: function(needle, haystack) { - var ret = false; - $.each(haystack, function(i,v){ - if ( needle === v ) { - ret = true; - // exit the loop - return false; - } - }); - return ret; - }, - _addPalettes: function () { - var container = $( '<div class="iris-palette-container" />' ), - palette = $( '<a class="iris-palette" tabindex="0" />' ), - colors = $.isArray( this.options.palettes ) ? this.options.palettes : this._palettes; - - // do we have an existing container? Empty and reuse it. - if ( this.picker.find( '.iris-palette-container' ).length ) { - container = this.picker.find( '.iris-palette-container' ).detach().html( '' ); - } - - $.each(colors, function(index, val) { - palette.clone().data( 'color', val ) - .css( 'backgroundColor', val ).appendTo( container ) - .height( 10 ).width( 10 ); - }); - - this.picker.append(container); - }, - _paint: function() { - var self = this; - self._paintDimension( 'top', 'strip' ); - self._paintDimension( 'top', 'vert' ); - self._paintDimension( 'left', 'horiz' ); - }, - _paintDimension: function( origin, control ) { - var self = this, - c = self._color, - mode = self.options.mode, - color = self._getHSpaceColor(), - target = self.controls[ control ], - controlOpts = self.options.controls, - stops; - - // don't paint the active control - if ( control === self.active || ( self.active === 'square' && control !== 'strip' ) ) { - return; - } - - switch ( controlOpts[ control ] ) { - case 'h': - if ( mode === 'hsv' ) { - color = c.clone(); - switch ( control ) { - case 'horiz': - color[controlOpts.vert](100); - break; - case 'vert': - color[controlOpts.horiz](100); - break; - case 'strip': - color.setHSpace('hsl'); - break; - } - stops = color.toHsl(); - } else { - if ( control === 'strip' ) { - stops = { s: color.s, l: color.l }; - } else { - stops = { s: 100, l: color.l }; - } - } - - target.raninbowGradient( origin, stops ); - break; - case 's': - if ( mode === 'hsv' ) { - if ( control === 'vert' ) { - stops = [ c.clone().a(0).s(0).toCSS('rgba'), c.clone().a(1).s(0).toCSS('rgba') ]; - } else if ( control === 'strip' ) { - stops = [ c.clone().s(100).toCSS('hsl'), c.clone().s(0).toCSS('hsl') ]; - } else if ( control === 'horiz' ) { - stops = [ '#fff', 'hsl(' + color.h + ',100%,50%)' ]; - } - } else { // implicit mode === 'hsl' - if ( control === 'vert' && self.options.controls.horiz === 'h' ) { - stops = ['hsla(0, 0%, ' + color.l + '%, 0)', 'hsla(0, 0%, ' + color.l + '%, 1)']; - } else { - stops = ['hsl('+ color.h +',0%,50%)', 'hsl(' + color.h + ',100%,50%)']; - } - } - - - target.gradient( origin, stops ); - break; - case 'l': - if ( control === 'strip' ) { - stops = ['hsl(' + color.h + ',100%,100%)', 'hsl(' + color.h + ', ' + color.s + '%,50%)', 'hsl('+ color.h +',100%,0%)']; - } else { - stops = ['#fff', 'rgba(255,255,255,0) 50%', 'rgba(0,0,0,0) 50%', 'rgba(0,0,0,1)']; - } - target.gradient( origin, stops ); - break; - case 'v': - if ( control === 'strip' ) { - stops = [ c.clone().v(100).toCSS(), c.clone().v(0).toCSS() ]; - } else { - stops = ['rgba(0,0,0,0)', '#000']; - } - target.gradient( origin, stops ); - break; - default: - break; - } - }, - - _getHSpaceColor: function() { - return ( this.options.mode === 'hsv' ) ? this._color.toHsv() : this._color.toHsl(); - }, - - _dimensions: function( reset ) { - // whatever size - var self = this, - opts = self.options, - controls = self.controls, - square = controls.square, - strip = self.picker.find( '.iris-strip' ), - squareWidth = '77.5%', - stripWidth = '12%', - totalPadding = 20, - innerWidth = opts.border ? opts.width - totalPadding : opts.width, - controlsHeight, - paletteCount = $.isArray( opts.palettes ) ? opts.palettes.length : self._palettes.length, - paletteMargin, paletteWidth, paletteContainerWidth; - - if ( reset ) { - square.css( 'width', '' ); - strip.css( 'width', '' ); - self.picker.css( {width: '', height: ''} ); - } - - squareWidth = innerWidth * ( parseFloat( squareWidth ) / 100 ); - stripWidth = innerWidth * ( parseFloat( stripWidth ) / 100 ); - controlsHeight = opts.border ? squareWidth + totalPadding : squareWidth; - - square.width( squareWidth ).height( squareWidth ); - strip.height( squareWidth ).width( stripWidth ); - self.picker.css( { width: opts.width, height: controlsHeight } ); - - if ( ! opts.palettes ) { - return self.picker.css( 'paddingBottom', '' ); - } - - // single margin at 2% - paletteMargin = squareWidth * 2 / 100; - paletteContainerWidth = squareWidth - ( ( paletteCount - 1 ) * paletteMargin ); - paletteWidth = paletteContainerWidth / paletteCount; - self.picker.find('.iris-palette').each( function( i ) { - var margin = i === 0 ? 0 : paletteMargin; - $( this ).css({ - width: paletteWidth, - height: paletteWidth, - marginLeft: margin - }); - }); - self.picker.css( 'paddingBottom', paletteWidth + paletteMargin ); - strip.height( paletteWidth + paletteMargin + squareWidth ); - }, - - _addInputListeners: function( input ) { - var self = this, - debounceTimeout = 100, - callback = function( event ){ - var color = new Color( input.val() ), - val = input.val().replace( /^#/, '' ); - - input.removeClass( 'iris-error' ); - // we gave a bad color - if ( color.error ) { - // don't error on an empty input - we want those allowed - if ( val !== '' ) { - input.addClass( 'iris-error' ); - } - } else { - if ( color.toString() !== self._color.toString() ) { - // let's not do this on keyup for hex shortcodes - if ( ! ( event.type === 'keyup' && val.match( /^[0-9a-fA-F]{3}$/ ) ) ) { - self._setOption( 'color', color.toString() ); - } - } - } - }; - - input.on( 'change', callback ).on( 'keyup', self._debounce( callback, debounceTimeout ) ); - - // If we initialized hidden, show on first focus. The rest is up to you. - if ( self.options.hide ) { - input.one( 'focus', function() { - self.show(); - }); - } - }, - - _initControls: function() { - var self = this, - controls = self.controls, - square = controls.square, - controlOpts = self.options.controls, - stripScale = self._scale[controlOpts.strip]; - - controls.stripSlider.slider({ - orientation: 'vertical', - max: stripScale, - slide: function( event, ui ) { - self.active = 'strip'; - // "reverse" for hue. - if ( controlOpts.strip === 'h' ) { - ui.value = stripScale - ui.value; - } - - self._color[controlOpts.strip]( ui.value ); - self._change.apply( self, arguments ); - } - }); - - controls.squareDrag.draggable({ - containment: controls.square.find( '.iris-square-inner' ), - zIndex: 1000, - cursor: 'move', - drag: function( event, ui ) { - self._squareDrag( event, ui ); - }, - start: function() { - square.addClass( 'iris-dragging' ); - $(this).addClass( 'ui-state-focus' ); - }, - stop: function() { - square.removeClass( 'iris-dragging' ); - $(this).removeClass( 'ui-state-focus' ); - } - }).on( 'mousedown mouseup', function( event ) { - var focusClass = 'ui-state-focus'; - event.preventDefault(); - if (event.type === 'mousedown' ) { - self.picker.find( '.' + focusClass ).removeClass( focusClass ).blur(); - $(this).addClass( focusClass ).focus(); - } else { - $(this).removeClass( focusClass ); - } - }).on( 'keydown', function( event ) { - var container = controls.square, - draggable = controls.squareDrag, - position = draggable.position(), - distance = self.options.width / 100; // Distance in pixels the draggable should be moved: 1 "stop" - - // make alt key go "10" - if ( event.altKey ) { - distance *= 10; - } - - // Reposition if one of the directional keys is pressed - switch ( event.keyCode ) { - case 37: position.left -= distance; break; // Left - case 38: position.top -= distance; break; // Up - case 39: position.left += distance; break; // Right - case 40: position.top += distance; break; // Down - default: return true; // Exit and bubble - } - - // Keep draggable within container - position.left = Math.max( 0, Math.min( position.left, container.width() ) ); - position.top = Math.max( 0, Math.min( position.top, container.height() ) ); - - draggable.css(position); - self._squareDrag( event, { position: position }); - event.preventDefault(); - }); - - // allow clicking on the square to move there and keep dragging - square.mousedown( function( event ) { - var squareOffset, pos; - // only left click - if ( event.which !== 1 ) { - return; - } - - // prevent bubbling from the handle: no infinite loops - if ( ! $( event.target ).is( 'div' ) ) { - return; - } - - squareOffset = self.controls.square.offset(); - pos = { - top: event.pageY - squareOffset.top, - left: event.pageX - squareOffset.left - }; - event.preventDefault(); - self._squareDrag( event, { position: pos } ); - event.target = self.controls.squareDrag.get(0); - self.controls.squareDrag.css( pos ).trigger( event ); - }); - - // palettes - if ( self.options.palettes ) { - self._paletteListeners(); - } - }, - - _paletteListeners: function() { - var self = this; - self.picker.find('.iris-palette-container').on('click.palette', '.iris-palette', function() { - self._color.fromCSS( $(this).data('color') ); - self.active = 'external'; - self._change(); - }).on( 'keydown.palette', '.iris-palette', function( event ) { - if ( ! ( event.keyCode === 13 || event.keyCode === 32 ) ) { - return true; - } - event.stopPropagation(); - $( this ).click(); - }); - }, - - _squareDrag: function( event, ui ) { - var self = this, - controlOpts = self.options.controls, - dimensions = self._squareDimensions(), - vertVal = Math.round( ( dimensions.h - ui.position.top ) / dimensions.h * self._scale[controlOpts.vert] ), - horizVal = self._scale[controlOpts.horiz] - Math.round( ( dimensions.w - ui.position.left ) / dimensions.w * self._scale[controlOpts.horiz] ); - - self._color[controlOpts.horiz]( horizVal )[controlOpts.vert]( vertVal ); - - self.active = 'square'; - self._change.apply( self, arguments ); - }, - - _setOption: function( key, value ) { - var self = this, - oldValue = self.options[key], - doDimensions = false, - hexLessColor, - newColor, - method; - - // ensure the new value is set. We can reset to oldValue if some check wasn't met. - self.options[key] = value; - - switch(key) { - case 'color': - // cast to string in case we have a number - value = '' + value; - hexLessColor = value.replace( /^#/, '' ); - newColor = new Color( value ).setHSpace( self.options.mode ); - if ( newColor.error ) { - self.options[key] = oldValue; - } else { - self._color = newColor; - self.options.color = self.options[key] = self._color.toString(); - self.active = 'external'; - self._change(); - } - break; - case 'palettes': - doDimensions = true; - - if ( value ) { - self._addPalettes(); - } else { - self.picker.find('.iris-palette-container').remove(); - } - - // do we need to add events? - if ( ! oldValue ) { - self._paletteListeners(); - } - break; - case 'width': - doDimensions = true; - break; - case 'border': - doDimensions = true; - method = value ? 'addClass' : 'removeClass'; - self.picker[method]('iris-border'); - break; - case 'mode': - case 'controls': - // if nothing's changed, let's bail, since this causes re-rendering the whole widget - if ( oldValue === value ) { - return; - } - - // we're using these poorly named variables because they're already scoped. - // method is the element that Iris was called on. oldValue will be the options - method = self.element; - oldValue = self.options; - oldValue.hide = ! self.picker.is( ':visible' ); - self.destroy(); - self.picker.remove(); - return $(self.element).iris(oldValue); - } - - // Do we need to recalc dimensions? - if ( doDimensions ) { - self._dimensions(true); - } - }, - - _squareDimensions: function( forceRefresh ) { - var square = this.controls.square, - dimensions, - control; - - if ( forceRefresh !== undef && square.data('dimensions') ) { - return square.data('dimensions'); - } - - control = this.controls.squareDrag; - dimensions = { - w: square.width(), - h: square.height() - }; - square.data( 'dimensions', dimensions ); - return dimensions; - }, - - _isNonHueControl: function( active, type ) { - if ( active === 'square' && this.options.controls.strip === 'h' ) { - return true; - } else if ( type === 'external' || ( type === 'h' && active === 'strip' ) ) { - return false; - } - - return true; - }, - - _change: function() { - var self = this, - controls = self.controls, - color = self._getHSpaceColor(), - actions = [ 'square', 'strip' ], - controlOpts = self.options.controls, - type = controlOpts[self.active] || 'external', - oldHue = self.hue; - - if ( self.active === 'strip' ) { - // take no action on any of the square sliders if we adjusted the strip - actions = []; - } else if ( self.active !== 'external' ) { - // for non-strip, non-external, strip should never change - actions.pop(); // conveniently the last item - } - - $.each( actions, function(index, item) { - var value, dimensions, cssObj; - if ( item !== self.active ) { - switch ( item ) { - case 'strip': - // reverse for hue - value = ( controlOpts.strip === 'h' ) ? self._scale[controlOpts.strip] - color[controlOpts.strip] : color[controlOpts.strip]; - controls.stripSlider.slider( 'value', value ); - break; - case 'square': - dimensions = self._squareDimensions(); - cssObj = { - left: color[controlOpts.horiz] / self._scale[controlOpts.horiz] * dimensions.w, - top: dimensions.h - ( color[controlOpts.vert] / self._scale[controlOpts.vert] * dimensions.h ) - }; - - self.controls.squareDrag.css( cssObj ); - break; - } - } - }); - - // Ensure that we don't change hue if we triggered a hue reset - if ( color.h !== oldHue && self._isNonHueControl( self.active, type ) ) { - self._color.h(oldHue); - } - - // store hue for repeating above check next time - self.hue = self._color.h(); - - self.options.color = self._color.toString(); - - // only run after the first time - if ( self._inited ) { - self._trigger( 'change', { type: self.active }, { color: self._color } ); - } - - if ( self.element.is( ':input' ) && ! self._color.error ) { - self.element.removeClass( 'iris-error' ); - if ( self.element.val() !== self._color.toString() ) { - self.element.val( self._color.toString() ); - } - } - - self._paint(); - self._inited = true; - self.active = false; - }, - // taken from underscore.js _.debounce method - _debounce: function( func, wait, immediate ) { - var timeout, result; - return function() { - var context = this, - args = arguments, - later, - callNow; - - later = function() { - timeout = null; - if ( ! immediate) { - result = func.apply( context, args ); - } - }; - - callNow = immediate && !timeout; - clearTimeout( timeout ); - timeout = setTimeout( later, wait ); - if ( callNow ) { - result = func.apply( context, args ); - } - return result; - }; - }, - show: function() { - this.picker.show(); - }, - hide: function() { - this.picker.hide(); - }, - toggle: function() { - this.picker.toggle(); - }, - color: function(newColor) { - if ( newColor === true ) { - return this._color.clone(); - } else if ( newColor === undef ) { - return this._color.toString(); - } - this.option('color', newColor); - } - }; - // initialize the widget - $.widget( 'a8c.iris', Iris ); - // add CSS - $( '<style id="iris-css">' + _css + '</style>' ).appendTo( 'head' ); - -}( jQuery )); -/*! Color.js - v0.9.11 - 2013-08-09 -* https://github.com/Automattic/Color.js -* Copyright (c) 2013 Matt Wiebe; Licensed GPLv2 */ -(function(global, undef) { - - var Color = function( color, type ) { - if ( ! ( this instanceof Color ) ) - return new Color( color, type ); - - return this._init( color, type ); - }; - - Color.fn = Color.prototype = { - _color: 0, - _alpha: 1, - error: false, - // for preserving hue/sat in fromHsl().toHsl() flows - _hsl: { h: 0, s: 0, l: 0 }, - // for preserving hue/sat in fromHsv().toHsv() flows - _hsv: { h: 0, s: 0, v: 0 }, - // for setting hsl or hsv space - needed for .h() & .s() functions to function properly - _hSpace: 'hsl', - _init: function( color ) { - var func = 'noop'; - switch ( typeof color ) { - case 'object': - // alpha? - if ( color.a !== undef ) - this.a( color.a ); - func = ( color.r !== undef ) ? 'fromRgb' : - ( color.l !== undef ) ? 'fromHsl' : - ( color.v !== undef ) ? 'fromHsv' : func; - return this[func]( color ); - case 'string': - return this.fromCSS( color ); - case 'number': - return this.fromInt( parseInt( color, 10 ) ); - } - return this; - }, - - _error: function() { - this.error = true; - return this; - }, - - clone: function() { - var newColor = new Color( this.toInt() ), - copy = ['_alpha', '_hSpace', '_hsl', '_hsv', 'error']; - for ( var i = copy.length - 1; i >= 0; i-- ) { - newColor[ copy[i] ] = this[ copy[i] ]; - } - return newColor; - }, - - setHSpace: function( space ) { - this._hSpace = ( space === 'hsv' ) ? space : 'hsl'; - return this; - }, - - noop: function() { - return this; - }, - - fromCSS: function( color ) { - var list, - leadingRE = /^(rgb|hs(l|v))a?\(/; - this.error = false; - - // whitespace and semicolon trim - color = color.replace(/^\s+/, '').replace(/\s+$/, '').replace(/;$/, ''); - - if ( color.match(leadingRE) && color.match(/\)$/) ) { - list = color.replace(/(\s|%)/g, '').replace(leadingRE, '').replace(/,?\);?$/, '').split(','); - - if ( list.length < 3 ) - return this._error(); - - if ( list.length === 4 ) { - this.a( parseFloat( list.pop() ) ); - // error state has been set to true in .a() if we passed NaN - if ( this.error ) - return this; - } - - for (var i = list.length - 1; i >= 0; i--) { - list[i] = parseInt(list[i], 10); - if ( isNaN( list[i] ) ) - return this._error(); - } - - if ( color.match(/^rgb/) ) { - return this.fromRgb( { - r: list[0], - g: list[1], - b: list[2] - } ); - } else if ( color.match(/^hsv/) ) { - return this.fromHsv( { - h: list[0], - s: list[1], - v: list[2] - } ); - } else { - return this.fromHsl( { - h: list[0], - s: list[1], - l: list[2] - } ); - } - } else { - // must be hex amirite? - return this.fromHex( color ); - } - }, - - fromRgb: function( rgb, preserve ) { - if ( typeof rgb !== 'object' || rgb.r === undef || rgb.g === undef || rgb.b === undef ) - return this._error(); - - this.error = false; - return this.fromInt( parseInt( ( rgb.r << 16 ) + ( rgb.g << 8 ) + rgb.b, 10 ), preserve ); - }, - - fromHex: function( color ) { - color = color.replace(/^#/, '').replace(/^0x/, ''); - if ( color.length === 3 ) { - color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2]; - } - - // rough error checking - this is where things go squirrely the most - this.error = ! /^[0-9A-F]{6}$/i.test( color ); - return this.fromInt( parseInt( color, 16 ) ); - }, - - fromHsl: function( hsl ) { - var r, g, b, q, p, h, s, l; - - if ( typeof hsl !== 'object' || hsl.h === undef || hsl.s === undef || hsl.l === undef ) - return this._error(); - - this._hsl = hsl; // store it - this._hSpace = 'hsl'; // implicit - h = hsl.h / 360; s = hsl.s / 100; l = hsl.l / 100; - if ( s === 0 ) { - r = g = b = l; // achromatic - } - else { - q = l < 0.5 ? l * ( 1 + s ) : l + s - l * s; - p = 2 * l - q; - r = this.hue2rgb( p, q, h + 1/3 ); - g = this.hue2rgb( p, q, h ); - b = this.hue2rgb( p, q, h - 1/3 ); - } - return this.fromRgb( { - r: r * 255, - g: g * 255, - b: b * 255 - }, true ); // true preserves hue/sat - }, - - fromHsv: function( hsv ) { - var h, s, v, r, g, b, i, f, p, q, t; - if ( typeof hsv !== 'object' || hsv.h === undef || hsv.s === undef || hsv.v === undef ) - return this._error(); - - this._hsv = hsv; // store it - this._hSpace = 'hsv'; // implicit - - h = hsv.h / 360; s = hsv.s / 100; v = hsv.v / 100; - i = Math.floor( h * 6 ); - f = h * 6 - i; - p = v * ( 1 - s ); - q = v * ( 1 - f * s ); - t = v * ( 1 - ( 1 - f ) * s ); - - switch( i % 6 ) { - case 0: - r = v; g = t; b = p; - break; - case 1: - r = q; g = v; b = p; - break; - case 2: - r = p; g = v; b = t; - break; - case 3: - r = p; g = q; b = v; - break; - case 4: - r = t; g = p; b = v; - break; - case 5: - r = v; g = p; b = q; - break; - } - - return this.fromRgb( { - r: r * 255, - g: g * 255, - b: b * 255 - }, true ); // true preserves hue/sat - - }, - // everything comes down to fromInt - fromInt: function( color, preserve ) { - this._color = parseInt( color, 10 ); - - if ( isNaN( this._color ) ) - this._color = 0; - - // let's coerce things - if ( this._color > 16777215 ) - this._color = 16777215; - else if ( this._color < 0 ) - this._color = 0; - - // let's not do weird things - if ( preserve === undef ) { - this._hsv.h = this._hsv.s = this._hsl.h = this._hsl.s = 0; - } - // EVENT GOES HERE - return this; - }, - - hue2rgb: function( p, q, t ) { - if ( t < 0 ) { - t += 1; - } - if ( t > 1 ) { - t -= 1; - } - if ( t < 1/6 ) { - return p + ( q - p ) * 6 * t; - } - if ( t < 1/2 ) { - return q; - } - if ( t < 2/3 ) { - return p + ( q - p ) * ( 2/3 - t ) * 6; - } - return p; - }, - - toString: function() { - var hex = parseInt( this._color, 10 ).toString( 16 ); - if ( this.error ) - return ''; - // maybe left pad it - if ( hex.length < 6 ) { - for (var i = 6 - hex.length - 1; i >= 0; i--) { - hex = '0' + hex; - } - } - return '#' + hex; - }, - - toCSS: function( type, alpha ) { - type = type || 'hex'; - alpha = parseFloat( alpha || this._alpha ); - switch ( type ) { - case 'rgb': - case 'rgba': - var rgb = this.toRgb(); - if ( alpha < 1 ) { - return "rgba( " + rgb.r + ", " + rgb.g + ", " + rgb.b + ", " + alpha + " )"; - } - else { - return "rgb( " + rgb.r + ", " + rgb.g + ", " + rgb.b + " )"; - } - break; - case 'hsl': - case 'hsla': - var hsl = this.toHsl(); - if ( alpha < 1 ) { - return "hsla( " + hsl.h + ", " + hsl.s + "%, " + hsl.l + "%, " + alpha + " )"; - } - else { - return "hsl( " + hsl.h + ", " + hsl.s + "%, " + hsl.l + "% )"; - } - break; - default: - return this.toString(); - } - }, - - toRgb: function() { - return { - r: 255 & ( this._color >> 16 ), - g: 255 & ( this._color >> 8 ), - b: 255 & ( this._color ) - }; - }, - - toHsl: function() { - var rgb = this.toRgb(); - var r = rgb.r / 255, g = rgb.g / 255, b = rgb.b / 255; - var max = Math.max( r, g, b ), min = Math.min( r, g, b ); - var h, s, l = ( max + min ) / 2; - - if ( max === min ) { - h = s = 0; // achromatic - } else { - var d = max - min; - s = l > 0.5 ? d / ( 2 - max - min ) : d / ( max + min ); - switch ( max ) { - case r: h = ( g - b ) / d + ( g < b ? 6 : 0 ); - break; - case g: h = ( b - r ) / d + 2; - break; - case b: h = ( r - g ) / d + 4; - break; - } - h /= 6; - } - - // maintain hue & sat if we've been manipulating things in the HSL space. - h = Math.round( h * 360 ); - if ( h === 0 && this._hsl.h !== h ) { - h = this._hsl.h; - } - s = Math.round( s * 100 ); - if ( s === 0 && this._hsl.s ) { - s = this._hsl.s; - } - - return { - h: h, - s: s, - l: Math.round( l * 100 ) - }; - - }, - - toHsv: function() { - var rgb = this.toRgb(); - var r = rgb.r / 255, g = rgb.g / 255, b = rgb.b / 255; - var max = Math.max( r, g, b ), min = Math.min( r, g, b ); - var h, s, v = max; - var d = max - min; - s = max === 0 ? 0 : d / max; - - if ( max === min ) { - h = s = 0; // achromatic - } else { - switch( max ){ - case r: - h = ( g - b ) / d + ( g < b ? 6 : 0 ); - break; - case g: - h = ( b - r ) / d + 2; - break; - case b: - h = ( r - g ) / d + 4; - break; - } - h /= 6; - } - - // maintain hue & sat if we've been manipulating things in the HSV space. - h = Math.round( h * 360 ); - if ( h === 0 && this._hsv.h !== h ) { - h = this._hsv.h; - } - s = Math.round( s * 100 ); - if ( s === 0 && this._hsv.s ) { - s = this._hsv.s; - } - - return { - h: h, - s: s, - v: Math.round( v * 100 ) - }; - }, - - toInt: function() { - return this._color; - }, - - toIEOctoHex: function() { - // AARRBBGG - var hex = this.toString(); - var AA = parseInt( 255 * this._alpha, 10 ).toString(16); - if ( AA.length === 1 ) { - AA = '0' + AA; - } - return '#' + AA + hex.replace(/^#/, '' ); - }, - - toLuminosity: function() { - var rgb = this.toRgb(); - return 0.2126 * Math.pow( rgb.r / 255, 2.2 ) + 0.7152 * Math.pow( rgb.g / 255, 2.2 ) + 0.0722 * Math.pow( rgb.b / 255, 2.2); - }, - - getDistanceLuminosityFrom: function( color ) { - if ( ! ( color instanceof Color ) ) { - throw 'getDistanceLuminosityFrom requires a Color object'; - } - var lum1 = this.toLuminosity(); - var lum2 = color.toLuminosity(); - if ( lum1 > lum2 ) { - return ( lum1 + 0.05 ) / ( lum2 + 0.05 ); - } - else { - return ( lum2 + 0.05 ) / ( lum1 + 0.05 ); - } - }, - - getMaxContrastColor: function() { - var lum = this.toLuminosity(); - var hex = ( lum >= 0.5 ) ? '000000' : 'ffffff'; - return new Color( hex ); - }, - - getReadableContrastingColor: function( bgColor, minContrast ) { - if ( ! bgColor instanceof Color ) { - return this; - } - - // you shouldn't use less than 5, but you might want to. - var targetContrast = ( minContrast === undef ) ? 5 : minContrast; - // working things - var contrast = bgColor.getDistanceLuminosityFrom( this ); - var maxContrastColor = bgColor.getMaxContrastColor(); - var maxContrast = maxContrastColor.getDistanceLuminosityFrom( bgColor ); - - // if current max contrast is less than the target contrast, we had wishful thinking. - // still, go max - if ( maxContrast <= targetContrast ) { - return maxContrastColor; - } - // or, we might already have sufficient contrast - else if ( contrast >= targetContrast ) { - return this; - } - - var incr = ( 0 === maxContrastColor.toInt() ) ? -1 : 1; - while ( contrast < targetContrast ) { - this.l( incr, true ); // 2nd arg turns this into an incrementer - contrast = this.getDistanceLuminosityFrom( bgColor ); - // infininite loop prevention: you never know. - if ( this._color === 0 || this._color === 16777215 ) { - break; - } - } - - return this; - - }, - - a: function( val ) { - if ( val === undef ) - return this._alpha; - - var a = parseFloat( val ); - - if ( isNaN( a ) ) - return this._error(); - - this._alpha = a; - return this; - }, - - // TRANSFORMS - - darken: function( amount ) { - amount = amount || 5; - return this.l( - amount, true ); - }, - - lighten: function( amount ) { - amount = amount || 5; - return this.l( amount, true ); - }, - - saturate: function( amount ) { - amount = amount || 15; - return this.s( amount, true ); - }, - - desaturate: function( amount ) { - amount = amount || 15; - return this.s( - amount, true ); - }, - - toGrayscale: function() { - return this.setHSpace('hsl').s( 0 ); - }, - - getComplement: function() { - return this.h( 180, true ); - }, - - getSplitComplement: function( step ) { - step = step || 1; - var incr = 180 + ( step * 30 ); - return this.h( incr, true ); - }, - - getAnalog: function( step ) { - step = step || 1; - var incr = step * 30; - return this.h( incr, true ); - }, - - getTetrad: function( step ) { - step = step || 1; - var incr = step * 60; - return this.h( incr, true ); - }, - - getTriad: function( step ) { - step = step || 1; - var incr = step * 120; - return this.h( incr, true ); - }, - - _partial: function( key ) { - var prop = shortProps[key]; - return function( val, incr ) { - var color = this._spaceFunc('to', prop.space); - - // GETTER - if ( val === undef ) - return color[key]; - - // INCREMENT - if ( incr === true ) - val = color[key] + val; - - // MOD & RANGE - if ( prop.mod ) - val = val % prop.mod; - if ( prop.range ) - val = ( val < prop.range[0] ) ? prop.range[0] : ( val > prop.range[1] ) ? prop.range[1] : val; - - // NEW VALUE - color[key] = val; - - return this._spaceFunc('from', prop.space, color); - }; - }, - - _spaceFunc: function( dir, s, val ) { - var space = s || this._hSpace, - funcName = dir + space.charAt(0).toUpperCase() + space.substr(1); - return this[funcName](val); - } - }; - - var shortProps = { - h: { - mod: 360 - }, - s: { - range: [0,100] - }, - l: { - space: 'hsl', - range: [0,100] - }, - v: { - space: 'hsv', - range: [0,100] - }, - r: { - space: 'rgb', - range: [0,255] - }, - g: { - space: 'rgb', - range: [0,255] - }, - b: { - space: 'rgb', - range: [0,255] - } - }; - - for ( var key in shortProps ) { - if ( shortProps.hasOwnProperty( key ) ) - Color.fn[key] = Color.fn._partial(key); - } - - // play nicely with Node + browser - if ( typeof exports === 'object' ) - module.exports = Color; - else - global.Color = Color; - -}(this)); diff --git a/lib/plugins/styling/lang/bg/lang.php b/lib/plugins/styling/lang/bg/lang.php index 7d17caffb..dc1884d63 100644 --- a/lib/plugins/styling/lang/bg/lang.php +++ b/lib/plugins/styling/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Kiril <neohidra@gmail.com> */ $lang['menu'] = 'Настройки на стила на шаблона'; diff --git a/lib/plugins/styling/lang/ca/lang.php b/lib/plugins/styling/lang/ca/lang.php new file mode 100644 index 000000000..94ed85cbd --- /dev/null +++ b/lib/plugins/styling/lang/ca/lang.php @@ -0,0 +1,18 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> + */ +$lang['menu'] = 'Paràmetres d’estil de la plantilla'; +$lang['error'] = 'Aquesta plantilla no admet aquesta funcionalitat.'; +$lang['btn_preview'] = 'Previsualitza els canvis'; +$lang['btn_save'] = 'Desa els canvis'; +$lang['btn_reset'] = 'Reinicialitza els canvis actuals'; +$lang['btn_revert'] = 'Reverteix els canvis als valors per defecte de la plantilla'; +$lang['__text__'] = 'Color principal del text'; +$lang['__background__'] = 'Color principal del fons'; +$lang['__text_alt__'] = 'Color alternatiu del text'; +$lang['__background_alt__'] = 'Color alternatiu del fons'; +$lang['__border__'] = 'Color de la vora'; diff --git a/lib/plugins/styling/lang/da/intro.txt b/lib/plugins/styling/lang/da/intro.txt new file mode 100644 index 000000000..ecb0e2ef6 --- /dev/null +++ b/lib/plugins/styling/lang/da/intro.txt @@ -0,0 +1,2 @@ +Dette værktøj giver dig mulighed for at ændre udvalgte formateringer i dit valgte tema. +Alle ændringer gemmes i en lokal indstillingsfil, og bevares ved opgraderinger.
\ No newline at end of file diff --git a/lib/plugins/styling/lang/da/lang.php b/lib/plugins/styling/lang/da/lang.php new file mode 100644 index 000000000..1a69e7627 --- /dev/null +++ b/lib/plugins/styling/lang/da/lang.php @@ -0,0 +1,23 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jacob Palm <mail@jacobpalm.dk> + */ +$lang['menu'] = 'Tema indstillinger - formatering'; +$lang['js']['loader'] = 'Eksempel indlæses...<br />Hvis denne side ikke forsvinder, er dine indstillinger muligvis ugyldige'; +$lang['js']['popup'] = 'Åbn som popup'; +$lang['error'] = 'Beklager, dette tema understøtter ikke denne funktion.'; +$lang['btn_preview'] = 'Forhåndsvis ændringer'; +$lang['btn_save'] = 'Gem ændringer'; +$lang['btn_reset'] = 'Nulstil ændringer'; +$lang['btn_revert'] = 'Nulstil formatering til temaets standardindstillinger'; +$lang['__text__'] = 'Grundlæggende tekstfarve'; +$lang['__background__'] = 'Grundlæggende baggrundsfarve'; +$lang['__text_alt__'] = 'Alternativ tekstfarve'; +$lang['__background_alt__'] = 'Alternativ baggrundsfarve'; +$lang['__text_neu__'] = 'Neutral tekstfarve'; +$lang['__background_neu__'] = 'Neutral baggrundsfarve'; +$lang['__border__'] = 'Ramme farve'; +$lang['__highlight__'] = 'Fremhævningsfarve (hovedsageligt til søgeresultater)'; diff --git a/lib/plugins/styling/lang/el/lang.php b/lib/plugins/styling/lang/el/lang.php new file mode 100644 index 000000000..9f6b15012 --- /dev/null +++ b/lib/plugins/styling/lang/el/lang.php @@ -0,0 +1,21 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Katerina Katapodi <extragold1234@hotmail.com> + */ +$lang['menu'] = 'Ρυθμίσεις Τύπου Μοντέλου'; +$lang['error'] = 'Συγγνώμη, αυτό το πρότυπο δεν υποστηρίζει αυτήν την λειτουργία.'; +$lang['btn_preview'] = 'Έλεγχος αλλαγών '; +$lang['btn_save'] = 'Αποθηκεύσετε τις αλλαγές'; +$lang['btn_reset'] = 'Ρυθμίστε ξανά τις τρέχουσες αλλαγές'; +$lang['btn_revert'] = 'Τα πρότυπα επαναφοράς πίσω στο επιλεγμένο πρότυπο'; +$lang['__text__'] = 'Κύριο χρώμα κειμένου'; +$lang['__background__'] = 'Κύριο χρώμα φόντου'; +$lang['__text_alt__'] = 'Εναλλακτικό χρώμα κειμένου'; +$lang['__background_alt__'] = 'Εναλλακτικό χρώμα φόντου'; +$lang['__text_neu__'] = 'Ουδέτερο χρώμα κειμένου'; +$lang['__background_neu__'] = 'Ουδέτερο (λευκό?) χρώμα βάσης'; +$lang['__border__'] = 'Χρώμα πλαισίων'; +$lang['__highlight__'] = 'Χρώμα φωτισμού (κυρίως για αναζήτηση αποτελεσμάτων)'; diff --git a/lib/plugins/styling/lang/ja/lang.php b/lib/plugins/styling/lang/ja/lang.php index 5c546a7cd..3069477f6 100644 --- a/lib/plugins/styling/lang/ja/lang.php +++ b/lib/plugins/styling/lang/ja/lang.php @@ -3,12 +3,13 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> * @author Hideaki SAWADA <chuno@live.jp> */ $lang['menu'] = 'テンプレートのスタイル設定'; $lang['js']['loader'] = 'プレビューを読込み中です・・・<br/>この表示が消えない場合、変更した設定値に問題があるかもしれません。'; $lang['js']['popup'] = 'ポップアップとして表示'; -$lang['error'] = 'このテンプレートは、この機能に対応していません。'; +$lang['error'] = '恐れ入りますが、このテンプレートはこの機能に対応していません。'; $lang['btn_preview'] = '変更内容のプレビュー'; $lang['btn_save'] = '変更内容の保存'; $lang['btn_reset'] = '変更内容の初期化'; diff --git a/lib/plugins/styling/lang/no/lang.php b/lib/plugins/styling/lang/no/lang.php index f9a478b06..79229c957 100644 --- a/lib/plugins/styling/lang/no/lang.php +++ b/lib/plugins/styling/lang/no/lang.php @@ -4,7 +4,6 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Arne Hanssen <arne.hanssen@getmail.no> - * @author Arne Hanssen <arnehans@getmail.no> */ $lang['menu'] = 'Innstillinger for malstil'; $lang['js']['loader'] = 'Forhåndsvisning laster...<br />Dersom denne ikke forsvinner, kan det hende at dine verdier er feil'; diff --git a/lib/plugins/styling/lang/oc/lang.php b/lib/plugins/styling/lang/oc/lang.php new file mode 100644 index 000000000..a319e2d02 --- /dev/null +++ b/lib/plugins/styling/lang/oc/lang.php @@ -0,0 +1,11 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author En Mathis <heartattack@free.fr> + */ +$lang['__text__'] = 'Color principala del tèxte'; +$lang['__background__'] = 'Color principala del fons'; +$lang['__text_alt__'] = 'Color alternativa del tèxte'; +$lang['__background_alt__'] = 'Color alternativa del fons'; diff --git a/lib/plugins/styling/lang/pt/intro.txt b/lib/plugins/styling/lang/pt/intro.txt new file mode 100644 index 000000000..af48c6027 --- /dev/null +++ b/lib/plugins/styling/lang/pt/intro.txt @@ -0,0 +1,2 @@ +Essa ferramenta permite que você altere determinadas configurações de estilo do modelo atualmente selecionado. +Todas as alterações são armazenadas em um arquivo de configuração local e são atualizadas com segurança.
\ No newline at end of file diff --git a/lib/plugins/styling/lang/pt/lang.php b/lib/plugins/styling/lang/pt/lang.php index 1c64c0430..ac4d55f3a 100644 --- a/lib/plugins/styling/lang/pt/lang.php +++ b/lib/plugins/styling/lang/pt/lang.php @@ -3,17 +3,23 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> * @author Alfredo Silva <alfredo.silva@sky.com> * @author Guilherme Sá <guilherme.sa@hotmail.com> */ $lang['menu'] = 'Configurações de Estilo do Modelo'; +$lang['js']['loader'] = 'A pré-visualização está carregando...<br />se isto não desaparecer, os seus valores podem estar errados'; $lang['js']['popup'] = 'Abrir como uma janela extra'; $lang['error'] = 'Desculpe, este modelo não suporta esta funcionalidade.'; $lang['btn_preview'] = 'Pré-visualizar alterações'; -$lang['btn_save'] = 'Guardar alterações'; +$lang['btn_save'] = 'Salvar alterações'; $lang['btn_reset'] = 'Reiniciar alterações atuais'; +$lang['btn_revert'] = 'Reverter estilos de volta ao padrão do modelo'; $lang['__text__'] = 'Cor do texto principal'; $lang['__background__'] = 'Cor principal do fundo'; $lang['__text_alt__'] = 'Cor alternativa de texto'; $lang['__background_alt__'] = 'Cor alternativa de fundo'; $lang['__text_neu__'] = 'Cor neutra de texto'; +$lang['__background_neu__'] = 'Cor de fundo neutro'; +$lang['__border__'] = 'Cor da borda'; +$lang['__highlight__'] = 'Cor de destaque (principalmente para resultados de pesquisa)'; diff --git a/lib/plugins/styling/lang/ru/lang.php b/lib/plugins/styling/lang/ru/lang.php index 3c8e60b18..e034ae107 100644 --- a/lib/plugins/styling/lang/ru/lang.php +++ b/lib/plugins/styling/lang/ru/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author RainbowSpike <1@2.ru> */ $lang['menu'] = 'Настройки стилей шаблона'; @@ -20,4 +21,4 @@ $lang['__background_alt__'] = 'Второй цвет фона'; $lang['__text_neu__'] = 'Нейтральный цвет текста'; $lang['__background_neu__'] = 'Нейтральный цвет фона'; $lang['__border__'] = 'Цвет границ'; -$lang['__highlight__'] = 'Цвет подсветки (в основном для результатов поиска)'; +$lang['__highlight__'] = 'Цвет подсветки (в основном, для результатов поиска)'; diff --git a/lib/plugins/styling/lang/sk/lang.php b/lib/plugins/styling/lang/sk/lang.php index 005835898..fcc32ad69 100644 --- a/lib/plugins/styling/lang/sk/lang.php +++ b/lib/plugins/styling/lang/sk/lang.php @@ -3,11 +3,16 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Peter Mydliar <peto.mydliar@gmail.com> * @author Martin Michalek <michalek.dev@gmail.com> */ +$lang['menu'] = 'Nastavenie typov šablón'; +$lang['js']['popup'] = 'Otvor vo vyskakovacom okne'; +$lang['error'] = 'Táto šablóna nepodporuje túto funkciu.'; $lang['btn_preview'] = 'Náhľad zmien'; $lang['btn_save'] = 'Uloženie zmien'; $lang['btn_reset'] = 'Zruš prevedené zmeny'; +$lang['btn_revert'] = 'Vrátiť späť k základnej šablóne.'; $lang['__text__'] = 'Primárna farba textu'; $lang['__background__'] = 'Primárna farba pozadia'; $lang['__text_alt__'] = 'Alternatívna farba textu'; diff --git a/lib/plugins/styling/lang/uk/lang.php b/lib/plugins/styling/lang/uk/lang.php new file mode 100644 index 000000000..61a9530c5 --- /dev/null +++ b/lib/plugins/styling/lang/uk/lang.php @@ -0,0 +1,13 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Dmytro Marchenko <dmytro.marchenko1989@gmail.com> + */ +$lang['menu'] = 'Налаштування стилю шаблону'; +$lang['js']['popup'] = 'Відкрити як спливаюче вікно'; +$lang['error'] = 'На жаль, цей шаблон не підтримує цю функцію.'; +$lang['btn_preview'] = 'Попередній перегляд змін'; +$lang['btn_save'] = 'Зберегти зміни'; +$lang['btn_reset'] = 'Скидання поточних змін'; diff --git a/lib/plugins/styling/lang/vi/intro.txt b/lib/plugins/styling/lang/vi/intro.txt new file mode 100644 index 000000000..c433a631b --- /dev/null +++ b/lib/plugins/styling/lang/vi/intro.txt @@ -0,0 +1,2 @@ +Công cụ này cho phép bạn thay đổi các cài đặt kiểu dáng nhất định của chủ đề đang được sử dụng. +Tất cả các thay đổi được lưu trữ trong một tập tin cấu hình cục bộ và được nâng cấp an toàn.
\ No newline at end of file diff --git a/lib/plugins/styling/lang/vi/lang.php b/lib/plugins/styling/lang/vi/lang.php new file mode 100644 index 000000000..c987aa8d6 --- /dev/null +++ b/lib/plugins/styling/lang/vi/lang.php @@ -0,0 +1,23 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['menu'] = 'Cài đặt kiểu dáng Chủ đề'; +$lang['js']['loader'] = 'Đang tải xem trước...<br />nếu cái này không biến mất, giá trị của bạn có thể bị lỗi'; +$lang['js']['popup'] = 'Mở dưới dạng cửa sổ bật lên'; +$lang['error'] = 'Xin lỗi, chủ đề này không hỗ trợ chức năng này.'; +$lang['btn_preview'] = 'Xem trước thay đổi'; +$lang['btn_save'] = 'Lưu thay đổi'; +$lang['btn_reset'] = 'Đặt lại các thay đổi hiện tại'; +$lang['btn_revert'] = 'Lùi sửa các kiểu dáng về mặc định của chủ đề'; +$lang['__text__'] = 'Màu văn bản chính'; +$lang['__background__'] = 'Màu nền chính'; +$lang['__text_alt__'] = 'Màu văn bản thay thế'; +$lang['__background_alt__'] = 'Màu nền thay thế'; +$lang['__text_neu__'] = 'Màu văn bản trung tính'; +$lang['__background_neu__'] = 'Màu nền trung tính'; +$lang['__border__'] = 'Màu viền'; +$lang['__highlight__'] = 'Màu phần tô lên (chủ yếu cho kết quả tìm kiếm)'; diff --git a/lib/plugins/styling/popup.php b/lib/plugins/styling/popup.php index 964b19e29..079062e43 100644 --- a/lib/plugins/styling/popup.php +++ b/lib/plugins/styling/popup.php @@ -1,5 +1,6 @@ <?php -if(!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__) . '/../../../'); +// phpcs:disable PSR1.Files.SideEffects +if (!defined('DOKU_INC')) define('DOKU_INC', dirname(__FILE__) . '/../../../'); require_once(DOKU_INC . 'inc/init.php'); //close session session_write_close(); @@ -8,7 +9,7 @@ header('X-UA-Compatible: IE=edge,chrome=1'); /** @var admin_plugin_styling $plugin */ $plugin = plugin_load('admin', 'styling'); -if(!auth_isadmin()) die('only admins allowed'); +if (!$plugin->isAccessibleByCurrentUser()) die('only admins allowed'); $plugin->ispopup = true; // handle posts diff --git a/lib/plugins/styling/script.js b/lib/plugins/styling/script.js index 074c8dc40..7fa8b2571 100644 --- a/lib/plugins/styling/script.js +++ b/lib/plugins/styling/script.js @@ -1,5 +1,3 @@ -/* DOKUWIKI:include_once iris.js */ - jQuery(function () { /** @@ -55,16 +53,13 @@ jQuery(function () { /* ---- from here on we're in the popup or admin page ---- */ - // add the color picker - $styling_plugin.find('.color').iris({}); - // add button on main page if (!$styling_plugin.hasClass('ispopup')) { var $form = $styling_plugin.find('form.styling').first(); var $btn = jQuery('<button>' + LANG.plugins.styling.popup + '</button>'); $form.prepend($btn); - $btn.click(function (e) { + $btn.on('click', function (e) { var windowFeatures = "menubar=no,location=no,resizable=yes,scrollbars=yes,status=false,width=500,height=500"; window.open(DOKU_BASE + 'lib/plugins/styling/popup.php', 'styling_popup', windowFeatures); e.preventDefault(); @@ -78,8 +73,8 @@ jQuery(function () { // reload the main page on close window.onunload = function(e) { if(doreload) { - window.opener.DokuCookie.setValue('styling_plugin', 0); - window.opener.document.location.reload(); + DokuCookie.setValue('styling_plugin', 0); + if(window.opener) window.opener.document.location.reload(); } return null; }; @@ -90,8 +85,8 @@ jQuery(function () { }); // on first load apply preview - applyPreview(window.opener); + if(window.opener) applyPreview(window.opener); // enable the preview cookie - window.opener.DokuCookie.setValue('styling_plugin', 1); + DokuCookie.setValue('styling_plugin', 1); }); diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 9e2913d78..a3cbec722 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -1,134 +1,2 @@ <?php -/** - * Syntax Plugin Prototype - * - * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Andreas Gohr <andi@splitbrain.org> - */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -/** - * All DokuWiki plugins to extend the parser/rendering mechanism - * need to inherit from this class - */ -class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode_Plugin { - - var $allowedModesSetup = false; - - /** - * Syntax Type - * - * Needs to return one of the mode types defined in $PARSER_MODES in parser.php - * - * @return string - */ - function getType(){ - trigger_error('getType() not implemented in '.get_class($this), E_USER_WARNING); - return ''; - } - - /** - * Allowed Mode Types - * - * Defines the mode types for other dokuwiki markup that maybe nested within the - * plugin's own markup. Needs to return an array of one or more of the mode types - * defined in $PARSER_MODES in parser.php - * - * @return array - */ - function getAllowedTypes() { - return array(); - } - - /** - * Paragraph Type - * - * Defines how this syntax is handled regarding paragraphs. This is important - * for correct XHTML nesting. Should return one of the following: - * - * 'normal' - The plugin can be used inside paragraphs - * 'block' - Open paragraphs need to be closed before plugin output - * 'stack' - Special case. Plugin wraps other paragraphs. - * - * @see Doku_Handler_Block - * - * @return string - */ - function getPType(){ - return 'normal'; - } - - /** - * Handler to prepare matched data for the rendering process - * - * This function can only pass data to render() via its return value - render() - * may be not be run during the object's current life. - * - * Usually you should only need the $match param. - * - * @param string $match The text matched by the patterns - * @param int $state The lexer state for the match - * @param int $pos The character position of the matched text - * @param Doku_Handler $handler The Doku_Handler object - * @return bool|array Return an array with all data you want to use in render, false don't add an instruction - */ - function handle($match, $state, $pos, Doku_Handler $handler){ - trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); - } - - /** - * Handles the actual output creation. - * - * The function must not assume any other of the classes methods have been run - * during the object's current life. The only reliable data it receives are its - * parameters. - * - * The function should always check for the given output format and return false - * when a format isn't supported. - * - * $renderer contains a reference to the renderer object which is - * currently handling the rendering. You need to use it for writing - * the output. How this is done depends on the renderer used (specified - * by $format - * - * The contents of the $data array depends on what the handler() function above - * created - * - * @param string $format output format being rendered - * @param Doku_Renderer $renderer the current renderer object - * @param array $data data created by handler() - * @return boolean rendered correctly? (however, returned value is not used at the moment) - */ - function render($format, Doku_Renderer $renderer, $data) { - trigger_error('render() not implemented in '.get_class($this), E_USER_WARNING); - - } - - /** - * There should be no need to override this function - * - * @param string $mode - * @return bool - */ - function accepts($mode) { - - if (!$this->allowedModesSetup) { - global $PARSER_MODES; - - $allowedModeTypes = $this->getAllowedTypes(); - foreach($allowedModeTypes as $mt) { - $this->allowedModes = array_merge($this->allowedModes, $PARSER_MODES[$mt]); - } - - $idx = array_search(substr(get_class($this), 7), (array) $this->allowedModes); - if ($idx !== false) { - unset($this->allowedModes[$idx]); - } - $this->allowedModesSetup = true; - } - - return parent::accepts($mode); - } -} -//Setup VIM: ex: et ts=4 : +dbg_deprecated('Autoloading. Do not require() files yourself.'); diff --git a/lib/plugins/testing/action.php b/lib/plugins/testing/action.php index a242ab0b7..09b84262e 100644 --- a/lib/plugins/testing/action.php +++ b/lib/plugins/testing/action.php @@ -1,4 +1,7 @@ <?php + +use dokuwiki\Extension\Event; + /** * Plugin for testing the test system * @@ -8,13 +11,14 @@ */ class action_plugin_testing extends DokuWiki_Action_Plugin { - function register(Doku_Event_Handler $controller) { + /** @inheritdoc */ + public function register(Doku_Event_Handler $controller) { $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'dokuwikiStarted'); } - function dokuwikiStarted() { + public function dokuwikiStarted() { $param = array(); - trigger_event('TESTING_PLUGIN_INSTALLED', $param); + Event::createAndTrigger('TESTING_PLUGIN_INSTALLED', $param); msg('The testing plugin is enabled and should be disabled.',-1); } } diff --git a/lib/plugins/testing/conf/default.php b/lib/plugins/testing/conf/default.php new file mode 100644 index 000000000..392233dd8 --- /dev/null +++ b/lib/plugins/testing/conf/default.php @@ -0,0 +1,7 @@ +<?php +/** + * Default options + * + * They don't do anything and are just there for testing config reading + */ +$conf['schnibble'] = 0; diff --git a/lib/plugins/testing/conf/metadata.php b/lib/plugins/testing/conf/metadata.php new file mode 100644 index 000000000..377da63eb --- /dev/null +++ b/lib/plugins/testing/conf/metadata.php @@ -0,0 +1,7 @@ +<?php +/** + * Option Metadata + * + * They don't do anything and are just there for testing config reading + */ +$meta['schnibble'] = array('onoff'); diff --git a/lib/plugins/testing/lang/en/settings.php b/lib/plugins/testing/lang/en/settings.php new file mode 100644 index 000000000..e717c9021 --- /dev/null +++ b/lib/plugins/testing/lang/en/settings.php @@ -0,0 +1,5 @@ +<?php +/** + * Default options texts + */ +$lang['schnibble'] = 'Turns on the schnibble before the frobble is used'; diff --git a/lib/plugins/usermanager/_test/csv_import.test.php b/lib/plugins/usermanager/_test/csv_import.test.php index 299e0183d..13034a012 100644 --- a/lib/plugins/usermanager/_test/csv_import.test.php +++ b/lib/plugins/usermanager/_test/csv_import.test.php @@ -14,13 +14,14 @@ require_once(dirname(__FILE__).'/mocks.class.php'); * * At present, users imported in individual tests remain in the user list for subsequent tests */ -class plugin_usermanager_csv_import_test extends DokuWikiTest { - +class plugin_usermanager_csv_import_test extends DokuWikiTest +{ private $old_files; protected $usermanager; protected $importfile; - function setUp() { + public function setUp() + { $this->importfile = tempnam(TMP_DIR, 'csv'); $this->old_files = $_FILES; @@ -38,22 +39,27 @@ class plugin_usermanager_csv_import_test extends DokuWikiTest { parent::setUp(); } - function tearDown() { + public function tearDown() + { $_FILES = $this->old_files; parent::tearDown(); } - function doImportTest($importCsv, $expectedResult, $expectedNewUsers, $expectedFailures) { + public function doImportTest($importCsv, $expectedResult, $expectedNewUsers, $expectedFailures) + { global $auth; $before_users = $auth->retrieveUsers(); - io_savefile($this->importfile, $importCsv); + io_saveFile($this->importfile, $importCsv); $result = $this->usermanager->tryImport(); $after_users = $auth->retrieveUsers(); + + $before_users = array_map('serialize', $before_users); + $after_users = array_map('serialize', $after_users); $import_count = count($after_users) - count($before_users); - $new_users = array_diff_key($after_users, $before_users); - $diff_users = array_diff_assoc($after_users, $before_users); + $new_users = array_map('unserialize', array_diff_key($after_users, $before_users)); + $diff_users = array_map('unserialize', array_diff_assoc($after_users, $before_users)); $expectedCount = count($expectedNewUsers); @@ -66,7 +72,8 @@ class plugin_usermanager_csv_import_test extends DokuWikiTest { $this->assertEquals($expectedFailures, $this->usermanager->getImportFailures()); // failures as expected } - function test_cantImport(){ + public function test_cantImport() + { global $auth; $oldauth = $auth; @@ -82,7 +89,8 @@ importuser,"Ford Prefect",ford@example.com,user $auth = $oldauth; } - function test_import() { + public function test_import() + { $csv = 'User,"Real Name",Email,Groups importuser,"Ford Prefect",ford@example.com,user '; @@ -97,7 +105,8 @@ importuser,"Ford Prefect",ford@example.com,user $this->doImportTest($csv, true, $expected, array()); } - function test_importExisting() { + public function test_importExisting() + { $csv = 'User,"Real Name",Email,Groups importuser,"Ford Prefect",ford@example.com,user '; @@ -117,7 +126,8 @@ importuser,"Ford Prefect",ford@example.com,user $this->doImportTest($csv, true, array(), $failures); } - function test_importUtf8() { + public function test_importUtf8() + { $csv = 'User,"Real Name",Email,Groups importutf8,"Førd Prefect",ford@example.com,user '; @@ -135,7 +145,8 @@ importutf8,"Førd Prefect",ford@example.com,user /** * utf8: u+00F8 (ø) <=> 0xF8 :iso-8859-1 */ - function test_importIso8859() { + public function test_importIso8859() + { $csv = 'User,"Real Name",Email,Groups importiso8859,"F'.chr(0xF8).'rd Prefect",ford@example.com,user '; @@ -150,14 +161,16 @@ importiso8859,"F'.chr(0xF8).'rd Prefect",ford@example.com,user $this->doImportTest($csv, true, $expected, array()); } - private function stripPasswords($array){ + private function stripPasswords($array) + { foreach ($array as $user => $data) { unset($array[$user]['pass']); } return $array; } - private function countPasswords($array){ + private function countPasswords($array) + { $count = 0; foreach ($array as $user => $data) { if (!empty($data['pass'])) { @@ -166,6 +179,4 @@ importiso8859,"F'.chr(0xF8).'rd Prefect",ford@example.com,user } return $count; } - } - diff --git a/lib/plugins/usermanager/_test/mocks.class.php b/lib/plugins/usermanager/_test/mocks.class.php index e524e451b..75ac51422 100644 --- a/lib/plugins/usermanager/_test/mocks.class.php +++ b/lib/plugins/usermanager/_test/mocks.class.php @@ -16,30 +16,30 @@ class admin_mock_usermanager extends admin_plugin_usermanager { public $lang; public function getImportFailures() { - return $this->_import_failures; + return $this->import_failures; } public function tryExport() { ob_start(); - $this->_export(); + $this->exportCSV(); return ob_get_clean(); } public function tryImport() { - return $this->_import(); + return $this->importCSV(); } // no need to send email notifications (mostly) - protected function _notifyUser($user, $password, $status_alert=true) { + protected function notifyUser($user, $password, $status_alert=true) { if ($this->mock_email_notifications) { $this->mock_email_notifications_sent++; return true; } else { - return parent::_notifyUser($user, $password, $status_alert); + return parent::notifyUser($user, $password, $status_alert); } } - protected function _isUploadedFile($file) { + protected function isUploadedFile($file) { return file_exists($file); } } diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 6d9bf3b20..423467133 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -10,52 +10,49 @@ * @author neolao <neolao@neolao.com> * @author Chris Smith <chris@jalakai.co.uk> */ -// must be run within Dokuwiki -if(!defined('DOKU_INC')) die(); - -if(!defined('DOKU_PLUGIN_IMAGES')) define('DOKU_PLUGIN_IMAGES',DOKU_BASE.'lib/plugins/usermanager/images/'); /** * All DokuWiki plugins to extend the admin function * need to inherit from this class */ -class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { - - protected $_auth = null; // auth object - protected $_user_total = 0; // number of registered users - protected $_filter = array(); // user selection filter(s) - protected $_start = 0; // index of first user to be displayed - protected $_last = 0; // index of the last user to be displayed - protected $_pagesize = 20; // number of users to list on one page - protected $_edit_user = ''; // set to user selected for editing - protected $_edit_userdata = array(); - protected $_disabled = ''; // if disabled set to explanatory string - protected $_import_failures = array(); - protected $_lastdisabled = false; // set to true if last user is unknown and last button is hence buggy +class admin_plugin_usermanager extends DokuWiki_Admin_Plugin +{ + const IMAGE_DIR = DOKU_BASE.'lib/plugins/usermanager/images/'; + + protected $auth = null; // auth object + protected $users_total = 0; // number of registered users + protected $filter = array(); // user selection filter(s) + protected $start = 0; // index of first user to be displayed + protected $last = 0; // index of the last user to be displayed + protected $pagesize = 20; // number of users to list on one page + protected $edit_user = ''; // set to user selected for editing + protected $edit_userdata = array(); + protected $disabled = ''; // if disabled set to explanatory string + protected $import_failures = array(); + protected $lastdisabled = false; // set to true if last user is unknown and last button is hence buggy /** * Constructor */ - public function __construct(){ + public function __construct() + { /** @var DokuWiki_Auth_Plugin $auth */ global $auth; $this->setupLocale(); if (!isset($auth)) { - $this->_disabled = $this->lang['noauth']; - } else if (!$auth->canDo('getUsers')) { - $this->_disabled = $this->lang['nosupport']; + $this->disabled = $this->lang['noauth']; + } elseif (!$auth->canDo('getUsers')) { + $this->disabled = $this->lang['nosupport']; } else { - // we're good to go - $this->_auth = & $auth; - + $this->auth = & $auth; } // attempt to retrieve any import failures from the session - if (!empty($_SESSION['import_failures'])){ - $this->_import_failures = $_SESSION['import_failures']; + if (!empty($_SESSION['import_failures'])) { + $this->import_failures = $_SESSION['import_failures']; } } @@ -65,12 +62,13 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param string $language * @return string */ - public function getMenuText($language) { + public function getMenuText($language) + { - if (!is_null($this->_auth)) + if (!is_null($this->auth)) return parent::getMenuText($language); - return $this->getLang('menu').' '.$this->_disabled; + return $this->getLang('menu').' '.$this->disabled; } /** @@ -78,29 +76,33 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @return int */ - public function getMenuSort() { + public function getMenuSort() + { return 2; } /** * @return int current start value for pageination */ - public function getStart() { - return $this->_start; + public function getStart() + { + return $this->start; } /** * @return int number of users per page */ - public function getPagesize() { - return $this->_pagesize; + public function getPagesize() + { + return $this->pagesize; } /** * @param boolean $lastdisabled */ - public function setLastdisabled($lastdisabled) { - $this->_lastdisabled = $lastdisabled; + public function setLastdisabled($lastdisabled) + { + $this->lastdisabled = $lastdisabled; } /** @@ -108,9 +110,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @return bool */ - public function handle() { + public function handle() + { global $INPUT; - if (is_null($this->_auth)) return false; + if (is_null($this->auth)) return false; // extract the command and any specific parameters // submit button name is of the form - fn[cmd][param(s)] @@ -125,33 +128,56 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } if ($cmd != "search") { - $this->_start = $INPUT->int('start', 0); - $this->_filter = $this->_retrieveFilter(); + $this->start = $INPUT->int('start', 0); + $this->filter = $this->retrieveFilter(); } - switch($cmd){ - case "add" : $this->_addUser(); break; - case "delete" : $this->_deleteUser(); break; - case "modify" : $this->_modifyUser(); break; - case "edit" : $this->_editUser($param); break; - case "search" : $this->_setFilter($param); - $this->_start = 0; - break; - case "export" : $this->_export(); break; - case "import" : $this->_import(); break; - case "importfails" : $this->_downloadImportFailures(); break; + switch ($cmd) { + case "add": + $this->addUser(); + break; + case "delete": + $this->deleteUser(); + break; + case "modify": + $this->modifyUser(); + break; + case "edit": + $this->editUser($param); + break; + case "search": + $this->setFilter($param); + $this->start = 0; + break; + case "export": + $this->exportCSV(); + break; + case "import": + $this->importCSV(); + break; + case "importfails": + $this->downloadImportFailures(); + break; } - $this->_user_total = $this->_auth->canDo('getUserCount') ? $this->_auth->getUserCount($this->_filter) : -1; + $this->users_total = $this->auth->canDo('getUserCount') ? $this->auth->getUserCount($this->filter) : -1; // page handling - switch($cmd){ - case 'start' : $this->_start = 0; break; - case 'prev' : $this->_start -= $this->_pagesize; break; - case 'next' : $this->_start += $this->_pagesize; break; - case 'last' : $this->_start = $this->_user_total; break; + switch ($cmd) { + case 'start': + $this->start = 0; + break; + case 'prev': + $this->start -= $this->pagesize; + break; + case 'next': + $this->start += $this->pagesize; + break; + case 'last': + $this->start = $this->users_total; + break; } - $this->_validatePagination(); + $this->validatePagination(); return true; } @@ -160,21 +186,22 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @return bool */ - public function html() { + public function html() + { global $ID; - if(is_null($this->_auth)) { + if (is_null($this->auth)) { print $this->lang['badauth']; return false; } - $user_list = $this->_auth->retrieveUsers($this->_start, $this->_pagesize, $this->_filter); + $user_list = $this->auth->retrieveUsers($this->start, $this->pagesize, $this->filter); - $page_buttons = $this->_pagination(); - $delete_disable = $this->_auth->canDo('delUser') ? '' : 'disabled="disabled"'; + $page_buttons = $this->pagination(); + $delete_disable = $this->auth->canDo('delUser') ? '' : 'disabled="disabled"'; - $editable = $this->_auth->canDo('UserMod'); - $export_label = empty($this->_filter) ? $this->lang['export_all'] : $this->lang['export_filtered']; + $editable = $this->auth->canDo('UserMod'); + $export_label = empty($this->filter) ? $this->lang['export_all'] : $this->lang['export_filtered']; print $this->locale_xhtml('intro'); print $this->locale_xhtml('list'); @@ -182,13 +209,21 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ptln("<div id=\"user__manager\">"); ptln("<div class=\"level2\">"); - if ($this->_user_total > 0) { - ptln("<p>".sprintf($this->lang['summary'],$this->_start+1,$this->_last,$this->_user_total,$this->_auth->getUserCount())."</p>"); + if ($this->users_total > 0) { + ptln( + "<p>" . sprintf( + $this->lang['summary'], + $this->start + 1, + $this->last, + $this->users_total, + $this->auth->getUserCount() + ) . "</p>" + ); } else { - if($this->_user_total < 0) { + if ($this->users_total < 0) { $allUserTotal = 0; } else { - $allUserTotal = $this->_auth->getUserCount(); + $allUserTotal = $this->auth->getUserCount(); } ptln("<p>".sprintf($this->lang['nonefound'], $allUserTotal)."</p>"); } @@ -198,19 +233,29 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ptln(" <table class=\"inline\">"); ptln(" <thead>"); ptln(" <tr>"); - ptln(" <th> </th><th>".$this->lang["user_id"]."</th><th>".$this->lang["user_name"]."</th><th>".$this->lang["user_mail"]."</th><th>".$this->lang["user_groups"]."</th>"); + ptln(" <th> </th> + <th>".$this->lang["user_id"]."</th> + <th>".$this->lang["user_name"]."</th> + <th>".$this->lang["user_mail"]."</th> + <th>".$this->lang["user_groups"]."</th>"); ptln(" </tr>"); ptln(" <tr>"); - ptln(" <td class=\"rightalign\"><input type=\"image\" src=\"".DOKU_PLUGIN_IMAGES."search.png\" name=\"fn[search][new]\" title=\"".$this->lang['search_prompt']."\" alt=\"".$this->lang['search']."\" class=\"button\" /></td>"); - ptln(" <td><input type=\"text\" name=\"userid\" class=\"edit\" value=\"".$this->_htmlFilter('user')."\" /></td>"); - ptln(" <td><input type=\"text\" name=\"username\" class=\"edit\" value=\"".$this->_htmlFilter('name')."\" /></td>"); - ptln(" <td><input type=\"text\" name=\"usermail\" class=\"edit\" value=\"".$this->_htmlFilter('mail')."\" /></td>"); - ptln(" <td><input type=\"text\" name=\"usergroups\" class=\"edit\" value=\"".$this->_htmlFilter('grps')."\" /></td>"); + ptln(" <td class=\"rightalign\"><input type=\"image\" src=\"". + self::IMAGE_DIR."search.png\" name=\"fn[search][new]\" title=\"". + $this->lang['search_prompt']."\" alt=\"".$this->lang['search']."\" class=\"button\" /></td>"); + ptln(" <td><input type=\"text\" name=\"userid\" class=\"edit\" value=\"". + $this->htmlFilter('user')."\" /></td>"); + ptln(" <td><input type=\"text\" name=\"username\" class=\"edit\" value=\"". + $this->htmlFilter('name')."\" /></td>"); + ptln(" <td><input type=\"text\" name=\"usermail\" class=\"edit\" value=\"". + $this->htmlFilter('mail')."\" /></td>"); + ptln(" <td><input type=\"text\" name=\"usergroups\" class=\"edit\" value=\"". + $this->htmlFilter('grps')."\" /></td>"); ptln(" </tr>"); ptln(" </thead>"); - if ($this->_user_total) { + if ($this->users_total) { ptln(" <tbody>"); foreach ($user_list as $user => $userinfo) { extract($userinfo); @@ -220,11 +265,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @var string $mail * @var array $grps */ - $groups = join(', ',$grps); + $groups = join(', ', $grps); ptln(" <tr class=\"user_info\">"); - ptln(" <td class=\"centeralign\"><input type=\"checkbox\" name=\"delete[".hsc($user)."]\" ".$delete_disable." /></td>"); + ptln(" <td class=\"centeralign\"><input type=\"checkbox\" name=\"delete[".hsc($user). + "]\" ".$delete_disable." /></td>"); if ($editable) { - ptln(" <td><a href=\"".wl($ID,array('fn[edit]['.$user.']' => 1, + ptln(" <td><a href=\"".wl($ID, array('fn[edit]['.$user.']' => 1, 'do' => 'admin', 'page' => 'usermanager', 'sectok' => getSecurityToken())). @@ -241,22 +287,27 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ptln(" <tbody>"); ptln(" <tr><td colspan=\"5\" class=\"centeralign\">"); ptln(" <span class=\"medialeft\">"); - ptln(" <button type=\"submit\" name=\"fn[delete]\" id=\"usrmgr__del\" ".$delete_disable.">".$this->lang['delete_selected']."</button>"); + ptln(" <button type=\"submit\" name=\"fn[delete]\" id=\"usrmgr__del\" ".$delete_disable.">". + $this->lang['delete_selected']."</button>"); ptln(" </span>"); ptln(" <span class=\"mediaright\">"); - ptln(" <button type=\"submit\" name=\"fn[start]\" ".$page_buttons['start'].">".$this->lang['start']."</button>"); - ptln(" <button type=\"submit\" name=\"fn[prev]\" ".$page_buttons['prev'].">".$this->lang['prev']."</button>"); - ptln(" <button type=\"submit\" name=\"fn[next]\" ".$page_buttons['next'].">".$this->lang['next']."</button>"); - ptln(" <button type=\"submit\" name=\"fn[last]\" ".$page_buttons['last'].">".$this->lang['last']."</button>"); + ptln(" <button type=\"submit\" name=\"fn[start]\" ".$page_buttons['start'].">". + $this->lang['start']."</button>"); + ptln(" <button type=\"submit\" name=\"fn[prev]\" ".$page_buttons['prev'].">". + $this->lang['prev']."</button>"); + ptln(" <button type=\"submit\" name=\"fn[next]\" ".$page_buttons['next'].">". + $this->lang['next']."</button>"); + ptln(" <button type=\"submit\" name=\"fn[last]\" ".$page_buttons['last'].">". + $this->lang['last']."</button>"); ptln(" </span>"); - if (!empty($this->_filter)) { + if (!empty($this->filter)) { ptln(" <button type=\"submit\" name=\"fn[search][clear]\">".$this->lang['clear']."</button>"); } ptln(" <button type=\"submit\" name=\"fn[export]\">".$export_label."</button>"); ptln(" <input type=\"hidden\" name=\"do\" value=\"admin\" />"); ptln(" <input type=\"hidden\" name=\"page\" value=\"usermanager\" />"); - $this->_htmlFilterSettings(2); + $this->htmlFilterSettings(2); ptln(" </td></tr>"); ptln(" </tbody>"); @@ -266,38 +317,56 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { ptln("</form>"); ptln("</div>"); - $style = $this->_edit_user ? " class=\"edit_user\"" : ""; + $style = $this->edit_user ? " class=\"edit_user\"" : ""; - if ($this->_auth->canDo('addUser')) { + if ($this->auth->canDo('addUser')) { ptln("<div".$style.">"); print $this->locale_xhtml('add'); ptln(" <div class=\"level2\">"); - $this->_htmlUserForm('add',null,array(),4); + $this->htmlUserForm('add', null, array(), 4); ptln(" </div>"); ptln("</div>"); } - if($this->_edit_user && $this->_auth->canDo('UserMod')){ + if ($this->edit_user && $this->auth->canDo('UserMod')) { ptln("<div".$style." id=\"scroll__here\">"); print $this->locale_xhtml('edit'); ptln(" <div class=\"level2\">"); - $this->_htmlUserForm('modify',$this->_edit_user,$this->_edit_userdata,4); + $this->htmlUserForm('modify', $this->edit_user, $this->edit_userdata, 4); ptln(" </div>"); ptln("</div>"); } - if ($this->_auth->canDo('addUser')) { - $this->_htmlImportForm(); + if ($this->auth->canDo('addUser')) { + $this->htmlImportForm(); } ptln("</div>"); return true; } /** + * User Manager is only available if the auth backend supports it + * + * @inheritdoc + * @return bool + */ + public function isAccessibleByCurrentUser() + { + /** @var DokuWiki_Auth_Plugin $auth */ + global $auth; + if(!$auth || !$auth->canDo('getUsers') ) { + return false; + } + + return parent::isAccessibleByCurrentUser(); + } + + + /** * Display form to add or modify a user * * @param string $cmd 'add' or 'modify' @@ -305,7 +374,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param array $userdata array with name, mail, pass and grps * @param int $indent */ - protected function _htmlUserForm($cmd,$user='',$userdata=array(),$indent=0) { + protected function htmlUserForm($cmd, $user = '', $userdata = array(), $indent = 0) + { global $conf; global $ID; global $lang; @@ -315,28 +385,76 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if ($user) { extract($userdata); - if (!empty($grps)) $groups = join(',',$grps); + if (!empty($grps)) $groups = join(',', $grps); } else { - $notes[] = sprintf($this->lang['note_group'],$conf['defaultgroup']); + $notes[] = sprintf($this->lang['note_group'], $conf['defaultgroup']); } - ptln("<form action=\"".wl($ID)."\" method=\"post\">",$indent); + ptln("<form action=\"".wl($ID)."\" method=\"post\">", $indent); formSecurityToken(); - ptln(" <div class=\"table\">",$indent); - ptln(" <table class=\"inline\">",$indent); - ptln(" <thead>",$indent); - ptln(" <tr><th>".$this->lang["field"]."</th><th>".$this->lang["value"]."</th></tr>",$indent); - ptln(" </thead>",$indent); - ptln(" <tbody>",$indent); - - $this->_htmlInputField($cmd."_userid", "userid", $this->lang["user_id"], $user, $this->_auth->canDo("modLogin"), true, $indent+6); - $this->_htmlInputField($cmd."_userpass", "userpass", $this->lang["user_pass"], "", $this->_auth->canDo("modPass"), false, $indent+6); - $this->_htmlInputField($cmd."_userpass2", "userpass2", $lang["passchk"], "", $this->_auth->canDo("modPass"), false, $indent+6); - $this->_htmlInputField($cmd."_username", "username", $this->lang["user_name"], $name, $this->_auth->canDo("modName"), true, $indent+6); - $this->_htmlInputField($cmd."_usermail", "usermail", $this->lang["user_mail"], $mail, $this->_auth->canDo("modMail"), true, $indent+6); - $this->_htmlInputField($cmd."_usergroups","usergroups",$this->lang["user_groups"],$groups,$this->_auth->canDo("modGroups"), false, $indent+6); - - if ($this->_auth->canDo("modPass")) { + ptln(" <div class=\"table\">", $indent); + ptln(" <table class=\"inline\">", $indent); + ptln(" <thead>", $indent); + ptln(" <tr><th>".$this->lang["field"]."</th><th>".$this->lang["value"]."</th></tr>", $indent); + ptln(" </thead>", $indent); + ptln(" <tbody>", $indent); + + $this->htmlInputField( + $cmd . "_userid", + "userid", + $this->lang["user_id"], + $user, + $this->auth->canDo("modLogin"), + true, + $indent + 6 + ); + $this->htmlInputField( + $cmd . "_userpass", + "userpass", + $this->lang["user_pass"], + "", + $this->auth->canDo("modPass"), + false, + $indent + 6 + ); + $this->htmlInputField( + $cmd . "_userpass2", + "userpass2", + $lang["passchk"], + "", + $this->auth->canDo("modPass"), + false, + $indent + 6 + ); + $this->htmlInputField( + $cmd . "_username", + "username", + $this->lang["user_name"], + $name, + $this->auth->canDo("modName"), + true, + $indent + 6 + ); + $this->htmlInputField( + $cmd . "_usermail", + "usermail", + $this->lang["user_mail"], + $mail, + $this->auth->canDo("modMail"), + true, + $indent + 6 + ); + $this->htmlInputField( + $cmd . "_usergroups", + "usergroups", + $this->lang["user_groups"], + $groups, + $this->auth->canDo("modGroups"), + false, + $indent + 6 + ); + + if ($this->auth->canDo("modPass")) { if ($cmd == 'add') { $notes[] = $this->lang['note_pass']; } @@ -344,37 +462,40 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $notes[] = $this->lang['note_notify']; } - ptln("<tr><td><label for=\"".$cmd."_usernotify\" >".$this->lang["user_notify"].": </label></td><td><input type=\"checkbox\" id=\"".$cmd."_usernotify\" name=\"usernotify\" value=\"1\" /></td></tr>", $indent); + ptln("<tr><td><label for=\"".$cmd."_usernotify\" >". + $this->lang["user_notify"].": </label></td> + <td><input type=\"checkbox\" id=\"".$cmd."_usernotify\" name=\"usernotify\" value=\"1\" /> + </td></tr>", $indent); } - ptln(" </tbody>",$indent); - ptln(" <tbody>",$indent); - ptln(" <tr>",$indent); - ptln(" <td colspan=\"2\">",$indent); - ptln(" <input type=\"hidden\" name=\"do\" value=\"admin\" />",$indent); - ptln(" <input type=\"hidden\" name=\"page\" value=\"usermanager\" />",$indent); + ptln(" </tbody>", $indent); + ptln(" <tbody>", $indent); + ptln(" <tr>", $indent); + ptln(" <td colspan=\"2\">", $indent); + ptln(" <input type=\"hidden\" name=\"do\" value=\"admin\" />", $indent); + ptln(" <input type=\"hidden\" name=\"page\" value=\"usermanager\" />", $indent); // save current $user, we need this to access details if the name is changed if ($user) - ptln(" <input type=\"hidden\" name=\"userid_old\" value=\"".hsc($user)."\" />",$indent); + ptln(" <input type=\"hidden\" name=\"userid_old\" value=\"".hsc($user)."\" />", $indent); - $this->_htmlFilterSettings($indent+10); + $this->htmlFilterSettings($indent+10); - ptln(" <button type=\"submit\" name=\"fn[".$cmd."]\">".$this->lang[$cmd]."</button>",$indent); - ptln(" </td>",$indent); - ptln(" </tr>",$indent); - ptln(" </tbody>",$indent); - ptln(" </table>",$indent); + ptln(" <button type=\"submit\" name=\"fn[".$cmd."]\">".$this->lang[$cmd]."</button>", $indent); + ptln(" </td>", $indent); + ptln(" </tr>", $indent); + ptln(" </tbody>", $indent); + ptln(" </table>", $indent); if ($notes) { ptln(" <ul class=\"notes\">"); foreach ($notes as $note) { - ptln(" <li><span class=\"li\">".$note."</li>",$indent); + ptln(" <li><span class=\"li\">".$note."</li>", $indent); } ptln(" </ul>"); } - ptln(" </div>",$indent); - ptln("</form>",$indent); + ptln(" </div>", $indent); + ptln("</form>", $indent); } /** @@ -388,17 +509,18 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param bool $required is this field required? * @param int $indent */ - protected function _htmlInputField($id, $name, $label, $value, $cando, $required, $indent=0) { + protected function htmlInputField($id, $name, $label, $value, $cando, $required, $indent = 0) + { $class = $cando ? '' : ' class="disabled"'; - echo str_pad('',$indent); + echo str_pad('', $indent); - if($name == 'userpass' || $name == 'userpass2'){ + if ($name == 'userpass' || $name == 'userpass2') { $fieldtype = 'password'; $autocomp = 'autocomplete="off"'; - }elseif($name == 'usermail'){ + } elseif ($name == 'usermail') { $fieldtype = 'email'; $autocomp = ''; - }else{ + } else { $fieldtype = 'text'; $autocomp = ''; } @@ -407,13 +529,15 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { echo "<tr $class>"; echo "<td><label for=\"$id\" >$label: </label></td>"; echo "<td>"; - if($cando){ + if ($cando) { $req = ''; - if($required) $req = 'required="required"'; - echo "<input type=\"$fieldtype\" id=\"$id\" name=\"$name\" value=\"$value\" class=\"edit\" $autocomp $req />"; - }else{ + if ($required) $req = 'required="required"'; + echo "<input type=\"$fieldtype\" id=\"$id\" name=\"$name\" + value=\"$value\" class=\"edit\" $autocomp $req />"; + } else { echo "<input type=\"hidden\" name=\"$name\" value=\"$value\" />"; - echo "<input type=\"$fieldtype\" id=\"$id\" name=\"$name\" value=\"$value\" class=\"edit disabled\" disabled=\"disabled\" />"; + echo "<input type=\"$fieldtype\" id=\"$id\" name=\"$name\" + value=\"$value\" class=\"edit disabled\" disabled=\"disabled\" />"; } echo "</td>"; echo "</tr>"; @@ -425,9 +549,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param string $key name of search field * @return string html escaped value */ - protected function _htmlFilter($key) { - if (empty($this->_filter)) return ''; - return (isset($this->_filter[$key]) ? hsc($this->_filter[$key]) : ''); + protected function htmlFilter($key) + { + if (empty($this->filter)) return ''; + return (isset($this->filter[$key]) ? hsc($this->filter[$key]) : ''); } /** @@ -435,12 +560,13 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @param int $indent */ - protected function _htmlFilterSettings($indent=0) { + protected function htmlFilterSettings($indent = 0) + { - ptln("<input type=\"hidden\" name=\"start\" value=\"".$this->_start."\" />",$indent); + ptln("<input type=\"hidden\" name=\"start\" value=\"".$this->start."\" />", $indent); - foreach ($this->_filter as $key => $filter) { - ptln("<input type=\"hidden\" name=\"filter[".$key."]\" value=\"".hsc($filter)."\" />",$indent); + foreach ($this->filter as $key => $filter) { + ptln("<input type=\"hidden\" name=\"filter[".$key."]\" value=\"".hsc($filter)."\" />", $indent); } } @@ -449,57 +575,57 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @param int $indent */ - protected function _htmlImportForm($indent=0) { + protected function htmlImportForm($indent = 0) + { global $ID; - $failure_download_link = wl($ID,array('do'=>'admin','page'=>'usermanager','fn[importfails]'=>1)); + $failure_download_link = wl($ID, array('do'=>'admin','page'=>'usermanager','fn[importfails]'=>1)); - ptln('<div class="level2 import_users">',$indent); + ptln('<div class="level2 import_users">', $indent); print $this->locale_xhtml('import'); - ptln(' <form action="'.wl($ID).'" method="post" enctype="multipart/form-data">',$indent); + ptln(' <form action="'.wl($ID).'" method="post" enctype="multipart/form-data">', $indent); formSecurityToken(); - ptln(' <label>'.$this->lang['import_userlistcsv'].'<input type="file" name="import" /></label>',$indent); - ptln(' <button type="submit" name="fn[import]">'.$this->lang['import'].'</button>',$indent); - ptln(' <input type="hidden" name="do" value="admin" />',$indent); - ptln(' <input type="hidden" name="page" value="usermanager" />',$indent); + ptln(' <label>'.$this->lang['import_userlistcsv'].'<input type="file" name="import" /></label>', $indent); + ptln(' <button type="submit" name="fn[import]">'.$this->lang['import'].'</button>', $indent); + ptln(' <input type="hidden" name="do" value="admin" />', $indent); + ptln(' <input type="hidden" name="page" value="usermanager" />', $indent); - $this->_htmlFilterSettings($indent+4); - ptln(' </form>',$indent); + $this->htmlFilterSettings($indent+4); + ptln(' </form>', $indent); ptln('</div>'); // list failures from the previous import - if ($this->_import_failures) { - $digits = strlen(count($this->_import_failures)); - ptln('<div class="level3 import_failures">',$indent); + if ($this->import_failures) { + $digits = strlen(count($this->import_failures)); + ptln('<div class="level3 import_failures">', $indent); ptln(' <h3>'.$this->lang['import_header'].'</h3>'); - ptln(' <table class="import_failures">',$indent); - ptln(' <thead>',$indent); - ptln(' <tr>',$indent); - ptln(' <th class="line">'.$this->lang['line'].'</th>',$indent); - ptln(' <th class="error">'.$this->lang['error'].'</th>',$indent); - ptln(' <th class="userid">'.$this->lang['user_id'].'</th>',$indent); - ptln(' <th class="username">'.$this->lang['user_name'].'</th>',$indent); - ptln(' <th class="usermail">'.$this->lang['user_mail'].'</th>',$indent); - ptln(' <th class="usergroups">'.$this->lang['user_groups'].'</th>',$indent); - ptln(' </tr>',$indent); - ptln(' </thead>',$indent); - ptln(' <tbody>',$indent); - foreach ($this->_import_failures as $line => $failure) { - ptln(' <tr>',$indent); - ptln(' <td class="lineno"> '.sprintf('%0'.$digits.'d',$line).' </td>',$indent); + ptln(' <table class="import_failures">', $indent); + ptln(' <thead>', $indent); + ptln(' <tr>', $indent); + ptln(' <th class="line">'.$this->lang['line'].'</th>', $indent); + ptln(' <th class="error">'.$this->lang['error'].'</th>', $indent); + ptln(' <th class="userid">'.$this->lang['user_id'].'</th>', $indent); + ptln(' <th class="username">'.$this->lang['user_name'].'</th>', $indent); + ptln(' <th class="usermail">'.$this->lang['user_mail'].'</th>', $indent); + ptln(' <th class="usergroups">'.$this->lang['user_groups'].'</th>', $indent); + ptln(' </tr>', $indent); + ptln(' </thead>', $indent); + ptln(' <tbody>', $indent); + foreach ($this->import_failures as $line => $failure) { + ptln(' <tr>', $indent); + ptln(' <td class="lineno"> '.sprintf('%0'.$digits.'d', $line).' </td>', $indent); ptln(' <td class="error">' .$failure['error'].' </td>', $indent); - ptln(' <td class="field userid"> '.hsc($failure['user'][0]).' </td>',$indent); - ptln(' <td class="field username"> '.hsc($failure['user'][2]).' </td>',$indent); - ptln(' <td class="field usermail"> '.hsc($failure['user'][3]).' </td>',$indent); - ptln(' <td class="field usergroups"> '.hsc($failure['user'][4]).' </td>',$indent); - ptln(' </tr>',$indent); + ptln(' <td class="field userid"> '.hsc($failure['user'][0]).' </td>', $indent); + ptln(' <td class="field username"> '.hsc($failure['user'][2]).' </td>', $indent); + ptln(' <td class="field usermail"> '.hsc($failure['user'][3]).' </td>', $indent); + ptln(' <td class="field usergroups"> '.hsc($failure['user'][4]).' </td>', $indent); + ptln(' </tr>', $indent); } - ptln(' </tbody>',$indent); - ptln(' </table>',$indent); + ptln(' </tbody>', $indent); + ptln(' </table>', $indent); ptln(' <p><a href="'.$failure_download_link.'">'.$this->lang['import_downloadfailures'].'</a></p>'); ptln('</div>'); } - } /** @@ -507,17 +633,18 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @return bool whether succesful */ - protected function _addUser(){ + protected function addUser() + { global $INPUT; if (!checkSecurityToken()) return false; - if (!$this->_auth->canDo('addUser')) return false; + if (!$this->auth->canDo('addUser')) return false; - list($user,$pass,$name,$mail,$grps,$passconfirm) = $this->_retrieveUser(); + list($user,$pass,$name,$mail,$grps,$passconfirm) = $this->retrieveUser(); if (empty($user)) return false; - if ($this->_auth->canDo('modPass')){ - if (empty($pass)){ - if($INPUT->has('usernotify')){ + if ($this->auth->canDo('modPass')) { + if (empty($pass)) { + if ($INPUT->has('usernotify')) { $pass = auth_pwgen($user); } else { msg($this->lang['add_fail'], -1); @@ -525,54 +652,53 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { return false; } } else { - if (!$this->_verifyPassword($pass,$passconfirm)) { + if (!$this->verifyPassword($pass, $passconfirm)) { msg($this->lang['add_fail'], -1); msg($this->lang['addUser_error_pass_not_identical'], -1); return false; } } } else { - if (!empty($pass)){ + if (!empty($pass)) { msg($this->lang['add_fail'], -1); msg($this->lang['addUser_error_modPass_disabled'], -1); return false; } } - if ($this->_auth->canDo('modName')){ - if (empty($name)){ + if ($this->auth->canDo('modName')) { + if (empty($name)) { msg($this->lang['add_fail'], -1); msg($this->lang['addUser_error_name_missing'], -1); return false; } } else { - if (!empty($name)){ + if (!empty($name)) { msg($this->lang['add_fail'], -1); msg($this->lang['addUser_error_modName_disabled'], -1); return false; } } - if ($this->_auth->canDo('modMail')){ - if (empty($mail)){ + if ($this->auth->canDo('modMail')) { + if (empty($mail)) { msg($this->lang['add_fail'], -1); msg($this->lang['addUser_error_mail_missing'], -1); return false; } } else { - if (!empty($mail)){ + if (!empty($mail)) { msg($this->lang['add_fail'], -1); msg($this->lang['addUser_error_modMail_disabled'], -1); return false; } } - if ($ok = $this->_auth->triggerUserMod('create', array($user,$pass,$name,$mail,$grps))) { - + if ($ok = $this->auth->triggerUserMod('create', array($user, $pass, $name, $mail, $grps))) { msg($this->lang['add_ok'], 1); if ($INPUT->has('usernotify') && $pass) { - $this->_notifyUser($user,$pass); + $this->notifyUser($user, $pass); } } else { msg($this->lang['add_fail'], -1); @@ -587,33 +713,34 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @return bool whether succesful */ - protected function _deleteUser(){ + protected function deleteUser() + { global $conf, $INPUT; if (!checkSecurityToken()) return false; - if (!$this->_auth->canDo('delUser')) return false; + if (!$this->auth->canDo('delUser')) return false; $selected = $INPUT->arr('delete'); if (empty($selected)) return false; $selected = array_keys($selected); - if(in_array($_SERVER['REMOTE_USER'], $selected)) { + if (in_array($_SERVER['REMOTE_USER'], $selected)) { msg("You can't delete yourself!", -1); return false; } - $count = $this->_auth->triggerUserMod('delete', array($selected)); + $count = $this->auth->triggerUserMod('delete', array($selected)); if ($count == count($selected)) { $text = str_replace('%d', $count, $this->lang['delete_ok']); msg("$text.", 1); } else { $part1 = str_replace('%d', $count, $this->lang['delete_ok']); $part2 = str_replace('%d', (count($selected)-$count), $this->lang['delete_fail']); - msg("$part1, $part2",-1); + msg("$part1, $part2", -1); } // invalidate all sessions - io_saveFile($conf['cachedir'].'/sessionpurge',time()); + io_saveFile($conf['cachedir'].'/sessionpurge', time()); return true; } @@ -624,20 +751,21 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param string $param id of the user * @return bool whether succesful */ - protected function _editUser($param) { + protected function editUser($param) + { if (!checkSecurityToken()) return false; - if (!$this->_auth->canDo('UserMod')) return false; - $user = $this->_auth->cleanUser(preg_replace('/.*[:\/]/','',$param)); - $userdata = $this->_auth->getUserData($user); + if (!$this->auth->canDo('UserMod')) return false; + $user = $this->auth->cleanUser(preg_replace('/.*[:\/]/', '', $param)); + $userdata = $this->auth->getUserData($user); // no user found? if (!$userdata) { - msg($this->lang['edit_usermissing'],-1); + msg($this->lang['edit_usermissing'], -1); return false; } - $this->_edit_user = $user; - $this->_edit_userdata = $userdata; + $this->edit_user = $user; + $this->edit_userdata = $userdata; return true; } @@ -647,39 +775,39 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @return bool whether succesful */ - protected function _modifyUser(){ + protected function modifyUser() + { global $conf, $INPUT; if (!checkSecurityToken()) return false; - if (!$this->_auth->canDo('UserMod')) return false; + if (!$this->auth->canDo('UserMod')) return false; // get currently valid user data - $olduser = $this->_auth->cleanUser(preg_replace('/.*[:\/]/','',$INPUT->str('userid_old'))); - $oldinfo = $this->_auth->getUserData($olduser); + $olduser = $this->auth->cleanUser(preg_replace('/.*[:\/]/', '', $INPUT->str('userid_old'))); + $oldinfo = $this->auth->getUserData($olduser); // get new user data subject to change - list($newuser,$newpass,$newname,$newmail,$newgrps,$passconfirm) = $this->_retrieveUser(); + list($newuser,$newpass,$newname,$newmail,$newgrps,$passconfirm) = $this->retrieveUser(); if (empty($newuser)) return false; $changes = array(); if ($newuser != $olduser) { - - if (!$this->_auth->canDo('modLogin')) { // sanity check, shouldn't be possible - msg($this->lang['update_fail'],-1); + if (!$this->auth->canDo('modLogin')) { // sanity check, shouldn't be possible + msg($this->lang['update_fail'], -1); return false; } // check if $newuser already exists - if ($this->_auth->getUserData($newuser)) { - msg(sprintf($this->lang['update_exists'],$newuser),-1); + if ($this->auth->getUserData($newuser)) { + msg(sprintf($this->lang['update_exists'], $newuser), -1); $re_edit = true; } else { $changes['user'] = $newuser; } } - if ($this->_auth->canDo('modPass')) { + if ($this->auth->canDo('modPass')) { if ($newpass || $passconfirm) { - if ($this->_verifyPassword($newpass,$passconfirm)) { + if ($this->verifyPassword($newpass, $passconfirm)) { $changes['pass'] = $newpass; } else { return false; @@ -692,33 +820,32 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { } } - if (!empty($newname) && $this->_auth->canDo('modName') && $newname != $oldinfo['name']) { + if (!empty($newname) && $this->auth->canDo('modName') && $newname != $oldinfo['name']) { $changes['name'] = $newname; } - if (!empty($newmail) && $this->_auth->canDo('modMail') && $newmail != $oldinfo['mail']) { + if (!empty($newmail) && $this->auth->canDo('modMail') && $newmail != $oldinfo['mail']) { $changes['mail'] = $newmail; } - if (!empty($newgrps) && $this->_auth->canDo('modGroups') && $newgrps != $oldinfo['grps']) { + if (!empty($newgrps) && $this->auth->canDo('modGroups') && $newgrps != $oldinfo['grps']) { $changes['grps'] = $newgrps; } - if ($ok = $this->_auth->triggerUserMod('modify', array($olduser, $changes))) { - msg($this->lang['update_ok'],1); + if ($ok = $this->auth->triggerUserMod('modify', array($olduser, $changes))) { + msg($this->lang['update_ok'], 1); if ($INPUT->has('usernotify') && !empty($changes['pass'])) { $notify = empty($changes['user']) ? $olduser : $newuser; - $this->_notifyUser($notify,$changes['pass']); + $this->notifyUser($notify, $changes['pass']); } // invalidate all sessions - io_saveFile($conf['cachedir'].'/sessionpurge',time()); - + io_saveFile($conf['cachedir'].'/sessionpurge', time()); } else { - msg($this->lang['update_fail'],-1); + msg($this->lang['update_fail'], -1); } if (!empty($re_edit)) { - $this->_editUser($olduser); + $this->editUser($olduser); } return $ok; @@ -732,9 +859,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param bool $status_alert whether status alert should be shown * @return bool whether succesful */ - protected function _notifyUser($user, $password, $status_alert=true) { + protected function notifyUser($user, $password, $status_alert = true) + { - if ($sent = auth_sendPassword($user,$password)) { + if ($sent = auth_sendPassword($user, $password)) { if ($status_alert) { msg($this->lang['notify_ok'], 1); } @@ -755,7 +883,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param string $confirm repeated password for confirmation * @return bool true if meets requirements, false otherwise */ - protected function _verifyPassword($password, $confirm) { + protected function verifyPassword($password, $confirm) + { global $lang; if (empty($password) && empty($confirm)) { @@ -779,7 +908,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param bool $clean whether the cleanUser method of the authentication backend is applied * @return array (user, password, full name, email, array(groups)) */ - protected function _retrieveUser($clean=true) { + protected function retrieveUser($clean = true) + { /** @var DokuWiki_Auth_Plugin $auth */ global $auth; global $INPUT; @@ -789,14 +919,14 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { $user[1] = $INPUT->str('userpass'); $user[2] = $INPUT->str('username'); $user[3] = $INPUT->str('usermail'); - $user[4] = explode(',',$INPUT->str('usergroups')); + $user[4] = explode(',', $INPUT->str('usergroups')); $user[5] = $INPUT->str('userpass2'); // repeated password for confirmation - $user[4] = array_map('trim',$user[4]); - if($clean) $user[4] = array_map(array($auth,'cleanGroup'),$user[4]); + $user[4] = array_map('trim', $user[4]); + if ($clean) $user[4] = array_map(array($auth,'cleanGroup'), $user[4]); $user[4] = array_filter($user[4]); $user[4] = array_unique($user[4]); - if(!count($user[4])) $user[4] = null; + if (!count($user[4])) $user[4] = null; return $user; } @@ -806,17 +936,18 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @param string $op 'new' or 'clear' */ - protected function _setFilter($op) { + protected function setFilter($op) + { - $this->_filter = array(); + $this->filter = array(); if ($op == 'new') { - list($user,/* $pass */,$name,$mail,$grps) = $this->_retrieveUser(false); + list($user,/* $pass */,$name,$mail,$grps) = $this->retrieveUser(false); - if (!empty($user)) $this->_filter['user'] = $user; - if (!empty($name)) $this->_filter['name'] = $name; - if (!empty($mail)) $this->_filter['mail'] = $mail; - if (!empty($grps)) $this->_filter['grps'] = join('|',$grps); + if (!empty($user)) $this->filter['user'] = $user; + if (!empty($name)) $this->filter['name'] = $name; + if (!empty($mail)) $this->filter['mail'] = $mail; + if (!empty($grps)) $this->filter['grps'] = join('|', $grps); } } @@ -825,7 +956,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @return array */ - protected function _retrieveFilter() { + protected function retrieveFilter() + { global $INPUT; $t_filter = $INPUT->arr('filter'); @@ -844,14 +976,15 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * Validate and improve the pagination values */ - protected function _validatePagination() { + protected function validatePagination() + { - if ($this->_start >= $this->_user_total) { - $this->_start = $this->_user_total - $this->_pagesize; + if ($this->start >= $this->users_total) { + $this->start = $this->users_total - $this->pagesize; } - if ($this->_start < 0) $this->_start = 0; + if ($this->start < 0) $this->start = 0; - $this->_last = min($this->_user_total, $this->_start + $this->_pagesize); + $this->last = min($this->users_total, $this->start + $this->pagesize); } /** @@ -859,21 +992,23 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @return array with enable/disable attributes */ - protected function _pagination() { + protected function pagination() + { $disabled = 'disabled="disabled"'; $buttons = array(); - $buttons['start'] = $buttons['prev'] = ($this->_start == 0) ? $disabled : ''; + $buttons['start'] = $buttons['prev'] = ($this->start == 0) ? $disabled : ''; - if ($this->_user_total == -1) { + if ($this->users_total == -1) { $buttons['last'] = $disabled; $buttons['next'] = ''; } else { - $buttons['last'] = $buttons['next'] = (($this->_start + $this->_pagesize) >= $this->_user_total) ? $disabled : ''; + $buttons['last'] = $buttons['next'] = + (($this->start + $this->pagesize) >= $this->users_total) ? $disabled : ''; } - if ($this->_lastdisabled) { + if ($this->lastdisabled) { $buttons['last'] = $disabled; } @@ -883,9 +1018,10 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * Export a list of users in csv format using the current filter criteria */ - protected function _export() { + protected function exportCSV() + { // list of users for export - based on current filter criteria - $user_list = $this->_auth->retrieveUsers(0, 0, $this->_filter); + $user_list = $this->auth->retrieveUsers(0, 0, $this->filter); $column_headings = array( $this->lang["user_id"], $this->lang["user_name"], @@ -902,14 +1038,16 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { # header('Content-type: text/plain;charset=utf-8'); // output the csv - $fd = fopen('php://output','w'); + $fd = fopen('php://output', 'w'); fputcsv($fd, $column_headings); foreach ($user_list as $user => $info) { - $line = array($user, $info['name'], $info['mail'], join(',',$info['grps'])); + $line = array($user, $info['name'], $info['mail'], join(',', $info['grps'])); fputcsv($fd, $line); } fclose($fd); - if (defined('DOKU_UNITTEST')){ return; } + if (defined('DOKU_UNITTEST')) { + return; + } die; } @@ -921,25 +1059,28 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * * @return bool whether successful */ - protected function _import() { + protected function importCSV() + { // check we are allowed to add users if (!checkSecurityToken()) return false; - if (!$this->_auth->canDo('addUser')) return false; + if (!$this->auth->canDo('addUser')) return false; // check file uploaded ok. - if (empty($_FILES['import']['size']) || !empty($_FILES['import']['error']) && $this->_isUploadedFile($_FILES['import']['tmp_name'])) { - msg($this->lang['import_error_upload'],-1); + if (empty($_FILES['import']['size']) || + !empty($_FILES['import']['error']) && $this->isUploadedFile($_FILES['import']['tmp_name']) + ) { + msg($this->lang['import_error_upload'], -1); return false; } // retrieve users from the file - $this->_import_failures = array(); + $this->import_failures = array(); $import_success_count = 0; $import_fail_count = 0; $line = 0; - $fd = fopen($_FILES['import']['tmp_name'],'r'); + $fd = fopen($_FILES['import']['tmp_name'], 'r'); if ($fd) { - while($csv = fgets($fd)){ - if (!utf8_check($csv)) { + while ($csv = fgets($fd)) { + if (!\dokuwiki\Utf8\Clean::isUtf8($csv)) { $csv = utf8_encode($csv); } $raw = str_getcsv($csv); @@ -951,35 +1092,42 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if (count($raw) < 4) { // need at least four fields $import_fail_count++; $error = sprintf($this->lang['import_error_fields'], count($raw)); - $this->_import_failures[$line] = array('error' => $error, 'user' => $raw, 'orig' => $csv); + $this->import_failures[$line] = array('error' => $error, 'user' => $raw, 'orig' => $csv); continue; } - array_splice($raw,1,0,auth_pwgen()); // splice in a generated password - $clean = $this->_cleanImportUser($raw, $error); - if ($clean && $this->_addImportUser($clean, $error)) { - $sent = $this->_notifyUser($clean[0],$clean[1],false); - if (!$sent){ - msg(sprintf($this->lang['import_notify_fail'],$clean[0],$clean[3]),-1); + array_splice($raw, 1, 0, auth_pwgen()); // splice in a generated password + $clean = $this->cleanImportUser($raw, $error); + if ($clean && $this->importUser($clean, $error)) { + $sent = $this->notifyUser($clean[0], $clean[1], false); + if (!$sent) { + msg(sprintf($this->lang['import_notify_fail'], $clean[0], $clean[3]), -1); } $import_success_count++; } else { $import_fail_count++; array_splice($raw, 1, 1); // remove the spliced in password - $this->_import_failures[$line] = array('error' => $error, 'user' => $raw, 'orig' => $csv); + $this->import_failures[$line] = array('error' => $error, 'user' => $raw, 'orig' => $csv); } } - msg(sprintf($this->lang['import_success_count'], ($import_success_count+$import_fail_count), $import_success_count),($import_success_count ? 1 : -1)); + msg( + sprintf( + $this->lang['import_success_count'], + ($import_success_count + $import_fail_count), + $import_success_count + ), + ($import_success_count ? 1 : -1) + ); if ($import_fail_count) { - msg(sprintf($this->lang['import_failure_count'], $import_fail_count),-1); + msg(sprintf($this->lang['import_failure_count'], $import_fail_count), -1); } } else { - msg($this->lang['import_error_readfail'],-1); + msg($this->lang['import_error_readfail'], -1); } // save import failures into the session if (!headers_sent()) { session_start(); - $_SESSION['import_failures'] = $this->_import_failures; + $_SESSION['import_failures'] = $this->import_failures; session_write_close(); } return true; @@ -992,17 +1140,18 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param string $error * @return array|false cleaned data or false */ - protected function _cleanImportUser($candidate, & $error){ + protected function cleanImportUser($candidate, & $error) + { global $INPUT; - // kludgy .... + // FIXME kludgy .... $INPUT->set('userid', $candidate[0]); $INPUT->set('userpass', $candidate[1]); $INPUT->set('username', $candidate[2]); $INPUT->set('usermail', $candidate[3]); $INPUT->set('usergroups', $candidate[4]); - $cleaned = $this->_retrieveUser(); + $cleaned = $this->retrieveUser(); list($user,/* $pass */,$name,$mail,/* $grps */) = $cleaned; if (empty($user)) { $error = $this->lang['import_error_baduserid']; @@ -1011,12 +1160,12 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { // no need to check password, handled elsewhere - if (!($this->_auth->canDo('modName') xor empty($name))){ + if (!($this->auth->canDo('modName') xor empty($name))) { $error = $this->lang['import_error_badname']; return false; } - if ($this->_auth->canDo('modMail')) { + if ($this->auth->canDo('modMail')) { if (empty($mail) || !mail_isvalid($mail)) { $error = $this->lang['import_error_badmail']; return false; @@ -1040,8 +1189,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param string &$error reference catched error message * @return bool whether successful */ - protected function _addImportUser($user, & $error){ - if (!$this->_auth->triggerUserMod('create', $user)) { + protected function importUser($user, &$error) + { + if (!$this->auth->triggerUserMod('create', $user)) { $error = $this->lang['import_error_create']; return false; } @@ -1052,7 +1202,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { /** * Downloads failures as csv file */ - protected function _downloadImportFailures(){ + protected function downloadImportFailures() + { // ============================================================================================== // GENERATE OUTPUT @@ -1063,8 +1214,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { # header('Content-type: text/plain;charset=utf-8'); // output the csv - $fd = fopen('php://output','w'); - foreach ($this->_import_failures as $fail) { + $fd = fopen('php://output', 'w'); + foreach ($this->import_failures as $fail) { fputs($fd, $fail['orig']); } fclose($fd); @@ -1077,7 +1228,8 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @param string $file filename * @return bool */ - protected function _isUploadedFile($file) { + protected function isUploadedFile($file) + { return is_uploaded_file($file); } } diff --git a/lib/plugins/usermanager/lang/ar/lang.php b/lib/plugins/usermanager/lang/ar/lang.php index 0a751e7fb..7cff02980 100644 --- a/lib/plugins/usermanager/lang/ar/lang.php +++ b/lib/plugins/usermanager/lang/ar/lang.php @@ -2,10 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Yaman Hokan <always.smile.yh@hotmail.com> * @author Usama Akkad <uahello@gmail.com> - * @author uahello@gmail.com */ $lang['menu'] = 'مدير المستخدمين'; $lang['noauth'] = '(مصادقة المستخدمين غير متوفرة)'; diff --git a/lib/plugins/usermanager/lang/bg/lang.php b/lib/plugins/usermanager/lang/bg/lang.php index f98cc8c40..533fe70ff 100644 --- a/lib/plugins/usermanager/lang/bg/lang.php +++ b/lib/plugins/usermanager/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Nikolay Vladimirov <nikolay@vladimiroff.com> * @author Viktor Usunov <usun0v@mail.bg> * @author Kiril <neohidra@gmail.com> diff --git a/lib/plugins/usermanager/lang/ca/lang.php b/lib/plugins/usermanager/lang/ca/lang.php index 36b777455..c9ccaa41a 100644 --- a/lib/plugins/usermanager/lang/ca/lang.php +++ b/lib/plugins/usermanager/lang/ca/lang.php @@ -3,11 +3,10 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Adolfo Jayme Barrientos <fito@libreoffice.org> * @author Carles Bellver <carles.bellver@gmail.com> - * @author carles.bellver@gmail.com - * @author carles.bellver@cent.uji.es - * @author Carles Bellver <carles.bellver@cent.uji.es> - * @author daniel@6temes.cat + * @author carles.bellver <carles.bellver@cent.uji.es> + * @author daniel <daniel@6temes.cat> */ $lang['menu'] = 'Gestió d\'usuaris'; $lang['noauth'] = '(l\'autenticació d\'usuaris no està disponible)'; @@ -30,6 +29,11 @@ $lang['search'] = 'Cerca'; $lang['search_prompt'] = 'Fes la cerca'; $lang['clear'] = 'Reinicia el filtre de cerca'; $lang['filter'] = 'Filtre'; +$lang['export_all'] = 'Exporta tots els usuaris (CSV)'; +$lang['export_filtered'] = 'Exporta la llista filtrada d’usuaris (CSV)'; +$lang['import'] = 'Importa usuaris nous'; +$lang['line'] = 'Línia nro.'; +$lang['error'] = 'Missatge d’error'; $lang['summary'] = 'Visualització d\'usuaris %1$d-%2$d de %3$d trobats. %4$d usuaris en total.'; $lang['nonefound'] = 'No s\'han trobat usuaris. %d usuaris en total.'; $lang['delete_ok'] = 'S\'han suprimit %d usuaris'; @@ -50,3 +54,9 @@ $lang['add_ok'] = 'L\'usuari s\'ha afegit amb èxit'; $lang['add_fail'] = 'No s\'ha pogut afegir l\'usuari'; $lang['notify_ok'] = 'S\'ha enviat el correu de notificació'; $lang['notify_fail'] = 'No s\'ha pogut enviar el correu de notificació'; +$lang['import_userlistcsv'] = 'Fitxer de llista d’usuaris (CSV):'; +$lang['import_error_badname'] = 'Nom incorrecte'; +$lang['import_error_badmail'] = 'Adreça electrònica incorrecta'; +$lang['import_error_create'] = 'No es pot crear l’usuari'; +$lang['addUser_error_pass_not_identical'] = 'Les contrasenyes introduïdes no són idèntiques.'; +$lang['addUser_error_name_missing'] = 'Introduïu un nom per a l’usuari nou.'; diff --git a/lib/plugins/usermanager/lang/cs/lang.php b/lib/plugins/usermanager/lang/cs/lang.php index 3ed18006a..326ae7edf 100644 --- a/lib/plugins/usermanager/lang/cs/lang.php +++ b/lib/plugins/usermanager/lang/cs/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Petr Kajzar <petr.kajzar@lf1.cuni.cz> * @author Tomas Valenta <t.valenta@sh.cvut.cz> * @author Zbynek Krivka <zbynek.krivka@seznam.cz> * @author Bohumir Zamecnik <bohumir@zamecnik.org> @@ -75,7 +76,7 @@ $lang['import_error_upload'] = 'Import selhal. CSV soubor nemohl být nahrán $lang['import_error_readfail'] = 'Import selhal. Nelze číst nahraný soubor.'; $lang['import_error_create'] = 'Nelze vytvořit uživatele'; $lang['import_notify_fail'] = 'Importovanému uživateli %s s e-mailem %s nemohlo být zasláno upozornění.'; -$lang['import_downloadfailures'] = 'Stáhnout chyby pro nápravu jako CVS'; +$lang['import_downloadfailures'] = 'Stáhnout chyby pro nápravu jako CSV'; $lang['addUser_error_missing_pass'] = 'Buď prosím nastavte heslo nebo aktivujte upozorňování uživatel aby fungovalo vytváření hesel.'; $lang['addUser_error_pass_not_identical'] = 'Zadaná hesla nebyla shodná.'; $lang['addUser_error_modPass_disabled'] = 'Změna hesel je momentálně zakázána.'; diff --git a/lib/plugins/usermanager/lang/da/import.txt b/lib/plugins/usermanager/lang/da/import.txt index 8ff1946b8..4bd9a8409 100644 --- a/lib/plugins/usermanager/lang/da/import.txt +++ b/lib/plugins/usermanager/lang/da/import.txt @@ -1,9 +1,9 @@ -===== Samling af Brugere Import ===== +===== Import af brugere ===== -Kræver en CSV-fil med brugere på mindst fire kolonner. -Kolonnerne skal indeholde, i denne orden: bruger-id, fulde navn, email-adresse og grupper. -CSV-felterne skal separeres af kommaer (,) og strengafgrænser med anførelsestegn (%%""%%). Backslash (\) kan benyttes som "escape character". -For et eksempel på en brugbar fil, kan du prøve "Eksportér Brugere"-funktionen her over. -Overlappende bruger-id'er bliver ignoreret. +Kræver en CSV-fil med brugere, med mindst fire kolonner. +Kolonnerne skal indeholde, i denne orden: brugernavn, fulde navn, e-mail adresse og grupper. +CSV-felterne skal separeres af kommaer (,) og tekststrenge afgrænses med anførelsestegn (%%""%%). Omvent skråstreg (\) kan benyttes som "escape character". +For et eksempel på filformat, kan du prøve "Eksportér Brugere"-funktionen herover. +Bruger-id'er som allerede eksisterer importeres ikke. -En adgangskode vil blive genereret og sendt til hver succesfuldt importeret bruger.
\ No newline at end of file +En adgangskode vil blive genereret og sendt til hver importeret bruger.
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/da/lang.php b/lib/plugins/usermanager/lang/da/lang.php index b4e3c6c25..96af57f0c 100644 --- a/lib/plugins/usermanager/lang/da/lang.php +++ b/lib/plugins/usermanager/lang/da/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jacob Palm <mail@jacobpalm.dk> * @author Lars Næsbye Christensen <larsnaesbye@stud.ku.dk> * @author Kalle Sommer Nielsen <kalle@php.net> * @author Esben Laursen <hyber@hyber.dk> @@ -16,11 +17,11 @@ $lang['menu'] = 'Brugerstyring'; $lang['noauth'] = '(Brugervalidering er ikke tilgængelig)'; $lang['nosupport'] = '(Brugerstyring er ikke understøttet)'; -$lang['badauth'] = 'Ugyldig brugerbekræftelsesfunktion'; -$lang['user_id'] = 'Bruger'; +$lang['badauth'] = 'Ugyldig brugerbekræftelsesmetode'; +$lang['user_id'] = 'Brugernavn'; $lang['user_pass'] = 'Adgangskode'; $lang['user_name'] = 'Navn'; -$lang['user_mail'] = 'E-mail'; +$lang['user_mail'] = 'E-mail adresse'; $lang['user_groups'] = 'Grupper'; $lang['field'] = 'Felt'; $lang['value'] = 'Værdi'; @@ -34,9 +35,9 @@ $lang['search'] = 'Søg'; $lang['search_prompt'] = 'Udfør søgning'; $lang['clear'] = 'Nulstil søgefilter'; $lang['filter'] = 'Filter'; -$lang['export_all'] = 'Eksportér Alle Brugere (CSV)'; -$lang['export_filtered'] = 'Eksportér Filtrerede Brugerliste (CSV)'; -$lang['import'] = 'Importér Nye Brugere'; +$lang['export_all'] = 'Eksporter alle brugere (CSV)'; +$lang['export_filtered'] = 'Eksporter filteret brugerliste (CSV)'; +$lang['import'] = 'Importér nye brugere'; $lang['line'] = 'Linje nr.'; $lang['error'] = 'Fejlmeddelelse'; $lang['summary'] = 'Viser brugerne %1$d-%2$d ud af %3$d fundne. %4$d brugere totalt.'; @@ -44,31 +45,39 @@ $lang['nonefound'] = 'Ingen brugere fundet. %d brugere totalt.'; $lang['delete_ok'] = '%d brugere slettet'; $lang['delete_fail'] = '%d kunne ikke slettes.'; $lang['update_ok'] = 'Bruger opdateret korrekt'; -$lang['update_fail'] = 'Brugeropdatering mislykkedes'; -$lang['update_exists'] = 'Ændring af brugernavn mislykkedes, det valgte brugernavn (%s) er allerede optaget (andre ændringer vil blive udført).'; +$lang['update_fail'] = 'Opdatering af bruger mislykkedes'; +$lang['update_exists'] = 'Ændring af brugernavn mislykkedes, det valgte brugernavn (%s) er allerede benyttet (øvrige ændringer vil blive udført).'; $lang['start'] = 'begynde'; $lang['prev'] = 'forrige'; $lang['next'] = 'næste'; $lang['last'] = 'sidste'; $lang['edit_usermissing'] = 'Den valgte bruger blev ikke fundet. Brugernavnet kan være slettet eller ændret andetsteds.'; -$lang['user_notify'] = 'Meddel bruger'; -$lang['note_notify'] = 'Meddelelser bliver kun sendt, hvis brugeren får givet et nyt adgangskode.'; +$lang['user_notify'] = 'Notificer bruger'; +$lang['note_notify'] = 'Notifikationsmails bliver kun sendt, hvis brugeren får tildelt en nyt adgangskode.'; $lang['note_group'] = 'Nye brugere vil blive tilføjet til standardgruppen (%s), hvis ingen gruppe er opgivet.'; -$lang['note_pass'] = 'Adgangskoden vil blive dannet automatisk, hvis feltet er tomt og underretning af brugeren er aktiveret.'; +$lang['note_pass'] = 'Adgangskoden vil blive dannet automatisk hvis feltet er tomt og underretning af brugeren er aktiveret.'; $lang['add_ok'] = 'Bruger tilføjet uden fejl.'; $lang['add_fail'] = 'Tilføjelse af bruger mislykkedes'; -$lang['notify_ok'] = 'Meddelelse sendt'; -$lang['notify_fail'] = 'Meddelelse kunne ikke sendes'; -$lang['import_userlistcsv'] = 'Brugerlistefil (CSV):'; -$lang['import_header'] = 'Nyeste Import - Fejl'; -$lang['import_success_count'] = 'Bruger-Import: %d brugere fundet, %d importeret med succes.'; -$lang['import_failure_count'] = 'Bruger-Import: %d fejlet. Fejl er listet nedenfor.'; -$lang['import_error_fields'] = 'Utilstrækkelige felter, fandt %d, påkrævet 4.'; +$lang['notify_ok'] = 'Notifikationsmail sendt'; +$lang['notify_fail'] = 'Notifikationsmail kunne ikke sendes'; +$lang['import_userlistcsv'] = 'Fil med brugerliste (CSV):'; +$lang['import_header'] = 'Nyeste import - fejl'; +$lang['import_success_count'] = 'Bruger import: %d brugere fundet, %d importeret med succes.'; +$lang['import_failure_count'] = 'Bruger import: %d fejlet. Fejl er listet nedenfor.'; +$lang['import_error_fields'] = 'Utilstrækkelige felter - fandt %d, påkrævet 4.'; $lang['import_error_baduserid'] = 'Bruger-id mangler'; $lang['import_error_badname'] = 'Ugyldigt navn'; $lang['import_error_badmail'] = 'Ugyldig email-adresse'; -$lang['import_error_upload'] = 'Import Fejlet. CSV-filen kunne ikke uploades eller er tom.'; -$lang['import_error_readfail'] = 'Import Fejlet. Ikke muligt at læse uploadede fil.'; +$lang['import_error_upload'] = 'Import fejlet. CSV-filen kunne ikke uploades, eller er tom.'; +$lang['import_error_readfail'] = 'Import fejlet. Ikke muligt at læse uploadede fil.'; $lang['import_error_create'] = 'Ikke muligt at oprette brugeren'; -$lang['import_notify_fail'] = 'Notifikationsmeddelelse kunne ikke sendes for importerede bruger %s, med emailen %s.'; -$lang['import_downloadfailures'] = 'Download Fejl som CSV til rettelser'; +$lang['import_notify_fail'] = 'Notifikationsmeddelelse kunne ikke sendes for importerede bruger %s, med e-mail adressen %s.'; +$lang['import_downloadfailures'] = 'Download fejlliste som CSV, til rettelse'; +$lang['addUser_error_missing_pass'] = 'Angiv venligst en adgangskode, eller aktiver brugernotifikation for at tillade dannelse af adgangskoder.'; +$lang['addUser_error_pass_not_identical'] = 'De indtastede adgangskoder var ikke ens.'; +$lang['addUser_error_modPass_disabled'] = 'Skift af adgangskode er i øjeblikket deaktiveret'; +$lang['addUser_error_name_missing'] = 'Indtast venligst et navn til den nye bruger.'; +$lang['addUser_error_modName_disabled'] = 'Ændring af navne er i øjeblikket deaktiveret.'; +$lang['addUser_error_mail_missing'] = 'Indtast venligst en e-mail adresse til den nye bruger'; +$lang['addUser_error_modMail_disabled'] = 'Ændring af e-mail adresser er i øjeblikket deaktiveret.'; +$lang['addUser_error_create_event_failed'] = 'En udvidelse forhindrede den nye bruger i at blive tilføjet. For yderligere information, kontroller om der er øvrige fejlmeddelelser.'; diff --git a/lib/plugins/usermanager/lang/el/lang.php b/lib/plugins/usermanager/lang/el/lang.php index a838f7346..609b99ac4 100644 --- a/lib/plugins/usermanager/lang/el/lang.php +++ b/lib/plugins/usermanager/lang/el/lang.php @@ -3,13 +3,14 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Katerina Katapodi <extragold1234@hotmail.com> * @author Chris Smith <chris@jalakai.co.uk> * @author Thanos Massias <tm@thriasio.gr> * @author Αθανάσιος Νταής <homunculus@wana.gr> * @author Konstantinos Koryllos <koryllos@gmail.com> * @author George Petsagourakis <petsagouris@gmail.com> * @author Petros Vidalis <pvidalis@gmail.com> - * @author Vasileios Karavasilis vasileioskaravasilis@gmail.com + * @author Vasileios Karavasilis <vasileioskaravasilis@gmail.com> */ $lang['menu'] = 'Διαχείριση Χρηστών'; $lang['noauth'] = '(η είσοδος χρηστών δεν είναι δυνατή)'; @@ -32,6 +33,11 @@ $lang['search'] = 'Αναζήτηση'; $lang['search_prompt'] = 'Εκκίνηση αναζήτησης'; $lang['clear'] = 'Καθαρισμός φίλτρων'; $lang['filter'] = 'Φίλτρο'; +$lang['export_all'] = 'Εξάγετε Όλους τους Χρήστες (CSV)'; +$lang['export_filtered'] = 'Επεξεργασία Λίστας Εξαγωγής Χρήστη (CSV)'; +$lang['import'] = 'Εισάγετε Νέους Χρήστες'; +$lang['line'] = 'Αριθμός Σειράς'; +$lang['error'] = 'Μήνυμα λάθους'; $lang['summary'] = 'Εμφάνιση χρηστών %1$d-%2$d από %3$d σχετικούς. %4$d χρήστες συνολικά.'; $lang['nonefound'] = 'Δεν βρέθηκαν σχετικοί χρήστες. %d χρήστες συνολικά.'; $lang['delete_ok'] = '%d χρήστες διεγράφησαν'; @@ -52,3 +58,24 @@ $lang['add_ok'] = 'Επιτυχημένη εγγραφή χρή $lang['add_fail'] = 'Η εγγραφή του χρήστη απέτυχε'; $lang['notify_ok'] = 'Εστάλη ενημερωτικό e-mail'; $lang['notify_fail'] = 'Δεν ήταν δυνατή η αποστολή του ενημερωτικού e-mail'; +$lang['import_userlistcsv'] = 'Αρχείο λίστας Χρήστη'; +$lang['import_header'] = 'Η Τελευταία Εισαγωγή-Λάθη'; +$lang['import_success_count'] = 'Εισαγωγή χρήστη: %d χρήστες βρέθηκαν%d εισήχθηκε με επιτυχία.. '; +$lang['import_failure_count'] = 'Εισαγωγή χρήστη: %d απέτυχαν. Τα λάθη παρατίθενται πιο κάτω.. '; +$lang['import_error_fields'] = 'Δεν υπάρχουν αρκετά πεδία, βρέθηκε %d, χρειάζονται 4.'; +$lang['import_error_baduserid'] = 'Το id του χρήστη λείπει'; +$lang['import_error_badname'] = 'Λάθος όνομα'; +$lang['import_error_badmail'] = 'Λάθος διεύθυνση ηλεκτρονικού ταχυδρομείου'; +$lang['import_error_upload'] = 'Η εισαγωγή απέτυχε. Ο φάκελλος csv δεν μπόρεσε να φορτωθεί ή είναι άδειος.'; +$lang['import_error_readfail'] = 'Η εισαγωγή Απέτυχε. Δεν μπόρεσε να διαβάσει τον φάκελλο που φορτώθηκε. '; +$lang['import_error_create'] = 'Δεν μπόρεσε να δημιουργήσει τον χρήστη'; +$lang['import_notify_fail'] = 'Το μήνυμα ειδοποίησης δεν μπόρεσε να αποσταλεί για τον χρήστη που εισήχθηκε, %s με email %s.'; +$lang['import_downloadfailures'] = 'Αποτυχίες στο κατέβασμα ως CSV για διόρθωση'; +$lang['addUser_error_missing_pass'] = 'Παρακαλώ είτε βάλετε έναν κωδικό πρόσβασης ή ενεργοποιείστε την ειδοποίηση χρήστη για την αναπαραγωγή κωδικού πάλι.'; +$lang['addUser_error_pass_not_identical'] = 'Οι κωδικοί πρόσβασης που εισήχθηκαν δεν ήταν οι ίδιοι.'; +$lang['addUser_error_modPass_disabled'] = 'Η τροποποίηση των κωδικών πρόσβασης είναι προς το παρόν απενεργοποιημένη'; +$lang['addUser_error_name_missing'] = 'Παρακαλώ εισάγετε όνομα για τον νέο χρήστη.'; +$lang['addUser_error_modName_disabled'] = 'Δεν μπορεί προς το παρόν να γίνει αλλαγή ονομάτων γιατί η λειτουργία αυτή είναι απενεργοποιημένη.'; +$lang['addUser_error_mail_missing'] = 'Παρακαλώ εισάγετε Διεύθυνση Ηλεκτρονικού Ταχυδρομείου για τον νέο χρήστη.'; +$lang['addUser_error_modMail_disabled'] = 'Η αλλαγή Διευθύνσεων Email είναι προς το παρόν απενεργοποιημένη.'; +$lang['addUser_error_create_event_failed'] = 'Ένα επιπρόσθετο εμπόδισε την πρόσθεση νέου χρήστη. Είναι πιθανόν να ελέγξουμε άλλα μηνύματα για περισσότερες πληροφορίες.'; diff --git a/lib/plugins/usermanager/lang/fa/lang.php b/lib/plugins/usermanager/lang/fa/lang.php index 02734fef1..b79d34310 100644 --- a/lib/plugins/usermanager/lang/fa/lang.php +++ b/lib/plugins/usermanager/lang/fa/lang.php @@ -5,8 +5,7 @@ * * @author behrad eslamifar <behrad_es@yahoo.com) * @author Mohsen Firoozmandan <info@mambolearn.com> - * @author omidmr@gmail.com - * @author Omid Mottaghi <omidmr@gmail.com> + * @author omidmr <omidmr@gmail.com> * @author Mohammad Reza Shoaei <shoaei@gmail.com> * @author Milad DZand <M.DastanZand@gmail.com> * @author AmirH Hassaneini <mytechmix@gmail.com> diff --git a/lib/plugins/usermanager/lang/fi/lang.php b/lib/plugins/usermanager/lang/fi/lang.php index dba67fb61..d376c8100 100644 --- a/lib/plugins/usermanager/lang/fi/lang.php +++ b/lib/plugins/usermanager/lang/fi/lang.php @@ -2,9 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * - * @author otto@valjakko.net - * @author Otto Vainio <otto@valjakko.net> + * + * @author otto <otto@valjakko.net> * @author Teemu Mattila <ghcsystems@gmail.com> * @author Sami Olmari <sami@olmari.fi> * @author Jussi Takala <jussi.takala@live.fi> diff --git a/lib/plugins/usermanager/lang/id/lang.php b/lib/plugins/usermanager/lang/id/lang.php index 425b2ff59..0fa847a94 100644 --- a/lib/plugins/usermanager/lang/id/lang.php +++ b/lib/plugins/usermanager/lang/id/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Irwan Butar Butar <irwansah.putra@gmail.com> * @author Yustinus Waruwu <juswaruwu@gmail.com> */ diff --git a/lib/plugins/usermanager/lang/is/lang.php b/lib/plugins/usermanager/lang/is/lang.php index cabf83d64..7801ffdee 100644 --- a/lib/plugins/usermanager/lang/is/lang.php +++ b/lib/plugins/usermanager/lang/is/lang.php @@ -1,5 +1,8 @@ <?php + /** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * * Icelandic language file * * @author Hrannar Baldursson <hrannar.baldursson@gmail.com> diff --git a/lib/plugins/usermanager/lang/ja/import.txt b/lib/plugins/usermanager/lang/ja/import.txt index 4987df0e3..cacf063ed 100644 --- a/lib/plugins/usermanager/lang/ja/import.txt +++ b/lib/plugins/usermanager/lang/ja/import.txt @@ -1,10 +1,10 @@ ===== 一括ユーザーインポート ===== 少なくとも4列のユーザーCSVファイルが必要です。 -列の順序: ユーザーID、フルネーム、電子メールアドレス、グループ。 +列には、「ユーザーID、フルネーム、メールアドレス、グループ」を、この順序で含む必要があります。 CSVフィールドはカンマ(,)区切り、文字列は引用符(%%""%%)区切りです。 エスケープにバックスラッシュ(\)を使用できます。 -適切なファイル例は、上記の"エクスポートユーザー"機能で試して下さい。 +適切なファイル例を確認するには、上記の"エクスポートユーザー"機能をお試し下さい。 重複するユーザーIDは無視されます。 -正常にインポートされたユーザー毎に、パスワードを作成し、電子メールで送付します。
\ No newline at end of file +正常にインポートされたユーザー毎に、パスワードを作成し、Eメールで送付します。
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/ja/lang.php b/lib/plugins/usermanager/lang/ja/lang.php index 5c252bb2f..fbd9b11fb 100644 --- a/lib/plugins/usermanager/lang/ja/lang.php +++ b/lib/plugins/usermanager/lang/ja/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> * @author Yuji Takenaka <webmaster@davilin.com> * @author Chris Smith <chris@jalakai.co.uk> * @author Ikuo Obataya <i.obataya@gmail.com> @@ -11,7 +12,6 @@ * @author Taisuke Shimamoto <dentostar@gmail.com> * @author Satoshi Sahara <sahara.satoshi@gmail.com> * @author Hideaki SAWADA <sawadakun@live.jp> - * @author Hideaki SAWADA <chuno@live.jp> */ $lang['menu'] = 'ユーザー管理'; $lang['noauth'] = '(ユーザー認証が無効です)'; @@ -39,11 +39,11 @@ $lang['export_filtered'] = '抽出したユーザー一覧のエクスポ $lang['import'] = '新規ユーザーのインポート'; $lang['line'] = '行番号'; $lang['error'] = 'エラーメッセージ'; -$lang['summary'] = 'ユーザー %1$d-%2$d / %3$d, 総ユーザー数 %4$d'; -$lang['nonefound'] = 'ユーザーが見つかりません, 総ユーザー数 %d'; +$lang['summary'] = '見つかったユーザー %3$d件中 %1$d-%2$d件目を表示しています。総ユーザー数 %4$d'; +$lang['nonefound'] = 'ユーザーが見つかりません。総ユーザー数 %d'; $lang['delete_ok'] = '%d ユーザーが削除されました'; $lang['delete_fail'] = '%d ユーザーの削除に失敗しました'; -$lang['update_ok'] = 'ユーザーは更新されました'; +$lang['update_ok'] = 'ユーザーは正常に更新されました'; $lang['update_fail'] = 'ユーザーの更新に失敗しました'; $lang['update_exists'] = 'ユーザー名(%s)は既に存在するため、ユーザー名の変更に失敗しました(その他の項目は変更されました)。'; $lang['start'] = '最初'; @@ -55,7 +55,7 @@ $lang['user_notify'] = 'ユーザーに通知する'; $lang['note_notify'] = '通知メールは、ユーザーに新たなパスワードが設定された場合のみ送信されます。'; $lang['note_group'] = 'グループを指定しない場合は、既定のグループ(%s)に配属されます。'; $lang['note_pass'] = '”ユーザーに通知する”をチェックしてパスワードを空欄にすると、パスワードは自動生成されます。'; -$lang['add_ok'] = 'ユーザーを登録しました'; +$lang['add_ok'] = 'ユーザーを正常に登録しました'; $lang['add_fail'] = 'ユーザーの登録に失敗しました'; $lang['notify_ok'] = '通知メールを送信しました'; $lang['notify_fail'] = '通知メールを送信できませんでした'; @@ -72,8 +72,8 @@ $lang['import_error_readfail'] = 'インポートが失敗しました。アッ $lang['import_error_create'] = 'ユーザーが作成できません。'; $lang['import_notify_fail'] = '通知メッセージがインポートされたユーザー(%s)・電子メールアドレス(%s)に送信できませんでした。'; $lang['import_downloadfailures'] = '修正用に失敗を CSVファイルとしてダウンロードする。'; -$lang['addUser_error_missing_pass'] = 'パスワードを設定するかパスワードの自動生成できるようにユーザーへの通知を有効にして下さい。'; -$lang['addUser_error_pass_not_identical'] = '入力されたパスワードは同一ではありません。'; +$lang['addUser_error_missing_pass'] = 'パスワードを設定するか、パスワードを自動生成できるようにユーザーへの通知を有効にして下さい。'; +$lang['addUser_error_pass_not_identical'] = '確認用のパスワードが間違っています。'; $lang['addUser_error_modPass_disabled'] = 'パスワードの変更は現在無効になっています。'; $lang['addUser_error_name_missing'] = '新規ユーザーのフルネームを入力してください。'; $lang['addUser_error_modName_disabled'] = 'フルネームの変更は現在無効になっています。'; diff --git a/lib/plugins/usermanager/lang/lt/lang.php b/lib/plugins/usermanager/lang/lt/lang.php index 3c0029303..2039de459 100644 --- a/lib/plugins/usermanager/lang/lt/lang.php +++ b/lib/plugins/usermanager/lang/lt/lang.php @@ -2,9 +2,9 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author grawity <grawity@gmail.com> - * @author audrius.klevas@gmail.com + * @author audrius.klevas <audrius.klevas@gmail.com> * @author Arunas Vaitekunas <aras@fan.lt> */ $lang['menu'] = 'Vartotojų administravimas'; diff --git a/lib/plugins/usermanager/lang/no/lang.php b/lib/plugins/usermanager/lang/no/lang.php index 8bd88945d..04a76912e 100644 --- a/lib/plugins/usermanager/lang/no/lang.php +++ b/lib/plugins/usermanager/lang/no/lang.php @@ -12,8 +12,7 @@ * @author Knut Staring <knutst@gmail.com> * @author Lisa Ditlefsen <lisa@vervesearch.com> * @author Erik Pedersen <erik.pedersen@shaw.ca> - * @author Erik Bjørn Pedersen <erik.pedersen@shaw.ca> - * @author Rune Rasmussen syntaxerror.no@gmail.com + * @author Rune Rasmussen <syntaxerror.no@gmail.com> * @author Jon Bøe <jonmagneboe@hotmail.com> * @author Egil Hansen <egil@rosetta.no> * @author Arne Hanssen <arne.hanssen@getmail.no> diff --git a/lib/plugins/usermanager/lang/oc/lang.php b/lib/plugins/usermanager/lang/oc/lang.php new file mode 100644 index 000000000..ca4d88815 --- /dev/null +++ b/lib/plugins/usermanager/lang/oc/lang.php @@ -0,0 +1,41 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author En Mathis <heartattack@free.fr> + */ +$lang['menu'] = 'Gestion dels utilizaires'; +$lang['user_id'] = 'Utilizaire'; +$lang['user_pass'] = 'Senhal'; +$lang['user_name'] = 'Nom vertadièr'; +$lang['user_mail'] = 'Corrièl'; +$lang['user_groups'] = 'Grops'; +$lang['field'] = 'Camp'; +$lang['value'] = 'Valor'; +$lang['add'] = 'Ajustar'; +$lang['delete'] = 'Suprimir'; +$lang['edit'] = 'Modificar'; +$lang['edit_prompt'] = 'Modificar aqueste utilizaire'; +$lang['modify'] = 'Salvagardar los cambiaments'; +$lang['search'] = 'Recercar'; +$lang['filter'] = 'Filtre'; +$lang['line'] = 'Numèro de linha'; +$lang['error'] = 'Messatge d\'error'; +$lang['start'] = 'començar'; +$lang['prev'] = 'precedent'; +$lang['next'] = 'seguent'; +$lang['last'] = 'darrièr'; +$lang['user_notify'] = 'Avisar l\'utilizaire'; +$lang['add_fail'] = 'Fracàs de l\'apondon de l\'utilizaire'; +$lang['notify_ok'] = 'Corrièl de notificacion enviat'; +$lang['notify_fail'] = 'Lo corrièl de notificacion a pas pogut èsser enviat'; +$lang['import_userlistcsv'] = 'Fichièr lista d\'utilizaire (CSV) :'; +$lang['import_error_badname'] = 'Marrit nom'; +$lang['import_error_badmail'] = 'Marrida adreça de corrièl'; +$lang['import_error_create'] = 'Creacion impossibla de l\'utilizaire'; +$lang['addUser_error_modPass_disabled'] = 'La modificacion dels senhals es desactivada pel moment'; +$lang['addUser_error_name_missing'] = 'Picatz lo nom del nòu utilizaire.'; +$lang['addUser_error_modName_disabled'] = 'La modificacion dels noms es desactivada pel moment.'; +$lang['addUser_error_mail_missing'] = 'Picatz l\'adreça pel nòu utilizaire'; +$lang['addUser_error_modMail_disabled'] = 'La modificacion de las adreças es desactivada pel moment.'; diff --git a/lib/plugins/usermanager/lang/oc/list.txt b/lib/plugins/usermanager/lang/oc/list.txt new file mode 100644 index 000000000..d5fc36919 --- /dev/null +++ b/lib/plugins/usermanager/lang/oc/list.txt @@ -0,0 +1 @@ +===== Lista utilizaire =====
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/pt/add.txt b/lib/plugins/usermanager/lang/pt/add.txt index a4c2672c7..83ff95c64 100644 --- a/lib/plugins/usermanager/lang/pt/add.txt +++ b/lib/plugins/usermanager/lang/pt/add.txt @@ -1 +1 @@ -===== Adicionar Utilizador =====
\ No newline at end of file +===== Adicionar Usuário =====
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/pt/delete.txt b/lib/plugins/usermanager/lang/pt/delete.txt index 95bffc1e3..6b9680438 100644 --- a/lib/plugins/usermanager/lang/pt/delete.txt +++ b/lib/plugins/usermanager/lang/pt/delete.txt @@ -1 +1 @@ -===== Remover Utilizador =====
\ No newline at end of file +===== Remover usuário =====
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/pt/edit.txt b/lib/plugins/usermanager/lang/pt/edit.txt index 176798454..3b8ea7e3c 100644 --- a/lib/plugins/usermanager/lang/pt/edit.txt +++ b/lib/plugins/usermanager/lang/pt/edit.txt @@ -1 +1 @@ -===== Editar Utilizador =====
\ No newline at end of file +===== Editar Usuário =====
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/pt/import.txt b/lib/plugins/usermanager/lang/pt/import.txt index 3a604030c..c4650a31d 100644 --- a/lib/plugins/usermanager/lang/pt/import.txt +++ b/lib/plugins/usermanager/lang/pt/import.txt @@ -1,9 +1,9 @@ -===== Importação de Utilizadores em Massa ===== +===== Importação de Usuários em Massa ===== -Requer um ficheiro CSV de utilizadores com pelo menos quatro colunas. -As colunas têm de conter, em ordem: id de utilizador, nome completo, endereço de email e grupos. -Os campos CSV devem ser separados por vírgulas (,) e as strings delimitadas por aspas (""). A contra-barra (\) pode ser usada para escapar. -Para um exemplo de um ficheiro adequado, tente a função "Exportar Utilizadores" acima. -Ids de utilizador duplicados serão ignorados. +Requer um arquivo CSV de usuários com pelo menos quatro colunas. +As colunas têm de conter, em ordem: id do usuário, nome completo, e-mail e grupos. +Os campos CSV devem ser separados por vírgulas (,) e as strings delimitadas por aspas (%%""%%). A contra-barra (\) pode ser usada para escapar algum caractere. +Para um exemplo de um arquivo adequado, tente a função "Exportar Usuários" acima. +Ids de usuário duplicados serão ignorados. -Uma senha será gerada e enviada por email a cada utilizador importado com sucesso.
\ No newline at end of file +Uma senha será gerada e enviada por e-mail a cada usuário importado com sucesso.
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/pt/intro.txt b/lib/plugins/usermanager/lang/pt/intro.txt index 27985ded6..1a5a4ec25 100644 --- a/lib/plugins/usermanager/lang/pt/intro.txt +++ b/lib/plugins/usermanager/lang/pt/intro.txt @@ -1 +1 @@ -===== Gerir Utilizadores =====
\ No newline at end of file +===== Gerenciar Usuários =====
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/pt/lang.php b/lib/plugins/usermanager/lang/pt/lang.php index b12e5dc70..45a30dc48 100644 --- a/lib/plugins/usermanager/lang/pt/lang.php +++ b/lib/plugins/usermanager/lang/pt/lang.php @@ -3,22 +3,26 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Paulo Schopf <pschopf@gmail.com> + * @author Mario AlexandTeixeira dos Santos <masterofclan@gmail.com> + * @author Maykon Oliveira <maykonoliveira850@gmail.com> + * @author José Vieira <jmsv63@gmail.com> * @author José Monteiro <Jose.Monteiro@DoWeDo-IT.com> * @author Enrico Nicoletto <liverig@gmail.com> * @author Fil <fil@meteopt.com> * @author André Neves <drakferion@gmail.com> - * @author José Campos zecarlosdecampos@gmail.com + * @author José Campos <zecarlosdecampos@gmail.com> * @author Guido Salatino <guidorafael23@gmail.com> * @author Romulo Pereira <romuloccomp@gmail.com> * @author Paulo Carmino <contato@paulocarmino.com> * @author Alfredo Silva <alfredo.silva@sky.com> * @author Guilherme Sá <guilherme.sa@hotmail.com> */ -$lang['menu'] = 'Gestor de Perfis'; -$lang['noauth'] = '(autenticação indisponível)'; -$lang['nosupport'] = '(gestão de utilizadores não suportada)'; +$lang['menu'] = 'Gerenciador de Perfis'; +$lang['noauth'] = '(autenticação de usuário indisponível)'; +$lang['nosupport'] = '(gerenciamento de usuários não suportado)'; $lang['badauth'] = 'Mecanismo de autenticação inválido'; -$lang['user_id'] = 'Utilizador'; +$lang['user_id'] = 'Usuário'; $lang['user_pass'] = 'Senha'; $lang['user_name'] = 'Nome Real'; $lang['user_mail'] = 'E-mail'; @@ -26,52 +30,59 @@ $lang['user_groups'] = 'Grupos'; $lang['field'] = 'Campo'; $lang['value'] = 'Valor'; $lang['add'] = 'Adicionar'; -$lang['delete'] = 'Remover'; -$lang['delete_selected'] = 'Remover Seleccionado(s)'; +$lang['delete'] = 'Excluir'; +$lang['delete_selected'] = 'Excluir Selecionado(s)'; $lang['edit'] = 'Editar'; -$lang['edit_prompt'] = 'Editar utilizador'; -$lang['modify'] = 'Gravar Alterações'; +$lang['edit_prompt'] = 'Editar usuário'; +$lang['modify'] = 'Salvar Alterações'; $lang['search'] = 'Pesquisar'; $lang['search_prompt'] = 'Pesquisar'; $lang['clear'] = 'Limpar Filtro de Pesquisa'; $lang['filter'] = 'Filtro'; -$lang['export_all'] = 'Exportar Todos os Utilizadores (CSV)'; -$lang['export_filtered'] = 'Exportar a lista de utilizadores filtrada (CSV)'; -$lang['import'] = 'Importar Novos Utilizadores'; -$lang['line'] = 'Linha nº -'; +$lang['export_all'] = 'Exportar Todos os Usuários (CSV)'; +$lang['export_filtered'] = 'Exportar a Lista de Usuários Filtrada (CSV)'; +$lang['import'] = 'Importar Novos Usuários'; +$lang['line'] = 'Linha nº'; $lang['error'] = 'Mensagem de erro'; -$lang['summary'] = 'Apresentar utilizadores %1$d-%2$d de %3$d encontrados. %4$d inscritos.'; -$lang['nonefound'] = 'Nenhum utilizador encontrado. %d inscritos.'; -$lang['delete_ok'] = '%d utilizadores removidos'; -$lang['delete_fail'] = '%d remoções falhadas.'; -$lang['update_ok'] = 'Utilizador actualizado'; -$lang['update_fail'] = 'Utilizador não actualizado'; -$lang['update_exists'] = 'Falhou a alteração do nome, porque o utilizador (%s) já existe (as restantes alterações serão aplicadas).'; -$lang['start'] = 'primeiro'; +$lang['summary'] = 'Mostrando usuários %1$d-%2$d de %3$d encontrados. Total de %4$d inscritos.'; +$lang['nonefound'] = 'Nenhum usuário encontrado. Total de %d inscritos.'; +$lang['delete_ok'] = '%d usuários excluídos'; +$lang['delete_fail'] = '%d exclusões com erro.'; +$lang['update_ok'] = 'Usuário atualizado'; +$lang['update_fail'] = 'Usuário não atualizado'; +$lang['update_exists'] = 'Erro na alteração do nome, porque o usuário (%s) já existe (as alterações restantes serão aplicadas).'; +$lang['start'] = 'início'; $lang['prev'] = 'anterior'; $lang['next'] = 'seguinte'; $lang['last'] = 'último'; -$lang['edit_usermissing'] = 'Utilizador seleccionado não encontrado. Terá já sido removido ou alterado entretanto?'; -$lang['user_notify'] = 'Notificar utilizador'; -$lang['note_notify'] = 'Notificações só são enviadas se for atribuída uma nova senha ao utilizador.'; -$lang['note_group'] = 'Os novos utilizadores são adicionados ao grupo por omissão (%s) se não for especificado nenhum grupo.'; -$lang['note_pass'] = 'A password será automáticamente gerada se o campo esquerdo estiver vazio e a notificação de utilizador estiver activada.'; -$lang['add_ok'] = 'Utilizador adicionado.'; -$lang['add_fail'] = 'Utilizador não adicionado.'; -$lang['notify_ok'] = 'Mensagem de notificação enviada.'; -$lang['notify_fail'] = 'Não foi possível enviar mensagem de notificação'; -$lang['import_userlistcsv'] = 'Arquivo de lista do usuário (CSV): +$lang['edit_usermissing'] = 'Usuário selecionado não encontrado. Terá já sido excluído ou alterado?'; +$lang['user_notify'] = 'Notificar usuário'; +$lang['note_notify'] = 'Notificações só são enviadas se for atribuída uma nova senha ao usuário.'; +$lang['note_group'] = 'Os novos usuários são adicionados ao grupo padrão (%s) se não for especificado nenhum grupo.'; +$lang['note_pass'] = 'A senha será automaticamente gerada se o campo esquerdo estiver vazio e a notificação de usuário estiver ativada.'; +$lang['add_ok'] = 'Usuário adicionado'; +$lang['add_fail'] = 'Usuário não adicionado'; +$lang['notify_ok'] = 'E-mail de notificação enviada.'; +$lang['notify_fail'] = 'Não foi possível enviar e-mail de notificação'; +$lang['import_userlistcsv'] = 'Arquivo de lista de usuário (CSV): '; -$lang['import_header'] = 'Mais Recentes Importações - Falhas'; -$lang['import_success_count'] = 'Importar Utilizadores: %d utiliyadores encontrados, %d importados com sucesso.'; -$lang['import_failure_count'] = 'Importar Utilizadores: %d falharam. As falhas estão listadas abaixo.'; +$lang['import_header'] = 'Importações Mais Recentes - Falhas'; +$lang['import_success_count'] = 'Importar Usuários: %d usuários encontrados, %d importados com sucesso.'; +$lang['import_failure_count'] = 'Importar Usuários: %d falharam. As falhas estão listadas abaixo.'; $lang['import_error_fields'] = 'Campos insuficientes, encontrados %d mas requeridos 4.'; -$lang['import_error_baduserid'] = 'Falta id de utilizador'; +$lang['import_error_baduserid'] = 'Falta id de usuário'; $lang['import_error_badname'] = 'Nome inválido'; -$lang['import_error_badmail'] = 'E-Mail inválido'; -$lang['import_error_upload'] = 'Falhou a importação. O ficheiro csv não pôde ser importado ou está vazio.'; -$lang['import_error_readfail'] = 'Falhou a importação. Não foi possível ler o ficheiro submetido.'; -$lang['import_error_create'] = 'Não foi possível criar o utilizador.'; -$lang['import_notify_fail'] = 'A mensagem de notificação não pôde ser enviada para o utilizador importado, %s com email %s.'; -$lang['import_downloadfailures'] = 'Baixe Falhas como CSV para a correção'; +$lang['import_error_badmail'] = 'E-mail inválido'; +$lang['import_error_upload'] = 'Erro na importação. O arquivo csv não pôde ser importado ou está vazio.'; +$lang['import_error_readfail'] = 'Erro na importação. Não foi possível ler o arquivo submetido.'; +$lang['import_error_create'] = 'Não foi possível criar o usuário'; +$lang['import_notify_fail'] = 'A mensagem de notificação não pôde ser enviada para o usuário importado, %s com e-mail %s.'; +$lang['import_downloadfailures'] = 'Baixar Falhas como CSV para correção'; +$lang['addUser_error_missing_pass'] = 'Por favor, defina uma senha ou ative a notificação do usuário para ativar a geração de senha.'; +$lang['addUser_error_pass_not_identical'] = 'As senhas digitadas não são idênticas.'; +$lang['addUser_error_modPass_disabled'] = 'A alteração de senhas está desativada no momento'; +$lang['addUser_error_name_missing'] = 'Por favor, insira um nome para o novo usuário.'; +$lang['addUser_error_modName_disabled'] = 'A alteração de nomes está desativada no momento.'; +$lang['addUser_error_mail_missing'] = 'Por favor, insira um endereço de e-mail para o novo usuário.'; +$lang['addUser_error_modMail_disabled'] = 'A alteração do e-mail está desativada no momento.'; +$lang['addUser_error_create_event_failed'] = 'Um plugin impediu que o novo usuário fosse adicionado. Revise outras possíveis mensagens para mais informações.'; diff --git a/lib/plugins/usermanager/lang/pt/list.txt b/lib/plugins/usermanager/lang/pt/list.txt index 01a0460aa..630647f9e 100644 --- a/lib/plugins/usermanager/lang/pt/list.txt +++ b/lib/plugins/usermanager/lang/pt/list.txt @@ -1 +1 @@ -===== Lista de Utilizadores =====
\ No newline at end of file +===== Lista de Usuários =====
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/ro/lang.php b/lib/plugins/usermanager/lang/ro/lang.php index d65fac95b..4ef6843e9 100644 --- a/lib/plugins/usermanager/lang/ro/lang.php +++ b/lib/plugins/usermanager/lang/ro/lang.php @@ -4,14 +4,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Sergiu Baltariu <s_baltariu@yahoo.com> - * @author s_baltariu@yahoo.com * @author Emanuel-Emeric Andrasi <n30@mandrivausers.ro> - * @author Emanuel-Emeric Andrași <n30@mandrivausers.ro> * @author Emanuel-Emeric Andraşi <em.andrasi@mandrivausers.ro> - * @author Emanuel-Emeric Andrasi <em.andrasi@mandrivausers.ro> * @author Marius OLAR <olarmariusalex@gmail.com> - * @author Marius Olar <olarmariusalex@yahoo.com> - * @author Emanuel-Emeric Andrași <em.andrasi@mandrivausers.ro> */ $lang['menu'] = 'Manager Utilizatori'; $lang['noauth'] = '(autentificarea utilizatorilor nu este disponibilă)'; diff --git a/lib/plugins/usermanager/lang/ru/import.txt b/lib/plugins/usermanager/lang/ru/import.txt index 0f303f32c..02a6a7925 100644 --- a/lib/plugins/usermanager/lang/ru/import.txt +++ b/lib/plugins/usermanager/lang/ru/import.txt @@ -1,9 +1,9 @@ ===== Импорт нескольких пользователей ===== -Потребуется список пользователей в файле формата CSV, состоящем из 4 столбцов. -Столбцы должны быть заполнены следующим образом: user-id, полное имя, эл. почта, группы. -Поля CSV должны быть отделены запятой (,), а строки должны быть заключены в кавычки (%%""%%). Обратный слэш (\) используется для экранирования. -В качестве примера можете взять список пользователей, экспортированный через «Экспорт пользователей». -Повторяющиеся идентификаторы user-id будут игнорироваться. +Потребуется список пользователей в файле формата CSV, состоящем из 4 столбцов. +Столбцы должны быть заполнены следующим образом: идентификатор, полное имя, эл. почта, группы. +Поля CSV должны быть разделены запятой (,), а строки должны быть заключены в кавычки (%%""%%). Обратный слэш (\) используется для экранирования. +В качестве примера можете взять список пользователей, полученный через «Экспорт пользователей». +Повторяющиеся идентификаторы будут игнорироваться. -Пароль доступа будет сгенерирован и отправлен по почте удачно импортированному пользователю. +Пароль доступа будет сгенерирован и отправлен по почте удачно импортированному пользователю.
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/ru/lang.php b/lib/plugins/usermanager/lang/ru/lang.php index d0f98184d..f5d0e7a9c 100644 --- a/lib/plugins/usermanager/lang/ru/lang.php +++ b/lib/plugins/usermanager/lang/ru/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Aleksandr Selivanov <alexgearbox@yandex.ru> * @author Yuriy Skalko <yuriy.skalko@gmail.com> * @author Denis Simakov <akinoame1@gmail.com> * @author Andrew Pleshakov <beotiger@mail.ru> @@ -13,7 +14,6 @@ * @author Kirill Krasnov <krasnovforum@gmail.com> * @author Vlad Tsybenko <vlad.development@gmail.com> * @author Aleksey Osadchiy <rfc@nm.ru> - * @author Aleksandr Selivanov <alexgearbox@gmail.com> * @author Ladyko Andrey <fylh@succexy.spb.ru> * @author Eugene <windy.wanderer@gmail.com> * @author Johnny Utah <pcpa@cyberpunk.su> @@ -55,7 +55,7 @@ $lang['delete_ok'] = 'Удалено пользователей: %d' $lang['delete_fail'] = 'Не удалось удалить %d.'; $lang['update_ok'] = 'Пользователь успешно обновлён'; $lang['update_fail'] = 'Не удалось обновить пользователя'; -$lang['update_exists'] = 'Не удалось изменить имя пользователя, такой пользователь (%s) уже существует (все остальные изменения будут применены).'; +$lang['update_exists'] = 'Не удалось изменить имя пользователя, потому что такой пользователь (%s) уже существует (все остальные изменения будут применены).'; $lang['start'] = 'в начало'; $lang['prev'] = 'назад'; $lang['next'] = 'вперёд'; @@ -71,7 +71,7 @@ $lang['notify_ok'] = 'Письмо с уведомлением от $lang['notify_fail'] = 'Не удалось отправить письмо с уведомлением'; $lang['import_userlistcsv'] = 'Файл со списком пользователей (CSV):'; $lang['import_header'] = 'Последний импорт — список ошибок'; -$lang['import_success_count'] = 'Импорт пользователей: %d пользователей найдено, %d импортировано успешно.'; +$lang['import_success_count'] = 'Импорт пользователей. Найдено пользователей: %d, импортировано успешно: %d.'; $lang['import_failure_count'] = 'Импорт пользователей: %d не удалось. Ошибки перечислены ниже.'; $lang['import_error_fields'] = 'Не все поля заполнены. Найдено %d, а требуется 4.'; $lang['import_error_baduserid'] = 'Отсутствует идентификатор пользователя'; @@ -81,12 +81,12 @@ $lang['import_error_upload'] = 'Импорт не удался. CSV-файл $lang['import_error_readfail'] = 'Импорт не удался. Невозможно прочесть загруженный файл.'; $lang['import_error_create'] = 'Невозможно создать пользователя'; $lang['import_notify_fail'] = 'Оповещение не может быть отправлено импортированному пользователю %s по электронной почте %s.'; -$lang['import_downloadfailures'] = 'Скачать ошибки в формате CSV для исправления'; +$lang['import_downloadfailures'] = 'Скачать ошибочные данные в формате CSV для исправления'; $lang['addUser_error_missing_pass'] = 'Для возможности генерации пароля, пожалуйста, установите пароль или активируйте оповещения.'; $lang['addUser_error_pass_not_identical'] = 'Введённые пароли не совпадают.'; $lang['addUser_error_modPass_disabled'] = 'Изменение пароля в настоящее время невозможно.'; $lang['addUser_error_name_missing'] = 'Укажите имя нового пользователя.'; $lang['addUser_error_modName_disabled'] = 'Изменение имени в настоящее время невозможно.'; $lang['addUser_error_mail_missing'] = 'Укажите адрес эл. почты нового пользователя.'; -$lang['addUser_error_modMail_disabled'] = 'Изменение e-mail в настоящее время невозможно.'; +$lang['addUser_error_modMail_disabled'] = 'Изменение адреса эл. почты отключено.'; $lang['addUser_error_create_event_failed'] = 'Плагин заблокировал добавление нового пользователя. Смотрите также другие сообщения.'; diff --git a/lib/plugins/usermanager/lang/sk/lang.php b/lib/plugins/usermanager/lang/sk/lang.php index 96f8fb60e..d244408a7 100644 --- a/lib/plugins/usermanager/lang/sk/lang.php +++ b/lib/plugins/usermanager/lang/sk/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Peter Mydliar <peto.mydliar@gmail.com> * @author Martin Michalek <michalek.dev@gmail.com> * @author Ondrej Végh <ov@vsieti.sk> * @author Michal Mesko <michal.mesko@gmail.com> @@ -67,6 +68,7 @@ $lang['import_error_readfail'] = 'Import neúspešný. Nie je možné prečíta $lang['import_error_create'] = 'Nie je možné vytvoriť pouzívateľa'; $lang['import_notify_fail'] = 'Správa nemohla byť zaslaná importovanému používatelovi, %s s emailom %s.'; $lang['import_downloadfailures'] = 'Stiahnuť chyby vo formáte CSV za účelom opravy'; +$lang['addUser_error_pass_not_identical'] = 'Zadané heslo nie je identické.'; $lang['addUser_error_modPass_disabled'] = 'Zmena hesla nie je momentálne povolená'; $lang['addUser_error_name_missing'] = 'Prosím zadajte meno nového používateľa.'; $lang['addUser_error_modName_disabled'] = 'Zmena mena nie je momentálne povolená.'; diff --git a/lib/plugins/usermanager/lang/sr/lang.php b/lib/plugins/usermanager/lang/sr/lang.php index 858a2139b..5339e4ac1 100644 --- a/lib/plugins/usermanager/lang/sr/lang.php +++ b/lib/plugins/usermanager/lang/sr/lang.php @@ -3,8 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * - * @author Иван Петровић petrovicivan@ubuntusrbija.org - * @author Ivan Petrovic <petrovicivan@ubuntusrbija.org> + * @author Иван Петровић <petrovicivan@ubuntusrbija.org> * @author Miroslav Šolti <solti.miroslav@gmail.com> */ $lang['menu'] = 'Управљач корисницима'; diff --git a/lib/plugins/usermanager/lang/th/lang.php b/lib/plugins/usermanager/lang/th/lang.php index d6e14f65f..0062dbedc 100644 --- a/lib/plugins/usermanager/lang/th/lang.php +++ b/lib/plugins/usermanager/lang/th/lang.php @@ -2,9 +2,8 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Komgrit Niyomrath <n.komgrit@gmail.com> - * @author Kittithat Arnontavilas mrtomyum@gmail.com * @author Kittithat Arnontavilas <mrtomyum@gmail.com> * @author Thanasak Sompaisansin <jombthep@gmail.com> */ diff --git a/lib/plugins/usermanager/lang/tr/lang.php b/lib/plugins/usermanager/lang/tr/lang.php index 6329803a8..97044ce24 100644 --- a/lib/plugins/usermanager/lang/tr/lang.php +++ b/lib/plugins/usermanager/lang/tr/lang.php @@ -2,12 +2,12 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Aydın Coşkuner <aydinweb@gmail.com> * @author Cihan Kahveci <kahvecicihan@gmail.com> * @author Yavuz Selim <yavuzselim@gmail.com> * @author Caleb Maclennan <caleb@alerque.com> - * @author farukerdemoncel@gmail.com + * @author farukerdemoncel <farukerdemoncel@gmail.com> */ $lang['menu'] = 'Kullanıcı Yönetimi'; $lang['noauth'] = '(kullanıcı onaylaması yoktur)'; diff --git a/lib/plugins/usermanager/lang/vi/add.txt b/lib/plugins/usermanager/lang/vi/add.txt new file mode 100644 index 000000000..8684ee564 --- /dev/null +++ b/lib/plugins/usermanager/lang/vi/add.txt @@ -0,0 +1 @@ +===== Thêm thành viên =====
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/vi/delete.txt b/lib/plugins/usermanager/lang/vi/delete.txt new file mode 100644 index 000000000..786ea4616 --- /dev/null +++ b/lib/plugins/usermanager/lang/vi/delete.txt @@ -0,0 +1 @@ +===== Xóa thành viên =====
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/vi/edit.txt b/lib/plugins/usermanager/lang/vi/edit.txt new file mode 100644 index 000000000..2cca5cb2d --- /dev/null +++ b/lib/plugins/usermanager/lang/vi/edit.txt @@ -0,0 +1 @@ +===== Sửa đổi thành viên =====
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/vi/import.txt b/lib/plugins/usermanager/lang/vi/import.txt new file mode 100644 index 000000000..b2118bd78 --- /dev/null +++ b/lib/plugins/usermanager/lang/vi/import.txt @@ -0,0 +1,8 @@ +===== Nhập số lượng lớn thành viên ===== + +Yêu cầu tập tin CSV của thành viên có ít nhất bốn cột. +Các cột phải chứa, theo thứ tự: id thành viên, tên đầy đủ, địa chỉ email và các nhóm. +Các trường CSV nên được phân tách bằng dấu phẩy (,) và chuỗi được phân cách bằng dấu ngoặc kép (%%""%%). Dấu gạch chéo ngược (\) có thể được sử dụng để thoát. +Để biết ví dụ về một tệp phù hợp, hãy thử chức năng "Xuất thành viên" ở trên. +Id thành viên trùng lặp sẽ bị bỏ qua. +Một mật khẩu sẽ được tạo và gửi qua email cho mỗi thành viên được nhập thành công.
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/vi/intro.txt b/lib/plugins/usermanager/lang/vi/intro.txt new file mode 100644 index 000000000..083cca434 --- /dev/null +++ b/lib/plugins/usermanager/lang/vi/intro.txt @@ -0,0 +1 @@ +====== Trình quản lý thành viên ======
\ No newline at end of file diff --git a/lib/plugins/usermanager/lang/vi/lang.php b/lib/plugins/usermanager/lang/vi/lang.php new file mode 100644 index 000000000..7c811ef39 --- /dev/null +++ b/lib/plugins/usermanager/lang/vi/lang.php @@ -0,0 +1,74 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['menu'] = 'Trình quản lý thành viên'; +$lang['noauth'] = '(xác thực thành viên không có sẵn)'; +$lang['nosupport'] = '(quản lý thành viên không được hỗ trợ)'; +$lang['badauth'] = 'cơ chế xác thực không hợp lệ'; +$lang['user_id'] = 'Thành viên'; +$lang['user_pass'] = 'Mật khẩu'; +$lang['user_name'] = 'Tên thật'; +$lang['user_mail'] = 'Thư điện tử'; +$lang['user_groups'] = 'Nhóm'; +$lang['field'] = 'Trường'; +$lang['value'] = 'Giá trị'; +$lang['add'] = 'Thêm'; +$lang['delete'] = 'Xóa'; +$lang['delete_selected'] = 'Xóa những mục đã chọn'; +$lang['edit'] = 'Sửa'; +$lang['edit_prompt'] = 'Sửa đổi thành viên này'; +$lang['modify'] = 'Lưu thay đổi'; +$lang['search'] = 'Tìm kiếm'; +$lang['search_prompt'] = 'Thực hiện tìm kiếm'; +$lang['clear'] = 'Đặt lại bộ lọc tìm kiếm'; +$lang['filter'] = 'Bộ lọc'; +$lang['export_all'] = 'Xuất tất cả thành viên (CSV)'; +$lang['export_filtered'] = 'Xuất danh sách thành viên được lọc (CSV)'; +$lang['import'] = 'Nhập thành viên mới'; +$lang['line'] = 'Dòng số'; +$lang['error'] = 'Thông báo lỗi'; +$lang['summary'] = 'Hiển thị thành viên %1$d-%2$d trong %3$d được tìm thấy. %4$d thành viên tổng cộng.'; +$lang['nonefound'] = 'Không tìm thấy thành viên. %d thành viên tổng cộng.'; +$lang['delete_ok'] = 'Đã xóa %d thành viên.'; +$lang['delete_fail'] = 'Xóa không thành công %d'; +$lang['update_ok'] = 'Cập nhật thành viên thành công'; +$lang['update_fail'] = 'Cập nhật thành viên không thành công'; +$lang['update_exists'] = 'Thay đổi tên thành viên không thành công, tên thành viên được chỉ định (%s) đã tồn tại (mọi thay đổi khác sẽ được áp dụng).'; +$lang['start'] = 'bắt đầu'; +$lang['prev'] = 'trước'; +$lang['next'] = 'sau'; +$lang['last'] = 'cuối'; +$lang['edit_usermissing'] = 'Không tìm thấy thành viên đã chọn, tên thành viên được chỉ định có thể đã bị xóa hoặc thay đổi ở nơi khác.'; +$lang['user_notify'] = 'Thông báo cho thành viên'; +$lang['note_notify'] = 'Chỉ gửi thư điện tử thông báo nếu thành viên được cung cấp mật khẩu mới.'; +$lang['note_group'] = 'Thành viên mới sẽ được thêm vào nhóm mặc định (%s) nếu không có nhóm nào được chỉ định.'; +$lang['note_pass'] = 'Mật khẩu sẽ được tự động tạo nếu trường bị bỏ trống và thông báo của thành viên được bật.'; +$lang['add_ok'] = 'Đã thêm thành viên thành công'; +$lang['add_fail'] = 'Thêm thành viên đã không thành công'; +$lang['notify_ok'] = 'Đã gửi thư điện tử thông báo'; +$lang['notify_fail'] = 'Không thể gửi thư điện tử thông báo'; +$lang['import_userlistcsv'] = 'Tập tin danh sách thành viên (CSV):'; +$lang['import_header'] = 'Nhập gần đây nhất - Không thành công'; +$lang['import_success_count'] = 'Nhập thành viên: Đã tìm thấy %d thành viên, đã nhập thành công %d.'; +$lang['import_failure_count'] = 'Nhập thành viên: %d không thành công. Thành viên không được nhập thành công được liệt kê dưới đây.'; +$lang['import_error_fields'] = 'Không đủ trường, tìm thấy %d, yêu cầu 4.'; +$lang['import_error_baduserid'] = 'Thiếu id thành viên'; +$lang['import_error_badname'] = 'Tên không đúng'; +$lang['import_error_badmail'] = 'Địa chỉ thư điện tử không đúng'; +$lang['import_error_upload'] = 'Việc nhập không thành công. Không thể tải lên tập tin csv hoặc trống.'; +$lang['import_error_readfail'] = 'Việc nhập không thành công. Không thể đọc tệp đã tải lên.'; +$lang['import_error_create'] = 'Không thể tạo thành viên'; +$lang['import_notify_fail'] = 'Không thể gửi tin nhắn thông báo cho thành viên đã nhập, %s với thư điện tử %s.'; +$lang['import_downloadfailures'] = 'Tải xuống Lỗi dưới dạng CSV để sửa'; +$lang['addUser_error_missing_pass'] = 'Vui lòng đặt mật khẩu hoặc kích hoạt thông báo thành viên để cho phép tạo mật khẩu.'; +$lang['addUser_error_pass_not_identical'] = 'Các mật khẩu đã nhập không giống nhau.'; +$lang['addUser_error_modPass_disabled'] = 'Việc sửa đổi mật khẩu hiện đang bị vô hiệu hóa'; +$lang['addUser_error_name_missing'] = 'Vui lòng nhập tên cho người dùng mới.'; +$lang['addUser_error_modName_disabled'] = 'Việc sửa đổi tên hiện đang bị vô hiệu hóa.'; +$lang['addUser_error_mail_missing'] = 'Vui lòng nhập địa chỉ thư điện tử cho người dùng mới.'; +$lang['addUser_error_modMail_disabled'] = 'Việc sửa đổi địa chỉ thư điện tử hiện đang bị vô hiệu hóa.'; +$lang['addUser_error_create_event_failed'] = 'Một plugin ngăn không cho thành viên mới được thêm vào. Xem lại các tin nhắn khác có thể để biết thêm thông tin.'; diff --git a/lib/plugins/usermanager/lang/vi/list.txt b/lib/plugins/usermanager/lang/vi/list.txt new file mode 100644 index 000000000..b6dbae8fa --- /dev/null +++ b/lib/plugins/usermanager/lang/vi/list.txt @@ -0,0 +1 @@ +===== Danh sách thành viên =====
\ No newline at end of file diff --git a/lib/plugins/usermanager/script.js b/lib/plugins/usermanager/script.js index de013242b..3b7ad0964 100644 --- a/lib/plugins/usermanager/script.js +++ b/lib/plugins/usermanager/script.js @@ -2,7 +2,7 @@ * Add JavaScript confirmation to the User Delete button */ jQuery(function(){ - jQuery('#usrmgr__del').click(function(){ + jQuery('#usrmgr__del').on('click', function(){ return confirm(LANG.del_confirm); }); }); diff --git a/lib/scripts/behaviour.js b/lib/scripts/behaviour.js index 18308d68a..f9aad3d02 100644 --- a/lib/scripts/behaviour.js +++ b/lib/scripts/behaviour.js @@ -85,14 +85,14 @@ var dw_behaviour = { * Looks for an element with the ID focus__this at sets focus to it */ focusMarker: function(){ - jQuery('#focus__this').focus(); + jQuery('#focus__this').trigger('focus'); }, /** * Remove all search highlighting when clicking on a highlighted term */ removeHighlightOnClick: function(){ - jQuery('span.search_hit').click( + jQuery('span.search_hit').on('click', function(e){ jQuery(e.target).removeClass('search_hit', 1000); } @@ -110,7 +110,7 @@ var dw_behaviour = { */ quickSelect: function(){ jQuery('select.quickselect') - .change(function(e){ e.target.form.submit(); }) + .on('change', function(e){ e.target.form.submit(); }) .closest('form').find(':button').not('.show').hide(); }, @@ -120,7 +120,7 @@ var dw_behaviour = { * @author Michael Klier <chi@chimeric.de> */ checkWindowsShares: function() { - if(!LANG.nosmblinks || navigator.userAgent.match(/(Trident|MSIE)/)) { + if(!LANG.nosmblinks || navigator.userAgent.match(/(Trident|MSIE|Edge)/)) { // No warning requested or none necessary return; } @@ -146,7 +146,7 @@ var dw_behaviour = { $digest = $form.find("input[name='sub_style'][value='digest']"); $form.find("input[name='sub_target']") - .click( + .on('click', function () { var $this = jQuery(this), show_list; if (!$this.prop('checked')) { @@ -161,7 +161,7 @@ var dw_behaviour = { } ) .filter(':checked') - .click(); + .trigger('click'); }, /** @@ -177,15 +177,15 @@ var dw_behaviour = { var $button = jQuery('button', $revisions); if($checked.length < 2) { - $all.removeAttr('disabled'); - $button.attr('disabled', true); + $all.prop('disabled', false); + $button.prop('disabled', true); } else { - $all.attr('disabled', true); - $button.removeAttr('disabled'); + $all.prop('disabled', true); + $button.prop('disabled', false); $checked.each(function(i) { - jQuery(this).removeAttr('disabled'); + jQuery(this).prop('disabled', false); if(i>1) { - jQuery(this).attr('checked', false); + jQuery(this).prop('checked', false); } }); } diff --git a/lib/scripts/cookie.js b/lib/scripts/cookie.js index 8417d2064..e260e5919 100644 --- a/lib/scripts/cookie.js +++ b/lib/scripts/cookie.js @@ -22,7 +22,13 @@ var DokuCookie = { var text = [], _this = this; this.init(); - this.data[key] = val; + if (val === false){ + delete this.data[key]; + }else{ + val = val + ""; + this.data[key] = val; + } + //save the whole data array jQuery.each(_this.data, function (key, val) { @@ -37,10 +43,11 @@ var DokuCookie = { * Get a Value from the Cookie * * @author Andreas Gohr <andi@splitbrain.org> + * @param def default value if key does not exist; if not set, returns undefined by default */ - getValue: function(key){ + getValue: function(key, def){ this.init(); - return this.data[key]; + return this.data.hasOwnProperty(key) ? this.data[key] : def; }, /** diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index b3e97b63c..f53a6d4ae 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -161,7 +161,7 @@ function currentHeadlineLevel(textboxId){ var field = jQuery('#' + textboxId)[0], s = false, opts = [field.value.substr(0,DWgetSelection(field).start)]; - if (field.form.prefix) { + if (field.form && field.form.prefix) { // we need to look in prefix context opts.push(field.form.prefix.value); } @@ -238,7 +238,7 @@ jQuery(function () { sel.start = 0; sel.end = 0; DWsetSelection(sel); - $edit_text.focus(); + $edit_text.trigger('focus'); doku_edit_text_content = $edit_text.val(); } @@ -260,13 +260,13 @@ jQuery(function () { window.onunload = deleteDraft; // reset change memory var on submit - jQuery('#edbtn__save').click( + jQuery('#edbtn__save').on('click', function() { window.onbeforeunload = ''; textChanged = false; } ); - jQuery('#edbtn__preview').click( + jQuery('#edbtn__preview').on('click', function() { window.onbeforeunload = ''; textChanged = false; @@ -275,8 +275,7 @@ jQuery(function () { ); var $summary = jQuery('#edit__summary'); - $summary.change(doku_summaryCheck); - $summary.keyup(doku_summaryCheck); + $summary.on('change keyup', doku_summaryCheck); if (textChanged) doku_summaryCheck(); }); diff --git a/lib/scripts/editor.js b/lib/scripts/editor.js index c9cb312b0..0df556172 100644 --- a/lib/scripts/editor.js +++ b/lib/scripts/editor.js @@ -60,7 +60,7 @@ var dw_editor = { jQuery(document.createElement('img')) .attr('src', DOKU_BASE+'lib/images/' + img[0] + '.gif') .attr('alt', '') - .click(img[1]) + .on('click', img[1]) .appendTo($ctl); }); }, @@ -140,7 +140,7 @@ var dw_editor = { if((e.keyCode == 13 || e.keyCode == 10) && e.ctrlKey) { // Ctrl-Enter (With Chrome workaround) // Submit current edit - jQuery('#edbtn__save').click(); + jQuery('#edbtn__save').trigger('click'); e.preventDefault(); // prevent enter key return false; }else if(e.keyCode == 13){ // Enter diff --git a/lib/scripts/fileuploaderextended.js b/lib/scripts/fileuploaderextended.js index ba2aa3ea5..b7f9f5f30 100644 --- a/lib/scripts/fileuploaderextended.js +++ b/lib/scripts/fileuploaderextended.js @@ -149,7 +149,7 @@ qq.extend(qq.FileUploaderExtended.prototype, { self._handler._options.onUpload(); jQuery(".qq-upload-name-input").each(function (i) { - jQuery(this).attr('disabled', 'disabled'); + jQuery(this).prop('disabled', true); }); }); }, diff --git a/lib/scripts/jquery/jquery-migrate.min.js b/lib/scripts/jquery/jquery-migrate.min.js deleted file mode 100644 index a2813c5d2..000000000 --- a/lib/scripts/jquery/jquery-migrate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery Migrate v3.0.0 | (c) jQuery Foundation and other contributors | jquery.org/license */ -"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b){"use strict";function c(c){var d=b.console;e[c]||(e[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function d(a,b,d,e){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return c(e),d}})}a.migrateVersion="3.0.0",function(){var c=b.console&&b.console.log&&function(){b.console.log.apply(b.console,arguments)},d=/^[12]\./;c&&(a&&!d.test(a.fn.jquery)||c("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),a.migrateWarnings&&c("JQMIGRATE: Migrate plugin loaded multiple times"),c("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion))}();var e={};a.migrateWarnings=[],void 0===a.migrateTrace&&(a.migrateTrace=!0),a.migrateReset=function(){e={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&c("jQuery is not compatible with Quirks Mode");var f=a.fn.init,g=a.isNumeric,h=a.find,i=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,j=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;a.fn.init=function(a){var b=Array.prototype.slice.call(arguments);return"string"==typeof a&&"#"===a&&(c("jQuery( '#' ) is not a valid selector"),b[0]=[]),f.apply(this,b)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&i.test(a))try{document.querySelector(a)}catch(d){a=a.replace(j,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),c("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){c("Attribute selector with '#' was not fixed: "+b[0])}}return h.apply(this,b)};var k;for(k in h)Object.prototype.hasOwnProperty.call(h,k)&&(a.find[k]=h[k]);a.fn.size=function(){return c("jQuery.fn.size() is deprecated; use the .length property"),this.length},a.parseJSON=function(){return c("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},a.isNumeric=function(b){function d(b){var c=b&&b.toString();return!a.isArray(b)&&c-parseFloat(c)+1>=0}var e=g(b),f=d(b);return e!==f&&c("jQuery.isNumeric() should not be called on constructed objects"),f},d(a,"unique",a.uniqueSort,"jQuery.unique is deprecated, use jQuery.uniqueSort"),d(a.expr,"filters",a.expr.pseudos,"jQuery.expr.filters is now jQuery.expr.pseudos"),d(a.expr,":",a.expr.pseudos,'jQuery.expr[":"] is now jQuery.expr.pseudos');var l=a.ajax;a.ajax=function(){var a=l.apply(this,arguments);return a.promise&&(d(a,"success",a.done,"jQXHR.success is deprecated and removed"),d(a,"error",a.fail,"jQXHR.error is deprecated and removed"),d(a,"complete",a.always,"jQXHR.complete is deprecated and removed")),a};var m=a.fn.removeAttr,n=a.fn.toggleClass,o=/\S+/g;a.fn.removeAttr=function(b){var d=this;return a.each(b.match(o),function(b,e){a.expr.match.bool.test(e)&&(c("jQuery.fn.removeAttr no longer sets boolean properties: "+e),d.prop(e,!1))}),m.apply(this,arguments)},a.fn.toggleClass=function(b){return void 0!==b&&"boolean"!=typeof b?n.apply(this,arguments):(c("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var c=this.getAttribute&&this.getAttribute("class")||"";c&&a.data(this,"__className__",c),this.setAttribute&&this.setAttribute("class",c||b===!1?"":a.data(this,"__className__")||"")}))};var p=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return p=!0,a=d.apply(this,arguments),p=!1,a})}),a.swap=function(a,b,d,e){var f,g,h={};p||c("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=d.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f};var q=a.data;a.data=function(b,d,e){var f;return d&&d!==a.camelCase(d)&&(f=a.hasData(b)&&q.call(this,b),f&&d in f)?(c("jQuery.data() always sets/gets camelCased names: "+d),arguments.length>2&&(f[d]=e),f[d]):q.apply(this,arguments)};var r=a.Tween.prototype.run;a.Tween.prototype.run=function(b){a.easing[this.easing].length>1&&(c('easing function "jQuery.easing.'+this.easing.toString()+'" should use only first argument'),a.easing[this.easing]=a.easing[this.easing].bind(a.easing,b,this.options.duration*b,0,1,this.options.duration)),r.apply(this,arguments)};var s=a.fn.load,t=a.event.fix;a.event.props=[],a.event.fixHooks={},a.event.fix=function(b){var d,e=b.type,f=this.fixHooks[e],g=a.event.props;if(g.length)for(c("jQuery.event.props are deprecated and removed: "+g.join());g.length;)a.event.addProp(g.pop());if(f&&!f._migrated_&&(f._migrated_=!0,c("jQuery.event.fixHooks are deprecated and removed: "+e),(g=f.props)&&g.length))for(;g.length;)a.event.addProp(g.pop());return d=t.call(this,b),f&&f.filter?f.filter(d,b):d},a.each(["load","unload","error"],function(b,d){a.fn[d]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===d&&"string"==typeof a[0]?s.apply(this,a):(c("jQuery.fn."+d+"() is deprecated"),a.splice(0,0,d),arguments.length?this.on.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a(function(){a(document).triggerHandler("ready")}),a.event.special.ready={setup:function(){this===document&&c("'ready' event is deprecated")}},a.fn.extend({bind:function(a,b,d){return c("jQuery.fn.bind() is deprecated"),this.on(a,null,b,d)},unbind:function(a,b){return c("jQuery.fn.unbind() is deprecated"),this.off(a,null,b)},delegate:function(a,b,d,e){return c("jQuery.fn.delegate() is deprecated"),this.on(b,a,d,e)},undelegate:function(a,b,d){return c("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(a,"**"):this.off(b,a||"**",d)}});var u=a.fn.offset;a.fn.offset=function(){var b,d=this[0],e={top:0,left:0};return d&&d.nodeType?(b=(d.ownerDocument||document).documentElement,a.contains(b,d)?u.apply(this,arguments):(c("jQuery.fn.offset() requires an element connected to a document"),e)):(c("jQuery.fn.offset() requires a valid DOM element"),e)};var v=a.param;a.param=function(b,d){var e=a.ajaxSettings&&a.ajaxSettings.traditional;return void 0===d&&e&&(c("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),d=e),v.call(this,b,d)};var w=a.fn.andSelf||a.fn.addBack;a.fn.andSelf=function(){return c("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)};var x=a.Deferred,y=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var d=x(),e=d.promise();return d.pipe=e.pipe=function(){var b=arguments;return c("deferred.pipe() is deprecated"),a.Deferred(function(c){a.each(y,function(f,g){var h=a.isFunction(b[f])&&b[f];d[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g[0]+"With"](this===e?c.promise():this,h?[b]:arguments)})}),b=null}).promise()},b&&b.call(d,d),d}}(jQuery,window);
\ No newline at end of file diff --git a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png Binary files differindex e69de29bb..b9356a287 100644 --- a/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png +++ b/lib/scripts/jquery/jquery-ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png diff --git a/lib/scripts/jquery/jquery.cookie.js b/lib/scripts/jquery/jquery.cookie.js index c4f99af00..c7f3a59b5 100644 --- a/lib/scripts/jquery/jquery.cookie.js +++ b/lib/scripts/jquery/jquery.cookie.js @@ -1,5 +1,5 @@ /*! - * jQuery Cookie Plugin v1.3.1 + * jQuery Cookie Plugin v1.4.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2013 Klaus Hartl @@ -7,51 +7,65 @@ */ (function (factory) { if (typeof define === 'function' && define.amd) { - // AMD. Register as anonymous module. + // AMD define(['jquery'], factory); + } else if (typeof exports === 'object') { + // CommonJS + factory(require('jquery')); } else { - // Browser globals. + // Browser globals factory(jQuery); } }(function ($) { var pluses = /\+/g; - function raw(s) { - return s; + function encode(s) { + return config.raw ? s : encodeURIComponent(s); } - function decoded(s) { - return decodeURIComponent(s.replace(pluses, ' ')); + function decode(s) { + return config.raw ? s : decodeURIComponent(s); } - function converted(s) { + function stringifyCookieValue(value) { + return encode(config.json ? JSON.stringify(value) : String(value)); + } + + function parseCookieValue(s) { if (s.indexOf('"') === 0) { - // This is a quoted cookie as according to RFC2068, unescape + // This is a quoted cookie as according to RFC2068, unescape... s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); } + try { + // Replace server-side written pluses with spaces. + // If we can't decode the cookie, ignore it, it's unusable. + // If we can't parse the cookie, ignore it, it's unusable. + s = decodeURIComponent(s.replace(pluses, ' ')); return config.json ? JSON.parse(s) : s; - } catch(er) {} + } catch(e) {} + } + + function read(s, converter) { + var value = config.raw ? s : parseCookieValue(s); + return $.isFunction(converter) ? converter(value) : value; } var config = $.cookie = function (key, value, options) { - // write - if (value !== undefined) { + // Write + + if (value !== undefined && !$.isFunction(value)) { options = $.extend({}, config.defaults, options); if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); - t.setDate(t.getDate() + days); + t.setTime(+t + days * 864e+5); } - value = config.json ? JSON.stringify(value) : String(value); - return (document.cookie = [ - config.raw ? key : encodeURIComponent(key), - '=', - config.raw ? value : encodeURIComponent(value), + encode(key), '=', stringifyCookieValue(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', @@ -59,22 +73,29 @@ ].join('')); } - // read - var decode = config.raw ? raw : decoded; - var cookies = document.cookie.split('; '); + // Read + var result = key ? undefined : {}; + + // To prevent the for loop in the first place assign an empty array + // in case there are no cookies at all. Also prevents odd result when + // calling $.cookie(). + var cookies = document.cookie ? document.cookie.split('; ') : []; + for (var i = 0, l = cookies.length; i < l; i++) { var parts = cookies[i].split('='); var name = decode(parts.shift()); - var cookie = decode(parts.join('=')); + var cookie = parts.join('='); if (key && key === name) { - result = converted(cookie); + // If second argument (value) is a function it's a converter... + result = read(cookie, value); break; } - if (!key) { - result[name] = converted(cookie); + // Prevent storing a cookie that we couldn't decode. + if (!key && (cookie = read(cookie)) !== undefined) { + result[name] = cookie; } } @@ -84,12 +105,13 @@ config.defaults = {}; $.removeCookie = function (key, options) { - if ($.cookie(key) !== undefined) { - // Must not alter options, thus extending a fresh object... - $.cookie(key, '', $.extend({}, options, { expires: -1 })); - return true; + if ($.cookie(key) === undefined) { + return false; } - return false; + + // Must not alter options, thus extending a fresh object... + $.cookie(key, '', $.extend({}, options, { expires: -1 })); + return !$.cookie(key); }; })); diff --git a/lib/scripts/jquery/jquery.min.js b/lib/scripts/jquery/jquery.min.js index 4c5be4c0f..47b639702 100644 --- a/lib/scripts/jquery/jquery.min.js +++ b/lib/scripts/jquery/jquery.min.js @@ -1,4 +1,2 @@ -/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */ -!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e);return!1}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}return!1}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):C.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/[^\x20\t\r\n\f]+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R), -a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:X.test(a)?JSON.parse(a):a)}function $(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=Z(c)}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),$(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=$(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=V.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var _=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,aa=new RegExp("^(?:([+-])=|)("+_+")([a-z%]*)$","i"),ba=["Top","Right","Bottom","Left"],ca=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function ea(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&aa.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var fa={};function ga(a){var b,c=a.ownerDocument,d=a.nodeName,e=fa[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),fa[d]=e,e)}function ha(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ca(d)&&(e[f]=ga(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ha(this,!0)},hide:function(){return ha(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ca(this)?r(this).show():r(this).hide()})}});var ia=/^(?:checkbox|radio)$/i,ja=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ka=/^$|\/(?:java|ecma)script/i,la={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};la.optgroup=la.option,la.tbody=la.tfoot=la.colgroup=la.caption=la.thead,la.th=la.td;function ma(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function na(a,b){for(var c=0,d=a.length;c<d;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var oa=/<|&#?\w+;/;function pa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(oa.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ja.exec(f)||["",""])[1].toLowerCase(),i=la[h]||la._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ma(l.appendChild(f),"script"),j&&na(g),c){k=0;while(f=g[k++])ka.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var qa=d.documentElement,ra=/^key/,sa=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ta=/^([^.]*)(?:\.(.+)|)/;function ua(){return!0}function va(){return!1}function wa(){try{return d.activeElement}catch(a){}}function xa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)xa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=va;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(qa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g,h=[],i=b.delegateCount,j=a.target;if(i&&j.nodeType&&!("click"===a.type&&a.button>=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c<i;c++)d=b[c],e=d.selector+" ",void 0===g[e]&&(g[e]=d.needsContext?r(e,this).index(j)>-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i<b.length&&h.push({elem:j,handlers:b.slice(i)}),h},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==wa()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===wa()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r.nodeName(this,"input"))return this.click(),!1},_default:function(a){return r.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ua:va,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:va,isPropagationStopped:va,isImmediatePropagationStopped:va,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ua,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ua,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ua,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&ra.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&sa.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return xa(this,a,b,c,d)},one:function(a,b,c,d){return xa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=va),this.each(function(){r.event.remove(this,a,c,b)})}});var ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,za=/<script|<style|<link/i,Aa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ba=/^true\/(.*)/,Ca=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Da(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Ea(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Fa(a){var b=Ba.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ga(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function Ha(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ia.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ia(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&Aa.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ia(f,b,c,d)});if(m&&(e=pa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(ma(e,"script"),Ea),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,ma(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Fa),l=0;l<i;l++)j=h[l],ka.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Ca,""),k))}return a}function Ja(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(ma(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&na(ma(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(ya,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=ma(h),f=ma(a),d=0,e=f.length;d<e;d++)Ha(f[d],g[d]);if(b)if(c)for(f=f||ma(a),g=g||ma(h),d=0,e=f.length;d<e;d++)Ga(f[d],g[d]);else Ga(a,h);return g=ma(h,"script"),g.length>0&&na(g,!i&&ma(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ja(this,a,!0)},remove:function(a){return Ja(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.appendChild(a)}})},prepend:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(ma(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!za.test(a)&&!la[(ja.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(ma(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ia(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(ma(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var Ka=/^margin/,La=new RegExp("^("+_+")(?!px)[a-z%]+$","i"),Ma=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",qa.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,qa.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Na(a,b,c){var d,e,f,g,h=a.style;return c=c||Ma(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&La.test(g)&&Ka.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Oa(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Pa=/^(none|table(?!-c[ea]).+)/,Qa={position:"absolute",visibility:"hidden",display:"block"},Ra={letterSpacing:"0",fontWeight:"400"},Sa=["Webkit","Moz","ms"],Ta=d.createElement("div").style;function Ua(a){if(a in Ta)return a;var b=a[0].toUpperCase()+a.slice(1),c=Sa.length;while(c--)if(a=Sa[c]+b,a in Ta)return a}function Va(a,b,c){var d=aa.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Wa(a,b,c,d,e){var f,g=0;for(f=c===(d?"border":"content")?4:"width"===b?1:0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+ba[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+ba[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+ba[f]+"Width",!0,e))):(g+=r.css(a,"padding"+ba[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+ba[f]+"Width",!0,e)));return g}function Xa(a,b,c){var d,e=!0,f=Ma(a),g="border-box"===r.css(a,"boxSizing",!1,f);if(a.getClientRects().length&&(d=a.getBoundingClientRect()[b]),d<=0||null==d){if(d=Na(a,b,f),(d<0||null==d)&&(d=a.style[b]),La.test(d))return d;e=g&&(o.boxSizingReliable()||d===a.style[b]),d=parseFloat(d)||0}return d+Wa(a,b,c||(g?"border":"content"),e,f)+"px"}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Na(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=a.style;return b=r.cssProps[h]||(r.cssProps[h]=Ua(h)||h),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=aa.exec(c))&&e[1]&&(c=ea(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b);return b=r.cssProps[h]||(r.cssProps[h]=Ua(h)||h),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Na(a,b,d)),"normal"===e&&b in Ra&&(e=Ra[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Pa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?Xa(a,b,d):da(a,Qa,function(){return Xa(a,b,d)})},set:function(a,c,d){var e,f=d&&Ma(a),g=d&&Wa(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=aa.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Va(a,c,g)}}}),r.cssHooks.marginLeft=Oa(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Na(a,"marginLeft"))||a.getBoundingClientRect().left-da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+ba[d]+b]=f[d]||f[d-2]||f[0];return e}},Ka.test(a)||(r.cssHooks[a+b].set=Va)}),r.fn.extend({css:function(a,b){return S(this,function(a,b,c){var d,e,f={},g=0;if(r.isArray(b)){for(d=Ma(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function Ya(a,b,c,d,e){return new Ya.prototype.init(a,b,c,d,e)}r.Tween=Ya,Ya.prototype={constructor:Ya,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Ya.propHooks[this.prop];return a&&a.get?a.get(this):Ya.propHooks._default.get(this)},run:function(a){var b,c=Ya.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ya.propHooks._default.set(this),this}},Ya.prototype.init.prototype=Ya.prototype,Ya.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Ya.propHooks.scrollTop=Ya.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Ya.prototype.init,r.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=/queueHooks$/;function bb(){$a&&(a.requestAnimationFrame(bb),r.fx.tick())}function cb(){return a.setTimeout(function(){Za=void 0}),Za=r.now()}function db(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ba[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function eb(a,b,c){for(var d,e=(hb.tweeners[b]||[]).concat(hb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function fb(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&ca(a),q=V.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],_a.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=V.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ha([a],!0),j=a.style.display||j,k=r.css(a,"display"),ha([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=V.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ha([a],!0),m.done(function(){p||ha([a]),V.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=eb(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function gb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],r.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function hb(a,b,c){var d,e,f=0,g=hb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Za||cb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:Za||cb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(gb(k,j.opts.specialEasing);f<g;f++)if(d=hb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,eb,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}r.Animation=r.extend(hb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return ea(c.elem,a,aa.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(K);for(var c,d=0,e=a.length;d<e;d++)c=a[d],hb.tweeners[c]=hb.tweeners[c]||[],hb.tweeners[c].unshift(b)},prefilters:[fb],prefilter:function(a,b){b?hb.prefilters.unshift(a):hb.prefilters.push(a)}}),r.speed=function(a,b,c){var e=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off||d.hidden?e.duration=0:"number"!=typeof e.duration&&(e.duration in r.fx.speeds?e.duration=r.fx.speeds[e.duration]:e.duration=r.fx.speeds._default),null!=e.queue&&e.queue!==!0||(e.queue="fx"),e.old=e.complete,e.complete=function(){r.isFunction(e.old)&&e.old.call(this),e.queue&&r.dequeue(this,e.queue)},e},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ca).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=hb(this,r.extend({},a),f);(e||V.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=V.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&ab.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=V.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(db(b,!0),a,d,e)}}),r.each({slideDown:db("show"),slideUp:db("hide"),slideToggle:db("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(Za=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),Za=void 0},r.fx.timer=function(a){r.timers.push(a),a()?r.fx.start():r.timers.pop()},r.fx.interval=13,r.fx.start=function(){$a||($a=a.requestAnimationFrame?a.requestAnimationFrame(bb):a.setInterval(r.fx.tick,r.fx.interval))},r.fx.stop=function(){a.cancelAnimationFrame?a.cancelAnimationFrame($a):a.clearInterval($a),$a=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var ib,jb=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return S(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?ib:void 0)), -void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),ib={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=jb[b]||r.find.attr;jb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=jb[g],jb[g]=e,e=null!=c(a,b,d)?g:null,jb[g]=f),e}});var kb=/^(?:input|select|textarea|button)$/i,lb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):kb.test(a.nodeName)||lb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function mb(a){var b=a.match(K)||[];return b.join(" ")}function nb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,nb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,nb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,nb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=nb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(nb(c))+" ").indexOf(b)>-1)return!0;return!1}});var ob=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ob,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:mb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ia.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,"$1"),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Qb=[],Rb=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Qb.pop()||r.expando+"_"+rb++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Rb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Rb,"$1"+e):b.jsonp!==!1&&(b.url+=(sb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Qb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=B.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=pa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=mb(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length};function Sb(a){return r.isWindow(a)?a:9===a.nodeType&&a.defaultView}r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),d.width||d.height?(e=f.ownerDocument,c=Sb(e),b=e.documentElement,{top:d.top+c.pageYOffset-b.clientTop,left:d.left+c.pageXOffset-b.clientLeft}):d):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),r.nodeName(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||qa})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return S(this,function(a,d,e){var f=Sb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Oa(o.pixelPosition,function(a,c){if(c)return c=Na(a,b),La.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return S(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Tb=a.jQuery,Ub=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Ub),b&&a.jQuery===r&&(a.jQuery=Tb),r},b||(a.jQuery=a.$=r),r}); +/*! jQuery v3.5.0 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+S+"'></a><select id='"+S+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(B," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[S]||(a[S]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[S]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[S]||(e[S]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[S]&&(v=Ce(v)),y&&!y[S]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[S]?i.push(a):o.push(a);(a=A(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=S.split("").sort(D).join("")===S,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);S.find=d,S.expr=d.selectors,S.expr[":"]=S.expr.pseudos,S.uniqueSort=S.unique=d.uniqueSort,S.text=d.getText,S.isXMLDoc=d.isXML,S.contains=d.contains,S.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&S(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=S.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1<i.call(n,e)!==r}):S.filter(n,e,r)}S.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?S.find.matchesSelector(r,e)?[r]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t<r;t++)if(S.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)S.find(e,i[t],n);return 1<r?S.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&k.test(e)?S(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(S.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&S(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&S.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?S.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(S(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(r,i){S.fn[r]=function(e,t){var n=S.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=S.filter(t,n)),1<this.length&&(H[r]||S.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}S.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},S.each(e.match(P)||[],function(e,t){n[t]=!0}),n):S.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){S.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return S.each(arguments,function(e,t){var n;while(-1<(n=S.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<S.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},S.extend({Deferred:function(e){var o=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return S.Deferred(function(r){S.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(S.Deferred.getStackHook&&(t.stackTrace=S.Deferred.getStackHook()),C.setTimeout(t))}}return S.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?S.extend(e,a):a}},s={};return S.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},S.readyException=function(e){C.setTimeout(function(){throw e})};var F=S.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),S.ready()}S.fn.ready=function(e){return F.then(e)["catch"](function(e){S.readyException(e)}),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0)!==e&&0<--S.readyWait||F.resolveWith(E,[S])}}),S.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(S.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(S(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=S.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t=Object.create(null),V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||S.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),S.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),S.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=S.queue(e,t),r=n.length,i=n.shift(),o=S._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){S.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:S.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),S.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?S.queue(this[0],t):void 0===n?this:this.each(function(){var e=S.queue(this,t,n);S._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&S.dequeue(this,t)})},dequeue:function(e){return this.each(function(){S.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=E.documentElement,ie=function(e){return S.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===S.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(e,t,"")},u=s(),l=n&&n[3]||(S.cssNumber[t]?"":"px"),c=e.nodeType&&(S.cssNumber[t]||"px"!==l&&+u)&&te.exec(S.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)S.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,S.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=S.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}S.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?S(this).show():S(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",y.option=!!ce.lastChild;var ge={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,y.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))S.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+S.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;S.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<S.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return S().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=S.guid++)),e.each(function(){S.event.add(this,t,i,r,n)})}function Ae(e,i,o){o?(Y.set(e,i,!1),S.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(S.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:S.event.trigger(S.extend(r[0],S.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&S.event.add(e,i,Ce)}S.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(re,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=Te.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=S.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=S.event.special[d]||{},c=S.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),S.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=Te.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=S.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||S.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)S.event.remove(e,d+t[l],n,r,!0);S.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=S.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=S.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<S(i,this).index(l):S.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[S.expando]?e:new S.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click",Ce),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ae(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},S.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},S.Event=function(e,t){if(!(this instanceof S.Event))return new S.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&S.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(e,t){S.event.special[e]={setup:function(){return Ae(this,e,Se),!1},trigger:function(){return Ae(this,e),!0},delegateType:t}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){S.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||S.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),S.fn.extend({on:function(e,t,n,r){return ke(this,e,t,n,r)},one:function(e,t,n,r){return ke(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,S(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each(function(){S.event.remove(this,e,n,t)})}});var Ne=/<script|<style|<link/i,De=/checked\s*(?:[^=]|=\s*.checked.)/i,je=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)S.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=S.extend({},o),Q.set(t,a))}}function Pe(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&De.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=S.map(ve(e,"script"),Le)).length;c<f;c++)u=e,c!==p&&(u=S.clone(u,!0,!0),s&&S.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,He),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&S.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?S._evalUrl&&!u.noModule&&S._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(je,""),u,l))}return n}function Re(e,t,n){for(var r,i=t?S.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(ve(r)),r.parentNode&&(n&&ie(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}S.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||S.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=S.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Re(this,e,!0)},remove:function(e){return Re(this,e)},text:function(e){return $(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return S.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(S.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;S.inArray(this,n)<0&&(S.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){S.fn[e]=function(e){for(var t,n=[],r=S(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),S(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Me=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},We=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Fe=new RegExp(ne.join("|"),"i");function Be(e,t,n){var r,i,o,a,s=e.style;return(n=n||Ie(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=S.style(e,t)),!y.pixelBoxStyles()&&Me.test(a)&&Fe.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function $e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=E.createElement("div"),l=E.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===l.style.backgroundClip,S.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=E.createElement("table"),t=E.createElement("tr"),n=E.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var _e=["Webkit","Moz","ms"],ze=E.createElement("div").style,Ue={};function Xe(e){var t=S.cssProps[e]||Ue[e];return t||(e in ze?e:Ue[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=_e.length;while(n--)if((e=_e[n]+t)in ze)return e}(e)||e)}var Ve=/^(none|table(?!-c[ea]).+)/,Ge=/^--/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=S.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=S.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=S.css(e,"border"+ne[a]+"Width",!0,i))):(u+=S.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=S.css(e,"border"+ne[a]+"Width",!0,i):s+=S.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Ie(e),i=(!y.boxSizingReliable()||n)&&"border-box"===S.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Me.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||!y.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===S.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===S.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}S.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Ge.test(t),l=e.style;if(u||(t=Xe(s)),a=S.cssHooks[t]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(S.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Ge.test(t)||(t=Xe(s)),(a=S.cssHooks[t]||S.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(e,u){S.cssHooks[u]={get:function(e,t,n){if(t)return!Ve.test(S.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):We(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Ie(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===S.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=S.css(e,u)),Je(0,t,s)}}}),S.cssHooks.marginLeft=$e(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-We(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(i,o){S.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(S.cssHooks[i+o].set=Je)}),S.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;a<i;a++)o[t[a]]=S.css(e,t[a],!1,r);return o}return void 0!==n?S.style(e,t,n):S.css(e,t)},e,t,1<arguments.length)}}),((S.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||S.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=S.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=S.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){S.fx.step[e.prop]?S.fx.step[e.prop](e):1!==e.elem.nodeType||!S.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:S.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},S.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},S.fx=et.prototype.init,S.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,S.fx.interval),S.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=S.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(S._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return S.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),S.fx.timer(S.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),S.speed=function(e,t,n){var r=e&&"object"==typeof e?S.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=ft(this,S.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=S.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||S.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=S.timers,o=n?n.length:0;for(t.finish=!0,S.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),S.each(["toggle","show","hide"],function(e,r){var i=S.fn[r];S.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),S.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){S.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),S.timers=[],S.fx.tick=function(){var e,t=0,n=S.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||S.fx.stop(),tt=void 0},S.fx.timer=function(e){S.timers.push(e),S.fx.start()},S.fx.interval=13,S.fx.start=function(){nt||(nt=!0,st())},S.fx.stop=function(){nt=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(r,e){return r=S.fx&&S.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=E.createElement("input"),it=E.createElement("select").appendChild(E.createElement("option")),rt.type="checkbox",y.checkOn=""!==rt.value,y.optSelected=it.selected,(rt=E.createElement("input")).value="t",rt.type="radio",y.radioValue="t"===rt.value;var pt,dt=S.expr.attrHandle;S.fn.extend({attr:function(e,t){return $(this,S.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?S.prop(e,t,n):(1===o&&S.isXMLDoc(e)||(i=S.attrHooks[t.toLowerCase()]||(S.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void S.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=S.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?S.removeAttr(e,n):e.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||S.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function vt(e){return(e.match(P)||[]).join(" ")}function yt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}S.fn.extend({prop:function(e,t){return $(this,S.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(e)||(t=S.propFix[t]||t,i=S.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=S.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).addClass(t.call(this,e,yt(this)))});if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){S(this).removeClass(t.call(this,e,yt(this)))});if(!arguments.length)return this.attr("class","");if((e=mt(t)).length)while(n=this[u++])if(i=yt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){S(this).toggleClass(i.call(this,e,yt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=S(this),r=mt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=yt(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+vt(yt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;S.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,S(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=S.map(t,function(e){return null==e?"":e+""})),(r=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=S.valHooks[t.type]||S.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),S.extend({valHooks:{option:{get:function(e){var t=S.find.attr(e,"value");return null!=t?t:vt(S.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=S(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=S.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<S.inArray(S.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<S.inArray(S(e).val(),t)}},y.checkOn||(S.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};S.extend(S.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+S.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[S.expando]?e:new S.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:S.makeArray(t,[e]),c=S.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),S.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(r,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}}),y.focusin||S.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){S.event.simulate(r,e.target,S.event.fix(e))};S.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},Et=/\?/;S.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||S.error("Invalid XML: "+e),t};var St=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(Array.isArray(e))S.each(e,function(e,t){r||St.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}S.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!S.isPlainObject(e))S.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=S.prop(this,"elements");return e?S.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!S(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var jt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=E.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Bt(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,S.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function $t(e,t){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&S.extend(!0,e,r),e}Wt.href=Tt.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$t($t(e,S.ajaxSettings),t):$t(S.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=S.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?S(y):S.event,x=S.Deferred(),b=S.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(P)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=S.param(v.data,v.traditional)),Bt(Rt,v,t,T),h)return T;for(i in(g=S.event&&v.global)&&0==S.active++&&S.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ot.test(v.type),f=v.url.replace(qt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(jt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(Et.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Lt,"$1"),o=(Et.test(f)?"&":"?")+"_="+Ct.guid+++o),v.url=f+o),v.ifModified&&(S.lastModified[f]&&T.setRequestHeader("If-Modified-Since",S.lastModified[f]),S.etag[f]&&T.setRequestHeader("If-None-Match",S.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+It+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Bt(Mt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<S.inArray("script",v.dataTypes)&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(S.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(S.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--S.active||S.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return S.get(e,t,n,"json")},getScript:function(e,t){return S.get(e,void 0,t,"script")}}),S.each(["get","post"],function(e,i){S[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),S.ajax(S.extend({url:e,type:i,dataType:r,data:t,success:n},S.isPlainObject(e)&&e))}}),S.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),S._evalUrl=function(e,t,n){return S.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){S.globalEval(e,t,n)}})},S.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=S(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){S(this).wrapInner(n.call(this,e))}):this.each(function(){var e=S(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){S(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=S.ajaxSettings.xhr();y.cors=!!zt&&"withCredentials"in zt,y.ajax=zt=!!zt,S.ajaxTransport(function(i){var o,a;if(y.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),S.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return S.globalEval(e),e}}}),S.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),S.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=S("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=vt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&S.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?S("<div>").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;S.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||S.guid++,i},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.isArray=Array.isArray,S.parseJSON=JSON.parse,S.nodeName=A,S.isFunction=m,S.isWindow=x,S.camelCase=X,S.type=w,S.now=Date.now,S.isNumeric=function(e){var t=S.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},S.trim=function(e){return null==e?"":(e+"").replace(Gt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var Yt=C.jQuery,Qt=C.$;return S.noConflict=function(e){return C.$===S&&(C.$=Qt),e&&C.jQuery===S&&(C.jQuery=Yt),S},"undefined"==typeof e&&(C.jQuery=C.$=S),S}); diff --git a/lib/scripts/jquery/update.sh b/lib/scripts/jquery/update.sh index 31b859ecd..e950d89b7 100755 --- a/lib/scripts/jquery/update.sh +++ b/lib/scripts/jquery/update.sh @@ -17,8 +17,6 @@ JQUI_GIT="https://raw.githubusercontent.com/jquery/jquery-ui/$JQUI_VERSION/ui" wget -nv https://code.jquery.com/jquery-${JQ_VERSION}.min.js -O jquery.min.js # load jQuery-UI wget -nv "$JQUI_HOST/jquery-ui.min.js" -O jquery-ui.min.js -# load jQuery Migrate -wget -nv https://code.jquery.com/jquery-migrate-${JQM_VERSION}.min.js -O jquery-migrate.min.js # load the smoothness theme mkdir -p jquery-ui-theme/images diff --git a/lib/scripts/jquery/versions b/lib/scripts/jquery/versions index dfc354932..d5c9c3ccd 100644 --- a/lib/scripts/jquery/versions +++ b/lib/scripts/jquery/versions @@ -1,4 +1,3 @@ # this is loaded from the update.sh script and our PHP code -JQ_VERSION=3.1.1 +JQ_VERSION=3.5.0 JQUI_VERSION=1.12.1 -JQM_VERSION=3.0.0 diff --git a/lib/scripts/linkwiz.js b/lib/scripts/linkwiz.js index da1e072a1..d82ca9681 100644 --- a/lib/scripts/linkwiz.js +++ b/lib/scripts/linkwiz.js @@ -57,7 +57,7 @@ var dw_linkwiz = { } // attach event handlers - jQuery('#link__wiz .ui-dialog-titlebar-close').click(dw_linkwiz.hide); + jQuery('#link__wiz .ui-dialog-titlebar-close').on('click', dw_linkwiz.hide); dw_linkwiz.$entry.keyup(dw_linkwiz.onEntry); jQuery(dw_linkwiz.result).on('click', 'a', dw_linkwiz.onResultClick); }, diff --git a/lib/scripts/locktimer.js b/lib/scripts/locktimer.js index f83b6334e..7bc8a3969 100644 --- a/lib/scripts/locktimer.js +++ b/lib/scripts/locktimer.js @@ -8,6 +8,13 @@ var dw_locktimer = { lasttime: null, msg: LANG.willexpire, pageid: '', + fieldsToSaveAsDraft: [ + 'input[name=prefix]', + 'textarea[name=wikitext]', + 'input[name=suffix]', + 'input[name=date]', + ], + callbacks: [], /** * Initialize the lock timer @@ -43,6 +50,26 @@ var dw_locktimer = { }, /** + * Add another field of the editform to be posted to the server when a draft is saved + */ + addField: function(selector) { + dw_locktimer.fieldsToSaveAsDraft.push(selector); + }, + + /** + * Add a callback that is executed when the post request to renew the lock and save the draft returns successfully + * + * If the user types into the edit-area, then dw_locktimer will regularly send a post request to the DokuWiki server + * to extend the page's lock and update the draft. When this request returns successfully, then the draft__status + * is updated. This method can be used to add further callbacks to be executed at that moment. + * + * @param {function} callback the only param is the data returned by the server + */ + addRefreshCallback: function(callback) { + dw_locktimer.callbacks.push(callback); + }, + + /** * (Re)start the warning timer */ reset: function(){ @@ -77,25 +104,28 @@ var dw_locktimer = { var now = new Date(), params = 'call=lock&id=' + dw_locktimer.pageid + '&'; - // refresh every minute only + // refresh every half minute only if(now.getTime() - dw_locktimer.lasttime.getTime() <= 30*1000) { return; } // POST everything necessary for draft saving if(dw_locktimer.draft && jQuery('#dw__editform').find('textarea[name=wikitext]').length > 0){ - params += jQuery('#dw__editform').find('input[name=prefix], ' + - 'textarea[name=wikitext], ' + - 'input[name=suffix], ' + - 'input[name=date]').serialize(); + params += jQuery('#dw__editform').find(dw_locktimer.fieldsToSaveAsDraft.join(', ')).serialize(); } jQuery.post( DOKU_BASE + 'lib/exe/ajax.php', params, - dw_locktimer.refreshed, - 'html' - ); + null, + 'json' + ).done(function dwLocktimerRefreshDoneHandler(data) { + dw_locktimer.callbacks.forEach( + function (callback) { + callback(data); + } + ); + }); dw_locktimer.lasttime = now; }, @@ -103,13 +133,19 @@ var dw_locktimer = { * Callback. Resets the warning timer */ refreshed: function(data){ - var error = data.charAt(0); - data = data.substring(1); + if (data.errors.length) { + data.errors.forEach(function(error) { + jQuery('#draft__status').after( + jQuery('<div class="error"></div>').text(error) + ); + }) + } - jQuery('#draft__status').html(data); - if(error != '1') { + jQuery('#draft__status').html(data.draft); + if(data.lock !== '1') { return; // locking failed } dw_locktimer.reset(); } }; +dw_locktimer.callbacks.push(dw_locktimer.refreshed); diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 1e9d0328f..6f36d3b2e 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -107,7 +107,7 @@ var dw_mediamanager = { dw_mediamanager.update_resizable(); dw_mediamanager.layout_width = $page.width(); - jQuery(window).resize(dw_mediamanager.window_resize); + jQuery(window).on('resize', dw_mediamanager.window_resize); }, init_options: function () { @@ -194,7 +194,7 @@ var dw_mediamanager = { .addClass('button') .attr('id', "media__" + opt.id + "btn" + (i + 1)) .attr('title', LANG['media' + text]) - .click(bind(dw_mediamanager.setOpt, opt.id)); + .on('click', bind(dw_mediamanager.setOpt, opt.id)); $img = jQuery(document.createElement('img')) .attr('src', DOKU_BASE + 'lib/images/media_' + opt.id + '_' + text + '.png'); @@ -474,7 +474,7 @@ var dw_mediamanager = { if ($container.length === 0) { $container = $content; } - $container.html('<img src="' + DOKU_BASE + 'lib/images/loading.gif" alt="..." class="load" />'); + $container.html('<img src="' + DOKU_BASE + 'lib/images/throbber.gif" alt="..." class="load" />'); }, window_resize: function () { @@ -735,7 +735,7 @@ var dw_mediamanager = { // remove old callback from the insert button and set the new one. var $sendbtn = jQuery('#media__sendbtn'); - $sendbtn.off().click(bind(dw_mediamanager.insert, id)); + $sendbtn.off().on('click', bind(dw_mediamanager.insert, id)); dw_mediamanager.unforbid('ext'); if (ext === '.swf') { @@ -801,7 +801,7 @@ var dw_mediamanager = { $box = jQuery(document.createElement('input')) .attr('type', 'checkbox') .attr('id', 'media__' + opt[0]) - .click(bind(dw_mediamanager.toggleOption, opt[0])); + .on('click', bind(dw_mediamanager.toggleOption, opt[0])); if (DokuCookie.getValue(opt[0])) { $box.prop('checked', true); diff --git a/lib/scripts/page.js b/lib/scripts/page.js index aadff8ecf..77d644a38 100644 --- a/lib/scripts/page.js +++ b/lib/scripts/page.js @@ -9,7 +9,8 @@ dw_page = { */ init: function(){ dw_page.sectionHighlight(); - jQuery('a.fn_top').mouseover(dw_page.footnoteDisplay); + dw_page.currentIDHighlight(); + jQuery('a.fn_top').on('mouseover', dw_page.footnoteDisplay); dw_page.makeToggle('#dw__toc h3','#dw__toc > div'); }, @@ -20,7 +21,7 @@ dw_page = { */ sectionHighlight: function() { jQuery('form.btn_secedit') - .mouseover(function(){ + .on('mouseover', function(){ var $tgt = jQuery(this).parent(), nr = $tgt.attr('class').match(/(\s+|^)editbutton_(\d+)(\s+|$)/)[2], $highlight = jQuery(), // holder for elements in the section to be highlighted @@ -36,7 +37,7 @@ dw_page = { // and move the elements to be highlighted inside the section highlight wrapper $highlight.detach().appendTo($highlightWrap); }) - .mouseout(function(){ + .on('mouseout', function(){ // find the section highlight wrapper... var $highlightWrap = jQuery('.section_highlight'); // ...move its children in front of it (as siblings)... @@ -46,6 +47,16 @@ dw_page = { }); }, + + /** + * Highlight internal link pointing to current page + * + * @author Henry Pan <dokuwiki@phy25.com> + */ + currentIDHighlight: function(){ + jQuery('a.wikilink1, a.wikilink2').filter('[data-wiki-id="'+JSINFO.id+'"]').wrap('<span class="curid"></div>'); + }, + /** * Create/get a insitu popup used by the footnotes * @@ -63,7 +74,7 @@ dw_page = { .attr('id', popup_id) .addClass('insitu-footnote JSpopup') .attr('aria-hidden', 'true') - .mouseleave(function () {jQuery(this).hide().attr('aria-hidden', 'true');}) + .on('mouseleave', function () {jQuery(this).hide().attr('aria-hidden', 'true');}) .attr('role', 'tooltip'); jQuery('.dokuwiki:first').append($fndiv); } @@ -89,7 +100,7 @@ dw_page = { var $content = jQuery(jQuery(this).attr('href')) // Footnote text anchor .parent().siblings('.content').clone(); - if (!$content) { + if (!$content.length) { return; } @@ -179,7 +190,7 @@ dw_page = { // click function $handle.css('cursor','pointer') - .click($handle[0].setState) + .on('click', $handle[0].setState) .prepend($clicky); // initial state diff --git a/lib/scripts/qsearch.js b/lib/scripts/qsearch.js index 18e51506c..f95515b93 100644 --- a/lib/scripts/qsearch.js +++ b/lib/scripts/qsearch.js @@ -57,7 +57,7 @@ jQuery.fn.dw_qsearch = function (overrides) { ); }; - dw_qsearch.$inObj.keyup( + dw_qsearch.$inObj.on('keyup', function () { if (dw_qsearch.timer) { window.clearTimeout(dw_qsearch.timer); @@ -68,7 +68,7 @@ jQuery.fn.dw_qsearch = function (overrides) { ); // attach eventhandler to output field - dw_qsearch.$outObj.click(dw_qsearch.clear_results); + dw_qsearch.$outObj.on('click', dw_qsearch.clear_results); }, /** diff --git a/lib/scripts/script.js b/lib/scripts/script.js index 97edef0b7..0e03dcf37 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -26,5 +26,5 @@ function closePopups(){ } jQuery(function () { - jQuery(document).click(closePopups); + jQuery(document).on('click', closePopups); }); diff --git a/lib/scripts/search.js b/lib/scripts/search.js index 363170825..111dca99a 100644 --- a/lib/scripts/search.js +++ b/lib/scripts/search.js @@ -1,12 +1,12 @@ jQuery(function () { 'use strict'; - const $searchForm = jQuery('.search-results-form'); + var $searchForm = jQuery('.search-results-form'); if (!$searchForm.length) { return; } - const $toggleAssistanceButton = jQuery('<button>') + var $toggleAssistanceButton = jQuery('<button>') .addClass('toggleAssistant') .attr('type', 'button') .attr('aria-expanded', 'false') @@ -30,7 +30,7 @@ jQuery(function () { }); if (DokuCookie.getValue('sa') === 'on') { - $toggleAssistanceButton.click(); + $toggleAssistanceButton.trigger('click'); } $searchForm.find('.advancedOptions .toggle div.current').on('click', function () { diff --git a/lib/tpl/dokuwiki/css/_edit.css b/lib/tpl/dokuwiki/css/_edit.css index 526d49b99..30926bed1 100644 --- a/lib/tpl/dokuwiki/css/_edit.css +++ b/lib/tpl/dokuwiki/css/_edit.css @@ -12,6 +12,7 @@ /*____________ toolbar ____________*/ .dokuwiki div.toolbar { + display: inline-block; margin-bottom: .5em; } #draft__status { diff --git a/lib/tpl/dokuwiki/css/_tabs.css b/lib/tpl/dokuwiki/css/_tabs.css index c4576c5ab..507f49e96 100644 --- a/lib/tpl/dokuwiki/css/_tabs.css +++ b/lib/tpl/dokuwiki/css/_tabs.css @@ -18,7 +18,6 @@ bottom: 0; left: 0; border-bottom: 1px solid @ini_border; - z-index: 1; } .dokuwiki .tabs > ul li, diff --git a/lib/tpl/dokuwiki/css/basic.less b/lib/tpl/dokuwiki/css/basic.less index ccec240a4..abb330a15 100644 --- a/lib/tpl/dokuwiki/css/basic.less +++ b/lib/tpl/dokuwiki/css/basic.less @@ -312,6 +312,10 @@ small { font-size: .8em; } +wbr { + display: inline-block; /* for IE 11 */ +} + /*____________ forms ____________*/ /* for all of the form styles, style.ini colours are not used on purpose (except for fieldset border) */ diff --git a/lib/tpl/dokuwiki/css/design.less b/lib/tpl/dokuwiki/css/design.less index 89f671b7c..86315d211 100644 --- a/lib/tpl/dokuwiki/css/design.less +++ b/lib/tpl/dokuwiki/css/design.less @@ -66,16 +66,16 @@ ********************************************************************/ /* highlight selected tool */ -.mode_admin a.action.admin, -.mode_login a.action.login, -.mode_register a.action.register, -.mode_profile a.action.profile, -.mode_recent a.action.recent, -.mode_index a.action.index, -.mode_media a.action.media, -.mode_revisions a.action.revs, -.mode_backlink a.action.backlink, -.mode_subscribe a.action.subscribe { +.mode_admin .action.admin a, +.mode_login .action.login a, +.mode_register .action.register a, +.mode_profile .action.profile a, +.mode_recent .action.recent a, +.mode_index .action.index a, +.mode_media .action.media a, +.mode_revisions .action.revs a, +.mode_backlink .action.backlink a, +.mode_subscribe .action.subscribe a { font-weight: bold; } diff --git a/lib/tpl/dokuwiki/css/pagetools.less b/lib/tpl/dokuwiki/css/pagetools.less index 2aaf0b978..5473594d8 100644 --- a/lib/tpl/dokuwiki/css/pagetools.less +++ b/lib/tpl/dokuwiki/css/pagetools.less @@ -109,8 +109,8 @@ } } -// on hover show all items -#dokuwiki__pagetools:hover { +// on hover or focus show all items +#dokuwiki__pagetools:hover, #dokuwiki__pagetools:focus-within { div.tools ul { background-color: @ini_background; border-color: @ini_border; diff --git a/lib/tpl/dokuwiki/images/pagetools-build.php b/lib/tpl/dokuwiki/images/pagetools-build.php index eaceeb257..e19d750c7 100644 --- a/lib/tpl/dokuwiki/images/pagetools-build.php +++ b/lib/tpl/dokuwiki/images/pagetools-build.php @@ -1,4 +1,5 @@ <?php +// phpcs:ignoreFile -- deprecated and will be removed /** * This script generates a sprite from the unprocessed pagetool icons by combining them * and overlaying a color layer for the active state. @@ -10,6 +11,7 @@ * The final sprite is optimized with optipng if available. * * @author Andreas Gohr <andi@splitbrain.org> + * @deprecated 2018-06-15 we no longer use PNG based icons * @todo Maybe add some more error checking */ $GAMMA = 0.8; diff --git a/lib/tpl/dokuwiki/lang/bg/lang.php b/lib/tpl/dokuwiki/lang/bg/lang.php index 7717607c0..c08bd3da4 100644 --- a/lib/tpl/dokuwiki/lang/bg/lang.php +++ b/lib/tpl/dokuwiki/lang/bg/lang.php @@ -2,7 +2,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * + * * @author Kiril <neohidra@gmail.com> */ $lang['__background_site__'] = 'Цвят за фона, под съдъжанието'; diff --git a/lib/tpl/dokuwiki/lang/cs/lang.php b/lib/tpl/dokuwiki/lang/cs/lang.php index 58af0d2e3..1bf69a5f8 100644 --- a/lib/tpl/dokuwiki/lang/cs/lang.php +++ b/lib/tpl/dokuwiki/lang/cs/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Robert Surý <rsurycz@seznam.cz> * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> */ $lang['__background_site__'] = 'Barva hlavního pozadí (pod kontextovým boxem)'; @@ -13,3 +14,4 @@ $lang['__site_width__'] = 'Šířka plné stránky (jakákoliv jednotka d $lang['__sidebar_width__'] = 'Šířka postranního panelu, pokud je použit (jakákoliv jednotka délky: %, px, em, ...)'; $lang['__tablet_width__'] = 'Přepnout stránku do módu pro tablet pro velikost obrazovky menší než'; $lang['__phone_width__'] = 'Přepnout stránku do módu pro telefon pro velikost obrazovky menší než'; +$lang['__theme_color__'] = 'Barva motivu webové aplikace'; diff --git a/lib/tpl/dokuwiki/lang/da/lang.php b/lib/tpl/dokuwiki/lang/da/lang.php new file mode 100644 index 000000000..71e03a084 --- /dev/null +++ b/lib/tpl/dokuwiki/lang/da/lang.php @@ -0,0 +1,16 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Jacob Palm <mail@jacobpalm.dk> + */ +$lang['__background_site__'] = 'Farve til den "bagerste" baggrund (bagved indholdets kasse)'; +$lang['__link__'] = 'Grundlæggende link-farve'; +$lang['__existing__'] = 'Link-farve til eksisterende sider'; +$lang['__missing__'] = 'Link-farve til ikke-eksisterende sider'; +$lang['__site_width__'] = 'Hele sidens bredde (kan angives i enhver enhed: %, px, em m.fl.)'; +$lang['__sidebar_width__'] = 'Sidepanelets bredde (kan angives i enhver enhed: %, px, em m.fl.)'; +$lang['__tablet_width__'] = 'Ved skærmstørrelser under denne bredde, skiftes til tablet-visning'; +$lang['__phone_width__'] = 'Ved skærmstørrelser under denne bredde, skiftes til mobilvisning'; +$lang['__theme_color__'] = 'Temafarve til web appen'; diff --git a/lib/tpl/dokuwiki/lang/da/style.txt b/lib/tpl/dokuwiki/lang/da/style.txt new file mode 100644 index 000000000..9e15aa819 --- /dev/null +++ b/lib/tpl/dokuwiki/lang/da/style.txt @@ -0,0 +1 @@ +If you want to adjust the logo, simply use the Media Manager to upload a ''logo.png'' into the ''wiki'' or the root namespace and it will be automatically used. You can also upload a ''favicon.ico'' there. If you use a closed wiki it is recommended to make the ''wiki'' (or root) namespace world readable in the ACL settings or your logo is not shown to not logged in users.
\ No newline at end of file diff --git a/lib/tpl/dokuwiki/lang/de/lang.php b/lib/tpl/dokuwiki/lang/de/lang.php index 1e3115f24..c08a9b753 100644 --- a/lib/tpl/dokuwiki/lang/de/lang.php +++ b/lib/tpl/dokuwiki/lang/de/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Jürgen Fredriksson <jfriedrich@gmx.at> * @author Anika Henke <anika@selfthinker.org> */ $lang['__background_site__'] = 'Farbe für den Seitenhintergrund (hinter dem Inhaltsbereich)'; @@ -13,3 +14,4 @@ $lang['__site_width__'] = 'Breite der ganzen Seite (kann eine beliebige L $lang['__sidebar_width__'] = 'Breite der Seitenleiste, falls vorhanden (kann eine beliebige Längeneinheit sein: %, px, em, ...)'; $lang['__tablet_width__'] = 'Unter dieser Fensterbreite wechselt die Seite in den Tabletmodus'; $lang['__phone_width__'] = 'Unter dieser Fensterbreite wechselt die Seite in den Handymodus'; +$lang['__theme_color__'] = 'Farbschema der Webapplikation'; diff --git a/lib/tpl/dokuwiki/lang/el/lang.php b/lib/tpl/dokuwiki/lang/el/lang.php new file mode 100644 index 000000000..5f2162f61 --- /dev/null +++ b/lib/tpl/dokuwiki/lang/el/lang.php @@ -0,0 +1,16 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Katerina Katapodi <extragold1234@hotmail.com> + */ +$lang['__background_site__'] = 'Χρώμα φόντου (πίσω από το κουτί περιεχομένων)'; +$lang['__link__'] = 'Το χρώμα γενικής σύνδεσης'; +$lang['__existing__'] = 'Το χρώμα συνδέσμων για τις υπάρχουσες σελίδες'; +$lang['__missing__'] = 'Το χρώμα συνδέσμων για μη υπάρχουσες σελίδες'; +$lang['__site_width__'] = 'Το εύρος ιστοσελίδας (μπορεί να είναι μονάδα μήκους %, px, em..)'; +$lang['__sidebar_width__'] = 'Το πλάτος της μπάρας στο πλάι, αν υπάρχει (μπορεί να είναι μονάδα μήκους, %, px, em..)'; +$lang['__tablet_width__'] = 'Κάτω από τα μεγέθη της οθόνης αυτού του πλάτους, η ιστοσελίδα λειτουργεί με την δισκέτα.'; +$lang['__phone_width__'] = 'Κάτω από τα μεγέθη της οθόνης αυτού του πλάτους, η ιστοσελίδα λειτουργεί με τηλέφωνο'; +$lang['__theme_color__'] = 'Χρώμα θέματος ιστοσελίδας'; diff --git a/lib/tpl/dokuwiki/lang/el/style.txt b/lib/tpl/dokuwiki/lang/el/style.txt new file mode 100644 index 000000000..433f82e85 --- /dev/null +++ b/lib/tpl/dokuwiki/lang/el/style.txt @@ -0,0 +1 @@ +Αν θέλετε να προσαρμόσετε το logo, χρησιμοποιείστε απλώς το MediaManager για να φορτώσετε ένα ''logo.png'' μέσα στο ''wiki'' η τον βασικό χώρο ονόματος και θα χρησιμοποιηθεί αυτόματα. Μπορείτε επίσης να φορτώσετε ένα ''favicon.ico'' εκεί. Αν χρησιμοποιήσετε ένα κλειστό wiki συστήνεται να διαμορφώσετε το ''wiki'' ως αναγνώσιμο στις ρυθμίσεις ACL, ειδάλλως το logo σας δεν θα φαίνεται στους χρήστες που δεν έχουν συνδεθεί
\ No newline at end of file diff --git a/lib/tpl/dokuwiki/lang/fa/lang.php b/lib/tpl/dokuwiki/lang/fa/lang.php index e96276042..dc982a7b8 100644 --- a/lib/tpl/dokuwiki/lang/fa/lang.php +++ b/lib/tpl/dokuwiki/lang/fa/lang.php @@ -13,3 +13,4 @@ $lang['__site_width__'] = 'عرض کل سایت (از واحدهای طو $lang['__sidebar_width__'] = 'عرض نوار کناری درصورت وجود (از واحدهای طول شامل % یا px یا em و ... میشود استفاده کرد)'; $lang['__tablet_width__'] = 'در پایین اندازههای صفحه با این عرض وقتی که در تبلت باز میشود'; $lang['__phone_width__'] = 'در پایین اندازههای صفحه با این عرض وقتی که در تلفن موبایل باز میشود'; +$lang['__theme_color__'] = 'رنگ قالب برای برنامهٔ وب'; diff --git a/lib/tpl/dokuwiki/lang/it/lang.php b/lib/tpl/dokuwiki/lang/it/lang.php index cec5ff61c..9ce1eb9c1 100644 --- a/lib/tpl/dokuwiki/lang/it/lang.php +++ b/lib/tpl/dokuwiki/lang/it/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Stefano <stefano.stefano@gmail.com> * @author Torpedo <dgtorpedo@gmail.com> */ $lang['__background_site__'] = 'Colore per lo sfondo di livello più basso (dietro il riquadro del contenuto)'; @@ -13,3 +14,4 @@ $lang['__site_width__'] = 'Larghezza dell\'intero sito (può essere una q $lang['__sidebar_width__'] = 'Larghezza della barra laterale, se presente (può essere una qualunque unità di lunghezza: %, px, em, ...)'; $lang['__tablet_width__'] = 'Per dimensioni dello schermo al di sotto di questa larghezza, il sito passa in modalità tablet'; $lang['__phone_width__'] = 'Per dimensioni dello schermo al di sotto di questa larghezza, il sito passa in modalità telefono'; +$lang['__theme_color__'] = 'il colore del tema dell\'app'; diff --git a/lib/tpl/dokuwiki/lang/ja/lang.php b/lib/tpl/dokuwiki/lang/ja/lang.php index 353bf0776..d07364672 100644 --- a/lib/tpl/dokuwiki/lang/ja/lang.php +++ b/lib/tpl/dokuwiki/lang/ja/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author HokkaidoPerson <dosankomali@yahoo.co.jp> * @author Hideaki SAWADA <chuno@live.jp> */ $lang['__background_site__'] = 'サイト全体の背景色(content box の背後)'; @@ -13,3 +14,4 @@ $lang['__site_width__'] = 'サイトの全体幅(任意の長さの単 $lang['__sidebar_width__'] = 'サイドバーがある場合、サイドバーの幅(任意の長さの単位を使用可能: % px em 他)'; $lang['__tablet_width__'] = 'タブレットモードにサイトを切替える、画面幅'; $lang['__phone_width__'] = '携帯電話モードにサイトを切替える、画面幅'; +$lang['__theme_color__'] = 'ウェブアプリのテーマカラー'; diff --git a/lib/tpl/dokuwiki/lang/ko/lang.php b/lib/tpl/dokuwiki/lang/ko/lang.php index fcc422c80..df6af9214 100644 --- a/lib/tpl/dokuwiki/lang/ko/lang.php +++ b/lib/tpl/dokuwiki/lang/ko/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Traend <Traend@ruu.kr> * @author Myeongjin <aranet100@gmail.com> */ $lang['__background_site__'] = '(내용 상자 뒤의) 매우 배경 색'; @@ -13,3 +14,4 @@ $lang['__site_width__'] = '전체 사이트의 너비 (아무 길이 단 $lang['__sidebar_width__'] = '사이드바가 있다면, 그것의 너비 (아무 길이 단위나 될 수 있음: %, px, em, ...)'; $lang['__tablet_width__'] = '사이트를 태블릿 모드로 전환할 화면 너비'; $lang['__phone_width__'] = '사이트를 폰 모드로 전환할 화면 너비'; +$lang['__theme_color__'] = '웹 앱의 테마 색상'; diff --git a/lib/tpl/dokuwiki/lang/oc/lang.php b/lib/tpl/dokuwiki/lang/oc/lang.php new file mode 100644 index 000000000..e51cb40f2 --- /dev/null +++ b/lib/tpl/dokuwiki/lang/oc/lang.php @@ -0,0 +1,10 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author En Mathis <heartattack@free.fr> + */ +$lang['__link__'] = 'La color generala dels ligams'; +$lang['__existing__'] = 'La color pels ligams cap a paginas qu\'existisson'; +$lang['__missing__'] = 'La color pels ligams cap a paginas qu\'existisson pas'; diff --git a/lib/tpl/dokuwiki/lang/pl/lang.php b/lib/tpl/dokuwiki/lang/pl/lang.php index ffff09f58..082565096 100644 --- a/lib/tpl/dokuwiki/lang/pl/lang.php +++ b/lib/tpl/dokuwiki/lang/pl/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Bartek S <sadupl@gmail.com> * @author Wojciech Lichota <wojciech@lichota.pl> */ $lang['__background_site__'] = 'Kolor tła za polem zawartości'; @@ -13,3 +14,4 @@ $lang['__site_width__'] = 'Szerokość pełnej strony (możliwa dowolna j $lang['__sidebar_width__'] = 'Szerokość paska bocznego, jeśli istnieje (możliwa dowolna jednostka długości: %, px, em, ...)'; $lang['__tablet_width__'] = 'Szerokość ekrany poniżej której, strona przełączy się w tryb tabletu'; $lang['__phone_width__'] = 'Szerokość ekrany poniżej której, strona przełączy się w tryb telefonu'; +$lang['__theme_color__'] = 'Kolor motywu aplikacji internetowej'; diff --git a/lib/tpl/dokuwiki/lang/pt-br/lang.php b/lib/tpl/dokuwiki/lang/pt-br/lang.php index edf8ec9d0..3e9f410b0 100644 --- a/lib/tpl/dokuwiki/lang/pt-br/lang.php +++ b/lib/tpl/dokuwiki/lang/pt-br/lang.php @@ -13,3 +13,4 @@ $lang['__site_width__'] = 'Largura do site inteiro (pode ser qualquer uni $lang['__sidebar_width__'] = 'Largura da barra lateral, caso exista (pode ser qualquer unidade: %, px, em, ...)'; $lang['__tablet_width__'] = 'Em larguras abaixo dessa medida, o site mudará para o modo tablet'; $lang['__phone_width__'] = 'Em larguras abaixo dessa medida, o site mudará para o modo telefone'; +$lang['__theme_color__'] = 'Tema de cor da aplicação web'; diff --git a/lib/tpl/dokuwiki/lang/pt/lang.php b/lib/tpl/dokuwiki/lang/pt/lang.php new file mode 100644 index 000000000..45f35fbc7 --- /dev/null +++ b/lib/tpl/dokuwiki/lang/pt/lang.php @@ -0,0 +1,16 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Paulo Ricardo Schopf <pschopf@gmail.com> + */ +$lang['__background_site__'] = 'A cor para o fundo (atrás da caixa de conteúdo)'; +$lang['__link__'] = 'A cor para links gerais'; +$lang['__existing__'] = 'A cor para links de páginas existentes'; +$lang['__missing__'] = 'A cor para links de páginas inexistentes'; +$lang['__site_width__'] = 'A largura do site completo (pode ser qualquer unidade de tamanho: %, px, em, ...)'; +$lang['__sidebar_width__'] = 'A largura da barra lateral, se houver (pode ser qualquer unidade de comprimento: %, px, em, ...)'; +$lang['__tablet_width__'] = 'Abaixo dessa largura, o site alterna para o modo tablet'; +$lang['__phone_width__'] = 'Abaixo desta largura, o site muda para o modo de telefone'; +$lang['__theme_color__'] = 'Cor do tema do aplicativo da web'; diff --git a/lib/tpl/dokuwiki/lang/pt/style.txt b/lib/tpl/dokuwiki/lang/pt/style.txt new file mode 100644 index 000000000..5327ce10b --- /dev/null +++ b/lib/tpl/dokuwiki/lang/pt/style.txt @@ -0,0 +1 @@ +Se você quiser ajustar o logotipo, basta usar o Gerenciador de Mídia para enviar um "logo.png" no "wiki"' ou no namespace raiz e ele será usado automaticamente. Você também pode fazer upload de um "favicon.ico". Se você usa um wiki fechado, é recomendado deixar o namespace "wiki" (ou raiz) legível nas configurações da ACL ou seu logotipo não será mostrado para usuários não logados.
\ No newline at end of file diff --git a/lib/tpl/dokuwiki/lang/sk/lang.php b/lib/tpl/dokuwiki/lang/sk/lang.php index ad200d351..5b27ba213 100644 --- a/lib/tpl/dokuwiki/lang/sk/lang.php +++ b/lib/tpl/dokuwiki/lang/sk/lang.php @@ -3,9 +3,15 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Peter Mydliar <peto.mydliar@gmail.com> * @author Martin Michalek <michalek.dev@gmail.com> */ $lang['__background_site__'] = 'Farba základného pozadia (za oknom s obsahom)'; $lang['__link__'] = 'Všeobecná farba odkazu'; $lang['__existing__'] = 'Farba odkazov na existujúce stránky'; $lang['__missing__'] = 'Farba odkazov na neexistujúce stránky'; +$lang['__site_width__'] = 'Šírka stránky (môže byť ľubovoľná jednotka dĺžky: %, px, em, ...}'; +$lang['__sidebar_width__'] = 'Šírka bočného panela (môže byť ľubovoľná jednotka dĺžky: %, px, em, ...}'; +$lang['__tablet_width__'] = 'Nižšia šírka stránky prepne zobrazenie do režimu tabletu'; +$lang['__phone_width__'] = 'Nižšia šírka stránky prepne zobrazenie do režimu telefónu'; +$lang['__theme_color__'] = 'Farba témy pre webovú aplikáciu'; diff --git a/lib/tpl/dokuwiki/lang/vi/lang.php b/lib/tpl/dokuwiki/lang/vi/lang.php new file mode 100644 index 000000000..a3c61db24 --- /dev/null +++ b/lib/tpl/dokuwiki/lang/vi/lang.php @@ -0,0 +1,16 @@ +<?php + +/** + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * + * @author Thien Hau <thienhausoftware@gmail.com> + */ +$lang['__background_site__'] = 'Màu cho nền (phía sau hộp nội dung)'; +$lang['__link__'] = 'Màu liên kết chung'; +$lang['__existing__'] = 'Màu của liên kết đến các trang hiện có'; +$lang['__missing__'] = 'Màu cho các liên kết đến các trang không tồn tại'; +$lang['__site_width__'] = 'Độ rộng của trang web đầy đủ (có thể là bất kỳ đơn vị độ dài nào: %, px, em, ...)'; +$lang['__sidebar_width__'] = 'Chiều rộng của thanh bên, nếu có (có thể là bất kỳ đơn vị độ dài nào: %, px, em, ...)'; +$lang['__tablet_width__'] = 'Cỡ màn hình dưới chiều rộng này, trang web chuyển sang chế độ máy tính bảng'; +$lang['__phone_width__'] = 'Cỡ màn hình chiều rộng này, trang web chuyển sang chế độ điện thoại'; +$lang['__theme_color__'] = 'Màu chủ đề của ứng dụng web'; diff --git a/lib/tpl/dokuwiki/lang/vi/style.txt b/lib/tpl/dokuwiki/lang/vi/style.txt new file mode 100644 index 000000000..9fd759089 --- /dev/null +++ b/lib/tpl/dokuwiki/lang/vi/style.txt @@ -0,0 +1,4 @@ +Nếu bạn muốn điều chỉnh logo, chỉ cần sử dụng Trình quản lý phương tiện để tải lên ''logo.png'' vào ''wiki'' hoặc không gian tên gốc và nó +sẽ được tự động sử dụng. Bạn cũng có thể tải lên ''favicon.ico'' ở đó. Nếu bạn sử dụng một wiki đóng +nên để thế giới không gian tên ''wiki'' (hoặc gốc) có thể đọc được trong cài đặt ACL hoặc +logo của bạn không được hiển thị để không đăng nhập người dùng.
\ No newline at end of file diff --git a/lib/tpl/dokuwiki/lang/zh/lang.php b/lib/tpl/dokuwiki/lang/zh/lang.php index a9a284f8e..a7b61b955 100644 --- a/lib/tpl/dokuwiki/lang/zh/lang.php +++ b/lib/tpl/dokuwiki/lang/zh/lang.php @@ -3,6 +3,7 @@ /** * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * + * @author Phy <dokuwiki@phy25.com> * @author lainme <lainme993@gmail.com> */ $lang['__background_site__'] = '特别背景的颜色 (内容框后面)'; @@ -13,3 +14,4 @@ $lang['__site_width__'] = '全站的宽度 (可以是任何长度单位 $lang['__sidebar_width__'] = '侧边栏的宽度 (如有,可以是任何长度单位:%,px,em,...)'; $lang['__tablet_width__'] = '当屏幕尺寸小于这个宽度,站点切换到平板模式'; $lang['__phone_width__'] = '当屏幕尺寸小于这个宽度,站点切换到手机模式'; +$lang['__theme_color__'] = 'webapp 主题颜色'; diff --git a/lib/tpl/dokuwiki/main.php b/lib/tpl/dokuwiki/main.php index 2d2151f9c..67b6e61de 100644 --- a/lib/tpl/dokuwiki/main.php +++ b/lib/tpl/dokuwiki/main.php @@ -9,7 +9,6 @@ */ if (!defined('DOKU_INC')) die(); /* must be run from within DokuWiki */ -header('X-UA-Compatible: IE=edge,chrome=1'); $hasSidebar = page_findnearest($conf['sidebar']); $showSidebar = $hasSidebar && ($ACT=='show'); diff --git a/lib/tpl/dokuwiki/script.js b/lib/tpl/dokuwiki/script.js index b4e6ced6d..88dae9023 100644 --- a/lib/tpl/dokuwiki/script.js +++ b/lib/tpl/dokuwiki/script.js @@ -71,9 +71,19 @@ jQuery(function(){ ); // increase sidebar length to match content (desktop mode only) - var $sidebar = jQuery('.desktop #dokuwiki__aside'); - if($sidebar.length) { + var sidebar_height = jQuery('.desktop #dokuwiki__aside').height(); + var pagetool_height = jQuery('.desktop #dokuwiki__pagetools ul:first').height(); + // pagetools div has no height; ul has a height + var content_min = Math.max(sidebar_height || 0, pagetool_height || 0); + + var content_height = jQuery('#dokuwiki__content div.page').height(); + if(content_min && content_min > content_height) { var $content = jQuery('#dokuwiki__content div.page'); - $content.css('min-height', $sidebar.height()); + $content.css('min-height', content_min); } + + // blur when clicked + jQuery('#dokuwiki__pagetools div.tools>ul>li>a').on('click', function(){ + this.blur(); + }); }); diff --git a/lib/tpl/dokuwiki/tpl_footer.php b/lib/tpl/dokuwiki/tpl_footer.php index 34e8b90f6..c7a04e155 100644 --- a/lib/tpl/dokuwiki/tpl_footer.php +++ b/lib/tpl/dokuwiki/tpl_footer.php @@ -25,7 +25,8 @@ if (!defined('DOKU_INC')) die(); <a href="//jigsaw.w3.org/css-validator/check/referer?profile=css3" title="Valid CSS" <?php echo $target?>><img src="<?php echo tpl_basedir(); ?>images/button-css.png" width="80" height="15" alt="Valid CSS" /></a> <a href="https://dokuwiki.org/" title="Driven by DokuWiki" <?php echo $target?>><img - src="<?php echo tpl_basedir(); ?>images/button-dw.png" width="80" height="15" alt="Driven by DokuWiki" /></a> + src="<?php echo tpl_basedir(); ?>images/button-dw.png" width="80" height="15" + alt="Driven by DokuWiki" /></a> </div> </div></div><!-- /footer --> diff --git a/lib/tpl/index.php b/lib/tpl/index.php index d6f00343b..4d48d5127 100644 --- a/lib/tpl/index.php +++ b/lib/tpl/index.php @@ -8,6 +8,7 @@ * @author Andreas Gohr <andi@splitbrain.org> * @author Anika Henke <anika@selfthinker.org> */ +// phpcs:disable PSR1.Files.SideEffects if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); if(!defined('NOSESSION')) define('NOSESSION',1); require_once(DOKU_INC.'inc/init.php'); @@ -17,7 +18,7 @@ require_once(DOKU_INC.'inc/init.php'); <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Template Replacements</title> - <style type="text/css"> + <style> body { background-color: #fff; color: #000; @@ -44,12 +45,10 @@ require_once(DOKU_INC.'inc/init.php'); <body> <?php // get merged style.ini -define('SIMPLE_TEST', true); // hack to prevent css output and headers -require_once(DOKU_INC.'lib/exe/css.php'); -$styleUtils = new \dokuwiki\StyleUtils(); -$ini = $styleUtils->cssStyleini($conf['template']); +$styleUtils = new \dokuwiki\StyleUtils($conf['template']); +$ini = $styleUtils->cssStyleini(); -if ($ini) { +if (!empty($ini)) { echo '<table>'; echo "<caption>".hsc($conf['template'])."'s style.ini</caption>"; foreach($ini['replacements'] as $key => $val){ |