diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/auth.php | 13 | ||||
-rw-r--r-- | inc/common.php | 4 | ||||
-rw-r--r-- | inc/fetch.functions.php | 149 | ||||
-rw-r--r-- | inc/html.php | 8 | ||||
-rw-r--r-- | inc/httputils.php | 9 | ||||
-rw-r--r-- | inc/infoutils.php | 46 | ||||
-rw-r--r-- | inc/lang/de/lang.php | 4 | ||||
-rw-r--r-- | inc/lang/fi/lang.php | 3 | ||||
-rw-r--r-- | inc/lang/ko/adminplugins.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/backlinks.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/edit.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/index.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/install.html | 4 | ||||
-rw-r--r-- | inc/lang/ko/lang.php | 36 | ||||
-rw-r--r-- | inc/lang/ko/newpage.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/recent.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/registermail.txt | 2 | ||||
-rw-r--r-- | inc/lang/lv/lang.php | 4 | ||||
-rw-r--r-- | inc/lang/nl/lang.php | 3 | ||||
-rw-r--r-- | inc/lang/nl/password.txt | 2 | ||||
-rw-r--r-- | inc/media.php | 34 |
21 files changed, 292 insertions, 41 deletions
diff --git a/inc/auth.php b/inc/auth.php index 68b6b438d..9f180fc94 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -48,10 +48,15 @@ function auth_setup() { // try to load auth backend from plugins foreach ($plugin_controller->getList('auth') as $plugin) { - if ($conf['authtype'] === $plugin) { - $auth = $plugin_controller->load('auth', $plugin); - break; - } + if ($conf['authtype'] === $plugin) { + $auth = $plugin_controller->load('auth', $plugin); + break; + } elseif ('auth' . $conf['authtype'] === $plugin) { + // matches old auth backends (pre-Weatherwax) + $auth = $plugin_controller->load('auth', $plugin); + msg('Your authtype setting is deprecated. You must set $conf[\'authconfig\'] = ' . "auth" . $conf['authtype'] + . ' in your config (see <a href="https://www.dokuwiki.org/auth">Authentication Backends</a>)',-1,'','',MSG_ADMINS_ONLY); + } } if(!isset($auth) || !$auth){ diff --git a/inc/common.php b/inc/common.php index 471eb91b5..27f90b53b 100644 --- a/inc/common.php +++ b/inc/common.php @@ -436,6 +436,10 @@ function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep = function ml($id = '', $more = '', $direct = true, $sep = '&', $abs = false) { global $conf; if(is_array($more)) { + // add token for resized images + if($more['w'] || $more['h']){ + $more['tok'] = media_get_token($id,$more['w'],$more['h']); + } // strip defaults for shorter URLs if(isset($more['cache']) && $more['cache'] == 'cache') unset($more['cache']); if(!$more['w']) unset($more['w']); diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php new file mode 100644 index 000000000..5801e96fa --- /dev/null +++ b/inc/fetch.functions.php @@ -0,0 +1,149 @@ +<?php +/** + * Functions used by lib/exe/fetch.php + * (not included by other parts of dokuwiki) + */ + +/** + * Set headers and send the file to the client + * + * The $cache parameter influences how long files may be kept in caches, the $public parameter + * influences if this caching may happen in public proxis or in the browser cache only FS#2734 + * + * This function will abort the current script when a 304 is sent or file sending is handled + * through x-sendfile + * + * @author Andreas Gohr <andi@splitbrain.org> + * @author Ben Coburn <btcoburn@silicodon.net> + * @param string $file local file to send + * @param string $mime mime type of the file + * @param bool $dl set to true to force a browser download + * @param int $cache remaining cache time in seconds (-1 for $conf['cache'], 0 for no-cache) + * @param bool $public is this a public ressource or a private one? + */ +function sendFile($file, $mime, $dl, $cache, $public = false) { + global $conf; + // send mime headers + header("Content-Type: $mime"); + + // calculate cache times + if($cache == -1) { + $maxage = max($conf['cachetime'], 3600); // cachetime or one hour + $expires = time() + $maxage; + } else if($cache > 0) { + $maxage = $cache; // given time + $expires = time() + $maxage; + } else { // $cache == 0 + $maxage = 0; + $expires = 0; // 1970-01-01 + } + + // smart http caching headers + if($maxage) { + if($public) { + // cache publically + header('Expires: '.gmdate("D, d M Y H:i:s", $expires).' GMT'); + header('Cache-Control: public, proxy-revalidate, no-transform, max-age='.$maxage); + header('Pragma: public'); + } else { + // cache in browser + header('Expires: '.gmdate("D, d M Y H:i:s", $expires).' GMT'); + header('Cache-Control: private, no-transform, max-age='.$maxage); + header('Pragma: no-cache'); + } + } else { + // no cache at all + header('Expires: Thu, 01 Jan 1970 00:00:00 GMT'); + header('Cache-Control: no-cache, no-transform'); + header('Pragma: no-cache'); + } + + //send important headers first, script stops here if '304 Not Modified' response + $fmtime = @filemtime($file); + http_conditionalRequest($fmtime); + + //download or display? + if($dl) { + header('Content-Disposition: attachment; filename="'.utf8_basename($file).'";'); + } else { + header('Content-Disposition: inline; filename="'.utf8_basename($file).'";'); + } + + //use x-sendfile header to pass the delivery to compatible webservers + if(http_sendfile($file)) exit; + + // send file contents + $fp = @fopen($file, "rb"); + if($fp) { + http_rangeRequest($fp, filesize($file), $mime); + } else { + http_status(500); + print "Could not read $file - bad permissions?"; + } +} + +/** + * Check for media for preconditions and return correct status code + * + * READ: MEDIA, MIME, EXT, CACHE + * WRITE: MEDIA, FILE, array( STATUS, STATUSMESSAGE ) + * + * @author Gerry Weissbach <gerry.w@gammaproduction.de> + * @param $media reference to the media id + * @param $file reference to the file variable + * @returns array(STATUS, STATUSMESSAGE) + */ +function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) { + global $MIME, $EXT, $CACHE, $INPUT; + + //media to local file + if(preg_match('#^(https?)://#i', $media)) { + //check hash + if(substr(md5(auth_cookiesalt().$media), 0, 6) !== $INPUT->str('hash')) { + return array(412, 'Precondition Failed'); + } + //handle external images + if(strncmp($MIME, 'image/', 6) == 0) $file = media_get_from_URL($media, $EXT, $CACHE); + if(!$file) { + //download failed - redirect to original URL + return array(302, $media); + } + } else { + $media = cleanID($media); + if(empty($media)) { + return array(400, 'Bad request'); + } + // check token for resized images + if (($width || $height) && media_get_token($media, $width, $height) !== $INPUT->str('tok')) { + return array(412, 'Precondition Failed'); + } + + //check permissions (namespace only) + if(auth_quickaclcheck(getNS($media).':X') < AUTH_READ) { + return array(403, 'Forbidden'); + } + $file = mediaFN($media, $rev); + } + + //check file existance + if(!@file_exists($file)) { + return array(404, 'Not Found'); + } + + return array(200, null); +} + +/** + * Returns the wanted cachetime in seconds + * + * Resolves named constants + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +function calc_cache($cache) { + global $conf; + + if(strtolower($cache) == 'nocache') return 0; //never cache + if(strtolower($cache) == 'recache') return $conf['cachetime']; //use standard cache + return -1; //cache endless +} diff --git a/inc/html.php b/inc/html.php index 59415f7da..fb39fcb3c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1297,9 +1297,11 @@ function html_msgarea(){ foreach($MSG as $msg){ $hash = md5($msg['msg']); if(isset($shown[$hash])) continue; // skip double messages - print '<div class="'.$msg['lvl'].'">'; - print $msg['msg']; - print '</div>'; + if(info_msg_allowed($msg)){ + print '<div class="'.$msg['lvl'].'">'; + print $msg['msg']; + print '</div>'; + } $shown[$hash] = 1; } diff --git a/inc/httputils.php b/inc/httputils.php index d3f3cdde2..ca60ed509 100644 --- a/inc/httputils.php +++ b/inc/httputils.php @@ -61,9 +61,9 @@ function http_conditionalRequest($timestamp){ } /** - * Let the webserver send the given file vi x-sendfile method + * Let the webserver send the given file via x-sendfile method * - * @author Chris Smith <chris.eureka@jalakai.co.uk> + * @author Chris Smith <chris@jalakai.co.uk> * @returns void or exits with previously header() commands executed */ function http_sendfile($file) { @@ -177,7 +177,8 @@ function http_rangeRequest($fh,$size,$mime){ echo HTTP_HEADER_LF.'--'.HTTP_MULTIPART_BOUNDARY.'--'.HTTP_HEADER_LF; } - // everything should be done here, exit + // everything should be done here, exit (or return if testing) + if (defined('SIMPLE_TEST')) return; exit; } @@ -320,7 +321,7 @@ function http_status($code = 200, $text = '') { $server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : false; - if(substr(php_sapi_name(), 0, 3) == 'cgi') { + if(substr(php_sapi_name(), 0, 3) == 'cgi' || defined('SIMPLE_TEST')) { header("Status: {$code} {$text}", true); } elseif($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0') { header($server_protocol." {$code} {$text}", true, $code); diff --git a/inc/infoutils.php b/inc/infoutils.php index 92607e4fa..9fe5ee689 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -269,7 +269,13 @@ function check(){ * @author Andreas Gohr <andi@splitbrain.org> * @see html_msgarea */ -function msg($message,$lvl=0,$line='',$file=''){ + +define('MSG_PUBLIC', 0); +define('MSG_USERS_ONLY', 1); +define('MSG_MANAGERS_ONLY',2); +define('MSG_ADMINS_ONLY',4); + +function msg($message,$lvl=0,$line='',$file='',$allow=MSG_PUBLIC){ global $MSG, $MSG_shown; $errors[-1] = 'error'; $errors[0] = 'info'; @@ -279,7 +285,7 @@ function msg($message,$lvl=0,$line='',$file=''){ if($line || $file) $message.=' ['.utf8_basename($file).':'.$line.']'; if(!isset($MSG)) $MSG = array(); - $MSG[]=array('lvl' => $errors[$lvl], 'msg' => $message); + $MSG[]=array('lvl' => $errors[$lvl], 'msg' => $message, 'allow' => $allow); if(isset($MSG_shown) || headers_sent()){ if(function_exists('html_msgarea')){ html_msgarea(); @@ -289,6 +295,42 @@ function msg($message,$lvl=0,$line='',$file=''){ unset($GLOBALS['MSG']); } } +/** + * Determine whether the current user is allowed to view the message + * in the $msg data structure + * + * @param $msg array dokuwiki msg structure + * msg => string, the message + * lvl => int, level of the message (see msg() function) + * allow => int, flag used to determine who is allowed to see the message + * see MSG_* constants + */ +function info_msg_allowed($msg){ + global $INFO, $auth; + + // is the message public? - everyone and anyone can see it + if (empty($msg['allow']) || ($msg['allow'] == MSG_PUBLIC)) return true; + + // restricted msg, but no authentication + if (empty($auth)) return false; + + switch ($msg['allow']){ + case MSG_USERS_ONLY: + return !empty($INFO['userinfo']); + + case MSG_MANAGERS_ONLY: + return $INFO['ismanager']; + + case MSG_ADMINS_ONLY: + return $INFO['isadmin']; + + default: + trigger_error('invalid msg allow restriction. msg="'.$msg['msg'].'" allow='.$msg['allow'].'"', E_USER_WARNING); + return $INFO['isadmin']; + } + + return false; +} /** * print debug messages diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 160ea53e8..1a9cb7d90 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -21,6 +21,7 @@ * @author Matthias Schulte <mailinglist@lupo49.de> * @author Paul Lachewsky <kaeptn.haddock@gmail.com> * @author Pierre Corell <info@joomla-praxis.de> + * @author Mateng Schimmerlos <mateng@firemail.de>) */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -298,6 +299,9 @@ $lang['i_pol1'] = 'Öffentliches Wiki (Lesen für alle, Schreiben $lang['i_pol2'] = 'Geschlossenes Wiki (Lesen, Schreiben und Hochladen nur für registrierte Nutzer)'; $lang['i_retry'] = 'Wiederholen'; $lang['i_license'] = 'Bitte wählen Sie die Lizenz, unter die Sie Ihre Inhalte stellen möchten:'; +$lang['i_license_none'] = 'Lizensierungsinformation nicht anzeigen'; +$lang['i_pop_field'] = 'Bitte Helfen Sie mit, DokuWiki zu verbessern:'; +$lang['i_pop_label'] = 'Einmal monatlich anonymisierte Nutzungsdaten an das DokuWiki-Entwicklerteam senden'; $lang['recent_global'] = 'Im Moment sehen Sie die Änderungen im Namensraum <b>%s</b>. Sie können auch <a href="%s">die Änderungen im gesamten Wiki sehen</a>.'; $lang['years'] = 'vor %d Jahren'; $lang['months'] = 'vor %d Monaten'; diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index 59e4dc6cb..b66558d26 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -287,6 +287,9 @@ $lang['i_pol1'] = 'Julkinen Wiki (luku kaikilla, kirjoitus ja tie $lang['i_pol2'] = 'Suljettu Wiki (luku, kirjoitus ja tiedostojen lähetys vain rekisteröityneillä käyttäjillä)'; $lang['i_retry'] = 'Yritä uudelleen'; $lang['i_license'] = 'Valitse lisenssi, jonka alle haluat sisältösi laittaa:'; +$lang['i_license_none'] = 'Älä näytä mitään lisenssitietoja'; +$lang['i_pop_field'] = 'Auta parantamaan DokuWikiä'; +$lang['i_pop_label'] = 'Lähetä kerran kuussa nimetöntä käyttäjätietoa DokuWikin kehittäjille'; $lang['recent_global'] = 'Seuraat tällä hetkellä muutoksia nimiavaruuden <b>%s</b> sisällä. Voit myös <a href="%s">katsoa muutoksia koko wikissä</a>'; $lang['years'] = '%d vuotta sitten'; $lang['months'] = '%d kuukautta sitten'; diff --git a/inc/lang/ko/adminplugins.txt b/inc/lang/ko/adminplugins.txt index 5312cf357..2c436d6f8 100644 --- a/inc/lang/ko/adminplugins.txt +++ b/inc/lang/ko/adminplugins.txt @@ -1 +1 @@ -===== 부가적인 플러그인 =====
\ No newline at end of file +===== 추가적인 플러그인 =====
\ No newline at end of file diff --git a/inc/lang/ko/backlinks.txt b/inc/lang/ko/backlinks.txt index 85fdfa3da..6a6ad48a4 100644 --- a/inc/lang/ko/backlinks.txt +++ b/inc/lang/ko/backlinks.txt @@ -1,3 +1,3 @@ ====== 백링크 ====== -현재 문서를 가리키는 링크가 있는 문서 목록입니다. +현재 문서를 가리키는 링크가 있는 문서 목록입니다.
\ No newline at end of file diff --git a/inc/lang/ko/edit.txt b/inc/lang/ko/edit.txt index f52326a33..97927b7fe 100644 --- a/inc/lang/ko/edit.txt +++ b/inc/lang/ko/edit.txt @@ -1 +1 @@ -문서를 편집하고 **저장**을 누르세요. 위키 구문은 [[wiki:syntax]] 또는 [[wiki:ko_syntax|(한국어) 구문]]을 참고하세요. 이 문서를 **더 좋게 만들 자신이 있을 때**에만 편집하세요. 연습을 하고 싶다면 먼저 [[playground:playground|연습장]]에 가서 연습하세요. +문서를 편집하고 **저장**을 누르세요. 위키 구문은 [[wiki:syntax]] 또는 [[wiki:ko_syntax|(한국어) 구문]]을 참고하세요. 이 문서를 **더 좋게 만들 자신이 있을 때**에만 편집하세요. 연습을 하고 싶다면 먼저 [[playground:playground|연습장]]에 가서 연습하세요.
\ No newline at end of file diff --git a/inc/lang/ko/index.txt b/inc/lang/ko/index.txt index 24eb9450c..058f04254 100644 --- a/inc/lang/ko/index.txt +++ b/inc/lang/ko/index.txt @@ -1,3 +1,3 @@ ====== 사이트맵 ====== -이 페이지는 [[doku>namespaces|이름공간]]에서 정렬한 모든 문서의 목록입니다.
\ No newline at end of file +[[doku>namespaces|이름공간]]에서 정렬한 모든 문서의 목록입니다.
\ No newline at end of file diff --git a/inc/lang/ko/install.html b/inc/lang/ko/install.html index a87bb6382..a9961b47e 100644 --- a/inc/lang/ko/install.html +++ b/inc/lang/ko/install.html @@ -3,7 +3,7 @@ <a href="http://dokuwiki.org/install">(영어) 설치 문서</a>를 참고하시기 바랍니다.</p> <p>DokuWiki는 위키 문서와 문서와 관련된 정보(예를 들어 그림, 검색 색인, 이전 판 문서)를 저장하기 위해 일반적인 텍스트 파일을 사용합니다. 정상적으로 DokuWiki를 사용하려면 이 파일을 담고 있는 디렉토리에 대한 쓰기 권한을 가지고 있어야 합니다. -현재 설치 과정 중에는 디렉토리 권한 설정이 불가능합니다. 보통 직접 쉘 명령어를 사용하거나, 호스팅을 사용한다면 FTP나 호스팅 제어판(예를 들어 CPanel)을 사용해서 설정해야 합니다.</p> +현재 설치 과정 중에는 디렉토리 권한 설정이 불가능합니다. 보통 직접 셸 명령어를 사용하거나, 호스팅을 사용한다면 FTP나 호스팅 제어판(예를 들어 CPanel)을 사용해서 설정해야 합니다.</p> <p>현재 설치 과정중에 관리자로 로그인 후 DokuWiki의 관리 메뉴(플러그인 설치, 사용자 관리, 위키 문서 접근 권한 관리, 옵션 설정)를 가능하게 <acronym title="접근 제어 목록">ACL</acronym>에 대한 환경 설정을 수행합니다. DokuWiki가 동작하는데 필요한 사항은 아니지만, 어쨌든 더 쉽게 관리자가 관리할 수 있도록 해줍니다.</p> @@ -12,4 +12,4 @@ DokuWiki가 동작하는데 필요한 사항은 아니지만, 어쨌든 더 쉽 <a href="http://dokuwiki.org/ko:install">설치 과정 (한국어)</a> 과 <a href="http://dokuwiki.org/ko:config">환경 설정 (한국어),</a> <a href="http://dokuwiki.org/install">설치 과정 (영어)</a> -과 <a href="http://dokuwiki.org/config">환경 설정 (영어)</a></p> +과 <a href="http://dokuwiki.org/config">환경 설정 (영어)</a></p>
\ No newline at end of file diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index dd3d6747b..93f8611d6 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -72,11 +72,11 @@ $lang['reguexists'] = '같은 이름을 사용하는 사용자가 있 $lang['regsuccess'] = '사용자를 만들었으며 비밀번호는 이메일로 보냈습니다.'; $lang['regsuccess2'] = '사용자를 만들었습니다.'; $lang['regmailfail'] = '비밀번호를 이메일로 보낼 때 오류가 발생했습니다. 관리자에게 문의하시기 바랍니다!'; -$lang['regbadmail'] = '이메일 주소가 잘못됐습니다 - 오류라고 생각하면 관리자에게 문의하시기 바랍니다.'; +$lang['regbadmail'] = '이메일 주소가 잘못됐습니다 - 오류라고 생각하면 관리자에게 문의하시기 바랍니다'; $lang['regbadpass'] = '새 비밀번호가 일치하지 않습니다. 다시 입력하세요.'; $lang['regpwmail'] = 'DokuWiki 비밀번호'; $lang['reghere'] = '계정이 없나요? 계정을 등록할 수 있습니다'; -$lang['profna'] = '이 위키는 개인 정보 수정을 허용하지 않습니다'; +$lang['profna'] = '이 위키는 개인 정보 수정을 할 수 없습니다'; $lang['profnochange'] = '바뀜이 없습니다.'; $lang['profnoempty'] = '이름이나 이메일 주소가 비었습니다.'; $lang['profchanged'] = '개인 정보가 성공적으로 바뀌었습니다.'; @@ -145,7 +145,7 @@ $lang['mediaselect'] = '미디어 파일 선택'; $lang['fileupload'] = '미디어 파일 올리기'; $lang['uploadsucc'] = '올리기 성공'; $lang['uploadfail'] = '올리기를 실패했습니다. 잘못된 권한 때문일지도 모릅니다.'; -$lang['uploadwrong'] = '올리기를 거부했습니다. 금지된 확장자입니다!'; +$lang['uploadwrong'] = '올리기를 거부했습니다. 금지된 파일 확장자입니다!'; $lang['uploadexist'] = '파일이 이미 존재합니다.'; $lang['uploadbadcontent'] = '올린 파일이 %s 파일 확장자와 일치하지 않습니다.'; $lang['uploadspam'] = '스팸 차단 목록이 올리기를 취소했습니다.'; @@ -160,7 +160,7 @@ $lang['accessdenied'] = '이 문서를 볼 권한이 없습니다.'; $lang['mediausage'] = '이 파일을 참고하려면 다음 문법을 사용하세요:'; $lang['mediaview'] = '원본 파일 보기'; $lang['mediaroot'] = '루트 (root)'; -$lang['mediaupload'] = '파일을 현재 이름공간으로 올립니다. 하위 이름공간으로 만들려면 선택한 파일 이름 앞에 콜론(:)으로 구분되는 이름을 붙이면 됩니다. 파일을 드래그 앤 드롭하여 선택할 수 있습니다.'; +$lang['mediaupload'] = '파일을 현재 이름공간으로 올립니다. 하위 이름공간으로 만들려면 선택한 파일 이름 앞에 쌍점(:)으로 구분되는 이름을 붙이면 됩니다. 파일을 드래그 앤 드롭하여 선택할 수 있습니다.'; $lang['mediaextchange'] = '파일 확장자가 .%s에서 .%s(으)로 바뀌었습니다!'; $lang['reference'] = '참고'; $lang['ref_inuse'] = '다음 문서에서 아직 사용 중이므로 파일을 삭제할 수 없습니다:'; @@ -171,7 +171,7 @@ $lang['toc'] = '목차'; $lang['current'] = '현재'; $lang['yours'] = '판'; $lang['diff'] = '현재 판과의 차이 보기'; -$lang['diff2'] = '선택한 판 간 차이 보기'; +$lang['diff2'] = '선택한 판 사이의 차이 보기'; $lang['difflink'] = '차이 보기로 링크'; $lang['diff_type'] = '차이 보기:'; $lang['diff_inline'] = '인라인 방식'; @@ -194,15 +194,15 @@ $lang['site_tools'] = '사이트 도구'; $lang['page_tools'] = '문서 도구'; $lang['skip_to_content'] = '콘텐츠 넘기기'; $lang['sidebar'] = '사이드바'; -$lang['mail_newpage'] = '문서 추가:'; +$lang['mail_newpage'] = '문서 추가함:'; $lang['mail_changed'] = '문서 바뀜:'; $lang['mail_subscribe_list'] = '이름공간에서 바뀐 문서:'; -$lang['mail_new_user'] = '새로운 사용자:'; -$lang['mail_upload'] = '파일 첨부:'; +$lang['mail_new_user'] = '새 사용자:'; +$lang['mail_upload'] = '파일 올림:'; $lang['changes_type'] = '차이 보기'; $lang['pages_changes'] = '문서'; $lang['media_changes'] = '미디어 파일'; -$lang['both_changes'] = '미디어 파일과 문서 모두'; +$lang['both_changes'] = '문서와 미디어 파일 모두'; $lang['qb_bold'] = '굵은 글씨'; $lang['qb_italic'] = '기울인 글씨'; $lang['qb_underl'] = '밑줄 그어진 글씨'; @@ -246,14 +246,14 @@ $lang['img_keywords'] = '키워드'; $lang['img_width'] = '너비'; $lang['img_height'] = '높이'; $lang['img_manager'] = '미디어 관리자에서 보기'; -$lang['subscr_subscribe_success'] = '%s을(를) %s 구독 목록에 추가하였습니다'; -$lang['subscr_subscribe_error'] = '%s을(를) %s 구독 목록에 추가하는데 실패했습니다'; -$lang['subscr_subscribe_noaddress'] = '등록된 주소가 없기 때문에 구독 목록에 등록되지 않았습니다'; -$lang['subscr_unsubscribe_success'] = '%s을(를) %s 구독 목록에서 삭제하였습니다'; -$lang['subscr_unsubscribe_error'] = '%s을(를) %s 구독 목록에서 삭제하는데 실패했습니다'; -$lang['subscr_already_subscribed'] = '%s은(는) 이미 %s에 구독되고 있습니다'; -$lang['subscr_not_subscribed'] = '%s은(는) 이미 %s에 구독되어 있지 않습니다'; -$lang['subscr_m_not_subscribed'] = '현재의 문서나 이름공간에 구독 등록이 되어 있지 않습니다.'; +$lang['subscr_subscribe_success'] = '%s 사용자가 %s 구독 목록에 추가하였습니다'; +$lang['subscr_subscribe_error'] = '%s 사용자가 %s 구독 목록에 추가하는데 실패했습니다'; +$lang['subscr_subscribe_noaddress'] = '로그인으로 연결된 주소가 없기 때문에 구독 목록에 추가할 수 없습니다'; +$lang['subscr_unsubscribe_success'] = '%s 사용자가 %s 구독 목록에서 삭제하였습니다'; +$lang['subscr_unsubscribe_error'] = '%s 사용자가 %s 구독 목록에서 삭제하는데 실패했습니다'; +$lang['subscr_already_subscribed'] = '%s 사용자가 이미 %s에 구독하고 있습니다'; +$lang['subscr_not_subscribed'] = '%s 사용자가 %s에 구독하고 있지 않습니다'; +$lang['subscr_m_not_subscribed'] = '현재의 문서나 이름공간에 구독하고 있지 않습니다.'; $lang['subscr_m_new_header'] = '구독 추가'; $lang['subscr_m_current_header'] = '현재 구독 중인 문서'; $lang['subscr_m_unsubscribe'] = '구독 취소'; @@ -279,7 +279,7 @@ $lang['i_permfail'] = 'DokuWiki는 <code>%s</code>에 쓰기 가능 $lang['i_confexists'] = '<code>%s</code>(은)는 이미 존재합니다'; $lang['i_writeerr'] = '<code>%s</code>(을)를 만들 수 없습니다. 먼저 디렉토리/파일 권한을 확인하고 파일을 수동으로 만드세요.'; $lang['i_badhash'] = 'dokuwiki.php를 인식할 수 없거나 원본 파일이 아닙니다 (해시=<code>%s</code>)'; -$lang['i_badval'] = '<code>%s</code> - 유효하지 않거나 빈 값입니다'; +$lang['i_badval'] = '<code>%s</code> - 올바르지 않거나 빈 값입니다'; $lang['i_success'] = '환경 설정이 성공적으로 끝났습니다. 지금 install.php를 지워도 상관없습니다. <a href="doku.php?id=wiki:welcome">새 DokuWiki</a>로 들어갑니다.'; $lang['i_failure'] = '환경 설정 파일에 쓰는 도중에 오류가 발생했습니다. <a href="doku.php?id=wiki:welcome">새 DokuWiki</a>를 사용하기 전에 수동으로 문제를 해결해야 합니다.'; $lang['i_policy'] = '초기 ACL 정책'; diff --git a/inc/lang/ko/newpage.txt b/inc/lang/ko/newpage.txt index 87ac969d2..8db34f9cf 100644 --- a/inc/lang/ko/newpage.txt +++ b/inc/lang/ko/newpage.txt @@ -1,3 +1,3 @@ ====== 이 주제는 아직 없습니다 ====== -아직 없는 주제에 대한 링크를 따라왔습니다. **문서 만들기** 버튼을 이용하여 새로 만들 수 있습니다.
\ No newline at end of file +아직 없는 주제에 대한 링크를 따라왔습니다. **문서 만들기** 버튼을 클릭하여 새로 만들 수 있습니다.
\ No newline at end of file diff --git a/inc/lang/ko/recent.txt b/inc/lang/ko/recent.txt index b1dae2463..4dd19640c 100644 --- a/inc/lang/ko/recent.txt +++ b/inc/lang/ko/recent.txt @@ -1,3 +1,3 @@ ====== 최근 바뀜 ====== -아래의 문서는 최근에 바뀌었습니다.
\ No newline at end of file +다음 문서는 최근에 바뀌었습니다.
\ No newline at end of file diff --git a/inc/lang/ko/registermail.txt b/inc/lang/ko/registermail.txt index d06f93047..4707dfa13 100644 --- a/inc/lang/ko/registermail.txt +++ b/inc/lang/ko/registermail.txt @@ -10,4 +10,4 @@ IP 주소 : @IPADDRESS@ 호스트 이름 : @HOSTNAME@ -- -@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. +@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다.
\ No newline at end of file diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php index 2027b87ba..4d2b5d23c 100644 --- a/inc/lang/lv/lang.php +++ b/inc/lang/lv/lang.php @@ -128,6 +128,7 @@ $lang['js']['restore_confirm'] = 'Tiešām atjaunot šo versiju'; $lang['js']['media_diff'] = 'Skatīt atšķirību'; $lang['js']['media_diff_both'] = 'Blakus'; $lang['js']['media_diff_opacity'] = 'Pārklāti'; +$lang['js']['media_diff_portions'] = 'Pa daļām'; $lang['js']['media_select'] = 'Norādīt failus...'; $lang['js']['media_upload_btn'] = 'Augšuplādēt'; $lang['js']['media_done_btn'] = 'Gatavs'; @@ -283,6 +284,9 @@ $lang['i_pol1'] = 'Publisks Wiki (lasa ikviens, raksta un augšup $lang['i_pol2'] = 'Slēgts Wiki (raksta, lasa un augšupielādē tikai reģistrēti lietotāji)'; $lang['i_retry'] = 'Atkārtot'; $lang['i_license'] = 'Ar kādu licenci saturs tiks publicēts:'; +$lang['i_license_none'] = 'Nerādīt nekādu licences informāciju'; +$lang['i_pop_field'] = 'Lūdzu palīdziet uzlabot DokuWiki'; +$lang['i_pop_label'] = 'Rezi mēnesī nosūtīt DokuWiki izstrādātājiem anonīmus lietošanas datus.'; $lang['recent_global'] = 'Tu skati izmaiņas nodaļā <b>%s</b>. Ir iespējams <a href="%s">skatīt jaunākos grozījums visā viki</a>. '; $lang['years'] = 'pirms %d gadiem'; $lang['months'] = 'pirms %d mēnešiem'; diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index f6192a99b..6c416ca74 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -296,6 +296,9 @@ $lang['i_pol1'] = 'Publieke wiki (lezen voor iedereen, schrijven $lang['i_pol2'] = 'Besloten wiki (lezen, schrijven en uploaden alleen voor geregistreerde gebruikers)'; $lang['i_retry'] = 'Opnieuw'; $lang['i_license'] = 'Kies a.u.b. een licentie die u voor uw inhoud wilt gebruiken:'; +$lang['i_license_none'] = 'Toon geen licentie informatie'; +$lang['i_pop_field'] = 'Help ons om je DokuWiki ervaring te verbeteren'; +$lang['i_pop_label'] = 'Stuur eens per maand geanonimiseerde gebruiksstatistieken naar de Dokuwiki ontwikkelaars'; $lang['recent_global'] = 'Je bekijkt momenteel de wijzigingen binnen de <b>%s</b> namespace. Je kunt ook de <a href="%s">recente wijzigingen van de hele wiki</a> bekijken.'; $lang['years'] = '%d jaar geleden'; $lang['months'] = '%d maand geleden'; diff --git a/inc/lang/nl/password.txt b/inc/lang/nl/password.txt index 294dcbd1a..5041322db 100644 --- a/inc/lang/nl/password.txt +++ b/inc/lang/nl/password.txt @@ -1,6 +1,6 @@ Beste @FULLNAME@! -Hier is je gebruikersinformatie for @TITLE@ op @DOKUWIKIURL@ +Hier is je gebruikersinformatie voor @TITLE@ op @DOKUWIKIURL@ Gebruikersnaam: @LOGIN@ Wachtwoord : @PASSWORD@ diff --git a/inc/media.php b/inc/media.php index 2268ad877..e29a47631 100644 --- a/inc/media.php +++ b/inc/media.php @@ -1795,6 +1795,9 @@ function media_resize_image($file, $ext, $w, $h=0){ // we wont scale up to infinity if($w > 2000 || $h > 2000) return $file; + // resize necessary? - (w,h) = native dimensions + if(($w == $info[0]) && ($h == $info[1])) return $file; + //cache $local = getCacheName($file,'.media.'.$w.'x'.$h.'.'.$ext); $mtime = @filemtime($local); // 0 if not exists @@ -1828,6 +1831,13 @@ function media_crop_image($file, $ext, $w, $h=0){ // calculate crop size $fr = $info[0]/$info[1]; $tr = $w/$h; + + // check if the crop can be handled completely by resize, + // i.e. the specified width & height match the aspect ratio of the source image + if ($w == round($h*$fr)) { + return media_resize_image($file, $ext, $w); + } + if($tr >= 1){ if($tr > $fr){ $cw = $info[0]; @@ -1865,6 +1875,30 @@ function media_crop_image($file, $ext, $w, $h=0){ } /** + * Calculate a token to be used to verify fetch requests for resized or + * cropped images have been internally generated - and prevent external + * DDOS attacks via fetch + * + * @param string $id id of the image + * @param int $w resize/crop width + * @param int $h resize/crop height + * + * @author Christopher Smith <chris@jalakai.co.uk> + */ +function media_get_token($id,$w,$h){ + // token is only required for modified images + if ($w || $h) { + $token = auth_cookiesalt().$id; + if ($w) $token .= '.'.$w; + if ($h) $token .= '.'.$h; + + return substr(md5($token),0,6); + } + + return ''; +} + +/** * Download a remote file and return local filename * * returns false if download fails. Uses cached file if available and |