diff options
79 files changed, 1118 insertions, 327 deletions
diff --git a/_test/cases/inc/safefn.test.php b/_test/cases/inc/safefn.test.php index fb0d812d7..b93914bf8 100644 --- a/_test/cases/inc/safefn.test.php +++ b/_test/cases/inc/safefn.test.php @@ -10,6 +10,8 @@ class safeFN_test extends UnitTestCase { function test1(){ // we test multiple cases here - format: string, repl, additional, test $tests = array(); + $tests[] = array('äa.txt', '%5g.a.txt'); + $tests[] = array('ä.', '%5g..'); $tests[] = array('asciistring','asciistring'); $tests[] = array('ascii-_/.string','ascii-_/.string'); $tests[] = array('AName','%x%1a.ame'); @@ -18,8 +20,8 @@ class safeFN_test extends UnitTestCase { $tests[] = array('Aß∂ƒName','%x%5b%6oy%aa%1a.ame'); $tests[] = array('A%ß-∂_.ƒName','%x%%5b.-%6oy._.%aa%1a.ame'); $tests[] = array('A%%ß-∂_.ƒName','%x%%%5b.-%6oy._.%aa%1a.ame'); - $tests[] = array('데이터도 함께 복원됩니다. 강력한','%zf4%13dg%15ao%zhg%0%164o%yig%0%11at%138w%zk9%zag%zb8..%0%xyt%10cl%164c'); - $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr'); + $tests[] = array('데이터도 함께 복원됩니다. 강력한','%zf4%13dg%15ao%zhg%0%164o%yig%0%11at%138w%zk9%zag%zb8..%0%xyt%10cl%164c.'); + $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr.'); $tests[] = array('нехватка_файлового_пространства_на_сервере_p0-squid.some.domain.1270211897.txt.gz','%t9%t1%th%sy%sw%te%t6%sw._%tg%sw%t5%t7%ta%sy%ta%sz%ta._%tb%tc%ta%td%te%tc%sw%t9%td%te%sy%sw._%t9%sw._%td%t1%tc%sy%t1%tc%t1._p0-squid.some.domain.1270211897.txt.gz'); foreach($tests as $test){ diff --git a/conf/wordblock.conf b/conf/wordblock.conf index 376d918b2..b3822a29c 100644 --- a/conf/wordblock.conf +++ b/conf/wordblock.conf @@ -26,4 +26,4 @@ downgradetowindowsxp\.com elegantugg\.com classicedhardy\.com research-service\.com -https?:\/\/(\S*?)(2-pay-secure|911essay|academia-research|anypapers|applicationessay|bestbuyessay|bestdissertation|bestessay|bestresume|besttermpaper|college-paper|customessay|custom-made-paper|custom-writing|dissertationblog|dissertation-service|dissertations?expert|essaybank|essay-?blog|essaycapital|essaylogic|essaymill|essayontime|essaypaper|essays?land|essaytownsucks|essaywrit|essay-writing-service|fastessays|freelancercareers|genuinecontent|genuineessay|genuinepaper|goessay|grandresume|killer-content|ma-dissertation|masterpaper|mightystudent|needessay|researchedge|researchpaper-blog|resumecvservice|resumesexperts|resumesplanet|rushessay|samedayessay|superiorcontent|superiorpaper|superiorthesis|term-paper|termpaper-blog|term-paper-research|thesisblog|universalresearch|valwriting|vdwriters|wisetranslation|writersassembly|writers\.com\.ph|writers\.ph) +https?:\/\/(\S*?)(2-pay-secure|911essay|academia-research|anypapers|applicationessay|bestbuyessay|bestdissertation|bestessay|bestresume|besttermpaper|businessessay|college-paper|customessay|custom-made-paper|custom-writing|dissertationblog|dissertation-service|dissertations?expert|essaybank|essay-?blog|essaycapital|essaylogic|essaymill|essayontime|essaypaper|essays?land|essaytownsucks|essaywrit|essay-writing-service|fastessays|freelancercareers|genuinecontent|genuineessay|genuinepaper|goessay|grandresume|killer-content|ma-dissertation|managementessay|masterpaper|mightystudent|needessay|researchedge|researchpaper-blog|resumecvservice|resumesexperts|resumesplanet|rushessay|samedayessay|superiorcontent|superiorpaper|superiorthesis|term-paper|termpaper-blog|term-paper-research|thesisblog|universalresearch|valwriting|vdwriters|wisetranslation|writersassembly|writers\.com\.ph|writers\.ph) diff --git a/data/deleted.files b/data/deleted.files new file mode 100644 index 000000000..4d6f31dbf --- /dev/null +++ b/data/deleted.files @@ -0,0 +1,242 @@ +# This is a list of files that were present in previous DokuWiki releases +# but were removed later. An up to date DokuWiki should not have any of +# the files installed +# A copy of this list is maintained at +# http://www.dokuwiki.org/install:upgrade#files_to_remove + + +# removed in 2010-11-07 +inc/lang/ar/subscribermail.txt +inc/lang/az/subscribermail.txt +inc/lang/bg/subscribermail.txt +inc/lang/ca/subscribermail.txt +inc/lang/ca-valencia/subscribermail.txt +inc/lang/cs/subscribermail.txt +inc/lang/da/subscribermail.txt +inc/lang/de-informal/subscribermail.txt +inc/lang/el/subscribermail.txt +inc/lang/eo/subscribermail.txt +inc/lang/es/subscribermail.txt +inc/lang/et/subscribermail.txt +inc/lang/eu/subscribermail.txt +inc/lang/fa/subscribermail.txt +inc/lang/fi/subscribermail.txt +inc/lang/fo/subscribermail.txt +inc/lang/fr/subscribermail.txt +inc/lang/gl/subscribermail.txt +inc/lang/he/subscribermail.txt +inc/lang/hr/subscribermail.txt +inc/lang/hu/subscribermail.txt +inc/lang/id/subscribermail.txt +inc/lang/is/subscribermail.txt +inc/lang/it/subscribermail.txt +inc/lang/ja/subscribermail.txt +inc/lang/ko/subscribermail.txt +inc/lang/ku/subscribermail.txt +inc/lang/lt/subscribermail.txt +inc/lang/lv/subscribermail.txt +inc/lang/mr/subscribermail.txt +inc/lang/ne/subscribermail.txt +inc/lang/nl/subscribermail.txt +inc/lang/no/subscribermail.txt +inc/lang/pl/subscribermail.txt +inc/lang/pt-br/subscribermail.txt +inc/lang/pt/subscribermail.txt +inc/lang/ro/subscribermail.txt +inc/lang/ru/subscribermail.txt +inc/lang/sk/subscribermail.txt +inc/lang/sr/subscribermail.txt +inc/lang/sv/subscribermail.txt +inc/lang/th/subscribermail.txt +inc/lang/tr/subscribermail.txt +inc/lang/uk/subscribermail.txt +inc/lang/zh/subscribermail.txt +inc/lang/zh-tw/subscribermail.txt + +# removed in rc2010-10-07 +conf/msg +inc/lang/bg/wordblock.txt +inc/lang/ca-valencia/wordblock.txt +inc/lang/ca/wordblock.txt +inc/lang/cs/wordblock.txt +inc/lang/da/wordblock.txt +inc/lang/de-informal/wordblock.txt +inc/lang/de/subscribermail.txt +inc/lang/de/wordblock.txt +inc/lang/el/wordblock.txt +inc/lang/en/subscribermail.txt +inc/lang/en/wordblock.txt +inc/lang/eo/wordblock.txt +inc/lang/es/wordblock.txt +inc/lang/et/wordblock.txt +inc/lang/eu/wordblock.txt +inc/lang/fa/wordblock.txt +inc/lang/fi/wordblock.txt +inc/lang/fo/wordblock.txt +inc/lang/fr/wordblock.txt +inc/lang/he/wordblock.txt +inc/lang/hr/wordblock.txt +inc/lang/hu/wordblock.txt +inc/lang/id/wordblock.txt +inc/lang/it/wordblock.txt +inc/lang/ja/wordblock.txt +inc/lang/ko/wordblock.txt +inc/lang/ku/wordblock.txt +inc/lang/lt/wordblock.txt +inc/lang/lv/wordblock.txt +inc/lang/mg/wordblock.txt +inc/lang/mr/wordblock.txt +inc/lang/nl/wordblock.txt +inc/lang/no/wordblock.txt +inc/lang/pl/wordblock.txt +inc/lang/pt-br/wordblock.txt +inc/lang/pt/wordblock.txt +inc/lang/ro/wordblock.txt +inc/lang/sk/wordblock.txt +inc/lang/sl/wordblock.txt +inc/lang/sr/wordblock.txt +inc/lang/sv/wordblock.txt +inc/lang/th/wordblock.txt +inc/lang/tr/wordblock.txt +inc/lang/uk/wordblock.txt +inc/lang/vi/wordblock.txt +inc/lang/zh-tw/wordblock.txt +inc/lang/zh/wordblock.txt +lib/scripts/pngbehavior.htc + +# removed in rc2009-12-02 +inc/lang/ar/wordblock.txt +inc/lang/ca-va/ +lib/plugins/acl/lang/ca-va/ +lib/plugins/config/lang/ca-va/ +lib/plugins/plugin/lang/ca-va/ +lib/plugins/popularity/lang/ca-va/ +lib/plugins/revert/lang/ca-va/ +lib/plugins/usermanager/lang/ca-va/ + +# removed in rc2009-01-30 +lib/plugins/upgradeplugindirectory +lib/plugins/upgradeplugindirectory/action.php + +# removed in rc2009-01-26 +inc/auth/punbb.class.php +inc/lang/ko/edit.txt_bak +inc/lang/ko/lang.php_bak +inc/lang/ku/admin_acl.txt +inc/lang/mg/admin_acl.txt +lib/plugins/importoldchangelog +lib/plugins/importoldchangelog/action.php +lib/plugins/importoldindex +lib/plugins/importoldindex/action.php +lib/plugins/usermanager/images/no_user_edit.png +lib/plugins/usermanager/images/user_edit.png +lib/tpl/default/UWEB.css + +# removed in rc2008-03-31 +inc/aspell.php +inc/geshi/css-gen.cfg +inc/lang/fr/admin_acl.txt +lib/exe/spellcheck.php +lib/images/toolbar/spellcheck.png +lib/images/toolbar/spellnoerr.png +lib/images/toolbar/spellstop.png +lib/images/toolbar/spellwait.gif +lib/plugins/acl/lang/ar/intro.txt +lib/plugins/acl/lang/bg/intro.txt +lib/plugins/acl/lang/ca/intro.txt +lib/plugins/acl/lang/cs/intro.txt +lib/plugins/acl/lang/da/intro.txt +lib/plugins/acl/lang/de/intro.txt +lib/plugins/acl/lang/el/intro.txt +lib/plugins/acl/lang/en/intro.txt +lib/plugins/acl/lang/es/intro.txt +lib/plugins/acl/lang/et/intro.txt +lib/plugins/acl/lang/eu/intro.txt +lib/plugins/acl/lang/fi/intro.txt +lib/plugins/acl/lang/fr/intro.txt +lib/plugins/acl/lang/gl/intro.txt +lib/plugins/acl/lang/he/intro.txt +lib/plugins/acl/lang/id/intro.txt +lib/plugins/acl/lang/it/intro.txt +lib/plugins/acl/lang/ja/intro.txt +lib/plugins/acl/lang/ko/intro.txt +lib/plugins/acl/lang/lt/intro.txt +lib/plugins/acl/lang/lv/intro.txt +lib/plugins/acl/lang/nl/intro.txt +lib/plugins/acl/lang/no/intro.txt +lib/plugins/acl/lang/pl/intro.txt +lib/plugins/acl/lang/pt/intro.txt +lib/plugins/acl/lang/ru/intro.txt +lib/plugins/acl/lang/sk/intro.txt +lib/plugins/acl/lang/sr/intro.txt +lib/plugins/acl/lang/sv/intro.txt +lib/plugins/acl/lang/tr/intro.txt +lib/plugins/acl/lang/uk/intro.txt +lib/plugins/acl/lang/vi/intro.txt +lib/plugins/acl/lang/zh/intro.txt +lib/plugins/acl/lang/zh-tw/intro.txt +lib/scripts/spellcheck.js +lib/styles/spellcheck.css + +# removed in 2007-06-26 +inc/parser/wiki.php +lib/images/interwiki/bug.gif +lib/plugins/base.php +lib/plugins/plugin/inc +lib/plugins/plugin/inc/tarlib.class.php +lib/plugins/plugin/inc/zip.lib.php +lib/scripts/domLib.js +lib/scripts/domTT.js + +# removed in 2006-11-06 +inc/admin_acl.php +inc/lang/lt/stopwords.txt +inc/magpie +inc/magpie/rss_cache.inc +inc/magpie/rss_fetch.inc +inc/magpie/rss_parse.inc +inc/magpie/rss_utils.inc +lib/exe/media.php +lib/tpl/default/mediaedit.php +lib/tpl/default/media.php +lib/tpl/default/mediaref.php + +# removed in 2006-03-09 +data/pages/wiki/playground.txt +inc/auth/ldap.php +inc/auth/mysql.php +inc/auth/pgsql.php +inc/auth/plain.php +inc/lang/ca/admin_acl.txt +inc/lang/cs/admin_acl.txt +inc/lang/da/admin_acl.txt +inc/lang/de/admin_acl.txt +inc/lang/en/admin_acl.txt +inc/lang/et/admin_acl.txt +inc/lang/eu/admin_acl.txt +inc/lang/fr/admin_acl.txt +inc/lang/it/admin_acl.txt +inc/lang/ja/admin_acl.txt +inc/lang/lt/admin_acl.txt +inc/lang/lv/admin_acl.txt +inc/lang/nl/admin_acl.txt +inc/lang/no/admin_acl.txt +inc/lang/pl/admin_acl.txt +inc/lang/pt/admin_acl.txt +inc/lang/vi/admin_acl.txt +inc/lang/zh-tw/admin_acl.txt +inc/parser/spamcheck.php +lib/images/favicon.ico +lib/images/thumbup.gif +lib/images/toolbar/code.png +lib/images/toolbar/empty.png +lib/images/toolbar/extlink.png +lib/images/toolbar/fonth1.png +lib/images/toolbar/fonth2.png +lib/images/toolbar/fonth3.png +lib/images/toolbar/fonth4.png +lib/images/toolbar/fonth5.png +lib/images/toolbar/list.png +lib/images/toolbar/list_ul.png +lib/images/toolbar/rule.png +lib/tpl/default/images/interwiki.png @@ -7,7 +7,7 @@ */ // update message version -$updateVersion = 27; +$updateVersion = 29; // xdebug_start_profiling(); diff --git a/inc/JSON.php b/inc/JSON.php index 332827f4c..2dea44003 100644 --- a/inc/JSON.php +++ b/inc/JSON.php @@ -112,6 +112,16 @@ define('JSON_STRICT_TYPE', 11); * @deprecated */ class JSON { + + /** + * Disables the use of PHP5's native json_decode() + * + * You shouldn't change this usually because the native function is much + * faster. However, this non-native will also parse slightly broken JSON + * which might be handy when talking to a non-conform endpoint + */ + public $skipnative = false; + /** * constructs a new JSON instance * @@ -130,6 +140,7 @@ class JSON { /** * encodes an arbitrary variable into JSON format + * If available the native PHP JSON implementation is used. * * @param mixed $var any number, boolean, string, array, or object to be encoded. * see argument 1 to JSON() above for array-parsing behavior. @@ -140,6 +151,7 @@ class JSON { * @access public */ function encode($var) { + if (function_exists('json_encode')) return json_encode($var); switch (gettype($var)) { case 'boolean': return $var ? 'true' : 'false'; @@ -352,6 +364,7 @@ class JSON { /** * decodes a JSON string into appropriate variable + * If available the native PHP JSON implementation is used. * * @param string $str JSON-formatted string * @@ -363,6 +376,10 @@ class JSON { * @access public */ function decode($str) { + if (!$this->skipnative && function_exists('json_decode')){ + return json_decode($str,($this->use == JSON_LOOSE_TYPE)); + } + $str = $this->reduce_string($str); switch (strtolower($str)) { diff --git a/inc/SafeFN.class.php b/inc/SafeFN.class.php index b6e477fab..ac6698a63 100644 --- a/inc/SafeFN.class.php +++ b/inc/SafeFN.class.php @@ -114,6 +114,7 @@ class SafeFN { $converted = true; } } + if($converted) $safe .= self::$post_indicator; return $safe; } diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php new file mode 100644 index 000000000..47a3fedb5 --- /dev/null +++ b/inc/Sitemapper.php @@ -0,0 +1,203 @@ +<?php +/** + * Sitemap handling functions + * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Michael Hamann <michael@content-space.de> + */ + +if(!defined('DOKU_INC')) die('meh.'); + +/** + * A class for building sitemaps and pinging search engines with the sitemap URL. + * + * @author Michael Hamann + */ +class Sitemapper { + /** + * Builds a Google Sitemap of all public pages known to the indexer + * + * The map is placed in the cache directory named sitemap.xml.gz - This + * file needs to be writable! + * + * @author Michael Hamann + * @author Andreas Gohr + * @link https://www.google.com/webmasters/sitemaps/docs/en/about.html + * @link http://www.sitemaps.org/ + */ + public function generate(){ + global $conf; + if($conf['sitemap'] < 1 || !is_numeric($conf['sitemap'])) return false; + + $sitemap = Sitemapper::getFilePath(); + + if(@file_exists($sitemap)){ + if(!is_writable($sitemap)) return false; + }else{ + if(!is_writable(dirname($sitemap))) return false; + } + + if(@filesize($sitemap) && + @filemtime($sitemap) > (time()-($conf['sitemap']*86400))){ // 60*60*24=86400 + dbglog('Sitemapper::generate(): Sitemap up to date'); // FIXME: only in debug mode + return false; + } + + dbglog("Sitemapper::generate(): using $sitemap"); // FIXME: Only in debug mode + + $pages = idx_getIndex('page', ''); + dbglog('Sitemapper::generate(): creating sitemap using '.count($pages).' pages'); + $items = array(); + + // build the sitemap items + foreach($pages as $id){ + //skip hidden, non existing and restricted files + if(isHiddenPage($id)) continue; + if(auth_aclcheck($id,'','') < AUTH_READ) continue; + $item = SitemapItem::createFromID($id); + if ($item !== NULL) + $items[] = $item; + } + + $eventData = array('items' => &$items, 'sitemap' => &$sitemap); + $event = new Doku_Event('SITEMAP_GENERATE', $eventData); + if ($event->advise_before(true)) { + //save the new sitemap + $result = io_saveFile($sitemap, Sitemapper::getXML($items)); + } + $event->advise_after(); + + return $result; + } + + /** + * Builds the sitemap XML string from the given array auf SitemapItems. + * + * @param $items array The SitemapItems that shall be included in the sitemap. + * @return string The sitemap XML. + * @author Michael Hamann + */ + private function getXML($items) { + ob_start(); + echo '<?xml version="1.0" encoding="UTF-8"?>'.NL; + echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'.NL; + foreach ($items as $item) { + echo $item->toXML(); + } + echo '</urlset>'.NL; + $result = ob_get_contents(); + ob_end_clean(); + return $result; + } + + /** + * Helper function for getting the path to the sitemap file. + * + * @return The path to the sitemap file. + * @author Michael Hamann + */ + public function getFilePath() { + global $conf; + + $sitemap = $conf['cachedir'].'/sitemap.xml'; + if($conf['compression'] === 'bz2' || $conf['compression'] === 'gz'){ + $sitemap .= '.gz'; + } + + return $sitemap; + } + + /** + * Pings search engines with the sitemap url. Plugins can add or remove + * urls to ping using the SITEMAP_PING event. + * + * @author Michael Hamann + */ + public function pingSearchEngines() { + //ping search engines... + $http = new DokuHTTPClient(); + $http->timeout = 8; + + $encoded_sitemap_url = urlencode(wl('', array('do' => 'sitemap'), true, '&')); + $ping_urls = array( + 'google' => 'http://www.google.com/webmasters/sitemaps/ping?sitemap='.$encoded_sitemap_url, + 'yahoo' => 'http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=dokuwiki&url='.$encoded_sitemap_url, + 'microsoft' => 'http://www.bing.com/webmaster/ping.aspx?siteMap='.$encoded_sitemap_url, + ); + + $data = array('ping_urls' => $ping_urls, + 'encoded_sitemap_url' => $encoded_sitemap_url + ); + $event = new Doku_Event('SITEMAP_PING', $data); + if ($event->advise_before(true)) { + foreach ($data['ping_urls'] as $name => $url) { + dbglog("Sitemapper::PingSearchEngines(): pinging $name"); + $resp = $http->get($url); + if($http->error) dbglog("Sitemapper:pingSearchengines(): $http->error"); + dbglog('Sitemapper:pingSearchengines(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp))); + } + } + $event->advise_after(); + + return true; + } +} + +/** + * An item of a sitemap. + * + * @author Michael Hamann + */ +class SitemapItem { + public $url; + public $lastmod; + public $changefreq; + public $priority; + + /** + * Create a new item. + * + * @param $url string The url of the item + * @param $lastmod int Timestamp of the last modification + * @param $changefreq string How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never. + * @param $priority float|string The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0. + */ + public function __construct($url, $lastmod, $changefreq = null, $priority = null) { + $this->url = $url; + $this->lastmod = $lastmod; + $this->changefreq = $changefreq; + $this->priority = $priority; + } + + /** + * Helper function for creating an item for a wikipage id. + * + * @param $id string A wikipage id. + * @param $changefreq string How frequently the item is likely to change. Valid values: always, hourly, daily, weekly, monthly, yearly, never. + * @param $priority float|string The priority of the item relative to other URLs on your site. Valid values range from 0.0 to 1.0. + * @return The sitemap item. + */ + public static function createFromID($id, $changefreq = null, $priority = null) { + $id = trim($id); + $date = @filemtime(wikiFN($id)); + if(!$date) return NULL; + return new SitemapItem(wl($id, '', true), $date, $changefreq, $priority); + } + + /** + * Get the XML representation of the sitemap item. + * + * @return The XML representation. + */ + public function toXML() { + $result = ' <url>'.NL + .' <loc>'.hsc($this->url).'</loc>'.NL + .' <lastmod>'.date_iso8601($this->lastmod).'</lastmod>'.NL; + if ($this->changefreq !== NULL) + $result .= ' <changefreq>'.hsc($this->changefreq).'</changefreq>'.NL; + if ($this->priority !== NULL) + $result .= ' <priority>'.hsc($this->priority).'</priority>'.NL; + $result .= ' </url>'.NL; + return $result; + } +} diff --git a/inc/actions.php b/inc/actions.php index 0a6e6d8c7..9db7d5f24 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -53,6 +53,11 @@ function act_dispatch(){ //check permissions $ACT = act_permcheck($ACT); + //sitemap + if ($ACT == 'sitemap'){ + $ACT = act_sitemap($ACT); + } + //register if($ACT == 'register' && $_POST['save'] && register()){ $ACT = 'login'; @@ -205,7 +210,7 @@ function act_clean($act){ 'preview','search','show','check','index','revisions', 'diff','recent','backlink','admin','subscribe','revert', 'unsubscribe','profile','resendpwd','recover', - 'draftdel','subscribens','unsubscribens',)) && substr($act,0,7) != 'export_' ) { + 'draftdel','subscribens','unsubscribens','sitemap')) && substr($act,0,7) != 'export_' ) { msg('Command unknown: '.htmlspecialchars($act),-1); return 'show'; } @@ -233,7 +238,8 @@ function act_permcheck($act){ }else{ $permneed = AUTH_CREATE; } - }elseif(in_array($act,array('login','search','recent','profile','index'))){ + }elseif(in_array($act,array('login','search','recent','profile','index', 'sitemap'))){ + }elseif(in_array($act,array('login','search','recent','profile','sitemap'))){ $permneed = AUTH_NONE; }elseif($act == 'revert'){ $permneed = AUTH_ADMIN; @@ -587,6 +593,51 @@ function act_export($act){ } /** + * Handle sitemap delivery + * + * @author Michael Hamann <michael@content-space.de> + */ +function act_sitemap($act) { + global $conf; + + if ($conf['sitemap'] < 1 || !is_numeric($conf['sitemap'])) { + header("HTTP/1.0 404 Not Found"); + print "Sitemap generation is disabled."; + exit; + } + + $sitemap = Sitemapper::getFilePath(); + if(strrchr($sitemap, '.') === '.gz'){ + $mime = 'application/x-gzip'; + }else{ + $mime = 'application/xml; charset=utf-8'; + } + + // Check if sitemap file exists, otherwise create it + if (!is_readable($sitemap)) { + Sitemapper::generate(); + } + + if (is_readable($sitemap)) { + // Send headers + header('Content-Type: '.$mime); + + http_conditionalRequest(filemtime($sitemap)); + + // Send file + //use x-sendfile header to pass the delivery to compatible webservers + if (http_sendfile($sitemap)) exit; + + readfile($sitemap); + exit; + } + + header("HTTP/1.0 500 Internal Server Error"); + print "Could not read the sitemap file - bad permissions?"; + exit; +} + +/** * Handle page 'subscribe' * * Throws exception on error. diff --git a/inc/changelog.php b/inc/changelog.php index bb00df76c..cc7612bfd 100644 --- a/inc/changelog.php +++ b/inc/changelog.php @@ -37,6 +37,15 @@ function parseChangelogLine($line) { /** * Add's an entry to the changelog and saves the metadata for the page * + * @param int $date Timestamp of the change + * @param String $id Name of the affected page + * @param String $type Type of the change see DOKU_CHANGE_TYPE_* + * @param String $summary Summary of the change + * @param mixed $extra In case of a revert the revision (timestmp) of the reverted page + * @param array $flags Additional flags in a key value array. + * Availible flags: + * - ExternalEdit - mark as an external edit. + * * @author Andreas Gohr <andi@splitbrain.org> * @author Esther Brunner <wikidesign@gmail.com> * @author Ben Coburn <btcoburn@silicodon.net> diff --git a/inc/common.php b/inc/common.php index 3e760419f..18f782788 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1134,12 +1134,7 @@ function notify($id,$who,$rev='',$summary='',$minor=false,$replace=array()){ $subject = '['.utf8_substr($conf['title'], 0, 20).'...] '.$subject; } - $from = $conf['mailfrom']; - $from = str_replace('@USER@',$_SERVER['REMOTE_USER'],$from); - $from = str_replace('@NAME@',$INFO['userinfo']['name'],$from); - $from = str_replace('@MAIL@',$INFO['userinfo']['mail'],$from); - - mail_send($to,$subject,$text,$from,'',$bcc); + mail_send($to,$subject,$text,$conf['mailfrom'],'',$bcc); } /** @@ -1271,6 +1266,21 @@ function dformat($dt=null,$format=''){ } /** + * Formats a timestamp as ISO 8601 date + * + * @author <ungu at terong dot com> + * @link http://www.php.net/manual/en/function.date.php#54072 + */ +function date_iso8601($int_date) { + //$int_date: current date in UNIX timestamp + $date_mod = date('Y-m-d\TH:i:s', $int_date); + $pre_timezone = date('O', $int_date); + $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2); + $date_mod .= $time_zone; + return $date_mod; +} + +/** * return an obfuscated email address in line with $conf['mailguard'] setting * * @author Harry Fuecks <hfuecks@gmail.com> diff --git a/inc/fulltext.php b/inc/fulltext.php index 943a5d401..7ace3a724 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -229,6 +229,7 @@ function ft_pageLookup($id, $in_ns=false, $in_title=false){ } function _ft_pageLookup(&$data){ + global $conf; // split out original parameters $id = $data['id']; if (preg_match('/(?:^| )@(\w+)/', $id, $matches)) { @@ -241,6 +242,11 @@ function _ft_pageLookup(&$data){ $pages = array_map('rtrim', idx_getIndex('page', '')); $titles = array_map('rtrim', idx_getIndex('title', '')); + // check for corrupt title index #FS2076 + if(count($pages) != count($titles)){ + $titles = array_fill(0,count($pages),''); + @unlink($conf['indexdir'].'/title.idx'); // will be rebuilt in inc/init.php + } $pages = array_combine($pages, $titles); $cleaned = cleanID($id); @@ -270,7 +276,7 @@ function _ft_pageLookup(&$data){ } } - uasort($pages,'ft_pagesorter'); + uksort($pages,'ft_pagesorter'); return $pages; } diff --git a/inc/html.php b/inc/html.php index a02cc020d..9d3c92707 100644 --- a/inc/html.php +++ b/inc/html.php @@ -163,11 +163,12 @@ function html_topbtn(){ * * @author Andreas Gohr <andi@splitbrain.org> */ -function html_btn($name,$id,$akey,$params,$method='get',$tooltip=''){ +function html_btn($name,$id,$akey,$params,$method='get',$tooltip='',$label=false){ global $conf; global $lang; - $label = $lang['btn_'.$name]; + if (!$label) + $label = $lang['btn_'.$name]; $ret = ''; $tip = ''; diff --git a/inc/init.php b/inc/init.php index bf7815178..ed4409729 100644 --- a/inc/init.php +++ b/inc/init.php @@ -220,6 +220,9 @@ if (!defined('NOSESSION')) { auth_setup(); } +// setup mail system +mail_setup(); + /** * Checks paths from config file */ diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index 33c6db01a..749a41a5b 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -242,7 +242,7 @@ $lang['i_wikiname'] = 'Název wiki'; $lang['i_enableacl'] = 'Zapnout ACL (doporučeno)'; $lang['i_superuser'] = 'Správce'; $lang['i_problems'] = 'Instalátor narazil na níže popsané problémy. Nelze pokračovat v instalaci, dokud je neopravíte.'; -$lang['i_modified'] = 'Instalátor bude z bezpečnostních důvodů pracovat pouze s čistou a ještě neupravenou instalací DokuWiki. Buď znovu rozbalte souboru z instalačního balíčku nebo se zkuste poradit s <a href="http://dokuwiki.org/install">instrukcemi pro instalci DokuWiki</a>.'; +$lang['i_modified'] = 'Instalátor bude z bezpečnostních důvodů pracovat pouze s čistou a ještě neupravenou instalací DokuWiki. Buď znovu rozbalte souboru z instalačního balíčku nebo se zkuste poradit s <a href="http://dokuwiki.org/install">instrukcemi pro instalaci DokuWiki</a>.'; $lang['i_funcna'] = 'PHP funkce <code>%s</code> není dostupná. Váš webhosting ji možná z nějakého důvodu vypnul.'; $lang['i_phpver'] = 'Verze vaší instalace PHP <code>%s</code> je nižší než požadovaná <code>%s</code>. Budete muset aktualizovat svou instalaci PHP.'; $lang['i_permfail'] = 'DokuWiki nemůže zapisovat do <code>%s</code>. Budete muset opravit práva k tomuto adresáři.'; @@ -268,7 +268,7 @@ $lang['mu_toobig'] = 'příliš velké'; $lang['mu_ready'] = 'připraveno k načtení'; $lang['mu_done'] = 'hotovo'; $lang['mu_fail'] = 'selhalo'; -$lang['mu_authfail'] = 'vypršla session'; +$lang['mu_authfail'] = 'vypršela session'; $lang['mu_progress'] = '@PCT@% načten'; $lang['mu_filetypes'] = 'Povolené typy souborů'; $lang['mu_info'] = 'soubory načteny.'; diff --git a/inc/lang/cs/subscr_form.txt b/inc/lang/cs/subscr_form.txt index b786ac137..d051b646f 100644 --- a/inc/lang/cs/subscr_form.txt +++ b/inc/lang/cs/subscr_form.txt @@ -1,3 +1,3 @@ ====== Správa odběratelů změn ====== -Tato stránka Vám umožnuje spravovat uživatele přihlášené k odběru změn aktuální stránky nebo jmenného prostoru.
\ No newline at end of file +Tato stránka Vám umožňuje spravovat uživatele přihlášené k odběru změn aktuální stránky nebo jmenného prostoru.
\ No newline at end of file diff --git a/inc/lang/de-informal/draft.txt b/inc/lang/de-informal/draft.txt index 704c6d1da..e56dbe083 100644 --- a/inc/lang/de-informal/draft.txt +++ b/inc/lang/de-informal/draft.txt @@ -2,5 +2,5 @@ Deine letzte Bearbeitungssitzung wurde nicht ordnungsgemäß abgeschlossen. DokuWiki hat während deiner Arbeit automatisch einen Zwischenentwurf gespeichert, den du jetzt nutzen kannst, um deine Arbeit fortzusetzen. Unten siehst du die Daten, die bei deiner letzten Sitzung gespeichert wurden. -Bitte entscheide dich, ob du den Entwurf //wieder herstellen// oder //löschen// willst oder ob du die Bearbeitung abbrechen möchtest. +Bitte entscheide dich, ob du den Entwurf //wiederherstellen// oder //löschen// willst oder ob du die Bearbeitung abbrechen möchtest. diff --git a/inc/lang/de/draft.txt b/inc/lang/de/draft.txt index 14a5e8495..77a55b165 100644 --- a/inc/lang/de/draft.txt +++ b/inc/lang/de/draft.txt @@ -2,5 +2,5 @@ Ihre letzte Bearbeitungssitzung wurde nicht ordnungsgemäß abgeschlossen. DokuWiki hat während Ihrer Arbeit automatisch einen Zwischenentwurf gespeichert, den Sie jetzt nutzen können, um Ihre Arbeit fortzusetzen. Unten sehen Sie die Daten, die bei Ihrer letzten Sitzung gespeichert wurden. -Bitte entscheiden Sie, ob Sie den Entwurf //wieder herstellen// oder //löschen// wollen oder ob Sie die Bearbeitung abbrechen möchten. +Bitte entscheiden Sie, ob Sie den Entwurf //wiederherstellen// oder //löschen// wollen oder ob Sie die Bearbeitung abbrechen möchten. diff --git a/inc/lang/eu/adminplugins.txt b/inc/lang/eu/adminplugins.txt new file mode 100644 index 000000000..20709bfd6 --- /dev/null +++ b/inc/lang/eu/adminplugins.txt @@ -0,0 +1 @@ +===== Plugin Gehigarriak =====
\ No newline at end of file diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php index a5f786654..2efec00be 100644 --- a/inc/lang/eu/lang.php +++ b/inc/lang/eu/lang.php @@ -38,15 +38,13 @@ $lang['btn_back'] = 'Atzera'; $lang['btn_backlink'] = 'Itzulera estekak'; $lang['btn_backtomedia'] = 'Atzera Multimedia Fitxategiaren Aukeraketara'; $lang['btn_subscribe'] = 'Harpidetu Orri Aldaketetara'; -$lang['btn_unsubscribe'] = 'Utzi Harpidetza Orri Aldaketetara'; -$lang['btn_subscribens'] = 'Harpidetu Izen-espazio Aldaketetara'; -$lang['btn_unsubscribens'] = 'Utzi Harpidetza Izen-espazio Aldaketetara'; $lang['btn_profile'] = 'Eguneratu Profila '; $lang['btn_reset'] = 'Aldaketak Desegin'; $lang['btn_resendpwd'] = 'Pasahitz berria bidali'; $lang['btn_draft'] = 'Editatu zirriborroa'; $lang['btn_recover'] = 'Berreskuratu zirriborroa'; $lang['btn_draftdel'] = 'Ezabatu zirriborroa'; +$lang['btn_revert'] = 'Berrezarri'; $lang['loggedinas'] = 'Erabiltzailea'; $lang['user'] = 'Erabiltzailea'; $lang['pass'] = 'Pasahitza'; @@ -85,13 +83,46 @@ $lang['resendpwdconfirm'] = 'Baieztapen esteka bat e-postaz bidali da.'; $lang['resendpwdsuccess'] = 'Zure pasahitz berria e-postaz bidali da.'; $lang['license'] = 'Besterik esan ezean, wiki hontako edukia ondorengo lizentziapean argitaratzen da:'; $lang['licenseok'] = 'Oharra: Orri hau editatzean, zure edukia ondorengo lizentziapean argitaratzea onartzen duzu: '; +$lang['searchmedia'] = 'Bilatu fitxategi izena:'; +$lang['searchmedia_in'] = 'Bilatu %s-n'; $lang['txt_upload'] = 'Ireki nahi den fitxategia aukeratu'; $lang['txt_filename'] = 'Idatzi wikiname-a (aukerazkoa)'; $lang['txt_overwrt'] = 'Oraingo fitxategiaren gainean idatzi'; $lang['lockedby'] = 'Momentu honetan blokeatzen:'; $lang['lockexpire'] = 'Blokeaketa iraungitzen da:'; $lang['willexpire'] = 'Zure blokeaketa orri hau aldatzeko minutu batean iraungitzen da.\nGatazkak saihesteko, aurreikusi botoia erabili blokeaketa denboragailua berrabiarazteko.'; -$lang['js']['notsavedyet'] = "Gorde gabeko aldaketak galdu egingo dira.\nBenetan jarraitu nahi duzu?"; +$lang['js']['notsavedyet'] = 'Gorde gabeko aldaketak galdu egingo dira. +Benetan jarraitu nahi duzu?'; +$lang['js']['searchmedia'] = 'Bilatu fitxategiak'; +$lang['js']['keepopen'] = 'Mantendu leihoa irekita aukeraketan'; +$lang['js']['hidedetails'] = 'Xehetasunak Ezkutatu'; +$lang['js']['mediatitle'] = 'Esteken ezarpenak'; +$lang['js']['mediadisplay'] = 'Esteka mota'; +$lang['js']['mediaalign'] = 'Lerrokatzea'; +$lang['js']['mediasize'] = 'Irudi tamaina'; +$lang['js']['mediatarget'] = 'Estekaren helburua'; +$lang['js']['mediaclose'] = 'Itxi'; +$lang['js']['mediainsert'] = 'Txertatu'; +$lang['js']['mediadisplayimg'] = 'Irudia erakutsi'; +$lang['js']['mediadisplaylnk'] = 'Esteka bakarrik erakutsi'; +$lang['js']['mediasmall'] = 'Bertsio txikia'; +$lang['js']['mediamedium'] = 'Bertsio ertaina'; +$lang['js']['medialarge'] = 'Bertsio handia'; +$lang['js']['mediaoriginal'] = 'Jatorrizko bertsioa'; +$lang['js']['medialnk'] = 'Esteka xehetasunen orrira'; +$lang['js']['mediadirect'] = 'Jatorrizkora esteka zuzena'; +$lang['js']['medianolnk'] = 'Estekarik ez'; +$lang['js']['medianolink'] = 'Ez estekatu irudia'; +$lang['js']['medialeft'] = 'Irudia ezkerrean lerrokatu'; +$lang['js']['mediaright'] = 'Irudia eskuinean lerrokatu'; +$lang['js']['mediacenter'] = 'Irudia erdian lerrokatu'; +$lang['js']['medianoalign'] = 'Ez erabili lerrokatzerik'; +$lang['js']['nosmblinks'] = 'Window baliabide konpartituetara estekek Microsoft Internet Explorer-en bakarrik balio dute. +Esteka kopiatu eta itsatsi dezakezu dena den.'; +$lang['js']['linkwiz'] = 'Estekatze Laguntzailea'; +$lang['js']['linkto'] = 'Estekatu hona:'; +$lang['js']['del_confirm'] = 'Benetan ezabatu aukeratutako fitxategia(k)?'; +$lang['js']['mu_btn'] = 'Igo hainbat fitxategi aldi berean'; $lang['rssfailed'] = 'Errorea gertatu da feed hau irakurtzean:'; $lang['nothingfound'] = 'Ez da ezer aurkitu.'; $lang['mediaselect'] = 'Aukeratu Multimedia fitxategia'; @@ -109,11 +140,7 @@ $lang['deletefail'] = 'Ezin izan da "%s" ezabatu - egiaztatu baimenak $lang['mediainuse'] = 'Ez da "%s" fitxategia ezabatu - oraindik erabilia izaten ari da.'; $lang['namespaces'] = 'Izen-espazioak'; $lang['mediafiles'] = 'Fitxategiak eskuragarri hemen:'; -$lang['js']['keepopen'] = 'Mantendu leihoa irekita aukeraketan'; -$lang['js']['hidedetails'] = 'Xehetasunak Ezkutatu'; -$lang['js']['nosmblinks'] = 'Window baliabide konpartituetara estekek Microsoft Internet Explorer-en bakarrik balio dute. -Esteka kopiatu eta itsatsi dezakezu dena den.'; -$lang['js']['mu_btn'] = 'Igo hainbat fitxategi aldi berean'; +$lang['accessdenied'] = 'Ez zaude orri hau ikusteko baimendua'; $lang['mediausage'] = 'Erabili ondoko sintaxia fitxategi honi erreferentzia egiteko:'; $lang['mediaview'] = 'Ikusi jatorrizko fitxategia'; $lang['mediaroot'] = 'root'; @@ -129,6 +156,7 @@ $lang['current'] = 'egungoa'; $lang['yours'] = 'Zure Bertsioa'; $lang['diff'] = 'egungo bertsioarekin dituen aldaketak aurkezten ditu'; $lang['diff2'] = 'Erakutsi desberdintasunak aukeratutako bertsioen artean'; +$lang['difflink'] = 'Estekatu konparaketa bista honetara'; $lang['line'] = 'Marra'; $lang['breadcrumb'] = 'Traza'; $lang['youarehere'] = 'Hemen zaude'; @@ -140,8 +168,10 @@ $lang['restored'] = 'bertsio zaharra berrezarria'; $lang['external_edit'] = 'kanpoko aldaketa'; $lang['summary'] = 'Aldatu laburpena'; $lang['noflash'] = '<a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a> beharrezkoa da eduki hau bistaratzeko.'; +$lang['download'] = 'Deskarga Snippet-a'; $lang['mail_newpage'] = '[DokuWiki] gehitutako orria:'; $lang['mail_changed'] = '[DokuWiki] aldatutako orria:'; +$lang['mail_subscribe_list'] = 'izen-espazioan aldatutako orriak:'; $lang['mail_new_user'] = 'erabiltzaile berria:'; $lang['mail_upload'] = 'fitxategia igota:'; $lang['qb_bold'] = 'Letra beltzez'; @@ -154,6 +184,11 @@ $lang['qb_h2'] = 'Izenburua 2'; $lang['qb_h3'] = 'Izenburua 3'; $lang['qb_h4'] = 'Izenburua 4'; $lang['qb_h5'] = 'Izenburua 5'; +$lang['qb_h'] = 'Izenburua'; +$lang['qb_hs'] = 'Izenburua Aukeratu'; +$lang['qb_hplus'] = 'Izenburu Handiagoa'; +$lang['qb_hminus'] = 'Izenburu Txikiagoa'; +$lang['qb_hequal'] = 'Maila Berdineko Izenburua'; $lang['qb_link'] = 'Barruko Lotura'; $lang['qb_extlink'] = 'Kanpoko Lotura'; $lang['qb_hr'] = 'Horizontal Marra'; @@ -163,7 +198,7 @@ $lang['qb_media'] = 'Irudiak eta beste fitxategiak gehitu'; $lang['qb_sig'] = 'Gehitu sinadura'; $lang['qb_smileys'] = 'Irrifartxoak'; $lang['qb_chars'] = 'Karaktere Bereziak'; -$lang['js']['del_confirm'] = 'Benetan ezabatu aukeratutako fitxategia(k)?'; +$lang['upperns'] = 'Jauzi izen-espazio gurasora'; $lang['admin_register'] = 'Erabiltzaile berria gehitu'; $lang['metaedit'] = 'Metadatua Aldatu'; $lang['metasaveerr'] = 'Metadatuaren idazketak huts egin du'; @@ -179,11 +214,22 @@ $lang['img_copyr'] = 'Copyright'; $lang['img_format'] = 'Formatua'; $lang['img_camera'] = 'Kamera'; $lang['img_keywords'] = 'Hitz-gakoak'; -$lang['subscribe_success'] = 'Gehitua %s %s harpidetza zerrendara'; -$lang['subscribe_error'] = 'Errorea %s gehitzen %s harpidetza zerrendara'; -$lang['subscribe_noaddress'] = 'Ez dago posta elektroniko helbiderik zure erabiltzaile izenarekin erlazionatuta, ezin zara harpidetza zerrendara gehitua izan'; -$lang['unsubscribe_success'] = 'Ezabatua %s %s harpidetza zerrendatik'; -$lang['unsubscribe_error'] = 'Errorea %s ezabatzen %s harpidetza zerrendatik'; +$lang['subscr_subscribe_success'] = '%s gehitua %s-ren harpidetza zerrendara'; +$lang['subscr_subscribe_error'] = 'Errorea %s gehitzen %s-ren harpidetza zerrendara'; +$lang['subscr_subscribe_noaddress'] = 'Ez dago helbiderik zure login-arekin lotuta, ezin zara harpidetza zerrendara gehitua izan.'; +$lang['subscr_unsubscribe_success'] = '%s ezabatua %s-ren harpidetza zerrendatik'; +$lang['subscr_unsubscribe_error'] = 'Errorea %s ezabatzen %s-ren harpidetza zerrendatik'; +$lang['subscr_already_subscribed'] = '%s lehendik harpidetua dago %s-n'; +$lang['subscr_not_subscribed'] = '%s ez dago %s-n harpidetua'; +$lang['subscr_m_not_subscribed'] = 'Momentu honetan ez zaude orri honetara edo izen-espazio honetara harpidetua.'; +$lang['subscr_m_new_header'] = 'Gehitu harpidetza'; +$lang['subscr_m_current_header'] = 'Uneko harpidetzak'; +$lang['subscr_m_unsubscribe'] = 'Kendu harpidetza'; +$lang['subscr_m_subscribe'] = 'Harpidetu'; +$lang['subscr_m_receive'] = 'Jaso'; +$lang['subscr_style_every'] = 'e-posta aldaketa bakoitzean'; +$lang['subscr_style_digest'] = 'e-posta laburbildua orri bakoitzeko aldaketentzat (%.2f egunero)'; +$lang['subscr_style_list'] = 'aldatutako orrien zerrenda azken e-postatik (%.2f egunero)'; $lang['authmodfailed'] = 'Erabiltzaile kautotzearen konfigurazioa okerra da. Mesedez, eman honen berri Wiki administratzaileari'; $lang['authtempfail'] = 'Erabiltzaile kautotzea denboraldi batez ez dago erabilgarri. Egoerak hala jarraitzen badu, mesedez, eman honen berri Wiki administratzaileari'; $lang['i_chooselang'] = 'Hautatu zure hizkuntza'; @@ -207,6 +253,7 @@ $lang['i_pol0'] = 'Wiki Irekia (irakurri, idatzi, fitxategiak igo $lang['i_pol1'] = 'Wiki Publikoa (irakurri edonorentzat, idatzi eta fitxategiak igo erregistratutako erabiltzaileentzat)'; $lang['i_pol2'] = 'Wiki Itxia (irakurri, idatzi, fitxategiak igo erregistratutako erabiltzaileentzat soilik)'; $lang['i_retry'] = 'Berriz saiatu'; +$lang['i_license'] = 'Mesedez, aukeratu zein lizentzipean ezarri nahi duzun zure edukia:'; $lang['mu_intro'] = 'Hemen hainbat fitxategi aldi berean igo ditzakezu. Egin klik nabigazio botoian hauek ilarara gehitzeko. Sakatu igo botoia prest egotean.'; $lang['mu_gridname'] = 'Fitxategi izena'; $lang['mu_gridsize'] = 'Tamaina'; @@ -220,4 +267,14 @@ $lang['mu_fail'] = 'hutsegitea'; $lang['mu_authfail'] = 'saioa iraungita'; $lang['mu_progress'] = '@PCT@% igota'; $lang['mu_filetypes'] = 'Onartutako Fitxategi Motak'; +$lang['mu_info'] = 'igotako fitxategiak.'; +$lang['mu_lasterr'] = 'Azken errorea;'; $lang['recent_global'] = 'Une honetan <b>%s</b> izen-espazioaren barneko aldaketak ikusten ari zara.<a href="%s"> Wiki osoaren azken aldaketak</a> ere ikusi ditzakezu.'; +$lang['years'] = 'duela %d urte'; +$lang['months'] = 'duela %d hilabete'; +$lang['weeks'] = 'duela %d aste'; +$lang['days'] = 'duela %d egun'; +$lang['hours'] = 'duela %d ordu'; +$lang['minutes'] = 'duela %d minutu'; +$lang['seconds'] = 'duela %d segundu'; +$lang['wordblock'] = 'Zure aldaketa ez da aldatua izan blokeatutako testua (spam) daukalako.'; diff --git a/inc/lang/eu/subscr_digest.txt b/inc/lang/eu/subscr_digest.txt new file mode 100644 index 000000000..e7962ca22 --- /dev/null +++ b/inc/lang/eu/subscr_digest.txt @@ -0,0 +1,20 @@ +Kaixo! + +@TITLE@ wikiko @PAGE@ orria aldatu egin da. +Hemen aldaketak: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Berrikuste zaharra: @OLDPAGE@ +Berrikuste berria: @NEWPAGE@ + +Orri jakinarazpenak ezeztatzeko, sartu wikian +@DOKUWIKIURL@ helbidean, bisitatu +@SUBSCRIBE@ +eta ezabatu orri eta/edo izen-espazio aldaketen harpidetza. + +-- +E-posta hau DokuWiki-k sortua izan da helbide honetan: +@DOKUWIKIURL@
\ No newline at end of file diff --git a/inc/lang/eu/subscr_form.txt b/inc/lang/eu/subscr_form.txt new file mode 100644 index 000000000..02a117898 --- /dev/null +++ b/inc/lang/eu/subscr_form.txt @@ -0,0 +1,3 @@ +====== Harpidetza Kudeaketa ====== + +Orri honek, oraingo orriko eta izen-espazioko harpidetzak kudeatzeko aukera ematen dizu.
\ No newline at end of file diff --git a/inc/lang/eu/subscr_list.txt b/inc/lang/eu/subscr_list.txt new file mode 100644 index 000000000..950cd352b --- /dev/null +++ b/inc/lang/eu/subscr_list.txt @@ -0,0 +1,17 @@ +Kaixo! + +@TITLE@ wikiko @PAGE@ izen-espazioko orri batzuk aldatu egin dira. +Hemen aldatutako orriak: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Orri jakinarazpenak ezeztatzeko, sartu wikian +@DOKUWIKIURL@ helbidean, bisitatu +@SUBSCRIBE@ +eta ezabatu orri eta/edo izen-espazio aldaketen harpidetza. + +-- +E-posta hau DokuWiki-k sortua izan da helbide honetan: +@DOKUWIKIURL@
\ No newline at end of file diff --git a/inc/lang/eu/subscr_single.txt b/inc/lang/eu/subscr_single.txt new file mode 100644 index 000000000..490211784 --- /dev/null +++ b/inc/lang/eu/subscr_single.txt @@ -0,0 +1,23 @@ +Kaixo! + +@TITLE@ wikiko @PAGE@ orria aldatu egin da. +Hemen aldaketak: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Data : @DATE@ +Erabiltzailea : @USER@ +Aldaketaren Laburpena: @SUMMARY@ +Berrikuste Zaharra: @OLDPAGE@ +Berrikuste Berria: @NEWPAGE@ + +Orri jakinarazpenak ezeztatzeko, sartu wikian +@DOKUWIKIURL@ helbidean, bisitatu +@SUBSCRIBE@ +eta ezabatu orri eta/edo izen-espazio aldaketen harpidetza. + +-- +E-posta hau DokuWiki-k sortua izan da helbide honetan: +@DOKUWIKIURL@
\ No newline at end of file diff --git a/inc/lang/ko/adminplugins.txt b/inc/lang/ko/adminplugins.txt new file mode 100644 index 000000000..5312cf357 --- /dev/null +++ b/inc/lang/ko/adminplugins.txt @@ -0,0 +1 @@ +===== 부가적인 플러그인 =====
\ No newline at end of file diff --git a/inc/lang/ko/edit.txt b/inc/lang/ko/edit.txt index d73f935fe..9b59524f7 100644 --- a/inc/lang/ko/edit.txt +++ b/inc/lang/ko/edit.txt @@ -1,2 +1,2 @@ -페이지를 편집하고 **저장**을 누르십시오. 위키 구문은 [[wiki:syntax]] 혹은 [[syntax|(한글) 구문]]을 참고하십시오. 이 페이지를 **더 낫게 만들 자신이 있을** 때에만 편집하십시오. 실험을 하고 싶을 때에는, 먼저 [[playground:playground|연습장]] 에 가서 연습해 보십시오. +페이지를 편집하고 **저장**을 누르십시오. 위키 구문은 [[wiki:syntax]] 혹은 [[wiki:ko_syntax|(한글) 구문]]을 참고하십시오. 이 페이지를 **더 낫게 만들 자신이 있을** 때에만 편집하십시오. 실험을 하고 싶을 때에는, 먼저 [[playground:playground|연습장]] 에 가서 연습해 보십시오. diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 83014c151..3765dd011 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -8,6 +8,7 @@ * @author dongnak@gmail.com * @author Song Younghwan <purluno@gmail.com> * @author SONG Younghwan <purluno@gmail.com> + * @author Seung-Chul Yoo <dryoo@live.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -41,15 +42,13 @@ $lang['btn_back'] = '뒤로'; $lang['btn_backlink'] = '이전 링크'; $lang['btn_backtomedia'] = '미디어 파일 선택으로 돌아가기'; $lang['btn_subscribe'] = '구독 신청'; -$lang['btn_unsubscribe'] = '구독 신청 해지'; -$lang['btn_subscribens'] = '네임스페이스 구독 신청'; -$lang['btn_unsubscribens'] = '네임스페이스 구독 신청 해지'; $lang['btn_profile'] = '개인정보 변경'; $lang['btn_reset'] = '초기화'; $lang['btn_resendpwd'] = '새 패스워드 보내기'; $lang['btn_draft'] = '문서초안 편집'; $lang['btn_recover'] = '문서초안 복구'; $lang['btn_draftdel'] = '문서초안 삭제'; +$lang['btn_revert'] = '복원'; $lang['loggedinas'] = '다음 사용자로 로그인'; $lang['user'] = '사용자'; $lang['pass'] = '패스워드'; @@ -88,13 +87,45 @@ $lang['resendpwdconfirm'] = '확인 링크를 이메일로 보냈습니다. $lang['resendpwdsuccess'] = '새로운 패스워드는 이메일로 보내드립니다.'; $lang['license'] = '이 위키의 내용은 다음의 라이센스에 따릅니다 :'; $lang['licenseok'] = '주의 : 이 페이지를 수정한다는 다음의 라이센스에 동의함을 의미합니다 :'; +$lang['searchmedia'] = '파일이름 찾기:'; +$lang['searchmedia_in'] = ' %에서 검색'; $lang['txt_upload'] = '업로드 파일을 선택합니다.'; $lang['txt_filename'] = '업로드 파일 이름을 입력합니다.(선택 사항)'; $lang['txt_overwrt'] = '새로운 파일로 이전 파일을 교체합니다.'; $lang['lockedby'] = '현재 잠금 사용자'; $lang['lockexpire'] = '잠금 해제 시간'; $lang['willexpire'] = '잠시 후 편집 잠금이 해제됩니다.\n편집 충돌을 피하려면 미리보기를 눌러 잠금 시간을 다시 설정하기 바랍니다.'; -$lang['js']['notsavedyet'] = "저장하지 않은 변경은 지워집니다.\n계속하시겠습니까?"; +$lang['js']['notsavedyet'] = '저장하지 않은 변경은 지워집니다. +계속하시겠습니까?'; +$lang['js']['searchmedia'] = '파일 찾기'; +$lang['js']['keepopen'] = '선택할 때 윈도우를 열어놓으시기 바랍니다.'; +$lang['js']['hidedetails'] = '자세한 정보 감추기'; +$lang['js']['mediatitle'] = '링크 설정'; +$lang['js']['mediadisplay'] = '링크 형태'; +$lang['js']['mediaalign'] = '배치'; +$lang['js']['mediasize'] = '그림 크기'; +$lang['js']['mediatarget'] = '링크 목표'; +$lang['js']['mediaclose'] = '닫기'; +$lang['js']['mediainsert'] = '삽입'; +$lang['js']['mediadisplayimg'] = '그림보기'; +$lang['js']['mediasmall'] = '작게'; +$lang['js']['mediamedium'] = '중간'; +$lang['js']['medialarge'] = '크게'; +$lang['js']['mediaoriginal'] = '원본'; +$lang['js']['medialnk'] = '세부정보페이지로 링크'; +$lang['js']['mediadirect'] = '원본으로 직접 링크'; +$lang['js']['medianolnk'] = '링크 없슴'; +$lang['js']['medianolink'] = '그림을 링크하지 않음'; +$lang['js']['medialeft'] = '왼쪽 배치'; +$lang['js']['mediaright'] = '오른쪽 배치'; +$lang['js']['mediacenter'] = '중앙 배치'; +$lang['js']['medianoalign'] = '배치 없슴'; +$lang['js']['nosmblinks'] = '윈도우 공유 파일과의 연결은 MS 인터넷 익스플로러에서만 동작합니다. +그러나 링크를 복사하거나 붙여넣기를 할 수 있습니다.'; +$lang['js']['linkwiz'] = '링크 마법사'; +$lang['js']['linkto'] = '다음으로 연결:'; +$lang['js']['del_confirm'] = '정말로 선택된 항목(들)을 삭제하시겠습니까?'; +$lang['js']['mu_btn'] = '여러 파일들을 한번에 업로드합니다.'; $lang['rssfailed'] = 'feed 가져오기 실패: '; $lang['nothingfound'] = '아무 것도 없습니다.'; $lang['mediaselect'] = '미디어 파일 선택'; @@ -112,11 +143,7 @@ $lang['deletefail'] = '"%s" 파일을 삭제할 수 없습니다. - $lang['mediainuse'] = '"%s" 파일을 삭제할 수 없습니다. - 아직 사용 중입니다.'; $lang['namespaces'] = '네임스페이스'; $lang['mediafiles'] = '사용 가능한 파일 목록'; -$lang['js']['keepopen'] = '선택할 때 윈도우를 열어놓으시기 바랍니다.'; -$lang['js']['hidedetails'] = '자세한 정보 감추기'; -$lang['js']['nosmblinks'] = '윈도우 공유 파일과의 연결은 MS 인터넷 익스플로러에서만 동작합니다. -그러나 링크를 복사하거나 붙여넣기를 할 수 있습니다.'; -$lang['js']['mu_btn'] = '여러 파일들을 한번에 업로드합니다.'; +$lang['accessdenied'] = '이 페이지를 볼 권한이 없습니다.'; $lang['mediausage'] = '이 파일을 참조하려면 다음 문법을 사용하기 바랍니다:'; $lang['mediaview'] = '원본 파일 보기'; $lang['mediaroot'] = '루트(root)'; @@ -143,8 +170,10 @@ $lang['restored'] = '옛 버전 복구'; $lang['external_edit'] = '외부 편집기'; $lang['summary'] = '편집 요약'; $lang['noflash'] = '이 컨텐츠를 표시하기 위해서 <a href="http://www.adobe.com/products/flashplayer/">Adobe Flash Plugin</a>이 필요합니다.'; +$lang['download'] = '조각 다운로드'; $lang['mail_newpage'] = '페이지 추가:'; $lang['mail_changed'] = '페이지 변경:'; +$lang['mail_subscribe_list'] = '네임스페이스에서 변경된 페이지:'; $lang['mail_new_user'] = '새로운 사용자:'; $lang['mail_upload'] = '파일 첨부:'; $lang['qb_bold'] = '굵은 글'; @@ -157,6 +186,11 @@ $lang['qb_h2'] = '2단계 헤드라인'; $lang['qb_h3'] = '3단계 헤드라인'; $lang['qb_h4'] = '4단계 헤드라인'; $lang['qb_h5'] = '5단계 헤드라인'; +$lang['qb_h'] = '표제'; +$lang['qb_hs'] = '표제 선택'; +$lang['qb_hplus'] = '상위 표제'; +$lang['qb_hminus'] = '하위 표제'; +$lang['qb_hequal'] = '동급 표제'; $lang['qb_link'] = '내부 링크'; $lang['qb_extlink'] = '외부 링크'; $lang['qb_hr'] = '수평선'; @@ -166,7 +200,7 @@ $lang['qb_media'] = '이미지와 기타 파일 추가'; $lang['qb_sig'] = '서명 추가'; $lang['qb_smileys'] = '이모티콘'; $lang['qb_chars'] = '특수문자'; -$lang['js']['del_confirm'] = '정말로 선택된 항목(들)을 삭제하시겠습니까?'; +$lang['upperns'] = '상위 네임스페이스로 이동'; $lang['admin_register'] = '새로운 사용자 추가'; $lang['metaedit'] = '메타 데이타를 편집합니다.'; $lang['metasaveerr'] = '메타 데이타 쓰기가 실패했습니다.'; @@ -182,11 +216,16 @@ $lang['img_copyr'] = '저작권'; $lang['img_format'] = '포맷'; $lang['img_camera'] = '카메라'; $lang['img_keywords'] = '키워드'; -$lang['subscribe_success'] = '%s를 추가했습니다. (%s의 구독 목록)'; -$lang['subscribe_error'] = '%s를 추가하는데 실패했습니다.(%s의 구독 목록)'; -$lang['subscribe_noaddress'] = '로그인 정보에 이메일 주소가 없습니다, 구독 목록에 추가할 수 없습니다.'; -$lang['unsubscribe_success'] = '%s를 제외시켰습니다. (%s의 구독 목록)'; -$lang['unsubscribe_error'] = '%s를 제외시키는데 실패했습니다.(%s의 구독 목록)'; +$lang['subscr_subscribe_noaddress'] = '등록된 주소가 없기 때문에 구독목록에 등록되지 않았습니다.'; +$lang['subscr_m_not_subscribed'] = '현재의 페이지나 네임스페이스에 구독등록이 되어있지 않습니다.'; +$lang['subscr_m_new_header'] = '구독 추가'; +$lang['subscr_m_current_header'] = '현재 구독중인 것들'; +$lang['subscr_m_unsubscribe'] = '구독 취소'; +$lang['subscr_m_subscribe'] = '구독'; +$lang['subscr_m_receive'] = '받기'; +$lang['subscr_style_every'] = '모든 변화를 이메일로 받기'; +$lang['subscr_style_digest'] = '각 페이지의 변화를 요약 (매 %.2f 일 마다)'; +$lang['subscr_style_list'] = '마지막 이메일 이후 변화된 페이지의 목록 (매 %.2f 일 마다)'; $lang['authmodfailed'] = '잘못된 사용자 인증 설정입니다. 관리자에게 문의하기 바랍니다.'; $lang['authtempfail'] = '사용자 인증이 일시적으로 불가능합니다. 만일 계속해서 문제가 발생하면 관리자에게 문의하기 바랍니다.'; $lang['i_chooselang'] = '사용하는 언어를 선택합니다.'; @@ -213,6 +252,7 @@ $lang['i_pol0'] = '개방형 위키 (누구나 읽기/쓰기/업 $lang['i_pol1'] = '공개형 위키 (누구나 읽을 수 있지만, 등록된 사용자만 쓰기/업로드가 가능합니다.)'; $lang['i_pol2'] = '폐쇄형 위키 (등록된 사용자만 읽기/쓰기/업로드가 가능합니다.)'; $lang['i_retry'] = '다시 시도'; +$lang['i_license'] = '내용의 배포를 위한 라이센스를 선택하세요.'; $lang['mu_intro'] = '여러 파일을 한번에 업로드할 수 있습니다. 파일 목록에 추가하려면 "찾기" 버튼을 클릭합니다. 파일 목록 추가 작업이 끝나면 "업로드" 버튼을 클릭하기 바랍니다. '; $lang['mu_gridname'] = '파일명'; $lang['mu_gridsize'] = '크기'; @@ -226,4 +266,14 @@ $lang['mu_fail'] = '업로드가 실패했습니다.'; $lang['mu_authfail'] = '세션 기간이 종료되었습니다.'; $lang['mu_progress'] = '@PCT@% 업로드되었습니다.'; $lang['mu_filetypes'] = '허용된 파일타입'; +$lang['mu_info'] = '업로드 되었습니다.'; +$lang['mu_lasterr'] = '마지막 에러:'; $lang['recent_global'] = '<b>%s</b> 네임스페이스를 구독중입니다. <a href="%s">전체위키 변경사항 </a>도 보실수 있습니다.'; +$lang['years'] = '%d 년 전'; +$lang['months'] = '%d 개월 전'; +$lang['weeks'] = '%d 주 전'; +$lang['days'] = '%d 일 전'; +$lang['hours'] = '%d 시간 전'; +$lang['minutes'] = '%d 분 전'; +$lang['seconds'] = '%d 초 전'; +$lang['wordblock'] = '스팸 문구를 포함하고 있어서 저장되지 않았습니다.'; diff --git a/inc/lang/ko/register.txt b/inc/lang/ko/register.txt index 999073a1d..24105efeb 100644 --- a/inc/lang/ko/register.txt +++ b/inc/lang/ko/register.txt @@ -1,4 +1,4 @@ ====== 새 사용자 등록 ====== -이 위키에 새 계정을 만들려면 아래의 모든 내용을 입력하십시오. **제대로 된 이메일 주소**를 사용하십시오. 그러나, 아래 내용을 입력했다고 해서 계정을 만들 수 있으리라고는 믿지 마십시오. 이곳은 내가 개인적으로 사용하는 곳이며, 계정을 만들어 주고 안주고는 내 마음입니다. 차라리, 내게 이메일을 보내서 신청하는 편이 더 나을 것입니다. 패스워드는 이 이메일로 보내집니다. 사용자명은 올바른 [[doku>pagename|pagename]] 이어야 합니다. +이 위키에 새 계정을 만들려면 아래의 모든 내용을 입력하세요. **제대로 된 이메일 주소**를 사용하세요. 암호를 입력하는 곳이 없다면 암호는 이 이메일로 보내집니다. 사용자명은 올바른 [[doku>pagename|pagename]] 이어야 합니다. diff --git a/inc/lang/ko/subscr_digest.txt b/inc/lang/ko/subscr_digest.txt new file mode 100644 index 000000000..2e9c87848 --- /dev/null +++ b/inc/lang/ko/subscr_digest.txt @@ -0,0 +1,18 @@ +안녕하세요! + +@TITLE@ 라는 제목의 페이지 @PAGE@ 가 변경되었습니다. + +변경사항은 다음과 같습니다: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +옛날 것: @OLDPAGE@ +새 것: @NEWPAGE@ + +이 페이지 변경알림의 설정을 바구려면, @DOKUWIKIURL@에 로그인한 뒤 +@SUBSCRIBE@ 를 방문하여 페이지나 이름공간의 구독을 취소하세요. + +-- +@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다.
\ No newline at end of file diff --git a/inc/lang/ko/subscr_form.txt b/inc/lang/ko/subscr_form.txt new file mode 100644 index 000000000..31470f372 --- /dev/null +++ b/inc/lang/ko/subscr_form.txt @@ -0,0 +1,3 @@ +====== 구독 관리 ====== + +이 페이지는 현재의 페이지와 네임스페이스의 구독을 관리할 수있도록 해줍니다.
\ No newline at end of file diff --git a/inc/lang/ko/subscr_list.txt b/inc/lang/ko/subscr_list.txt new file mode 100644 index 000000000..2661a6a15 --- /dev/null +++ b/inc/lang/ko/subscr_list.txt @@ -0,0 +1,15 @@ +안녕하세요! + +@TITLE@ 라는 제목의 페이지 @PAGE@ 가 변경되었습니다. + +변경사항은 다음과 같습니다: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +이 페이지 변경알림의 설정을 바구려면, @DOKUWIKIURL@에 로그인한 뒤 +@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 new file mode 100644 index 000000000..1aa4d7efa --- /dev/null +++ b/inc/lang/ko/subscr_single.txt @@ -0,0 +1,21 @@ +안녕하세요! + +@TITLE@ 라는 제목의 페이지 @PAGE@ 가 변경되었습니다. + +변경사항은 다음과 같습니다: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +날짜 : @DATE@ +사용자 : @USER@ +편집 요약 : @SUMMARY@ +구 버전 : @OLDPAGE@ +새 버전 : @NEWPAGE@ + +이 페이지 변경알림의 설정을 바구려면, @DOKUWIKIURL@에 로그인한 뒤 t +@NEWPAGE@ 를 방문하여 페이지나 이름공간의 구독을 취소하세요. + +-- +@DOKUWIKIURL@의 DokuWiki가 자동으로 만들어낸 메일입니다.
\ No newline at end of file diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index 9488cffe1..f819aff9a 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -10,6 +10,7 @@ * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> + * @author caii <zhoucaiqi@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -62,7 +63,7 @@ $lang['email'] = 'E-Mail'; $lang['register'] = '注册'; $lang['profile'] = '用户信息'; $lang['badlogin'] = '对不起,用户名或密码错误。'; -$lang['minoredit'] = '轻微修改'; +$lang['minoredit'] = '细微修改'; $lang['draftdate'] = '草稿自动保存于'; $lang['nosecedit'] = '在您编辑期间本页刚被他人修改过,局部信息已过期,故载入全页。'; $lang['regmissing'] = '对不起,您必须填写所有的区域。'; diff --git a/inc/load.php b/inc/load.php index 2f5be6d63..478ee7c76 100644 --- a/inc/load.php +++ b/inc/load.php @@ -74,6 +74,7 @@ function load_autoload($name){ 'DokuWikiFeedCreator' => DOKU_INC.'inc/feedcreator.class.php', 'Doku_Parser_Mode' => DOKU_INC.'inc/parser/parser.php', 'SafeFN' => DOKU_INC.'inc/SafeFN.class.php', + 'Sitemapper' => DOKU_INC.'inc/Sitemapper.php', 'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php', 'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php', diff --git a/inc/mail.php b/inc/mail.php index 38232d110..fb163585a 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -30,7 +30,39 @@ if(!defined('QUOTEDPRINTABLE_EOL')) define('QUOTEDPRINTABLE_EOL',"\015\012"); if (!defined('RFC2822_ATEXT')) define('RFC2822_ATEXT',"0-9a-zA-Z!#$%&'*+/=?^_`{|}~-"); if (!defined('PREG_PATTERN_VALID_EMAIL')) define('PREG_PATTERN_VALID_EMAIL', '['.RFC2822_ATEXT.']+(?:\.['.RFC2822_ATEXT.']+)*@(?i:[0-9a-z][0-9a-z-]*\.)+(?i:[a-z]{2,4}|museum|travel)'); +/** + * Prepare mailfrom replacement patterns + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +function mail_setup(){ + global $conf; + global $INFO; + + $replace = array(); + + if(!empty($INFO['userinfo']['mail'])){ + $replace['@MAIL@'] = $INFO['userinfo']['mail']; + }else{ + $replace['@MAIL@'] = 'noreply@'.parse_url(DOKU_URL,PHP_URL_HOST); + } + if(!empty($_SERVER['REMOTE_USER'])){ + $replace['@USER@'] = $_SERVER['REMOTE_USER']; + }else{ + $replace['@USER@'] = 'noreply'; + } + + if(!empty($INFO['userinfo']['name'])){ + $replace['@NAME@'] = $INFO['userinfo']['name']; + }else{ + $replace['@NAME@'] = ''; + } + + $conf['mailfrom'] = str_replace(array_keys($replace), + array_values($replace), + $conf['mailfrom']); +} /** * UTF-8 autoencoding replacement for PHPs mail function diff --git a/inc/media.php b/inc/media.php index 3dacd12b7..69441352b 100644 --- a/inc/media.php +++ b/inc/media.php @@ -407,14 +407,9 @@ function media_notify($id,$file,$mime){ $text = str_replace('@MEDIA@',ml($id,'',true,'&',true),$text); $text = str_replace('@SIZE@',filesize_h(filesize($file)),$text); - $from = $conf['mailfrom']; - $from = str_replace('@USER@',$_SERVER['REMOTE_USER'],$from); - $from = str_replace('@NAME@',$INFO['userinfo']['name'],$from); - $from = str_replace('@MAIL@',$INFO['userinfo']['mail'],$from); - $subject = '['.$conf['title'].'] '.$lang['mail_upload'].' '.$id; - mail_send($conf['notify'],$subject,$text,$from); + mail_send($conf['notify'],$subject,$text,$conf['mailfrom']); } /** diff --git a/inc/parserutils.php b/inc/parserutils.php index 27a5190bd..a50e3f4f3 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -223,7 +223,7 @@ function p_get_instructions($text){ * @author Esther Brunner <esther@kaffeehaus.ch> */ function p_get_metadata($id, $key='', $render=false){ - global $ID, $INFO, $cache_metadata; + global $ID; // cache the current page // Benchmarking shows the current page's metadata is generally the only page metadata @@ -234,11 +234,7 @@ function p_get_metadata($id, $key='', $render=false){ // metadata has never been rendered before - do it! (but not for non-existent pages) if ($render && !isset($meta['current']['description']['abstract']) && page_exists($id)){ $meta = p_render_metadata($id, $meta); - io_saveFile(metaFN($id, '.meta'), serialize($meta)); - - // sync cached copies, including $INFO metadata - if (!empty($cache_metadata[$id])) $cache_metadata[$id] = $meta; - if (!empty($INFO) && ($id == $INFO['id'])) { $INFO['meta'] = $meta['current']; } + p_save_metadata($id, $meta); } $val = $meta['current']; @@ -256,6 +252,15 @@ function p_get_metadata($id, $key='', $render=false){ /** * sets metadata elements of a page * + * @see http://www.dokuwiki.org/devel:metadata#functions_to_get_and_set_metadata + * + * @param String $id is the ID of a wiki page + * @param Array $data is an array with key ⇒ value pairs to be set in the metadata + * @param Boolean $render whether or not the page metadata should be generated with the renderer + * @param Boolean $persistent indicates whether or not the particular metadata value will persist through + * the next metadata rendering. + * @return boolean true on success + * * @author Esther Brunner <esther@kaffeehaus.ch> */ function p_set_metadata($id, $data, $render=false, $persistent=true){ @@ -305,13 +310,7 @@ function p_set_metadata($id, $data, $render=false, $persistent=true){ // save only if metadata changed if ($meta == $orig) return true; - // sync cached copies, including $INFO metadata - global $cache_metadata, $INFO; - - if (!empty($cache_metadata[$id])) $cache_metadata[$id] = $meta; - if (!empty($INFO) && ($id == $INFO['id'])) { $INFO['meta'] = $meta['current']; } - - return io_saveFile(metaFN($id, '.meta'), serialize($meta)); + return p_save_metadata($id, $meta); } /** @@ -321,25 +320,22 @@ function p_set_metadata($id, $data, $render=false, $persistent=true){ * @author Michael Klier <chi@chimeric.de> */ function p_purge_metadata($id) { - $metafn = metaFN('id', '.meta'); - $meta = p_read_metadata($id); + $meta = p_read_metadata($id); foreach($meta['current'] as $key => $value) { if(is_array($meta[$key])) { $meta['current'][$key] = array(); } else { $meta['current'][$key] = ''; } + } - return io_saveFile(metaFN($id, '.meta'), serialize($meta)); + return p_save_metadata($id, $meta); } /** * read the metadata from source/cache for $id * (internal use only - called by p_get_metadata & p_set_metadata) * - * this function also converts the metadata from the original format to - * the current format ('current' & 'persistent' arrays) - * * @author Christopher Smith <chris@jalakai.co.uk> * * @param string $id absolute wiki page id @@ -356,26 +352,6 @@ function p_read_metadata($id,$cache=false) { $file = metaFN($id, '.meta'); $meta = @file_exists($file) ? unserialize(io_readFile($file, false)) : array('current'=>array(),'persistent'=>array()); - // convert $meta from old format to new (current+persistent) format - if (!isset($meta['current'])) { - $meta = array('current'=>$meta,'persistent'=>$meta); - - // remove non-persistent keys - unset($meta['persistent']['title']); - unset($meta['persistent']['description']['abstract']); - unset($meta['persistent']['description']['tableofcontents']); - unset($meta['persistent']['relation']['haspart']); - unset($meta['persistent']['relation']['references']); - unset($meta['persistent']['date']['valid']); - - if (empty($meta['persistent']['description'])) unset($meta['persistent']['description']); - if (empty($meta['persistent']['relation'])) unset($meta['persistent']['relation']); - if (empty($meta['persistent']['date'])) unset($meta['persistent']['date']); - - // save converted metadata - io_saveFile($file, serialize($meta)); - } - if ($cache) { $cache_metadata[(string)$id] = $meta; } @@ -384,6 +360,24 @@ function p_read_metadata($id,$cache=false) { } /** + * This is the backend function to save a metadata array to a file + * + * @param string $id absolute wiki page id + * @param array $meta metadata + * + * @return bool success / fail + */ +function p_save_metadata($id, $meta) { + // sync cached copies, including $INFO metadata + global $cache_metadata, $INFO; + + if (isset($cache_metadata[$id])) $cache_metadata[$id] = $meta; + if (!empty($INFO) && ($id == $INFO['id'])) { $INFO['meta'] = $meta['current']; } + + return io_saveFile(metaFN($id, '.meta'), serialize($meta)); +} + +/** * renders the metadata of a page * * @author Esther Brunner <esther@kaffeehaus.ch> diff --git a/inc/search.php b/inc/search.php index 8273eef8c..a6787c5d2 100644 --- a/inc/search.php +++ b/inc/search.php @@ -119,7 +119,7 @@ function search_index(&$data,$base,$file,$type,$lvl,$opts){ return false; } - $id = pathID($file); + $id = pathID($file,($type == 'd')); if($type=='d' && $conf['sneaky_index'] && auth_quickaclcheck($id.':') < AUTH_READ){ return false; @@ -511,8 +511,7 @@ function pathID($path,$keeptxt=false){ $id = utf8_decodeFN($path); $id = str_replace('/',':',$id); if(!$keeptxt) $id = preg_replace('#\.txt$#','',$id); - $id = preg_replace('#^:+#','',$id); - $id = preg_replace('#:+$#','',$id); + $id = trim($id, ':'); return $id; } @@ -550,7 +549,7 @@ function search_universal(&$data,$base,$file,$type,$lvl,$opts){ $return = true; // get ID and check if it is a valid one - $item['id'] = pathID($file,$opts['keeptxt']); + $item['id'] = pathID($file,($type == 'd' || $opts['keeptxt'])); if($item['id'] != cleanID($item['id'])){ if($opts['showmsg']) msg(hsc($item['id']).' is not a valid file name for DokuWiki - skipped',-1); diff --git a/inc/template.php b/inc/template.php index c2ce130ff..e2ea6e386 100644 --- a/inc/template.php +++ b/inc/template.php @@ -609,7 +609,7 @@ function tpl_get_action($type) { $type = 'subscribe'; $params['do'] = 'subscribe'; case 'subscribe': - if(!$conf['useacl'] || !$auth || $ACT !== 'show' || !$conf['subscribers'] || !$_SERVER['REMOTE_USER']){ + if(!$conf['useacl'] || !$auth || !$conf['subscribers'] || !$_SERVER['REMOTE_USER']){ return false; } break; @@ -617,7 +617,7 @@ function tpl_get_action($type) { break; case 'profile': if(!$conf['useacl'] || !$auth || !isset($_SERVER['REMOTE_USER']) || - !$auth->canDo('Profile') || ($ACT=='profile')){ + !$auth->canDo('Profile')){ return false; } break; @@ -796,7 +796,7 @@ function tpl_userinfo(){ global $lang; global $INFO; if(isset($_SERVER['REMOTE_USER'])){ - print $lang['loggedinas'].': '.$INFO['userinfo']['name'].' ('.$_SERVER['REMOTE_USER'].')'; + print $lang['loggedinas'].': '.hsc($INFO['userinfo']['name']).' ('.hsc($_SERVER['REMOTE_USER']).')'; return true; } return false; @@ -1359,5 +1359,18 @@ function tpl_flush(){ } +/** + * Use favicon.ico from data/media root directory if it exists, otherwise use + * the one in the template's image directory. + * + * @author Anika Henke <anika@selfthinker.org> + */ +function tpl_getFavicon() { + if (file_exists(mediaFN('favicon.ico'))) + return ml('favicon.ico'); + return DOKU_TPL.'images/favicon.ico'; +} + + //Setup VIM: ex: et ts=4 enc=utf-8 : diff --git a/install.php b/install.php index e555d3f54..ef3c848a9 100644 --- a/install.php +++ b/install.php @@ -46,7 +46,7 @@ $dokuwiki_hash = array( '2008-05-04' => '1e5c42eac3219d9e21927c39e3240aad', '2009-02-14' => 'ec8c04210732a14fdfce0f7f6eead865', '2009-12-25' => '993c4b2b385643efe5abf8e7010e11f4', - '2010-10-07rc' => '7921d48195f4db21b8ead6d9bea801b8' + '2010-11-07' => '7921d48195f4db21b8ead6d9bea801b8' ); diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index f9cc3158a..3fa81715b 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -26,7 +26,8 @@ if(!$defer){ $ID = cleanID($_REQUEST['id']); // Catch any possible output (e.g. errors) -if(!isset($_REQUEST['debug'])) ob_start(); +$output = isset($_REQUEST['debug']) && $conf['allowdebug']; +if(!$output) ob_start(); // run one of the jobs $tmp = array(); // No event data @@ -42,7 +43,7 @@ if ($evt->advise_before()) { } if($defer) sendGIF(); -if(!isset($_REQUEST['debug'])) ob_end_clean(); +if(!$output) ob_end_clean(); exit; // -------------------------------------------------------------------- @@ -189,7 +190,7 @@ function metaUpdate(){ // rendering needed? if (@file_exists($file)) return false; - if (!@file_exists(wikiFN($ID))) return false; + if (!page_exists($ID)) return false; global $conf; @@ -212,7 +213,7 @@ function metaUpdate(){ } $meta = p_render_metadata($ID, $meta); - io_saveFile($file, serialize($meta)); + p_save_metadata($ID, $meta); echo "metaUpdate(): finished".NL; return true; @@ -228,88 +229,10 @@ function metaUpdate(){ * @link https://www.google.com/webmasters/sitemaps/docs/en/about.html */ function runSitemapper(){ - global $conf; print "runSitemapper(): started".NL; - if(!$conf['sitemap']) return false; - - if($conf['compression'] == 'bz2' || $conf['compression'] == 'gz'){ - $sitemap = 'sitemap.xml.gz'; - }else{ - $sitemap = 'sitemap.xml'; - } - print "runSitemapper(): using $sitemap".NL; - - if(@file_exists(DOKU_INC.$sitemap)){ - if(!is_writable(DOKU_INC.$sitemap)) return false; - }else{ - if(!is_writable(DOKU_INC)) return false; - } - - if(@filesize(DOKU_INC.$sitemap) && - @filemtime(DOKU_INC.$sitemap) > (time()-($conf['sitemap']*60*60*24))){ - print 'runSitemapper(): Sitemap up to date'.NL; - return false; - } - - $pages = idx_getIndex('page', ''); - print 'runSitemapper(): creating sitemap using '.count($pages).' pages'.NL; - - // build the sitemap - ob_start(); - print '<?xml version="1.0" encoding="UTF-8"?>'.NL; - print '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'.NL; - foreach($pages as $id){ - $id = trim($id); - $file = wikiFN($id); - - //skip hidden, non existing and restricted files - if(isHiddenPage($id)) continue; - $date = @filemtime($file); - if(!$date) continue; - if(auth_aclcheck($id,'','') < AUTH_READ) continue; - - print ' <url>'.NL; - print ' <loc>'.wl($id,'',true).'</loc>'.NL; - print ' <lastmod>'.date_iso8601($date).'</lastmod>'.NL; - print ' </url>'.NL; - } - print '</urlset>'.NL; - $data = ob_get_contents(); - ob_end_clean(); - - //save the new sitemap - io_saveFile(DOKU_INC.$sitemap,$data); - - //ping search engines... - $http = new DokuHTTPClient(); - $http->timeout = 8; - - //ping google - print 'runSitemapper(): pinging google'.NL; - $url = 'http://www.google.com/webmasters/sitemaps/ping?sitemap='; - $url .= urlencode(DOKU_URL.$sitemap); - $resp = $http->get($url); - if($http->error) print 'runSitemapper(): '.$http->error.NL; - print 'runSitemapper(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp)).NL; - - //ping yahoo - print 'runSitemapper(): pinging yahoo'.NL; - $url = 'http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=dokuwiki&url='; - $url .= urlencode(DOKU_URL.$sitemap); - $resp = $http->get($url); - if($http->error) print 'runSitemapper(): '.$http->error.NL; - print 'runSitemapper(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp)).NL; - - //ping microsoft - print 'runSitemapper(): pinging microsoft'.NL; - $url = 'http://www.bing.com/webmaster/ping.aspx?siteMap='; - $url .= urlencode(DOKU_URL.$sitemap); - $resp = $http->get($url); - if($http->error) print 'runSitemapper(): '.$http->error.NL; - print 'runSitemapper(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp)).NL; - + $result = Sitemapper::generate() && Sitemapper::pingSearchEngines(); print 'runSitemapper(): finished'.NL; - return true; + return $result; } /** @@ -405,21 +328,6 @@ function sendDigest() { } /** - * Formats a timestamp as ISO 8601 date - * - * @author <ungu at terong dot com> - * @link http://www.php.net/manual/en/function.date.php#54072 - */ -function date_iso8601($int_date) { - //$int_date: current date in UNIX timestamp - $date_mod = date('Y-m-d\TH:i:s', $int_date); - $pre_timezone = date('O', $int_date); - $time_zone = substr($pre_timezone, 0, 3).":".substr($pre_timezone, 3, 2); - $date_mod .= $time_zone; - return $date_mod; -} - -/** * Just send a 1x1 pixel blank gif to the browser * * @author Andreas Gohr <andi@splitbrain.org> diff --git a/lib/exe/js.php b/lib/exe/js.php index dbef6e073..f9682e1e9 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -117,7 +117,7 @@ function js_out(){ js_runonstart('scrollToMarker()'); js_runonstart('focusMarker()'); // init hotkeys - must have been done after init of toolbar - js_runonstart('initializeHotkeys()'); +# disabled for FS#1958 js_runonstart('initializeHotkeys()'); // end output buffering and get contents $js = ob_get_contents(); diff --git a/lib/images/fileicons/gif.png b/lib/images/fileicons/gif.png Binary files differindex b4c07a912..aa4cc23a5 100644 --- a/lib/images/fileicons/gif.png +++ b/lib/images/fileicons/gif.png diff --git a/lib/images/fileicons/html.png b/lib/images/fileicons/html.png Binary files differindex 672cbce42..1a6812185 100644 --- a/lib/images/fileicons/html.png +++ b/lib/images/fileicons/html.png diff --git a/lib/images/fileicons/jpg.png b/lib/images/fileicons/jpg.png Binary files differindex 1fb6cc1fb..aa4cc23a5 100644 --- a/lib/images/fileicons/jpg.png +++ b/lib/images/fileicons/jpg.png diff --git a/lib/images/fileicons/odg.png b/lib/images/fileicons/odg.png Binary files differindex 434f18262..74f6303d3 100644 --- a/lib/images/fileicons/odg.png +++ b/lib/images/fileicons/odg.png diff --git a/lib/images/fileicons/odp.png b/lib/images/fileicons/odp.png Binary files differindex a5c77f845..2a94290d7 100644 --- a/lib/images/fileicons/odp.png +++ b/lib/images/fileicons/odp.png diff --git a/lib/images/fileicons/ods.png b/lib/images/fileicons/ods.png Binary files differindex 2ab1273f0..47f65c84d 100644 --- a/lib/images/fileicons/ods.png +++ b/lib/images/fileicons/ods.png diff --git a/lib/images/fileicons/png.png b/lib/images/fileicons/png.png Binary files differindex f0b5b00ee..aa4cc23a5 100644 --- a/lib/images/fileicons/png.png +++ b/lib/images/fileicons/png.png diff --git a/lib/images/fileicons/sxc.png b/lib/images/fileicons/sxc.png Binary files differindex 419c183c1..47f65c84d 100644 --- a/lib/images/fileicons/sxc.png +++ b/lib/images/fileicons/sxc.png diff --git a/lib/images/fileicons/sxd.png b/lib/images/fileicons/sxd.png Binary files differindex 5801bb23a..74f6303d3 100644 --- a/lib/images/fileicons/sxd.png +++ b/lib/images/fileicons/sxd.png diff --git a/lib/images/fileicons/sxw.png b/lib/images/fileicons/sxw.png Binary files differindex 6da97beb3..b0c21fc1f 100644 --- a/lib/images/fileicons/sxw.png +++ b/lib/images/fileicons/sxw.png diff --git a/lib/images/fileicons/tgz.png b/lib/images/fileicons/tgz.png Binary files differindex 141acf564..2426bd169 100644 --- a/lib/images/fileicons/tgz.png +++ b/lib/images/fileicons/tgz.png diff --git a/lib/plugins/acl/lang/ko/lang.php b/lib/plugins/acl/lang/ko/lang.php index 43a5ceeeb..6f4e991cb 100644 --- a/lib/plugins/acl/lang/ko/lang.php +++ b/lib/plugins/acl/lang/ko/lang.php @@ -10,6 +10,7 @@ * @author dongnak@gmail.com * @author Song Younghwan <purluno@gmail.com> * @author SONG Younghwan <purluno@gmail.com> + * @author Seung-Chul Yoo <dryoo@live.com> */ $lang['admin_acl'] = '접근 제어 목록 관리'; $lang['acl_group'] = '그룹'; diff --git a/lib/plugins/acl/lang/zh/lang.php b/lib/plugins/acl/lang/zh/lang.php index e806ad434..d79a78089 100644 --- a/lib/plugins/acl/lang/zh/lang.php +++ b/lib/plugins/acl/lang/zh/lang.php @@ -10,6 +10,7 @@ * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> + * @author caii <zhoucaiqi@gmail.com> */ $lang['admin_acl'] = '访问控制列表(ACL)管理器'; $lang['acl_group'] = '组'; diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 49712b73f..d245d3fce 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -109,7 +109,11 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { elseif ($this->_changed) ptln('<div class="success">'.$this->getLang('updated').'</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('<input type="hidden" name="id" value="'.$ID.'" />'); formSecurityToken(); $this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki')); diff --git a/lib/plugins/config/lang/cs/intro.txt b/lib/plugins/config/lang/cs/intro.txt index bad92ac8e..63381b84e 100644 --- a/lib/plugins/config/lang/cs/intro.txt +++ b/lib/plugins/config/lang/cs/intro.txt @@ -2,7 +2,7 @@ Tuto stránku můžete používat ke správě nastavení vaší instalace DokuWiki. Nápovědu pro konkrétní položky nastavení naleznete na [[doku>config]]. Pro další detaily o tomto pluginu viz [[doku>plugin:config]]. -Položky se světle červeným pozadím jsou chráněné a nelze je upravovat tímto pluginem. Položky s modrým pozadím jsou výchozí hodnoty a položky s bílým pozadím byly nastaveny lokálně v této konktétní instalaci. Modré i bílé položky je možné upravovat. +Položky se světle červeným pozadím jsou chráněné a nelze je upravovat tímto pluginem. Položky s modrým pozadím jsou výchozí hodnoty a položky s bílým pozadím byly nastaveny lokálně v této konkrétní instalaci. Modré i bílé položky je možné upravovat. Než opustíte tuto stránku, nezapomeňte stisknout tlačítko **Uložit**, jinak budou změny ztraceny. diff --git a/lib/plugins/config/lang/cs/lang.php b/lib/plugins/config/lang/cs/lang.php index 3f8c05f26..06839c1d0 100644 --- a/lib/plugins/config/lang/cs/lang.php +++ b/lib/plugins/config/lang/cs/lang.php @@ -11,7 +11,7 @@ */ $lang['menu'] = 'Správa nastavení'; $lang['error'] = 'Nastavení nebyla změněna kvůli alespoň jedné neplatné položce, -zkotrolujte prosím své úpravy a odešlete je znovu.<br /> +zkontrolujte prosím své úpravy a odešlete je znovu.<br /> Neplatné hodnoty se zobrazí v červeném rámečku.'; $lang['updated'] = 'Nastavení byla úspěšně upravena.'; $lang['nochoice'] = '(nejsou k dispozici žádné další volby)'; @@ -69,10 +69,10 @@ $lang['useheading'] = 'Používat první nadpis jako název stránky' $lang['refcheck'] = 'Kontrolovat odkazy na média (před vymazáním)'; $lang['refshow'] = 'Počet zobrazených odkazů na média'; $lang['allowdebug'] = 'Povolit debugování. <b>Vypněte, pokud to nepotřebujete!</b>'; -$lang['usewordblock'] = 'Blokovat spam za použítí seznamu známých spamových slov'; +$lang['usewordblock'] = 'Blokovat spam za použití seznamu známých spamových slov'; $lang['indexdelay'] = 'Časová prodleva před indexací (v sekundách)'; $lang['relnofollow'] = 'Používat rel="nofollow" na externí odkazy'; -$lang['mailguard'] = 'Metoda "zamaskování" emailových addres'; +$lang['mailguard'] = 'Metoda "zamaskování" emailových adres'; $lang['iexssprotect'] = 'Zkontrolovat nahrané soubory vůči možnému škodlivému JavaScriptu či HTML'; $lang['showuseras'] = 'Co se má přesně zobrazit, když se ukazuje uživatel, který naposledy editoval stránku'; $lang['useacl'] = 'Používat přístupová práva (ACL)'; @@ -95,7 +95,7 @@ vnořené jmenné prostory, k nimž právo má, budou přesto skryty. To může mít za následek, že index bude při některých nastaveních ACL nepoužitelný.'; $lang['auth_security_timeout'] = 'Časový limit pro autentikaci (v sekundách)'; -$lang['securecookie'] = 'Má prohlížeč posílat cookies nastavené přes HTTPS opět jen přes HTTPS? Vypňete tuto volbu, pokud chcete, aby bylo pomocí SSL zabezpečeno pouze přihlašování do wiki, ale obsah budete prohlížet nezabezpečeně.'; +$lang['securecookie'] = 'Má prohlížeč posílat cookies nastavené přes HTTPS opět jen přes HTTPS? Vypněte tuto volbu, pokud chcete, aby bylo pomocí SSL zabezpečeno pouze přihlašování do wiki, ale obsah budete prohlížet nezabezpečeně.'; $lang['xmlrpc'] = 'Povolit/Zakázat rozhraní XML-RPC.'; $lang['xmlrpcuser'] = 'Omezit přístup pomocí XML-RPC pouze na zde zadané skupiny či uživatele (oddělené čárkami). Necháte-li pole prázdné, dáte přístup komukoliv.'; $lang['updatecheck'] = 'Kontrolovat aktualizace a bezpečnostní varování? DokuWiki potřebuje pro tuto funkci přístup k splitbrain.org'; @@ -112,7 +112,7 @@ $lang['locktime'] = 'Maximální životnost zámkových souborů (v $lang['fetchsize'] = 'Maximální velikost souboru (v bajtech), co ještě fetch.php bude stahovat z externích zdrojů'; $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'] = 'Emailová addresa, která se bude používat pro automatické maily'; +$lang['mailfrom'] = 'Emailová adresa, která se bude používat pro automatické maily'; $lang['gzip_output'] = 'Používat pro xhtml Content-Encoding gzip'; $lang['gdlib'] = 'Verze GD knihovny'; $lang['im_convert'] = 'Cesta k nástroji convert z balíku ImageMagick'; diff --git a/lib/plugins/config/lang/eu/lang.php b/lib/plugins/config/lang/eu/lang.php index 380b00971..a50bd6d4e 100644 --- a/lib/plugins/config/lang/eu/lang.php +++ b/lib/plugins/config/lang/eu/lang.php @@ -91,6 +91,7 @@ $lang['useslash'] = 'Erabili barra (/) izen-espazio banatzaile modu $lang['usedraft'] = 'Automatikoki zirriborroa gorde editatze garaian'; $lang['sepchar'] = 'Orri izenaren hitz banatzailea'; $lang['canonical'] = 'Erabili URL erabat kanonikoak'; +$lang['fnencode'] = 'Non-ASCII fitxategi izenak kodetzeko metodoa.'; $lang['autoplural'] = 'Kontrolatu forma pluralak esteketan'; $lang['compression'] = 'Trinkotze metodoa attic fitxategientzat'; $lang['cachetime'] = 'Adin maximoa cachearentzat (seg)'; @@ -104,6 +105,7 @@ $lang['gdlib'] = 'GD Lib bertsioa'; $lang['im_convert'] = 'ImageMagick-en aldaketa tresnara bidea'; $lang['jpg_quality'] = 'JPG konprimitze kalitatea (0-100)'; $lang['subscribers'] = 'Gaitu orri harpidetza euskarria'; +$lang['subscribe_time'] = 'Harpidetza zerrendak eta laburpenak bidali aurretik pasa beharreko denbora (seg); Denbora honek, recent_days-en ezarritakoa baino txikiagoa behar luke.'; $lang['compress'] = 'Trinkotu CSS eta javascript irteera'; $lang['hidepages'] = 'Ezkutatu kointzidentziak dituzten orriak (espresio erregularrak)'; $lang['send404'] = 'Bidali "HTTP 404/Ez Da Orria Aurkitu" existitzen ez diren orrientzat'; @@ -130,6 +132,7 @@ $lang['proxy____port'] = 'Proxy portua'; $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'; @@ -177,3 +180,4 @@ $lang['useheading_o_0'] = 'Inoiz'; $lang['useheading_o_navigation'] = 'Nabigazioa Bakarrik'; $lang['useheading_o_content'] = 'Wiki Edukia Bakarrik'; $lang['useheading_o_1'] = 'Beti'; +$lang['readdircache'] = 'Aintzintasun maximoa readdir cache-rentzat (seg)'; diff --git a/lib/plugins/config/lang/ko/lang.php b/lib/plugins/config/lang/ko/lang.php index efac643ab..13f5efefe 100644 --- a/lib/plugins/config/lang/ko/lang.php +++ b/lib/plugins/config/lang/ko/lang.php @@ -7,6 +7,7 @@ * @author dongnak@gmail.com * @author Song Younghwan <purluno@gmail.com> * @author SONG Younghwan <purluno@gmail.com> + * @author Seung-Chul Yoo <dryoo@live.com> */ $lang['menu'] = '환경 설정'; $lang['error'] = '잘못된 값때문에 설정들을 변경할 수 없습니다. 수정한 값들을 검사하고 확인을 누르기 바랍니다. @@ -89,12 +90,15 @@ $lang['sneaky_index'] = '기본적으로, DokuWiki는 색인 목록에 특정 ACL 설정은 색인 사용이 불가능하게 할 수도 있습니다.'; $lang['auth_security_timeout'] = '인증 보안 초과 시간(초)'; $lang['securecookie'] = 'HTTPS로 보내진 쿠키는 HTTPS에만 적용 할까요? 위키의 로그인 페이지만 SSL로 암호화 하고 위키 페이지는 그렇지 않은경우 꺼야 합니다.'; +$lang['xmlrpc'] = 'XML-RPC 인터페이스 지원/무시'; +$lang['xmlrpcuser'] = '주어진 그룹이나 유저들에게만 XML-RPC접근을 허락하려면 컴마로 구분하여 적으세요. 비어두면 모두에게 허용됩니다.'; $lang['updatecheck'] = '업데이트와 보안 문제를 검사(DokuWiki를 splitbrain.org에 연결해야 합니다.)'; $lang['userewrite'] = 'URL rewriting기능 사용'; $lang['useslash'] = 'URL에서 네임스페이스 구분자로 슬래쉬 문자 사용'; $lang['usedraft'] = '편집하는 동안 자동으로 문서 초안 저장'; $lang['sepchar'] = '페이지 이름 단어 구분자'; $lang['canonical'] = '완전한 canonical URL 사용'; +$lang['fnencode'] = '아스키가 아닌 파일이르믈 인코딩 하는 방법.'; $lang['autoplural'] = '링크 연결시 plural폼 검사'; $lang['compression'] = 'attic파일 압축 방법 선택'; $lang['cachetime'] = '최대 캐쉬 생존 시간(초)'; @@ -108,6 +112,7 @@ $lang['gdlib'] = 'GD 라이브러리 버전'; $lang['im_convert'] = 'ImageMagick 위치'; $lang['jpg_quality'] = 'JPG 압축 품질 (0-100)'; $lang['subscribers'] = '페이지 갱신 알람 기능'; +$lang['subscribe_time'] = ' 구독 목록과 요약이 보내질 경과 시간 (초); 이 것은 recent_days에서 설정된 시간보다 작아야 합니다.'; $lang['compress'] = '최적화된 CSS, javascript 출력'; $lang['hidepages'] = '매칭된 페이지 숨기기(정규표현식)'; $lang['send404'] = '존재하지 않는 페이지에 대해 "HTTP 404/Page Not Found" 응답'; @@ -115,7 +120,6 @@ $lang['sitemap'] = '구글 사이트맵 생성(날짜)'; $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'] = '웹 서버 static 파일 전송 지원을 위해 X-Sendfile 헤더를 사용한다면 이 옵션을 사용합니다. 웹 서버가 이 기능을 지원해야 합니다.'; -$lang['xmlrpc'] = 'XML-RPC 인터페이스 지원/무시'; $lang['renderer_xhtml'] = '주 (xhtml) 위키 출력 처리기'; $lang['renderer__core'] = '%s (DokuWiki 내부 기능)'; $lang['renderer__plugin'] = '%s (DokuWiki 플러그인)'; @@ -136,6 +140,7 @@ $lang['proxy____port'] = '프록시 서버 포트'; $lang['proxy____user'] = '프록시 사용자 이름'; $lang['proxy____pass'] = '프록시 패스워드'; $lang['proxy____ssl'] = '프록시 연결시 ssl사용'; +$lang['proxy____except'] = '프록시설정이 무시될 URL주소들의 RegEx형식표현'; $lang['safemodehack'] = 'safemode hack기능 사용'; $lang['ftp____host'] = 'safemode hack의 FTP 서버'; $lang['ftp____port'] = 'safemode hack의 FTP port'; @@ -183,3 +188,4 @@ $lang['useheading_o_0'] = '아니요'; $lang['useheading_o_navigation'] = '네비게이션에만'; $lang['useheading_o_content'] = '위키 내용에만'; $lang['useheading_o_1'] = '항상'; +$lang['readdircache'] = 'readdir 캐쉬를 위한 최대 시간 (초)'; diff --git a/lib/plugins/config/lang/zh/lang.php b/lib/plugins/config/lang/zh/lang.php index 6345451d5..0419968c7 100644 --- a/lib/plugins/config/lang/zh/lang.php +++ b/lib/plugins/config/lang/zh/lang.php @@ -10,6 +10,7 @@ * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> + * @author caii <zhoucaiqi@gmail.com> */ $lang['menu'] = '配置设置'; $lang['error'] = '由于非法参数,设置没有更新。请检查您做的改动并重新提交。 @@ -115,7 +116,7 @@ $lang['jpg_quality'] = 'JPG 压缩质量(0-100)'; $lang['subscribers'] = '启用页面订阅支持'; $lang['subscribe_time'] = '订阅列表和摘要发送的时间间隔(秒);这应当小于指定的最近更改保留时间(recent_days)。 '; -$lang['compress'] = '使 CSS 和 javascript 输出更紧密'; +$lang['compress'] = '使 CSS 和 javascript 的输出更紧密'; $lang['hidepages'] = '隐藏匹配的界面(正则表达式)'; $lang['send404'] = '发送 "HTTP 404/页面没有找到" 错误信息给不存在的页面'; $lang['sitemap'] = '生成 Google sitemap(天)'; diff --git a/lib/plugins/plugin/classes/ap_manage.class.php b/lib/plugins/plugin/classes/ap_manage.class.php index 656b4762b..2982a3ebb 100644 --- a/lib/plugins/plugin/classes/ap_manage.class.php +++ b/lib/plugins/plugin/classes/ap_manage.class.php @@ -121,7 +121,7 @@ class ap_manage { // update latest plugin date - FIXME global $ID; - send_redirect(wl($ID,array('do'=>'admin','page'=>'plugin'),true)); + send_redirect(wl($ID,array('do'=>'admin','page'=>'plugin'),true, '&')); } /** diff --git a/lib/plugins/plugin/lang/cs/lang.php b/lib/plugins/plugin/lang/cs/lang.php index c15a5ca21..54de0ff18 100644 --- a/lib/plugins/plugin/lang/cs/lang.php +++ b/lib/plugins/plugin/lang/cs/lang.php @@ -26,7 +26,7 @@ $lang['source'] = 'Zdroj:'; $lang['unknown'] = 'neznámý'; $lang['updating'] = 'Aktualizuji ...'; $lang['updated'] = 'Modul %s úspěšně aktualizován'; -$lang['updates'] = 'Následjící pluginy byly úspěšně aktualizovány'; +$lang['updates'] = 'Následující pluginy byly úspěšně aktualizovány'; $lang['update_none'] = 'Žádné aktualizace nenalezeny.'; $lang['deleting'] = 'Probíhá mazání ...'; $lang['deleted'] = 'Plugin %s smazán.'; @@ -49,7 +49,7 @@ $lang['error_download'] = 'Nelze stáhnout soubor s pluginem: %s'; $lang['error_badurl'] = 'URL je zřejmě chybná - nelze z ní určit název souboru'; $lang['error_dircreate'] = 'Nelze vytvořit dočasný adresář ke stažení dat'; $lang['error_decompress'] = 'Správce pluginů nemůže rozbalit stažený soubor. Toto může být způsobeno chybou při stahování. Můžete se pokusit stahování opakovat. Chyba může být také v kompresním formátu souboru. V tom případě bude nutné stáhnout a nainstalovat plugin ručně.'; -$lang['error_copy'] = 'Došlo k chybě při instalaci pluginu <em>%s</em>. Je možné, že na disku není volné místo, nebo mohou být špatně nastavena přístupová práva. Pozor, mohlo dojít k častečné a tudíž chybné instalaci pluginu a tím může být ohrožena stabilita wiki.'; +$lang['error_copy'] = 'Došlo k chybě při instalaci pluginu <em>%s</em>. Je možné, že na disku není volné místo, nebo mohou být špatně nastavena přístupová práva. Pozor, mohlo dojít k částečné a tudíž chybné instalaci pluginu a tím může být ohrožena stabilita wiki.'; $lang['error_delete'] = 'Došlo k chybě při pokusu o smazání pluginu <em>%s</em>. Nejspíše je chyba v nastavení přístupových práv k některým souborům či adresářům.'; $lang['enabled'] = 'Plugin %s aktivován.'; $lang['notenabled'] = 'Plugin %s nelze aktivovat, zkontrolujte práva k souborům.'; diff --git a/lib/plugins/plugin/lang/ko/lang.php b/lib/plugins/plugin/lang/ko/lang.php index af14a0cd2..72c04ddab 100644 --- a/lib/plugins/plugin/lang/ko/lang.php +++ b/lib/plugins/plugin/lang/ko/lang.php @@ -7,6 +7,7 @@ * @author dongnak@gmail.com * @author Song Younghwan <purluno@gmail.com> * @author SONG Younghwan <purluno@gmail.com> + * @author Seung-Chul Yoo <dryoo@live.com> */ $lang['menu'] = '플러그인 관리자'; $lang['download'] = '새로운 플러그인 다운로드 및 설치'; diff --git a/lib/plugins/plugin/lang/zh/lang.php b/lib/plugins/plugin/lang/zh/lang.php index d5b456604..af2db4ee5 100644 --- a/lib/plugins/plugin/lang/zh/lang.php +++ b/lib/plugins/plugin/lang/zh/lang.php @@ -10,6 +10,7 @@ * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> + * @author caii <zhoucaiqi@gmail.com> */ $lang['menu'] = '插件管理器'; $lang['download'] = '下载并安装新的插件'; @@ -51,7 +52,7 @@ $lang['error_dircreate'] = '无法创建用于接收下载文件的'; $lang['error_decompress'] = '插件管理器无法解压下载的文件。这可能是由于下载出现错误,遇到这种情况,请您再次尝试;或者是压缩格式无法识别,遇到这种情况,您需要手动下载并安装该插件。'; $lang['error_copy'] = '尝试安装插件 <em>%s</em> 的相关文件时产生一个复制错误:磁盘空间已满或文件访问权限错误。这可能是由于一个安装了一部分的插件,并使得您的维基系统不稳定。'; $lang['error_delete'] = '尝试删除插件 <em>%s</em> 时产生一个错误。最有可能的情况是文件或路径的访问权限不够'; -$lang['enabled'] = '%s 插件开'; -$lang['notenabled'] = '%s插件打开失败,请检查文件权限。'; -$lang['disabled'] = '%s 插件关'; -$lang['notdisabled'] = '%s插件关闭失败,请检查文件权限。'; +$lang['enabled'] = '%s 插件启用'; +$lang['notenabled'] = '%s插件启用失败,请检查文件权限。'; +$lang['disabled'] = '%s 插件禁用'; +$lang['notdisabled'] = '%s插件禁用失败,请检查文件权限。'; diff --git a/lib/plugins/popularity/lang/cs/intro.txt b/lib/plugins/popularity/lang/cs/intro.txt index 70cf1a42c..4b386568a 100644 --- a/lib/plugins/popularity/lang/cs/intro.txt +++ b/lib/plugins/popularity/lang/cs/intro.txt @@ -1,6 +1,6 @@ ===== Průzkum používání ===== -Tento nástroj jednorázově shromáží anonymní data o vaší wiki a umožní vám odeslat je vývojářům DokuWiki. To jim pomůže lépe porozumět, jak uživatelé DokuWiki používají, a jejich rozhodnutí při dalším vývoji budou založena na statistikách z reálného používání DokuWiki. +Tento nástroj jednorázově shromáždí anonymní data o vaší wiki a umožní vám odeslat je vývojářům DokuWiki. To jim pomůže lépe porozumět, jak uživatelé DokuWiki používají, a jejich rozhodnutí při dalším vývoji budou založena na statistikách z reálného používání DokuWiki. Chcete-li pomoci vývojářům, čas od času, jak vaše wiki poroste, použijte tento nástroj. Vaše data budou pokaždé označena stejným anonymním identifikátorem. diff --git a/lib/plugins/popularity/lang/ko/lang.php b/lib/plugins/popularity/lang/ko/lang.php index 3a28b1b0e..91d798a5f 100644 --- a/lib/plugins/popularity/lang/ko/lang.php +++ b/lib/plugins/popularity/lang/ko/lang.php @@ -6,6 +6,7 @@ * @author dongnak@gmail.com * @author Song Younghwan <purluno@gmail.com> * @author SONG Younghwan <purluno@gmail.com> + * @author Seung-Chul Yoo <dryoo@live.com> */ $lang['name'] = '인기도 조사 (불러오는데 시간이 걸릴 수 있습니다.)'; $lang['submit'] = '자료 보내기'; diff --git a/lib/plugins/popularity/lang/zh/lang.php b/lib/plugins/popularity/lang/zh/lang.php index ee13b9f77..191b9c1af 100644 --- a/lib/plugins/popularity/lang/zh/lang.php +++ b/lib/plugins/popularity/lang/zh/lang.php @@ -9,6 +9,7 @@ * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> + * @author caii <zhoucaiqi@gmail.com> */ $lang['name'] = '人气反馈(载入可能需要一些时间)'; $lang['submit'] = '发送数据'; diff --git a/lib/plugins/revert/lang/cs/intro.txt b/lib/plugins/revert/lang/cs/intro.txt index bbc0df25a..1e1cd0fd8 100644 --- a/lib/plugins/revert/lang/cs/intro.txt +++ b/lib/plugins/revert/lang/cs/intro.txt @@ -1,3 +1,3 @@ ====== Obnova zaspamovaných stránek ====== -Tato stránka pomůže při automatické obnově po spamovém útoku. Pro nalezení seznamu zaspamovaných stránek nedřív zadejte hledaný výraz (např. spamové URL) a pak potvrďte, že nalezené stránky opravdu obsahují spam a mohou být obnoveny. +Tato stránka pomůže při automatické obnově po spamovém útoku. Pro nalezení seznamu zaspamovaných stránek nejdříve zadejte hledaný výraz (např. spamové URL) a pak potvrďte, že nalezené stránky opravdu obsahují spam a mohou být obnoveny. diff --git a/lib/plugins/revert/lang/ko/lang.php b/lib/plugins/revert/lang/ko/lang.php index 5e070de92..0163d2754 100644 --- a/lib/plugins/revert/lang/ko/lang.php +++ b/lib/plugins/revert/lang/ko/lang.php @@ -6,6 +6,7 @@ * @author dongnak@gmail.com * @author Song Younghwan <purluno@gmail.com> * @author SONG Younghwan <purluno@gmail.com> + * @author Seung-Chul Yoo <dryoo@live.com> */ $lang['menu'] = '복구 관리자'; $lang['filter'] = '스팸 페이지 검색 '; diff --git a/lib/plugins/revert/lang/zh/lang.php b/lib/plugins/revert/lang/zh/lang.php index 36c8267d6..5ff1ed426 100644 --- a/lib/plugins/revert/lang/zh/lang.php +++ b/lib/plugins/revert/lang/zh/lang.php @@ -10,6 +10,7 @@ * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> + * @author caii <zhoucaiqi@gmail.com> */ $lang['menu'] = '还原管理器'; $lang['filter'] = '搜索包含垃圾信息的页面'; diff --git a/lib/plugins/usermanager/lang/cs/lang.php b/lib/plugins/usermanager/lang/cs/lang.php index 9c5a2abc9..7d8e4599d 100644 --- a/lib/plugins/usermanager/lang/cs/lang.php +++ b/lib/plugins/usermanager/lang/cs/lang.php @@ -45,7 +45,7 @@ $lang['edit_usermissing'] = 'Vybraný uživatel nebyl nalezen, zadané uži $lang['user_notify'] = 'Upozornit uživatele'; $lang['note_notify'] = 'Maily s upozorněním se budou posílat pouze, když uživatel dostává nové heslo.'; $lang['note_group'] = 'Noví uživatelé budou přidáváni do této výchozí skupiny (%s), pokud pro ně není uvedena žádná skupina.'; -$lang['note_pass'] = 'Heslo bude automaticky vygenerováno pokud je pole ponacháno prázdné a je zapnutá notifikace uživatele.'; +$lang['note_pass'] = 'Heslo bude automaticky vygenerováno pokud je pole ponecháno prázdné a je zapnutá notifikace uživatele.'; $lang['add_ok'] = 'Uživatel úspěšně vytvořen'; $lang['add_fail'] = 'Vytvoření uživatele selhalo'; $lang['notify_ok'] = 'Odeslán mail s upozorněním'; diff --git a/lib/plugins/usermanager/lang/ko/lang.php b/lib/plugins/usermanager/lang/ko/lang.php index eeb8eb791..f2322414a 100644 --- a/lib/plugins/usermanager/lang/ko/lang.php +++ b/lib/plugins/usermanager/lang/ko/lang.php @@ -6,6 +6,7 @@ * @author dongnak@gmail.com * @author Song Younghwan <purluno@gmail.com> * @author SONG Younghwan <purluno@gmail.com> + * @author Seung-Chul Yoo <dryoo@live.com> */ $lang['menu'] = '사용자 관리자'; $lang['noauth'] = '(사용자 인증이 불가능합니다.)'; diff --git a/lib/plugins/usermanager/lang/zh/lang.php b/lib/plugins/usermanager/lang/zh/lang.php index bae5454d4..5836d3346 100644 --- a/lib/plugins/usermanager/lang/zh/lang.php +++ b/lib/plugins/usermanager/lang/zh/lang.php @@ -9,6 +9,7 @@ * @author mr.jinyi@gmail.com * @author ben <ben@livetom.com> * @author lainme <lainme993@gmail.com> + * @author caii <zhoucaiqi@gmail.com> */ $lang['menu'] = '用户管理器'; $lang['noauth'] = '(用户认证不可用)'; diff --git a/lib/scripts/media.js b/lib/scripts/media.js index c8ddfa40a..b90f7047b 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -206,7 +206,7 @@ var media_manager = { media_manager.id = id; if(!opener){ // if we don't run in popup display example - var ex = $('ex_'+id.replace(/:/g,'_')); + var ex = $('ex'+id.replace(/:/g,'_')); if(ex.style.display == ''){ ex.style.display = 'none'; } else { @@ -234,21 +234,11 @@ var media_manager = { media_manager.popup.style.top = event.pageY + 'px'; // set all buttons to outset - media_manager.outSet('media__linkbtn1'); - media_manager.outSet('media__linkbtn2'); - media_manager.outSet('media__linkbtn3'); - media_manager.outSet('media__linkbtn4'); - - media_manager.outSet('media__alignbtn0'); - media_manager.outSet('media__alignbtn1'); - media_manager.outSet('media__alignbtn2'); - media_manager.outSet('media__alignbtn3'); - - media_manager.outSet('media__sizebtn1'); - media_manager.outSet('media__sizebtn2'); - media_manager.outSet('media__sizebtn3'); - media_manager.outSet('media__sizebtn4'); - + for (var i = 1; i < 5; i++) { + media_manager.outSet('media__linkbtn' + i); + media_manager.outSet('media__alignbtn' + i); + media_manager.outSet('media__sizebtn' + i); + } if (ext == '.swf') { media_manager.ext = 'swf'; @@ -258,7 +248,7 @@ var media_manager = { $('media__linkbtn2').style.display = 'none'; // set the link button to default - if (media_manager.link != false) { + if (media_manager.link !== false) { if ( media_manager.link == '2' || media_manager.link == '1') { media_manager.inSet('media__linkbtn3'); media_manager.link = '3'; @@ -285,6 +275,11 @@ var media_manager = { // disable button for original size $('media__sizebtn4').style.display = 'none'; + if (media_manager.size == 4) { + media_manager.size = 2; + DokuCookie.setValue('size', '2'); + media_manager.inSet('media__sizebtn2'); + } } else { media_manager.ext = 'img'; @@ -298,7 +293,7 @@ var media_manager = { if (DokuCookie.getValue('link')) { media_manager.link = DokuCookie.getValue('link'); } - if (media_manager.link == false) { + if (!media_manager.link) { // default case media_manager.link = '1'; DokuCookie.setValue('link','1'); @@ -316,23 +311,23 @@ var media_manager = { $('media__size').style.display = 'block'; // set the align button to default - if (media_manager.align != false) { + if (media_manager.align !== false) { media_manager.inSet('media__alignbtn'+media_manager.align); } else if (DokuCookie.getValue('align')) { media_manager.inSet('media__alignbtn'+DokuCookie.getValue('align')); media_manager.align = DokuCookie.getValue('align'); } else { // default case - media_manager.align = '0'; - media_manager.inSet('media__alignbtn0'); - DokuCookie.setValue('align','0'); + media_manager.align = '1'; + media_manager.inSet('media__alignbtn1'); + DokuCookie.setValue('align','1'); } // set the size button to default if (DokuCookie.getValue('size')) { media_manager.size = DokuCookie.getValue('size'); } - if (media_manager.size == false || (media_manager.size === '4' && ext === '.swf')) { + if (!media_manager.size || (media_manager.size === '4' && ext === '.swf')) { // default case media_manager.size = '2'; DokuCookie.setValue('size','2'); @@ -354,9 +349,10 @@ var media_manager = { media_manager.popup = document.createElement('div'); media_manager.popup.setAttribute('id','media__popup'); + media_manager.popup.style.display = 'none'; var root = document.getElementById('media__manager'); - if (root == null) return; + if (root === null) return; root.appendChild(media_manager.popup); var headline = document.createElement('h1'); @@ -386,8 +382,7 @@ var media_manager = { for (var i = 0 ; i < linkbtns.length ; ++i) { var linkbtn = document.createElement('button'); linkbtn.className = 'button'; - linkbtn.value = i + 1; - linkbtn.id = "media__linkbtn" + (i + 1); + linkbtn.id = "media__linkbtn" + (i+1); linkbtn.title = LANG['media' + linkbtns[i]]; linkbtn.style.borderStyle = 'outset'; addEvent(linkbtn,'click',function(event){ return media_manager.setlink(event,this); }); @@ -419,8 +414,7 @@ var media_manager = { var alignimg = document.createElement('img'); alignimg.src = DOKU_BASE + 'lib/images/media_align_' + alignbtns[n] + '.png'; - alignbtn.id = "media__alignbtn" + n; - alignbtn.value = n; + alignbtn.id = "media__alignbtn" + (n+1); alignbtn.title = LANG['media' + alignbtns[n]]; alignbtn.className = 'button'; alignbtn.appendChild(alignimg); @@ -454,7 +448,6 @@ var media_manager = { sizebtn.className = 'button'; sizebtn.appendChild(sizeimg); - sizebtn.value = size + 1; sizebtn.id = 'media__sizebtn' + (size + 1); sizebtn.title = LANG['media' + sizebtns[size]]; sizebtn.style.borderStyle = 'outset'; @@ -508,7 +501,7 @@ var media_manager = { optsstart = true; } - var s = parseInt(media_manager.size); + var s = parseInt(media_manager.size, 10); if (s && s >= 1) { opts += (optsstart)?'&':'?'; @@ -529,15 +522,15 @@ var media_manager = { } } } - if (media_manager.align == '1') { + if (media_manager.align == '2') { alignleft = ''; alignright = ' '; } - if (media_manager.align == '2') { + if (media_manager.align == '3') { alignleft = ' '; alignright = ' '; } - if (media_manager.align == '3') { + if (media_manager.align == '4') { alignleft = ' '; alignright = ''; } @@ -663,14 +656,15 @@ var media_manager = { * @author Dominik Eckelmann <eckelmann@cosmocode.de> */ setalign: function(event,cb){ - if(cb.value){ - DokuCookie.setValue('align',cb.value); - media_manager.align = cb.value; - media_manager.outSet("media__alignbtn0"); - media_manager.outSet("media__alignbtn1"); - media_manager.outSet("media__alignbtn2"); - media_manager.outSet("media__alignbtn3"); - media_manager.inSet("media__alignbtn"+cb.value); + + var id = cb.id.substring(cb.id.length -1); + if(id){ + DokuCookie.setValue('align',id); + media_manager.align = id; + for (var i = 1; i<=4; i++) { + media_manager.outSet("media__alignbtn" + i); + } + media_manager.inSet("media__alignbtn"+id); }else{ DokuCookie.setValue('align',''); media_manager.align = false; @@ -682,23 +676,34 @@ var media_manager = { * @author Dominik Eckelmann <eckelmann@cosmocode.de> */ setlink: function(event,cb){ - if(cb.value){ - DokuCookie.setValue('link',cb.value); - media_manager.link = cb.value; - media_manager.outSet("media__linkbtn1"); - media_manager.outSet("media__linkbtn2"); - media_manager.outSet("media__linkbtn3"); - media_manager.outSet("media__linkbtn4"); - media_manager.inSet("media__linkbtn"+cb.value); + var id = cb.id.substring(cb.id.length -1); + if(id){ + DokuCookie.setValue('link',id); + for (var i = 1; i<=4; i++) { + media_manager.outSet("media__linkbtn"+i); + } + media_manager.inSet("media__linkbtn"+id); + var size = document.getElementById("media__size"); var align = document.getElementById("media__align"); - if (cb.value != '4') { + if (id != '4') { size.style.display = "block"; align.style.display = "block"; + if (media_manager.link == '4') { + media_manager.align = '1'; + DokuCookie.setValue('align', '1'); + media_manager.inSet('media__alignbtn1'); + + media_manager.size = '2'; + DokuCookie.setValue('size', '2'); + media_manager.inSet('media__sizebtn2'); + } + } else { size.style.display = "none"; align.style.display = "none"; } + media_manager.link = id; }else{ DokuCookie.setValue('link',''); media_manager.link = false; @@ -747,13 +752,14 @@ var media_manager = { * @author Dominik Eckelmann <eckelmann@cosmocode.de> */ setsize: function(event,cb){ - if (cb.value) { - DokuCookie.setValue('size',cb.value); - media_manager.size = cb.value; - for (var i = 1 ; i <= 4 ; ++i) { + var id = cb.id.substring(cb.id.length -1); + if (id) { + DokuCookie.setValue('size',id); + media_manager.size = id; + for (var i = 1 ; i <=4 ; ++i) { media_manager.outSet("media__sizebtn" + i); } - media_manager.inSet("media__sizebtn"+cb.value); + media_manager.inSet("media__sizebtn"+id); } else { DokuCookie.setValue('size',''); media_manager.width = false; diff --git a/lib/styles/style.css b/lib/styles/style.css index 814191615..395f82b78 100644 --- a/lib/styles/style.css +++ b/lib/styles/style.css @@ -4,86 +4,98 @@ */ div.clearer { - clear: both; - line-height: 0; - height: 0; - overflow: hidden; + clear: both; + line-height: 0; + height: 0; + overflow: hidden; } div.no { - display: inline; - margin: 0; - padding: 0; + display: inline; + margin: 0; + padding: 0; } .hidden { - display: none; + display: none; +} + +/* messages with msg() */ +div.error, +div.info, +div.success, +div.notify { + color: #000; + background-repeat: no-repeat; + background-position: .5em 0; + border-bottom: 1px solid; + font-size: 90%; + margin: 0; + padding-left: 3em; + overflow: hidden; } div.error { - background: #fcc url(../images/error.png) 0.5em 0px no-repeat; - color: #000; - border-bottom: 1px solid #faa; - font-size: 90%; - margin: 0; - padding-left: 3em; - overflow: hidden; + background-color: #fcc; + background-image: url(../images/error.png); + border-bottom-color: #faa; } div.info { - background: #ccf url(../images/info.png) 0.5em 0px no-repeat; - color: #000; - border-bottom: 1px solid #aaf; - font-size: 90%; - margin: 0; - padding-left: 3em; - overflow: hidden; + background-color: #ccf; + background-image: url(../images/info.png); + border-bottom-color: #aaf; } div.success { - background: #cfc url(../images/success.png) 0.5em 0px no-repeat; - color: #000; - border-bottom: 1px solid #afa; - font-size: 90%; - margin: 0; - padding-left: 3em; - overflow: hidden; + background-color: #cfc; + background-image: url(../images/success.png); + border-bottom-color: #afa; } div.notify { - background: #ffc url(../images/notify.png) 0.5em 0px no-repeat; - color: #000; - border-bottom: 1px solid #ffa; - font-size: 90%; - margin: 0; - padding-left: 3em; - overflow: hidden; + background-color: #ffc; + background-image: url(../images/notify.png); + border-bottom-color: #ffa; } /* image alignment */ .medialeft { - float: left; + float: left; } .mediaright { - float: right; + float: right; } .mediacenter { - display: block; - margin-left: auto; - margin-right: auto; + display: block; + margin-left: auto; + margin-right: auto; } -.leftalign { text-align: left; } +/* table cell alignment */ +.leftalign { text-align: left; } .centeralign { text-align: center; } -.rightalign { text-align: right; } +.rightalign { text-align: right; } +/* underline */ em.u { - font-style: normal; - text-decoration: underline; + font-style: normal; + text-decoration: underline; } em em.u { - font-style: italic; + font-style: italic; +} + +/* modal windows */ +.JSpopup, +#link__wiz, +#media__popup { + position: absolute; + background-color: #fff; + color: #000; + z-index: 20; + overflow: hidden; } diff --git a/lib/tpl/default/_mediaoptions.css b/lib/tpl/default/_mediaoptions.css index 7ac489929..19e2c4853 100644 --- a/lib/tpl/default/_mediaoptions.css +++ b/lib/tpl/default/_mediaoptions.css @@ -5,7 +5,7 @@ display:none; border: 1px solid __border__; position: absolute; - width:270px; + width:280px; } #media__popup h1 { diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index d9231678b..754a6e482 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -29,7 +29,7 @@ if (!defined('DOKU_INC')) die(); <?php tpl_metaheaders()?> - <link rel="shortcut icon" href="<?php echo DOKU_TPL?>images/favicon.ico" /> + <link rel="shortcut icon" href="<?php echo tpl_getFavicon() ?>" /> <?php /*old includehook*/ @include(dirname(__FILE__).'/meta.html')?> </head> diff --git a/lib/tpl/default/print.css b/lib/tpl/default/print.css index 60c172585..15c6dad29 100644 --- a/lib/tpl/default/print.css +++ b/lib/tpl/default/print.css @@ -43,6 +43,14 @@ div.secedit { display: none; } +div.clearer { + clear: both; + line-height: 0; + height: 0; + overflow: hidden; +} + + /* --------------------- Text formating -------------------------------- */ /* external link */ @@ -114,6 +122,21 @@ img.mediaright { margin: 0 0 0 1.5em; } +img.mediacenter { + display: block; + margin-left: auto; + margin-right: auto; +} + +/* underline */ +em.u { + font-style: normal; + text-decoration: underline; +} +em em.u { + font-style: italic; +} + /* unordered lists */ ul { line-height: 1.5em; diff --git a/lib/tpl/default/rtl.css b/lib/tpl/default/rtl.css index f66a670e0..e40dd966d 100644 --- a/lib/tpl/default/rtl.css +++ b/lib/tpl/default/rtl.css @@ -145,3 +145,11 @@ div.dokuwiki blockquote { text-align: right; } +/* Search corrections */ +div.dokuwiki ul.search_quickhits li { + float: right; +} + +div#qsearch__out { + text-align: right; +} |