diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/DifferenceEngine.php | 11 | ||||
-rw-r--r-- | inc/Mailer.class.php | 2 | ||||
-rw-r--r-- | inc/auth.php | 62 | ||||
-rw-r--r-- | inc/common.php | 84 | ||||
-rw-r--r-- | inc/feedcreator.class.php | 2 | ||||
-rw-r--r-- | inc/fetch.functions.php | 11 | ||||
-rw-r--r-- | inc/fulltext.php | 2 | ||||
-rw-r--r-- | inc/lang/de-informal/lang.php | 1 | ||||
-rw-r--r-- | inc/lang/ko/draft.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/lang.php | 10 | ||||
-rw-r--r-- | inc/lang/ko/login.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/newpage.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/norev.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/read.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/searchpage.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/subscr_digest.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/subscr_list.txt | 2 | ||||
-rw-r--r-- | inc/lang/ko/subscr_single.txt | 2 | ||||
-rw-r--r-- | inc/lang/sv/lang.php | 65 | ||||
-rw-r--r-- | inc/lang/sv/mailwrap.html | 13 | ||||
-rw-r--r-- | inc/lang/sv/resetpwd.txt | 3 | ||||
-rw-r--r-- | inc/lang/sv/subscr_form.txt | 3 | ||||
-rw-r--r-- | inc/lang/sv/subscr_single.txt | 23 | ||||
-rw-r--r-- | inc/media.php | 14 | ||||
-rw-r--r-- | inc/parser/handler.php | 2 | ||||
-rw-r--r-- | inc/parser/metadata.php | 2 |
26 files changed, 255 insertions, 73 deletions
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 783d6bea5..07df7a4be 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -817,7 +817,16 @@ class DiffFormatter { $this->_added($closing); } - function _escape($str){ + /** + * Escape string + * + * Override this method within other formatters if escaping required. + * Base class requires $str to be returned WITHOUT escaping. + * + * @param $str string Text string to escape + * @return string The escaped string. + */ + function _escape($str){ return $str; } } diff --git a/inc/Mailer.class.php b/inc/Mailer.class.php index f87d7dd84..cb5f22f54 100644 --- a/inc/Mailer.class.php +++ b/inc/Mailer.class.php @@ -192,7 +192,7 @@ class Mailer { // copy over all replacements missing for HTML (autolink URLs) foreach($textrep as $key => $value) { if(isset($htmlrep[$key])) continue; - if(preg_match('/^https?:\/\//i', $value)) { + if(media_isexternal($value)) { $htmlrep[$key] = '<a href="'.hsc($value).'">'.hsc($value).'</a>'; } else { $htmlrep[$key] = hsc($value); diff --git a/inc/auth.php b/inc/auth.php index 1f8489f03..47b29eff7 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -59,18 +59,18 @@ function auth_setup() { } } - 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; diff --git a/inc/common.php b/inc/common.php index 55c5b5ac4..1b4d9e8e4 100644 --- a/inc/common.php +++ b/inc/common.php @@ -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 = '&', $abs = false) { global $conf; + $isexternalimage = media_isexternal($id); + if(!$isexternalimage) { + $id = cleanID($id); + } + if(is_array($more)) { // add token for resized images if($more['w'] || $more['h']){ @@ -467,7 +504,7 @@ function ml($id = '', $more = '', $direct = true, $sep = '&', $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(PassHash::hmac('md5', $id, auth_cookiesalt()), 0, 6); @@ -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/feedcreator.class.php b/inc/feedcreator.class.php index ea8cc7b15..670a1bc29 100644 --- a/inc/feedcreator.class.php +++ b/inc/feedcreator.class.php @@ -599,7 +599,7 @@ class FeedCreator extends HtmlDescribable { header("Content-Type: ".$this->contentType."; charset=".$this->encoding."; filename=".utf8_basename($filename)); header("Content-Disposition: inline; filename=".utf8_basename($filename)); - readfile($filename, "r"); + readfile($filename); die(); } diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php index ea524a37a..53ade3555 100644 --- a/inc/fetch.functions.php +++ b/inc/fetch.functions.php @@ -89,15 +89,18 @@ function sendFile($file, $mime, $dl, $cache, $public = false) { * 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) + * @param string $media reference to the media id + * @param string $file reference to the file variable + * @param string $rev + * @param int $width + * @param int $height + * @return 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)) { + if(media_isexternal($media)) { //check hash if(substr(PassHash::hmac('md5', $media, auth_cookiesalt()), 0, 6) !== $INPUT->str('hash')) { return array(412, 'Precondition Failed'); diff --git a/inc/fulltext.php b/inc/fulltext.php index 7ee386063..2f073acea 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -172,7 +172,7 @@ function ft_mediause($id,$max){ preg_match_all('/\{\{([^|}]*'.$pcre.'[^|}]*)(|[^}]+)?\}\}/i',rawWiki($doc),$matches); foreach($matches[1] as $img){ $img = trim($img); - if(preg_match('/^https?:\/\//i',$img)) continue; // skip external images + if(media_isexternal($img)) continue; // skip external images list($img) = explode('?',$img); // remove any parameters resolve_mediaid($ns,$img,$exists); // resolve the possibly relative img diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index 8a954c0e8..9a6e6f72c 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -20,6 +20,7 @@ * @author Christian Wichmann <nospam@zone0.de> * @author Pierre Corell <info@joomla-praxis.de> * @author Frank Loizzi <contact@software.bacal.de> + * @author Volker Bödker <volker@boedker.de> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; 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 18148a446..fbe1363ec 100644 --- a/inc/media.php +++ b/inc/media.php @@ -83,6 +83,18 @@ function media_metasave($id,$auth,$data){ } /** + * check if a media is external source + * + * @author Gerrit Uitslag <klapinklapin@gmail.com> + * @param string $id the media ID or URL + * @return bool + */ +function media_isexternal($id){ + if (preg_match('#^(https?|ftp)://#i', $id)) return true; + return false; +} + +/** * Check if a media item is public (eg, external URL or readable by @ALL) * * @author Andreas Gohr <andi@splitbrain.org> @@ -90,7 +102,7 @@ function media_metasave($id,$auth,$data){ * @return bool */ function media_ispublic($id){ - if(preg_match('/^https?:\/\//i',$id)) return true; + if(media_isexternal($id)) return true; $id = cleanID($id); if(auth_aclcheck(getNS($id).':*', '', array()) >= AUTH_READ) return true; return false; diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 55b715ad9..1cf32aaed 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -680,7 +680,7 @@ function Doku_Handler_Parse_Media($match) { } // Check whether this is a local or remote image - if ( preg_match('#^(https?|ftp)#i',$src) ) { + if ( media_isexternal($src) ) { $call = 'externalmedia'; } else { $call = 'internalmedia'; diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index 8638ffa6a..e17b82f8b 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -432,7 +432,7 @@ class Doku_Renderer_metadata extends Doku_Renderer { global $ID; list($src,$hash) = explode('#',$src,2); - if(!preg_match('/^https?:\/\//i',$src)){ + if(!media_isexternal($src)){ resolve_mediaid(getNS($ID),$src, $exists); } if(preg_match('/.(jpe?g|gif|png)$/i',$src)){ |