summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/PassHash.class.php47
-rw-r--r--inc/auth.php66
-rw-r--r--inc/common.php88
-rw-r--r--inc/fetch.functions.php2
-rw-r--r--inc/infoutils.php4
-rw-r--r--inc/lang/ko/draft.txt2
-rw-r--r--inc/lang/ko/lang.php10
-rw-r--r--inc/lang/ko/login.txt2
-rw-r--r--inc/lang/ko/newpage.txt2
-rw-r--r--inc/lang/ko/norev.txt2
-rw-r--r--inc/lang/ko/read.txt2
-rw-r--r--inc/lang/ko/searchpage.txt2
-rw-r--r--inc/lang/ko/subscr_digest.txt2
-rw-r--r--inc/lang/ko/subscr_list.txt2
-rw-r--r--inc/lang/ko/subscr_single.txt2
-rw-r--r--inc/lang/sv/lang.php65
-rw-r--r--inc/lang/sv/mailwrap.html13
-rw-r--r--inc/lang/sv/resetpwd.txt3
-rw-r--r--inc/lang/sv/subscr_form.txt3
-rw-r--r--inc/lang/sv/subscr_single.txt23
-rw-r--r--inc/media.php9
21 files changed, 278 insertions, 73 deletions
diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php
index 080fb4778..61bd74939 100644
--- a/inc/PassHash.class.php
+++ b/inc/PassHash.class.php
@@ -494,4 +494,51 @@ class PassHash {
$this->init_salt($salt, 8, false);
return ':B:'.$salt.':'.md5($salt.'-'.md5($clear));
}
+
+ /**
+ * Wraps around native hash_hmac() or reimplents it
+ *
+ * This is not directly used as password hashing method, and thus isn't callable via the
+ * verify_hash() method. It should be used to create signatures and might be used in other
+ * password hashing methods.
+ *
+ * @see hash_hmac()
+ * @author KC Cloyd
+ * @link http://www.php.net/manual/en/function.hash-hmac.php#93440
+ *
+ * @param string $algo Name of selected hashing algorithm (i.e. "md5", "sha256", "haval160,4",
+ * etc..) See hash_algos() for a list of supported algorithms.
+ * @param string $data Message to be hashed.
+ * @param string $key Shared secret key used for generating the HMAC variant of the message digest.
+ * @param bool $raw_output When set to TRUE, outputs raw binary data. FALSE outputs lowercase hexits.
+ *
+ * @return string
+ */
+ public static function hmac($algo, $data, $key, $raw_output = false) {
+ // use native function if available and not in unit test
+ if(function_exists('hash_hmac') && !defined('SIMPLE_TEST')){
+ return hash_hmac($algo, $data, $key, $raw_output);
+ }
+
+ $algo = strtolower($algo);
+ $pack = 'H' . strlen($algo('test'));
+ $size = 64;
+ $opad = str_repeat(chr(0x5C), $size);
+ $ipad = str_repeat(chr(0x36), $size);
+
+ if(strlen($key) > $size) {
+ $key = str_pad(pack($pack, $algo($key)), $size, chr(0x00));
+ } else {
+ $key = str_pad($key, $size, chr(0x00));
+ }
+
+ for($i = 0; $i < strlen($key) - 1; $i++) {
+ $opad[$i] = $opad[$i] ^ $key[$i];
+ $ipad[$i] = $ipad[$i] ^ $key[$i];
+ }
+
+ $output = $algo($opad . pack($pack, $algo($ipad . $data)));
+
+ return ($raw_output) ? pack($pack, $output) : $output;
+ }
}
diff --git a/inc/auth.php b/inc/auth.php
index 3f1f7925b..47b29eff7 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -54,23 +54,23 @@ function auth_setup() {
} 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[\'authtype\'] = ' . "auth" . $conf['authtype']
+ msg('Your authtype setting is deprecated. You must set $conf[\'authtype\'] = "auth' . $conf['authtype'] . '"'
. ' in your configuration (see <a href="https://www.dokuwiki.org/auth">Authentication Backends</a>)',-1,'','',MSG_ADMINS_ONLY);
}
}
- if(!isset($auth) || !$auth){
+ if(!isset($auth) || !$auth){
msg($lang['authtempfail'], -1);
return false;
}
if ($auth->success == false) {
- // degrade to unauthenticated user
- unset($auth);
- auth_logoff();
- msg($lang['authtempfail'], -1);
+ // degrade to unauthenticated user
+ unset($auth);
+ auth_logoff();
+ msg($lang['authtempfail'], -1);
return false;
- }
+ }
// do the login either by cookie or provided credentials XXX
$INPUT->set('http_credentials', false);
@@ -678,27 +678,41 @@ function auth_nameencode($name, $skip_group = false) {
/**
* Create a pronouncable password
*
- * @author Andreas Gohr <andi@splitbrain.org>
- * @link http://www.phpbuilder.com/annotate/message.php3?id=1014451
+ * The $foruser variable might be used by plugins to run additional password
+ * policy checks, but is not used by the default implementation
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @link http://www.phpbuilder.com/annotate/message.php3?id=1014451
+ * @triggers AUTH_PASSWORD_GENERATE
*
+ * @param string $foruser username for which the password is generated
* @return string pronouncable password
*/
-function auth_pwgen() {
- $pw = '';
- $c = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones
- $v = 'aeiou'; //vowels
- $a = $c.$v; //both
-
- //use two syllables...
- for($i = 0; $i < 2; $i++) {
- $pw .= $c[rand(0, strlen($c) - 1)];
- $pw .= $v[rand(0, strlen($v) - 1)];
- $pw .= $a[rand(0, strlen($a) - 1)];
+function auth_pwgen($foruser = '') {
+ $data = array(
+ 'password' => '',
+ 'foruser' => $foruser
+ );
+
+ $evt = new Doku_Event('AUTH_PASSWORD_GENERATE', $data);
+ if($evt->advise_before(true)) {
+ $c = 'bcdfghjklmnprstvwz'; //consonants except hard to speak ones
+ $v = 'aeiou'; //vowels
+ $a = $c.$v; //both
+ $s = '!$%&?+*~#-_:.;,'; // specials
+
+ //use thre syllables...
+ for($i = 0; $i < 3; $i++) {
+ $data['password'] .= $c[mt_rand(0, strlen($c) - 1)];
+ $data['password'] .= $v[mt_rand(0, strlen($v) - 1)];
+ $data['password'] .= $a[mt_rand(0, strlen($a) - 1)];
+ }
+ //... and add a nice number and special
+ $data['password'] .= mt_rand(10, 99).$s[mt_rand(0, strlen($s) - 1)];
}
- //... and add a nice number
- $pw .= rand(10, 99);
+ $evt->advise_after();
- return $pw;
+ return $data['password'];
}
/**
@@ -765,7 +779,7 @@ function register() {
}
if($conf['autopasswd']) {
- $pass = auth_pwgen(); // automatically generate password
+ $pass = auth_pwgen($login); // automatically generate password
} elseif(empty($pass) || empty($passchk)) {
msg($lang['regmissing'], -1); // complain about missing passwords
return false;
@@ -958,7 +972,7 @@ function act_resendpwd() {
} else { // autogenerate the password and send by mail
- $pass = auth_pwgen();
+ $pass = auth_pwgen($user);
if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) {
msg('error modifying user data', -1);
return false;
@@ -993,7 +1007,7 @@ function act_resendpwd() {
}
// generate auth token
- $token = md5(auth_cookiesalt().$user); //secret but user based
+ $token = md5(uniqid(mt_rand(), true)); // random secret
$tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth';
$url = wl('', array('do'=> 'resendpwd', 'pwauth'=> $token), true, '&');
diff --git a/inc/common.php b/inc/common.php
index 4d939ac77..b292fb75e 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -56,7 +56,7 @@ function stripctl($string) {
* @return string
*/
function getSecurityToken() {
- return md5(auth_cookiesalt().session_id().$_SERVER['REMOTE_USER']);
+ return PassHash::hmac('md5', session_id().$_SERVER['REMOTE_USER'], auth_cookiesalt());
}
/**
@@ -86,32 +86,20 @@ function formSecurityToken($print = true) {
}
/**
- * Return info about the current document as associative
- * array.
+ * Determine basic information for a request of $id
*
* @author Andreas Gohr <andi@splitbrain.org>
+ * @author Chris Smith <chris@jalakai.co.uk>
*/
-function pageinfo() {
- global $ID;
- global $REV;
- global $RANGE;
+function basicinfo($id, $htmlClient=true){
global $USERINFO;
- global $lang;
-
- // include ID & REV not redundant, as some parts of DokuWiki may temporarily change $ID, e.g. p_wiki_xhtml
- // FIXME ... perhaps it would be better to ensure the temporary changes weren't necessary
- $info['id'] = $ID;
- $info['rev'] = $REV;
// set info about manager/admin status.
$info['isadmin'] = false;
$info['ismanager'] = false;
if(isset($_SERVER['REMOTE_USER'])) {
- $sub = new Subscription();
-
$info['userinfo'] = $USERINFO;
- $info['perm'] = auth_quickaclcheck($ID);
- $info['subscribed'] = $sub->user_subscription();
+ $info['perm'] = auth_quickaclcheck($id);
$info['client'] = $_SERVER['REMOTE_USER'];
if($info['perm'] == AUTH_ADMIN) {
@@ -127,12 +115,46 @@ function pageinfo() {
}
} else {
- $info['perm'] = auth_aclcheck($ID, '', null);
- $info['subscribed'] = false;
+ $info['perm'] = auth_aclcheck($id, '', null);
$info['client'] = clientIP(true);
}
- $info['namespace'] = getNS($ID);
+ $info['namespace'] = getNS($id);
+
+ // mobile detection
+ if ($htmlClient) {
+ $info['ismobile'] = clientismobile();
+ }
+
+ return $info;
+ }
+
+/**
+ * Return info about the current document as associative
+ * array.
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function pageinfo() {
+ global $ID;
+ global $REV;
+ global $RANGE;
+ global $lang;
+
+ $info = basicinfo($ID);
+
+ // include ID & REV not redundant, as some parts of DokuWiki may temporarily change $ID, e.g. p_wiki_xhtml
+ // FIXME ... perhaps it would be better to ensure the temporary changes weren't necessary
+ $info['id'] = $ID;
+ $info['rev'] = $REV;
+
+ if(isset($_SERVER['REMOTE_USER'])) {
+ $sub = new Subscription();
+ $info['subscribed'] = $sub->user_subscription();
+ } else {
+ $info['subscribed'] = false;
+ }
+
$info['locked'] = checklock($ID);
$info['filepath'] = fullpath(wikiFN($ID));
$info['exists'] = @file_exists($info['filepath']);
@@ -210,8 +232,18 @@ function pageinfo() {
}
}
- // mobile detection
- $info['ismobile'] = clientismobile();
+ return $info;
+}
+
+/**
+ * Return information about the current media item as an associative array.
+ */
+function mediainfo(){
+ global $NS;
+ global $IMG;
+
+ $info = basicinfo("$NS:*");
+ $info['image'] = $IMG;
return $info;
}
@@ -435,6 +467,11 @@ function exportlink($id = '', $format = 'raw', $more = '', $abs = false, $sep =
*/
function ml($id = '', $more = '', $direct = true, $sep = '&amp;', $abs = false) {
global $conf;
+ $isexternalimage = preg_match('#^(https?|ftp)://#i', $id);
+ if(!$isexternalimage) {
+ $id = cleanID($id);
+ }
+
if(is_array($more)) {
// add token for resized images
if($more['w'] || $more['h']){
@@ -467,10 +504,10 @@ function ml($id = '', $more = '', $direct = true, $sep = '&amp;', $abs = false)
}
// external URLs are always direct without rewriting
- if(preg_match('#^(https?|ftp)://#i', $id)) {
+ if($isexternalimage) {
$xlink .= 'lib/exe/fetch.php';
// add hash:
- $xlink .= '?hash='.substr(md5(auth_cookiesalt().$id), 0, 6);
+ $xlink .= '?hash='.substr(PassHash::hmac('md5', $id, auth_cookiesalt()), 0, 6);
if($more) {
$xlink .= $sep.$more;
$xlink .= $sep.'media='.rawurlencode($id);
@@ -552,12 +589,13 @@ function checkwordblock($text = '') {
global $TEXT;
global $PRE;
global $SUF;
+ global $SUM;
global $conf;
global $INFO;
if(!$conf['usewordblock']) return false;
- if(!$text) $text = "$PRE $TEXT $SUF";
+ if(!$text) $text = "$PRE $TEXT $SUF $SUM";
// we prepare the text a tiny bit to prevent spammers circumventing URL checks
$text = preg_replace('!(\b)(www\.[\w.:?\-;,]+?\.[\w.:?\-;,]+?[\w/\#~:.?+=&%@\!\-.:?\-;,]+?)([.:?\-;,]*[^\w/\#~:.?+=&%@\!\-.:?\-;,])!i', '\1http://\2 \2\3', $text);
diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php
index 5801e96fa..ea524a37a 100644
--- a/inc/fetch.functions.php
+++ b/inc/fetch.functions.php
@@ -99,7 +99,7 @@ function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) {
//media to local file
if(preg_match('#^(https?)://#i', $media)) {
//check hash
- if(substr(md5(auth_cookiesalt().$media), 0, 6) !== $INPUT->str('hash')) {
+ if(substr(PassHash::hmac('md5', $media, auth_cookiesalt()), 0, 6) !== $INPUT->str('hash')) {
return array(412, 'Precondition Failed');
}
//handle external images
diff --git a/inc/infoutils.php b/inc/infoutils.php
index 9fe5ee689..71e642995 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -107,8 +107,8 @@ function check(){
msg('DokuWiki version: '.getVersion(),1);
}
- if(version_compare(phpversion(),'5.1.2','<')){
- msg('Your PHP version is too old ('.phpversion().' vs. 5.1.2+ needed)',-1);
+ if(version_compare(phpversion(),'5.2.0','<')){
+ msg('Your PHP version is too old ('.phpversion().' vs. 5.2.0+ needed)',-1);
}else{
msg('PHP version '.phpversion(),1);
}
diff --git a/inc/lang/ko/draft.txt b/inc/lang/ko/draft.txt
index f7787f981..b655d7c92 100644
--- a/inc/lang/ko/draft.txt
+++ b/inc/lang/ko/draft.txt
@@ -1,5 +1,5 @@
====== 문서 초안 있음 ======
-이 문서의 마지막 편집 세션은 정상적으로 끝나지 않았습니다. DokuWiki는 작업 도중 자동으로 저장된 문서 초안을 사용하여 편집을 계속 할 수 있습니다. 마지막 세션 동안 저장된 문서 초안을 아래에서 볼 수 있습니다.
+이 문서의 마지막 편집 세션은 정상적으로 끝나지 않았습니다. DokuWiki는 작업 도중 자동으로 저장된 문서 초안을 사용해 편집을 계속 할 수 있습니다. 마지막 세션 동안 저장된 문서 초안을 아래에서 볼 수 있습니다.
비정상적으로 끝난 편집 세션을 **되돌릴**지 여부를 결정하고, 자동으로 저장되었던 초안을 **삭제**하거나 편집 과정을 **취소**하세요. \ No newline at end of file
diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php
index 76d6a535d..76684659c 100644
--- a/inc/lang/ko/lang.php
+++ b/inc/lang/ko/lang.php
@@ -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'] = '다음 문서에서 아직 사용 중이므로 파일을 삭제할 수 없습니다:';
@@ -218,7 +218,7 @@ $lang['qb_hs'] = '문단 제목 선택';
$lang['qb_hplus'] = '상위 문단 제목';
$lang['qb_hminus'] = '하위 문단 제목';
$lang['qb_hequal'] = '동급 문단 제목';
-$lang['qb_link'] = '내부 링크';
+$lang['qb_link'] = '안쪽 링크';
$lang['qb_extlink'] = '바깥 링크';
$lang['qb_hr'] = '가로줄';
$lang['qb_ol'] = '순서 있는 목록';
@@ -231,7 +231,7 @@ $lang['upperns'] = '상위 이름공간으로 이동';
$lang['admin_register'] = '새 사용자 추가';
$lang['metaedit'] = '메타 데이터 편집';
$lang['metasaveerr'] = '메타 데이터 쓰기 실패';
-$lang['metasaveok'] = '메타 데이타 저장됨';
+$lang['metasaveok'] = '메타 데이터 저장됨';
$lang['img_backto'] = '뒤로';
$lang['img_title'] = '이름';
$lang['img_caption'] = '설명';
@@ -304,7 +304,7 @@ $lang['media_uploadtab'] = '올리기';
$lang['media_searchtab'] = '찾기';
$lang['media_file'] = '파일';
$lang['media_viewtab'] = '보기';
-$lang['media_edittab'] = '수정';
+$lang['media_edittab'] = '편집';
$lang['media_historytab'] = '역사';
$lang['media_list_thumbs'] = '섬네일';
$lang['media_list_rows'] = '목록';
@@ -318,7 +318,7 @@ $lang['media_view'] = '%s';
$lang['media_viewold'] = '%s (%s에 있음)';
$lang['media_edit'] = '%s 편집';
$lang['media_history'] = '%s 바뀜 내역';
-$lang['media_meta_edited'] = '메타데이터가 수정됨';
+$lang['media_meta_edited'] = '메타 데이터 편집됨';
$lang['media_perm_read'] = '이 파일을 읽을 권한이 없습니다.';
$lang['media_perm_upload'] = '파일을 올릴 권한이 없습니다.';
$lang['media_update'] = '새 판 올리기';
diff --git a/inc/lang/ko/login.txt b/inc/lang/ko/login.txt
index 160b899d3..f8af4100f 100644
--- a/inc/lang/ko/login.txt
+++ b/inc/lang/ko/login.txt
@@ -1,3 +1,3 @@
====== 로그인 ======
-로그인하지 않았습니다! 아래에서 로그인하세요. 로그인하려면 쿠키를 받도록 설정하여야 합니다. \ No newline at end of file
+로그인하지 않았습니다! 아래에서 로그인하세요. 로그인하려면 쿠키를 활성화해야 합니다. \ No newline at end of file
diff --git a/inc/lang/ko/newpage.txt b/inc/lang/ko/newpage.txt
index 8db34f9cf..fa7864610 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/norev.txt b/inc/lang/ko/norev.txt
index 3e203b235..246f3e4f6 100644
--- a/inc/lang/ko/norev.txt
+++ b/inc/lang/ko/norev.txt
@@ -1,3 +1,3 @@
====== 지정한 판 없음 ======
-지정한 판이 존재하지 않습니다. **이전 판** 버튼을 사용하여 이 문서의 이전 판 목록을 보세요. \ No newline at end of file
+지정한 판이 존재하지 않습니다. **이전 판** 버튼을 사용해 이 문서의 이전 판 목록을 보세요. \ No newline at end of file
diff --git a/inc/lang/ko/read.txt b/inc/lang/ko/read.txt
index c510b598e..8f080fcb1 100644
--- a/inc/lang/ko/read.txt
+++ b/inc/lang/ko/read.txt
@@ -1 +1 @@
-이 문서는 읽기 전용입니다. 내용을 볼 수는 있지만 수정할 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. \ No newline at end of file
+이 문서는 읽기 전용입니다. 내용을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. \ No newline at end of file
diff --git a/inc/lang/ko/searchpage.txt b/inc/lang/ko/searchpage.txt
index 8cc003950..d3b37ec7c 100644
--- a/inc/lang/ko/searchpage.txt
+++ b/inc/lang/ko/searchpage.txt
@@ -1,5 +1,5 @@
====== 찾기 ======
-아래에서 찾기 결과를 볼 수 있습니다. 만일 원하는 문서를 찾지 못하였다면, **문서 만들기**나 **문서 편집** 버튼을 사용하여 쿼리 내용과 같은 이름의 문서를 만들거나 편집할 수 있습니다.
+아래에서 찾기 결과를 볼 수 있습니다. 만일 원하는 문서를 찾지 못하였다면, **문서 만들기**나 **문서 편집** 버튼을 사용해 쿼리 내용과 같은 이름의 문서를 만들거나 편집할 수 있습니다.
===== 결과 ===== \ No newline at end of file
diff --git a/inc/lang/ko/subscr_digest.txt b/inc/lang/ko/subscr_digest.txt
index b67cc9bbc..6db7b963c 100644
--- a/inc/lang/ko/subscr_digest.txt
+++ b/inc/lang/ko/subscr_digest.txt
@@ -12,7 +12,7 @@
이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
-@SUBSCRIBE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요.
+@SUBSCRIBE@ 문서를 방문해 문서나 이름공간의 구독을 취소하세요.
--
@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file
diff --git a/inc/lang/ko/subscr_list.txt b/inc/lang/ko/subscr_list.txt
index 03ca86d2a..c13e0097a 100644
--- a/inc/lang/ko/subscr_list.txt
+++ b/inc/lang/ko/subscr_list.txt
@@ -8,7 +8,7 @@
--------------------------------------------------------
이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
-@SUBSCRIBE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요.
+@SUBSCRIBE@ 문서를 방문해 문서나 이름공간의 구독을 취소하세요.
--
@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file
diff --git a/inc/lang/ko/subscr_single.txt b/inc/lang/ko/subscr_single.txt
index 5f8b43b98..d4e38e044 100644
--- a/inc/lang/ko/subscr_single.txt
+++ b/inc/lang/ko/subscr_single.txt
@@ -14,7 +14,7 @@
새 판 : @NEWPAGE@
이 문서의 알림을 취소하려면, @DOKUWIKIURL@에 로그인한 뒤
-@SUBSCRIBE@ 문서를 방문하여 문서나 이름공간의 구독을 취소하세요.
+@SUBSCRIBE@ 문서를 방문해 문서나 이름공간의 구독을 취소하세요.
--
@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다. \ No newline at end of file
diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php
index 4c4e060b4..9608784c6 100644
--- a/inc/lang/sv/lang.php
+++ b/inc/lang/sv/lang.php
@@ -17,6 +17,7 @@
* @author Bogge Bogge <bogge@bogge.com>
* @author Peter Åström <eaustreum@gmail.com>
* @author mikael@mallander.net
+ * @author Smorkster Andersson smorkster@gmail.com
*/
$lang['encoding'] = 'utf-8';
$lang['direction'] = 'ltr';
@@ -52,11 +53,14 @@ $lang['btn_backtomedia'] = 'Tillbaka till val av Mediafil';
$lang['btn_subscribe'] = 'Prenumerera på ändringar';
$lang['btn_profile'] = 'Uppdatera profil';
$lang['btn_reset'] = 'Återställ';
+$lang['btn_resendpwd'] = 'Skapa nytt lösenord';
$lang['btn_draft'] = 'Redigera utkast';
$lang['btn_recover'] = 'Återskapa utkast';
$lang['btn_draftdel'] = 'Radera utkast';
$lang['btn_revert'] = 'Återställ';
$lang['btn_register'] = 'Registrera';
+$lang['btn_apply'] = 'Verkställ';
+$lang['btn_media'] = 'Media Hanteraren';
$lang['loggedinas'] = 'Inloggad som';
$lang['user'] = 'Användarnamn';
$lang['pass'] = 'Lösenord';
@@ -86,6 +90,7 @@ $lang['profnoempty'] = 'Namn och e-postadress måste fyllas i.';
$lang['profchanged'] = 'Användarprofilen uppdaterad.';
$lang['pwdforget'] = 'Glömt ditt lösenord? Ordna ett nytt';
$lang['resendna'] = 'Den här wikin stödjer inte utskick av lösenord.';
+$lang['resendpwd'] = 'Sätt lösenord för';
$lang['resendpwdmissing'] = 'Du måste fylla i alla fält.';
$lang['resendpwdnouser'] = 'Den här användaren hittas inte i databasen.';
$lang['resendpwdbadauth'] = 'Den här verifieringskoden är inte giltig. Kontrollera att du använde hela verifieringslänken.';
@@ -98,9 +103,10 @@ $lang['searchmedia_in'] = 'Sök i %s';
$lang['txt_upload'] = 'Välj fil att ladda upp';
$lang['txt_filename'] = 'Ladda upp som (ej obligatoriskt)';
$lang['txt_overwrt'] = 'Skriv över befintlig fil';
+$lang['maxuploadsize'] = 'Max %s per uppladdad fil.';
$lang['lockedby'] = 'Låst av';
$lang['lockexpire'] = 'Lås upphör att gälla';
-$lang['js']['willexpire'] = 'Ditt redigeringslås för detta dokument kommer snart att upphöra.\nFör att undvika versionskonflikter bör du förhandsgranska ditt dokument för att förlänga redigeringslåset.';
+$lang['js']['willexpire'] = 'Ditt redigeringslås för detta dokument kommer snart att upphöra.\nFör att undvika versionskonflikter bör du förhandsgranska ditt dokument för att förlänga redigeringslåset.';
$lang['js']['notsavedyet'] = 'Det finns ändringar som inte är sparade.
Är du säker på att du vill fortsätta?';
$lang['js']['searchmedia'] = 'Sök efter filer';
@@ -112,12 +118,14 @@ $lang['js']['mediaalign'] = 'Justering';
$lang['js']['mediasize'] = 'Bildstorlek';
$lang['js']['mediatarget'] = 'Länköppning';
$lang['js']['mediaclose'] = 'Stäng';
+$lang['js']['mediainsert'] = 'Infoga';
$lang['js']['mediadisplayimg'] = 'Visa bilden.';
$lang['js']['mediadisplaylnk'] = 'Visa endast länken.';
$lang['js']['mediasmall'] = 'Liten storlek';
$lang['js']['mediamedium'] = 'Mellanstor storlek';
$lang['js']['medialarge'] = 'Stor storlek';
$lang['js']['mediaoriginal'] = 'Originalstorlek';
+$lang['js']['medialnk'] = 'Länk till detalj sida';
$lang['js']['mediadirect'] = 'Direktlänk till originalet';
$lang['js']['medianolnk'] = 'Ingen länk';
$lang['js']['medianolink'] = 'Länka inte bilden';
@@ -129,6 +137,15 @@ Du kan fortfarande klippa och klistra in länken om du använder en annan webbl
$lang['js']['linkwiz'] = 'Snabbguide Länkar';
$lang['js']['linkto'] = 'Länk till:';
$lang['js']['del_confirm'] = 'Vill du verkligen radera?';
+$lang['js']['restore_confirm'] = 'Återställa denna version?';
+$lang['js']['media_diff'] = 'Se skillnader:';
+$lang['js']['media_diff_both'] = 'Sida vid sida';
+$lang['js']['media_select'] = 'Välj filer...';
+$lang['js']['media_upload_btn'] = 'Ladda upp';
+$lang['js']['media_done_btn'] = 'Färdig';
+$lang['js']['media_drop'] = 'Släpp filer här för att ladda upp';
+$lang['js']['media_cancel'] = 'ta bort';
+$lang['js']['media_overwrt'] = 'Skriv över existerande filer';
$lang['rssfailed'] = 'Ett fel uppstod när detta RSS-flöde skulle hämtas: ';
$lang['nothingfound'] = 'Inga filer hittades.';
$lang['mediaselect'] = 'Mediafiler';
@@ -177,10 +194,19 @@ $lang['external_edit'] = 'extern redigering';
$lang['summary'] = 'Redigeringskommentar';
$lang['noflash'] = '<a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> behövs för att visa detta innehåll.';
$lang['download'] = 'Ladda ner kodfragmentet';
+$lang['tools'] = 'Verktyg';
+$lang['user_tools'] = 'Användarverktyg';
+$lang['page_tools'] = 'Sidverktyg';
+$lang['skip_to_content'] = 'hoppa till innehåll';
$lang['mail_newpage'] = 'sida tillagd:';
$lang['mail_changed'] = 'sida ändrad:';
+$lang['mail_subscribe_list'] = 'sidor ändrade i namnrymd:';
$lang['mail_new_user'] = 'Ny användare:';
$lang['mail_upload'] = 'fil uppladdad:';
+$lang['changes_type'] = 'Se ändringar av';
+$lang['pages_changes'] = 'Sidor';
+$lang['media_changes'] = 'Mediafiler';
+$lang['both_changes'] = 'Både sidor och mediafiler';
$lang['qb_bold'] = 'Fet text';
$lang['qb_italic'] = 'Kursiv text';
$lang['qb_underl'] = 'Understruken text';
@@ -221,14 +247,26 @@ $lang['img_copyr'] = 'Copyright';
$lang['img_format'] = 'Format';
$lang['img_camera'] = 'Kamera';
$lang['img_keywords'] = 'Nyckelord';
+$lang['img_width'] = 'Bredd';
+$lang['img_height'] = 'Höjd';
+$lang['img_manager'] = 'Se mediahanteraren';
+$lang['subscr_subscribe_success'] = 'La till %s till prenumerationslista %s';
+$lang['subscr_subscribe_noaddress'] = 'Det finns ingen adress associerad med din inloggning, du kan inte bli tillagd i prenumerationslistan';
+$lang['subscr_unsubscribe_success'] = '% borttagen från prenumerationslistan för %';
+$lang['subscr_unsubscribe_error'] = 'Fel vid borttagning av %s från prenumerationslista %s';
+$lang['subscr_already_subscribed'] = '%s prenumererar redan på %s';
+$lang['subscr_not_subscribed'] = '%s prenumererar inte på %s';
+$lang['subscr_m_not_subscribed'] = 'Du prenumererar inte på denna sida eller namnrymd.';
$lang['subscr_m_new_header'] = 'Lägg till prenumeration';
$lang['subscr_m_current_header'] = 'Nuvarande prenumerationer';
$lang['subscr_m_unsubscribe'] = 'Avsluta prenumeration';
$lang['subscr_m_subscribe'] = 'Prenumerera';
$lang['subscr_m_receive'] = 'Ta emot';
$lang['subscr_style_every'] = 'skicka epost vid varje ändring';
+$lang['subscr_style_list'] = 'lista över ändrade sidor sedan senaste e-post (varje %.2f dag)';
$lang['authmodfailed'] = 'Felaktiga inställningar för användarautentisering. Var vänlig meddela wikiadministratören.';
$lang['authtempfail'] = 'Tillfälligt fel på användarautentisering. Om felet kvarstår, var vänlig meddela wikiadministratören.';
+$lang['authpwdexpire'] = 'Ditt lösenord kommer att bli ogiltigt om %d dagar, du bör ändra det snart.';
$lang['i_chooselang'] = 'Välj språk';
$lang['i_installer'] = 'Installation av DokuWiki';
$lang['i_wikiname'] = 'Wikins namn';
@@ -254,6 +292,10 @@ $lang['i_pol0'] = 'Öppen wiki (alla får läsa, skriva och ladda
$lang['i_pol1'] = 'Publik wiki (alla får läsa, registrerade användare för skriva och ladda upp filer)';
$lang['i_pol2'] = 'Sluten wiki (endast registrerade användare får läsa, skriva och ladda upp filer)';
$lang['i_retry'] = 'Försök igen';
+$lang['i_license'] = 'Vänligen välj licens du vill använda för ditt innehåll:';
+$lang['i_license_none'] = 'Visa ingen licensinformation';
+$lang['i_pop_field'] = 'Hjälp oss förbättra DokuWiki upplevelsen:';
+$lang['i_pop_label'] = 'Sänd anonym användarinformation en gång i månaden till DokuWikis utvecklare';
$lang['recent_global'] = 'Du bevakar ändringar i namnrymden <b>%s</b>. Du kan också titta på <a href="%s">senaste ändringar för hela wikin</a>.';
$lang['years'] = '%d år sedan';
$lang['months'] = '%d månader sedan';
@@ -263,3 +305,24 @@ $lang['hours'] = '%d timmar sedan';
$lang['minutes'] = '%d minuter sedan';
$lang['seconds'] = '%d sekunder sedan';
$lang['wordblock'] = 'Din ändring sparades inte för att den innehåller otillåten text (spam).';
+$lang['media_uploadtab'] = 'Ladda upp';
+$lang['media_searchtab'] = 'Sök';
+$lang['media_file'] = 'Fil';
+$lang['media_viewtab'] = 'Visa';
+$lang['media_edittab'] = 'Redigera';
+$lang['media_list_thumbs'] = 'Miniatyrbild';
+$lang['media_list_rows'] = 'Rader';
+$lang['media_sort_name'] = 'Namn';
+$lang['media_sort_date'] = 'Datum';
+$lang['media_namespaces'] = 'Visa namnrymd';
+$lang['media_files'] = 'Filer i %s';
+$lang['media_upload'] = 'Ladda upp till %s';
+$lang['media_search'] = 'Sök i %s';
+$lang['media_view'] = '%s';
+$lang['media_viewold'] = '%s vid %s';
+$lang['media_edit'] = 'Redigera %s';
+$lang['media_meta_edited'] = 'metadata redigerat';
+$lang['media_perm_read'] = 'Du har tyvärr inte tillräckliga behörigheter för att läsa filer.';
+$lang['media_perm_upload'] = 'Du har tyvärr inte tillräckliga behörigheter för att ladda upp filer.';
+$lang['media_update'] = 'Ladda upp ny version';
+$lang['media_restore'] = 'Återställ denna version';
diff --git a/inc/lang/sv/mailwrap.html b/inc/lang/sv/mailwrap.html
new file mode 100644
index 000000000..d8ab9ba5b
--- /dev/null
+++ b/inc/lang/sv/mailwrap.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<title>@TITLE@</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<body>
+
+@HTMLBODY@
+
+<br /><hr />
+<small>Denna e-post har genererats av DokuWiki vid @DOKUWIKIURL@.</small>
+</body>
+</html> \ No newline at end of file
diff --git a/inc/lang/sv/resetpwd.txt b/inc/lang/sv/resetpwd.txt
new file mode 100644
index 000000000..a329ce571
--- /dev/null
+++ b/inc/lang/sv/resetpwd.txt
@@ -0,0 +1,3 @@
+====== Sätt nytt lösenord ======
+
+Vänligen skriv ett nytt lösenord för ditt konto på denna wiki. \ No newline at end of file
diff --git a/inc/lang/sv/subscr_form.txt b/inc/lang/sv/subscr_form.txt
new file mode 100644
index 000000000..bfb8fa3cd
--- /dev/null
+++ b/inc/lang/sv/subscr_form.txt
@@ -0,0 +1,3 @@
+====== Prenumerations hantering ======
+
+Denna sida låter dig hantera dina prenumerationer för nuvarande sida och namnrymd. \ No newline at end of file
diff --git a/inc/lang/sv/subscr_single.txt b/inc/lang/sv/subscr_single.txt
new file mode 100644
index 000000000..dff88343e
--- /dev/null
+++ b/inc/lang/sv/subscr_single.txt
@@ -0,0 +1,23 @@
+Hej!
+
+Sidan @PAGE@ i wikin @TITLE@ har ändrats.
+Detta är ändringarna:
+
+--------------------------------------------------------
+@DIFF@
+--------------------------------------------------------
+
+Datum: @DATE@
+Användare: @USER@
+Ändrings sammanfattning: @SUMMARY@
+Gammal version: @OLDPAGE@
+Ny version: @NEWPAGE@
+
+För att avsluta noteringar om sidor, logga in på wikin vid
+@DOKUWIKIURL@ gå sedan till
+@SUBSCRIBE@
+och avsluta prenumerationen av sida och/eller namnrymd ändringar.
+
+--
+Denna e-post har genererats av DokuWiki vid
+@DOKUWIKIURL@ \ No newline at end of file
diff --git a/inc/media.php b/inc/media.php
index e29a47631..18148a446 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -1879,20 +1879,21 @@ function media_crop_image($file, $ext, $w, $h=0){
* cropped images have been internally generated - and prevent external
* DDOS attacks via fetch
*
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ *
* @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>
+ * @return string
*/
function media_get_token($id,$w,$h){
// token is only required for modified images
if ($w || $h) {
- $token = auth_cookiesalt().$id;
+ $token = $id;
if ($w) $token .= '.'.$w;
if ($h) $token .= '.'.$h;
- return substr(md5($token),0,6);
+ return substr(PassHash::hmac('md5', $token, auth_cookiesalt()),0,6);
}
return '';