From c4f79b71351dd0d96f19f7c5629888d85a814c72 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Wed, 7 Apr 2010 11:31:50 +0200 Subject: Sitemap rewrite --- inc/actions.php | 57 +++++++++++++++++++++++++++-- inc/common.php | 15 ++++++++ inc/sitemap.php | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/exe/indexer.php | 98 ++------------------------------------------------ 4 files changed, 174 insertions(+), 97 deletions(-) create mode 100644 inc/sitemap.php diff --git a/inc/actions.php b/inc/actions.php index 3e0cb1207..2d70ac8ed 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -56,6 +56,10 @@ function act_dispatch(){ //check permissions $ACT = act_permcheck($ACT); + //sitemap + if ($ACT == 'sitemap') + $ACT = act_sitemap($ACT); + //register $nil = array(); if($ACT == 'register' && $_POST['save'] && register()){ @@ -205,7 +209,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 +237,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; @@ -586,6 +591,54 @@ function act_export($act){ return 'show'; } +/** + * Handle sitemap delivery + * + * @author Michael Hamann + */ +function act_sitemap($act) { + global $conf; + + if (!$conf['sitemap']) { + header("HTTP/1.0 404 Not Found"); + print "Sitemap generation is disabled."; + exit; + } + + $sitemap = $conf['cachedir'].'/sitemap.xml'; + if($conf['compression'] == 'bz2' || $conf['compression'] == 'gz'){ + $mime = 'application/x-gzip'; + $sitemap .= '.gz'; + } else { + $mime = 'application/xml; charset=utf-8'; + } + + // Check if sitemap file exists, otherwise create it + if (!is_readable($sitemap)) { + require_once DOKU_INC.'inc/sitemap.php'; + sitemapGenerate(); + } + + if (is_readable($sitemap)) { + // Send headers + header('Content-Type: '.$mime); + + // Send file + //use x-sendfile header to pass the delivery to compatible webservers + if (http_sendfile($sitemap)) exit; + + $fp = @fopen($sitemap,"rb"); + if($fp){ + http_rangeRequest($fp,filesize($sitemap),$mime); + exit; + } + } + + header("HTTP/1.0 500 Internal Server Error"); + print "Could not read $sitemap - bad permissions?"; + exit; +} + /** * Handle page 'subscribe' * diff --git a/inc/common.php b/inc/common.php index bf5987c28..0816d9fbb 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1266,6 +1266,21 @@ function dformat($dt=null,$format=''){ return strftime($format,$dt); } +/** + * Formats a timestamp as ISO 8601 date + * + * @author + * @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 * diff --git a/inc/sitemap.php b/inc/sitemap.php new file mode 100644 index 000000000..bbed7d269 --- /dev/null +++ b/inc/sitemap.php @@ -0,0 +1,101 @@ + + */ + +if(!defined('DOKU_INC')) die('meh.'); + +/** + * 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 Andreas Gohr + * @link https://www.google.com/webmasters/sitemaps/docs/en/about.html + */ +function sitemapGenerate(){ + global $conf; + dbglog('sitemapGenerate(): started'); + if(!$conf['sitemap']) return false; + + $sitemap = sitemapGetFilePath(); + dbglog("runSitemapper(): using $sitemap"); + + 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']*60*60*24))){ + dbglog('runSitemapper(): Sitemap up to date'); + return false; + } + + $pages = idx_getIndex('page', ''); + dbglog('runSitemapper(): creating sitemap using '.count($pages).' pages'); + + // build the sitemap + ob_start(); + print ''.NL; + print ''.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 ' '.NL; + print ' '.wl($id,'',true).''.NL; + print ' '.date_iso8601($date).''.NL; + print ' '.NL; + } + print ''.NL; + $data = ob_get_contents(); + ob_end_clean(); + + //save the new sitemap + return io_saveFile($sitemap,$data); +} + +function sitemapGetFilePath() { + global $conf; + + $sitemap = $conf['cachedir'].'/sitemap.xml'; + if($conf['compression'] == 'bz2' || $conf['compression'] == 'gz'){ + $sitemap .= '.gz'; + } + + return $sitemap; +} + +function sitemapPingSearchEngines() { + //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, + ); + + foreach ($ping_urls as $name => $url) { + dbglog("sitemapPingSearchEngines(): pinging $name"); + $resp = $http->get($url); + if($http->error) dbglog("runSitemapper(): $http->error"); + dbglog('runSitemapper(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp))); + } + + return true; +} diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index f8e2f7981..63ad5931f 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -232,88 +232,11 @@ 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 ''.NL; - print ''.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 ' '.NL; - print ' '.wl($id,'',true).''.NL; - print ' '.date_iso8601($date).''.NL; - print ' '.NL; - } - print ''.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; - + require_once DOKU_INC.'inc/sitemap.php'; + $result = sitemapGenerate() && sitemapPingSearchEngines(); print 'runSitemapper(): finished'.NL; - return true; + return $result; } /** @@ -408,21 +331,6 @@ function sendDigest() { $_SERVER['REMOTE_USER'] = $olduser; } -/** - * Formats a timestamp as ISO 8601 date - * - * @author - * @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 * -- cgit v1.2.3 From 2897eb23759202676f5447a72d7fe5eb68321ce3 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 26 Jun 2010 13:33:46 +0200 Subject: Transformed the sitemapper into a class This makes it possible to autoload the sitemapper when needed. --- inc/Sitemapper.php | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++ inc/actions.php | 3 +- inc/load.php | 1 + inc/sitemap.php | 101 --------------------------------------------------- lib/exe/indexer.php | 3 +- 5 files changed, 106 insertions(+), 105 deletions(-) create mode 100644 inc/Sitemapper.php delete mode 100644 inc/sitemap.php diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php new file mode 100644 index 000000000..68f4beddb --- /dev/null +++ b/inc/Sitemapper.php @@ -0,0 +1,103 @@ + + */ + +if(!defined('DOKU_INC')) die('meh.'); + +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 Andreas Gohr + * @link https://www.google.com/webmasters/sitemaps/docs/en/about.html + */ + public function generate(){ + global $conf; + dbglog('sitemapGenerate(): started'); + if(!$conf['sitemap']) return false; + + $sitemap = Sitemapper::getFilePath(); + dbglog("runSitemapper(): using $sitemap"); + + 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']*60*60*24))){ + dbglog('runSitemapper(): Sitemap up to date'); + return false; + } + + $pages = idx_getIndex('page', ''); + dbglog('runSitemapper(): creating sitemap using '.count($pages).' pages'); + + // build the sitemap + ob_start(); + print ''.NL; + print ''.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 ' '.NL; + print ' '.wl($id,'',true).''.NL; + print ' '.date_iso8601($date).''.NL; + print ' '.NL; + } + print ''.NL; + $data = ob_get_contents(); + ob_end_clean(); + + //save the new sitemap + return io_saveFile($sitemap,$data); + } + + public function getFilePath() { + global $conf; + + $sitemap = $conf['cachedir'].'/sitemap.xml'; + if($conf['compression'] == 'bz2' || $conf['compression'] == 'gz'){ + $sitemap .= '.gz'; + } + + return $sitemap; + } + + 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, + ); + + foreach ($ping_urls as $name => $url) { + dbglog("sitemapPingSearchEngines(): pinging $name"); + $resp = $http->get($url); + if($http->error) dbglog("runSitemapper(): $http->error"); + dbglog('runSitemapper(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp))); + } + + return true; + } +} diff --git a/inc/actions.php b/inc/actions.php index 2d70ac8ed..12c4c595f 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -615,8 +615,7 @@ function act_sitemap($act) { // Check if sitemap file exists, otherwise create it if (!is_readable($sitemap)) { - require_once DOKU_INC.'inc/sitemap.php'; - sitemapGenerate(); + Sitemapper::generate(); } if (is_readable($sitemap)) { 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/sitemap.php b/inc/sitemap.php deleted file mode 100644 index bbed7d269..000000000 --- a/inc/sitemap.php +++ /dev/null @@ -1,101 +0,0 @@ - - */ - -if(!defined('DOKU_INC')) die('meh.'); - -/** - * 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 Andreas Gohr - * @link https://www.google.com/webmasters/sitemaps/docs/en/about.html - */ -function sitemapGenerate(){ - global $conf; - dbglog('sitemapGenerate(): started'); - if(!$conf['sitemap']) return false; - - $sitemap = sitemapGetFilePath(); - dbglog("runSitemapper(): using $sitemap"); - - 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']*60*60*24))){ - dbglog('runSitemapper(): Sitemap up to date'); - return false; - } - - $pages = idx_getIndex('page', ''); - dbglog('runSitemapper(): creating sitemap using '.count($pages).' pages'); - - // build the sitemap - ob_start(); - print ''.NL; - print ''.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 ' '.NL; - print ' '.wl($id,'',true).''.NL; - print ' '.date_iso8601($date).''.NL; - print ' '.NL; - } - print ''.NL; - $data = ob_get_contents(); - ob_end_clean(); - - //save the new sitemap - return io_saveFile($sitemap,$data); -} - -function sitemapGetFilePath() { - global $conf; - - $sitemap = $conf['cachedir'].'/sitemap.xml'; - if($conf['compression'] == 'bz2' || $conf['compression'] == 'gz'){ - $sitemap .= '.gz'; - } - - return $sitemap; -} - -function sitemapPingSearchEngines() { - //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, - ); - - foreach ($ping_urls as $name => $url) { - dbglog("sitemapPingSearchEngines(): pinging $name"); - $resp = $http->get($url); - if($http->error) dbglog("runSitemapper(): $http->error"); - dbglog('runSitemapper(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp))); - } - - return true; -} diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 63ad5931f..61cf83acc 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -233,8 +233,7 @@ function metaUpdate(){ */ function runSitemapper(){ print "runSitemapper(): started".NL; - require_once DOKU_INC.'inc/sitemap.php'; - $result = sitemapGenerate() && sitemapPingSearchEngines(); + $result = Sitemapper::generate() && Sitemapper::pingSearchEngines(); print 'runSitemapper(): finished'.NL; return $result; } -- cgit v1.2.3 From 2b54e1e1cc3c24ef164b726b19467ec5536249f5 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 27 Jun 2010 15:09:41 +0200 Subject: Restructured the sitemapper --- inc/Sitemapper.php | 96 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 70 insertions(+), 26 deletions(-) diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php index 68f4beddb..03f4d7bc4 100644 --- a/inc/Sitemapper.php +++ b/inc/Sitemapper.php @@ -33,41 +33,48 @@ class Sitemapper { } if(@filesize($sitemap) && - @filemtime($sitemap) > (time()-($conf['sitemap']*60*60*24))){ - dbglog('runSitemapper(): Sitemap up to date'); - return false; - } + @filemtime($sitemap) > (time()-($conf['sitemap']*60*60*24))){ + dbglog('runSitemapper(): Sitemap up to date'); + return false; + } $pages = idx_getIndex('page', ''); dbglog('runSitemapper(): creating sitemap using '.count($pages).' pages'); + $items = array(); - // build the sitemap - ob_start(); - print ''.NL; - print ''.NL; + // build the sitemap items 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; + $items[] = SitemapItem::createFromID($id); + } + + $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(); - print ' '.NL; - print ' '.wl($id,'',true).''.NL; - print ' '.date_iso8601($date).''.NL; - print ' '.NL; + return $result; + } + + private function getXML($items) { + ob_start(); + print ''.NL; + print ''.NL; + foreach ($items as $item) { + print $item->toXML(); } print ''.NL; - $data = ob_get_contents(); + $result = ob_get_contents(); ob_end_clean(); - - //save the new sitemap - return io_saveFile($sitemap,$data); + return $result; } + public function getFilePath() { global $conf; @@ -91,13 +98,50 @@ class Sitemapper { 'microsoft' => 'http://www.bing.com/webmaster/ping.aspx?siteMap='.$encoded_sitemap_url, ); - foreach ($ping_urls as $name => $url) { - dbglog("sitemapPingSearchEngines(): pinging $name"); - $resp = $http->get($url); - if($http->error) dbglog("runSitemapper(): $http->error"); - dbglog('runSitemapper(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp))); + $event = new Doku_Event('SITEMAP_PING', $ping_urls); + if ($event->advise_before(true)) { + foreach ($ping_urls as $name => $url) { + dbglog("sitemapPingSearchEngines(): pinging $name"); + $resp = $http->get($url); + if($http->error) dbglog("runSitemapper(): $http->error"); + dbglog('runSitemapper(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp))); + } } + $event->advise_after(); return true; } } + +class SitemapItem { + public $url; + public $lastmod; + public $changefreq; + public $priority; + + public function __construct($url, $lastmod, $changefreq = null, $priority = null) { + $this->url = $url; + $this->lastmod = $lastmod; + $this->changefreq = $changefreq; + $this->priority = $priority; + } + + 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); + } + + public function toXML() { + $result = ' '.NL; + $result .= ' '.hsc($this->url).''.NL; + $result .= ' '.date_iso8601($this->lastmod).''.NL; + if ($this->changefreq !== NULL) + $result .= ' '.hsc($this->changefreq).''.NL; + if ($this->priority !== NULL) + $result .= ' '.hsc($this->priority).''.NL; + $result .= ' '.NL; + return $result; + } +} -- cgit v1.2.3 From 6c062f5e5826443084fc996d18a7001b28624f78 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 18 Sep 2010 17:23:50 +0200 Subject: Sitemapper code improved and documentation added Removed some calls to dbglog, improved the code performance and added documentation for all functions and classes of the Sitemapper. --- inc/Sitemapper.php | 94 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 74 insertions(+), 20 deletions(-) diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php index 03f4d7bc4..52c71c545 100644 --- a/inc/Sitemapper.php +++ b/inc/Sitemapper.php @@ -8,6 +8,11 @@ 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 @@ -15,16 +20,16 @@ class Sitemapper { * 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; - dbglog('sitemapGenerate(): started'); - if(!$conf['sitemap']) return false; + if($conf['sitemap'] < 1 || !is_numeric($conf['sitemap'])) return false; $sitemap = Sitemapper::getFilePath(); - dbglog("runSitemapper(): using $sitemap"); if(@file_exists($sitemap)){ if(!is_writable($sitemap)) return false; @@ -33,13 +38,15 @@ class Sitemapper { } if(@filesize($sitemap) && - @filemtime($sitemap) > (time()-($conf['sitemap']*60*60*24))){ - dbglog('runSitemapper(): Sitemap up to date'); + @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('runSitemapper(): creating sitemap using '.count($pages).' pages'); + dbglog('Sitemapper::generate(): creating sitemap using '.count($pages).' pages'); $items = array(); // build the sitemap items @@ -61,31 +68,49 @@ class Sitemapper { 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(); - print ''.NL; - print ''.NL; + echo ''.NL; + echo ''.NL; foreach ($items as $item) { - print $item->toXML(); + echo $item->toXML(); } - print ''.NL; + echo ''.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'){ + 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(); @@ -98,13 +123,16 @@ class Sitemapper { 'microsoft' => 'http://www.bing.com/webmaster/ping.aspx?siteMap='.$encoded_sitemap_url, ); - $event = new Doku_Event('SITEMAP_PING', $ping_urls); + $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 ($ping_urls as $name => $url) { - dbglog("sitemapPingSearchEngines(): pinging $name"); + foreach ($data['ping_urls'] as $name => $url) { + dbglog("Sitemapper::PingSearchEngines(): pinging $name"); $resp = $http->get($url); - if($http->error) dbglog("runSitemapper(): $http->error"); - dbglog('runSitemapper(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp))); + if($http->error) dbglog("Sitemapper:pingSearchengines(): $http->error"); + dbglog('Sitemapper:pingSearchengines(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp))); } } $event->advise_after(); @@ -113,12 +141,25 @@ class Sitemapper { } } +/** + * 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; @@ -126,6 +167,14 @@ class SitemapItem { $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)); @@ -133,10 +182,15 @@ class SitemapItem { 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 = ' '.NL; - $result .= ' '.hsc($this->url).''.NL; - $result .= ' '.date_iso8601($this->lastmod).''.NL; + $result = ' '.NL + .' '.hsc($this->url).''.NL + .' '.date_iso8601($this->lastmod).''.NL; if ($this->changefreq !== NULL) $result .= ' '.hsc($this->changefreq).''.NL; if ($this->priority !== NULL) -- cgit v1.2.3 From eae17177de8f3f3580af5ea66d126aee0f23227f Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Wed, 22 Sep 2010 17:52:13 +0200 Subject: Action handler for sitemaps improved The action handler for the sitemap now makes use of the sitemapper methods for determining the filename and uses http conditional requests. --- inc/actions.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/inc/actions.php b/inc/actions.php index 12c4c595f..78666ec98 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -57,8 +57,9 @@ function act_dispatch(){ $ACT = act_permcheck($ACT); //sitemap - if ($ACT == 'sitemap') + if ($ACT == 'sitemap'){ $ACT = act_sitemap($ACT); + } //register $nil = array(); @@ -599,17 +600,16 @@ function act_export($act){ function act_sitemap($act) { global $conf; - if (!$conf['sitemap']) { + if ($conf['sitemap'] < 1 || !is_numeric($conf['sitemap'])) { header("HTTP/1.0 404 Not Found"); print "Sitemap generation is disabled."; exit; } - $sitemap = $conf['cachedir'].'/sitemap.xml'; - if($conf['compression'] == 'bz2' || $conf['compression'] == 'gz'){ + $sitemap = Sitemapper::getFilePath(); + if(strrchr($sitemap, '.') === '.gz'){ $mime = 'application/x-gzip'; - $sitemap .= '.gz'; - } else { + }else{ $mime = 'application/xml; charset=utf-8'; } @@ -622,19 +622,18 @@ function act_sitemap($act) { // 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; - $fp = @fopen($sitemap,"rb"); - if($fp){ - http_rangeRequest($fp,filesize($sitemap),$mime); - exit; - } + readfile($sitemap); + exit; } header("HTTP/1.0 500 Internal Server Error"); - print "Could not read $sitemap - bad permissions?"; + print "Could not read the sitemap file - bad permissions?"; exit; } -- cgit v1.2.3 From 831c10d03192413b75ee2be21fb314e0797fdc23 Mon Sep 17 00:00:00 2001 From: Hakan Sandell Date: Sat, 2 Oct 2010 17:06:59 +0200 Subject: Fixed bug FS2030 JpegMeta dies on parsing XMP --- inc/JpegMeta.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index 98453131e..fa05f6859 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -1488,6 +1488,8 @@ class JpegMeta { * @author Hakan Sandell */ function _parseXmpNode($values, &$i, &$meta) { + if ($values[$i]['type'] == 'close') return; + if ($values[$i]['type'] == 'complete') { // Simple Type property $meta = $values[$i]['value']; @@ -1501,14 +1503,16 @@ class JpegMeta { while ($values[++$i]['tag'] == 'rdf:li') { $this->_parseXmpNode($values, $i, $meta[]); } - $i++; // skip closing tag + $i++; // skip closing Bag/Seq tag } elseif ($values[$i]['tag'] == 'rdf:Alt') { // Language Alternative property, only the first (default) value is used - $i++; - $this->_parseXmpNode($values, $i, $meta); - while ($values[++$i]['tag'] != 'rdf:Alt'); - $i++; // skip closing tag + if ($values[$i]['type'] == 'open') { + $i++; + $this->_parseXmpNode($values, $i, $meta); + while ($values[++$i]['tag'] != 'rdf:Alt'); + $i++; // skip closing Alt tag + } } else { // Structure property -- cgit v1.2.3 From c277a6bdf6a2286eadaba9b8ad5c638b9d50922b Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Thu, 21 Oct 2010 13:20:08 -0400 Subject: Deprecate html_attbuild in favor of buildAttributes --- inc/form.php | 4 ++-- inc/html.php | 1 + lib/plugins/acl/admin.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inc/form.php b/inc/form.php index 70190d2b4..e614d2f30 100644 --- a/inc/form.php +++ b/inc/form.php @@ -252,7 +252,7 @@ class Doku_Form { global $lang; $form = ''; $this->params['accept-charset'] = $lang['encoding']; - $form .= '
params) . '>
' . DOKU_LF; + $form .= 'params,true) . '>
' . DOKU_LF; if (!empty($this->_hidden)) { foreach ($this->_hidden as $name=>$value) $form .= form_hidden(array('name'=>$name, 'value'=>$value)); @@ -597,7 +597,7 @@ function form_makeListboxField($name, $values, $selected='', $label=null, $id='' * @author Tom N Harris */ function form_tag($attrs) { - return '<'.$attrs['_tag'].' '.buildAttributes($attrs).'/>'; + return '<'.$attrs['_tag'].' '.buildAttributes($attrs,true).'/>'; } /** diff --git a/inc/html.php b/inc/html.php index 02afa00e9..a02cc020d 100644 --- a/inc/html.php +++ b/inc/html.php @@ -26,6 +26,7 @@ function html_wikilink($id,$name=null,$search=''){ /** * Helps building long attribute lists * + * @deprecated Use buildAttributes instead * @author Andreas Gohr */ function html_attbuild($attributes){ diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 84932f7ac..3e7bd8121 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -765,7 +765,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { //build code $ret .= ''.NL; } -- cgit v1.2.3 From 6d3e62599b5cf46a86b28e75049679f94025f26f Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Tue, 2 Nov 2010 22:56:12 +0100 Subject: Only add successfully created sitemap items to the sitemap --- inc/Sitemapper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php index 52c71c545..47a3fedb5 100644 --- a/inc/Sitemapper.php +++ b/inc/Sitemapper.php @@ -54,7 +54,9 @@ class Sitemapper { //skip hidden, non existing and restricted files if(isHiddenPage($id)) continue; if(auth_aclcheck($id,'','') < AUTH_READ) continue; - $items[] = SitemapItem::createFromID($id); + $item = SitemapItem::createFromID($id); + if ($item !== NULL) + $items[] = $item; } $eventData = array('items' => &$items, 'sitemap' => &$sitemap); -- cgit v1.2.3 From 8cf5aee5bbf192bf6408088a6d2f497a2087105d Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 7 Nov 2010 21:17:02 +0000 Subject: added missing styles to print.css (underline, centered images and clearer) --- lib/tpl/default/print.css | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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; -- cgit v1.2.3 From b190e58905738aad7360936a92ffdabbca95d160 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 11 Nov 2010 21:29:04 +0100 Subject: maintain the list of removed files in the repository this is mainly for use with plugin:upgrade and thus will be cherrypicked into the current stable branch as well. --- data/deleted.files | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 data/deleted.files 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 -- cgit v1.2.3 From afca7e7eb41bc692ca11c4fb80f32c860e2bd3d5 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Fri, 12 Nov 2010 20:34:00 +0100 Subject: FS#1839: take favicon from mediadir (if it exists) --- inc/template.php | 13 +++++++++++++ lib/tpl/default/main.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/inc/template.php b/inc/template.php index cb98c83d7..00bfde723 100644 --- a/inc/template.php +++ b/inc/template.php @@ -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 + */ +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/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(); - + -- cgit v1.2.3 From ebb29737d32bc331541f78a1a47f33ba33919938 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sat, 13 Nov 2010 13:59:17 +0100 Subject: fixed mediamanager options + ie6 fix (FS#2074) --- lib/scripts/media.js | 123 ++++++++++++++++++++------------------ lib/tpl/default/_mediaoptions.css | 2 +- 2 files changed, 65 insertions(+), 60 deletions(-) diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 8eb19ce6b..5b9372b68 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 { @@ -217,10 +217,10 @@ var media_manager = { // FIXME these lines deactivate the media options dialog and restore // the old behavior according to FS#2047 - opener.insertTags('wiki__text','{{'+id+'|','}}',''); - if(!media_manager.keepopen) window.close(); - opener.focus(); - return false; + //opener.insertTags('wiki__text','{{'+id+'|','}}',''); + //if(!media_manager.keepopen) window.close(); + //opener.focus(); + //return false; media_manager.ext = false; @@ -242,21 +242,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'; @@ -266,7 +256,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'; @@ -293,6 +283,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'; @@ -306,7 +301,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'); @@ -324,23 +319,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'); @@ -364,7 +359,7 @@ var media_manager = { media_manager.popup.setAttribute('id','media__popup'); var root = document.getElementById('media__manager'); - if (root == null) return; + if (root === null) return; root.appendChild(media_manager.popup); var headline = document.createElement('h1'); @@ -394,8 +389,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); }); @@ -427,8 +421,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); @@ -462,7 +455,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'; @@ -516,7 +508,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)?'&':'?'; @@ -537,15 +529,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 = ''; } @@ -671,14 +663,15 @@ var media_manager = { * @author Dominik Eckelmann */ 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; @@ -690,23 +683,34 @@ var media_manager = { * @author Dominik Eckelmann */ 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; @@ -755,13 +759,14 @@ var media_manager = { * @author Dominik Eckelmann */ 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/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 { -- cgit v1.2.3 From cdf966f1270532404b2a6d2343ed75db32fc0b16 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sat, 13 Nov 2010 15:48:24 +0100 Subject: removed fixme comment --- lib/scripts/media.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 5b9372b68..ab64298ae 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -215,14 +215,6 @@ var media_manager = { return false; } - // FIXME these lines deactivate the media options dialog and restore - // the old behavior according to FS#2047 - //opener.insertTags('wiki__text','{{'+id+'|','}}',''); - //if(!media_manager.keepopen) window.close(); - //opener.focus(); - //return false; - - media_manager.ext = false; var dot = id.lastIndexOf("."); if (dot != -1) { -- cgit v1.2.3 From 3903be5dc10c8ce0270ce28c57a5b76df87db4c3 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sat, 13 Nov 2010 16:25:43 +0100 Subject: Remove metadata conversion from 0a7e3bce (2006-11-26) --- inc/parserutils.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/inc/parserutils.php b/inc/parserutils.php index 27a5190bd..847b0382f 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -337,9 +337,6 @@ function p_purge_metadata($id) { * 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 * * @param string $id absolute wiki page id @@ -356,26 +353,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; } -- cgit v1.2.3 From 709b10639d1fe76508c0f31bd7983b3a5beee605 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sat, 13 Nov 2010 16:27:10 +0100 Subject: Simpler ID trimming --- inc/search.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/inc/search.php b/inc/search.php index 03abec0c0..a6787c5d2 100644 --- a/inc/search.php +++ b/inc/search.php @@ -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; } -- cgit v1.2.3 From 9a83dc0d6a0b8b1d3556d4b2563c35990f31cb2e Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 13 Nov 2010 16:08:51 +0100 Subject: improved lib styles --- lib/styles/style.css | 93 ++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/lib/styles/style.css b/lib/styles/style.css index 814191615..f0ba95a95 100644 --- a/lib/styles/style.css +++ b/lib/styles/style.css @@ -4,86 +4,87 @@ */ 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; } -- cgit v1.2.3 From c44e5a8819e814ef99b54d35d866358df723e778 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 13 Nov 2010 16:58:44 +0100 Subject: added minimal needed styles for modal windows --- lib/styles/style.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/styles/style.css b/lib/styles/style.css index f0ba95a95..395f82b78 100644 --- a/lib/styles/style.css +++ b/lib/styles/style.css @@ -87,6 +87,17 @@ em em.u { font-style: italic; } +/* modal windows */ +.JSpopup, +#link__wiz, +#media__popup { + position: absolute; + background-color: #fff; + color: #000; + z-index: 20; + overflow: hidden; +} + /* syntax highlighting code */ .code .br0 { color: #66cc66; } -- cgit v1.2.3 From 8079aa0b7aaf494a7b249671919159fd628b5dc0 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 13 Nov 2010 17:09:56 +0100 Subject: initialised media options modal popup with display:none in JS --- lib/scripts/media.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/scripts/media.js b/lib/scripts/media.js index ab64298ae..b90f7047b 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -349,6 +349,7 @@ 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; -- cgit v1.2.3 From ba9418bca378a6759305e3b388926df4f5a0af9c Mon Sep 17 00:00:00 2001 From: Hakan Sandell Date: Sat, 13 Nov 2010 18:20:28 +0100 Subject: Added XMLRPC dokuwiki:appendPage --- lib/exe/xmlrpc.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index f06792361..8c2bec6f9 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -7,7 +7,7 @@ if(isset($HTTP_RAW_POST_DATA)) $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA); /** * Increased whenever the API is changed */ -define('DOKU_XMLRPC_API_VERSION',4); +define('DOKU_XMLRPC_API_VERSION',5); require_once(DOKU_INC.'inc/init.php'); session_write_close(); //close session @@ -143,6 +143,13 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { true ); + $this->addCallback( + 'dokuwiki.appendPage', + 'this:appendPage', + array('int', 'string', 'string', 'struct'), + 'Append text to a wiki page.' + ); + /* Wiki API v2 http://www.jspwiki.org/wiki/WikiRPCInterface2 */ $this->addCallback( 'wiki.getRPCVersionSupported', @@ -577,6 +584,17 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { return 0; } + /** + * Appends text to a wiki page. + */ + function appendPage($id, $text, $params) { + $currentpage = $this->rawPage($id); + if (!is_string($currentpage)) { + return $currentpage; + } + return $this->putPage($id, $currentpage.$text, $params); + } + /** * Uploads a file to the wiki. * -- cgit v1.2.3 From 1172f8dcef2c8198ddcdaffcdf65a735811d20a3 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sat, 13 Nov 2010 18:20:51 +0100 Subject: Introduce metadata write wrapper p_save_metadata p_purge_metadata now updates the metadata cache and the INFO array like the other metadata writing functions --- inc/parserutils.php | 40 ++++++++++++++++++++++++---------------- lib/exe/indexer.php | 4 ++-- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/inc/parserutils.php b/inc/parserutils.php index 847b0382f..b8b063fc3 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -223,7 +223,7 @@ function p_get_instructions($text){ * @author Esther Brunner */ 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']; @@ -305,13 +301,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,16 +311,16 @@ function p_set_metadata($id, $data, $render=false, $persistent=true){ * @author Michael Klier */ 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); } /** @@ -360,6 +350,24 @@ function p_read_metadata($id,$cache=false) { return $meta; } +/** + * 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 * diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index f35f9ed72..3fa81715b 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -190,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; @@ -213,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; -- cgit v1.2.3 From e8bc5751ed12895c27ba23882497cbfce4df661e Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 13 Nov 2010 19:01:59 +0100 Subject: FS#2079: always show profile and subscribe links/buttons --- inc/template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/template.php b/inc/template.php index 00bfde723..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; -- cgit v1.2.3 From a365baeef4fc0b6d593043c6db53c01671de9490 Mon Sep 17 00:00:00 2001 From: Dominik Eckelmann Date: Sat, 13 Nov 2010 19:04:26 +0100 Subject: improved some metadata comments --- inc/changelog.php | 9 +++++++++ inc/parserutils.php | 9 +++++++++ 2 files changed, 18 insertions(+) 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 * @author Esther Brunner * @author Ben Coburn diff --git a/inc/parserutils.php b/inc/parserutils.php index b8b063fc3..a50e3f4f3 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -252,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 */ function p_set_metadata($id, $data, $render=false, $persistent=true){ -- cgit v1.2.3 From 3a1a171b951828395a7578475e86e622f9a7205c Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sun, 14 Nov 2010 14:17:52 -0500 Subject: Remove unused idx_touchIndex function --- inc/indexer.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index f5330040a..7a8bb3ff8 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -103,22 +103,6 @@ function idx_getIndex($pre, $wlen){ return file($fn); } -/** - * Create an empty index file if it doesn't exist yet. - * - * FIXME: This function isn't currently used. It will probably be removed soon. - * - * @author Tom N Harris - */ -function idx_touchIndex($pre, $wlen){ - global $conf; - $fn = $conf['indexdir'].'/'.$pre.$wlen.'.idx'; - if(!@file_exists($fn)){ - touch($fn); - if($conf['fperm']) chmod($fn, $conf['fperm']); - } -} - /** * Read a line ending with \n. * Returns false on EOF. -- cgit v1.2.3 From ee0891d8ffd7e4a59c958b9546a3b8382e4e5991 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sun, 14 Nov 2010 14:18:51 -0500 Subject: Do not assume that index files will be backward compatible --- lib/exe/indexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 3fa81715b..4a6f74ba4 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -140,7 +140,7 @@ function runIndexer(){ // check if indexing needed $idxtag = metaFN($ID,'.indexed'); if(@file_exists($idxtag)){ - if(io_readFile($idxtag) >= INDEXER_VERSION){ + if(trim(io_readFile($idxtag)) == INDEXER_VERSION){ $last = @filemtime($idxtag); if($last > @filemtime(wikiFN($ID))){ print "runIndexer(): index for $ID up to date".NL; -- cgit v1.2.3 From 4b9792c696658fe0cbedc187198fa463b6ff83fc Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sun, 14 Nov 2010 14:22:08 -0500 Subject: Measure length of multi-character Asian words --- inc/indexer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 7a8bb3ff8..d9eccac76 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -52,8 +52,10 @@ function wordlen($w){ $l = strlen($w); // If left alone, all chinese "words" will get put into w3.idx // So the "length" of a "word" is faked - if(preg_match('/'.IDX_ASIAN2.'/u',$w)) - $l += ord($w) - 0xE1; // Lead bytes from 0xE2-0xEF + if(preg_match_all('/[\xE2-\xEF]/',$w,$leadbytes)) { + foreach($leadbytes[0] as $b) + $l += ord($b) - 0xE1; + } return $l; } -- cgit v1.2.3 From 4e1bf408de9297d5773cd8bfe1af997c83eab1a2 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sun, 14 Nov 2010 14:32:23 -0500 Subject: Refactor tokenizer to avoid splitting multiple times --- inc/indexer.php | 69 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index d9eccac76..56d80b7fa 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -203,8 +203,7 @@ function idx_getPageWords($page){ list($page,$body) = $data; - $body = strtr($body, "\r\n\t", ' '); - $tokens = explode(' ', $body); + $tokens = idx_tokenizer($body, $stopwords); $tokens = array_count_values($tokens); // count the frequency of each token // ensure the deaccented or romanised page names of internal links are added to the token array @@ -225,16 +224,12 @@ function idx_getPageWords($page){ } $words = array(); - foreach ($tokens as $word => $count) { - $arr = idx_tokenizer($word,$stopwords); - $arr = array_count_values($arr); - foreach ($arr as $w => $c) { - $l = wordlen($w); - if(isset($words[$l])){ - $words[$l][$w] = $c * $count + (isset($words[$l][$w]) ? $words[$l][$w] : 0); - }else{ - $words[$l] = array($w => $c * $count); - } + foreach ($tokens as $w => $c) { + $l = wordlen($w); + if(isset($words[$l])){ + $words[$l][$w] = $c + (isset($words[$l][$w]) ? $words[$l][$w] : 0); + }else{ + $words[$l] = array($w => $c); } } @@ -655,33 +650,51 @@ function idx_parseIndexLine(&$page_idx,$line){ * Tokenizes a string into an array of search words * * Uses the same algorithm as idx_getPageWords() + * Takes an arbitrarily complex string and returns a list of words + * suitable for indexing. The string may include spaces and line + * breaks * * @param string $string the query as given by the user * @param arrayref $stopwords array of stopwords * @param boolean $wc are wildcards allowed? + * @return array list of indexable words + * @author Tom N Harris + * @author Andreas Gohr */ function idx_tokenizer($string,&$stopwords,$wc=false){ $words = array(); $wc = ($wc) ? '' : $wc = '\*'; - if(preg_match('/[^0-9A-Za-z]/u', $string)){ - // handle asian chars as single words (may fail on older PHP version) - $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$string); - if(!is_null($asia)) $string = $asia; //recover from regexp failure - - $arr = explode(' ', utf8_stripspecials($string,' ','\._\-:'.$wc)); - foreach ($arr as $w) { - if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) continue; - $w = utf8_strtolower($w); - if($stopwords && is_int(array_search("$w\n",$stopwords))) continue; + if (!$stopwords) + $sw = array(); + else + $sw =& $stopwords; + + $string = strtr($string, "\r\n\t", ' '); + if(preg_match('/[^0-9A-Za-z ]/u', $string)) + $string = utf8_stripspecials($string, ' ', '\._\-:'.$wc); + + $wordlist = explode(' ', $string); + foreach ($wordlist as $word) { + if(preg_match('/[^0-9A-Za-z]/u', $word)){ + // handle asian chars as single words (may fail on older PHP version) + $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$word); + if(!is_null($asia)) $word = $asia; //recover from regexp failure + + $arr = explode(' ', $word); + foreach ($arr as $w) { + if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) continue; + $w = utf8_strtolower($w); + if(is_int(array_search("$w\n",$stopwords))) continue; + $words[] = $w; + } + }else{ + $w = $word; + if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) return $words; + $w = strtolower($w); + if(is_int(array_search("$w\n",$stopwords))) return $words; $words[] = $w; } - }else{ - $w = $string; - if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) return $words; - $w = strtolower($w); - if(is_int(array_search("$w\n",$stopwords))) return $words; - $words[] = $w; } return $words; -- cgit v1.2.3 From 430d05b058ac3df435600a678cda365dba3eb1b7 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 15 Nov 2010 00:38:54 +0100 Subject: Use native PHP JSON functions when available --- inc/JSON.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/JSON.php b/inc/JSON.php index 332827f4c..d1fbd404a 100644 --- a/inc/JSON.php +++ b/inc/JSON.php @@ -130,6 +130,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 +141,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 +354,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 +366,7 @@ class JSON { * @access public */ function decode($str) { + if (function_exists('json_decode')) return json_decode($str); $str = $this->reduce_string($str); switch (strtolower($str)) { -- cgit v1.2.3 From 5bcab0c47360e5b31237885cff4583e0eba479f8 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Mon, 15 Nov 2010 15:48:31 -0500 Subject: tokenizer was returning prematurely --- inc/indexer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 56d80b7fa..b3e10a548 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -690,9 +690,9 @@ function idx_tokenizer($string,&$stopwords,$wc=false){ } }else{ $w = $word; - if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) return $words; + if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) continue; $w = strtolower($w); - if(is_int(array_search("$w\n",$stopwords))) return $words; + if(is_int(array_search("$w\n",$stopwords))) continue; $words[] = $w; } } -- cgit v1.2.3 From 06af2d035180c4fb746a9b88c11178c516c88092 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 15 Nov 2010 22:08:06 +0100 Subject: Indexer speed improvement: joined array vs. single lines From my experience with a benchmark of the indexer it is faster to first join the array of all index entries and then write them back together instead of writing every single entry. This might increase memory usage, but I couldn't see a significant increase and this function is also only used for the small index files, not for the large pagewords index. --- inc/indexer.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index f5330040a..0a7e2265e 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -67,9 +67,7 @@ function idx_saveIndex($pre, $wlen, &$idx){ $fn = $conf['indexdir'].'/'.$pre.$wlen; $fh = @fopen($fn.'.tmp','w'); if(!$fh) return false; - foreach ($idx as $line) { - fwrite($fh,$line); - } + fwrite($fh,join('', $idx)); fclose($fh); if(isset($conf['fperm'])) chmod($fn.'.tmp', $conf['fperm']); io_rename($fn.'.tmp', $fn.'.idx'); -- cgit v1.2.3 From 037b55733d384c194f7554c832f95a5e566c5884 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 15 Nov 2010 22:13:36 +0100 Subject: Indexer improvement: replace _freadline by fgets In PHP versions newer than 4.3.0 fgets reads a whole line regardless of its length when no length is given. Thus the loop in _freadline isn't needed. This increases the speed significantly as _freadline was called very often. --- inc/indexer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 0a7e2265e..a07c3b89a 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -149,7 +149,7 @@ function idx_saveIndexLine($pre, $wlen, $idx, $line){ $ih = @fopen($fn.'.idx','r'); if ($ih) { $ln = -1; - while (($curline = _freadline($ih)) !== false) { + while (($curline = fgets($ih)) !== false) { if (++$ln == $idx) { fwrite($fh, $line); } else { @@ -181,7 +181,7 @@ function idx_getIndexLine($pre, $wlen, $idx){ $fh = @fopen($fn,'r'); if(!$fh) return ''; $ln = -1; - while (($line = _freadline($fh)) !== false) { + while (($line = fgets($fh)) !== false) { if (++$ln == $idx) break; } fclose($fh); -- cgit v1.2.3 From e5e503830f067ce7305e22eac58c78c2f4a007d2 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 15 Nov 2010 22:16:33 +0100 Subject: Indexer improvement: Only write the words index when needed This adds a simple boolean variable that tracks if new words have been added. When editing a page in many cases all words have already been used somewhere else or just one or two words are new. Until this change all words indexes read were always written, now only the changed ones are written. The overhead of the new boolean variable should be low. --- inc/indexer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/indexer.php b/inc/indexer.php index a07c3b89a..8174f73d0 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -252,6 +252,8 @@ function idx_getPageWords($page){ // arrive here with $words = array(wordlen => array(word => frequency)) + $word_idx_modified = false; + $index = array(); //resulting index foreach (array_keys($words) as $wlen){ $word_idx = idx_getIndex('w',$wlen); @@ -260,6 +262,7 @@ function idx_getPageWords($page){ if(!is_int($wid)){ $wid = count($word_idx); $word_idx[] = "$word\n"; + $word_idx_modified = true; } if(!isset($index[$wlen])) $index[$wlen] = array(); @@ -267,7 +270,7 @@ function idx_getPageWords($page){ } // save back word index - if(!idx_saveIndex('w',$wlen,$word_idx)){ + if($word_idx_modified && !idx_saveIndex('w',$wlen,$word_idx)){ trigger_error("Failed to write word index", E_USER_ERROR); return false; } -- cgit v1.2.3 From 4753bcc0e2fd9417e885e128e8c9ab4bfc566c32 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 15 Nov 2010 22:36:26 +0100 Subject: Indexer improvement: regex instead of arrays for lines When updating a single line that line was split into an array and in a loop over that array one entry was removed and afterwards a new one added. Tests have shown that using a regex for doing that is much faster which can be easily explained as that regex is very simple to match while a loop over an array isn't that fast. As that update function is called for every word in a page the impact of this change is significant. --- inc/indexer.php | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 8174f73d0..954512673 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -391,26 +391,19 @@ function idx_writeIndexLine($fh,$line,$pid,$count){ * @author Andreas Gohr */ function idx_updateIndexLine($line,$pid,$count){ - $line = trim($line); - $updated = array(); - if($line != ''){ - $parts = explode(':',$line); - // remove doc from given line - foreach($parts as $part){ - if($part == '') continue; - list($doc,$cnt) = explode('*',$part); - if($doc != $pid){ - $updated[] = $part; - } - } + if ($line == ''){ + $newLine = "\n"; + }else{ + $newLine = preg_replace('/(^|:)'.preg_quote($pid, '/').'\*\d*/', '', $line); } - - // add doc if ($count){ - $updated[] = "$pid*$count"; + if (strlen($newLine) > 1){ + return "$pid*$count:".$newLine; + }else{ + return "$pid*$count".$newLine; + } } - - return join(':',$updated)."\n"; + return $newLine; } /** -- cgit v1.2.3 From 6c528220aaf62f4ba5890483797d6661352500bb Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 16 Nov 2010 17:58:28 -0500 Subject: Repurpose io_runcmd for pipes --- inc/io.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/inc/io.php b/inc/io.php index 1d69dabc9..9b797ebf2 100644 --- a/inc/io.php +++ b/inc/io.php @@ -533,17 +533,20 @@ function io_rename($from,$to){ * * @author Harry Brueckner * @author Andreas Gohr - * @deprecated */ -function io_runcmd($cmd){ - $fh = popen($cmd, "r"); - if(!$fh) return false; - $ret = ''; - while (!feof($fh)) { - $ret .= fread($fh, 8192); - } - pclose($fh); - return $ret; +function io_runcmd($cmd, $input, &$output){ + $descspec = array( + 0=>array("pipe","r"), + 1=>array("pipe","w"), + 2=>array("pipe","w")); + $ph = proc_open($cmd, $descspec, $pipes); + if(!$ph) return -1; + fclose($pipes[2]); // ignore stderr + fwrite($pipes[0], $input); + fclose($pipes[0]); + $output = stream_get_contents($pipes[1]); + fclose($pipes[1]); + return proc_close($ph); } /** -- cgit v1.2.3 From 1c07b9e622d139fa815c955c89569f96342475fb Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 16 Nov 2010 18:09:53 -0500 Subject: Use external program to split pages into words An external tokenizer inserts extra spaces to mark words in the input text. The text is sent through STDIN and STDOUT file handles. A good choice for Chinese and Japanese is MeCab. http://sourceforge.net/projects/mecab/ With the command line 'mecab -O wakati' --- conf/dokuwiki.php | 2 ++ inc/indexer.php | 32 ++++++++++++------------- lib/plugins/config/lang/en/lang.php | 2 ++ lib/plugins/config/settings/config.metadata.php | 2 ++ 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 2405494e0..f10c70e58 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -133,6 +133,8 @@ $conf['broken_iua'] = 0; //Platform with broken ignore_user_abor $conf['xsendfile'] = 0; //Use X-Sendfile (1 = lighttpd, 2 = standard) $conf['renderer_xhtml'] = 'xhtml'; //renderer to use for main page generation $conf['rememberme'] = 1; //Enable/disable remember me on login +$conf['external_tokenizer'] = 0; //Use an external program to split pages into words for indexing +$conf['tokenizer_cmd'] = '/usr/bin/mecab -O wakati'; //Set target to use when creating links - leave empty for same window $conf['target']['wiki'] = ''; diff --git a/inc/indexer.php b/inc/indexer.php index b3e10a548..1c955a99d 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -662,6 +662,7 @@ function idx_parseIndexLine(&$page_idx,$line){ * @author Andreas Gohr */ function idx_tokenizer($string,&$stopwords,$wc=false){ + global $conf; $words = array(); $wc = ($wc) ? '' : $wc = '\*'; @@ -670,6 +671,16 @@ function idx_tokenizer($string,&$stopwords,$wc=false){ else $sw =& $stopwords; + if ($conf['external_tokenizer']) { + if (0 == io_runcmd($conf['tokenizer_cmd'], $string, $output)) + $string = $output; + } else { + if(preg_match('/[^0-9A-Za-z ]/u', $string)) { + // handle asian chars as single words (may fail on older PHP version) + $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$string); + if(!is_null($asia)) $string = $asia; //recover from regexp failure + } + } $string = strtr($string, "\r\n\t", ' '); if(preg_match('/[^0-9A-Za-z ]/u', $string)) $string = utf8_stripspecials($string, ' ', '\._\-:'.$wc); @@ -677,24 +688,13 @@ function idx_tokenizer($string,&$stopwords,$wc=false){ $wordlist = explode(' ', $string); foreach ($wordlist as $word) { if(preg_match('/[^0-9A-Za-z]/u', $word)){ - // handle asian chars as single words (may fail on older PHP version) - $asia = @preg_replace('/('.IDX_ASIAN.')/u',' \1 ',$word); - if(!is_null($asia)) $word = $asia; //recover from regexp failure - - $arr = explode(' ', $word); - foreach ($arr as $w) { - if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) continue; - $w = utf8_strtolower($w); - if(is_int(array_search("$w\n",$stopwords))) continue; - $words[] = $w; - } + $word = utf8_strtolower($word); }else{ - $w = $word; - if (!is_numeric($w) && strlen($w) < IDX_MINWORDLENGTH) continue; - $w = strtolower($w); - if(is_int(array_search("$w\n",$stopwords))) continue; - $words[] = $w; + $word = strtolower($word); } + if (!is_numeric($word) && strlen($word) < IDX_MINWORDLENGTH) continue; + if(is_int(array_search("$word\n",$stopwords))) continue; + $words[] = $word; } return $words; diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index a944d6bd7..85214bf98 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -141,6 +141,8 @@ $lang['renderer_xhtml'] = 'Renderer to use for main (xhtml) wiki output'; $lang['renderer__core'] = '%s (dokuwiki core)'; $lang['renderer__plugin'] = '%s (plugin)'; $lang['rememberme'] = 'Allow permanent login cookies (remember me)'; +$lang['external_tokenizer'] = 'Use an external program to split pages into words for indexing'; +$lang['tokenizer_cmd'] = 'Command line to start the external tokenizer'; $lang['rss_type'] = 'XML feed type'; $lang['rss_linkto'] = 'XML feed links to'; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index edba65262..331da5ab8 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -190,6 +190,8 @@ $meta['broken_iua'] = array('onoff'); $meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3)); $meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml')); $meta['readdircache'] = array('numeric'); +$meta['external_tokenizer'] = array('onoff'); +$meta['tokenizer_cmd'] = array('string'); $meta['_network'] = array('fieldset'); $meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); -- cgit v1.2.3 From 7c2ef4e8d524fb9262c5a08831220f9fb2dc11fe Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 17 Nov 2010 17:02:31 -0500 Subject: Use a different indexer version when external tokenizer is enabled --- bin/indexer.php | 8 ++------ inc/indexer.php | 17 +++++++++++++++++ lib/exe/indexer.php | 7 ++----- lib/exe/xmlrpc.php | 4 ++-- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/bin/indexer.php b/bin/indexer.php index 48e98b571..497c6146a 100755 --- a/bin/indexer.php +++ b/bin/indexer.php @@ -13,10 +13,6 @@ require_once(DOKU_INC.'inc/auth.php'); require_once(DOKU_INC.'inc/cliopts.php'); session_write_close(); -// Version tag used to force rebuild on upgrade -// Need to keep in sync with lib/exe/indexer.php -if(!defined('INDEXER_VERSION')) define('INDEXER_VERSION', 2); - // handle options $short_opts = 'hcuq'; $long_opts = array('help', 'clear', 'update', 'quiet'); @@ -88,7 +84,7 @@ function _index($id){ if(!$CLEAR){ $idxtag = metaFN($id,'.indexed'); if(@file_exists($idxtag)){ - if(io_readFile($idxtag) >= INDEXER_VERSION){ + if(io_readFile($idxtag) == idx_get_version()){ $last = @filemtime(metaFN($id,'.indexed')); if($last > @filemtime(wikiFN($id))) return; } @@ -98,7 +94,7 @@ function _index($id){ _lock(); _quietecho("$id... "); idx_addPage($id); - io_saveFile(metaFN($id,'.indexed'),INDEXER_VERSION); + io_saveFile(metaFN($id,'.indexed'), idx_get_version()); _quietecho("done.\n"); _unlock(); } diff --git a/inc/indexer.php b/inc/indexer.php index 1c955a99d..4914c9fc6 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -8,6 +8,9 @@ if(!defined('DOKU_INC')) die('meh.'); +// Version tag used to force rebuild on upgrade +define('INDEXER_VERSION', 2); + // set the minimum token length to use in the index (note, this doesn't apply to numeric tokens) if (!defined('IDX_MINWORDLENGTH')) define('IDX_MINWORDLENGTH',2); @@ -42,6 +45,20 @@ define('IDX_ASIAN3','['. // Hiragana/Katakana (can be two charact ']?'); define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')'); +/** + * Version of the indexer taking into consideration the external tokenizer. + * The indexer is only compatible with data written by the same version. + * + * @author Tom N Harris + */ +function idx_get_version(){ + global $conf; + if($conf['external_tokenizer']) + return INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); + else + return INDEXER_VERSION; +} + /** * Measure the length of a string. * Differs from strlen in handling of asian characters. diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 4a6f74ba4..55d860296 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -11,9 +11,6 @@ require_once(DOKU_INC.'inc/init.php'); session_write_close(); //close session if(!defined('NL')) define('NL',"\n"); -// Version tag used to force rebuild on upgrade -define('INDEXER_VERSION', 2); - // keep running after browser closes connection @ignore_user_abort(true); @@ -140,7 +137,7 @@ function runIndexer(){ // check if indexing needed $idxtag = metaFN($ID,'.indexed'); if(@file_exists($idxtag)){ - if(trim(io_readFile($idxtag)) == INDEXER_VERSION){ + if(trim(io_readFile($idxtag)) == idx_get_version()){ $last = @filemtime($idxtag); if($last > @filemtime(wikiFN($ID))){ print "runIndexer(): index for $ID up to date".NL; @@ -168,7 +165,7 @@ function runIndexer(){ idx_addPage($ID); // we're finished - save and free lock - io_saveFile(metaFN($ID,'.indexed'),INDEXER_VERSION); + io_saveFile(metaFN($ID,'.indexed'), idx_get_version()); @rmdir($lock); print "runIndexer(): finished".NL; return true; diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index f06792361..410d4f6ba 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -1,7 +1,7 @@ Date: Thu, 18 Nov 2010 13:55:55 -0500 Subject: Restore io_runcmd, use io_exec for exec with pipes --- inc/indexer.php | 4 ++-- inc/io.php | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 4914c9fc6..32fbf4a1a 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -484,7 +484,7 @@ function idx_indexLengths(&$filter){ } else { $lengths = idx_listIndexLengths(); foreach ( $lengths as $key => $length) { - // we keep all the values equal or superior + // we keep all the values equal or superior if ((int)$length >= (int)$filter) { $idx[] = $length; } @@ -689,7 +689,7 @@ function idx_tokenizer($string,&$stopwords,$wc=false){ $sw =& $stopwords; if ($conf['external_tokenizer']) { - if (0 == io_runcmd($conf['tokenizer_cmd'], $string, $output)) + if (0 == io_exec($conf['tokenizer_cmd'], $string, $output)) $string = $output; } else { if(preg_match('/[^0-9A-Za-z ]/u', $string)) { diff --git a/inc/io.php b/inc/io.php index 9b797ebf2..a0be00da3 100644 --- a/inc/io.php +++ b/inc/io.php @@ -529,12 +529,30 @@ function io_rename($from,$to){ /** - * Runs an external command and returns it's output as string + * Runs an external command and returns its output as string * * @author Harry Brueckner * @author Andreas Gohr + * @deprecated */ -function io_runcmd($cmd, $input, &$output){ +function io_runcmd($cmd){ + $fh = popen($cmd, "r"); + if(!$fh) return false; + $ret = ''; + while (!feof($fh)) { + $ret .= fread($fh, 8192); + } + pclose($fh); + return $ret; +} + +/** + * Runs an external command with input and output pipes. + * Returns the exit code from the process. + * + * @author Tom N Harris + */ +function io_exec($cmd, $input, &$output){ $descspec = array( 0=>array("pipe","r"), 1=>array("pipe","w"), -- cgit v1.2.3 From dc9bdeadf4b4eeacd7b6c7a51269a4400e4d25d8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 18 Nov 2010 22:42:42 +0100 Subject: Improve native JSON usage This patch does two things: It makes sure the native json_decode() will honor the JSON_LOOSETYPE option of the class and it also adds way to skip the use of the native function completely. The latter is necessary for slightly non-standard JSON data. --- inc/JSON.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/inc/JSON.php b/inc/JSON.php index d1fbd404a..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 * @@ -366,7 +376,10 @@ class JSON { * @access public */ function decode($str) { - if (function_exists('json_decode')) return json_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)) { -- cgit v1.2.3 From 7ae265d3e681ebbb637211616aac15b18b8689a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbyn=C4=9Bk=20=C5=A0vec?= Date: Thu, 18 Nov 2010 22:46:18 +0100 Subject: Czech language update --- inc/lang/cs/lang.php | 4 ++-- inc/lang/cs/subscr_form.txt | 2 +- lib/plugins/config/lang/cs/intro.txt | 2 +- lib/plugins/config/lang/cs/lang.php | 10 +++++----- lib/plugins/plugin/lang/cs/lang.php | 4 ++-- lib/plugins/popularity/lang/cs/intro.txt | 2 +- lib/plugins/revert/lang/cs/intro.txt | 2 +- lib/plugins/usermanager/lang/cs/lang.php | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) 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 instrukcemi pro instalci DokuWiki.'; +$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 instrukcemi pro instalaci DokuWiki.'; $lang['i_funcna'] = 'PHP funkce %s není dostupná. Váš webhosting ji možná z nějakého důvodu vypnul.'; $lang['i_phpver'] = 'Verze vaší instalace PHP %s je nižší než požadovaná %s. Budete muset aktualizovat svou instalaci PHP.'; $lang['i_permfail'] = 'DokuWiki nemůže zapisovat do %s. 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/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.
+zkontrolujte prosím své úpravy a odešlete je znovu.
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í. Vypněte, pokud to nepotřebujete!'; -$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/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 %s. 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 %s. 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 %s. 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/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/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/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'; -- cgit v1.2.3 From 11d7187b1b2e7bddc70324b865e01e750c5df162 Mon Sep 17 00:00:00 2001 From: YooS C Date: Thu, 18 Nov 2010 22:47:25 +0100 Subject: Korean language update --- inc/lang/ko/adminplugins.txt | 1 + inc/lang/ko/edit.txt | 2 +- inc/lang/ko/lang.php | 80 ++++++++++++++++++++++++++------ inc/lang/ko/register.txt | 2 +- inc/lang/ko/subscr_digest.txt | 18 +++++++ inc/lang/ko/subscr_form.txt | 3 ++ inc/lang/ko/subscr_list.txt | 15 ++++++ inc/lang/ko/subscr_single.txt | 21 +++++++++ lib/plugins/acl/lang/ko/lang.php | 1 + lib/plugins/config/lang/ko/lang.php | 8 +++- lib/plugins/plugin/lang/ko/lang.php | 1 + lib/plugins/popularity/lang/ko/lang.php | 1 + lib/plugins/revert/lang/ko/lang.php | 1 + lib/plugins/usermanager/lang/ko/lang.php | 1 + 14 files changed, 137 insertions(+), 18 deletions(-) create mode 100644 inc/lang/ko/adminplugins.txt create mode 100644 inc/lang/ko/subscr_digest.txt create mode 100644 inc/lang/ko/subscr_form.txt create mode 100644 inc/lang/ko/subscr_list.txt create mode 100644 inc/lang/ko/subscr_single.txt 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 * @author SONG Younghwan + * @author Seung-Chul Yoo */ $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'] = '이 컨텐츠를 표시하기 위해서 Adobe Flash Plugin이 필요합니다.'; +$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'] = '%s 네임스페이스를 구독중입니다. 전체위키 변경사항 도 보실수 있습니다.'; +$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/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 * @author SONG Younghwan + * @author Seung-Chul Yoo */ $lang['admin_acl'] = '접근 제어 목록 관리'; $lang['acl_group'] = '그룹'; 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 * @author SONG Younghwan + * @author Seung-Chul Yoo */ $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에서 문제가 있는 것으로 알려졌습니다. 자세한 정보는 Bug 852를 참고하기 바랍니다.'; $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/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 * @author SONG Younghwan + * @author Seung-Chul Yoo */ $lang['menu'] = '플러그인 관리자'; $lang['download'] = '새로운 플러그인 다운로드 및 설치'; 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 * @author SONG Younghwan + * @author Seung-Chul Yoo */ $lang['name'] = '인기도 조사 (불러오는데 시간이 걸릴 수 있습니다.)'; $lang['submit'] = '자료 보내기'; 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 * @author SONG Younghwan + * @author Seung-Chul Yoo */ $lang['menu'] = '복구 관리자'; $lang['filter'] = '스팸 페이지 검색 '; 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 * @author SONG Younghwan + * @author Seung-Chul Yoo */ $lang['menu'] = '사용자 관리자'; $lang['noauth'] = '(사용자 인증이 불가능합니다.)'; -- cgit v1.2.3 From 7deca91be61f76ac935c147107c82982252a688a Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Wed, 27 Oct 2010 11:46:27 -0400 Subject: White space fixes only - no functional changes --- inc/DifferenceEngine.php | 167 +++++++++++++++++++++-------------------------- 1 file changed, 75 insertions(+), 92 deletions(-) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 7b14e4463..7eae8bd93 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -30,7 +30,7 @@ class _DiffOp { class _DiffOp_Copy extends _DiffOp { var $type = 'copy'; - function _DiffOp_Copy ($orig, $closing = false) { + function _DiffOp_Copy($orig, $closing = false) { if (!is_array($closing)) $closing = $orig; $this->orig = $orig; @@ -45,7 +45,7 @@ class _DiffOp_Copy extends _DiffOp { class _DiffOp_Delete extends _DiffOp { var $type = 'delete'; - function _DiffOp_Delete ($lines) { + function _DiffOp_Delete($lines) { $this->orig = $lines; $this->closing = false; } @@ -58,7 +58,7 @@ class _DiffOp_Delete extends _DiffOp { class _DiffOp_Add extends _DiffOp { var $type = 'add'; - function _DiffOp_Add ($lines) { + function _DiffOp_Add($lines) { $this->closing = $lines; $this->orig = false; } @@ -71,7 +71,7 @@ class _DiffOp_Add extends _DiffOp { class _DiffOp_Change extends _DiffOp { var $type = 'change'; - function _DiffOp_Change ($orig, $closing) { + function _DiffOp_Change($orig, $closing) { $this->orig = $orig; $this->closing = $closing; } @@ -104,7 +104,7 @@ class _DiffOp_Change extends _DiffOp { */ class _DiffEngine { - function diff ($from_lines, $to_lines) { + function diff($from_lines, $to_lines) { $n_from = count($from_lines); $n_to = count($to_lines); @@ -135,7 +135,7 @@ class _DiffEngine { $xhash[$from_lines[$xi]] = 1; for ($yi = $skip; $yi < $n_to - $endskip; $yi++) { $line = $to_lines[$yi]; - if ( ($this->ychanged[$yi] = empty($xhash[$line])) ) + if (($this->ychanged[$yi] = empty($xhash[$line]))) continue; $yhash[$line] = 1; $this->yv[] = $line; @@ -143,7 +143,7 @@ class _DiffEngine { } for ($xi = $skip; $xi < $n_from - $endskip; $xi++) { $line = $from_lines[$xi]; - if ( ($this->xchanged[$xi] = empty($yhash[$line])) ) + if (($this->xchanged[$xi] = empty($yhash[$line]))) continue; $this->xv[] = $line; $this->xind[] = $xi; @@ -165,8 +165,7 @@ class _DiffEngine { // Skip matching "snake". $copy = array(); - while ( $xi < $n_from && $yi < $n_to - && !$this->xchanged[$xi] && !$this->ychanged[$yi]) { + while ($xi < $n_from && $yi < $n_to && !$this->xchanged[$xi] && !$this->ychanged[$yi]) { $copy[] = $from_lines[$xi++]; ++$yi; } @@ -210,15 +209,14 @@ class _DiffEngine { * match. The caller must trim matching lines from the beginning and end * of the portions it is going to specify. */ - function _diag ($xoff, $xlim, $yoff, $ylim, $nchunks) { + function _diag($xoff, $xlim, $yoff, $ylim, $nchunks) { $flip = false; if ($xlim - $xoff > $ylim - $yoff) { // Things seems faster (I'm not sure I understand why) // when the shortest sequence in X. $flip = true; - list ($xoff, $xlim, $yoff, $ylim) - = array( $yoff, $ylim, $xoff, $xlim); + list ($xoff, $xlim, $yoff, $ylim) = array($yoff, $ylim, $xoff, $xlim); } if ($flip) @@ -284,7 +282,7 @@ class _DiffEngine { return array($this->lcs, $seps); } - function _lcs_pos ($ypos) { + function _lcs_pos($ypos) { $end = $this->lcs; if ($end == 0 || $ypos > $this->seq[$end]) { $this->seq[++$this->lcs] = $ypos; @@ -295,7 +293,7 @@ class _DiffEngine { $beg = 1; while ($beg < $end) { $mid = (int)(($beg + $end) / 2); - if ( $ypos > $this->seq[$mid] ) + if ($ypos > $this->seq[$mid]) $beg = $mid + 1; else $end = $mid; @@ -321,17 +319,15 @@ class _DiffEngine { * Note that XLIM, YLIM are exclusive bounds. * All line numbers are origin-0 and discarded lines are not counted. */ - function _compareseq ($xoff, $xlim, $yoff, $ylim) { + function _compareseq($xoff, $xlim, $yoff, $ylim) { // Slide down the bottom initial diagonal. - while ($xoff < $xlim && $yoff < $ylim - && $this->xv[$xoff] == $this->yv[$yoff]) { + while ($xoff < $xlim && $yoff < $ylim && $this->xv[$xoff] == $this->yv[$yoff]) { ++$xoff; ++$yoff; } // Slide up the top initial diagonal. - while ($xlim > $xoff && $ylim > $yoff - && $this->xv[$xlim - 1] == $this->yv[$ylim - 1]) { + while ($xlim > $xoff && $ylim > $yoff && $this->xv[$xlim - 1] == $this->yv[$ylim - 1]) { --$xlim; --$ylim; } @@ -379,7 +375,7 @@ class _DiffEngine { * * This is extracted verbatim from analyze.c (GNU diffutils-2.7). */ - function _shift_boundaries ($lines, &$changed, $other_changed) { + function _shift_boundaries($lines, &$changed, $other_changed) { $i = 0; $j = 0; @@ -519,7 +515,7 @@ class Diff { * @return object A Diff object representing the inverse of the * original diff. */ - function reverse () { + function reverse() { $rev = $this; $rev->edits = array(); foreach ($this->edits as $edit) { @@ -533,7 +529,7 @@ class Diff { * * @return bool True iff two sequences were identical. */ - function isEmpty () { + function isEmpty() { foreach ($this->edits as $edit) { if ($edit->type != 'copy') return false; @@ -548,7 +544,7 @@ class Diff { * * @return int The length of the LCS. */ - function lcs () { + function lcs() { $lcs = 0; foreach ($this->edits as $edit) { if ($edit->type == 'copy') @@ -598,7 +594,7 @@ class Diff { * * This is here only for debugging purposes. */ - function _check ($from_lines, $to_lines) { + function _check($from_lines, $to_lines) { if (serialize($from_lines) != serialize($this->orig())) trigger_error("Reconstructed original doesn't match", E_USER_ERROR); if (serialize($to_lines) != serialize($this->closing())) @@ -612,7 +608,7 @@ class Diff { $prevtype = 'none'; foreach ($this->edits as $edit) { - if ( $prevtype == $edit->type ) + if ($prevtype == $edit->type) trigger_error("Edit sequence is non-optimal", E_USER_ERROR); $prevtype = $edit->type; } @@ -649,8 +645,7 @@ class MappedDiff extends Diff { * @param $mapped_to_lines array This array should * have the same number of elements as $to_lines. */ - function MappedDiff($from_lines, $to_lines, - $mapped_from_lines, $mapped_to_lines) { + function MappedDiff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { assert(count($from_lines) == count($mapped_from_lines)); assert(count($to_lines) == count($mapped_to_lines)); @@ -727,9 +722,7 @@ class DiffFormatter { $context = array_slice($edit->orig, 0, $ntrail); $block[] = new _DiffOp_Copy($context); } - $this->_block($x0, $ntrail + $xi - $x0, - $y0, $ntrail + $yi - $y0, - $block); + $this->_block($x0, $ntrail + $xi - $x0, $y0, $ntrail + $yi - $y0, $block); $block = false; } } @@ -754,9 +747,7 @@ class DiffFormatter { } if (is_array($block)) - $this->_block($x0, $xi - $x0, - $y0, $yi - $y0, - $block); + $this->_block($x0, $xi - $x0, $y0, $yi - $y0, $block); return $this->_end_diff(); } @@ -836,14 +827,14 @@ class DiffFormatter { define('NBSP', "\xC2\xA0"); // utf-8 non-breaking space. class _HWLDF_WordAccumulator { - function _HWLDF_WordAccumulator () { + function _HWLDF_WordAccumulator() { $this->_lines = array(); $this->_line = ''; $this->_group = ''; $this->_tag = ''; } - function _flushGroup ($new_tag) { + function _flushGroup($new_tag) { if ($this->_group !== '') { if ($this->_tag == 'mark') $this->_line .= ''.$this->_group.''; @@ -854,14 +845,14 @@ class _HWLDF_WordAccumulator { $this->_tag = $new_tag; } - function _flushLine ($new_tag) { + function _flushLine($new_tag) { $this->_flushGroup($new_tag); if ($this->_line != '') $this->_lines[] = $this->_line; $this->_line = ''; } - function addWords ($words, $tag = '') { + function addWords($words, $tag = '') { if ($tag != $this->_tag) $this->_flushGroup($tag); @@ -887,46 +878,44 @@ class _HWLDF_WordAccumulator { class WordLevelDiff extends MappedDiff { - function WordLevelDiff ($orig_lines, $closing_lines) { + function WordLevelDiff($orig_lines, $closing_lines) { list ($orig_words, $orig_stripped) = $this->_split($orig_lines); list ($closing_words, $closing_stripped) = $this->_split($closing_lines); - $this->MappedDiff($orig_words, $closing_words, - $orig_stripped, $closing_stripped); + $this->MappedDiff($orig_words, $closing_words, $orig_stripped, $closing_stripped); } function _split($lines) { - if (!preg_match_all('/ ( [^\S\n]+ | [0-9_A-Za-z\x80-\xff]+ | . ) (?: (?!< \n) [^\S\n])? /xs', - implode("\n", $lines), - $m)) { + if (!preg_match_all('/ ( [^\S\n]+ | [0-9_A-Za-z\x80-\xff]+ | . ) (?: (?!< \n) [^\S\n])? /xs', + implode("\n", $lines), $m)) { return array(array(''), array('')); - } - return array($m[0], $m[1]); - } + } + return array($m[0], $m[1]); + } - function orig () { - $orig = new _HWLDF_WordAccumulator; + function orig() { + $orig = new _HWLDF_WordAccumulator; - foreach ($this->edits as $edit) { + foreach ($this->edits as $edit) { if ($edit->type == 'copy') - $orig->addWords($edit->orig); + $orig->addWords($edit->orig); elseif ($edit->orig) - $orig->addWords($edit->orig, 'mark'); - } - return $orig->getLines(); - } + $orig->addWords($edit->orig, 'mark'); + } + return $orig->getLines(); + } - function closing () { - $closing = new _HWLDF_WordAccumulator; + function closing() { + $closing = new _HWLDF_WordAccumulator; - foreach ($this->edits as $edit) { - if ($edit->type == 'copy') - $closing->addWords($edit->closing); - elseif ($edit->closing) - $closing->addWords($edit->closing, 'mark'); - } - return $closing->getLines(); - } + foreach ($this->edits as $edit) { + if ($edit->type == 'copy') + $closing->addWords($edit->closing); + elseif ($edit->closing) + $closing->addWords($edit->closing, 'mark'); + } + return $closing->getLines(); + } } /** @@ -986,76 +975,70 @@ class TableDiffFormatter extends DiffFormatter { return $text; } - function _block_header( $xbeg, $xlen, $ybeg, $ylen ) { + function _block_header($xbeg, $xlen, $ybeg, $ylen) { global $lang; $l1 = $lang['line'].' '.$xbeg; $l2 = $lang['line'].' '.$ybeg; - $r = ''.$l1.":\n" . - ''.$l2.":\n"; + $r = ''.$l1.':\n'. + ' '.$l2.":\n'. + '\n"; return $r; } - function _start_block( $header ) { - print( $header ); + function _start_block($header) { + print($header); } function _end_block() { } - function _lines( $lines, $prefix=' ', $color="white" ) { + function _lines($lines, $prefix=' ', $color="white") { } - function addedLine( $line ) { - return '+' . - $line.''; - + function addedLine($line) { + return '+' . $line.''; } - function deletedLine( $line ) { - return '-' . - $line.''; + function deletedLine($line) { + return '-' . $line.''; } function emptyLine() { return ' '; } - function contextLine( $line ) { + function contextLine($line) { return ' '.$line.''; } function _added($lines) { foreach ($lines as $line) { - print( '' . $this->emptyLine() . - $this->addedLine( $line ) . "\n" ); + print('' . $this->emptyLine() . $this->addedLine($line) . "\n"); } } function _deleted($lines) { foreach ($lines as $line) { - print( '' . $this->deletedLine( $line ) . - $this->emptyLine() . "\n" ); + print('' . $this->deletedLine($line) . $this->emptyLine() . "\n"); } } - function _context( $lines ) { + function _context($lines) { foreach ($lines as $line) { - print( '' . $this->contextLine( $line ) . - $this->contextLine( $line ) . "\n" ); + print('' . $this->contextLine($line) . $this->contextLine($line) . "\n"); } } - function _changed( $orig, $closing ) { - $diff = new WordLevelDiff( $orig, $closing ); + function _changed($orig, $closing) { + $diff = new WordLevelDiff($orig, $closing); $del = $diff->orig(); $add = $diff->closing(); - while ( $line = array_shift( $del ) ) { - $aline = array_shift( $add ); - print( '' . $this->deletedLine( $line ) . - $this->addedLine( $aline ) . "\n" ); + while ($line = array_shift($del)) { + $aline = array_shift($add); + print('' . $this->deletedLine($line) . $this->addedLine($aline) . "\n"); } - $this->_added( $add ); # If any leftovers + $this->_added($add); # If any leftovers } } -- cgit v1.2.3 From 812bb04e971a47bee7e0da80d93831f1660efafb Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sat, 20 Nov 2010 11:53:38 +0100 Subject: Add support for inline diff formatting This patch only adds the capability to the Difference Engine lib, not to the user interface, yet. --- inc/DifferenceEngine.php | 115 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 7eae8bd93..a56fe9f6e 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -838,6 +838,10 @@ class _HWLDF_WordAccumulator { if ($this->_group !== '') { if ($this->_tag == 'mark') $this->_line .= ''.$this->_group.''; + elseif ($this->_tag == 'add') + $this->_line .= ''.$this->_group.''; + elseif ($this->_tag == 'del') + $this->_line .= ''.$this->_group.''; else $this->_line .= $this->_group; } @@ -918,6 +922,42 @@ class WordLevelDiff extends MappedDiff { } } +class InlineWordLevelDiff extends MappedDiff { + + function InlineWordLevelDiff($orig_lines, $closing_lines) { + list ($orig_words, $orig_stripped) = $this->_split($orig_lines); + list ($closing_words, $closing_stripped) = $this->_split($closing_lines); + + $this->MappedDiff($orig_words, $closing_words, $orig_stripped, $closing_stripped); + } + + function _split($lines) { + if (!preg_match_all('/ ( [^\S\n]+ | [0-9_A-Za-z\x80-\xff]+ | . ) (?: (?!< \n) [^\S\n])? /xs', + implode("\n", $lines), $m)) { + return array(array(''), array('')); + } + return array($m[0], $m[1]); + } + + function inline() { + $orig = new _HWLDF_WordAccumulator; + foreach ($this->edits as $edit) { + if ($edit->type == 'copy') + $orig->addWords($edit->orig); + elseif ($edit->type == 'change'){ + $orig->addWords($edit->orig, 'del'); + $orig->addWords($edit->closing, 'add'); + } elseif ($edit->type == 'delete') + $orig->addWords($edit->orig, 'del'); + elseif ($edit->type == 'add') + $orig->addWords($edit->closing, 'add'); + elseif ($edit->orig) + $orig->addWords($edit->orig, 'del'); + } + return $orig->getLines(); + } +} + /** * "Unified" diff formatter. * @@ -1042,5 +1082,80 @@ class TableDiffFormatter extends DiffFormatter { } } +/** + * Inline style diff formatter. + * + */ +class InlineDiffFormatter extends DiffFormatter { + + function InlineDiffFormatter() { + $this->leading_context_lines = 2; + $this->trailing_context_lines = 2; + } + + function format($diff) { + // Preserve whitespaces by converting some to non-breaking spaces. + // Do not convert all of them to allow word-wrap. + $val = parent::format($diff); + $val = str_replace(' ','  ', $val); + $val = preg_replace('/ (?=<)|(?<=[ >]) /', ' ', $val); + return $val; + } + + function _pre($text){ + $text = htmlspecialchars($text); + return $text; + } + + function _block_header($xbeg, $xlen, $ybeg, $ylen) { + global $lang; + if ($xlen != 1) + $xbeg .= "," . $xlen; + if ($ylen != 1) + $ybeg .= "," . $ylen; + $r = '@@ '.$lang['line']." -$xbeg +$ybeg @@"; + $r .= ' '.$lang['deleted'].''; + $r .= ' '.$lang['created'].''; + $r .= "\n"; + return $r; + } + + function _start_block($header) { + print($header."\n"); + } + + function _end_block() { + } + + function _lines($lines, $prefix=' ', $color="white") { + } + + function _added($lines) { + foreach ($lines as $line) { + print(''. $line . "\n"); + } + } + + function _deleted($lines) { + foreach ($lines as $line) { + print('' . $line . "\n"); + } + } + + function _context($lines) { + foreach ($lines as $line) { + print(''.$line."\n"); + } + } + + function _changed($orig, $closing) { + $diff = new InlineWordLevelDiff($orig, $closing); + $add = $diff->inline(); + + foreach ($add as $line) + print(''.$line."\n"); + } +} + //Setup VIM: ex: et ts=4 enc=utf-8 : -- cgit v1.2.3 From 4064e2d30906d01e696c5de106fd9ff356980a93 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sat, 20 Nov 2010 13:13:21 +0100 Subject: Handle do=check before ACL checking --- inc/actions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/actions.php b/inc/actions.php index 9db7d5f24..7a6d2eb85 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -50,6 +50,12 @@ function act_dispatch(){ } } + //display some infos + if($ACT == 'check'){ + check(); + $ACT = 'show'; + } + //check permissions $ACT = act_permcheck($ACT); @@ -120,12 +126,6 @@ function act_dispatch(){ if(substr($ACT,0,7) == 'export_') $ACT = act_export($ACT); - //display some infos - if($ACT == 'check'){ - check(); - $ACT = 'show'; - } - //handle admin tasks if($ACT == 'admin'){ // retrieve admin plugin name from $_REQUEST['page'] -- cgit v1.2.3 From 85dcda20ffd82becbe69a7ca5d99e4b6fd99c9ea Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Sat, 20 Nov 2010 13:17:00 +0100 Subject: Send 403 header for permission denied screens when send404 is enabled --- inc/actions.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inc/actions.php b/inc/actions.php index 7a6d2eb85..fb2ae452f 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -20,6 +20,7 @@ function act_dispatch(){ global $ID; global $QUERY; global $lang; + global $conf; $preact = $ACT; @@ -143,6 +144,10 @@ function act_dispatch(){ $ACT = act_permcheck($ACT); } // end event ACTION_ACT_PREPROCESS default action $evt->advise_after(); + // Make sure plugs can handle 'denied' + if($conf['send404'] && $ACT == 'denied') { + header('HTTP/1.0 403 Forbidden'); + } unset($evt); // when action 'show', the intial not 'show' and POST, do a redirect -- cgit v1.2.3 From ba6984cf400bde3cbdd7e1f203602cb0d04eb7d2 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Sat, 20 Nov 2010 15:35:17 +0100 Subject: Turkish language update --- inc/lang/tr/lang.php | 8 +++++--- lib/plugins/acl/lang/tr/lang.php | 5 ++--- lib/plugins/config/lang/tr/lang.php | 5 ++--- lib/plugins/plugin/lang/tr/lang.php | 5 ++--- lib/plugins/popularity/lang/tr/lang.php | 5 ++--- lib/plugins/revert/lang/tr/lang.php | 5 ++--- lib/plugins/usermanager/lang/tr/lang.php | 5 ++--- 7 files changed, 17 insertions(+), 21 deletions(-) diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php index c6d20c805..0c8c1ff3f 100644 --- a/inc/lang/tr/lang.php +++ b/inc/lang/tr/lang.php @@ -4,11 +4,10 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Selim Farsakoğlu - * @author Aydın Coşkuner aydinweb@gmail.com * @author Aydın Coşkuner - * @author yavuzselim@gmail.com - * @author Cihan Kahveci kahvecicihan@gmail.com + * @author Cihan Kahveci * @author Yavuz Selim + * @author Caleb Maclennan */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -186,6 +185,9 @@ $lang['qb_h2'] = '2. Seviye Başlık'; $lang['qb_h3'] = '3. Seviye Başlık'; $lang['qb_h4'] = '4. Seviye Başlık'; $lang['qb_h5'] = '5. Seviye Başlık'; +$lang['qb_h'] = 'Başlık'; +$lang['qb_hs'] = 'Başlığı seç'; +$lang['qb_hplus'] = 'Daha yüksek başlık'; $lang['qb_link'] = 'İç Bağlantı'; $lang['qb_extlink'] = 'Dış Bağlantı'; $lang['qb_hr'] = 'Yatay Çizgi'; diff --git a/lib/plugins/acl/lang/tr/lang.php b/lib/plugins/acl/lang/tr/lang.php index 45fbe7489..de96d2906 100644 --- a/lib/plugins/acl/lang/tr/lang.php +++ b/lib/plugins/acl/lang/tr/lang.php @@ -4,11 +4,10 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Selim Farsakoğlu - * @author Aydın Coşkuner aydinweb@gmail.com * @author Aydın Coşkuner - * @author yavuzselim@gmail.com - * @author Cihan Kahveci kahvecicihan@gmail.com + * @author Cihan Kahveci * @author Yavuz Selim + * @author Caleb Maclennan */ $lang['admin_acl'] = 'Erişim Kontrol Listesi (ACL) Yönetimi'; $lang['acl_group'] = 'Grup'; diff --git a/lib/plugins/config/lang/tr/lang.php b/lib/plugins/config/lang/tr/lang.php index 9929c663e..6d7d7cc2e 100644 --- a/lib/plugins/config/lang/tr/lang.php +++ b/lib/plugins/config/lang/tr/lang.php @@ -2,11 +2,10 @@ /** * Turkish language file * - * @author Aydın Coşkuner aydinweb@gmail.com * @author Aydın Coşkuner - * @author yavuzselim@gmail.com - * @author Cihan Kahveci kahvecicihan@gmail.com + * @author Cihan Kahveci * @author Yavuz Selim + * @author Caleb Maclennan */ $lang['menu'] = 'Site Ayarları'; $lang['error'] = 'Ayarlar yanlış bir değer girildiği için güncellenemedi. Lütfen değişikliklerinizi gözden geçirin ve tekrar gönderin. diff --git a/lib/plugins/plugin/lang/tr/lang.php b/lib/plugins/plugin/lang/tr/lang.php index 28db9109d..9a655e400 100644 --- a/lib/plugins/plugin/lang/tr/lang.php +++ b/lib/plugins/plugin/lang/tr/lang.php @@ -2,11 +2,10 @@ /** * Turkish language file * - * @author Aydın Coşkuner aydinweb@gmail.com * @author Aydın Coşkuner - * @author yavuzselim@gmail.com - * @author Cihan Kahveci kahvecicihan@gmail.com + * @author Cihan Kahveci * @author Yavuz Selim + * @author Caleb Maclennan */ $lang['menu'] = 'Eklenti Yönetimi'; $lang['download'] = 'Yeni bir eklenti indirip kur'; diff --git a/lib/plugins/popularity/lang/tr/lang.php b/lib/plugins/popularity/lang/tr/lang.php index 682b51218..fe87d1548 100644 --- a/lib/plugins/popularity/lang/tr/lang.php +++ b/lib/plugins/popularity/lang/tr/lang.php @@ -2,11 +2,10 @@ /** * Turkish language file * - * @author Aydın Coşkuner aydinweb@gmail.com * @author Aydın Coşkuner - * @author yavuzselim@gmail.com - * @author Cihan Kahveci kahvecicihan@gmail.com + * @author Cihan Kahveci * @author Yavuz Selim + * @author Caleb Maclennan */ $lang['name'] = 'Popülerlik Geribeslemesi (yüklemesi uzun sürebilir)'; $lang['submit'] = 'Verileri Gönder'; diff --git a/lib/plugins/revert/lang/tr/lang.php b/lib/plugins/revert/lang/tr/lang.php index 164a8ec4f..aa1458a95 100644 --- a/lib/plugins/revert/lang/tr/lang.php +++ b/lib/plugins/revert/lang/tr/lang.php @@ -2,11 +2,10 @@ /** * Turkish language file * - * @author Aydın Coşkuner aydinweb@gmail.com * @author Aydın Coşkuner - * @author yavuzselim@gmail.com - * @author Cihan Kahveci kahvecicihan@gmail.com + * @author Cihan Kahveci * @author Yavuz Selim + * @author Caleb Maclennan */ $lang['menu'] = 'Eskiye Döndürme'; $lang['filter'] = 'Spam bulunan sayfaları ara'; diff --git a/lib/plugins/usermanager/lang/tr/lang.php b/lib/plugins/usermanager/lang/tr/lang.php index 28127d9d0..b9c9cfc52 100644 --- a/lib/plugins/usermanager/lang/tr/lang.php +++ b/lib/plugins/usermanager/lang/tr/lang.php @@ -2,11 +2,10 @@ /** * Turkish language file * - * @author Aydın Coşkuner aydinweb@gmail.com * @author Aydın Coşkuner - * @author yavuzselim@gmail.com - * @author Cihan Kahveci kahvecicihan@gmail.com + * @author Cihan Kahveci * @author Yavuz Selim + * @author Caleb Maclennan */ $lang['menu'] = 'Kullanıcı Yönetimi'; $lang['noauth'] = '(kullanıcı onaylaması yoktur)'; -- cgit v1.2.3 From 91d55b797acf64322fa396dbfea34a78ea6b970f Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Sun, 21 Nov 2010 12:16:21 +0100 Subject: First step to upgrade to SimplePie 1.2 --- inc/FeedParser.php | 1 + inc/SimplePie.php | 13380 +++++++++++++++++++++++++++++++++------------------ 2 files changed, 8778 insertions(+), 4603 deletions(-) diff --git a/inc/FeedParser.php b/inc/FeedParser.php index 9d00e7abf..b98350da7 100644 --- a/inc/FeedParser.php +++ b/inc/FeedParser.php @@ -49,6 +49,7 @@ class FeedParser_File extends SimplePie_File { */ function FeedParser_File($url, $timeout=10, $redirects=5, $headers=null, $useragent=null, $force_fsockopen=false) { + parent::__construct(); $this->http = new DokuHTTPClient(); $this->success = $this->http->sendRequest($url); diff --git a/inc/SimplePie.php b/inc/SimplePie.php index 99c9f3226..1bbc2c0ec 100644 --- a/inc/SimplePie.php +++ b/inc/SimplePie.php @@ -5,7 +5,7 @@ * A PHP-Based RSS and Atom Feed Framework. * Takes the hard work out of managing a complete RSS/Atom solution. * - * Copyright (c) 2004-2007, Ryan Parman and Geoffrey Sneddon + * Copyright (c) 2004-2009, Ryan Parman and Geoffrey Sneddon * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are @@ -33,8 +33,8 @@ * POSSIBILITY OF SUCH DAMAGE. * * @package SimplePie - * @version "Razzleberry" - * @copyright 2004-2007 Ryan Parman, Geoffrey Sneddon + * @version 1.2.1-dev + * @copyright 2004-2009 Ryan Parman, Geoffrey Sneddon * @author Ryan Parman * @author Geoffrey Sneddon * @link http://simplepie.org/ SimplePie @@ -51,18 +51,18 @@ define('SIMPLEPIE_NAME', 'SimplePie'); /** * SimplePie Version */ -define('SIMPLEPIE_VERSION', '1.0.1'); +define('SIMPLEPIE_VERSION', '1.2.1-dev'); /** * SimplePie Build * @todo Hardcode for release (there's no need to have to call SimplePie_Misc::parse_date() only every load of simplepie.inc) */ -define('SIMPLEPIE_BUILD', 20070719221955); +define('SIMPLEPIE_BUILD', gmdate('YmdHis', SimplePie_Misc::parse_date(substr('$Date$', 7, 25)) ? SimplePie_Misc::parse_date(substr('$Date$', 7, 25)) : filemtime(__FILE__))); /** * SimplePie Website URL */ -define('SIMPLEPIE_URL', 'http://simplepie.org/'); +define('SIMPLEPIE_URL', 'http://simplepie.org'); /** * SimplePie Useragent @@ -242,10 +242,25 @@ define('SIMPLEPIE_CONSTRUCT_MAYBE_HTML', 32); */ define('SIMPLEPIE_CONSTRUCT_ALL', 63); +/** + * Don't change case + */ +define('SIMPLEPIE_SAME_CASE', 1); + +/** + * Change to lowercase + */ +define('SIMPLEPIE_LOWERCASE', 2); + +/** + * Change to uppercase + */ +define('SIMPLEPIE_UPPERCASE', 4); + /** * PCRE for HTML attributes */ -define('SIMPLEPIE_PCRE_HTML_ATTRIBUTE', '((?:\s+(?:(?:[^\s:]+:)?[^\s:]+)(?:\s*=\s*(?:"(?:[^"]*)"|\'(?:[^\']*)\'|(?:[a-z0-9\-._:]*)))?)*)\s*'); +define('SIMPLEPIE_PCRE_HTML_ATTRIBUTE', '((?:[\x09\x0A\x0B\x0C\x0D\x20]+[^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"(?:[^"]*)"|\'(?:[^\']*)\'|(?:[^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?)*)[\x09\x0A\x0B\x0C\x0D\x20]*'); /** * PCRE for XML attributes @@ -287,6 +302,12 @@ define('SIMPLEPIE_NAMESPACE_RSS_10', 'http://purl.org/rss/1.0/'); */ define('SIMPLEPIE_NAMESPACE_RSS_10_MODULES_CONTENT', 'http://purl.org/rss/1.0/modules/content/'); +/** + * RSS 2.0 Namespace + * (Stupid, I know, but I'm certain it will confuse people less with support.) + */ +define('SIMPLEPIE_NAMESPACE_RSS_20', ''); + /** * DC 1.0 Namespace */ @@ -312,6 +333,11 @@ define('SIMPLEPIE_NAMESPACE_GEORSS', 'http://www.georss.org/georss'); */ define('SIMPLEPIE_NAMESPACE_MEDIARSS', 'http://search.yahoo.com/mrss/'); +/** + * Wrong Media RSS Namespace + */ +define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG', 'http://search.yahoo.com/mrss'); + /** * iTunes RSS Namespace */ @@ -332,15 +358,40 @@ define('SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY', 'http://www.iana.org/assignment */ define('SIMPLEPIE_PHP5', version_compare(PHP_VERSION, '5.0.0', '>=')); +/** + * No file source + */ +define('SIMPLEPIE_FILE_SOURCE_NONE', 0); + +/** + * Remote file source + */ +define('SIMPLEPIE_FILE_SOURCE_REMOTE', 1); + +/** + * Local file source + */ +define('SIMPLEPIE_FILE_SOURCE_LOCAL', 2); + +/** + * fsockopen() file source + */ +define('SIMPLEPIE_FILE_SOURCE_FSOCKOPEN', 4); + +/** + * cURL file source + */ +define('SIMPLEPIE_FILE_SOURCE_CURL', 8); + +/** + * file_get_contents() file source + */ +define('SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS', 16); + /** * SimplePie * * @package SimplePie - * @version "Razzleberry" - * @copyright 2004-2007 Ryan Parman, Geoffrey Sneddon - * @author Ryan Parman - * @author Geoffrey Sneddon - * @todo Option for type of fetching (cache, not modified header, fetch, etc.) */ class SimplePie { @@ -406,6 +457,14 @@ class SimplePie */ var $force_fsockopen = false; + /** + * @var bool Force the given data/URL to be treated as a feed no matter what + * it appears like + * @see SimplePie::force_feed() + * @access private + */ + var $force_feed = false; + /** * @var bool Enable/Disable XML dump * @see SimplePie::enable_xml_dump() @@ -561,6 +620,20 @@ class SimplePie */ var $restriction_class = 'SimplePie_Restriction'; + /** + * @var string Class used for content-type sniffing + * @see SimplePie::set_content_type_sniffer_class() + * @access private + */ + var $content_type_sniffer_class = 'SimplePie_Content_Type_Sniffer'; + + /** + * @var string Class used for item sources. + * @see SimplePie::set_source_class() + * @access private + */ + var $source_class = 'SimplePie_Source'; + /** * @var mixed Set javascript query string parameter (false, or * anything type-cast to false, disables this feature) @@ -576,6 +649,13 @@ class SimplePie */ var $max_checked_feeds = 10; + /** + * @var array All the feeds found during the autodiscovery process + * @see SimplePie::get_all_discovered_feeds() + * @access private + */ + var $all_discovered_feeds = array(); + /** * @var string Web-accessible path to the handler_favicon.php file. * @see SimplePie::set_favicon_handler() @@ -610,6 +690,13 @@ class SimplePie */ var $config_settings = null; + /** + * @var integer Stores the number of items to return per-feed with multifeeds. + * @see SimplePie::set_item_limit() + * @access private + */ + var $item_limit = 0; + /** * @var array Stores the default attributes to be stripped by strip_attributes(). * @see SimplePie::strip_attributes() @@ -677,6 +764,45 @@ class SimplePie return md5(serialize($this->data)); } + /** + * Remove items that link back to this before destroying this object + */ + function __destruct() + { + if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode')) + { + if (!empty($this->data['items'])) + { + foreach ($this->data['items'] as $item) + { + $item->__destruct(); + } + unset($item, $this->data['items']); + } + if (!empty($this->data['ordered_items'])) + { + foreach ($this->data['ordered_items'] as $item) + { + $item->__destruct(); + } + unset($item, $this->data['ordered_items']); + } + } + } + + /** + * Force the given data/URL to be treated as a feed no matter what it + * appears like + * + * @access public + * @since 1.1 + * @param bool $enable Force the given data/URL to be treated as a feed + */ + function force_feed($enable = false) + { + $this->force_feed = (bool) $enable; + } + /** * This is the URL of the feed you want to parse. * @@ -718,7 +844,7 @@ class SimplePie */ function set_file(&$file) { - if (SimplePie_Misc::is_a($file, 'SimplePie_File')) + if (is_a($file, 'SimplePie_File')) { $this->feed_url = $file->url; $this->file =& $file; @@ -741,7 +867,7 @@ class SimplePie */ function set_raw_data($data) { - $this->raw_data = trim($data); + $this->raw_data = $data; } /** @@ -1156,6 +1282,44 @@ class SimplePie return false; } + /** + * Allows you to change which class SimplePie uses for content-type sniffing. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_content_type_sniffer_class($class = 'SimplePie_Content_Type_Sniffer') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Content_Type_Sniffer')) + { + $this->content_type_sniffer_class = $class; + return true; + } + return false; + } + + /** + * Allows you to change which class SimplePie uses item sources. + * Useful when you are overloading or extending SimplePie's default classes. + * + * @access public + * @param string $class Name of custom class. + * @link http://php.net/manual/en/keyword.extends.php PHP4 extends documentation + * @link http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.extends PHP5 extends documentation + */ + function set_source_class($class = 'SimplePie_Source') + { + if (SimplePie_Misc::is_subclass_of($class, 'SimplePie_Source')) + { + $this->source_class = $class; + return true; + } + return false; + } + /** * Allows you to override the default user agent string. * @@ -1294,7 +1458,7 @@ class SimplePie */ function set_favicon_handler($page = false, $qs = 'i') { - if ($page != false) + if ($page !== false) { $this->favicon_handler = $page . '?' . $qs . '='; } @@ -1313,7 +1477,7 @@ class SimplePie */ function set_image_handler($page = false, $qs = 'i') { - if ($page != false) + if ($page !== false) { $this->sanitize->set_image_handler($page . '?' . $qs . '='); } @@ -1323,47 +1487,44 @@ class SimplePie } } + /** + * Set the limit for items returned per-feed with multifeeds. + * + * @access public + * @param integer $limit The maximum number of items to return. + */ + function set_item_limit($limit = 0) + { + $this->item_limit = (int) $limit; + } + function init() { - if ((function_exists('version_compare') && version_compare(PHP_VERSION, '4.1.0', '<')) || !extension_loaded('xml') || !extension_loaded('pcre')) + // Check absolute bare minimum requirements. + if ((function_exists('version_compare') && version_compare(PHP_VERSION, '4.3.0', '<')) || !extension_loaded('xml') || !extension_loaded('pcre')) { return false; } - if (isset($_GET[$this->javascript])) + // Then check the xml extension is sane (i.e., libxml 2.7.x issue on PHP < 5.2.9 and libxml 2.7.0 to 2.7.2 on any version) if we don't have xmlreader. + elseif (!extension_loaded('xmlreader')) { - if (function_exists('ob_gzhandler')) + static $xml_is_sane = null; + if ($xml_is_sane === null) { - ob_start('ob_gzhandler'); + $parser_check = xml_parser_create(); + xml_parse_into_struct($parser_check, '&', $values); + xml_parser_free($parser_check); + $xml_is_sane = isset($values[0]['value']); } - header('Content-type: text/javascript; charset: UTF-8'); - header('Cache-Control: must-revalidate'); - header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days - ?> -function embed_odeo(link) { - document.writeln(''); -} - -function embed_quicktime(type, bgcolor, width, height, link, placeholder, loop) { - if (placeholder != '') { - document.writeln(''); - } - else { - document.writeln(''); - } -} - -function embed_flash(bgcolor, width, height, link, loop, type) { - document.writeln(''); -} - -function embed_flv(width, height, link, placeholder, loop, player) { - document.writeln(''); -} + if (!$xml_is_sane) + { + return false; + } + } -function embed_wmedia(width, height, link) { - document.writeln(''); -} - javascript])) + { + SimplePie_Misc::output_javascript(); exit; } @@ -1383,7 +1544,7 @@ function embed_wmedia(width, height, link) { // Decide whether to enable caching if ($this->cache && $parsed_feed_url['scheme'] !== '') { - $cache = new $this->cache_class($this->cache_location, call_user_func($this->cache_name_function, $this->feed_url), 'spc'); + $cache = call_user_func(array($this->cache_class, 'create'), $this->cache_location, call_user_func($this->cache_name_function, $this->feed_url), 'spc'); } // If it's enabled and we don't want an XML dump, use the cache if ($cache && !$this->xml_dump) @@ -1393,13 +1554,13 @@ function embed_wmedia(width, height, link) { if (!empty($this->data)) { // If the cache is for an outdated build of SimplePie - if (!isset($this->data['build']) || $this->data['build'] != SIMPLEPIE_BUILD) + if (!isset($this->data['build']) || $this->data['build'] !== SIMPLEPIE_BUILD) { $cache->unlink(); $this->data = array(); } // If we've hit a collision just rerun it with caching disabled - elseif (isset($this->data['url']) && $this->data['url'] != $this->feed_url) + elseif (isset($this->data['url']) && $this->data['url'] !== $this->feed_url) { $cache = false; $this->data = array(); @@ -1411,7 +1572,7 @@ function embed_wmedia(width, height, link) { if ($cache->mtime() + $this->autodiscovery_cache_duration > time()) { // Do not need to do feed autodiscovery yet. - if ($this->data['feed_url'] == $this->data['url']) + if ($this->data['feed_url'] === $this->data['url']) { $cache->unlink(); $this->data = array(); @@ -1436,12 +1597,12 @@ function embed_wmedia(width, height, link) { } if (isset($this->data['headers']['etag'])) { - $headers['if-none-match'] = $this->data['headers']['etag']; + $headers['if-none-match'] = '"' . $this->data['headers']['etag'] . '"'; } $file = new $this->file_class($this->feed_url, $this->timeout/10, 5, $headers, $this->useragent, $this->force_fsockopen); if ($file->success) { - if ($file->status_code == 304) + if ($file->status_code === 304) { $cache->touch(); return true; @@ -1473,7 +1634,7 @@ function embed_wmedia(width, height, link) { // If we don't already have the file (it'll only exist if we've opened it to check if the cache has been modified), open it. if (!isset($file)) { - if (SimplePie_Misc::is_a($this->file, 'SimplePie_File') && $this->file->url == $this->feed_url) + if (is_a($this->file, 'SimplePie_File') && $this->file->url === $this->feed_url) { $file =& $this->file; } @@ -1483,7 +1644,7 @@ function embed_wmedia(width, height, link) { } } // If the file connection has an error, set SimplePie::error to that and quit - if (!$file->success) + if (!$file->success && !($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300))) { $this->error = $file->error; if (!empty($this->data)) @@ -1496,148 +1657,150 @@ function embed_wmedia(width, height, link) { } } - // Check if the supplied URL is a feed, if it isn't, look for it. - $locate = new $this->locator_class($file, $this->timeout, $this->useragent, $this->file_class, $this->max_checked_feeds); - if (!$locate->is_feed($file)) + if (!$this->force_feed) { - // We need to unset this so that if SimplePie::set_file() has been called that object is untouched - unset($file); - if ($file = $locate->find($this->autodiscovery)) + // Check if the supplied URL is a feed, if it isn't, look for it. + $locate = new $this->locator_class($file, $this->timeout, $this->useragent, $this->file_class, $this->max_checked_feeds, $this->content_type_sniffer_class); + if (!$locate->is_feed($file)) { - if ($cache) + // We need to unset this so that if SimplePie::set_file() has been called that object is untouched + unset($file); + if ($file = $locate->find($this->autodiscovery, $this->all_discovered_feeds)) { - if (!$cache->save(array('url' => $this->feed_url, 'feed_url' => $file->url, 'build' => SIMPLEPIE_BUILD))) + if ($cache) { - trigger_error("$cache->name is not writeable", E_USER_WARNING); + $this->data = array('url' => $this->feed_url, 'feed_url' => $file->url, 'build' => SIMPLEPIE_BUILD); + if (!$cache->save($this)) + { + trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING); + } + $cache = call_user_func(array($this->cache_class, 'create'), $this->cache_location, call_user_func($this->cache_name_function, $file->url), 'spc'); } - $cache = new $this->cache_class($this->cache_location, call_user_func($this->cache_name_function, $file->url), 'spc'); + $this->feed_url = $file->url; + } + else + { + $this->error = "A feed could not be found at $this->feed_url. A feed with an invalid mime type may fall victim to this error, or " . SIMPLEPIE_NAME . " was unable to auto-discover it.. Use force_feed() if you are certain this URL is a real feed."; + SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__); + return false; } - $this->feed_url = $file->url; - } - else - { - $this->error = "A feed could not be found at $this->feed_url"; - SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__); - return false; } + $locate = null; } - $locate = null; $headers = $file->headers; - $data = trim($file->body); - unset($file); + $data = $file->body; + $sniffer = new $this->content_type_sniffer_class($file); + $sniffed = $sniffer->get_type(); } else { $data = $this->raw_data; } + // Set up array of possible encodings + $encodings = array(); + // First check to see if input has been overridden. if ($this->input_encoding !== false) { - $encoding = $this->input_encoding; - } - // Second try HTTP headers - elseif (isset($headers['content-type']) && preg_match('/;[\x09\x20]*charset=([^;]*)/i', $headers['content-type'], $charset)) - { - $encoding = $charset[1]; - } - // Then prolog, if at the very start of the document - elseif (preg_match("/^<\?xml[\x20\x9\xD\xA]+version([\x20\x9\xD\xA]+)?=([\x20\x9\xD\xA]+)?(\"1.0\"|'1.0'|\"1.1\"|'1.1')[\x20\x9\xD\xA]+encoding([\x20\x9\xD\xA]+)?=([\x20\x9\xD\xA]+)?(\"[A-Za-z][A-Za-z0-9._\-]*\"|'[A-Za-z][A-Za-z0-9._\-]*')([\x20\x9\xD\xA]+standalone([\x20\x9\xD\xA]+)?=([\x20\x9\xD\xA]+)?(\"(yes|no)\"|'(yes|no)'))?([\x20\x9\xD\xA]+)?\?>/", $data, $prolog)) - { - $encoding = substr($prolog[6], 1, -1); - } - // UTF-32 Big Endian BOM - elseif (strpos($data, "\x0\x0\xFE\xFF") === 0) - { - $encoding = 'UTF-32be'; - } - // UTF-32 Little Endian BOM - elseif (strpos($data, "\xFF\xFE\x0\x0") === 0) - { - $encoding = 'UTF-32'; - } - // UTF-16 Big Endian BOM - elseif (strpos($data, "\xFE\xFF") === 0) - { - $encoding = 'UTF-16be'; - } - // UTF-16 Little Endian BOM - elseif (strpos($data, "\xFF\xFE") === 0) - { - $encoding = 'UTF-16le'; - } - // UTF-8 BOM - elseif (strpos($data, "\xEF\xBB\xBF") === 0) - { - $encoding = 'UTF-8'; - } - // Fallback to the default (US-ASCII for text/xml, ISO-8859-1 for text/* MIME types, UTF-8 otherwise) - elseif (isset($headers['content-type']) && strtolower(SimplePie_Misc::parse_mime($headers['content-type'])) == 'text/xml') - { - $encoding = 'US-ASCII'; - } - elseif (isset($headers['content-type']) && SimplePie_Misc::stripos(SimplePie_Misc::parse_mime($headers['content-type']), 'text/') === 0) - { - $encoding = 'ISO-8859-1'; - } - else - { - $encoding = 'UTF-8'; + $encodings[] = $this->input_encoding; } - // Change the encoding to UTF-8 (as we always use UTF-8 internally) - if ($encoding != 'UTF-8') + $application_types = array('application/xml', 'application/xml-dtd', 'application/xml-external-parsed-entity'); + $text_types = array('text/xml', 'text/xml-external-parsed-entity'); + + // RFC 3023 (only applies to sniffed content) + if (isset($sniffed)) { - $data = SimplePie_Misc::change_encoding($data, $encoding, 'UTF-8'); + if (in_array($sniffed, $application_types) || substr($sniffed, 0, 12) === 'application/' && substr($sniffed, -4) === '+xml') + { + if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) + { + $encodings[] = strtoupper($charset[1]); + } + $encodings = array_merge($encodings, SimplePie_Misc::xml_encoding($data)); + $encodings[] = 'UTF-8'; + } + elseif (in_array($sniffed, $text_types) || substr($sniffed, 0, 5) === 'text/' && substr($sniffed, -4) === '+xml') + { + if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) + { + $encodings[] = $charset[1]; + } + $encodings[] = 'US-ASCII'; + } + // Text MIME-type default + elseif (substr($sniffed, 0, 5) === 'text/') + { + $encodings[] = 'US-ASCII'; + } } - // Strip illegal characters - $data = SimplePie_Misc::utf8_bad_replace($data); + // Fallback to XML 1.0 Appendix F.1/UTF-8/ISO-8859-1 + $encodings = array_merge($encodings, SimplePie_Misc::xml_encoding($data)); + $encodings[] = 'UTF-8'; + $encodings[] = 'ISO-8859-1'; + + // There's no point in trying an encoding twice + $encodings = array_unique($encodings); - $parser = new $this->parser_class(); - $parser->pre_process($data, 'UTF-8'); - // If we want the XML, just output that and quit + // If we want the XML, just output that with the most likely encoding and quit if ($this->xml_dump) { - header('Content-type: text/xml; charset=UTF-8'); + header('Content-type: text/xml; charset=' . $encodings[0]); echo $data; exit; } - // If it's parsed fine - elseif ($parser->parse($data)) + + // Loop through each possible encoding, till we return something, or run out of possibilities + foreach ($encodings as $encoding) { - unset($data); - $this->data = $parser->get_data(); - if (isset($this->data['child'])) + // Change the encoding to UTF-8 (as we always use UTF-8 internally) + if ($utf8_data = SimplePie_Misc::change_encoding($data, $encoding, 'UTF-8')) { - if (isset($headers)) - { - $this->data['headers'] = $headers; - } - $this->data['build'] = SIMPLEPIE_BUILD; + // Create new parser + $parser = new $this->parser_class(); - // Cache the file if caching is enabled - if ($cache && !$cache->save($this->data)) + // If it's parsed fine + if ($parser->parse($utf8_data, 'UTF-8')) { - trigger_error("$cache->name is not writeable", E_USER_WARNING); + $this->data = $parser->get_data(); + if ($this->get_type() & ~SIMPLEPIE_TYPE_NONE) + { + if (isset($headers)) + { + $this->data['headers'] = $headers; + } + $this->data['build'] = SIMPLEPIE_BUILD; + + // Cache the file if caching is enabled + if ($cache && !$cache->save($this)) + { + trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING); + } + return true; + } + else + { + $this->error = "A feed could not be found at $this->feed_url. This does not appear to be a valid RSS or Atom feed."; + SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__); + return false; + } } - return true; - } - else - { - $this->error = "A feed could not be found at $this->feed_url"; - SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__); - return false; } } - // If we have an error, just set SimplePie::error to it and quit + if (isset($parser)) + { + // We have an error, just set SimplePie_Misc::error to it and quit + $this->error = sprintf('This XML document is invalid, likely due to invalid characters. XML error: %s at line %d, column %d', $parser->get_error_string(), $parser->get_current_line(), $parser->get_current_column()); + } else { - $this->error = sprintf('XML error: %s at line %d, column %d', $parser->get_error_string(), $parser->get_current_line(), $parser->get_current_column()); - SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__); - return false; + $this->error = 'The data could not be converted to UTF-8. You MUST have either the iconv or mbstring extension installed. Upgrading to PHP 5.x (which includes iconv) is highly recommended.'; } + SimplePie_Misc::error($this->error, E_USER_NOTICE, __FILE__, __LINE__); + return false; } elseif (!empty($this->multifeed_url)) { @@ -1730,18 +1893,18 @@ function embed_wmedia(width, height, link) { $this->data['type'] &= SIMPLEPIE_TYPE_RSS_090; } } - elseif (isset($this->data['child']['']['rss'])) + elseif (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'])) { $this->data['type'] &= SIMPLEPIE_TYPE_RSS_ALL; - if (isset($this->data['child']['']['rss'][0]['attribs']['']['version'])) + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['attribs']['']['version'])) { - switch (trim($this->data['child']['']['rss'][0]['attribs']['']['version'])) + switch (trim($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['attribs']['']['version'])) { case '0.91': $this->data['type'] &= SIMPLEPIE_TYPE_RSS_091; - if (isset($this->data['child']['']['rss'][0]['child']['']['skiphours']['hour'][0]['data'])) + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['skiphours']['hour'][0]['data'])) { - switch (trim($this->data['child']['']['rss'][0]['child']['']['skiphours']['hour'][0]['data'])) + switch (trim($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['skiphours']['hour'][0]['data'])) { case '0': $this->data['type'] &= SIMPLEPIE_TYPE_RSS_091_NETSCAPE; @@ -1783,6 +1946,7 @@ function embed_wmedia(width, height, link) { /** * Returns the URL for the favicon of the feed's website. * + * @todo Cache atom:icon * @access public * @since 1.0 */ @@ -1798,26 +1962,36 @@ function embed_wmedia(width, height, link) { if ($this->cache && $this->favicon_handler) { - $cache = new $this->cache_class($this->cache_location, call_user_func($this->cache_name_function, $favicon), 'spi'); + $favicon_filename = call_user_func($this->cache_name_function, $favicon); + $cache = call_user_func(array($this->cache_class, 'create'), $this->cache_location, $favicon_filename, 'spi'); if ($cache->load()) { - return $this->sanitize($this->favicon_handler . rawurlencode($favicon), SIMPLEPIE_CONSTRUCT_IRI); + return $this->sanitize($this->favicon_handler . $favicon_filename, SIMPLEPIE_CONSTRUCT_IRI); } else { $file = new $this->file_class($favicon, $this->timeout / 10, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen); - if ($file->success && ($file->status_code == 200 || ($file->status_code > 206 && $file->status_code < 300)) && strlen($file->body) > 0) + if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300)) && strlen($file->body) > 0) { - if ($cache->save(array('headers' => $file->headers, 'body' => $file->body))) + $sniffer = new $this->content_type_sniffer_class($file); + if (substr($sniffer->get_type(), 0, 6) === 'image/') { - return $this->sanitize($this->favicon_handler . rawurlencode($favicon), SIMPLEPIE_CONSTRUCT_IRI); + if ($cache->save(array('headers' => $file->headers, 'body' => $file->body))) + { + return $this->sanitize($this->favicon_handler . $favicon_filename, SIMPLEPIE_CONSTRUCT_IRI); + } + else + { + trigger_error("$cache->name is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING); + return $this->sanitize($favicon, SIMPLEPIE_CONSTRUCT_IRI); + } } + // not an image else { - trigger_error("$cache->name is not writeable", E_USER_WARNING); - return $this->sanitize($favicon, SIMPLEPIE_CONSTRUCT_IRI); + return false; } } } @@ -1863,7 +2037,7 @@ function embed_wmedia(width, height, link) { { if ($this->feed_url !== null) { - return 'outlook' . $this->sanitize(SimplePie_Misc::fix_protocol($this->feed_url, 2), SIMPLEPIE_CONSTRUCT_IRI); + return $this->sanitize('outlook' . SimplePie_Misc::fix_protocol($this->feed_url, 2), SIMPLEPIE_CONSTRUCT_IRI); } else { @@ -1908,12 +2082,12 @@ function embed_wmedia(width, height, link) { { if ($this->subscribe_url()) { - $return = $this->sanitize($feed_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->subscribe_url()); + $return = $feed_url . rawurlencode($this->feed_url); if ($site_url !== null && $this->get_link() !== null) { - $return .= $this->sanitize($site_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->get_link()); + $return .= $site_url . rawurlencode($this->get_link()); } - return $return; + return $this->sanitize($return, SIMPLEPIE_CONSTRUCT_IRI); } else { @@ -1928,7 +2102,7 @@ function embed_wmedia(width, height, link) { function subscribe_bloglines() { - return urldecode($this->subscribe_service('http://www.bloglines.com/sub/')); + return $this->subscribe_service('http://www.bloglines.com/sub/'); } function subscribe_eskobo() @@ -2022,9 +2196,9 @@ function embed_wmedia(width, height, link) { } if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION) { - if (isset($this->data['child']['']['rss'][0]['child'][$namespace][$tag])) + if (isset($this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][$namespace][$tag])) { - return $this->data['child']['']['rss'][0]['child'][$namespace][$tag]; + return $this->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][$namespace][$tag]; } } return null; @@ -2062,7 +2236,7 @@ function embed_wmedia(width, height, link) { } if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION) { - if ($channel = $this->get_feed_tags('', 'channel')) + if ($channel = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'channel')) { if (isset($channel[0]['child'][$namespace][$tag])) { @@ -2098,7 +2272,7 @@ function embed_wmedia(width, height, link) { } if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION) { - if ($image = $this->get_channel_tags('', 'image')) + if ($image = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'image')) { if (isset($image[0]['child'][$namespace][$tag])) { @@ -2119,10 +2293,6 @@ function embed_wmedia(width, height, link) { { return $this->get_link(); } - elseif (isset($this->data['headers']['content-location'])) - { - return SimplePie_Misc::absolutize_url($this->data['headers']['content-location'], $this->subscribe_url()); - } else { return $this->subscribe_url(); @@ -2152,7 +2322,7 @@ function embed_wmedia(width, height, link) { { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); } - elseif ($return = $this->get_channel_tags('', 'title')) + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); } @@ -2170,12 +2340,12 @@ function embed_wmedia(width, height, link) { } } - function get_link($key = 0, $rel = 'alternate') + function get_category($key = 0) { - $links = $this->get_links($rel); - if (isset($links[$key])) + $categories = $this->get_categories(); + if (isset($categories[$key])) { - return $links[$key]; + return $categories[$key]; } else { @@ -2183,33 +2353,257 @@ function embed_wmedia(width, height, link) { } } - /** - * Added for parity between the parent-level and the item/entry-level. - */ - function get_permalink() + function get_categories() { - return $this->get_link(0); - } + $categories = array(); - function get_links($rel = 'alternate') - { - if (!isset($this->data['links'])) + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category) { - $this->data['links'] = array(); - if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link')) + $term = null; + $scheme = null; + $label = null; + if (isset($category['attribs']['']['term'])) { - foreach ($links as $link) - { - if (isset($link['attribs']['']['href'])) - { - $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate'; - $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); - } - } + $term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_TEXT); } - if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link')) + if (isset($category['attribs']['']['scheme'])) { - foreach ($links as $link) + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] = new $this->category_class($term, $scheme, $label); + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category) + { + // This is really the label, but keep this as the term also for BC. + // Label will also work on retrieving because that falls back to term. + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + if (isset($category['attribs']['']['domain'])) + { + $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = null; + } + $categories[] = new $this->category_class($term, $scheme, null); + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category) + { + $categories[] = new $this->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category) + { + $categories[] = new $this->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + + if (!empty($categories)) + { + return SimplePie_Misc::array_unique($categories); + } + else + { + return null; + } + } + + function get_author($key = 0) + { + $authors = $this->get_authors(); + if (isset($authors[$key])) + { + return $authors[$key]; + } + else + { + return null; + } + } + + function get_authors() + { + $authors = array(); + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author) + { + $name = null; + $uri = null; + $email = null; + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) + { + $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $authors[] = new $this->author_class($name, $uri, $email); + } + } + if ($author = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author')) + { + $name = null; + $url = null; + $email = null; + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) + { + $name = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) + { + $url = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $authors[] = new $this->author_class($name, $url, $email); + } + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author) + { + $authors[] = new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author) + { + $authors[] = new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author) + { + $authors[] = new $this->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + + if (!empty($authors)) + { + return SimplePie_Misc::array_unique($authors); + } + else + { + return null; + } + } + + function get_contributor($key = 0) + { + $contributors = $this->get_contributors(); + if (isset($contributors[$key])) + { + return $contributors[$key]; + } + else + { + return null; + } + } + + function get_contributors() + { + $contributors = array(); + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor) + { + $name = null; + $uri = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $contributors[] = new $this->author_class($name, $uri, $email); + } + } + foreach ((array) $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor) + { + $name = null; + $url = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) + { + $url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $contributors[] = new $this->author_class($name, $url, $email); + } + } + + if (!empty($contributors)) + { + return SimplePie_Misc::array_unique($contributors); + } + else + { + return null; + } + } + + function get_link($key = 0, $rel = 'alternate') + { + $links = $this->get_links($rel); + if (isset($links[$key])) + { + return $links[$key]; + } + else + { + return null; + } + } + + /** + * Added for parity between the parent-level and the item/entry-level. + */ + function get_permalink() + { + return $this->get_link(0); + } + + function get_links($rel = 'alternate') + { + if (!isset($this->data['links'])) + { + $this->data['links'] = array(); + if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link')) + { + foreach ($links as $link) + { + if (isset($link['attribs']['']['href'])) + { + $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate'; + $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + } + } + } + if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link')) + { + foreach ($links as $link) { if (isset($link['attribs']['']['href'])) { @@ -2227,7 +2621,7 @@ function embed_wmedia(width, height, link) { { $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); } - if ($links = $this->get_channel_tags('', 'link')) + if ($links = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link')) { $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); } @@ -2247,7 +2641,7 @@ function embed_wmedia(width, height, link) { $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; } } - elseif (substr($key, 0, 41) == SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) + elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) { $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; } @@ -2265,6 +2659,11 @@ function embed_wmedia(width, height, link) { } } + function get_all_discovered_feeds() + { + return $this->all_discovered_feeds; + } + function get_description() { if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle')) @@ -2283,9 +2682,9 @@ function embed_wmedia(width, height, link) { { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); } - elseif ($return = $this->get_channel_tags('', 'description')) + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); } elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) { @@ -2315,7 +2714,11 @@ function embed_wmedia(width, height, link) { { return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); } - elseif ($return = $this->get_channel_tags('', 'copyright')) + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright')) { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } @@ -2335,7 +2738,7 @@ function embed_wmedia(width, height, link) { function get_language() { - if ($return = $this->get_channel_tags('', 'language')) + if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language')) { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } @@ -2371,11 +2774,12 @@ function embed_wmedia(width, height, link) { function get_latitude() { + if ($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat')) { return (float) $return[0]['data']; } - elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', $return[0]['data'], $match)) + elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) { return (float) $match[1]; } @@ -2395,7 +2799,7 @@ function embed_wmedia(width, height, link) { { return (float) $return[0]['data']; } - elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', $return[0]['data'], $match)) + elseif (($return = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) { return (float) $match[2]; } @@ -2415,7 +2819,7 @@ function embed_wmedia(width, height, link) { { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - elseif ($return = $this->get_image_tags('', 'title')) + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } @@ -2455,7 +2859,7 @@ function embed_wmedia(width, height, link) { { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); } - elseif ($return = $this->get_image_tags('', 'url')) + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); } @@ -2475,7 +2879,7 @@ function embed_wmedia(width, height, link) { { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); } - elseif ($return = $this->get_image_tags('', 'link')) + elseif ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link')) { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); } @@ -2487,11 +2891,11 @@ function embed_wmedia(width, height, link) { function get_image_width() { - if ($return = $this->get_image_tags('', 'width')) + if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'width')) { return round($return[0]['data']); } - elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags('', 'url')) + elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) { return 88.0; } @@ -2503,11 +2907,11 @@ function embed_wmedia(width, height, link) { function get_image_height() { - if ($return = $this->get_image_tags('', 'height')) + if ($return = $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'height')) { return round($return[0]['data']); } - elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags('', 'url')) + elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'url')) { return 31.0; } @@ -2519,8 +2923,9 @@ function embed_wmedia(width, height, link) { function get_item_quantity($max = 0) { + $max = (int) $max; $qty = count($this->get_items()); - if ($max == 0) + if ($max === 0) { return $qty; } @@ -2545,50 +2950,54 @@ function embed_wmedia(width, height, link) { function get_items($start = 0, $end = 0) { - if (!empty($this->multifeed_objects)) - { - return SimplePie::merge_items($this->multifeed_objects, $start, $end); - } - elseif (!isset($this->data['items'])) + if (!isset($this->data['items'])) { - if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'entry')) + if (!empty($this->multifeed_objects)) { - $keys = array_keys($items); - foreach ($keys as $key) - { - $this->data['items'][] = new $this->item_class($this, $items[$key]); - } + $this->data['items'] = SimplePie::merge_items($this->multifeed_objects, $start, $end, $this->item_limit); } - if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'entry')) + else { - $keys = array_keys($items); - foreach ($keys as $key) + $this->data['items'] = array(); + if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'entry')) { - $this->data['items'][] = new $this->item_class($this, $items[$key]); + $keys = array_keys($items); + foreach ($keys as $key) + { + $this->data['items'][] = new $this->item_class($this, $items[$key]); + } } - } - if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'item')) - { - $keys = array_keys($items); - foreach ($keys as $key) + if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'entry')) { - $this->data['items'][] = new $this->item_class($this, $items[$key]); + $keys = array_keys($items); + foreach ($keys as $key) + { + $this->data['items'][] = new $this->item_class($this, $items[$key]); + } } - } - if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'item')) - { - $keys = array_keys($items); - foreach ($keys as $key) + if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'item')) { - $this->data['items'][] = new $this->item_class($this, $items[$key]); + $keys = array_keys($items); + foreach ($keys as $key) + { + $this->data['items'][] = new $this->item_class($this, $items[$key]); + } } - } - if ($items = $this->get_channel_tags('', 'item')) - { - $keys = array_keys($items); - foreach ($keys as $key) + if ($items = $this->get_feed_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'item')) + { + $keys = array_keys($items); + foreach ($keys as $key) + { + $this->data['items'][] = new $this->item_class($this, $items[$key]); + } + } + if ($items = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'item')) { - $this->data['items'][] = new $this->item_class($this, $items[$key]); + $keys = array_keys($items); + foreach ($keys as $key) + { + $this->data['items'][] = new $this->item_class($this, $items[$key]); + } } } } @@ -2596,7 +3005,7 @@ function embed_wmedia(width, height, link) { if (!empty($this->data['items'])) { // If we want to order it by date, check if all items have a date, and then sort it - if ($this->order_by_date) + if ($this->order_by_date && empty($this->multifeed_objects)) { if (!isset($this->data['ordered_items'])) { @@ -2624,7 +3033,7 @@ function embed_wmedia(width, height, link) { } // Slice the data as desired - if ($end == 0) + if ($end === 0) { return array_slice($items, $start); } @@ -2639,21 +3048,27 @@ function embed_wmedia(width, height, link) { } } + /** + * @static + */ function sort_items($a, $b) { return $a->get_date('U') <= $b->get_date('U'); } - function merge_items($urls, $start = 0, $end = 0) + /** + * @static + */ + function merge_items($urls, $start = 0, $end = 0, $limit = 0) { if (is_array($urls) && sizeof($urls) > 0) { $items = array(); foreach ($urls as $arg) { - if (SimplePie_Misc::is_a($arg, 'SimplePie')) + if (is_a($arg, 'SimplePie')) { - $items = array_merge($items, $arg->get_items()); + $items = array_merge($items, $arg->get_items(0, $limit)); } else { @@ -2676,7 +3091,7 @@ function embed_wmedia(width, height, link) { usort($items, array('SimplePie', 'sort_items')); } - if ($end == 0) + if ($end === 0) { return array_slice($items, $start); } @@ -2709,6 +3124,17 @@ class SimplePie_Item return md5(serialize($this->data)); } + /** + * Remove items that link back to this before destroying this object + */ + function __destruct() + { + if ((version_compare(PHP_VERSION, '5.3', '<') || !gc_enabled()) && !ini_get('zend.ze1_compatibility_mode')) + { + unset($this->feed); + } + } + function get_item_tags($namespace, $tag) { if (isset($this->data['child'][$namespace][$tag])) @@ -2738,78 +3164,85 @@ class SimplePie_Item function get_id($hash = false) { - if ($hash) + if (!$hash) { - return $this->__toString(); + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'id')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'id')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'guid')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'identifier')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'identifier')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (($return = $this->get_permalink()) !== null) + { + return $return; + } + elseif (($return = $this->get_title()) !== null) + { + return $return; + } } - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'id')) + if ($this->get_permalink() !== null || $this->get_title() !== null) { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + return md5($this->get_permalink() . $this->get_title()); } - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'id')) + else { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + return md5(serialize($this->data)); } - elseif ($return = $this->get_item_tags('', 'guid')) + } + + function get_title() + { + if (!isset($this->data['title'])) { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'identifier')) - { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'identifier')) - { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - elseif (($return = $this->get_permalink()) !== null) - { - return $return; - } - elseif (($return = $this->get_title()) !== null) - { - return $return; - } - else - { - return $this->__toString(); - } - } - - function get_title() - { - if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) - { - return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); - } - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) - { - return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); - } - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) - { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); - } - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) - { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); - } - elseif ($return = $this->get_item_tags('', 'title')) - { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); - } - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) - { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) - { - return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - else - { - return null; + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) + { + $this->data['title'] = $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $this->data['title'] = null; + } } + return $this->data['title']; } function get_description($description_only = false) @@ -2826,7 +3259,7 @@ class SimplePie_Item { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); } - elseif ($return = $this->get_item_tags('', 'description')) + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) { return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); } @@ -2916,9 +3349,20 @@ class SimplePie_Item } $categories[] = new $this->feed->category_class($term, $scheme, $label); } - foreach ((array) $this->get_item_tags('', 'category') as $category) + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category) { - $categories[] = new $this->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + // This is really the label, but keep this as the term also for BC. + // Label will also work on retrieving because that falls back to term. + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + if (isset($category['attribs']['']['domain'])) + { + $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = null; + } + $categories[] = new $this->feed->category_class($term, $scheme, null); } foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category) { @@ -2952,9 +3396,77 @@ class SimplePie_Item } } - /** - * @todo Atom inheritance (item author, source author, feed author) - */ + function get_contributor($key = 0) + { + $contributors = $this->get_contributors(); + if (isset($contributors[$key])) + { + return $contributors[$key]; + } + else + { + return null; + } + } + + function get_contributors() + { + $contributors = array(); + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor) + { + $name = null; + $uri = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $contributors[] = new $this->feed->author_class($name, $uri, $email); + } + } + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor) + { + $name = null; + $url = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) + { + $url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $contributors[] = new $this->feed->author_class($name, $url, $email); + } + } + + if (!empty($contributors)) + { + return SimplePie_Misc::array_unique($contributors); + } + else + { + return null; + } + } + function get_authors() { $authors = array(); @@ -2991,18 +3503,18 @@ class SimplePie_Item } if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) { - $uri = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + $url = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); } if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) { $email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - if ($name !== null || $email !== null || $uri !== null) + if ($name !== null || $email !== null || $url !== null) { $authors[] = new $this->feed->author_class($name, $url, $email); } } - if ($author = $this->get_item_tags('', 'author')) + if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'author')) { $authors[] = new $this->feed->author_class(null, null, $this->sanitize($author[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); } @@ -3023,6 +3535,34 @@ class SimplePie_Item { return SimplePie_Misc::array_unique($authors); } + elseif (($source = $this->get_source()) && ($authors = $source->get_authors())) + { + return $authors; + } + elseif ($authors = $this->feed->get_authors()) + { + return $authors; + } + else + { + return null; + } + } + + function get_copyright() + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights')) + { + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } else { return null; @@ -3053,7 +3593,7 @@ class SimplePie_Item { $this->data['date']['raw'] = $return[0]['data']; } - elseif ($return = $this->get_item_tags('', 'pubDate')) + elseif ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'pubDate')) { $this->data['date']['raw'] = $return[0]['data']; } @@ -3068,7 +3608,8 @@ class SimplePie_Item if (!empty($this->data['date']['raw'])) { - $this->data['date']['parsed'] = SimplePie_Misc::parse_date($this->data['date']['raw']); + $parser = SimplePie_Parse_Date::get(); + $this->data['date']['parsed'] = $parser->parse($this->data['date']['raw']); } else { @@ -3173,13 +3714,13 @@ class SimplePie_Item { $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); } - if ($links = $this->get_item_tags('', 'link')) + if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link')) { $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); } - if ($links = $this->get_item_tags('', 'guid')) + if ($links = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'guid')) { - if (!isset($links[0]['attribs']['']['isPermaLink']) || strtolower(trim($links[0]['attribs']['']['isPermaLink'])) == 'true') + if (!isset($links[0]['attribs']['']['isPermaLink']) || strtolower(trim($links[0]['attribs']['']['isPermaLink'])) === 'true') { $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); } @@ -3200,7 +3741,7 @@ class SimplePie_Item $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; } } - elseif (substr($key, 0, 41) == SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) + elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) { $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; } @@ -3241,7 +3782,6 @@ class SimplePie_Item * At this point, we're pretty much assuming that all enclosures for an item are the same content. Anything else is too complicated to properly support. * * @todo Add support for end-user defined sorting of enclosures by type/handler (so we can prefer the faster-loading FLV over MP4). - * @todo Add support for itunes: tags. These should be relatively simple compared to media:. * @todo If an element exists at a level, but it's value is empty, we should fall back to the value from the parent (if it exists). */ function get_enclosures() @@ -3767,7 +4307,7 @@ class SimplePie_Item $restriction_relationship = 'allow'; $restriction_type = null; $restriction_value = 'itunes'; - if (isset($restriction['data']) && strtolower($restriction['data']) == 'yes') + if (isset($restriction['data']) && strtolower($restriction['data']) === 'yes') { $restriction_relationship = 'deny'; } @@ -3803,7 +4343,7 @@ class SimplePie_Item $restriction_relationship = 'allow'; $restriction_type = null; $restriction_value = 'itunes'; - if (isset($restriction['data']) && strtolower($restriction['data']) == 'yes') + if (isset($restriction['data']) && strtolower($restriction['data']) === 'yes') { $restriction_relationship = 'deny'; } @@ -3856,624 +4396,657 @@ class SimplePie_Item // Clear the memory unset($parent); + // Attributes + $bitrate = null; + $channels = null; + $duration = null; + $expression = null; + $framerate = null; + $height = null; + $javascript = null; + $lang = null; + $length = null; + $medium = null; + $samplingrate = null; + $type = null; + $url = null; + $width = null; + + // Elements + $captions = null; + $categories = null; + $copyrights = null; + $credits = null; + $description = null; + $hashes = null; + $keywords = null; + $player = null; + $ratings = null; + $restrictions = null; + $thumbnails = null; + $title = null; + // If we have media:group tags, loop through them. foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'group') as $group) { - // If we have media:content tags, loop through them. - foreach ((array) $group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'] as $content) + if(isset($group['child']) && isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'])) { - if (isset($content['attribs']['']['url'])) + // If we have media:content tags, loop through them. + foreach ((array) $group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'] as $content) { - // Attributes - $bitrate = null; - $channels = null; - $duration = null; - $expression = null; - $framerate = null; - $height = null; - $javascript = null; - $lang = null; - $length = null; - $medium = null; - $samplingrate = null; - $type = null; - $url = null; - $width = null; - - // Elements - $captions = null; - $categories = null; - $copyrights = null; - $credits = null; - $description = null; - $hashes = null; - $keywords = null; - $player = null; - $ratings = null; - $restrictions = null; - $thumbnails = null; - $title = null; - - // Start checking the attributes of media:content - if (isset($content['attribs']['']['bitrate'])) - { - $bitrate = $this->sanitize($content['attribs']['']['bitrate'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($content['attribs']['']['channels'])) - { - $channels = $this->sanitize($content['attribs']['']['channels'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($content['attribs']['']['duration'])) - { - $duration = $this->sanitize($content['attribs']['']['duration'], SIMPLEPIE_CONSTRUCT_TEXT); - } - else - { - $duration = $duration_parent; - } - if (isset($content['attribs']['']['expression'])) - { - $expression = $this->sanitize($content['attribs']['']['expression'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($content['attribs']['']['framerate'])) - { - $framerate = $this->sanitize($content['attribs']['']['framerate'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($content['attribs']['']['height'])) - { - $height = $this->sanitize($content['attribs']['']['height'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($content['attribs']['']['lang'])) - { - $lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($content['attribs']['']['fileSize'])) - { - $length = ceil($content['attribs']['']['fileSize']); - } - if (isset($content['attribs']['']['medium'])) - { - $medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($content['attribs']['']['samplingrate'])) - { - $samplingrate = $this->sanitize($content['attribs']['']['samplingrate'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($content['attribs']['']['type'])) - { - $type = $this->sanitize($content['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($content['attribs']['']['width'])) + if (isset($content['attribs']['']['url'])) { - $width = $this->sanitize($content['attribs']['']['width'], SIMPLEPIE_CONSTRUCT_TEXT); - } - $url = $this->sanitize($content['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + // Attributes + $bitrate = null; + $channels = null; + $duration = null; + $expression = null; + $framerate = null; + $height = null; + $javascript = null; + $lang = null; + $length = null; + $medium = null; + $samplingrate = null; + $type = null; + $url = null; + $width = null; + + // Elements + $captions = null; + $categories = null; + $copyrights = null; + $credits = null; + $description = null; + $hashes = null; + $keywords = null; + $player = null; + $ratings = null; + $restrictions = null; + $thumbnails = null; + $title = null; + + // Start checking the attributes of media:content + if (isset($content['attribs']['']['bitrate'])) + { + $bitrate = $this->sanitize($content['attribs']['']['bitrate'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['channels'])) + { + $channels = $this->sanitize($content['attribs']['']['channels'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['duration'])) + { + $duration = $this->sanitize($content['attribs']['']['duration'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $duration = $duration_parent; + } + if (isset($content['attribs']['']['expression'])) + { + $expression = $this->sanitize($content['attribs']['']['expression'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['framerate'])) + { + $framerate = $this->sanitize($content['attribs']['']['framerate'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['height'])) + { + $height = $this->sanitize($content['attribs']['']['height'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['lang'])) + { + $lang = $this->sanitize($content['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['fileSize'])) + { + $length = ceil($content['attribs']['']['fileSize']); + } + if (isset($content['attribs']['']['medium'])) + { + $medium = $this->sanitize($content['attribs']['']['medium'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['samplingrate'])) + { + $samplingrate = $this->sanitize($content['attribs']['']['samplingrate'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['type'])) + { + $type = $this->sanitize($content['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($content['attribs']['']['width'])) + { + $width = $this->sanitize($content['attribs']['']['width'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $url = $this->sanitize($content['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); - // Checking the other optional media: elements. Priority: media:content, media:group, item, channel + // Checking the other optional media: elements. Priority: media:content, media:group, item, channel - // CAPTIONS - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) - { - foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption) + // CAPTIONS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) { - $caption_type = null; - $caption_lang = null; - $caption_startTime = null; - $caption_endTime = null; - $caption_text = null; - if (isset($caption['attribs']['']['type'])) - { - $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($caption['attribs']['']['lang'])) + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption) { - $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + $caption_type = null; + $caption_lang = null; + $caption_startTime = null; + $caption_endTime = null; + $caption_text = null; + if (isset($caption['attribs']['']['type'])) + { + $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['lang'])) + { + $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['start'])) + { + $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['end'])) + { + $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['data'])) + { + $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $captions[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text); } - if (isset($caption['attribs']['']['start'])) + if (is_array($captions)) { - $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); + $captions = array_values(SimplePie_Misc::array_unique($captions)); } - if (isset($caption['attribs']['']['end'])) + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) + { + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption) { - $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); + $caption_type = null; + $caption_lang = null; + $caption_startTime = null; + $caption_endTime = null; + $caption_text = null; + if (isset($caption['attribs']['']['type'])) + { + $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['lang'])) + { + $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['start'])) + { + $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['attribs']['']['end'])) + { + $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($caption['data'])) + { + $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $captions[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text); } - if (isset($caption['data'])) + if (is_array($captions)) { - $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $captions = array_values(SimplePie_Misc::array_unique($captions)); } - $captions[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text); } - if (is_array($captions)) + else { - $captions = array_values(SimplePie_Misc::array_unique($captions)); + $captions = $captions_parent; } - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'])) - { - foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['text'] as $caption) + + // CATEGORIES + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'])) { - $caption_type = null; - $caption_lang = null; - $caption_startTime = null; - $caption_endTime = null; - $caption_text = null; - if (isset($caption['attribs']['']['type'])) - { - $caption_type = $this->sanitize($caption['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($caption['attribs']['']['lang'])) - { - $caption_lang = $this->sanitize($caption['attribs']['']['lang'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($caption['attribs']['']['start'])) - { - $caption_startTime = $this->sanitize($caption['attribs']['']['start'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($caption['attribs']['']['end'])) + foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category) { - $caption_endTime = $this->sanitize($caption['attribs']['']['end'], SIMPLEPIE_CONSTRUCT_TEXT); + $term = null; + $scheme = null; + $label = null; + if (isset($category['data'])) + { + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = 'http://search.yahoo.com/mrss/category_schema'; + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] = new $this->feed->category_class($term, $scheme, $label); } - if (isset($caption['data'])) + } + if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'])) + { + foreach ((array) $group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category) { - $caption_text = $this->sanitize($caption['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $term = null; + $scheme = null; + $label = null; + if (isset($category['data'])) + { + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = 'http://search.yahoo.com/mrss/category_schema'; + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] = new $this->feed->category_class($term, $scheme, $label); } - $captions[] = new $this->feed->caption_class($caption_type, $caption_lang, $caption_startTime, $caption_endTime, $caption_text); } - if (is_array($captions)) + if (is_array($categories) && is_array($categories_parent)) { - $captions = array_values(SimplePie_Misc::array_unique($captions)); + $categories = array_values(SimplePie_Misc::array_unique(array_merge($categories, $categories_parent))); + } + elseif (is_array($categories)) + { + $categories = array_values(SimplePie_Misc::array_unique($categories)); + } + elseif (is_array($categories_parent)) + { + $categories = array_values(SimplePie_Misc::array_unique($categories_parent)); } - } - else - { - $captions = $captions_parent; - } - // CATEGORIES - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'])) - { - foreach ((array) $content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category) + // COPYRIGHTS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'])) { - $term = null; - $scheme = null; - $label = null; - if (isset($category['data'])) + $copyright_url = null; + $copyright_label = null; + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'])) { - $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $copyright_url = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT); } - if (isset($category['attribs']['']['scheme'])) + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'])) { - $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + $copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - else + $copyrights = new $this->feed->copyright_class($copyright_url, $copyright_label); + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'])) + { + $copyright_url = null; + $copyright_label = null; + if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'])) { - $scheme = 'http://search.yahoo.com/mrss/category_schema'; + $copyright_url = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT); } - if (isset($category['attribs']['']['label'])) + if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'])) { - $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + $copyright_label = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - $categories[] = new $this->feed->category_class($term, $scheme, $label); + $copyrights = new $this->feed->copyright_class($copyright_url, $copyright_label); } - } - if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'])) - { - foreach ((array) $group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['category'] as $category) + else { - $term = null; - $scheme = null; - $label = null; - if (isset($category['data'])) + $copyrights = $copyrights_parent; + } + + // CREDITS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit) { - $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $credit_role = null; + $credit_scheme = null; + $credit_name = null; + if (isset($credit['attribs']['']['role'])) + { + $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($credit['attribs']['']['scheme'])) + { + $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $credit_scheme = 'urn:ebu'; + } + if (isset($credit['data'])) + { + $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $credits[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name); } - if (isset($category['attribs']['']['scheme'])) + if (is_array($credits)) { - $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + $credits = array_values(SimplePie_Misc::array_unique($credits)); } - else + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'])) + { + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit) { - $scheme = 'http://search.yahoo.com/mrss/category_schema'; + $credit_role = null; + $credit_scheme = null; + $credit_name = null; + if (isset($credit['attribs']['']['role'])) + { + $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($credit['attribs']['']['scheme'])) + { + $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $credit_scheme = 'urn:ebu'; + } + if (isset($credit['data'])) + { + $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $credits[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name); } - if (isset($category['attribs']['']['label'])) + if (is_array($credits)) { - $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + $credits = array_values(SimplePie_Misc::array_unique($credits)); } - $categories[] = new $this->feed->category_class($term, $scheme, $label); } - } - if (is_array($categories) && is_array($categories_parent)) - { - $categories = array_values(SimplePie_Misc::array_unique(array_merge($categories, $categories_parent))); - } - elseif (is_array($categories)) - { - $categories = array_values(SimplePie_Misc::array_unique($categories)); - } - elseif (is_array($categories_parent)) - { - $categories = array_values(SimplePie_Misc::array_unique($categories_parent)); - } - - // COPYRIGHTS - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'])) - { - $copyright_url = null; - $copyright_label = null; - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'])) + else { - $copyright_url = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT); + $credits = $credits_parent; } - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'])) + + // DESCRIPTION + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) { - $copyright_label = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - $copyrights = new $this->feed->copyright_class($copyright_url, $copyright_label); - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'])) - { - $copyright_url = null; - $copyright_label = null; - if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'])) + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) { - $copyright_url = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_TEXT); + $description = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'])) + else { - $copyright_label = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['copyright'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $description = $description_parent; } - $copyrights = new $this->feed->copyright_class($copyright_url, $copyright_label); - } - else - { - $copyrights = $copyrights_parent; - } - // CREDITS - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'])) - { - foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit) + // HASHES + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'])) { - $credit_role = null; - $credit_scheme = null; - $credit_name = null; - if (isset($credit['attribs']['']['role'])) + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash) { - $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT); + $value = null; + $algo = null; + if (isset($hash['data'])) + { + $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($hash['attribs']['']['algo'])) + { + $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $algo = 'md5'; + } + $hashes[] = $algo.':'.$value; } - if (isset($credit['attribs']['']['scheme'])) + if (is_array($hashes)) { - $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + $hashes = array_values(SimplePie_Misc::array_unique($hashes)); } - else + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'])) + { + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash) { - $credit_scheme = 'urn:ebu'; + $value = null; + $algo = null; + if (isset($hash['data'])) + { + $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($hash['attribs']['']['algo'])) + { + $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $algo = 'md5'; + } + $hashes[] = $algo.':'.$value; } - if (isset($credit['data'])) + if (is_array($hashes)) { - $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $hashes = array_values(SimplePie_Misc::array_unique($hashes)); } - $credits[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name); } - if (is_array($credits)) + else { - $credits = array_values(SimplePie_Misc::array_unique($credits)); + $hashes = $hashes_parent; } - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'])) - { - foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['credit'] as $credit) + + // KEYWORDS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'])) { - $credit_role = null; - $credit_scheme = null; - $credit_name = null; - if (isset($credit['attribs']['']['role'])) + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'])) { - $credit_role = $this->sanitize($credit['attribs']['']['role'], SIMPLEPIE_CONSTRUCT_TEXT); + $temp = explode(',', $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + foreach ($temp as $word) + { + $keywords[] = trim($word); + } + unset($temp); } - if (isset($credit['attribs']['']['scheme'])) + if (is_array($keywords)) { - $credit_scheme = $this->sanitize($credit['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + $keywords = array_values(SimplePie_Misc::array_unique($keywords)); } - else + } + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'])) + { + if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'])) { - $credit_scheme = 'urn:ebu'; + $temp = explode(',', $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); + foreach ($temp as $word) + { + $keywords[] = trim($word); + } + unset($temp); } - if (isset($credit['data'])) + if (is_array($keywords)) { - $credit_name = $this->sanitize($credit['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $keywords = array_values(SimplePie_Misc::array_unique($keywords)); } - $credits[] = new $this->feed->credit_class($credit_role, $credit_scheme, $credit_name); } - if (is_array($credits)) + else { - $credits = array_values(SimplePie_Misc::array_unique($credits)); + $keywords = $keywords_parent; } - } - else - { - $credits = $credits_parent; - } - - // DESCRIPTION - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) - { - $description = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'])) - { - $description = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['description'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - else - { - $description = $description_parent; - } - // HASHES - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'])) - { - foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash) + // PLAYER + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) { - $value = null; - $algo = null; - if (isset($hash['data'])) - { - $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($hash['attribs']['']['algo'])) - { - $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); - } - else - { - $algo = 'md5'; - } - $hashes[] = $algo.':'.$value; + $player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); } - if (is_array($hashes)) + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) { - $hashes = array_values(SimplePie_Misc::array_unique($hashes)); + $player = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); } - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'])) - { - foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['hash'] as $hash) + else { - $value = null; - $algo = null; - if (isset($hash['data'])) - { - $value = $this->sanitize($hash['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($hash['attribs']['']['algo'])) + $player = $player_parent; + } + + // RATINGS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) + { + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating) { - $algo = $this->sanitize($hash['attribs']['']['algo'], SIMPLEPIE_CONSTRUCT_TEXT); + $rating_scheme = null; + $rating_value = null; + if (isset($rating['attribs']['']['scheme'])) + { + $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $rating_scheme = 'urn:simple'; + } + if (isset($rating['data'])) + { + $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $ratings[] = new $this->feed->rating_class($rating_scheme, $rating_value); } - else + if (is_array($ratings)) { - $algo = 'md5'; + $ratings = array_values(SimplePie_Misc::array_unique($ratings)); } - $hashes[] = $algo.':'.$value; - } - if (is_array($hashes)) - { - $hashes = array_values(SimplePie_Misc::array_unique($hashes)); } - } - else - { - $hashes = $hashes_parent; - } - - // KEYWORDS - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'])) - { - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'])) + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) { - $temp = explode(',', $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); - foreach ($temp as $word) + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating) { - $keywords[] = trim($word); + $rating_scheme = null; + $rating_value = null; + if (isset($rating['attribs']['']['scheme'])) + { + $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $rating_scheme = 'urn:simple'; + } + if (isset($rating['data'])) + { + $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $ratings[] = new $this->feed->rating_class($rating_scheme, $rating_value); } - unset($temp); - } - if (is_array($keywords)) - { - $keywords = array_values(SimplePie_Misc::array_unique($keywords)); - } - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'])) - { - if (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'])) - { - $temp = explode(',', $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['keywords'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT)); - foreach ($temp as $word) + if (is_array($ratings)) { - $keywords[] = trim($word); + $ratings = array_values(SimplePie_Misc::array_unique($ratings)); } - unset($temp); } - if (is_array($keywords)) + else { - $keywords = array_values(SimplePie_Misc::array_unique($keywords)); + $ratings = $ratings_parent; } - } - else - { - $keywords = $keywords_parent; - } - - // PLAYER - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) - { - $player = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'])) - { - $player = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['player'][0]['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); - } - else - { - $player = $player_parent; - } - // RATINGS - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) - { - foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating) + // RESTRICTIONS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'])) { - $rating_scheme = null; - $rating_value = null; - if (isset($rating['attribs']['']['scheme'])) - { - $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); - } - else + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction) { - $rating_scheme = 'urn:simple'; + $restriction_relationship = null; + $restriction_type = null; + $restriction_value = null; + if (isset($restriction['attribs']['']['relationship'])) + { + $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['attribs']['']['type'])) + { + $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['data'])) + { + $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $restrictions[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); } - if (isset($rating['data'])) + if (is_array($restrictions)) { - $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $restrictions = array_values(SimplePie_Misc::array_unique($restrictions)); } - $ratings[] = new $this->feed->rating_class($rating_scheme, $rating_value); - } - if (is_array($ratings)) - { - $ratings = array_values(SimplePie_Misc::array_unique($ratings)); } - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'])) - { - foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['rating'] as $rating) + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'])) { - $rating_scheme = null; - $rating_value = null; - if (isset($rating['attribs']['']['scheme'])) - { - $rating_scheme = $this->sanitize($rating['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); - } - else + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction) { - $rating_scheme = 'urn:simple'; + $restriction_relationship = null; + $restriction_type = null; + $restriction_value = null; + if (isset($restriction['attribs']['']['relationship'])) + { + $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['attribs']['']['type'])) + { + $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($restriction['data'])) + { + $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $restrictions[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); } - if (isset($rating['data'])) + if (is_array($restrictions)) { - $rating_value = $this->sanitize($rating['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $restrictions = array_values(SimplePie_Misc::array_unique($restrictions)); } - $ratings[] = new $this->feed->rating_class($rating_scheme, $rating_value); } - if (is_array($ratings)) + else { - $ratings = array_values(SimplePie_Misc::array_unique($ratings)); + $restrictions = $restrictions_parent; } - } - else - { - $ratings = $ratings_parent; - } - // RESTRICTIONS - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'])) - { - foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction) + // THUMBNAILS + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'])) { - $restriction_relationship = null; - $restriction_type = null; - $restriction_value = null; - if (isset($restriction['attribs']['']['relationship'])) + foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail) { - $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($restriction['attribs']['']['type'])) - { - $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); } - if (isset($restriction['data'])) + if (is_array($thumbnails)) { - $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $thumbnails = array_values(SimplePie_Misc::array_unique($thumbnails)); } - $restrictions[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); } - if (is_array($restrictions)) - { - $restrictions = array_values(SimplePie_Misc::array_unique($restrictions)); - } - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'])) - { - foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['restriction'] as $restriction) + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'])) { - $restriction_relationship = null; - $restriction_type = null; - $restriction_value = null; - if (isset($restriction['attribs']['']['relationship'])) - { - $restriction_relationship = $this->sanitize($restriction['attribs']['']['relationship'], SIMPLEPIE_CONSTRUCT_TEXT); - } - if (isset($restriction['attribs']['']['type'])) + foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail) { - $restriction_type = $this->sanitize($restriction['attribs']['']['type'], SIMPLEPIE_CONSTRUCT_TEXT); + $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); } - if (isset($restriction['data'])) + if (is_array($thumbnails)) { - $restriction_value = $this->sanitize($restriction['data'], SIMPLEPIE_CONSTRUCT_TEXT); + $thumbnails = array_values(SimplePie_Misc::array_unique($thumbnails)); } - $restrictions[] = new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value); } - if (is_array($restrictions)) + else { - $restrictions = array_values(SimplePie_Misc::array_unique($restrictions)); + $thumbnails = $thumbnails_parent; } - } - else - { - $restrictions = $restrictions_parent; - } - // THUMBNAILS - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'])) - { - foreach ($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail) - { - $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); - } - if (is_array($thumbnails)) + // TITLES + if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) { - $thumbnails = array_values(SimplePie_Misc::array_unique($thumbnails)); + $title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'])) - { - foreach ($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['thumbnail'] as $thumbnail) + elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) { - $thumbnails[] = $this->sanitize($thumbnail['attribs']['']['url'], SIMPLEPIE_CONSTRUCT_IRI); + $title = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - if (is_array($thumbnails)) + else { - $thumbnails = array_values(SimplePie_Misc::array_unique($thumbnails)); + $title = $title_parent; } - } - else - { - $thumbnails = $thumbnails_parent; - } - // TITLES - if (isset($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) - { - $title = $this->sanitize($content['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - elseif (isset($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'])) - { - $title = $this->sanitize($group['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['title'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); - } - else - { - $title = $title_parent; + $this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width); } - - $this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions, $categories, $channels, $copyrights, $credits, $description, $duration, $expression, $framerate, $hashes, $height, $keywords, $lang, $medium, $player, $ratings, $restrictions, $samplingrate, $thumbnails, $title, $width); } } } @@ -4884,7 +5457,7 @@ class SimplePie_Item foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link') as $link) { - if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] == 'enclosure') + if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure') { // Attributes $bitrate = null; @@ -4919,7 +5492,7 @@ class SimplePie_Item foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link') as $link) { - if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] == 'enclosure') + if (isset($link['attribs']['']['href']) && !empty($link['attribs']['']['rel']) && $link['attribs']['']['rel'] === 'enclosure') { // Attributes $bitrate = null; @@ -4952,7 +5525,7 @@ class SimplePie_Item } } - if ($enclosure = $this->get_item_tags('', 'enclosure')) + if ($enclosure = $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'enclosure')) { if (isset($enclosure[0]['attribs']['']['url'])) { @@ -4986,6 +5559,13 @@ class SimplePie_Item $this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width); } } + + if (sizeof($this->data['enclosures']) === 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width)) + { + // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor + $this->data['enclosures'][] = new $this->feed->enclosure_class($url, $type, $length, $this->feed->javascript, $bitrate, $captions_parent, $categories_parent, $channels, $copyrights_parent, $credits_parent, $description_parent, $duration_parent, $expression, $framerate, $hashes_parent, $height, $keywords_parent, $lang, $medium, $player_parent, $ratings_parent, $restrictions_parent, $samplingrate, $thumbnails_parent, $title_parent, $width); + } + $this->data['enclosures'] = array_values(SimplePie_Misc::array_unique($this->data['enclosures'])); } if (!empty($this->data['enclosures'])) @@ -5004,7 +5584,7 @@ class SimplePie_Item { return (float) $return[0]['data']; } - elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', $return[0]['data'], $match)) + elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) { return (float) $match[1]; } @@ -5024,7 +5604,7 @@ class SimplePie_Item { return (float) $return[0]['data']; } - elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', $return[0]['data'], $match)) + elseif (($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) { return (float) $match[2]; } @@ -5034,6 +5614,18 @@ class SimplePie_Item } } + function get_source() + { + if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'source')) + { + return new $this->feed->source_class($this, $return[0]); + } + else + { + return null; + } + } + /** * Creates the add_to_* methods' return data * @@ -5043,16 +5635,20 @@ class SimplePie_Item * (and suffix to the item permalink) * @return mixed URL if feed exists, false otherwise */ - function add_to_service($item_url, $title_url = null) + function add_to_service($item_url, $title_url = null, $summary_url = null) { if ($this->get_permalink() !== null) { - $return = $this->sanitize($item_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->get_permalink()); + $return = $item_url . rawurlencode($this->get_permalink()); if ($title_url !== null && $this->get_title() !== null) { - $return .= $this->sanitize($title_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->get_title()); + $return .= $title_url . rawurlencode($this->get_title()); } - return $return; + if ($summary_url !== null && $this->get_description() !== null) + { + $return .= $summary_url . rawurlencode($this->get_description()); + } + return $this->sanitize($return, SIMPLEPIE_CONSTRUCT_IRI); } else { @@ -5072,12 +5668,12 @@ class SimplePie_Item function add_to_delicious() { - return $this->add_to_service('http://del.icio.us/post/?v=3&url=', '&title='); + return $this->add_to_service('http://del.icio.us/post/?v=4&url=', '&title='); } function add_to_digg() { - return $this->add_to_service('http://digg.com/submit?phase=2&URL='); + return $this->add_to_service('http://digg.com/submit?url=', '&title=', '&bodytext='); } function add_to_furl() @@ -5131,224 +5727,78 @@ class SimplePie_Item } } -class SimplePie_Author +class SimplePie_Source { - var $name; - var $link; - var $email; + var $item; + var $data = array(); - // Constructor, used to input the data - function SimplePie_Author($name = null, $link = null, $email = null) + function SimplePie_Source($item, $data) { - $this->name = $name; - $this->link = $link; - $this->email = $email; + $this->item = $item; + $this->data = $data; } function __toString() { - // There is no $this->data here - return md5(serialize($this)); - } - - function get_name() - { - if ($this->name !== null) - { - return $this->name; - } - else - { - return null; - } - } - - function get_link() - { - if ($this->link !== null) - { - return $this->link; - } - else - { - return null; - } + return md5(serialize($this->data)); } - function get_email() + function get_source_tags($namespace, $tag) { - if ($this->email !== null) + if (isset($this->data['child'][$namespace][$tag])) { - return $this->email; + return $this->data['child'][$namespace][$tag]; } else { return null; } } -} - -class SimplePie_Category -{ - var $term; - var $scheme; - var $label; - - // Constructor, used to input the data - function SimplePie_Category($term = null, $scheme = null, $label = null) - { - $this->term = $term; - $this->scheme = $scheme; - $this->label = $label; - } - function __toString() + function get_base($element = array()) { - // There is no $this->data here - return md5(serialize($this)); + return $this->item->get_base($element); } - function get_term() + function sanitize($data, $type, $base = '') { - if ($this->term !== null) - { - return $this->term; - } - else - { - return null; - } + return $this->item->sanitize($data, $type, $base); } - function get_scheme() + function get_item() { - if ($this->scheme !== null) - { - return $this->scheme; - } - else - { - return null; - } + return $this->item; } - function get_label() + function get_title() { - if ($this->label !== null) - { - return $this->label; - } - else + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'title')) { - return $this->get_term(); + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); } - } -} - -class SimplePie_Enclosure -{ - var $bitrate; - var $captions; - var $categories; - var $channels; - var $copyright; - var $credits; - var $description; - var $duration; - var $expression; - var $framerate; - var $handler; - var $hashes; - var $height; - var $javascript; - var $keywords; - var $lang; - var $length; - var $link; - var $medium; - var $player; - var $ratings; - var $restrictions; - var $samplingrate; - var $thumbnails; - var $title; - var $type; - var $width; - - // Constructor, used to input the data - function SimplePie_Enclosure($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null) - { - $this->bitrate = $bitrate; - $this->captions = $captions; - $this->categories = $categories; - $this->channels = $channels; - $this->copyright = $copyright; - $this->credits = $credits; - $this->description = $description; - $this->duration = $duration; - $this->expression = $expression; - $this->framerate = $framerate; - $this->hashes = $hashes; - $this->height = $height; - $this->javascript = $javascript; - $this->keywords = $keywords; - $this->lang = $lang; - $this->length = $length; - $this->link = $link; - $this->medium = $medium; - $this->player = $player; - $this->ratings = $ratings; - $this->restrictions = $restrictions; - $this->samplingrate = $samplingrate; - $this->thumbnails = $thumbnails; - $this->title = $title; - $this->type = $type; - $this->width = $width; - if (class_exists('idna_convert')) + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'title')) { - $idn = new idna_convert; - $parsed = SimplePie_Misc::parse_url($link); - $this->link = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']); + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); } - $this->handler = $this->get_handler(); // Needs to load last - } - - function __toString() - { - // There is no $this->data here - return md5(serialize($this)); - } - - function get_bitrate() - { - if ($this->bitrate !== null) + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'title')) { - return $this->bitrate; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); } - else + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'title')) { - return null; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); } - } - - function get_caption($key = 0) - { - $captions = $this->get_captions(); - if (isset($captions[$key])) + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'title')) { - return $captions[$key]; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); } - else + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'title')) { - return null; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - } - - function get_captions() - { - if ($this->captions !== null) + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'title')) { - return $this->captions; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } else { @@ -5371,46 +5821,54 @@ class SimplePie_Enclosure function get_categories() { - if ($this->categories !== null) - { - return $this->categories; - } - else - { - return null; - } - } + $categories = array(); - function get_channels() - { - if ($this->channels !== null) + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'category') as $category) { - return $this->channels; + $term = null; + $scheme = null; + $label = null; + if (isset($category['attribs']['']['term'])) + { + $term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['scheme'])) + { + $scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($category['attribs']['']['label'])) + { + $label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] = new $this->item->feed->category_class($term, $scheme, $label); } - else + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category) { - return null; + // This is really the label, but keep this as the term also for BC. + // Label will also work on retrieving because that falls back to term. + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + if (isset($category['attribs']['']['domain'])) + { + $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT); + } + else + { + $scheme = null; + } + $categories[] = new $this->item->feed->category_class($term, $scheme, null); } - } - - function get_copyright() - { - if ($this->copyright !== null) + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'subject') as $category) { - return $this->copyright; + $categories[] = new $this->item->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); } - else + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'subject') as $category) { - return null; + $categories[] = new $this->item->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); } - } - function get_credit($key = 0) - { - $credits = $this->get_credits(); - if (isset($credits[$key])) + if (!empty($categories)) { - return $credits[$key]; + return SimplePie_Misc::array_unique($categories); } else { @@ -5418,11 +5876,12 @@ class SimplePie_Enclosure } } - function get_credits() + function get_author($key = 0) { - if ($this->credits !== null) + $authors = $this->get_authors(); + if (isset($authors[$key])) { - return $this->credits; + return $authors[$key]; } else { @@ -5430,68 +5889,140 @@ class SimplePie_Enclosure } } - function get_description() + function get_authors() { - if ($this->description !== null) - { - return $this->description; - } - else + $authors = array(); + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'author') as $author) { - return null; + $name = null; + $uri = null; + $email = null; + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) + { + $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $authors[] = new $this->item->feed->author_class($name, $uri, $email); + } } - } - - function get_duration($convert = false) - { - if ($this->duration !== null) + if ($author = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author')) { - if ($convert) + $name = null; + $url = null; + $email = null; + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) { - $time = SimplePie_Misc::time_hms($this->duration); - return $time; + $name = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - else + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) { - return $this->duration; + $url = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($author[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $authors[] = new $this->item->feed->author_class($name, $url, $email); } } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'creator') as $author) + { + $authors[] = new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'creator') as $author) + { + $authors[] = new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'author') as $author) + { + $authors[] = new $this->item->feed->author_class($this->sanitize($author['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); + } + + if (!empty($authors)) + { + return SimplePie_Misc::array_unique($authors); + } else { return null; } } - function get_expression() + function get_contributor($key = 0) { - if ($this->expression !== null) + $contributors = $this->get_contributors(); + if (isset($contributors[$key])) { - return $this->expression; + return $contributors[$key]; } else { - return 'full'; + return null; } } - function get_extension() + function get_contributors() { - if ($this->link !== null) + $contributors = array(); + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'contributor') as $contributor) { - $url = SimplePie_Misc::parse_url($this->link); - if ($url['path'] !== '') + $name = null; + $uri = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'])) { - return pathinfo($url['path'], PATHINFO_EXTENSION); + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'])) + { + $uri = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['uri'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $uri !== null) + { + $contributors[] = new $this->item->feed->author_class($name, $uri, $email); + } + } + foreach ((array) $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'contributor') as $contributor) + { + $name = null; + $url = null; + $email = null; + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'])) + { + $name = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'])) + { + $url = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['url'][0])); + } + if (isset($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'])) + { + $email = $this->sanitize($contributor['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + if ($name !== null || $email !== null || $url !== null) + { + $contributors[] = new $this->item->feed->author_class($name, $url, $email); } } - return null; - } - function get_framerate() - { - if ($this->framerate !== null) + if (!empty($contributors)) { - return $this->framerate; + return SimplePie_Misc::array_unique($contributors); } else { @@ -5499,17 +6030,12 @@ class SimplePie_Enclosure } } - function get_handler() - { - return $this->get_real_type(true); - } - - function get_hash($key = 0) + function get_link($key = 0, $rel = 'alternate') { - $hashes = $this->get_hashes(); - if (isset($hashes[$key])) + $links = $this->get_links($rel); + if (isset($links[$key])) { - return $hashes[$key]; + return $links[$key]; } else { @@ -5517,11 +6043,81 @@ class SimplePie_Enclosure } } - function get_hashes() + /** + * Added for parity between the parent-level and the item/entry-level. + */ + function get_permalink() { - if ($this->hashes !== null) + return $this->get_link(0); + } + + function get_links($rel = 'alternate') + { + if (!isset($this->data['links'])) { - return $this->hashes; + $this->data['links'] = array(); + if ($links = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'link')) + { + foreach ($links as $link) + { + if (isset($link['attribs']['']['href'])) + { + $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate'; + $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + } + } + } + if ($links = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'link')) + { + foreach ($links as $link) + { + if (isset($link['attribs']['']['href'])) + { + $link_rel = (isset($link['attribs']['']['rel'])) ? $link['attribs']['']['rel'] : 'alternate'; + $this->data['links'][$link_rel][] = $this->sanitize($link['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($link)); + + } + } + } + if ($links = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + if ($links = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + if ($links = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + + $keys = array_keys($this->data['links']); + foreach ($keys as $key) + { + if (SimplePie_Misc::is_isegment_nz_nc($key)) + { + if (isset($this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key])) + { + $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] = array_merge($this->data['links'][$key], $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]); + $this->data['links'][$key] =& $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key]; + } + else + { + $this->data['links'][SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY . $key] =& $this->data['links'][$key]; + } + } + elseif (substr($key, 0, 41) === SIMPLEPIE_IANA_LINK_RELATIONS_REGISTRY) + { + $this->data['links'][substr($key, 41)] =& $this->data['links'][$key]; + } + $this->data['links'][$key] = array_unique($this->data['links'][$key]); + } + } + + if (isset($this->data['links'][$rel])) + { + return $this->data['links'][$rel]; } else { @@ -5529,60 +6125,43 @@ class SimplePie_Enclosure } } - function get_height() + function get_description() { - if ($this->height !== null) + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'subtitle')) { - return $this->height; + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); } - else + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'tagline')) { - return null; + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); } - } - - function get_language() - { - if ($this->lang !== null) + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_10, 'description')) { - return $this->lang; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); } - else + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_090, 'description')) { - return null; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); } - } - - function get_keyword($key = 0) - { - $keywords = $this->get_keywords(); - if (isset($keywords[$key])) + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'description')) { - return $keywords[$key]; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_MAYBE_HTML, $this->get_base($return[0])); } - else + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'description')) { - return null; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - } - - function get_keywords() - { - if ($this->keywords !== null) + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'description')) { - return $this->keywords; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - else + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'summary')) { - return null; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); } - } - - function get_length() - { - if ($this->length !== null) + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'subtitle')) { - return $this->length; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0])); } else { @@ -5590,35 +6169,27 @@ class SimplePie_Enclosure } } - function get_link() + function get_copyright() { - if ($this->link !== null) + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'rights')) { - return urldecode($this->link); + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_10_construct_type($return[0]['attribs']), $this->get_base($return[0])); } - else + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'copyright')) { - return null; + return $this->sanitize($return[0]['data'], SimplePie_Misc::atom_03_construct_type($return[0]['attribs']), $this->get_base($return[0])); } - } - - function get_medium() - { - if ($this->medium !== null) + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'copyright')) { - return $this->medium; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - else + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'rights')) { - return null; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } - } - - function get_player() - { - if ($this->player !== null) + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'rights')) { - return $this->player; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); } else { @@ -5626,12 +6197,23 @@ class SimplePie_Enclosure } } - function get_rating($key = 0) + function get_language() { - $ratings = $this->get_ratings(); - if (isset($ratings[$key])) + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'language')) { - return $ratings[$key]; + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_11, 'language')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_DC_10, 'language')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT); + } + elseif (isset($this->data['xml_lang'])) + { + return $this->sanitize($this->data['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT); } else { @@ -5639,11 +6221,15 @@ class SimplePie_Enclosure } } - function get_ratings() + function get_latitude() { - if ($this->ratings !== null) + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lat')) { - return $this->ratings; + return (float) $return[0]['data']; + } + elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) + { + return (float) $match[1]; } else { @@ -5651,12 +6237,19 @@ class SimplePie_Enclosure } } - function get_restriction($key = 0) + function get_longitude() { - $restrictions = $this->get_restrictions(); - if (isset($restrictions[$key])) + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'long')) { - return $restrictions[$key]; + return (float) $return[0]['data']; + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_W3C_BASIC_GEO, 'lon')) + { + return (float) $return[0]['data']; + } + elseif (($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_GEORSS, 'point')) && preg_match('/^((?:-)?[0-9]+(?:\.[0-9]+)) ((?:-)?[0-9]+(?:\.[0-9]+))$/', trim($return[0]['data']), $match)) + { + return (float) $match[2]; } else { @@ -5664,23 +6257,52 @@ class SimplePie_Enclosure } } - function get_restrictions() + function get_image_url() { - if ($this->restrictions !== null) + if ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ITUNES, 'image')) { - return $this->restrictions; + return $this->sanitize($return[0]['attribs']['']['href'], SIMPLEPIE_CONSTRUCT_IRI); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'logo')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); + } + elseif ($return = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_10, 'icon')) + { + return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0])); } else { return null; } } +} - function get_sampling_rate() +class SimplePie_Author +{ + var $name; + var $link; + var $email; + + // Constructor, used to input the data + function SimplePie_Author($name = null, $link = null, $email = null) { - if ($this->samplingrate !== null) + $this->name = $name; + $this->link = $link; + $this->email = $email; + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_name() + { + if ($this->name !== null) { - return $this->samplingrate; + return $this->name; } else { @@ -5688,12 +6310,11 @@ class SimplePie_Enclosure } } - function get_size() + function get_link() { - $length = $this->get_length(); - if ($length !== null) + if ($this->link !== null) { - return round($length/1048576, 2); + return $this->link; } else { @@ -5701,24 +6322,44 @@ class SimplePie_Enclosure } } - function get_thumbnail($key = 0) + function get_email() { - $thumbnails = $this->get_thumbnails(); - if (isset($thumbnails[$key])) + if ($this->email !== null) { - return $thumbnails[$key]; + return $this->email; } else { return null; } } +} - function get_thumbnails() +class SimplePie_Category +{ + var $term; + var $scheme; + var $label; + + // Constructor, used to input the data + function SimplePie_Category($term = null, $scheme = null, $label = null) { - if ($this->thumbnails !== null) + $this->term = $term; + $this->scheme = $scheme; + $this->label = $label; + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_term() + { + if ($this->term !== null) { - return $this->thumbnails; + return $this->term; } else { @@ -5726,11 +6367,11 @@ class SimplePie_Enclosure } } - function get_title() + function get_scheme() { - if ($this->title !== null) + if ($this->scheme !== null) { - return $this->title; + return $this->scheme; } else { @@ -5738,23 +6379,98 @@ class SimplePie_Enclosure } } - function get_type() + function get_label() { - if ($this->type !== null) + if ($this->label !== null) { - return $this->type; + return $this->label; } else { - return null; + return $this->get_term(); } } +} - function get_width() +class SimplePie_Enclosure +{ + var $bitrate; + var $captions; + var $categories; + var $channels; + var $copyright; + var $credits; + var $description; + var $duration; + var $expression; + var $framerate; + var $handler; + var $hashes; + var $height; + var $javascript; + var $keywords; + var $lang; + var $length; + var $link; + var $medium; + var $player; + var $ratings; + var $restrictions; + var $samplingrate; + var $thumbnails; + var $title; + var $type; + var $width; + + // Constructor, used to input the data + function SimplePie_Enclosure($link = null, $type = null, $length = null, $javascript = null, $bitrate = null, $captions = null, $categories = null, $channels = null, $copyright = null, $credits = null, $description = null, $duration = null, $expression = null, $framerate = null, $hashes = null, $height = null, $keywords = null, $lang = null, $medium = null, $player = null, $ratings = null, $restrictions = null, $samplingrate = null, $thumbnails = null, $title = null, $width = null) { - if ($this->width !== null) + $this->bitrate = $bitrate; + $this->captions = $captions; + $this->categories = $categories; + $this->channels = $channels; + $this->copyright = $copyright; + $this->credits = $credits; + $this->description = $description; + $this->duration = $duration; + $this->expression = $expression; + $this->framerate = $framerate; + $this->hashes = $hashes; + $this->height = $height; + $this->javascript = $javascript; + $this->keywords = $keywords; + $this->lang = $lang; + $this->length = $length; + $this->link = $link; + $this->medium = $medium; + $this->player = $player; + $this->ratings = $ratings; + $this->restrictions = $restrictions; + $this->samplingrate = $samplingrate; + $this->thumbnails = $thumbnails; + $this->title = $title; + $this->type = $type; + $this->width = $width; + if (class_exists('idna_convert')) { - return $this->width; + $idn = new idna_convert; + $parsed = SimplePie_Misc::parse_url($link); + $this->link = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']); + } + $this->handler = $this->get_handler(); // Needs to load last + } + + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } + + function get_bitrate() + { + if ($this->bitrate !== null) + { + return $this->bitrate; } else { @@ -5762,471 +6478,185 @@ class SimplePie_Enclosure } } - function native_embed($options='') + function get_caption($key = 0) { - return $this->embed($options, true); + $captions = $this->get_captions(); + if (isset($captions[$key])) + { + return $captions[$key]; + } + else + { + return null; + } } - /** - * @todo If the dimensions for media:content are defined, use them when width/height are set to 'auto'. - */ - function embed($options = '', $native = false) + function get_captions() { - // Set up defaults - $audio = ''; - $video = ''; - $alt = ''; - $altclass = ''; - $loop = 'false'; - $width = 'auto'; - $height = 'auto'; - $bgcolor = '#ffffff'; - $mediaplayer = ''; - $widescreen = false; - $handler = $this->get_handler(); - $type = $this->get_real_type(); - - // Process options and reassign values as necessary - if (is_array($options)) + if ($this->captions !== null) { - extract($options); + return $this->captions; } else { - $options = explode(',', $options); - foreach($options as $option) - { - $opt = explode(':', $option, 2); - if (isset($opt[0], $opt[1])) - { - $opt[0] = trim($opt[0]); - $opt[1] = trim($opt[1]); - switch ($opt[0]) - { - case 'audio': - $audio = $opt[1]; - break; + return null; + } + } - case 'video': - $video = $opt[1]; - break; - - case 'alt': - $alt = $opt[1]; - break; - - case 'altclass': - $altclass = $opt[1]; - break; - - case 'loop': - $loop = $opt[1]; - break; - - case 'width': - $width = $opt[1]; - break; - - case 'height': - $height = $opt[1]; - break; - - case 'bgcolor': - $bgcolor = $opt[1]; - break; - - case 'mediaplayer': - $mediaplayer = $opt[1]; - break; - - case 'widescreen': - $widescreen = $opt[1]; - break; - } - } - } + function get_category($key = 0) + { + $categories = $this->get_categories(); + if (isset($categories[$key])) + { + return $categories[$key]; } - - $mime = explode('/', $type, 2); - $mime = $mime[0]; - - // Process values for 'auto' - if ($width == 'auto') + else { - if ($mime == 'video') - { - if ($height == 'auto') - { - $width = 480; - } - elseif ($widescreen) - { - $width = round((intval($height)/9)*16); - } - else - { - $width = round((intval($height)/3)*4); - } - } - else - { - $width = '100%'; - } + return null; } + } - if ($height == 'auto') + function get_categories() + { + if ($this->categories !== null) { - if ($mime == 'audio') - { - $height = 0; - } - elseif ($mime == 'video') - { - if ($width == 'auto') - { - if ($widescreen) - { - $height = 270; - } - else - { - $height = 360; - } - } - elseif ($widescreen) - { - $height = round((intval($width)/16)*9); - } - else - { - $height = round((intval($width)/4)*3); - } - } - else - { - $height = 376; - } + return $this->categories; } - elseif ($mime == 'audio') + else { - $height = 0; + return null; } + } - // Set proper placeholder value - if ($mime == 'audio') + function get_channels() + { + if ($this->channels !== null) { - $placeholder = $audio; + return $this->channels; } - elseif ($mime == 'video') + else { - $placeholder = $video; + return null; } + } - $embed = ''; - - // Make sure the JS library is included - if (!$native) + function get_copyright() + { + if ($this->copyright !== null) { - static $javascript_outputted = null; - if (!$javascript_outputted && $this->javascript) - { - $embed .= ''; - $javascript_outputted = true; - } + return $this->copyright; } - - // Odeo Feed MP3's - if ($handler == 'odeo') + else { - if ($native) - { - $embed .= ''; - } - else - { - $embed .= ''; - } + return null; } + } - // Flash - elseif ($handler == 'flash') + function get_credit($key = 0) + { + $credits = $this->get_credits(); + if (isset($credits[$key])) { - if ($native) - { - $embed .= "get_link() . "\" pluginspage=\"http://adobe.com/go/getflashplayer\" type=\"$type\" quality=\"high\" width=\"$width\" height=\"$height\" bgcolor=\"$bgcolor\" loop=\"$loop\">"; - } - else - { - $embed .= ""; - } + return $credits[$key]; + } + else + { + return null; } + } - // Flash Media Player file types. - // Preferred handler for MP3 file types. - elseif ($handler == 'fmedia' || ($handler == 'mp3' && $mediaplayer != '')) + function get_credits() + { + if ($this->credits !== null) { - $height += 20; - if ($native) - { - $embed .= "get_link().'?file_extension=.'.$this->get_extension()) . "&autostart=false&repeat=$loop&showdigits=true&showfsbutton=false\">"; - } - else - { - $embed .= ""; - } + return $this->credits; + } + else + { + return null; } + } - // QuickTime 7 file types. Need to test with QuickTime 6. - // Only handle MP3's if the Flash Media Player is not present. - elseif ($handler == 'quicktime' || ($handler == 'mp3' && $mediaplayer == '')) + function get_description() + { + if ($this->description !== null) { - $height += 16; - if ($native) - { - if ($placeholder != ""){ - $embed .= "get_link() . "\" src=\"$placeholder\" width=\"$width\" height=\"$height\" autoplay=\"false\" target=\"myself\" controller=\"false\" loop=\"$loop\" scale=\"aspect\" bgcolor=\"$bgcolor\" pluginspage=\"http://apple.com/quicktime/download/\">"; - } - else { - $embed .= "get_link() . "\" width=\"$width\" height=\"$height\" autoplay=\"false\" target=\"myself\" controller=\"true\" loop=\"$loop\" scale=\"aspect\" bgcolor=\"$bgcolor\" pluginspage=\"http://apple.com/quicktime/download/\">"; - } - } - else - { - $embed .= ""; - } + return $this->description; + } + else + { + return null; } + } - // Windows Media - elseif ($handler == 'wmedia') + function get_duration($convert = false) + { + if ($this->duration !== null) { - $height += 45; - if ($native) + if ($convert) { - $embed .= "get_link() . "\" autosize=\"1\" width=\"$width\" height=\"$height\" showcontrols=\"1\" showstatusbar=\"0\" showdisplay=\"0\" autostart=\"0\">"; + $time = SimplePie_Misc::time_hms($this->duration); + return $time; } else { - $embed .= ""; + return $this->duration; } } - - // Everything else - else $embed .= '' . $alt . ''; - - return $embed; - } - - function get_real_type($find_handler = false) - { - // If it's Odeo, let's get it out of the way. - if (substr(strtolower($this->get_link()), 0, 15) == 'http://odeo.com') + else { - return 'odeo'; + return null; } + } - // Mime-types by handler. - $types_flash = array('application/x-shockwave-flash', 'application/futuresplash'); // Flash - $types_fmedia = array('video/flv', 'video/x-flv'); // Flash Media Player - $types_quicktime = array('audio/3gpp', 'audio/3gpp2', 'audio/aac', 'audio/x-aac', 'audio/aiff', 'audio/x-aiff', 'audio/mid', 'audio/midi', 'audio/x-midi', 'audio/mp4', 'audio/m4a', 'audio/x-m4a', 'audio/wav', 'audio/x-wav', 'video/3gpp', 'video/3gpp2', 'video/m4v', 'video/x-m4v', 'video/mp4', 'video/mpeg', 'video/x-mpeg', 'video/quicktime', 'video/sd-video'); // QuickTime - $types_wmedia = array('application/asx', 'application/x-mplayer2', 'audio/x-ms-wma', 'audio/x-ms-wax', 'video/x-ms-asf-plugin', 'video/x-ms-asf', 'video/x-ms-wm', 'video/x-ms-wmv', 'video/x-ms-wvx'); // Windows Media - $types_mp3 = array('audio/mp3', 'audio/x-mp3', 'audio/mpeg', 'audio/x-mpeg'); // MP3 - - if ($this->get_type() !== null) + function get_expression() + { + if ($this->expression !== null) { - $type = strtolower($this->type); + return $this->expression; } else { - $type = null; + return 'full'; } + } - // If we encounter an unsupported mime-type, check the file extension and guess intelligently. - if (!in_array($type, array_merge($types_flash, $types_fmedia, $types_quicktime, $types_wmedia, $types_mp3))) + function get_extension() + { + if ($this->link !== null) { - switch (strtolower($this->get_extension())) + $url = SimplePie_Misc::parse_url($this->link); + if ($url['path'] !== '') { - // Audio mime-types - case 'aac': - case 'adts': - $type = 'audio/acc'; - break; - - case 'aif': - case 'aifc': - case 'aiff': - case 'cdda': - $type = 'audio/aiff'; - break; - - case 'bwf': - $type = 'audio/wav'; - break; - - case 'kar': - case 'mid': - case 'midi': - case 'smf': - $type = 'audio/midi'; - break; - - case 'm4a': - $type = 'audio/x-m4a'; - break; - - case 'mp3': - case 'swa': - $type = 'audio/mp3'; - break; - - case 'wav': - $type = 'audio/wav'; - break; - - case 'wax': - $type = 'audio/x-ms-wax'; - break; - - case 'wma': - $type = 'audio/x-ms-wma'; - break; - - // Video mime-types - case '3gp': - case '3gpp': - $type = 'video/3gpp'; - break; - - case '3g2': - case '3gp2': - $type = 'video/3gpp2'; - break; - - case 'asf': - $type = 'video/x-ms-asf'; - break; - - case 'flv': - $type = 'video/x-flv'; - break; - - case 'm1a': - case 'm1s': - case 'm1v': - case 'm15': - case 'm75': - case 'mp2': - case 'mpa': - case 'mpeg': - case 'mpg': - case 'mpm': - case 'mpv': - $type = 'video/mpeg'; - break; - - case 'm4v': - $type = 'video/x-m4v'; - break; - - case 'mov': - case 'qt': - $type = 'video/quicktime'; - break; - - case 'mp4': - case 'mpg4': - $type = 'video/mp4'; - break; - - case 'sdv': - $type = 'video/sd-video'; - break; - - case 'wm': - $type = 'video/x-ms-wm'; - break; - - case 'wmv': - $type = 'video/x-ms-wmv'; - break; - - case 'wvx': - $type = 'video/x-ms-wvx'; - break; - - // Flash mime-types - case 'spl': - $type = 'application/futuresplash'; - break; - - case 'swf': - $type = 'application/x-shockwave-flash'; - break; + return pathinfo($url['path'], PATHINFO_EXTENSION); } } + return null; + } - if ($find_handler) + function get_framerate() + { + if ($this->framerate !== null) { - if (in_array($type, $types_flash)) - { - return 'flash'; - } - elseif (in_array($type, $types_fmedia)) - { - return 'fmedia'; - } - elseif (in_array($type, $types_quicktime)) - { - return 'quicktime'; - } - elseif (in_array($type, $types_wmedia)) - { - return 'wmedia'; - } - elseif (in_array($type, $types_mp3)) - { - return 'mp3'; - } - else - { - return null; - } + return $this->framerate; } else { - return $type; + return null; } } -} - -class SimplePie_Caption -{ - var $type; - var $lang; - var $startTime; - var $endTime; - var $text; - - // Constructor, used to input the data - function SimplePie_Caption($type = null, $lang = null, $startTime = null, $endTime = null, $text = null) - { - $this->type = $type; - $this->lang = $lang; - $this->startTime = $startTime; - $this->endTime = $endTime; - $this->text = $text; - } - function __toString() + function get_handler() { - // There is no $this->data here - return md5(serialize($this)); + return $this->get_real_type(true); } - function get_endtime() + function get_hash($key = 0) { - if ($this->endTime !== null) + $hashes = $this->get_hashes(); + if (isset($hashes[$key])) { - return $this->endTime; + return $hashes[$key]; } else { @@ -6234,11 +6664,11 @@ class SimplePie_Caption } } - function get_language() + function get_hashes() { - if ($this->language !== null) + if ($this->hashes !== null) { - return $this->language; + return $this->hashes; } else { @@ -6246,11 +6676,11 @@ class SimplePie_Caption } } - function get_starttime() + function get_height() { - if ($this->startTime !== null) + if ($this->height !== null) { - return $this->startTime; + return $this->height; } else { @@ -6258,11 +6688,11 @@ class SimplePie_Caption } } - function get_text() + function get_language() { - if ($this->text !== null) + if ($this->lang !== null) { - return $this->text; + return $this->lang; } else { @@ -6270,44 +6700,48 @@ class SimplePie_Caption } } - function get_type() + function get_keyword($key = 0) { - if ($this->type !== null) + $keywords = $this->get_keywords(); + if (isset($keywords[$key])) { - return $this->type; + return $keywords[$key]; } else { return null; } } -} -class SimplePie_Credit -{ - var $role; - var $scheme; - var $name; - - // Constructor, used to input the data - function SimplePie_Credit($role = null, $scheme = null, $name = null) + function get_keywords() { - $this->role = $role; - $this->scheme = $scheme; - $this->name = $name; + if ($this->keywords !== null) + { + return $this->keywords; + } + else + { + return null; + } } - function __toString() + function get_length() { - // There is no $this->data here - return md5(serialize($this)); + if ($this->length !== null) + { + return $this->length; + } + else + { + return null; + } } - function get_role() + function get_link() { - if ($this->role !== null) + if ($this->link !== null) { - return $this->role; + return urldecode($this->link); } else { @@ -6315,11 +6749,11 @@ class SimplePie_Credit } } - function get_scheme() + function get_medium() { - if ($this->scheme !== null) + if ($this->medium !== null) { - return $this->scheme; + return $this->medium; } else { @@ -6327,42 +6761,24 @@ class SimplePie_Credit } } - function get_name() + function get_player() { - if ($this->name !== null) + if ($this->player !== null) { - return $this->name; + return $this->player; } else { return null; } } -} - -class SimplePie_Copyright -{ - var $url; - var $label; - // Constructor, used to input the data - function SimplePie_Copyright($url = null, $label = null) - { - $this->url = $url; - $this->label = $label; - } - - function __toString() - { - // There is no $this->data here - return md5(serialize($this)); - } - - function get_url() + function get_rating($key = 0) { - if ($this->url !== null) + $ratings = $this->get_ratings(); + if (isset($ratings[$key])) { - return $this->url; + return $ratings[$key]; } else { @@ -6370,42 +6786,48 @@ class SimplePie_Copyright } } - function get_attribution() + function get_ratings() { - if ($this->label !== null) + if ($this->ratings !== null) { - return $this->label; + return $this->ratings; } else { return null; } } -} - -class SimplePie_Rating -{ - var $scheme; - var $value; - // Constructor, used to input the data - function SimplePie_Rating($scheme = null, $value = null) + function get_restriction($key = 0) { - $this->scheme = $scheme; - $this->value = $value; + $restrictions = $this->get_restrictions(); + if (isset($restrictions[$key])) + { + return $restrictions[$key]; + } + else + { + return null; + } } - function __toString() + function get_restrictions() { - // There is no $this->data here - return md5(serialize($this)); + if ($this->restrictions !== null) + { + return $this->restrictions; + } + else + { + return null; + } } - function get_scheme() + function get_sampling_rate() { - if ($this->scheme !== null) + if ($this->samplingrate !== null) { - return $this->scheme; + return $this->samplingrate; } else { @@ -6413,44 +6835,49 @@ class SimplePie_Rating } } - function get_value() + function get_size() { - if ($this->value !== null) + $length = $this->get_length(); + if ($length !== null) { - return $this->value; + return round($length/1048576, 2); } else { return null; } } -} -class SimplePie_Restriction -{ - var $relationship; - var $type; - var $value; - - // Constructor, used to input the data - function SimplePie_Restriction($relationship = null, $type = null, $value = null) + function get_thumbnail($key = 0) { - $this->relationship = $relationship; - $this->type = $type; - $this->value = $value; + $thumbnails = $this->get_thumbnails(); + if (isset($thumbnails[$key])) + { + return $thumbnails[$key]; + } + else + { + return null; + } } - function __toString() + function get_thumbnails() { - // There is no $this->data here - return md5(serialize($this)); + if ($this->thumbnails !== null) + { + return $this->thumbnails; + } + else + { + return null; + } } - function get_relationship() + function get_title() { - if ($this->relationship !== null) + if ($this->title !== null) { - return $this->relationship; + return $this->title; } else { @@ -6470,3352 +6897,6923 @@ class SimplePie_Restriction } } - function get_value() + function get_width() { - if ($this->value !== null) + if ($this->width !== null) { - return $this->value; + return $this->width; } else { return null; } } -} -/** - * @todo Move to properly supporting RFC2616 (HTTP/1.1) - */ -class SimplePie_File -{ - var $url; - var $useragent; - var $success = true; - var $headers = array(); - var $body; - var $status_code; - var $redirects = 0; - var $error; - var $method; + function native_embed($options='') + { + return $this->embed($options, true); + } - function SimplePie_File($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) + /** + * @todo If the dimensions for media:content are defined, use them when width/height are set to 'auto'. + */ + function embed($options = '', $native = false) { - if (class_exists('idna_convert')) + // Set up defaults + $audio = ''; + $video = ''; + $alt = ''; + $altclass = ''; + $loop = 'false'; + $width = 'auto'; + $height = 'auto'; + $bgcolor = '#ffffff'; + $mediaplayer = ''; + $widescreen = false; + $handler = $this->get_handler(); + $type = $this->get_real_type(); + + // Process options and reassign values as necessary + if (is_array($options)) { - $idn = new idna_convert; - $parsed = SimplePie_Misc::parse_url($url); - $url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']); + extract($options); } - $this->url = $url; - $this->useragent = $useragent; - if (preg_match('/^http(s)?:\/\//i', $url)) + else { - if ($useragent === null) - { - $useragent = ini_get('user_agent'); - $this->useragent = $useragent; - } - if (!is_array($headers)) + $options = explode(',', $options); + foreach($options as $option) { - $headers = array(); + $opt = explode(':', $option, 2); + if (isset($opt[0], $opt[1])) + { + $opt[0] = trim($opt[0]); + $opt[1] = trim($opt[1]); + switch ($opt[0]) + { + case 'audio': + $audio = $opt[1]; + break; + + case 'video': + $video = $opt[1]; + break; + + case 'alt': + $alt = $opt[1]; + break; + + case 'altclass': + $altclass = $opt[1]; + break; + + case 'loop': + $loop = $opt[1]; + break; + + case 'width': + $width = $opt[1]; + break; + + case 'height': + $height = $opt[1]; + break; + + case 'bgcolor': + $bgcolor = $opt[1]; + break; + + case 'mediaplayer': + $mediaplayer = $opt[1]; + break; + + case 'widescreen': + $widescreen = $opt[1]; + break; + } + } } - if (!$force_fsockopen && extension_loaded('curl')) + } + + $mime = explode('/', $type, 2); + $mime = $mime[0]; + + // Process values for 'auto' + if ($width === 'auto') + { + if ($mime === 'video') { - $this->method = 'curl'; - $fp = curl_init(); - $headers2 = array(); - foreach ($headers as $key => $value) + if ($height === 'auto') { - $headers2[] = "$key: $value"; + $width = 480; } - if (version_compare(SimplePie_Misc::get_curl_version(), '7.10.5', '>=')) + elseif ($widescreen) { - curl_setopt($fp, CURLOPT_ENCODING, ''); + $width = round((intval($height)/9)*16); } - curl_setopt($fp, CURLOPT_URL, $url); - curl_setopt($fp, CURLOPT_HEADER, 1); - curl_setopt($fp, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($fp, CURLOPT_TIMEOUT, $timeout); - curl_setopt($fp, CURLOPT_CONNECTTIMEOUT, $timeout); - curl_setopt($fp, CURLOPT_REFERER, $url); - curl_setopt($fp, CURLOPT_USERAGENT, $useragent); - curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2); - if (!ini_get('open_basedir') && !ini_get('safe_mode') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>=')) + else { - curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1); - curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects); - } - - $this->headers = curl_exec($fp); - if (curl_errno($fp) == 23 || curl_errno($fp) == 61) - { - curl_setopt($fp, CURLOPT_ENCODING, 'none'); - $this->headers = curl_exec($fp); - } - if (curl_errno($fp)) - { - $this->error = 'cURL error ' . curl_errno($fp) . ': ' . curl_error($fp); - $this->success = false; - } - else - { - $info = curl_getinfo($fp); - curl_close($fp); - $this->headers = explode("\r\n\r\n", $this->headers, $info['redirect_count'] + 1); - $this->headers = array_pop($this->headers); - $parser = new SimplePie_HTTP_Parser($this->headers); - if ($parser->parse()) - { - $this->headers = $parser->headers; - $this->body = $parser->body; - $this->status_code = $parser->status_code; - if (($this->status_code == 300 || $this->status_code == 301 || $this->status_code == 302 || $this->status_code == 303 || $this->status_code == 307 || $this->status_code > 307 && $this->status_code < 400) && isset($this->headers['location']) && $this->redirects < $redirects) - { - $this->redirects++; - if (isset($this->headers['content-location'])) - { - $location = SimplePie_Misc::absolutize_url($this->headers['location'], SimplePie_Misc::absolutize_url($this->headers['content-location'], $url)); - } - else - { - $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); - } - return $this->SimplePie_File($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); - } - } + $width = round((intval($height)/3)*4); } } else { - $this->method = 'fsockopen'; - $url_parts = parse_url($url); - if (isset($url_parts['scheme']) && strtolower($url_parts['scheme']) == 'https') - { - $url_parts['host'] = "ssl://$url_parts[host]"; - $url_parts['port'] = 443; - } - if (!isset($url_parts['port'])) - { - $url_parts['port'] = 80; - } - $fp = fsockopen($url_parts['host'], $url_parts['port'], $errno, $errstr, $timeout); - if (!$fp) - { - $this->error = 'fsockopen error: ' . $errstr; - $this->success = false; - } - else + $width = '100%'; + } + } + + if ($height === 'auto') + { + if ($mime === 'audio') + { + $height = 0; + } + elseif ($mime === 'video') + { + if ($width === 'auto') { - if (function_exists('stream_set_timeout')) - { - stream_set_timeout($fp, $timeout); - } - else - { - socket_set_timeout($fp, $timeout); - } - if (isset($url_parts['path'])) + if ($widescreen) { - if (isset($url_parts['query'])) - { - $get = "$url_parts[path]?$url_parts[query]"; - } - else - { - $get = $url_parts['path']; - } + $height = 270; } else { - $get = '/'; - } - $out = "GET $get HTTP/1.0\r\n"; - $out .= "Host: $url_parts[host]\r\n"; - $out .= "User-Agent: $useragent\r\n"; - if (function_exists('gzinflate')) - { - $out .= "Accept-Encoding: gzip,deflate\r\n"; + $height = 360; } + } + elseif ($widescreen) + { + $height = round((intval($width)/16)*9); + } + else + { + $height = round((intval($width)/4)*3); + } + } + else + { + $height = 376; + } + } + elseif ($mime === 'audio') + { + $height = 0; + } - if (isset($url_parts['user']) && isset($url_parts['pass'])) - { - $out .= "Authorization: Basic " . base64_encode("$url_parts[user]:$url_parts[pass]") . "\r\n"; - } - foreach ($headers as $key => $value) - { - $out .= "$key: $value\r\n"; - } - $out .= "Connection: Close\r\n\r\n"; - fwrite($fp, $out); + // Set proper placeholder value + if ($mime === 'audio') + { + $placeholder = $audio; + } + elseif ($mime === 'video') + { + $placeholder = $video; + } - if (function_exists('stream_get_meta_data')) - { - $info = stream_get_meta_data($fp); - } - else - { - $info = socket_get_status($fp); - } + $embed = ''; - $this->headers = ''; - while (!$info['eof'] && !$info['timed_out']) - { - $this->headers .= fread($fp, 1160); - if (function_exists('stream_get_meta_data')) - { - $info = stream_get_meta_data($fp); - } - else - { - $info = socket_get_status($fp); - } - } - if (!$info['timed_out']) - { - $parser = new SimplePie_HTTP_Parser($this->headers); - if ($parser->parse()) - { - $this->headers = $parser->headers; - $this->body = $parser->body; - $this->status_code = $parser->status_code; - if (($this->status_code == 300 || $this->status_code == 301 || $this->status_code == 302 || $this->status_code == 303 || $this->status_code == 307 || $this->status_code > 307 && $this->status_code < 400) && isset($this->headers['location']) && $this->redirects < $redirects) - { - $this->redirects++; - if (isset($this->headers['content-location'])) - { - $location = SimplePie_Misc::absolutize_url($this->headers['location'], SimplePie_Misc::absolutize_url($this->headers['content-location'], $url)); - } - else - { - $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); - } - return $this->SimplePie_File($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); - } - if (isset($this->headers['content-encoding']) && ($this->headers['content-encoding'] == 'gzip' || $this->headers['content-encoding'] == 'deflate')) - { - if (substr($this->body, 0, 8) == "\x1f\x8b\x08\x00\x00\x00\x00\x00") - { - $this->body = substr($this->body, 10); - } - $this->body = gzinflate($this->body); - } - } - } - else - { - $this->error = 'fsocket timed out'; - $this->success = false; - } - fclose($fp); - } + // Make sure the JS library is included + if (!$native) + { + static $javascript_outputted = null; + if (!$javascript_outputted && $this->javascript) + { + $embed .= ''; + $javascript_outputted = true; } } - elseif (function_exists('file_get_contents')) + + // Odeo Feed MP3's + if ($handler === 'odeo') { - $this->method = 'file_get_contents'; - if (!$this->body = file_get_contents($url)) + if ($native) { - $this->error = 'file_get_contents could not read the file'; - $this->success = false; + $embed .= ''; + } + else + { + $embed .= ''; } } - else + + // Flash + elseif ($handler === 'flash') { - $this->method = 'fopen'; - if (($fp = fopen($url, 'rb')) === false) + if ($native) { - $this->error = 'failed to open stream: No such file or directory'; - $this->success = false; + $embed .= "get_link() . "\" pluginspage=\"http://adobe.com/go/getflashplayer\" type=\"$type\" quality=\"high\" width=\"$width\" height=\"$height\" bgcolor=\"$bgcolor\" loop=\"$loop\">"; + } + else + { + $embed .= ""; + } + } + + // Flash Media Player file types. + // Preferred handler for MP3 file types. + elseif ($handler === 'fmedia' || ($handler === 'mp3' && $mediaplayer !== '')) + { + $height += 20; + if ($native) + { + $embed .= "get_link().'?file_extension=.'.$this->get_extension()) . "&autostart=false&repeat=$loop&showdigits=true&showfsbutton=false\">"; } else { - $this->body = ''; - while (!feof($fp)) + $embed .= ""; + } + } + + // QuickTime 7 file types. Need to test with QuickTime 6. + // Only handle MP3's if the Flash Media Player is not present. + elseif ($handler === 'quicktime' || ($handler === 'mp3' && $mediaplayer === '')) + { + $height += 16; + if ($native) + { + if ($placeholder !== '') { - $this->body .= fread($fp, 8192); + $embed .= "get_link() . "\" src=\"$placeholder\" width=\"$width\" height=\"$height\" autoplay=\"false\" target=\"myself\" controller=\"false\" loop=\"$loop\" scale=\"aspect\" bgcolor=\"$bgcolor\" pluginspage=\"http://apple.com/quicktime/download/\">"; + } + else + { + $embed .= "get_link() . "\" width=\"$width\" height=\"$height\" autoplay=\"false\" target=\"myself\" controller=\"true\" loop=\"$loop\" scale=\"aspect\" bgcolor=\"$bgcolor\" pluginspage=\"http://apple.com/quicktime/download/\">"; } - fclose($fp); + } + else + { + $embed .= ""; } } - } -} -/** - * HTTP Response Parser - * - * @package SimplePie - * @todo Support HTTP Requests - */ -class SimplePie_HTTP_Parser -{ - /** - * HTTP Version - * - * @access public - * @var string - */ - var $http_version = ''; + // Windows Media + elseif ($handler === 'wmedia') + { + $height += 45; + if ($native) + { + $embed .= "get_link() . "\" autosize=\"1\" width=\"$width\" height=\"$height\" showcontrols=\"1\" showstatusbar=\"0\" showdisplay=\"0\" autostart=\"0\">"; + } + else + { + $embed .= ""; + } + } - /** - * Status code - * - * @access public - * @var string - */ - var $status_code = ''; + // Everything else + else $embed .= '' . $alt . ''; - /** - * Reason phrase - * - * @access public - * @var string - */ - var $reason = ''; - - /** - * Key/value pairs of the headers - * - * @access public - * @var array - */ - var $headers = array(); - - /** - * Body of the response - * - * @access public - * @var string - */ - var $body = ''; - - /** - * Current state of the state machine - * - * @access private - * @var string - */ - var $state = 'start'; - - /** - * Input data - * - * @access private - * @var string - */ - var $data = ''; - - /** - * Input data length (to avoid calling strlen() everytime this is needed) - * - * @access private - * @var int - */ - var $data_length = 0; - - /** - * Current position of the pointer - * - * @access private - * @var int - */ - var $position = 0; - - /** - * Name of the hedaer currently being parsed - * - * @access private - * @var string - */ - var $name = ''; - - /** - * Value of the hedaer currently being parsed - * - * @access private - * @var string - */ - var $value = ''; - - /** - * Create an instance of the class with the input data - * - * @access public - * @param string $data Input data - */ - function SimplePie_HTTP_Parser($data) - { - $this->data = $data; - $this->data_length = strlen($this->data); + return $embed; } - /** - * Parse the input data - * - * @access public - * @return bool true on success, false on failure - */ - function parse() + function get_real_type($find_handler = false) { - while ($this->state && $this->state != 'emit' && $this->has_data()) - { - $state = $this->state; - $this->$state(); - } - $this->data = ''; - if ($this->state == 'emit') - { - return true; - } - else + // If it's Odeo, let's get it out of the way. + if (substr(strtolower($this->get_link()), 0, 15) === 'http://odeo.com') { - $this->http_version = ''; - $this->status_code = ''; - $this->headers = array(); - $this->body = ''; - return false; + return 'odeo'; } - } - - /** - * Check whether there is data beyond the pointer - * - * @access private - * @return bool true if there is further data, false if not - */ - function has_data() - { - return (bool) ($this->position < $this->data_length); - } - - /** - * See if the next character is LWS - * - * @access private - * @return bool true if the next character is LWS, false if not - */ - function is_linear_whitespace() - { - return (bool) (strspn($this->data, "\x09\x20", $this->position, 1) - || (substr($this->data, $this->position, 2) == "\r\n" && strspn($this->data, "\x09\x20", $this->position + 2, 1)) - || (strspn($this->data, "\r\n", $this->position, 1) && strspn($this->data, "\x09\x20", $this->position + 1, 1))); - } - /** - * The starting state of the state machine, see if the data is a response or request - * - * @access private - */ - function start() - { - $this->state = 'http_version_response'; - } + // Mime-types by handler. + $types_flash = array('application/x-shockwave-flash', 'application/futuresplash'); // Flash + $types_fmedia = array('video/flv', 'video/x-flv','flv-application/octet-stream'); // Flash Media Player + $types_quicktime = array('audio/3gpp', 'audio/3gpp2', 'audio/aac', 'audio/x-aac', 'audio/aiff', 'audio/x-aiff', 'audio/mid', 'audio/midi', 'audio/x-midi', 'audio/mp4', 'audio/m4a', 'audio/x-m4a', 'audio/wav', 'audio/x-wav', 'video/3gpp', 'video/3gpp2', 'video/m4v', 'video/x-m4v', 'video/mp4', 'video/mpeg', 'video/x-mpeg', 'video/quicktime', 'video/sd-video'); // QuickTime + $types_wmedia = array('application/asx', 'application/x-mplayer2', 'audio/x-ms-wma', 'audio/x-ms-wax', 'video/x-ms-asf-plugin', 'video/x-ms-asf', 'video/x-ms-wm', 'video/x-ms-wmv', 'video/x-ms-wvx'); // Windows Media + $types_mp3 = array('audio/mp3', 'audio/x-mp3', 'audio/mpeg', 'audio/x-mpeg'); // MP3 - /** - * Parse an HTTP-version string - * - * @access private - */ - function http_version() - { - if (preg_match('/^HTTP\/([0-9]+\.[0-9]+)/i', substr($this->data, $this->position, strcspn($this->data, "\r\n", $this->position)), $match)) + if ($this->get_type() !== null) { - $this->position += strlen($match[0]); - $this->http_version = $match[1]; - return true; + $type = strtolower($this->type); } else { - return false; + $type = null; } - } - /** - * Parse LWS, replacing consecutive characters with a single space - * - * @access private - */ - function linear_whitespace() - { - do + // If we encounter an unsupported mime-type, check the file extension and guess intelligently. + if (!in_array($type, array_merge($types_flash, $types_fmedia, $types_quicktime, $types_wmedia, $types_mp3))) { - if (substr($this->data, $this->position, 2) == "\r\n") - { - $this->position += 2; - } - elseif (strspn($this->data, "\r\n", $this->position, 1)) + switch (strtolower($this->get_extension())) { - $this->position++; - } - $this->position += strspn($this->data, "\x09\x20", $this->position); - } while ($this->is_linear_whitespace()); - $this->value .= "\x20"; - } + // Audio mime-types + case 'aac': + case 'adts': + $type = 'audio/acc'; + break; - /** - * Parse an HTTP-version string within a response - * - * @access private - */ - function http_version_response() - { - if ($this->http_version() && $this->data[$this->position] == "\x20") - { - $this->state = 'status_code'; - $this->position++; - } - else - { - $this->state = false; - } - } + case 'aif': + case 'aifc': + case 'aiff': + case 'cdda': + $type = 'audio/aiff'; + break; - /** - * Parse a status code - * - * @access private - */ - function status_code() - { - if (strspn($this->data, '1234567890', $this->position, 3) == 3) - { - $this->status_code = substr($this->data, $this->position, 3); - $this->state = 'reason_phrase'; - $this->position += 3; - } - else - { - $this->state = false; - } - } + case 'bwf': + $type = 'audio/wav'; + break; - /** - * Skip over the reason phrase (it has no normative value, and you can send absolutely anything here) - * - * @access private - */ - function reason_phrase() - { - $len = strcspn($this->data, "\r\n", $this->position); - $this->reason = substr($this->data, $this->position, $len); - $this->position += $len; - if ($this->has_data()) - { - if (substr($this->data, $this->position, 2) == "\r\n") - { - $this->position += 2; - } - elseif (strspn($this->data, "\r\n", $this->position, 1)) - { - $this->position++; - } - $this->state = 'name'; - } - } + case 'kar': + case 'mid': + case 'midi': + case 'smf': + $type = 'audio/midi'; + break; - /** - * Parse a header name - * - * @access private - */ - function name() - { - $len = strcspn($this->data, ':', $this->position); - $this->name = substr($this->data, $this->position, $len); - $this->position += $len; + case 'm4a': + $type = 'audio/x-m4a'; + break; - if ($this->has_data() && $this->data[$this->position] == ':') - { - $this->state = 'value_next'; - $this->position++; - } - else - { - $this->state = false; - } - } + case 'mp3': + case 'swa': + $type = 'audio/mp3'; + break; - /** - * See what state to move the state machine to while within non-quoted header values - * - * @access private - */ - function value_next() - { - if ($this->is_linear_whitespace()) - { - $this->state = 'value_linear_whitespace'; - } - elseif ($this->data[$this->position] == '"') - { - $this->state = 'value_quote_next'; - $this->position++; - } - elseif (substr($this->data, $this->position, 2) == "\r\n") - { - $this->state = 'end_crlf'; - $this->position += 2; + case 'wav': + $type = 'audio/wav'; + break; + + case 'wax': + $type = 'audio/x-ms-wax'; + break; + + case 'wma': + $type = 'audio/x-ms-wma'; + break; + + // Video mime-types + case '3gp': + case '3gpp': + $type = 'video/3gpp'; + break; + + case '3g2': + case '3gp2': + $type = 'video/3gpp2'; + break; + + case 'asf': + $type = 'video/x-ms-asf'; + break; + + case 'flv': + $type = 'video/x-flv'; + break; + + case 'm1a': + case 'm1s': + case 'm1v': + case 'm15': + case 'm75': + case 'mp2': + case 'mpa': + case 'mpeg': + case 'mpg': + case 'mpm': + case 'mpv': + $type = 'video/mpeg'; + break; + + case 'm4v': + $type = 'video/x-m4v'; + break; + + case 'mov': + case 'qt': + $type = 'video/quicktime'; + break; + + case 'mp4': + case 'mpg4': + $type = 'video/mp4'; + break; + + case 'sdv': + $type = 'video/sd-video'; + break; + + case 'wm': + $type = 'video/x-ms-wm'; + break; + + case 'wmv': + $type = 'video/x-ms-wmv'; + break; + + case 'wvx': + $type = 'video/x-ms-wvx'; + break; + + // Flash mime-types + case 'spl': + $type = 'application/futuresplash'; + break; + + case 'swf': + $type = 'application/x-shockwave-flash'; + break; + } } - elseif (strspn($this->data, "\r\n", $this->position, 1)) + + if ($find_handler) { - $this->state = 'end_crlf'; - $this->position++; + if (in_array($type, $types_flash)) + { + return 'flash'; + } + elseif (in_array($type, $types_fmedia)) + { + return 'fmedia'; + } + elseif (in_array($type, $types_quicktime)) + { + return 'quicktime'; + } + elseif (in_array($type, $types_wmedia)) + { + return 'wmedia'; + } + elseif (in_array($type, $types_mp3)) + { + return 'mp3'; + } + else + { + return null; + } } else { - $this->state = 'value_no_quote'; + return $type; } } +} - /** - * Parse a header value while outside quotes - * - * @access private - */ - function value_no_quote() +class SimplePie_Caption +{ + var $type; + var $lang; + var $startTime; + var $endTime; + var $text; + + // Constructor, used to input the data + function SimplePie_Caption($type = null, $lang = null, $startTime = null, $endTime = null, $text = null) { - $len = strcspn($this->data, "\x09\x20\r\n\"", $this->position); - $this->value .= substr($this->data, $this->position, $len); - $this->state = 'value_next'; - $this->position += $len; + $this->type = $type; + $this->lang = $lang; + $this->startTime = $startTime; + $this->endTime = $endTime; + $this->text = $text; } - /** - * Parse LWS outside quotes - * - * @access private - */ - function value_linear_whitespace() + function __toString() { - $this->linear_whitespace(); - $this->state = 'value_next'; + // There is no $this->data here + return md5(serialize($this)); } - /** - * See what state to move the state machine to while within quoted header values - * - * @access private - */ - function value_quote_next() + function get_endtime() { - if ($this->is_linear_whitespace()) + if ($this->endTime !== null) { - $this->state = 'value_linear_whitespace_quote'; + return $this->endTime; } else { - switch ($this->data[$this->position]) - { - case '"': - $this->state = 'value_next'; - $this->position++; - break; - - case '\\': - $this->state = 'value_quote_char'; - $this->position++; - break; - - default: - $this->state = 'value_quote'; - break; - } + return null; } } - /** - * Parse a header value while within quotes - * - * @access private - */ - function value_quote() - { - $len = strcspn($this->data, "\x09\x20\r\n\"\\", $this->position); - $this->value .= substr($this->data, $this->position, $len); - $this->position += $len; - $this->state = 'value_quote_next'; - } - - /** - * Parse an escaped character within quotes - * - * @access private - */ - function value_quote_char() + function get_language() { - $this->value .= $this->data[$this->position]; - $this->state = 'value_quote_next'; - $this->position++; + if ($this->lang !== null) + { + return $this->lang; + } + else + { + return null; + } } - /** - * Parse LWS within quotes - * - * @access private - */ - function value_linear_whitespace_quote() + function get_starttime() { - $this->linear_whitespace(); - $this->state = 'value_quote_next'; + if ($this->startTime !== null) + { + return $this->startTime; + } + else + { + return null; + } } - /** - * Parse a CRLF, and see whether we have a further header, or whether we are followed by the body - * - * @access private - */ - function end_crlf() + function get_text() { - $this->name = strtolower($this->name); - $this->value = trim($this->value, "\x20"); - if (isset($this->headers[$this->name])) + if ($this->text !== null) { - $this->headers[$this->name] .= ', ' . $this->value; + return $this->text; } else { - $this->headers[$this->name] = $this->value; + return null; } + } - if (substr($this->data, $this->position, 2) == "\r\n") - { - $this->body = substr($this->data, $this->position + 2); - $this->state = 'emit'; - } - elseif (strspn($this->data, "\r\n", $this->position, 1)) + function get_type() + { + if ($this->type !== null) { - $this->body = substr($this->data, $this->position + 1); - $this->state = 'emit'; + return $this->type; } else { - $this->name = ''; - $this->value = ''; - $this->state = 'name'; + return null; } } } -class SimplePie_Cache +class SimplePie_Credit { - var $location; - var $filename; - var $extension; + var $role; + var $scheme; var $name; - function SimplePie_Cache($location, $filename, $extension) + // Constructor, used to input the data + function SimplePie_Credit($role = null, $scheme = null, $name = null) { - $this->location = $location; - $this->filename = rawurlencode($filename); - $this->extension = rawurlencode($extension); - $this->name = "$location/$this->filename.$this->extension"; + $this->role = $role; + $this->scheme = $scheme; + $this->name = $name; } - function save($data) + function __toString() { - if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) && is_writeable($this->location)) + // There is no $this->data here + return md5(serialize($this)); + } + + function get_role() + { + if ($this->role !== null) { - if (function_exists('file_put_contents')) - { - return (bool) file_put_contents($this->name, serialize($data)); - } - else - { - $fp = fopen($this->name, 'wb'); - if ($fp) - { - fwrite($fp, serialize($data)); - fclose($fp); - return true; - } - } + return $this->role; } - return false; - } - - function load() - { - if (file_exists($this->name) && is_readable($this->name)) + else { - if (function_exists('file_get_contents')) - { - return unserialize(file_get_contents($this->name)); - } - elseif (($fp = fopen($this->name, 'rb')) !== false) - { - $data = ''; - while (!feof($fp)) - { - $data .= fread($fp, 8192); - } - fclose($fp); - return unserialize($data); - } + return null; } - return false; } - function mtime() + function get_scheme() { - if (file_exists($this->name)) + if ($this->scheme !== null) { - return filemtime($this->name); + return $this->scheme; } - return false; - } - - function touch() - { - if (file_exists($this->name)) + else { - return touch($this->name); + return null; } - return false; } - function unlink() + function get_name() { - if (file_exists($this->name)) + if ($this->name !== null) { - return unlink($this->name); + return $this->name; + } + else + { + return null; } - return false; } } -class SimplePie_Misc +class SimplePie_Copyright { - function time_hms($seconds) + var $url; + var $label; + + // Constructor, used to input the data + function SimplePie_Copyright($url = null, $label = null) { - $time = ''; + $this->url = $url; + $this->label = $label; + } - $hours = floor($seconds / 3600); - $remainder = $seconds % 3600; - if ($hours > 0) - { - $time .= $hours.':'; - } + function __toString() + { + // There is no $this->data here + return md5(serialize($this)); + } - $minutes = floor($remainder / 60); - $seconds = $remainder % 60; - if ($minutes < 10 && $hours > 0) + function get_url() + { + if ($this->url !== null) { - $minutes = '0' . $minutes; + return $this->url; } - if ($seconds < 10) + else { - $seconds = '0' . $seconds; + return null; } - - $time .= $minutes.':'; - $time .= $seconds; - - return $time; } - function absolutize_url($relative, $base) + function get_attribution() { - if ($relative !== '') + if ($this->label !== null) { - $relative = SimplePie_Misc::parse_url($relative); - if ($relative['scheme'] !== '') - { - $target = $relative; - } - elseif ($base !== '') - { - $base = SimplePie_Misc::parse_url($base); - $target = SimplePie_Misc::parse_url(''); - if ($relative['authority'] !== '') - { - $target = $relative; - $target['scheme'] = $base['scheme']; - } - else - { - $target['scheme'] = $base['scheme']; - $target['authority'] = $base['authority']; - if ($relative['path'] !== '') - { - if (strpos($relative['path'], '/') === 0) - { - $target['path'] = $relative['path']; - } - elseif (($target['path'] = dirname("$base[path].")) == '/') - { - $target['path'] .= $relative['path']; - } - else - { - $target['path'] .= '/' . $relative['path']; - } - if ($relative['query'] !== '') - { - $target['query'] = $relative['query']; - } - } - else - { - if ($base['path'] !== '') - { - $target['path'] = $base['path']; - } - else - { - $target['path'] = '/'; - } - if ($relative['query'] !== '') - { - $target['query'] = $relative['query']; - } - elseif ($base['query'] !== '') - { - $target['query'] = $base['query']; - } - } - } - if ($relative['fragment'] !== '') - { - $target['fragment'] = $relative['fragment']; - } - } - else - { - // No base URL, just return the relative URL - $target = $relative; - } - $return = SimplePie_Misc::compress_parse_url($target['scheme'], $target['authority'], $target['path'], $target['query'], $target['fragment']); + return $this->label; } else { - $return = $base; + return null; } - $return = SimplePie_Misc::normalize_url($return); - return $return; } +} - function remove_dot_segments($input) +class SimplePie_Rating +{ + var $scheme; + var $value; + + // Constructor, used to input the data + function SimplePie_Rating($scheme = null, $value = null) { - $output = ''; - while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input == '.' || $input == '..') - { - // A: If the input buffer begins with a prefix of "../" or "./", then remove that prefix from the input buffer; otherwise, - if (strpos($input, '../') === 0) - { - $input = substr($input, 3); - } - elseif (strpos($input, './') === 0) - { - $input = substr($input, 2); - } - // B: if the input buffer begins with a prefix of "/./" or "/.", where "." is a complete path segment, then replace that prefix with "/" in the input buffer; otherwise, - elseif (strpos($input, '/./') === 0) - { - $input = substr_replace($input, '/', 0, 3); - } - elseif ($input == '/.') - { - $input = '/'; - } - // C: if the input buffer begins with a prefix of "/../" or "/..", where ".." is a complete path segment, then replace that prefix with "/" in the input buffer and remove the last segment and its preceding "/" (if any) from the output buffer; otherwise, - elseif (strpos($input, '/../') === 0) - { - $input = substr_replace($input, '/', 0, 4); - $output = substr_replace($output, '', strrpos($output, '/')); - } - elseif ($input == '/..') - { - $input = '/'; - $output = substr_replace($output, '', strrpos($output, '/')); - } - // D: if the input buffer consists only of "." or "..", then remove that from the input buffer; otherwise, - elseif ($input == '.' || $input == '..') - { - $input = ''; - } - // E: move the first path segment in the input buffer to the end of the output buffer, including the initial "/" character (if any) and any subsequent characters up to, but not including, the next "/" character or the end of the input buffer - elseif (($pos = strpos($input, '/', 1)) !== false) - { - $output .= substr($input, 0, $pos); - $input = substr_replace($input, '', 0, $pos); - } - else - { - $output .= $input; - $input = ''; - } - } - return $output . $input; + $this->scheme = $scheme; + $this->value = $value; } - function get_element($realname, $string) + function __toString() { - $return = array(); - $name = preg_quote($realname, '/'); - if (preg_match_all("/<($name)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$name>|(\/)?>)/siU", $string, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) - { - for ($i = 0, $total_matches = count($matches); $i < $total_matches; $i++) - { - $return[$i]['tag'] = $realname; - $return[$i]['full'] = $matches[$i][0][0]; - $return[$i]['offset'] = $matches[$i][0][1]; - if (strlen($matches[$i][3][0]) <= 2) - { - $return[$i]['self_closing'] = true; - } - else - { - $return[$i]['self_closing'] = false; - $return[$i]['content'] = $matches[$i][4][0]; - } - $return[$i]['attribs'] = array(); - if (isset($matches[$i][2][0]) && preg_match_all('/((?:[^\s:]+:)?[^\s:]+)(?:\s*=\s*(?:"([^"]*)"|\'([^\']*)\'|([a-z0-9\-._:]*)))?\s/U', ' ' . $matches[$i][2][0] . ' ', $attribs, PREG_SET_ORDER)) - { - for ($j = 0, $total_attribs = count($attribs); $j < $total_attribs; $j++) - { - if (count($attribs[$j]) == 2) - { - $attribs[$j][2] = $attribs[$j][1]; - } - $return[$i]['attribs'][strtolower($attribs[$j][1])]['data'] = SimplePie_Misc::entities_decode(end($attribs[$j]), 'UTF-8'); - } - } - } - } - return $return; + // There is no $this->data here + return md5(serialize($this)); } - function element_implode($element) + function get_scheme() { - $full = "<$element[tag]"; - foreach ($element['attribs'] as $key => $value) - { - $key = strtolower($key); - $full .= " $key=\"" . htmlspecialchars($value['data']) . '"'; - } - if ($element['self_closing']) + if ($this->scheme !== null) { - $full .= ' />'; + return $this->scheme; } else { - $full .= ">$element[content]"; + return null; } - return $full; } - function error($message, $level, $file, $line) + function get_value() { - switch ($level) + if ($this->value !== null) { - case E_USER_ERROR: - $note = 'PHP Error'; - break; - case E_USER_WARNING: - $note = 'PHP Warning'; - break; - case E_USER_NOTICE: - $note = 'PHP Notice'; - break; - default: - $note = 'Unknown Error'; - break; - } - error_log("$note: $message in $file on line $line", 0); - return $message; - } - - /** - * If a file has been cached, retrieve and display it. - * - * This is most useful for caching images (get_favicon(), etc.), - * however it works for all cached files. This WILL NOT display ANY - * file/image/page/whatever, but rather only display what has already - * been cached by SimplePie. - * - * @access public - * @see SimplePie::get_favicon() - * @param str $identifier_url URL that is used to identify the content. - * This may or may not be the actual URL of the live content. - * @param str $cache_location Location of SimplePie's cache. Defaults - * to './cache'. - * @param str $cache_extension The file extension that the file was - * cached with. Defaults to 'spc'. - * @param str $cache_class Name of the cache-handling class being used - * in SimplePie. Defaults to 'SimplePie_Cache', and should be left - * as-is unless you've overloaded the class. - * @param str $cache_name_function Function that converts the filename - * for saving. Defaults to 'md5'. - */ - function display_cached_file($identifier_url, $cache_location = './cache', $cache_extension = 'spc', $cache_class = 'SimplePie_Cache', $cache_name_function = 'md5') - { - $cache = new $cache_class($cache_location, call_user_func($cache_name_function, $identifier_url), $cache_extension); - - if ($file = $cache->load()) - { - header('Content-type:' . $file['headers']['content-type']); - header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days - echo $file['body']; - exit; - } - - die('Cached file for ' . $identifier_url . ' cannot be found.'); - } - - function fix_protocol($url, $http = 1) - { - $url = SimplePie_Misc::normalize_url($url); - $parsed = SimplePie_Misc::parse_url($url); - if ($parsed['scheme'] !== '' && $parsed['scheme'] != 'http' && $parsed['scheme'] != 'https') - { - return SimplePie_Misc::fix_protocol(SimplePie_Misc::compress_parse_url('http', $parsed['authority'], $parsed['path'], $parsed['query'], $parsed['fragment']), $http); - } - - if ($parsed['scheme'] === '' && $parsed['authority'] === '' && !file_exists($url)) - { - return SimplePie_Misc::fix_protocol(SimplePie_Misc::compress_parse_url('http', $parsed['path'], '', $parsed['query'], $parsed['fragment']), $http); - } - - if ($http == 2 && $parsed['scheme'] !== '') - { - return "feed:$url"; - } - elseif ($http == 3 && strtolower($parsed['scheme']) == 'http') - { - return substr_replace($url, 'podcast', 0, 4); - } - elseif ($http == 4 && strtolower($parsed['scheme']) == 'http') - { - return substr_replace($url, 'itpc', 0, 4); + return $this->value; } else { - return $url; + return null; } } +} - function parse_url($url) - { - static $cache = array(); - if (isset($cache[$url])) - { - return $cache[$url]; - } - elseif (preg_match('/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/', $url, $match)) - { - for ($i = count($match); $i <= 9; $i++) - { - $match[$i] = ''; - } - return $cache[$url] = array('scheme' => $match[2], 'authority' => $match[4], 'path' => $match[5], 'query' => $match[7], 'fragment' => $match[9]); - } - else - { - return $cache[$url] = array('scheme' => '', 'authority' => '', 'path' => '', 'query' => '', 'fragment' => ''); - } - } +class SimplePie_Restriction +{ + var $relationship; + var $type; + var $value; - function compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '') + // Constructor, used to input the data + function SimplePie_Restriction($relationship = null, $type = null, $value = null) { - $return = ''; - if ($scheme !== '') - { - $return .= "$scheme:"; - } - if ($authority !== '') - { - $return .= "//$authority"; - } - if ($path !== '') - { - $return .= $path; - } - if ($query !== '') - { - $return .= "?$query"; - } - if ($fragment !== '') - { - $return .= "#$fragment"; - } - return $return; + $this->relationship = $relationship; + $this->type = $type; + $this->value = $value; } - function normalize_url($url) + function __toString() { - $url = preg_replace_callback('/%([0-9A-Fa-f]{2})/', array('SimplePie_Misc', 'percent_encoding_normalization'), $url); - $url = SimplePie_Misc::parse_url($url); - $url['scheme'] = strtolower($url['scheme']); - if ($url['authority'] !== '') - { - $url['authority'] = strtolower($url['authority']); - $url['path'] = SimplePie_Misc::remove_dot_segments($url['path']); - } - return SimplePie_Misc::compress_parse_url($url['scheme'], $url['authority'], $url['path'], $url['query'], $url['fragment']); + // There is no $this->data here + return md5(serialize($this)); } - function percent_encoding_normalization($match) + function get_relationship() { - $integer = hexdec($match[1]); - if ($integer >= 0x41 && $integer <= 0x5A || $integer >= 0x61 && $integer <= 0x7A || $integer >= 0x30 && $integer <= 0x39 || $integer == 0x2D || $integer == 0x2E || $integer == 0x5F || $integer == 0x7E) + if ($this->relationship !== null) { - return chr($integer); + return $this->relationship; } else { - return strtoupper($match[0]); + return null; } } - /** - * Remove bad UTF-8 bytes - * - * PCRE Pattern to locate bad bytes in a UTF-8 string comes from W3C - * FAQ: Multilingual Forms (modified to include full ASCII range) - * - * @author Geoffrey Sneddon - * @see http://www.w3.org/International/questions/qa-forms-utf-8 - * @param string $str String to remove bad UTF-8 bytes from - * @return string UTF-8 string - */ - function utf8_bad_replace($str) + function get_type() { - if (function_exists('iconv')) - { - $out = iconv('UTF-8', 'UTF-8//IGNORE', $str); - if($out !== false) return $out; - } - if (function_exists('mb_convert_encoding')) - { - return mb_convert_encoding($str, 'UTF-8', 'UTF-8'); - } - elseif (preg_match_all('/([\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})/', $str, $matches)) - { - return implode("\xEF\xBF\xBD", $matches[0]); - } - elseif ($str !== '') + if ($this->type !== null) { - return "\xEF\xBF\xBD"; + return $this->type; } else { - return ''; + return null; } } - function change_encoding($data, $input, $output) + function get_value() { - $input = SimplePie_Misc::encoding($input); - $output = SimplePie_Misc::encoding($output); - - if (function_exists('iconv') && ($return = @iconv($input, "$output//IGNORE", $data))) - { - return $return; - } - elseif (function_exists('iconv') && ($return = @iconv($input, $output, $data))) - { - return $return; - } - elseif (function_exists('mb_convert_encoding') && ($return = @mb_convert_encoding($data, $output, $input))) - { - return $return; - } - elseif ($input == 'ISO-8859-1' && $output == 'UTF-8') + if ($this->value !== null) { - return utf8_encode($data); + return $this->value; } - elseif ($input == 'UTF-8' && $output == 'ISO-8859-1') + else { - return utf8_decode($data); + return null; } - return $data; } +} + +/** + * @todo Move to properly supporting RFC2616 (HTTP/1.1) + */ +class SimplePie_File +{ + var $url; + var $useragent; + var $success = true; + var $headers = array(); + var $body; + var $status_code; + var $redirects = 0; + var $error; + var $method = SIMPLEPIE_FILE_SOURCE_NONE; - function encoding($encoding) + function SimplePie_File($url, $timeout = 10, $redirects = 5, $headers = null, $useragent = null, $force_fsockopen = false) { - // Character sets are case-insensitive (though we'll return them in the form given in their registration) - switch (strtoupper($encoding)) + if (class_exists('idna_convert')) { - case 'ANSI_X3.4-1968': - case 'ISO-IR-6': - case 'ANSI_X3.4-1986': - case 'ISO_646.IRV:1991': - case 'ASCII': - case 'ISO646-US': - case 'US-ASCII': - case 'US': - case 'IBM367': - case 'CP367': - case 'CSASCII': - return 'US-ASCII'; - - case 'ISO_8859-1:1987': - case 'ISO-IR-100': - case 'ISO_8859-1': - case 'ISO-8859-1': - case 'LATIN1': - case 'L1': - case 'IBM819': - case 'CP819': - case 'CSISOLATIN1': - return 'ISO-8859-1'; - - case 'ISO_8859-2:1987': - case 'ISO-IR-101': - case 'ISO_8859-2': - case 'ISO-8859-2': - case 'LATIN2': - case 'L2': - case 'CSISOLATIN2': - return 'ISO-8859-2'; - - case 'ISO_8859-3:1988': - case 'ISO-IR-109': - case 'ISO_8859-3': - case 'ISO-8859-3': - case 'LATIN3': - case 'L3': - case 'CSISOLATIN3': - return 'ISO-8859-3'; - - case 'ISO_8859-4:1988': - case 'ISO-IR-110': - case 'ISO_8859-4': - case 'ISO-8859-4': - case 'LATIN4': - case 'L4': - case 'CSISOLATIN4': - return 'ISO-8859-4'; - - case 'ISO_8859-5:1988': - case 'ISO-IR-144': - case 'ISO_8859-5': - case 'ISO-8859-5': - case 'CYRILLIC': - case 'CSISOLATINCYRILLIC': - return 'ISO-8859-5'; - - case 'ISO_8859-6:1987': - case 'ISO-IR-127': - case 'ISO_8859-6': - case 'ISO-8859-6': - case 'ECMA-114': - case 'ASMO-708': - case 'ARABIC': - case 'CSISOLATINARABIC': - return 'ISO-8859-6'; - - case 'ISO_8859-7:1987': - case 'ISO-IR-126': - case 'ISO_8859-7': - case 'ISO-8859-7': - case 'ELOT_928': - case 'ECMA-118': - case 'GREEK': - case 'GREEK8': - case 'CSISOLATINGREEK': - return 'ISO-8859-7'; - - case 'ISO_8859-8:1988': - case 'ISO-IR-138': - case 'ISO_8859-8': - case 'ISO-8859-8': - case 'HEBREW': - case 'CSISOLATINHEBREW': - return 'ISO-8859-8'; - - case 'ISO_8859-9:1989': - case 'ISO-IR-148': - case 'ISO_8859-9': - case 'ISO-8859-9': - case 'LATIN5': - case 'L5': - case 'CSISOLATIN5': - return 'ISO-8859-9'; - - case 'ISO-8859-10': - case 'ISO-IR-157': - case 'L6': - case 'ISO_8859-10:1992': - case 'CSISOLATIN6': - case 'LATIN6': - return 'ISO-8859-10'; - - case 'ISO_6937-2-ADD': - case 'ISO-IR-142': - case 'CSISOTEXTCOMM': - return 'ISO_6937-2-add'; - - case 'JIS_X0201': - case 'X0201': - case 'CSHALFWIDTHKATAKANA': - return 'JIS_X0201'; - - case 'JIS_ENCODING': - case 'CSJISENCODING': - return 'JIS_Encoding'; - - case 'SHIFT_JIS': - case 'MS_KANJI': - case 'CSSHIFTJIS': - return 'Shift_JIS'; - - case 'EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE': - case 'CSEUCPKDFMTJAPANESE': - case 'EUC-JP': - return 'EUC-JP'; - - case 'EXTENDED_UNIX_CODE_FIXED_WIDTH_FOR_JAPANESE': - case 'CSEUCFIXWIDJAPANESE': - return 'Extended_UNIX_Code_Fixed_Width_for_Japanese'; - - case 'BS_4730': - case 'ISO-IR-4': - case 'ISO646-GB': - case 'GB': - case 'UK': - case 'CSISO4UNITEDKINGDOM': - return 'BS_4730'; - - case 'SEN_850200_C': - case 'ISO-IR-11': - case 'ISO646-SE2': - case 'SE2': - case 'CSISO11SWEDISHFORNAMES': - return 'SEN_850200_C'; - - case 'IT': - case 'ISO-IR-15': - case 'ISO646-IT': - case 'CSISO15ITALIAN': - return 'IT'; - - case 'ES': - case 'ISO-IR-17': - case 'ISO646-ES': - case 'CSISO17SPANISH': - return 'ES'; - - case 'DIN_66003': - case 'ISO-IR-21': - case 'DE': - case 'ISO646-DE': - case 'CSISO21GERMAN': - return 'DIN_66003'; - - case 'NS_4551-1': - case 'ISO-IR-60': - case 'ISO646-NO': - case 'NO': - case 'CSISO60DANISHNORWEGIAN': - case 'CSISO60NORWEGIAN1': - return 'NS_4551-1'; - - case 'NF_Z_62-010': - case 'ISO-IR-69': - case 'ISO646-FR': - case 'FR': - case 'CSISO69FRENCH': - return 'NF_Z_62-010'; - - case 'ISO-10646-UTF-1': - case 'CSISO10646UTF1': - return 'ISO-10646-UTF-1'; + $idn = new idna_convert; + $parsed = SimplePie_Misc::parse_url($url); + $url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']); + } + $this->url = $url; + $this->useragent = $useragent; + if (preg_match('/^http(s)?:\/\//i', $url)) + { + if ($useragent === null) + { + $useragent = ini_get('user_agent'); + $this->useragent = $useragent; + } + if (!is_array($headers)) + { + $headers = array(); + } + if (!$force_fsockopen && function_exists('curl_exec')) + { + $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_CURL; + $fp = curl_init(); + $headers2 = array(); + foreach ($headers as $key => $value) + { + $headers2[] = "$key: $value"; + } + if (version_compare(SimplePie_Misc::get_curl_version(), '7.10.5', '>=')) + { + curl_setopt($fp, CURLOPT_ENCODING, ''); + } + curl_setopt($fp, CURLOPT_URL, $url); + curl_setopt($fp, CURLOPT_HEADER, 1); + curl_setopt($fp, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($fp, CURLOPT_TIMEOUT, $timeout); + curl_setopt($fp, CURLOPT_CONNECTTIMEOUT, $timeout); + curl_setopt($fp, CURLOPT_REFERER, $url); + curl_setopt($fp, CURLOPT_USERAGENT, $useragent); + curl_setopt($fp, CURLOPT_HTTPHEADER, $headers2); + if (!ini_get('open_basedir') && !ini_get('safe_mode') && version_compare(SimplePie_Misc::get_curl_version(), '7.15.2', '>=')) + { + curl_setopt($fp, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects); + } - case 'ISO_646.BASIC:1983': - case 'REF': - case 'CSISO646BASIC1983': - return 'ISO_646.basic:1983'; + $this->headers = curl_exec($fp); + if (curl_errno($fp) === 23 || curl_errno($fp) === 61) + { + curl_setopt($fp, CURLOPT_ENCODING, 'none'); + $this->headers = curl_exec($fp); + } + if (curl_errno($fp)) + { + $this->error = 'cURL error ' . curl_errno($fp) . ': ' . curl_error($fp); + $this->success = false; + } + else + { + $info = curl_getinfo($fp); + curl_close($fp); + $this->headers = explode("\r\n\r\n", $this->headers, $info['redirect_count'] + 1); + $this->headers = array_pop($this->headers); + $parser = new SimplePie_HTTP_Parser($this->headers); + if ($parser->parse()) + { + $this->headers = $parser->headers; + $this->body = $parser->body; + $this->status_code = $parser->status_code; + if ((in_array($this->status_code, array(300, 301, 302, 303, 307)) || $this->status_code > 307 && $this->status_code < 400) && isset($this->headers['location']) && $this->redirects < $redirects) + { + $this->redirects++; + $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); + return $this->SimplePie_File($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); + } + } + } + } + else + { + $this->method = SIMPLEPIE_FILE_SOURCE_REMOTE | SIMPLEPIE_FILE_SOURCE_FSOCKOPEN; + $url_parts = parse_url($url); + if (isset($url_parts['scheme']) && strtolower($url_parts['scheme']) === 'https') + { + $url_parts['host'] = "ssl://$url_parts[host]"; + $url_parts['port'] = 443; + } + if (!isset($url_parts['port'])) + { + $url_parts['port'] = 80; + } + $fp = @fsockopen($url_parts['host'], $url_parts['port'], $errno, $errstr, $timeout); + if (!$fp) + { + $this->error = 'fsockopen error: ' . $errstr; + $this->success = false; + } + else + { + stream_set_timeout($fp, $timeout); + if (isset($url_parts['path'])) + { + if (isset($url_parts['query'])) + { + $get = "$url_parts[path]?$url_parts[query]"; + } + else + { + $get = $url_parts['path']; + } + } + else + { + $get = '/'; + } + $out = "GET $get HTTP/1.0\r\n"; + $out .= "Host: $url_parts[host]\r\n"; + $out .= "User-Agent: $useragent\r\n"; + if (extension_loaded('zlib')) + { + $out .= "Accept-Encoding: x-gzip,gzip,deflate\r\n"; + } + + if (isset($url_parts['user']) && isset($url_parts['pass'])) + { + $out .= "Authorization: Basic " . base64_encode("$url_parts[user]:$url_parts[pass]") . "\r\n"; + } + foreach ($headers as $key => $value) + { + $out .= "$key: $value\r\n"; + } + $out .= "Connection: Close\r\n\r\n"; + fwrite($fp, $out); + + $info = stream_get_meta_data($fp); + + $this->headers = ''; + while (!$info['eof'] && !$info['timed_out']) + { + $this->headers .= fread($fp, 1160); + $info = stream_get_meta_data($fp); + } + if (!$info['timed_out']) + { + $parser = new SimplePie_HTTP_Parser($this->headers); + if ($parser->parse()) + { + $this->headers = $parser->headers; + $this->body = $parser->body; + $this->status_code = $parser->status_code; + if ((in_array($this->status_code, array(300, 301, 302, 303, 307)) || $this->status_code > 307 && $this->status_code < 400) && isset($this->headers['location']) && $this->redirects < $redirects) + { + $this->redirects++; + $location = SimplePie_Misc::absolutize_url($this->headers['location'], $url); + return $this->SimplePie_File($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); + } + if (isset($this->headers['content-encoding'])) + { + // Hey, we act dumb elsewhere, so let's do that here too + switch (strtolower(trim($this->headers['content-encoding'], "\x09\x0A\x0D\x20"))) + { + case 'gzip': + case 'x-gzip': + $decoder = new SimplePie_gzdecode($this->body); + if (!$decoder->parse()) + { + $this->error = 'Unable to decode HTTP "gzip" stream'; + $this->success = false; + } + else + { + $this->body = $decoder->data; + } + break; + + case 'deflate': + if (($body = gzuncompress($this->body)) === false) + { + if (($body = gzinflate($this->body)) === false) + { + $this->error = 'Unable to decode HTTP "deflate" stream'; + $this->success = false; + } + } + $this->body = $body; + break; + + default: + $this->error = 'Unknown content coding'; + $this->success = false; + } + } + } + } + else + { + $this->error = 'fsocket timed out'; + $this->success = false; + } + fclose($fp); + } + } + } + else + { + $this->method = SIMPLEPIE_FILE_SOURCE_LOCAL | SIMPLEPIE_FILE_SOURCE_FILE_GET_CONTENTS; + if (!$this->body = file_get_contents($url)) + { + $this->error = 'file_get_contents could not read the file'; + $this->success = false; + } + } + } +} + +/** + * HTTP Response Parser + * + * @package SimplePie + */ +class SimplePie_HTTP_Parser +{ + /** + * HTTP Version + * + * @access public + * @var float + */ + var $http_version = 0.0; + + /** + * Status code + * + * @access public + * @var int + */ + var $status_code = 0; + + /** + * Reason phrase + * + * @access public + * @var string + */ + var $reason = ''; + + /** + * Key/value pairs of the headers + * + * @access public + * @var array + */ + var $headers = array(); + + /** + * Body of the response + * + * @access public + * @var string + */ + var $body = ''; + + /** + * Current state of the state machine + * + * @access private + * @var string + */ + var $state = 'http_version'; + + /** + * Input data + * + * @access private + * @var string + */ + var $data = ''; + + /** + * Input data length (to avoid calling strlen() everytime this is needed) + * + * @access private + * @var int + */ + var $data_length = 0; + + /** + * Current position of the pointer + * + * @var int + * @access private + */ + var $position = 0; + + /** + * Name of the hedaer currently being parsed + * + * @access private + * @var string + */ + var $name = ''; + + /** + * Value of the hedaer currently being parsed + * + * @access private + * @var string + */ + var $value = ''; + + /** + * Create an instance of the class with the input data + * + * @access public + * @param string $data Input data + */ + function SimplePie_HTTP_Parser($data) + { + $this->data = $data; + $this->data_length = strlen($this->data); + } + + /** + * Parse the input data + * + * @access public + * @return bool true on success, false on failure + */ + function parse() + { + while ($this->state && $this->state !== 'emit' && $this->has_data()) + { + $state = $this->state; + $this->$state(); + } + $this->data = ''; + if ($this->state === 'emit' || $this->state === 'body') + { + return true; + } + else + { + $this->http_version = ''; + $this->status_code = ''; + $this->reason = ''; + $this->headers = array(); + $this->body = ''; + return false; + } + } + + /** + * Check whether there is data beyond the pointer + * + * @access private + * @return bool true if there is further data, false if not + */ + function has_data() + { + return (bool) ($this->position < $this->data_length); + } + + /** + * See if the next character is LWS + * + * @access private + * @return bool true if the next character is LWS, false if not + */ + function is_linear_whitespace() + { + return (bool) ($this->data[$this->position] === "\x09" + || $this->data[$this->position] === "\x20" + || ($this->data[$this->position] === "\x0A" + && isset($this->data[$this->position + 1]) + && ($this->data[$this->position + 1] === "\x09" || $this->data[$this->position + 1] === "\x20"))); + } + + /** + * Parse the HTTP version + * + * @access private + */ + function http_version() + { + if (strpos($this->data, "\x0A") !== false && strtoupper(substr($this->data, 0, 5)) === 'HTTP/') + { + $len = strspn($this->data, '0123456789.', 5); + $this->http_version = substr($this->data, 5, $len); + $this->position += 5 + $len; + if (substr_count($this->http_version, '.') <= 1) + { + $this->http_version = (float) $this->http_version; + $this->position += strspn($this->data, "\x09\x20", $this->position); + $this->state = 'status'; + } + else + { + $this->state = false; + } + } + else + { + $this->state = false; + } + } + + /** + * Parse the status code + * + * @access private + */ + function status() + { + if ($len = strspn($this->data, '0123456789', $this->position)) + { + $this->status_code = (int) substr($this->data, $this->position, $len); + $this->position += $len; + $this->state = 'reason'; + } + else + { + $this->state = false; + } + } + + /** + * Parse the reason phrase + * + * @access private + */ + function reason() + { + $len = strcspn($this->data, "\x0A", $this->position); + $this->reason = trim(substr($this->data, $this->position, $len), "\x09\x0D\x20"); + $this->position += $len + 1; + $this->state = 'new_line'; + } + + /** + * Deal with a new line, shifting data around as needed + * + * @access private + */ + function new_line() + { + $this->value = trim($this->value, "\x0D\x20"); + if ($this->name !== '' && $this->value !== '') + { + $this->name = strtolower($this->name); + if (isset($this->headers[$this->name])) + { + $this->headers[$this->name] .= ', ' . $this->value; + } + else + { + $this->headers[$this->name] = $this->value; + } + } + $this->name = ''; + $this->value = ''; + if (substr($this->data[$this->position], 0, 2) === "\x0D\x0A") + { + $this->position += 2; + $this->state = 'body'; + } + elseif ($this->data[$this->position] === "\x0A") + { + $this->position++; + $this->state = 'body'; + } + else + { + $this->state = 'name'; + } + } + + /** + * Parse a header name + * + * @access private + */ + function name() + { + $len = strcspn($this->data, "\x0A:", $this->position); + if (isset($this->data[$this->position + $len])) + { + if ($this->data[$this->position + $len] === "\x0A") + { + $this->position += $len; + $this->state = 'new_line'; + } + else + { + $this->name = substr($this->data, $this->position, $len); + $this->position += $len + 1; + $this->state = 'value'; + } + } + else + { + $this->state = false; + } + } + + /** + * Parse LWS, replacing consecutive LWS characters with a single space + * + * @access private + */ + function linear_whitespace() + { + do + { + if (substr($this->data, $this->position, 2) === "\x0D\x0A") + { + $this->position += 2; + } + elseif ($this->data[$this->position] === "\x0A") + { + $this->position++; + } + $this->position += strspn($this->data, "\x09\x20", $this->position); + } while ($this->has_data() && $this->is_linear_whitespace()); + $this->value .= "\x20"; + } + + /** + * See what state to move to while within non-quoted header values + * + * @access private + */ + function value() + { + if ($this->is_linear_whitespace()) + { + $this->linear_whitespace(); + } + else + { + switch ($this->data[$this->position]) + { + case '"': + $this->position++; + $this->state = 'quote'; + break; + + case "\x0A": + $this->position++; + $this->state = 'new_line'; + break; + + default: + $this->state = 'value_char'; + break; + } + } + } + + /** + * Parse a header value while outside quotes + * + * @access private + */ + function value_char() + { + $len = strcspn($this->data, "\x09\x20\x0A\"", $this->position); + $this->value .= substr($this->data, $this->position, $len); + $this->position += $len; + $this->state = 'value'; + } + + /** + * See what state to move to while within quoted header values + * + * @access private + */ + function quote() + { + if ($this->is_linear_whitespace()) + { + $this->linear_whitespace(); + } + else + { + switch ($this->data[$this->position]) + { + case '"': + $this->position++; + $this->state = 'value'; + break; + + case "\x0A": + $this->position++; + $this->state = 'new_line'; + break; + + case '\\': + $this->position++; + $this->state = 'quote_escaped'; + break; + + default: + $this->state = 'quote_char'; + break; + } + } + } + + /** + * Parse a header value while within quotes + * + * @access private + */ + function quote_char() + { + $len = strcspn($this->data, "\x09\x20\x0A\"\\", $this->position); + $this->value .= substr($this->data, $this->position, $len); + $this->position += $len; + $this->state = 'value'; + } + + /** + * Parse an escaped character within quotes + * + * @access private + */ + function quote_escaped() + { + $this->value .= $this->data[$this->position]; + $this->position++; + $this->state = 'quote'; + } + + /** + * Parse the body + * + * @access private + */ + function body() + { + $this->body = substr($this->data, $this->position); + $this->state = 'emit'; + } +} + +/** + * gzdecode + * + * @package SimplePie + */ +class SimplePie_gzdecode +{ + /** + * Compressed data + * + * @access private + * @see gzdecode::$data + */ + var $compressed_data; + + /** + * Size of compressed data + * + * @access private + */ + var $compressed_size; + + /** + * Minimum size of a valid gzip string + * + * @access private + */ + var $min_compressed_size = 18; + + /** + * Current position of pointer + * + * @access private + */ + var $position = 0; + + /** + * Flags (FLG) + * + * @access private + */ + var $flags; + + /** + * Uncompressed data + * + * @access public + * @see gzdecode::$compressed_data + */ + var $data; + + /** + * Modified time + * + * @access public + */ + var $MTIME; + + /** + * Extra Flags + * + * @access public + */ + var $XFL; + + /** + * Operating System + * + * @access public + */ + var $OS; + + /** + * Subfield ID 1 + * + * @access public + * @see gzdecode::$extra_field + * @see gzdecode::$SI2 + */ + var $SI1; + + /** + * Subfield ID 2 + * + * @access public + * @see gzdecode::$extra_field + * @see gzdecode::$SI1 + */ + var $SI2; + + /** + * Extra field content + * + * @access public + * @see gzdecode::$SI1 + * @see gzdecode::$SI2 + */ + var $extra_field; + + /** + * Original filename + * + * @access public + */ + var $filename; + + /** + * Human readable comment + * + * @access public + */ + var $comment; + + /** + * Don't allow anything to be set + * + * @access public + */ + function __set($name, $value) + { + trigger_error("Cannot write property $name", E_USER_ERROR); + } + + /** + * Set the compressed string and related properties + * + * @access public + */ + function SimplePie_gzdecode($data) + { + $this->compressed_data = $data; + $this->compressed_size = strlen($data); + } + + /** + * Decode the GZIP stream + * + * @access public + */ + function parse() + { + if ($this->compressed_size >= $this->min_compressed_size) + { + // Check ID1, ID2, and CM + if (substr($this->compressed_data, 0, 3) !== "\x1F\x8B\x08") + { + return false; + } + + // Get the FLG (FLaGs) + $this->flags = ord($this->compressed_data[3]); + + // FLG bits above (1 << 4) are reserved + if ($this->flags > 0x1F) + { + return false; + } + + // Advance the pointer after the above + $this->position += 4; + + // MTIME + $mtime = substr($this->compressed_data, $this->position, 4); + // Reverse the string if we're on a big-endian arch because l is the only signed long and is machine endianness + if (current(unpack('S', "\x00\x01")) === 1) + { + $mtime = strrev($mtime); + } + $this->MTIME = current(unpack('l', $mtime)); + $this->position += 4; + + // Get the XFL (eXtra FLags) + $this->XFL = ord($this->compressed_data[$this->position++]); + + // Get the OS (Operating System) + $this->OS = ord($this->compressed_data[$this->position++]); + + // Parse the FEXTRA + if ($this->flags & 4) + { + // Read subfield IDs + $this->SI1 = $this->compressed_data[$this->position++]; + $this->SI2 = $this->compressed_data[$this->position++]; + + // SI2 set to zero is reserved for future use + if ($this->SI2 === "\x00") + { + return false; + } + + // Get the length of the extra field + $len = current(unpack('v', substr($this->compressed_data, $this->position, 2))); + $position += 2; + + // Check the length of the string is still valid + $this->min_compressed_size += $len + 4; + if ($this->compressed_size >= $this->min_compressed_size) + { + // Set the extra field to the given data + $this->extra_field = substr($this->compressed_data, $this->position, $len); + $this->position += $len; + } + else + { + return false; + } + } + + // Parse the FNAME + if ($this->flags & 8) + { + // Get the length of the filename + $len = strcspn($this->compressed_data, "\x00", $this->position); + + // Check the length of the string is still valid + $this->min_compressed_size += $len + 1; + if ($this->compressed_size >= $this->min_compressed_size) + { + // Set the original filename to the given string + $this->filename = substr($this->compressed_data, $this->position, $len); + $this->position += $len + 1; + } + else + { + return false; + } + } + + // Parse the FCOMMENT + if ($this->flags & 16) + { + // Get the length of the comment + $len = strcspn($this->compressed_data, "\x00", $this->position); + + // Check the length of the string is still valid + $this->min_compressed_size += $len + 1; + if ($this->compressed_size >= $this->min_compressed_size) + { + // Set the original comment to the given string + $this->comment = substr($this->compressed_data, $this->position, $len); + $this->position += $len + 1; + } + else + { + return false; + } + } + + // Parse the FHCRC + if ($this->flags & 2) + { + // Check the length of the string is still valid + $this->min_compressed_size += $len + 2; + if ($this->compressed_size >= $this->min_compressed_size) + { + // Read the CRC + $crc = current(unpack('v', substr($this->compressed_data, $this->position, 2))); + + // Check the CRC matches + if ((crc32(substr($this->compressed_data, 0, $this->position)) & 0xFFFF) === $crc) + { + $this->position += 2; + } + else + { + return false; + } + } + else + { + return false; + } + } + + // Decompress the actual data + if (($this->data = gzinflate(substr($this->compressed_data, $this->position, -8))) === false) + { + return false; + } + else + { + $this->position = $this->compressed_size - 8; + } + + // Check CRC of data + $crc = current(unpack('V', substr($this->compressed_data, $this->position, 4))); + $this->position += 4; + /*if (extension_loaded('hash') && sprintf('%u', current(unpack('V', hash('crc32b', $this->data)))) !== sprintf('%u', $crc)) + { + return false; + }*/ + + // Check ISIZE of data + $isize = current(unpack('V', substr($this->compressed_data, $this->position, 4))); + $this->position += 4; + if (sprintf('%u', strlen($this->data) & 0xFFFFFFFF) !== sprintf('%u', $isize)) + { + return false; + } + + // Wow, against all odds, we've actually got a valid gzip string + return true; + } + else + { + return false; + } + } +} + +class SimplePie_Cache +{ + /** + * Don't call the constructor. Please. + * + * @access private + */ + function SimplePie_Cache() + { + trigger_error('Please call SimplePie_Cache::create() instead of the constructor', E_USER_ERROR); + } + + /** + * Create a new SimplePie_Cache object + * + * @static + * @access public + */ + function create($location, $filename, $extension) + { + $location_iri = new SimplePie_IRI($location); + switch ($location_iri->get_scheme()) + { + case 'mysql': + if (extension_loaded('mysql')) + { + return new SimplePie_Cache_MySQL($location_iri, $filename, $extension); + } + break; + + default: + return new SimplePie_Cache_File($location, $filename, $extension); + } + } +} + +class SimplePie_Cache_File +{ + var $location; + var $filename; + var $extension; + var $name; + + function SimplePie_Cache_File($location, $filename, $extension) + { + $this->location = $location; + $this->filename = $filename; + $this->extension = $extension; + $this->name = "$this->location/$this->filename.$this->extension"; + } + + function save($data) + { + if (file_exists($this->name) && is_writeable($this->name) || file_exists($this->location) && is_writeable($this->location)) + { + if (is_a($data, 'SimplePie')) + { + $data = $data->data; + } + + $data = serialize($data); + + if (function_exists('file_put_contents')) + { + return (bool) file_put_contents($this->name, $data); + } + else + { + $fp = fopen($this->name, 'wb'); + if ($fp) + { + fwrite($fp, $data); + fclose($fp); + return true; + } + } + } + return false; + } + + function load() + { + if (file_exists($this->name) && is_readable($this->name)) + { + return unserialize(file_get_contents($this->name)); + } + return false; + } + + function mtime() + { + if (file_exists($this->name)) + { + return filemtime($this->name); + } + return false; + } + + function touch() + { + if (file_exists($this->name)) + { + return touch($this->name); + } + return false; + } + + function unlink() + { + if (file_exists($this->name)) + { + return unlink($this->name); + } + return false; + } +} + +class SimplePie_Cache_DB +{ + function prepare_simplepie_object_for_cache($data) + { + $items = $data->get_items(); + $items_by_id = array(); + + if (!empty($items)) + { + foreach ($items as $item) + { + $items_by_id[$item->get_id()] = $item; + } + + if (count($items_by_id) !== count($items)) + { + $items_by_id = array(); + foreach ($items as $item) + { + $items_by_id[$item->get_id(true)] = $item; + } + } + + if (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0])) + { + $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]; + } + elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0])) + { + $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]; + } + elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0])) + { + $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]; + } + elseif (isset($data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0])) + { + $channel =& $data->data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]['child'][SIMPLEPIE_NAMESPACE_RSS_20]['channel'][0]; + } + else + { + $channel = null; + } + + if ($channel !== null) + { + if (isset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry'])) + { + unset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry']); + } + if (isset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['entry'])) + { + unset($channel['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['entry']); + } + if (isset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_10]['item'])) + { + unset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_10]['item']); + } + if (isset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_090]['item'])) + { + unset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_090]['item']); + } + if (isset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_20]['item'])) + { + unset($channel['child'][SIMPLEPIE_NAMESPACE_RSS_20]['item']); + } + } + if (isset($data->data['items'])) + { + unset($data->data['items']); + } + if (isset($data->data['ordered_items'])) + { + unset($data->data['ordered_items']); + } + } + return array(serialize($data->data), $items_by_id); + } +} + +class SimplePie_Cache_MySQL extends SimplePie_Cache_DB +{ + var $mysql; + var $options; + var $id; + + function SimplePie_Cache_MySQL($mysql_location, $name, $extension) + { + $host = $mysql_location->get_host(); + if (SimplePie_Misc::stripos($host, 'unix(') === 0 && substr($host, -1) === ')') + { + $server = ':' . substr($host, 5, -1); + } + else + { + $server = $host; + if ($mysql_location->get_port() !== null) + { + $server .= ':' . $mysql_location->get_port(); + } + } + + if (strpos($mysql_location->get_userinfo(), ':') !== false) + { + list($username, $password) = explode(':', $mysql_location->get_userinfo(), 2); + } + else + { + $username = $mysql_location->get_userinfo(); + $password = null; + } + + if ($this->mysql = mysql_connect($server, $username, $password)) + { + $this->id = $name . $extension; + $this->options = SimplePie_Misc::parse_str($mysql_location->get_query()); + if (!isset($this->options['prefix'][0])) + { + $this->options['prefix'][0] = ''; + } + + if (mysql_select_db(ltrim($mysql_location->get_path(), '/')) + && mysql_query('SET NAMES utf8') + && ($query = mysql_unbuffered_query('SHOW TABLES'))) + { + $db = array(); + while ($row = mysql_fetch_row($query)) + { + $db[] = $row[0]; + } + + if (!in_array($this->options['prefix'][0] . 'cache_data', $db)) + { + if (!mysql_query('CREATE TABLE `' . $this->options['prefix'][0] . 'cache_data` (`id` TEXT CHARACTER SET utf8 NOT NULL, `items` SMALLINT NOT NULL DEFAULT 0, `data` BLOB NOT NULL, `mtime` INT UNSIGNED NOT NULL, UNIQUE (`id`(125)))')) + { + $this->mysql = null; + } + } + + if (!in_array($this->options['prefix'][0] . 'items', $db)) + { + if (!mysql_query('CREATE TABLE `' . $this->options['prefix'][0] . 'items` (`feed_id` TEXT CHARACTER SET utf8 NOT NULL, `id` TEXT CHARACTER SET utf8 NOT NULL, `data` TEXT CHARACTER SET utf8 NOT NULL, `posted` INT UNSIGNED NOT NULL, INDEX `feed_id` (`feed_id`(125)))')) + { + $this->mysql = null; + } + } + } + else + { + $this->mysql = null; + } + } + } + + function save($data) + { + if ($this->mysql) + { + $feed_id = "'" . mysql_real_escape_string($this->id) . "'"; + + if (is_a($data, 'SimplePie')) + { + if (SIMPLEPIE_PHP5) + { + // This keyword needs to defy coding standards for PHP4 compatibility + $data = clone($data); + } + + $prepared = $this->prepare_simplepie_object_for_cache($data); + + if ($query = mysql_query('SELECT `id` FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = ' . $feed_id, $this->mysql)) + { + if (mysql_num_rows($query)) + { + $items = count($prepared[1]); + if ($items) + { + $sql = 'UPDATE `' . $this->options['prefix'][0] . 'cache_data` SET `items` = ' . $items . ', `data` = \'' . mysql_real_escape_string($prepared[0]) . '\', `mtime` = ' . time() . ' WHERE `id` = ' . $feed_id; + } + else + { + $sql = 'UPDATE `' . $this->options['prefix'][0] . 'cache_data` SET `data` = \'' . mysql_real_escape_string($prepared[0]) . '\', `mtime` = ' . time() . ' WHERE `id` = ' . $feed_id; + } + + if (!mysql_query($sql, $this->mysql)) + { + return false; + } + } + elseif (!mysql_query('INSERT INTO `' . $this->options['prefix'][0] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(' . $feed_id . ', ' . count($prepared[1]) . ', \'' . mysql_real_escape_string($prepared[0]) . '\', ' . time() . ')', $this->mysql)) + { + return false; + } + + $ids = array_keys($prepared[1]); + if (!empty($ids)) + { + foreach ($ids as $id) + { + $database_ids[] = mysql_real_escape_string($id); + } + + if ($query = mysql_unbuffered_query('SELECT `id` FROM `' . $this->options['prefix'][0] . 'items` WHERE `id` = \'' . implode('\' OR `id` = \'', $database_ids) . '\' AND `feed_id` = ' . $feed_id, $this->mysql)) + { + $existing_ids = array(); + while ($row = mysql_fetch_row($query)) + { + $existing_ids[] = $row[0]; + } + + $new_ids = array_diff($ids, $existing_ids); + + foreach ($new_ids as $new_id) + { + if (!($date = $prepared[1][$new_id]->get_date('U'))) + { + $date = time(); + } + + if (!mysql_query('INSERT INTO `' . $this->options['prefix'][0] . 'items` (`feed_id`, `id`, `data`, `posted`) VALUES(' . $feed_id . ', \'' . mysql_real_escape_string($new_id) . '\', \'' . mysql_real_escape_string(serialize($prepared[1][$new_id]->data)) . '\', ' . $date . ')', $this->mysql)) + { + return false; + } + } + return true; + } + } + else + { + return true; + } + } + } + elseif ($query = mysql_query('SELECT `id` FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = ' . $feed_id, $this->mysql)) + { + if (mysql_num_rows($query)) + { + if (mysql_query('UPDATE `' . $this->options['prefix'][0] . 'cache_data` SET `items` = 0, `data` = \'' . mysql_real_escape_string(serialize($data)) . '\', `mtime` = ' . time() . ' WHERE `id` = ' . $feed_id, $this->mysql)) + { + return true; + } + } + elseif (mysql_query('INSERT INTO `' . $this->options['prefix'][0] . 'cache_data` (`id`, `items`, `data`, `mtime`) VALUES(\'' . mysql_real_escape_string($this->id) . '\', 0, \'' . mysql_real_escape_string(serialize($data)) . '\', ' . time() . ')', $this->mysql)) + { + return true; + } + } + } + return false; + } + + function load() + { + if ($this->mysql && ($query = mysql_query('SELECT `items`, `data` FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql)) && ($row = mysql_fetch_row($query))) + { + $data = unserialize($row[1]); + + if (isset($this->options['items'][0])) + { + $items = (int) $this->options['items'][0]; + } + else + { + $items = (int) $row[0]; + } + + if ($items !== 0) + { + if (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0])) + { + $feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['feed'][0]; + } + elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0])) + { + $feed =& $data['child'][SIMPLEPIE_NAMESPACE_ATOM_03]['feed'][0]; + } + elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0])) + { + $feed =& $data['child'][SIMPLEPIE_NAMESPACE_RDF]['RDF'][0]; + } + elseif (isset($data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0])) + { + $feed =& $data['child'][SIMPLEPIE_NAMESPACE_RSS_20]['rss'][0]; + } + else + { + $feed = null; + } + + if ($feed !== null) + { + $sql = 'SELECT `data` FROM `' . $this->options['prefix'][0] . 'items` WHERE `feed_id` = \'' . mysql_real_escape_string($this->id) . '\' ORDER BY `posted` DESC'; + if ($items > 0) + { + $sql .= ' LIMIT ' . $items; + } + + if ($query = mysql_unbuffered_query($sql, $this->mysql)) + { + while ($row = mysql_fetch_row($query)) + { + $feed['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['entry'][] = unserialize($row[0]); + } + } + else + { + return false; + } + } + } + return $data; + } + return false; + } + + function mtime() + { + if ($this->mysql && ($query = mysql_query('SELECT `mtime` FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql)) && ($row = mysql_fetch_row($query))) + { + return $row[0]; + } + else + { + return false; + } + } + + function touch() + { + if ($this->mysql && ($query = mysql_query('UPDATE `' . $this->options['prefix'][0] . 'cache_data` SET `mtime` = ' . time() . ' WHERE `id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql)) && mysql_affected_rows($this->mysql)) + { + return true; + } + else + { + return false; + } + } + + function unlink() + { + if ($this->mysql && ($query = mysql_query('DELETE FROM `' . $this->options['prefix'][0] . 'cache_data` WHERE `id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql)) && ($query2 = mysql_query('DELETE FROM `' . $this->options['prefix'][0] . 'items` WHERE `feed_id` = \'' . mysql_real_escape_string($this->id) . "'", $this->mysql))) + { + return true; + } + else + { + return false; + } + } +} + +class SimplePie_Misc +{ + function time_hms($seconds) + { + $time = ''; + + $hours = floor($seconds / 3600); + $remainder = $seconds % 3600; + if ($hours > 0) + { + $time .= $hours.':'; + } + + $minutes = floor($remainder / 60); + $seconds = $remainder % 60; + if ($minutes < 10 && $hours > 0) + { + $minutes = '0' . $minutes; + } + if ($seconds < 10) + { + $seconds = '0' . $seconds; + } + + $time .= $minutes.':'; + $time .= $seconds; + + return $time; + } + + function absolutize_url($relative, $base) + { + $iri = SimplePie_IRI::absolutize(new SimplePie_IRI($base), $relative); + return $iri->get_iri(); + } + + function remove_dot_segments($input) + { + $output = ''; + while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..') + { + // A: If the input buffer begins with a prefix of "../" or "./", then remove that prefix from the input buffer; otherwise, + if (strpos($input, '../') === 0) + { + $input = substr($input, 3); + } + elseif (strpos($input, './') === 0) + { + $input = substr($input, 2); + } + // B: if the input buffer begins with a prefix of "/./" or "/.", where "." is a complete path segment, then replace that prefix with "/" in the input buffer; otherwise, + elseif (strpos($input, '/./') === 0) + { + $input = substr_replace($input, '/', 0, 3); + } + elseif ($input === '/.') + { + $input = '/'; + } + // C: if the input buffer begins with a prefix of "/../" or "/..", where ".." is a complete path segment, then replace that prefix with "/" in the input buffer and remove the last segment and its preceding "/" (if any) from the output buffer; otherwise, + elseif (strpos($input, '/../') === 0) + { + $input = substr_replace($input, '/', 0, 4); + $output = substr_replace($output, '', strrpos($output, '/')); + } + elseif ($input === '/..') + { + $input = '/'; + $output = substr_replace($output, '', strrpos($output, '/')); + } + // D: if the input buffer consists only of "." or "..", then remove that from the input buffer; otherwise, + elseif ($input === '.' || $input === '..') + { + $input = ''; + } + // E: move the first path segment in the input buffer to the end of the output buffer, including the initial "/" character (if any) and any subsequent characters up to, but not including, the next "/" character or the end of the input buffer + elseif (($pos = strpos($input, '/', 1)) !== false) + { + $output .= substr($input, 0, $pos); + $input = substr_replace($input, '', 0, $pos); + } + else + { + $output .= $input; + $input = ''; + } + } + return $output . $input; + } + + function get_element($realname, $string) + { + $return = array(); + $name = preg_quote($realname, '/'); + if (preg_match_all("/<($name)" . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . "(>(.*)<\/$name>|(\/)?>)/siU", $string, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) + { + for ($i = 0, $total_matches = count($matches); $i < $total_matches; $i++) + { + $return[$i]['tag'] = $realname; + $return[$i]['full'] = $matches[$i][0][0]; + $return[$i]['offset'] = $matches[$i][0][1]; + if (strlen($matches[$i][3][0]) <= 2) + { + $return[$i]['self_closing'] = true; + } + else + { + $return[$i]['self_closing'] = false; + $return[$i]['content'] = $matches[$i][4][0]; + } + $return[$i]['attribs'] = array(); + if (isset($matches[$i][2][0]) && preg_match_all('/[\x09\x0A\x0B\x0C\x0D\x20]+([^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3D\x3E]*)(?:[\x09\x0A\x0B\x0C\x0D\x20]*=[\x09\x0A\x0B\x0C\x0D\x20]*(?:"([^"]*)"|\'([^\']*)\'|([^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?/', ' ' . $matches[$i][2][0] . ' ', $attribs, PREG_SET_ORDER)) + { + for ($j = 0, $total_attribs = count($attribs); $j < $total_attribs; $j++) + { + if (count($attribs[$j]) === 2) + { + $attribs[$j][2] = $attribs[$j][1]; + } + $return[$i]['attribs'][strtolower($attribs[$j][1])]['data'] = SimplePie_Misc::entities_decode(end($attribs[$j]), 'UTF-8'); + } + } + } + } + return $return; + } + + function element_implode($element) + { + $full = "<$element[tag]"; + foreach ($element['attribs'] as $key => $value) + { + $key = strtolower($key); + $full .= " $key=\"" . htmlspecialchars($value['data']) . '"'; + } + if ($element['self_closing']) + { + $full .= ' />'; + } + else + { + $full .= ">$element[content]"; + } + return $full; + } + + function error($message, $level, $file, $line) + { + if ((ini_get('error_reporting') & $level) > 0) + { + switch ($level) + { + case E_USER_ERROR: + $note = 'PHP Error'; + break; + case E_USER_WARNING: + $note = 'PHP Warning'; + break; + case E_USER_NOTICE: + $note = 'PHP Notice'; + break; + default: + $note = 'Unknown Error'; + break; + } + + $log_error = true; + if (!function_exists('error_log')) + { + $log_error = false; + } + + $log_file = @ini_get('error_log'); + if (!empty($log_file) && ('syslog' != $log_file) && !@is_writable($log_file)) + { + $log_error = false; + } + + if ($log_error) + { + @error_log("$note: $message in $file on line $line", 0); + } + } + + return $message; + } + + /** + * If a file has been cached, retrieve and display it. + * + * This is most useful for caching images (get_favicon(), etc.), + * however it works for all cached files. This WILL NOT display ANY + * file/image/page/whatever, but rather only display what has already + * been cached by SimplePie. + * + * @access public + * @see SimplePie::get_favicon() + * @param str $identifier_url URL that is used to identify the content. + * This may or may not be the actual URL of the live content. + * @param str $cache_location Location of SimplePie's cache. Defaults + * to './cache'. + * @param str $cache_extension The file extension that the file was + * cached with. Defaults to 'spc'. + * @param str $cache_class Name of the cache-handling class being used + * in SimplePie. Defaults to 'SimplePie_Cache', and should be left + * as-is unless you've overloaded the class. + * @param str $cache_name_function Obsolete. Exists for backwards + * compatibility reasons only. + */ + function display_cached_file($identifier_url, $cache_location = './cache', $cache_extension = 'spc', $cache_class = 'SimplePie_Cache', $cache_name_function = 'md5') + { + $cache = call_user_func(array($cache_class, 'create'), $cache_location, $identifier_url, $cache_extension); + + if ($file = $cache->load()) + { + if (isset($file['headers']['content-type'])) + { + header('Content-type:' . $file['headers']['content-type']); + } + else + { + header('Content-type: application/octet-stream'); + } + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days + echo $file['body']; + exit; + } + + die('Cached file for ' . $identifier_url . ' cannot be found.'); + } + + function fix_protocol($url, $http = 1) + { + $url = SimplePie_Misc::normalize_url($url); + $parsed = SimplePie_Misc::parse_url($url); + if ($parsed['scheme'] !== '' && $parsed['scheme'] !== 'http' && $parsed['scheme'] !== 'https') + { + return SimplePie_Misc::fix_protocol(SimplePie_Misc::compress_parse_url('http', $parsed['authority'], $parsed['path'], $parsed['query'], $parsed['fragment']), $http); + } + + if ($parsed['scheme'] === '' && $parsed['authority'] === '' && !file_exists($url)) + { + return SimplePie_Misc::fix_protocol(SimplePie_Misc::compress_parse_url('http', $parsed['path'], '', $parsed['query'], $parsed['fragment']), $http); + } + + if ($http === 2 && $parsed['scheme'] !== '') + { + return "feed:$url"; + } + elseif ($http === 3 && strtolower($parsed['scheme']) === 'http') + { + return substr_replace($url, 'podcast', 0, 4); + } + elseif ($http === 4 && strtolower($parsed['scheme']) === 'http') + { + return substr_replace($url, 'itpc', 0, 4); + } + else + { + return $url; + } + } + + function parse_url($url) + { + $iri = new SimplePie_IRI($url); + return array( + 'scheme' => (string) $iri->get_scheme(), + 'authority' => (string) $iri->get_authority(), + 'path' => (string) $iri->get_path(), + 'query' => (string) $iri->get_query(), + 'fragment' => (string) $iri->get_fragment() + ); + } + + function compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '') + { + $iri = new SimplePie_IRI(''); + $iri->set_scheme($scheme); + $iri->set_authority($authority); + $iri->set_path($path); + $iri->set_query($query); + $iri->set_fragment($fragment); + return $iri->get_iri(); + } + + function normalize_url($url) + { + $iri = new SimplePie_IRI($url); + return $iri->get_iri(); + } + + function percent_encoding_normalization($match) + { + $integer = hexdec($match[1]); + if ($integer >= 0x41 && $integer <= 0x5A || $integer >= 0x61 && $integer <= 0x7A || $integer >= 0x30 && $integer <= 0x39 || $integer === 0x2D || $integer === 0x2E || $integer === 0x5F || $integer === 0x7E) + { + return chr($integer); + } + else + { + return strtoupper($match[0]); + } + } + + /** + * Remove bad UTF-8 bytes + * + * PCRE Pattern to locate bad bytes in a UTF-8 string comes from W3C + * FAQ: Multilingual Forms (modified to include full ASCII range) + * + * @author Geoffrey Sneddon + * @see http://www.w3.org/International/questions/qa-forms-utf-8 + * @param string $str String to remove bad UTF-8 bytes from + * @return string UTF-8 string + */ + function utf8_bad_replace($str) + { + if (function_exists('iconv') && ($return = @iconv('UTF-8', 'UTF-8//IGNORE', $str))) + { + return $return; + } + elseif (function_exists('mb_convert_encoding') && ($return = @mb_convert_encoding($str, 'UTF-8', 'UTF-8'))) + { + return $return; + } + elseif (preg_match_all('/(?:[\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2})+/', $str, $matches)) + { + return implode("\xEF\xBF\xBD", $matches[0]); + } + elseif ($str !== '') + { + return "\xEF\xBF\xBD"; + } + else + { + return ''; + } + } + + /** + * Converts a Windows-1252 encoded string to a UTF-8 encoded string + * + * @static + * @access public + * @param string $string Windows-1252 encoded string + * @return string UTF-8 encoded string + */ + function windows_1252_to_utf8($string) + { + static $convert_table = array("\x80" => "\xE2\x82\xAC", "\x81" => "\xEF\xBF\xBD", "\x82" => "\xE2\x80\x9A", "\x83" => "\xC6\x92", "\x84" => "\xE2\x80\x9E", "\x85" => "\xE2\x80\xA6", "\x86" => "\xE2\x80\xA0", "\x87" => "\xE2\x80\xA1", "\x88" => "\xCB\x86", "\x89" => "\xE2\x80\xB0", "\x8A" => "\xC5\xA0", "\x8B" => "\xE2\x80\xB9", "\x8C" => "\xC5\x92", "\x8D" => "\xEF\xBF\xBD", "\x8E" => "\xC5\xBD", "\x8F" => "\xEF\xBF\xBD", "\x90" => "\xEF\xBF\xBD", "\x91" => "\xE2\x80\x98", "\x92" => "\xE2\x80\x99", "\x93" => "\xE2\x80\x9C", "\x94" => "\xE2\x80\x9D", "\x95" => "\xE2\x80\xA2", "\x96" => "\xE2\x80\x93", "\x97" => "\xE2\x80\x94", "\x98" => "\xCB\x9C", "\x99" => "\xE2\x84\xA2", "\x9A" => "\xC5\xA1", "\x9B" => "\xE2\x80\xBA", "\x9C" => "\xC5\x93", "\x9D" => "\xEF\xBF\xBD", "\x9E" => "\xC5\xBE", "\x9F" => "\xC5\xB8", "\xA0" => "\xC2\xA0", "\xA1" => "\xC2\xA1", "\xA2" => "\xC2\xA2", "\xA3" => "\xC2\xA3", "\xA4" => "\xC2\xA4", "\xA5" => "\xC2\xA5", "\xA6" => "\xC2\xA6", "\xA7" => "\xC2\xA7", "\xA8" => "\xC2\xA8", "\xA9" => "\xC2\xA9", "\xAA" => "\xC2\xAA", "\xAB" => "\xC2\xAB", "\xAC" => "\xC2\xAC", "\xAD" => "\xC2\xAD", "\xAE" => "\xC2\xAE", "\xAF" => "\xC2\xAF", "\xB0" => "\xC2\xB0", "\xB1" => "\xC2\xB1", "\xB2" => "\xC2\xB2", "\xB3" => "\xC2\xB3", "\xB4" => "\xC2\xB4", "\xB5" => "\xC2\xB5", "\xB6" => "\xC2\xB6", "\xB7" => "\xC2\xB7", "\xB8" => "\xC2\xB8", "\xB9" => "\xC2\xB9", "\xBA" => "\xC2\xBA", "\xBB" => "\xC2\xBB", "\xBC" => "\xC2\xBC", "\xBD" => "\xC2\xBD", "\xBE" => "\xC2\xBE", "\xBF" => "\xC2\xBF", "\xC0" => "\xC3\x80", "\xC1" => "\xC3\x81", "\xC2" => "\xC3\x82", "\xC3" => "\xC3\x83", "\xC4" => "\xC3\x84", "\xC5" => "\xC3\x85", "\xC6" => "\xC3\x86", "\xC7" => "\xC3\x87", "\xC8" => "\xC3\x88", "\xC9" => "\xC3\x89", "\xCA" => "\xC3\x8A", "\xCB" => "\xC3\x8B", "\xCC" => "\xC3\x8C", "\xCD" => "\xC3\x8D", "\xCE" => "\xC3\x8E", "\xCF" => "\xC3\x8F", "\xD0" => "\xC3\x90", "\xD1" => "\xC3\x91", "\xD2" => "\xC3\x92", "\xD3" => "\xC3\x93", "\xD4" => "\xC3\x94", "\xD5" => "\xC3\x95", "\xD6" => "\xC3\x96", "\xD7" => "\xC3\x97", "\xD8" => "\xC3\x98", "\xD9" => "\xC3\x99", "\xDA" => "\xC3\x9A", "\xDB" => "\xC3\x9B", "\xDC" => "\xC3\x9C", "\xDD" => "\xC3\x9D", "\xDE" => "\xC3\x9E", "\xDF" => "\xC3\x9F", "\xE0" => "\xC3\xA0", "\xE1" => "\xC3\xA1", "\xE2" => "\xC3\xA2", "\xE3" => "\xC3\xA3", "\xE4" => "\xC3\xA4", "\xE5" => "\xC3\xA5", "\xE6" => "\xC3\xA6", "\xE7" => "\xC3\xA7", "\xE8" => "\xC3\xA8", "\xE9" => "\xC3\xA9", "\xEA" => "\xC3\xAA", "\xEB" => "\xC3\xAB", "\xEC" => "\xC3\xAC", "\xED" => "\xC3\xAD", "\xEE" => "\xC3\xAE", "\xEF" => "\xC3\xAF", "\xF0" => "\xC3\xB0", "\xF1" => "\xC3\xB1", "\xF2" => "\xC3\xB2", "\xF3" => "\xC3\xB3", "\xF4" => "\xC3\xB4", "\xF5" => "\xC3\xB5", "\xF6" => "\xC3\xB6", "\xF7" => "\xC3\xB7", "\xF8" => "\xC3\xB8", "\xF9" => "\xC3\xB9", "\xFA" => "\xC3\xBA", "\xFB" => "\xC3\xBB", "\xFC" => "\xC3\xBC", "\xFD" => "\xC3\xBD", "\xFE" => "\xC3\xBE", "\xFF" => "\xC3\xBF"); + + return strtr($string, $convert_table); + } + + function change_encoding($data, $input, $output) + { + $input = SimplePie_Misc::encoding($input); + $output = SimplePie_Misc::encoding($output); + + // We fail to fail on non US-ASCII bytes + if ($input === 'US-ASCII') + { + static $non_ascii_octects = ''; + if (!$non_ascii_octects) + { + for ($i = 0x80; $i <= 0xFF; $i++) + { + $non_ascii_octects .= chr($i); + } + } + $data = substr($data, 0, strcspn($data, $non_ascii_octects)); + } + + // This is first, as behaviour of this is completely predictable + if ($input === 'Windows-1252' && $output === 'UTF-8') + { + return SimplePie_Misc::windows_1252_to_utf8($data); + } + // This is second, as behaviour of this varies only with PHP version (the middle part of this expression checks the encoding is supported). + elseif (function_exists('mb_convert_encoding') && @mb_convert_encoding("\x80", 'UTF-16BE', $input) !== "\x00\x80" && ($return = @mb_convert_encoding($data, $output, $input))) + { + return $return; + } + // This is last, as behaviour of this varies with OS userland and PHP version + elseif (function_exists('iconv') && ($return = @iconv($input, $output, $data))) + { + return $return; + } + // If we can't do anything, just fail + else + { + return false; + } + } + + function encoding($charset) + { + // Normalization from UTS #22 + switch (strtolower(preg_replace('/(?:[^a-zA-Z0-9]+|([^0-9])0+)/', '\1', $charset))) + { + case 'adobestandardencoding': + case 'csadobestandardencoding': + return 'Adobe-Standard-Encoding'; + + case 'adobesymbolencoding': + case 'cshppsmath': + return 'Adobe-Symbol-Encoding'; + + case 'ami1251': + case 'amiga1251': + return 'Amiga-1251'; + + case 'ansix31101983': + case 'csat5001983': + case 'csiso99naplps': + case 'isoir99': + case 'naplps': + return 'ANSI_X3.110-1983'; + + case 'arabic7': + case 'asmo449': + case 'csiso89asmo449': + case 'iso9036': + case 'isoir89': + return 'ASMO_449'; + + case 'big5': + case 'csbig5': + case 'xxbig5': + return 'Big5'; + + case 'big5hkscs': + return 'Big5-HKSCS'; + + case 'bocu1': + case 'csbocu1': + return 'BOCU-1'; + + case 'brf': + case 'csbrf': + return 'BRF'; + + case 'bs4730': + case 'csiso4unitedkingdom': + case 'gb': + case 'iso646gb': + case 'isoir4': + case 'uk': + return 'BS_4730'; + + case 'bsviewdata': + case 'csiso47bsviewdata': + case 'isoir47': + return 'BS_viewdata'; + + case 'cesu8': + case 'cscesu8': + return 'CESU-8'; + + case 'ca': + case 'csa71': + case 'csaz243419851': + case 'csiso121canadian1': + case 'iso646ca': + case 'isoir121': + return 'CSA_Z243.4-1985-1'; + + case 'csa72': + case 'csaz243419852': + case 'csiso122canadian2': + case 'iso646ca2': + case 'isoir122': + return 'CSA_Z243.4-1985-2'; + + case 'csaz24341985gr': + case 'csiso123csaz24341985gr': + case 'isoir123': + return 'CSA_Z243.4-1985-gr'; + + case 'csiso139csn369103': + case 'csn369103': + case 'isoir139': + return 'CSN_369103'; + + case 'csdecmcs': + case 'dec': + case 'decmcs': + return 'DEC-MCS'; + + case 'csiso21german': + case 'de': + case 'din66003': + case 'iso646de': + case 'isoir21': + return 'DIN_66003'; + + case 'csdkus': + case 'dkus': + return 'dk-us'; + + case 'csiso646danish': + case 'dk': + case 'ds2089': + case 'iso646dk': + return 'DS_2089'; + + case 'csibmebcdicatde': + case 'ebcdicatde': + return 'EBCDIC-AT-DE'; + + case 'csebcdicatdea': + case 'ebcdicatdea': + return 'EBCDIC-AT-DE-A'; + + case 'csebcdiccafr': + case 'ebcdiccafr': + return 'EBCDIC-CA-FR'; + + case 'csebcdicdkno': + case 'ebcdicdkno': + return 'EBCDIC-DK-NO'; + + case 'csebcdicdknoa': + case 'ebcdicdknoa': + return 'EBCDIC-DK-NO-A'; + + case 'csebcdices': + case 'ebcdices': + return 'EBCDIC-ES'; + + case 'csebcdicesa': + case 'ebcdicesa': + return 'EBCDIC-ES-A'; + + case 'csebcdicess': + case 'ebcdicess': + return 'EBCDIC-ES-S'; + + case 'csebcdicfise': + case 'ebcdicfise': + return 'EBCDIC-FI-SE'; + + case 'csebcdicfisea': + case 'ebcdicfisea': + return 'EBCDIC-FI-SE-A'; + + case 'csebcdicfr': + case 'ebcdicfr': + return 'EBCDIC-FR'; + + case 'csebcdicit': + case 'ebcdicit': + return 'EBCDIC-IT'; + + case 'csebcdicpt': + case 'ebcdicpt': + return 'EBCDIC-PT'; + + case 'csebcdicuk': + case 'ebcdicuk': + return 'EBCDIC-UK'; + + case 'csebcdicus': + case 'ebcdicus': + return 'EBCDIC-US'; + + case 'csiso111ecmacyrillic': + case 'ecmacyrillic': + case 'isoir111': + case 'koi8e': + return 'ECMA-cyrillic'; + + case 'csiso17spanish': + case 'es': + case 'iso646es': + case 'isoir17': + return 'ES'; + + case 'csiso85spanish2': + case 'es2': + case 'iso646es2': + case 'isoir85': + return 'ES2'; + + case 'cseucfixwidjapanese': + case 'extendedunixcodefixedwidthforjapanese': + return 'Extended_UNIX_Code_Fixed_Width_for_Japanese'; + + case 'cseucpkdfmtjapanese': + case 'eucjp': + case 'extendedunixcodepackedformatforjapanese': + return 'Extended_UNIX_Code_Packed_Format_for_Japanese'; + + case 'gb18030': + return 'GB18030'; + + case 'chinese': + case 'cp936': + case 'csgb2312': + case 'csiso58gb231280': + case 'gb2312': + case 'gb231280': + case 'gbk': + case 'isoir58': + case 'ms936': + case 'windows936': + return 'GBK'; + + case 'cn': + case 'csiso57gb1988': + case 'gb198880': + case 'iso646cn': + case 'isoir57': + return 'GB_1988-80'; + + case 'csiso153gost1976874': + case 'gost1976874': + case 'isoir153': + case 'stsev35888': + return 'GOST_19768-74'; + + case 'csiso150': + case 'csiso150greekccitt': + case 'greekccitt': + case 'isoir150': + return 'greek-ccitt'; + + case 'csiso88greek7': + case 'greek7': + case 'isoir88': + return 'greek7'; + + case 'csiso18greek7old': + case 'greek7old': + case 'isoir18': + return 'greek7-old'; + + case 'cshpdesktop': + case 'hpdesktop': + return 'HP-DeskTop'; + + case 'cshplegal': + case 'hplegal': + return 'HP-Legal'; + + case 'cshpmath8': + case 'hpmath8': + return 'HP-Math8'; + + case 'cshppifont': + case 'hppifont': + return 'HP-Pi-font'; + + case 'cshproman8': + case 'hproman8': + case 'r8': + case 'roman8': + return 'hp-roman8'; + + case 'hzgb2312': + return 'HZ-GB-2312'; + + case 'csibmsymbols': + case 'ibmsymbols': + return 'IBM-Symbols'; + + case 'csibmthai': + case 'ibmthai': + return 'IBM-Thai'; + + case 'ccsid858': + case 'cp858': + case 'ibm858': + case 'pcmultilingual850euro': + return 'IBM00858'; + + case 'ccsid924': + case 'cp924': + case 'ebcdiclatin9euro': + case 'ibm924': + return 'IBM00924'; + + case 'ccsid1140': + case 'cp1140': + case 'ebcdicus37euro': + case 'ibm1140': + return 'IBM01140'; + + case 'ccsid1141': + case 'cp1141': + case 'ebcdicde273euro': + case 'ibm1141': + return 'IBM01141'; + + case 'ccsid1142': + case 'cp1142': + case 'ebcdicdk277euro': + case 'ebcdicno277euro': + case 'ibm1142': + return 'IBM01142'; + + case 'ccsid1143': + case 'cp1143': + case 'ebcdicfi278euro': + case 'ebcdicse278euro': + case 'ibm1143': + return 'IBM01143'; + + case 'ccsid1144': + case 'cp1144': + case 'ebcdicit280euro': + case 'ibm1144': + return 'IBM01144'; + + case 'ccsid1145': + case 'cp1145': + case 'ebcdices284euro': + case 'ibm1145': + return 'IBM01145'; + + case 'ccsid1146': + case 'cp1146': + case 'ebcdicgb285euro': + case 'ibm1146': + return 'IBM01146'; + + case 'ccsid1147': + case 'cp1147': + case 'ebcdicfr297euro': + case 'ibm1147': + return 'IBM01147'; + + case 'ccsid1148': + case 'cp1148': + case 'ebcdicinternational500euro': + case 'ibm1148': + return 'IBM01148'; - case 'INVARIANT': - case 'CSINVARIANT': - return 'INVARIANT'; + case 'ccsid1149': + case 'cp1149': + case 'ebcdicis871euro': + case 'ibm1149': + return 'IBM01149'; - case 'ISO_646.IRV:1983': - case 'ISO-IR-2': - case 'IRV': - case 'CSISO2INTLREFVERSION': - return 'ISO_646.irv:1983'; + case 'cp37': + case 'csibm37': + case 'ebcdiccpca': + case 'ebcdiccpnl': + case 'ebcdiccpus': + case 'ebcdiccpwt': + case 'ibm37': + return 'IBM037'; - case 'NATS-SEFI': - case 'ISO-IR-8-1': - case 'CSNATSSEFI': - return 'NATS-SEFI'; + case 'cp38': + case 'csibm38': + case 'ebcdicint': + case 'ibm38': + return 'IBM038'; - case 'NATS-SEFI-ADD': - case 'ISO-IR-8-2': - case 'CSNATSSEFIADD': - return 'NATS-SEFI-ADD'; + case 'cp273': + case 'csibm273': + case 'ibm273': + return 'IBM273'; - case 'NATS-DANO': - case 'ISO-IR-9-1': - case 'CSNATSDANO': - return 'NATS-DANO'; + case 'cp274': + case 'csibm274': + case 'ebcdicbe': + case 'ibm274': + return 'IBM274'; - case 'NATS-DANO-ADD': - case 'ISO-IR-9-2': - case 'CSNATSDANOADD': - return 'NATS-DANO-ADD'; + case 'cp275': + case 'csibm275': + case 'ebcdicbr': + case 'ibm275': + return 'IBM275'; - case 'SEN_850200_B': - case 'ISO-IR-10': - case 'FI': - case 'ISO646-FI': - case 'ISO646-SE': - case 'SE': - case 'CSISO10SWEDISH': - return 'SEN_850200_B'; + case 'csibm277': + case 'ebcdiccpdk': + case 'ebcdiccpno': + case 'ibm277': + return 'IBM277'; - case 'KS_C_5601-1987': - case 'ISO-IR-149': - case 'KS_C_5601-1989': - case 'KSC_5601': - case 'KOREAN': - case 'CSKSC56011987': - return 'KS_C_5601-1987'; + case 'cp278': + case 'csibm278': + case 'ebcdiccpfi': + case 'ebcdiccpse': + case 'ibm278': + return 'IBM278'; - case 'ISO-2022-KR': - case 'CSISO2022KR': - return 'ISO-2022-KR'; + case 'cp280': + case 'csibm280': + case 'ebcdiccpit': + case 'ibm280': + return 'IBM280'; - case 'EUC-KR': - case 'CSEUCKR': - return 'EUC-KR'; + case 'cp281': + case 'csibm281': + case 'ebcdicjpe': + case 'ibm281': + return 'IBM281'; - case 'ISO-2022-JP': - case 'CSISO2022JP': - return 'ISO-2022-JP'; + case 'cp284': + case 'csibm284': + case 'ebcdiccpes': + case 'ibm284': + return 'IBM284'; - case 'ISO-2022-JP-2': - case 'CSISO2022JP2': - return 'ISO-2022-JP-2'; + case 'cp285': + case 'csibm285': + case 'ebcdiccpgb': + case 'ibm285': + return 'IBM285'; - case 'JIS_C6220-1969-JP': - case 'JIS_C6220-1969': - case 'ISO-IR-13': - case 'KATAKANA': - case 'X0201-7': - case 'CSISO13JISC6220JP': - return 'JIS_C6220-1969-jp'; + case 'cp290': + case 'csibm290': + case 'ebcdicjpkana': + case 'ibm290': + return 'IBM290'; - case 'JIS_C6220-1969-RO': - case 'ISO-IR-14': - case 'JP': - case 'ISO646-JP': - case 'CSISO14JISC6220RO': - return 'JIS_C6220-1969-ro'; + case 'cp297': + case 'csibm297': + case 'ebcdiccpfr': + case 'ibm297': + return 'IBM297'; - case 'PT': - case 'ISO-IR-16': - case 'ISO646-PT': - case 'CSISO16PORTUGUESE': - return 'PT'; + case 'cp420': + case 'csibm420': + case 'ebcdiccpar1': + case 'ibm420': + return 'IBM420'; - case 'GREEK7-OLD': - case 'ISO-IR-18': - case 'CSISO18GREEK7OLD': - return 'greek7-old'; + case 'cp423': + case 'csibm423': + case 'ebcdiccpgr': + case 'ibm423': + return 'IBM423'; - case 'LATIN-GREEK': - case 'ISO-IR-19': - case 'CSISO19LATINGREEK': - return 'latin-greek'; + case 'cp424': + case 'csibm424': + case 'ebcdiccphe': + case 'ibm424': + return 'IBM424'; - case 'NF_Z_62-010_(1973)': - case 'ISO-IR-25': - case 'ISO646-FR1': - case 'CSISO25FRENCH': - return 'NF_Z_62-010_(1973)'; + case '437': + case 'cp437': + case 'cspc8codepage437': + case 'ibm437': + return 'IBM437'; - case 'LATIN-GREEK-1': - case 'ISO-IR-27': - case 'CSISO27LATINGREEK1': - return 'Latin-greek-1'; + case 'cp500': + case 'csibm500': + case 'ebcdiccpbe': + case 'ebcdiccpch': + case 'ibm500': + return 'IBM500'; - case 'ISO_5427': - case 'ISO-IR-37': - case 'CSISO5427CYRILLIC': - return 'ISO_5427'; + case 'cp775': + case 'cspc775baltic': + case 'ibm775': + return 'IBM775'; - case 'JIS_C6226-1978': - case 'ISO-IR-42': - case 'CSISO42JISC62261978': - return 'JIS_C6226-1978'; + case '850': + case 'cp850': + case 'cspc850multilingual': + case 'ibm850': + return 'IBM850'; - case 'BS_VIEWDATA': - case 'ISO-IR-47': - case 'CSISO47BSVIEWDATA': - return 'BS_viewdata'; + case '851': + case 'cp851': + case 'csibm851': + case 'ibm851': + return 'IBM851'; - case 'INIS': - case 'ISO-IR-49': - case 'CSISO49INIS': - return 'INIS'; + case '852': + case 'cp852': + case 'cspcp852': + case 'ibm852': + return 'IBM852'; - case 'INIS-8': - case 'ISO-IR-50': - case 'CSISO50INIS8': - return 'INIS-8'; + case '855': + case 'cp855': + case 'csibm855': + case 'ibm855': + return 'IBM855'; - case 'INIS-CYRILLIC': - case 'ISO-IR-51': - case 'CSISO51INISCYRILLIC': - return 'INIS-cyrillic'; + case '857': + case 'cp857': + case 'csibm857': + case 'ibm857': + return 'IBM857'; - case 'ISO_5427:1981': - case 'ISO-IR-54': - case 'ISO5427CYRILLIC1981': - return 'ISO_5427:1981'; + case '860': + case 'cp860': + case 'csibm860': + case 'ibm860': + return 'IBM860'; - case 'ISO_5428:1980': - case 'ISO-IR-55': - case 'CSISO5428GREEK': - return 'ISO_5428:1980'; + case '861': + case 'cp861': + case 'cpis': + case 'csibm861': + case 'ibm861': + return 'IBM861'; - case 'GB_1988-80': - case 'ISO-IR-57': - case 'CN': - case 'ISO646-CN': - case 'CSISO57GB1988': - return 'GB_1988-80'; + case '862': + case 'cp862': + case 'cspc862latinhebrew': + case 'ibm862': + return 'IBM862'; - case 'GB_2312-80': - case 'ISO-IR-58': - case 'CHINESE': - case 'CSISO58GB231280': - return 'GB_2312-80'; - - case 'NS_4551-2': - case 'ISO646-NO2': - case 'ISO-IR-61': - case 'NO2': - case 'CSISO61NORWEGIAN2': - return 'NS_4551-2'; + case '863': + case 'cp863': + case 'csibm863': + case 'ibm863': + return 'IBM863'; - case 'VIDEOTEX-SUPPL': - case 'ISO-IR-70': - case 'CSISO70VIDEOTEXSUPP1': - return 'videotex-suppl'; + case 'cp864': + case 'csibm864': + case 'ibm864': + return 'IBM864'; - case 'PT2': - case 'ISO-IR-84': - case 'ISO646-PT2': - case 'CSISO84PORTUGUESE2': - return 'PT2'; + case '865': + case 'cp865': + case 'csibm865': + case 'ibm865': + return 'IBM865'; - case 'ES2': - case 'ISO-IR-85': - case 'ISO646-ES2': - case 'CSISO85SPANISH2': - return 'ES2'; + case '866': + case 'cp866': + case 'csibm866': + case 'ibm866': + return 'IBM866'; - case 'MSZ_7795.3': - case 'ISO-IR-86': - case 'ISO646-HU': - case 'HU': - case 'CSISO86HUNGARIAN': - return 'MSZ_7795.3'; + case 'cp868': + case 'cpar': + case 'csibm868': + case 'ibm868': + return 'IBM868'; - case 'JIS_C6226-1983': - case 'ISO-IR-87': - case 'X0208': - case 'JIS_X0208-1983': - case 'CSISO87JISX0208': - return 'JIS_C6226-1983'; + case '869': + case 'cp869': + case 'cpgr': + case 'csibm869': + case 'ibm869': + return 'IBM869'; - case 'GREEK7': - case 'ISO-IR-88': - case 'CSISO88GREEK7': - return 'greek7'; + case 'cp870': + case 'csibm870': + case 'ebcdiccproece': + case 'ebcdiccpyu': + case 'ibm870': + return 'IBM870'; - case 'ASMO_449': - case 'ISO_9036': - case 'ARABIC7': - case 'ISO-IR-89': - case 'CSISO89ASMO449': - return 'ASMO_449'; + case 'cp871': + case 'csibm871': + case 'ebcdiccpis': + case 'ibm871': + return 'IBM871'; - case 'ISO-IR-90': - case 'CSISO90': - return 'iso-ir-90'; + case 'cp880': + case 'csibm880': + case 'ebcdiccyrillic': + case 'ibm880': + return 'IBM880'; - case 'JIS_C6229-1984-A': - case 'ISO-IR-91': - case 'JP-OCR-A': - case 'CSISO91JISC62291984A': - return 'JIS_C6229-1984-a'; + case 'cp891': + case 'csibm891': + case 'ibm891': + return 'IBM891'; - case 'JIS_C6229-1984-B': - case 'ISO-IR-92': - case 'ISO646-JP-OCR-B': - case 'JP-OCR-B': - case 'CSISO92JISC62991984B': - return 'JIS_C6229-1984-b'; + case 'cp903': + case 'csibm903': + case 'ibm903': + return 'IBM903'; - case 'JIS_C6229-1984-B-ADD': - case 'ISO-IR-93': - case 'JP-OCR-B-ADD': - case 'CSISO93JIS62291984BADD': - return 'JIS_C6229-1984-b-add'; + case '904': + case 'cp904': + case 'csibbm904': + case 'ibm904': + return 'IBM904'; - case 'JIS_C6229-1984-HAND': - case 'ISO-IR-94': - case 'JP-OCR-HAND': - case 'CSISO94JIS62291984HAND': - return 'JIS_C6229-1984-hand'; + case 'cp905': + case 'csibm905': + case 'ebcdiccptr': + case 'ibm905': + return 'IBM905'; - case 'JIS_C6229-1984-HAND-ADD': - case 'ISO-IR-95': - case 'JP-OCR-HAND-ADD': - case 'CSISO95JIS62291984HANDADD': - return 'JIS_C6229-1984-hand-add'; + case 'cp918': + case 'csibm918': + case 'ebcdiccpar2': + case 'ibm918': + return 'IBM918'; - case 'JIS_C6229-1984-KANA': - case 'ISO-IR-96': - case 'CSISO96JISC62291984KANA': - return 'JIS_C6229-1984-kana'; + case 'cp1026': + case 'csibm1026': + case 'ibm1026': + return 'IBM1026'; - case 'ISO_2033-1983': - case 'ISO-IR-98': - case 'E13B': - case 'CSISO2033': - return 'ISO_2033-1983'; + case 'ibm1047': + return 'IBM1047'; - case 'ANSI_X3.110-1983': - case 'ISO-IR-99': - case 'CSA_T500-1983': - case 'NAPLPS': - case 'CSISO99NAPLPS': - return 'ANSI_X3.110-1983'; + case 'csiso143iecp271': + case 'iecp271': + case 'isoir143': + return 'IEC_P27-1'; - case 'T.61-7BIT': - case 'ISO-IR-102': - case 'CSISO102T617BIT': - return 'T.61-7bit'; + case 'csiso49inis': + case 'inis': + case 'isoir49': + return 'INIS'; - case 'T.61-8BIT': - case 'T.61': - case 'ISO-IR-103': - case 'CSISO103T618BIT': - return 'T.61-8bit'; + case 'csiso50inis8': + case 'inis8': + case 'isoir50': + return 'INIS-8'; - case 'ECMA-CYRILLIC': - case 'ISO-IR-111': - case 'KOI8-E': - case 'CSISO111ECMACYRILLIC': - return 'ECMA-cyrillic'; + case 'csiso51iniscyrillic': + case 'iniscyrillic': + case 'isoir51': + return 'INIS-cyrillic'; - case 'CSA_Z243.4-1985-1': - case 'ISO-IR-121': - case 'ISO646-CA': - case 'CSA7-1': - case 'CA': - case 'CSISO121CANADIAN1': - return 'CSA_Z243.4-1985-1'; + case 'csinvariant': + case 'invariant': + return 'INVARIANT'; - case 'CSA_Z243.4-1985-2': - case 'ISO-IR-122': - case 'ISO646-CA2': - case 'CSA7-2': - case 'CSISO122CANADIAN2': - return 'CSA_Z243.4-1985-2'; + case 'iso2022cn': + return 'ISO-2022-CN'; - case 'CSA_Z243.4-1985-GR': - case 'ISO-IR-123': - case 'CSISO123CSAZ24341985GR': - return 'CSA_Z243.4-1985-gr'; + case 'iso2022cnext': + return 'ISO-2022-CN-EXT'; + + case 'csiso2022jp': + case 'iso2022jp': + return 'ISO-2022-JP'; + + case 'csiso2022jp2': + case 'iso2022jp2': + return 'ISO-2022-JP-2'; + + case 'csiso2022kr': + case 'iso2022kr': + return 'ISO-2022-KR'; + + case 'cswindows30latin1': + case 'iso88591windows30latin1': + return 'ISO-8859-1-Windows-3.0-Latin-1'; + + case 'cswindows31latin1': + case 'iso88591windows31latin1': + return 'ISO-8859-1-Windows-3.1-Latin-1'; + + case 'csisolatin2': + case 'iso88592': + case 'iso885921987': + case 'isoir101': + case 'l2': + case 'latin2': + return 'ISO-8859-2'; + + case 'cswindows31latin2': + case 'iso88592windowslatin2': + return 'ISO-8859-2-Windows-Latin-2'; + + case 'csisolatin3': + case 'iso88593': + case 'iso885931988': + case 'isoir109': + case 'l3': + case 'latin3': + return 'ISO-8859-3'; + + case 'csisolatin4': + case 'iso88594': + case 'iso885941988': + case 'isoir110': + case 'l4': + case 'latin4': + return 'ISO-8859-4'; + + case 'csisolatincyrillic': + case 'cyrillic': + case 'iso88595': + case 'iso885951988': + case 'isoir144': + return 'ISO-8859-5'; + + case 'arabic': + case 'asmo708': + case 'csisolatinarabic': + case 'ecma114': + case 'iso88596': + case 'iso885961987': + case 'isoir127': + return 'ISO-8859-6'; - case 'ISO_8859-6-E': - case 'CSISO88596E': - case 'ISO-8859-6-E': + case 'csiso88596e': + case 'iso88596e': return 'ISO-8859-6-E'; - case 'ISO_8859-6-I': - case 'CSISO88596I': - case 'ISO-8859-6-I': + case 'csiso88596i': + case 'iso88596i': return 'ISO-8859-6-I'; - case 'T.101-G2': - case 'ISO-IR-128': - case 'CSISO128T101G2': - return 'T.101-G2'; + case 'csisolatingreek': + case 'ecma118': + case 'elot928': + case 'greek': + case 'greek8': + case 'iso88597': + case 'iso885971987': + case 'isoir126': + return 'ISO-8859-7'; + + case 'csisolatinhebrew': + case 'hebrew': + case 'iso88598': + case 'iso885981988': + case 'isoir138': + return 'ISO-8859-8'; - case 'ISO_8859-8-E': - case 'CSISO88598E': - case 'ISO-8859-8-E': + case 'csiso88598e': + case 'iso88598e': return 'ISO-8859-8-E'; - case 'ISO_8859-8-I': - case 'CSISO88598I': - case 'ISO-8859-8-I': + case 'csiso88598i': + case 'iso88598i': return 'ISO-8859-8-I'; - case 'CSN_369103': - case 'ISO-IR-139': - case 'CSISO139CSN369103': - return 'CSN_369103'; + case 'cswindows31latin5': + case 'iso88599windowslatin5': + return 'ISO-8859-9-Windows-Latin-5'; - case 'JUS_I.B1.002': - case 'ISO-IR-141': - case 'ISO646-YU': - case 'JS': - case 'YU': - case 'CSISO141JUSIB1002': - return 'JUS_I.B1.002'; + case 'csisolatin6': + case 'iso885910': + case 'iso8859101992': + case 'isoir157': + case 'l6': + case 'latin6': + return 'ISO-8859-10'; - case 'IEC_P27-1': - case 'ISO-IR-143': - case 'CSISO143IECP271': - return 'IEC_P27-1'; + case 'iso885913': + return 'ISO-8859-13'; - case 'JUS_I.B1.003-SERB': - case 'ISO-IR-146': - case 'SERBIAN': - case 'CSISO146SERBIAN': - return 'JUS_I.B1.003-serb'; + case 'iso885914': + case 'iso8859141998': + case 'isoceltic': + case 'isoir199': + case 'l8': + case 'latin8': + return 'ISO-8859-14'; - case 'JUS_I.B1.003-MAC': - case 'MACEDONIAN': - case 'ISO-IR-147': - case 'CSISO147MACEDONIAN': - return 'JUS_I.B1.003-mac'; + case 'iso885915': + case 'latin9': + return 'ISO-8859-15'; - case 'GREEK-CCITT': - case 'ISO-IR-150': - case 'CSISO150': - case 'CSISO150GREEKCCITT': - return 'greek-ccitt'; + case 'iso885916': + case 'iso8859162001': + case 'isoir226': + case 'l10': + case 'latin10': + return 'ISO-8859-16'; - case 'NC_NC00-10:81': - case 'CUBA': - case 'ISO-IR-151': - case 'ISO646-CU': - case 'CSISO151CUBA': - return 'NC_NC00-10:81'; + case 'iso10646j1': + return 'ISO-10646-J-1'; + + case 'csunicode': + case 'iso10646ucs2': + return 'ISO-10646-UCS-2'; + + case 'csucs4': + case 'iso10646ucs4': + return 'ISO-10646-UCS-4'; + + case 'csunicodeascii': + case 'iso10646ucsbasic': + return 'ISO-10646-UCS-Basic'; + + case 'csunicodelatin1': + case 'iso10646': + case 'iso10646unicodelatin1': + return 'ISO-10646-Unicode-Latin1'; + + case 'csiso10646utf1': + case 'iso10646utf1': + return 'ISO-10646-UTF-1'; + + case 'csiso115481': + case 'iso115481': + case 'isotr115481': + return 'ISO-11548-1'; + + case 'csiso90': + case 'isoir90': + return 'iso-ir-90'; + + case 'csunicodeibm1261': + case 'isounicodeibm1261': + return 'ISO-Unicode-IBM-1261'; + + case 'csunicodeibm1264': + case 'isounicodeibm1264': + return 'ISO-Unicode-IBM-1264'; + + case 'csunicodeibm1265': + case 'isounicodeibm1265': + return 'ISO-Unicode-IBM-1265'; + + case 'csunicodeibm1268': + case 'isounicodeibm1268': + return 'ISO-Unicode-IBM-1268'; + + case 'csunicodeibm1276': + case 'isounicodeibm1276': + return 'ISO-Unicode-IBM-1276'; + + case 'csiso646basic1983': + case 'iso646basic1983': + case 'ref': + return 'ISO_646.basic:1983'; + + case 'csiso2intlrefversion': + case 'irv': + case 'iso646irv1983': + case 'isoir2': + return 'ISO_646.irv:1983'; + + case 'csiso2033': + case 'e13b': + case 'iso20331983': + case 'isoir98': + return 'ISO_2033-1983'; + + case 'csiso5427cyrillic': + case 'iso5427': + case 'isoir37': + return 'ISO_5427'; + + case 'iso5427cyrillic1981': + case 'iso54271981': + case 'isoir54': + return 'ISO_5427:1981'; + + case 'csiso5428greek': + case 'iso54281980': + case 'isoir55': + return 'ISO_5428:1980'; - case 'ISO_6937-2-25': - case 'ISO-IR-152': - case 'CSISO6937ADD': + case 'csiso6937add': + case 'iso6937225': + case 'isoir152': return 'ISO_6937-2-25'; - case 'GOST_19768-74': - case 'ST_SEV_358-88': - case 'ISO-IR-153': - case 'CSISO153GOST1976874': - return 'GOST_19768-74'; + case 'csisotextcomm': + case 'iso69372add': + case 'isoir142': + return 'ISO_6937-2-add'; - case 'ISO_8859-SUPP': - case 'ISO-IR-154': - case 'LATIN1-2-5': - case 'CSISO8859SUPP': + case 'csiso8859supp': + case 'iso8859supp': + case 'isoir154': + case 'latin125': return 'ISO_8859-supp'; - case 'ISO_10367-BOX': - case 'ISO-IR-155': - case 'CSISO10367BOX': + case 'csiso10367box': + case 'iso10367box': + case 'isoir155': return 'ISO_10367-box'; - case 'LATIN-LAP': - case 'LAP': - case 'ISO-IR-158': - case 'CSISO158LAP': - return 'latin-lap'; + case 'csiso15italian': + case 'iso646it': + case 'isoir15': + case 'it': + return 'IT'; + + case 'csiso13jisc6220jp': + case 'isoir13': + case 'jisc62201969': + case 'jisc62201969jp': + case 'katakana': + case 'x2017': + return 'JIS_C6220-1969-jp'; + + case 'csiso14jisc6220ro': + case 'iso646jp': + case 'isoir14': + case 'jisc62201969ro': + case 'jp': + return 'JIS_C6220-1969-ro'; + + case 'csiso42jisc62261978': + case 'isoir42': + case 'jisc62261978': + return 'JIS_C6226-1978'; + + case 'csiso87jisx208': + case 'isoir87': + case 'jisc62261983': + case 'jisx2081983': + case 'x208': + return 'JIS_C6226-1983'; + + case 'csiso91jisc62291984a': + case 'isoir91': + case 'jisc62291984a': + case 'jpocra': + return 'JIS_C6229-1984-a'; + + case 'csiso92jisc62991984b': + case 'iso646jpocrb': + case 'isoir92': + case 'jisc62291984b': + case 'jpocrb': + return 'JIS_C6229-1984-b'; + + case 'csiso93jis62291984badd': + case 'isoir93': + case 'jisc62291984badd': + case 'jpocrbadd': + return 'JIS_C6229-1984-b-add'; + + case 'csiso94jis62291984hand': + case 'isoir94': + case 'jisc62291984hand': + case 'jpocrhand': + return 'JIS_C6229-1984-hand'; + + case 'csiso95jis62291984handadd': + case 'isoir95': + case 'jisc62291984handadd': + case 'jpocrhandadd': + return 'JIS_C6229-1984-hand-add'; + + case 'csiso96jisc62291984kana': + case 'isoir96': + case 'jisc62291984kana': + return 'JIS_C6229-1984-kana'; + + case 'csjisencoding': + case 'jisencoding': + return 'JIS_Encoding'; + + case 'cshalfwidthkatakana': + case 'jisx201': + case 'x201': + return 'JIS_X0201'; - case 'JIS_X0212-1990': - case 'X0212': - case 'ISO-IR-159': - case 'CSISO159JISX02121990': + case 'csiso159jisx2121990': + case 'isoir159': + case 'jisx2121990': + case 'x212': return 'JIS_X0212-1990'; - case 'DS_2089': - case 'DS2089': - case 'ISO646-DK': - case 'DK': - case 'CSISO646DANISH': - return 'DS_2089'; + case 'csiso141jusib1002': + case 'iso646yu': + case 'isoir141': + case 'js': + case 'jusib1002': + case 'yu': + return 'JUS_I.B1.002'; - case 'US-DK': - case 'CSUSDK': - return 'us-dk'; + case 'csiso147macedonian': + case 'isoir147': + case 'jusib1003mac': + case 'macedonian': + return 'JUS_I.B1.003-mac'; - case 'DK-US': - case 'CSDKUS': - return 'dk-us'; + case 'csiso146serbian': + case 'isoir146': + case 'jusib1003serb': + case 'serbian': + return 'JUS_I.B1.003-serb'; + + case 'koi7switched': + return 'KOI7-switched'; + + case 'cskoi8r': + case 'koi8r': + return 'KOI8-R'; + + case 'koi8u': + return 'KOI8-U'; - case 'KSC5636': - case 'ISO646-KR': - case 'CSKSC5636': + case 'csksc5636': + case 'iso646kr': + case 'ksc5636': return 'KSC5636'; - case 'UNICODE-1-1-UTF-7': - case 'CSUNICODE11UTF7': - return 'UNICODE-1-1-UTF-7'; + case 'cskz1048': + case 'kz1048': + case 'rk1048': + case 'strk10482002': + return 'KZ-1048'; - case 'ISO-2022-CN': - return 'ISO-2022-CN'; + case 'csiso19latingreek': + case 'isoir19': + case 'latingreek': + return 'latin-greek'; - case 'ISO-2022-CN-EXT': - return 'ISO-2022-CN-EXT'; + case 'csiso27latingreek1': + case 'isoir27': + case 'latingreek1': + return 'Latin-greek-1'; - case 'UTF-8': - return 'UTF-8'; + case 'csiso158lap': + case 'isoir158': + case 'lap': + case 'latinlap': + return 'latin-lap'; - case 'ISO-8859-13': - return 'ISO-8859-13'; + case 'csmacintosh': + case 'mac': + case 'macintosh': + return 'macintosh'; - case 'ISO-8859-14': - case 'ISO-IR-199': - case 'ISO_8859-14:1998': - case 'ISO_8859-14': - case 'LATIN8': - case 'ISO-CELTIC': - case 'L8': - return 'ISO-8859-14'; + case 'csmicrosoftpublishing': + case 'microsoftpublishing': + return 'Microsoft-Publishing'; + + case 'csmnem': + case 'mnem': + return 'MNEM'; + + case 'csmnemonic': + case 'mnemonic': + return 'MNEMONIC'; + + case 'csiso86hungarian': + case 'hu': + case 'iso646hu': + case 'isoir86': + case 'msz77953': + return 'MSZ_7795.3'; + + case 'csnatsdano': + case 'isoir91': + case 'natsdano': + return 'NATS-DANO'; + + case 'csnatsdanoadd': + case 'isoir92': + case 'natsdanoadd': + return 'NATS-DANO-ADD'; + + case 'csnatssefi': + case 'isoir81': + case 'natssefi': + return 'NATS-SEFI'; + + case 'csnatssefiadd': + case 'isoir82': + case 'natssefiadd': + return 'NATS-SEFI-ADD'; - case 'ISO-8859-15': - case 'ISO_8859-15': - case 'LATIN-9': - return 'ISO-8859-15'; + case 'csiso151cuba': + case 'cuba': + case 'iso646cu': + case 'isoir151': + case 'ncnc1081': + return 'NC_NC00-10:81'; - case 'ISO-8859-16': - case 'ISO-IR-226': - case 'ISO_8859-16:2001': - case 'ISO_8859-16': - case 'LATIN10': - case 'L10': - return 'ISO-8859-16'; + case 'csiso69french': + case 'fr': + case 'iso646fr': + case 'isoir69': + case 'nfz62010': + return 'NF_Z_62-010'; - case 'GBK': - case 'CP936': - case 'MS936': - case 'WINDOWS-936': - return 'GBK'; + case 'csiso25french': + case 'iso646fr1': + case 'isoir25': + case 'nfz620101973': + return 'NF_Z_62-010_(1973)'; - case 'GB18030': - return 'GB18030'; + case 'csiso60danishnorwegian': + case 'csiso60norwegian1': + case 'iso646no': + case 'isoir60': + case 'no': + case 'ns45511': + return 'NS_4551-1'; - case 'OSD_EBCDIC_DF04_15': - return 'OSD_EBCDIC_DF04_15'; + case 'csiso61norwegian2': + case 'iso646no2': + case 'isoir61': + case 'no2': + case 'ns45512': + return 'NS_4551-2'; - case 'OSD_EBCDIC_DF03_IRV': + case 'osdebcdicdf3irv': return 'OSD_EBCDIC_DF03_IRV'; - case 'OSD_EBCDIC_DF04_1': + case 'osdebcdicdf41': return 'OSD_EBCDIC_DF04_1'; - case 'ISO-11548-1': - case 'ISO_11548-1': - case 'ISO_TR_11548-1': - case 'CSISO115481': - return 'ISO-11548-1'; - - case 'KZ-1048': - case 'STRK1048-2002': - case 'RK1048': - case 'CSKZ1048': - return 'KZ-1048'; - - case 'ISO-10646-UCS-2': - case 'CSUNICODE': - return 'ISO-10646-UCS-2'; - - case 'ISO-10646-UCS-4': - case 'CSUCS4': - return 'ISO-10646-UCS-4'; + case 'osdebcdicdf415': + return 'OSD_EBCDIC_DF04_15'; - case 'ISO-10646-UCS-BASIC': - case 'CSUNICODEASCII': - return 'ISO-10646-UCS-Basic'; + case 'cspc8danishnorwegian': + case 'pc8danishnorwegian': + return 'PC8-Danish-Norwegian'; - case 'ISO-10646-UNICODE-LATIN1': - case 'CSUNICODELATIN1': - case 'ISO-10646': - return 'ISO-10646-Unicode-Latin1'; + case 'cspc8turkish': + case 'pc8turkish': + return 'PC8-Turkish'; - case 'ISO-10646-J-1': - return 'ISO-10646-J-1'; + case 'csiso16portuguese': + case 'iso646pt': + case 'isoir16': + case 'pt': + return 'PT'; - case 'ISO-UNICODE-IBM-1261': - case 'CSUNICODEIBM1261': - return 'ISO-Unicode-IBM-1261'; + case 'csiso84portuguese2': + case 'iso646pt2': + case 'isoir84': + case 'pt2': + return 'PT2'; - case 'ISO-UNICODE-IBM-1268': - case 'CSUNICODEIBM1268': - return 'ISO-Unicode-IBM-1268'; + case 'cp154': + case 'csptcp154': + case 'cyrillicasian': + case 'pt154': + case 'ptcp154': + return 'PTCP154'; - case 'ISO-UNICODE-IBM-1276': - case 'CSUNICODEIBM1276': - return 'ISO-Unicode-IBM-1276'; + case 'scsu': + return 'SCSU'; - case 'ISO-UNICODE-IBM-1264': - case 'CSUNICODEIBM1264': - return 'ISO-Unicode-IBM-1264'; + case 'csiso10swedish': + case 'fi': + case 'iso646fi': + case 'iso646se': + case 'isoir10': + case 'se': + case 'sen850200b': + return 'SEN_850200_B'; - case 'ISO-UNICODE-IBM-1265': - case 'CSUNICODEIBM1265': - return 'ISO-Unicode-IBM-1265'; + case 'csiso11swedishfornames': + case 'iso646se2': + case 'isoir11': + case 'se2': + case 'sen850200c': + return 'SEN_850200_C'; - case 'UNICODE-1-1': - case 'CSUNICODE11': - return 'UNICODE-1-1'; + case 'csshiftjis': + case 'mskanji': + case 'shiftjis': + return 'Shift_JIS'; - case 'SCSU': - return 'SCSU'; + case 'csiso102t617bit': + case 'isoir102': + case 't617bit': + return 'T.61-7bit'; - case 'UTF-7': - return 'UTF-7'; + case 'csiso103t618bit': + case 'isoir103': + case 't61': + case 't618bit': + return 'T.61-8bit'; - case 'UTF-16BE': - return 'UTF-16BE'; + case 'csiso128t101g2': + case 'isoir128': + case 't101g2': + return 'T.101-G2'; - case 'UTF-16LE': - return 'UTF-16LE'; + case 'cstscii': + case 'tscii': + return 'TSCII'; - case 'UTF-16': - return 'UTF-16'; + case 'csunicode11': + case 'unicode11': + return 'UNICODE-1-1'; - case 'CESU-8': - case 'CSCESU-8': - return 'CESU-8'; + case 'csunicode11utf7': + case 'unicode11utf7': + return 'UNICODE-1-1-UTF-7'; - case 'UTF-32': - return 'UTF-32'; + case 'csunknown8bit': + case 'unknown8bit': + return 'UNKNOWN-8BIT'; - case 'UTF-32BE': - return 'UTF-32BE'; + case 'ansix341968': + case 'ansix341986': + case 'ascii': + case 'cp367': + case 'csascii': + case 'ibm367': + case 'iso646irv1991': + case 'iso646us': + case 'isoir6': + case 'us': + case 'usascii': + return 'US-ASCII'; - case 'UTF-32LE': - return 'UTF-32LE'; + case 'csusdk': + case 'usdk': + return 'us-dk'; - case 'BOCU-1': - case 'CSBOCU-1': - return 'BOCU-1'; + case 'utf7': + return 'UTF-7'; - case 'ISO-8859-1-WINDOWS-3.0-LATIN-1': - case 'CSWINDOWS30LATIN1': - return 'ISO-8859-1-Windows-3.0-Latin-1'; + case 'utf8': + return 'UTF-8'; - case 'ISO-8859-1-WINDOWS-3.1-LATIN-1': - case 'CSWINDOWS31LATIN1': - return 'ISO-8859-1-Windows-3.1-Latin-1'; + case 'utf16': + return 'UTF-16'; - case 'ISO-8859-2-WINDOWS-LATIN-2': - case 'CSWINDOWS31LATIN2': - return 'ISO-8859-2-Windows-Latin-2'; + case 'utf16be': + return 'UTF-16BE'; - case 'ISO-8859-9-WINDOWS-LATIN-5': - case 'CSWINDOWS31LATIN5': - return 'ISO-8859-9-Windows-Latin-5'; + case 'utf16le': + return 'UTF-16LE'; - case 'HP-ROMAN8': - case 'ROMAN8': - case 'R8': - case 'CSHPROMAN8': - return 'hp-roman8'; + case 'utf32': + return 'UTF-32'; - case 'ADOBE-STANDARD-ENCODING': - case 'CSADOBESTANDARDENCODING': - return 'Adobe-Standard-Encoding'; + case 'utf32be': + return 'UTF-32BE'; - case 'VENTURA-US': - case 'CSVENTURAUS': - return 'Ventura-US'; + case 'utf32le': + return 'UTF-32LE'; - case 'VENTURA-INTERNATIONAL': - case 'CSVENTURAINTERNATIONAL': + case 'csventurainternational': + case 'venturainternational': return 'Ventura-International'; - case 'DEC-MCS': - case 'DEC': - case 'CSDECMCS': - return 'DEC-MCS'; - - case 'IBM850': - case 'CP850': - case '850': - case 'CSPC850MULTILINGUAL': - return 'IBM850'; - - case 'PC8-DANISH-NORWEGIAN': - case 'CSPC8DANISHNORWEGIAN': - return 'PC8-Danish-Norwegian'; + case 'csventuramath': + case 'venturamath': + return 'Ventura-Math'; - case 'IBM862': - case 'CP862': - case '862': - case 'CSPC862LATINHEBREW': - return 'IBM862'; + case 'csventuraus': + case 'venturaus': + return 'Ventura-US'; - case 'PC8-TURKISH': - case 'CSPC8TURKISH': - return 'PC8-Turkish'; + case 'csiso70videotexsupp1': + case 'isoir70': + case 'videotexsuppl': + return 'videotex-suppl'; - case 'IBM-SYMBOLS': - case 'CSIBMSYMBOLS': - return 'IBM-Symbols'; + case 'csviqr': + case 'viqr': + return 'VIQR'; - case 'IBM-THAI': - case 'CSIBMTHAI': - return 'IBM-Thai'; + case 'csviscii': + case 'viscii': + return 'VISCII'; - case 'HP-LEGAL': - case 'CSHPLEGAL': - return 'HP-Legal'; + case 'cswindows31j': + case 'windows31j': + return 'Windows-31J'; - case 'HP-PI-FONT': - case 'CSHPPIFONT': - return 'HP-Pi-font'; + case 'iso885911': + case 'tis620': + return 'windows-874'; + + case 'cseuckr': + case 'csksc56011987': + case 'euckr': + case 'isoir149': + case 'korean': + case 'ksc5601': + case 'ksc56011987': + case 'ksc56011989': + case 'windows949': + return 'windows-949'; + + case 'windows1250': + return 'windows-1250'; - case 'HP-MATH8': - case 'CSHPMATH8': - return 'HP-Math8'; + case 'windows1251': + return 'windows-1251'; - case 'ADOBE-SYMBOL-ENCODING': - case 'CSHPPSMATH': - return 'Adobe-Symbol-Encoding'; + case 'cp819': + case 'csisolatin1': + case 'ibm819': + case 'iso88591': + case 'iso885911987': + case 'isoir100': + case 'l1': + case 'latin1': + case 'windows1252': + return 'windows-1252'; - case 'HP-DESKTOP': - case 'CSHPDESKTOP': - return 'HP-DeskTop'; + case 'windows1253': + return 'windows-1253'; - case 'VENTURA-MATH': - case 'CSVENTURAMATH': - return 'Ventura-Math'; + case 'csisolatin5': + case 'iso88599': + case 'iso885991989': + case 'isoir148': + case 'l5': + case 'latin5': + case 'windows1254': + return 'windows-1254'; - case 'MICROSOFT-PUBLISHING': - case 'CSMICROSOFTPUBLISHING': - return 'Microsoft-Publishing'; + case 'windows1255': + return 'windows-1255'; - case 'WINDOWS-31J': - case 'CSWINDOWS31J': - return 'Windows-31J'; + case 'windows1256': + return 'windows-1256'; - case 'GB2312': - case 'CSGB2312': - return 'GB2312'; + case 'windows1257': + return 'windows-1257'; - case 'BIG5': - case 'CSBIG5': - return 'Big5'; + case 'windows1258': + return 'windows-1258'; - case 'MACINTOSH': - case 'MAC': - case 'CSMACINTOSH': - return 'macintosh'; + default: + return $charset; + } + } - case 'IBM037': - case 'CP037': - case 'EBCDIC-CP-US': - case 'EBCDIC-CP-CA': - case 'EBCDIC-CP-WT': - case 'EBCDIC-CP-NL': - case 'CSIBM037': - return 'IBM037'; + function get_curl_version() + { + if (is_array($curl = curl_version())) + { + $curl = $curl['version']; + } + elseif (substr($curl, 0, 5) === 'curl/') + { + $curl = substr($curl, 5, strcspn($curl, "\x09\x0A\x0B\x0C\x0D", 5)); + } + elseif (substr($curl, 0, 8) === 'libcurl/') + { + $curl = substr($curl, 8, strcspn($curl, "\x09\x0A\x0B\x0C\x0D", 8)); + } + else + { + $curl = 0; + } + return $curl; + } - case 'IBM038': - case 'EBCDIC-INT': - case 'CP038': - case 'CSIBM038': - return 'IBM038'; + function is_subclass_of($class1, $class2) + { + if (func_num_args() !== 2) + { + trigger_error('Wrong parameter count for SimplePie_Misc::is_subclass_of()', E_USER_WARNING); + } + elseif (version_compare(PHP_VERSION, '5.0.3', '>=') || is_object($class1)) + { + return is_subclass_of($class1, $class2); + } + elseif (is_string($class1) && is_string($class2)) + { + if (class_exists($class1)) + { + if (class_exists($class2)) + { + $class2 = strtolower($class2); + while ($class1 = strtolower(get_parent_class($class1))) + { + if ($class1 === $class2) + { + return true; + } + } + } + } + else + { + trigger_error('Unknown class passed as parameter', E_USER_WARNNG); + } + } + return false; + } - case 'IBM273': - case 'CP273': - case 'CSIBM273': - return 'IBM273'; + /** + * Strip HTML comments + * + * @access public + * @param string $data Data to strip comments from + * @return string Comment stripped string + */ + function strip_comments($data) + { + $output = ''; + while (($start = strpos($data, '', $start)) !== false) + { + $data = substr_replace($data, '', 0, $end + 3); + } + else + { + $data = ''; + } + } + return $output . $data; + } - case 'IBM274': - case 'EBCDIC-BE': - case 'CP274': - case 'CSIBM274': - return 'IBM274'; + function parse_date($dt) + { + $parser = SimplePie_Parse_Date::get(); + return $parser->parse($dt); + } - case 'IBM275': - case 'EBCDIC-BR': - case 'CP275': - case 'CSIBM275': - return 'IBM275'; + /** + * Decode HTML entities + * + * @static + * @access public + * @param string $data Input data + * @return string Output data + */ + function entities_decode($data) + { + $decoder = new SimplePie_Decode_HTML_Entities($data); + return $decoder->parse(); + } - case 'IBM277': - case 'EBCDIC-CP-DK': - case 'EBCDIC-CP-NO': - case 'CSIBM277': - return 'IBM277'; + /** + * Remove RFC822 comments + * + * @access public + * @param string $data Data to strip comments from + * @return string Comment stripped string + */ + function uncomment_rfc822($string) + { + $string = (string) $string; + $position = 0; + $length = strlen($string); + $depth = 0; - case 'IBM278': - case 'CP278': - case 'EBCDIC-CP-FI': - case 'EBCDIC-CP-SE': - case 'CSIBM278': - return 'IBM278'; + $output = ''; - case 'IBM280': - case 'CP280': - case 'EBCDIC-CP-IT': - case 'CSIBM280': - return 'IBM280'; + while ($position < $length && ($pos = strpos($string, '(', $position)) !== false) + { + $output .= substr($string, $position, $pos - $position); + $position = $pos + 1; + if ($string[$pos - 1] !== '\\') + { + $depth++; + while ($depth && $position < $length) + { + $position += strcspn($string, '()', $position); + if ($string[$position - 1] === '\\') + { + $position++; + continue; + } + elseif (isset($string[$position])) + { + switch ($string[$position]) + { + case '(': + $depth++; + break; - case 'IBM281': - case 'EBCDIC-JP-E': - case 'CP281': - case 'CSIBM281': - return 'IBM281'; + case ')': + $depth--; + break; + } + $position++; + } + else + { + break; + } + } + } + else + { + $output .= '('; + } + } + $output .= substr($string, $position); - case 'IBM284': - case 'CP284': - case 'EBCDIC-CP-ES': - case 'CSIBM284': - return 'IBM284'; + return $output; + } - case 'IBM285': - case 'CP285': - case 'EBCDIC-CP-GB': - case 'CSIBM285': - return 'IBM285'; + function parse_mime($mime) + { + if (($pos = strpos($mime, ';')) === false) + { + return trim($mime); + } + else + { + return trim(substr($mime, 0, $pos)); + } + } - case 'IBM290': - case 'CP290': - case 'EBCDIC-JP-KANA': - case 'CSIBM290': - return 'IBM290'; + function htmlspecialchars_decode($string, $quote_style) + { + if (function_exists('htmlspecialchars_decode')) + { + return htmlspecialchars_decode($string, $quote_style); + } + else + { + return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style))); + } + } - case 'IBM297': - case 'CP297': - case 'EBCDIC-CP-FR': - case 'CSIBM297': - return 'IBM297'; + function atom_03_construct_type($attribs) + { + if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) === 'base64')) + { + $mode = SIMPLEPIE_CONSTRUCT_BASE64; + } + else + { + $mode = SIMPLEPIE_CONSTRUCT_NONE; + } + if (isset($attribs['']['type'])) + { + switch (strtolower(trim($attribs['']['type']))) + { + case 'text': + case 'text/plain': + return SIMPLEPIE_CONSTRUCT_TEXT | $mode; - case 'IBM420': - case 'CP420': - case 'EBCDIC-CP-AR1': - case 'CSIBM420': - return 'IBM420'; + case 'html': + case 'text/html': + return SIMPLEPIE_CONSTRUCT_HTML | $mode; - case 'IBM423': - case 'CP423': - case 'EBCDIC-CP-GR': - case 'CSIBM423': - return 'IBM423'; + case 'xhtml': + case 'application/xhtml+xml': + return SIMPLEPIE_CONSTRUCT_XHTML | $mode; - case 'IBM424': - case 'CP424': - case 'EBCDIC-CP-HE': - case 'CSIBM424': - return 'IBM424'; + default: + return SIMPLEPIE_CONSTRUCT_NONE | $mode; + } + } + else + { + return SIMPLEPIE_CONSTRUCT_TEXT | $mode; + } + } - case 'IBM437': - case 'CP437': - case '437': - case 'CSPC8CODEPAGE437': - return 'IBM437'; + function atom_10_construct_type($attribs) + { + if (isset($attribs['']['type'])) + { + switch (strtolower(trim($attribs['']['type']))) + { + case 'text': + return SIMPLEPIE_CONSTRUCT_TEXT; - case 'IBM500': - case 'CP500': - case 'EBCDIC-CP-BE': - case 'EBCDIC-CP-CH': - case 'CSIBM500': - return 'IBM500'; + case 'html': + return SIMPLEPIE_CONSTRUCT_HTML; - case 'IBM851': - case 'CP851': - case '851': - case 'CSIBM851': - return 'IBM851'; + case 'xhtml': + return SIMPLEPIE_CONSTRUCT_XHTML; - case 'IBM852': - case 'CP852': - case '852': - case 'CSPCP852': - return 'IBM852'; + default: + return SIMPLEPIE_CONSTRUCT_NONE; + } + } + return SIMPLEPIE_CONSTRUCT_TEXT; + } - case 'IBM855': - case 'CP855': - case '855': - case 'CSIBM855': - return 'IBM855'; + function atom_10_content_construct_type($attribs) + { + if (isset($attribs['']['type'])) + { + $type = strtolower(trim($attribs['']['type'])); + switch ($type) + { + case 'text': + return SIMPLEPIE_CONSTRUCT_TEXT; - case 'IBM857': - case 'CP857': - case '857': - case 'CSIBM857': - return 'IBM857'; + case 'html': + return SIMPLEPIE_CONSTRUCT_HTML; - case 'IBM860': - case 'CP860': - case '860': - case 'CSIBM860': - return 'IBM860'; + case 'xhtml': + return SIMPLEPIE_CONSTRUCT_XHTML; + } + if (in_array(substr($type, -4), array('+xml', '/xml')) || substr($type, 0, 5) === 'text/') + { + return SIMPLEPIE_CONSTRUCT_NONE; + } + else + { + return SIMPLEPIE_CONSTRUCT_BASE64; + } + } + else + { + return SIMPLEPIE_CONSTRUCT_TEXT; + } + } - case 'IBM861': - case 'CP861': - case '861': - case 'CP-IS': - case 'CSIBM861': - return 'IBM861'; + function is_isegment_nz_nc($string) + { + return (bool) preg_match('/^([A-Za-z0-9\-._~\x{A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}\x{10000}-\x{1FFFD}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}\x{40000}-\x{4FFFD}\x{50000}-\x{5FFFD}\x{60000}-\x{6FFFD}\x{70000}-\x{7FFFD}\x{80000}-\x{8FFFD}\x{90000}-\x{9FFFD}\x{A0000}-\x{AFFFD}\x{B0000}-\x{BFFFD}\x{C0000}-\x{CFFFD}\x{D0000}-\x{DFFFD}\x{E1000}-\x{EFFFD}!$&\'()*+,;=@]|(%[0-9ABCDEF]{2}))+$/u', $string); + } - case 'IBM863': - case 'CP863': - case '863': - case 'CSIBM863': - return 'IBM863'; + function space_seperated_tokens($string) + { + $space_characters = "\x20\x09\x0A\x0B\x0C\x0D"; + $string_length = strlen($string); - case 'IBM864': - case 'CP864': - case 'CSIBM864': - return 'IBM864'; + $position = strspn($string, $space_characters); + $tokens = array(); - case 'IBM865': - case 'CP865': - case '865': - case 'CSIBM865': - return 'IBM865'; + while ($position < $string_length) + { + $len = strcspn($string, $space_characters, $position); + $tokens[] = substr($string, $position, $len); + $position += $len; + $position += strspn($string, $space_characters, $position); + } - case 'IBM868': - case 'CP868': - case 'CP-AR': - case 'CSIBM868': - return 'IBM868'; + return $tokens; + } - case 'IBM869': - case 'CP869': - case '869': - case 'CP-GR': - case 'CSIBM869': - return 'IBM869'; + function array_unique($array) + { + if (version_compare(PHP_VERSION, '5.2', '>=')) + { + return array_unique($array); + } + else + { + $array = (array) $array; + $new_array = array(); + $new_array_strings = array(); + foreach ($array as $key => $value) + { + if (is_object($value)) + { + if (method_exists($value, '__toString')) + { + $cmp = $value->__toString(); + } + else + { + trigger_error('Object of class ' . get_class($value) . ' could not be converted to string', E_USER_ERROR); + } + } + elseif (is_array($value)) + { + $cmp = (string) reset($value); + } + else + { + $cmp = (string) $value; + } + if (!in_array($cmp, $new_array_strings)) + { + $new_array[$key] = $value; + $new_array_strings[] = $cmp; + } + } + return $new_array; + } + } - case 'IBM870': - case 'CP870': - case 'EBCDIC-CP-ROECE': - case 'EBCDIC-CP-YU': - case 'CSIBM870': - return 'IBM870'; + /** + * Converts a unicode codepoint to a UTF-8 character + * + * @static + * @access public + * @param int $codepoint Unicode codepoint + * @return string UTF-8 character + */ + function codepoint_to_utf8($codepoint) + { + $codepoint = (int) $codepoint; + if ($codepoint < 0) + { + return false; + } + else if ($codepoint <= 0x7f) + { + return chr($codepoint); + } + else if ($codepoint <= 0x7ff) + { + return chr(0xc0 | ($codepoint >> 6)) . chr(0x80 | ($codepoint & 0x3f)); + } + else if ($codepoint <= 0xffff) + { + return chr(0xe0 | ($codepoint >> 12)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f)); + } + else if ($codepoint <= 0x10ffff) + { + return chr(0xf0 | ($codepoint >> 18)) . chr(0x80 | (($codepoint >> 12) & 0x3f)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f)); + } + else + { + // U+FFFD REPLACEMENT CHARACTER + return "\xEF\xBF\xBD"; + } + } - case 'IBM871': - case 'CP871': - case 'EBCDIC-CP-IS': - case 'CSIBM871': - return 'IBM871'; + /** + * Re-implementation of PHP 5's stripos() + * + * Returns the numeric position of the first occurrence of needle in the + * haystack string. + * + * @static + * @access string + * @param object $haystack + * @param string $needle Note that the needle may be a string of one or more + * characters. If needle is not a string, it is converted to an integer + * and applied as the ordinal value of a character. + * @param int $offset The optional offset parameter allows you to specify which + * character in haystack to start searching. The position returned is still + * relative to the beginning of haystack. + * @return bool If needle is not found, stripos() will return boolean false. + */ + function stripos($haystack, $needle, $offset = 0) + { + if (function_exists('stripos')) + { + return stripos($haystack, $needle, $offset); + } + else + { + if (is_string($needle)) + { + $needle = strtolower($needle); + } + elseif (is_int($needle) || is_bool($needle) || is_double($needle)) + { + $needle = strtolower(chr($needle)); + } + else + { + trigger_error('needle is not a string or an integer', E_USER_WARNING); + return false; + } - case 'IBM880': - case 'CP880': - case 'EBCDIC-CYRILLIC': - case 'CSIBM880': - return 'IBM880'; + return strpos(strtolower($haystack), $needle, $offset); + } + } - case 'IBM891': - case 'CP891': - case 'CSIBM891': - return 'IBM891'; + /** + * Similar to parse_str() + * + * Returns an associative array of name/value pairs, where the value is an + * array of values that have used the same name + * + * @static + * @access string + * @param string $str The input string. + * @return array + */ + function parse_str($str) + { + $return = array(); + $str = explode('&', $str); - case 'IBM903': - case 'CP903': - case 'CSIBM903': - return 'IBM903'; + foreach ($str as $section) + { + if (strpos($section, '=') !== false) + { + list($name, $value) = explode('=', $section, 2); + $return[urldecode($name)][] = urldecode($value); + } + else + { + $return[urldecode($section)][] = null; + } + } - case 'IBM904': - case 'CP904': - case '904': - case 'CSIBBM904': - return 'IBM904'; + return $return; + } - case 'IBM905': - case 'CP905': - case 'EBCDIC-CP-TR': - case 'CSIBM905': - return 'IBM905'; + /** + * Detect XML encoding, as per XML 1.0 Appendix F.1 + * + * @todo Add support for EBCDIC + * @param string $data XML data + * @return array Possible encodings + */ + function xml_encoding($data) + { + // UTF-32 Big Endian BOM + if (substr($data, 0, 4) === "\x00\x00\xFE\xFF") + { + $encoding[] = 'UTF-32BE'; + } + // UTF-32 Little Endian BOM + elseif (substr($data, 0, 4) === "\xFF\xFE\x00\x00") + { + $encoding[] = 'UTF-32LE'; + } + // UTF-16 Big Endian BOM + elseif (substr($data, 0, 2) === "\xFE\xFF") + { + $encoding[] = 'UTF-16BE'; + } + // UTF-16 Little Endian BOM + elseif (substr($data, 0, 2) === "\xFF\xFE") + { + $encoding[] = 'UTF-16LE'; + } + // UTF-8 BOM + elseif (substr($data, 0, 3) === "\xEF\xBB\xBF") + { + $encoding[] = 'UTF-8'; + } + // UTF-32 Big Endian Without BOM + elseif (substr($data, 0, 20) === "\x00\x00\x00\x3C\x00\x00\x00\x3F\x00\x00\x00\x78\x00\x00\x00\x6D\x00\x00\x00\x6C") + { + if ($pos = strpos($data, "\x00\x00\x00\x3F\x00\x00\x00\x3E")) + { + $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32BE', 'UTF-8')); + if ($parser->parse()) + { + $encoding[] = $parser->encoding; + } + } + $encoding[] = 'UTF-32BE'; + } + // UTF-32 Little Endian Without BOM + elseif (substr($data, 0, 20) === "\x3C\x00\x00\x00\x3F\x00\x00\x00\x78\x00\x00\x00\x6D\x00\x00\x00\x6C\x00\x00\x00") + { + if ($pos = strpos($data, "\x3F\x00\x00\x00\x3E\x00\x00\x00")) + { + $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 20), 'UTF-32LE', 'UTF-8')); + if ($parser->parse()) + { + $encoding[] = $parser->encoding; + } + } + $encoding[] = 'UTF-32LE'; + } + // UTF-16 Big Endian Without BOM + elseif (substr($data, 0, 10) === "\x00\x3C\x00\x3F\x00\x78\x00\x6D\x00\x6C") + { + if ($pos = strpos($data, "\x00\x3F\x00\x3E")) + { + $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16BE', 'UTF-8')); + if ($parser->parse()) + { + $encoding[] = $parser->encoding; + } + } + $encoding[] = 'UTF-16BE'; + } + // UTF-16 Little Endian Without BOM + elseif (substr($data, 0, 10) === "\x3C\x00\x3F\x00\x78\x00\x6D\x00\x6C\x00") + { + if ($pos = strpos($data, "\x3F\x00\x3E\x00")) + { + $parser = new SimplePie_XML_Declaration_Parser(SimplePie_Misc::change_encoding(substr($data, 20, $pos - 10), 'UTF-16LE', 'UTF-8')); + if ($parser->parse()) + { + $encoding[] = $parser->encoding; + } + } + $encoding[] = 'UTF-16LE'; + } + // US-ASCII (or superset) + elseif (substr($data, 0, 5) === "\x3C\x3F\x78\x6D\x6C") + { + if ($pos = strpos($data, "\x3F\x3E")) + { + $parser = new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5)); + if ($parser->parse()) + { + $encoding[] = $parser->encoding; + } + } + $encoding[] = 'UTF-8'; + } + // Fallback to UTF-8 + else + { + $encoding[] = 'UTF-8'; + } + return $encoding; + } - case 'IBM918': - case 'CP918': - case 'EBCDIC-CP-AR2': - case 'CSIBM918': - return 'IBM918'; + function output_javascript() + { + if (function_exists('ob_gzhandler')) + { + ob_start('ob_gzhandler'); + } + header('Content-type: text/javascript; charset: UTF-8'); + header('Cache-Control: must-revalidate'); + header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 604800) . ' GMT'); // 7 days + ?> +function embed_odeo(link) { + document.writeln(''); +} - case 'IBM1026': - case 'CP1026': - case 'CSIBM1026': - return 'IBM1026'; +function embed_quicktime(type, bgcolor, width, height, link, placeholder, loop) { + if (placeholder != '') { + document.writeln(''); + } + else { + document.writeln(''); + } +} - case 'EBCDIC-AT-DE': - case 'CSIBMEBCDICATDE': - return 'EBCDIC-AT-DE'; +function embed_flash(bgcolor, width, height, link, loop, type) { + document.writeln(''); +} - case 'EBCDIC-AT-DE-A': - case 'CSEBCDICATDEA': - return 'EBCDIC-AT-DE-A'; +function embed_flv(width, height, link, placeholder, loop, player) { + document.writeln(''); +} - case 'EBCDIC-CA-FR': - case 'CSEBCDICCAFR': - return 'EBCDIC-CA-FR'; +function embed_wmedia(width, height, link) { + document.writeln(''); +} + data = $data; + } - case 'EBCDIC-FR': - case 'CSEBCDICFR': - return 'EBCDIC-FR'; + /** + * Parse the input data + * + * @access public + * @return string Output data + */ + function parse() + { + while (($this->position = strpos($this->data, '&', $this->position)) !== false) + { + $this->consume(); + $this->entity(); + $this->consumed = ''; + } + return $this->data; + } - case 'EBCDIC-IT': - case 'CSEBCDICIT': - return 'EBCDIC-IT'; + /** + * Consume the next byte + * + * @access private + * @return mixed The next byte, or false, if there is no more data + */ + function consume() + { + if (isset($this->data[$this->position])) + { + $this->consumed .= $this->data[$this->position]; + return $this->data[$this->position++]; + } + else + { + return false; + } + } - case 'EBCDIC-PT': - case 'CSEBCDICPT': - return 'EBCDIC-PT'; + /** + * Consume a range of characters + * + * @access private + * @param string $chars Characters to consume + * @return mixed A series of characters that match the range, or false + */ + function consume_range($chars) + { + if ($len = strspn($this->data, $chars, $this->position)) + { + $data = substr($this->data, $this->position, $len); + $this->consumed .= $data; + $this->position += $len; + return $data; + } + else + { + return false; + } + } - case 'EBCDIC-ES': - case 'CSEBCDICES': - return 'EBCDIC-ES'; + /** + * Unconsume one byte + * + * @access private + */ + function unconsume() + { + $this->consumed = substr($this->consumed, 0, -1); + $this->position--; + } - case 'EBCDIC-ES-A': - case 'CSEBCDICESA': - return 'EBCDIC-ES-A'; + /** + * Decode an entity + * + * @access private + */ + function entity() + { + switch ($this->consume()) + { + case "\x09": + case "\x0A": + case "\x0B": + case "\x0B": + case "\x0C": + case "\x20": + case "\x3C": + case "\x26": + case false: + break; - case 'EBCDIC-ES-S': - case 'CSEBCDICESS': - return 'EBCDIC-ES-S'; + case "\x23": + switch ($this->consume()) + { + case "\x78": + case "\x58": + $range = '0123456789ABCDEFabcdef'; + $hex = true; + break; - case 'EBCDIC-UK': - case 'CSEBCDICUK': - return 'EBCDIC-UK'; + default: + $range = '0123456789'; + $hex = false; + $this->unconsume(); + break; + } - case 'EBCDIC-US': - case 'CSEBCDICUS': - return 'EBCDIC-US'; + if ($codepoint = $this->consume_range($range)) + { + static $windows_1252_specials = array(0x0D => "\x0A", 0x80 => "\xE2\x82\xAC", 0x81 => "\xEF\xBF\xBD", 0x82 => "\xE2\x80\x9A", 0x83 => "\xC6\x92", 0x84 => "\xE2\x80\x9E", 0x85 => "\xE2\x80\xA6", 0x86 => "\xE2\x80\xA0", 0x87 => "\xE2\x80\xA1", 0x88 => "\xCB\x86", 0x89 => "\xE2\x80\xB0", 0x8A => "\xC5\xA0", 0x8B => "\xE2\x80\xB9", 0x8C => "\xC5\x92", 0x8D => "\xEF\xBF\xBD", 0x8E => "\xC5\xBD", 0x8F => "\xEF\xBF\xBD", 0x90 => "\xEF\xBF\xBD", 0x91 => "\xE2\x80\x98", 0x92 => "\xE2\x80\x99", 0x93 => "\xE2\x80\x9C", 0x94 => "\xE2\x80\x9D", 0x95 => "\xE2\x80\xA2", 0x96 => "\xE2\x80\x93", 0x97 => "\xE2\x80\x94", 0x98 => "\xCB\x9C", 0x99 => "\xE2\x84\xA2", 0x9A => "\xC5\xA1", 0x9B => "\xE2\x80\xBA", 0x9C => "\xC5\x93", 0x9D => "\xEF\xBF\xBD", 0x9E => "\xC5\xBE", 0x9F => "\xC5\xB8"); - case 'UNKNOWN-8BIT': - case 'CSUNKNOWN8BIT': - return 'UNKNOWN-8BIT'; + if ($hex) + { + $codepoint = hexdec($codepoint); + } + else + { + $codepoint = intval($codepoint); + } - case 'MNEMONIC': - case 'CSMNEMONIC': - return 'MNEMONIC'; + if (isset($windows_1252_specials[$codepoint])) + { + $replacement = $windows_1252_specials[$codepoint]; + } + else + { + $replacement = SimplePie_Misc::codepoint_to_utf8($codepoint); + } - case 'MNEM': - case 'CSMNEM': - return 'MNEM'; + if (!in_array($this->consume(), array(';', false), true)) + { + $this->unconsume(); + } - case 'VISCII': - case 'CSVISCII': - return 'VISCII'; + $consumed_length = strlen($this->consumed); + $this->data = substr_replace($this->data, $replacement, $this->position - $consumed_length, $consumed_length); + $this->position += strlen($replacement) - $consumed_length; + } + break; - case 'VIQR': - case 'CSVIQR': - return 'VIQR'; + default: + static $entities = array('Aacute' => "\xC3\x81", 'aacute' => "\xC3\xA1", 'Aacute;' => "\xC3\x81", 'aacute;' => "\xC3\xA1", 'Acirc' => "\xC3\x82", 'acirc' => "\xC3\xA2", 'Acirc;' => "\xC3\x82", 'acirc;' => "\xC3\xA2", 'acute' => "\xC2\xB4", 'acute;' => "\xC2\xB4", 'AElig' => "\xC3\x86", 'aelig' => "\xC3\xA6", 'AElig;' => "\xC3\x86", 'aelig;' => "\xC3\xA6", 'Agrave' => "\xC3\x80", 'agrave' => "\xC3\xA0", 'Agrave;' => "\xC3\x80", 'agrave;' => "\xC3\xA0", 'alefsym;' => "\xE2\x84\xB5", 'Alpha;' => "\xCE\x91", 'alpha;' => "\xCE\xB1", 'AMP' => "\x26", 'amp' => "\x26", 'AMP;' => "\x26", 'amp;' => "\x26", 'and;' => "\xE2\x88\xA7", 'ang;' => "\xE2\x88\xA0", 'apos;' => "\x27", 'Aring' => "\xC3\x85", 'aring' => "\xC3\xA5", 'Aring;' => "\xC3\x85", 'aring;' => "\xC3\xA5", 'asymp;' => "\xE2\x89\x88", 'Atilde' => "\xC3\x83", 'atilde' => "\xC3\xA3", 'Atilde;' => "\xC3\x83", 'atilde;' => "\xC3\xA3", 'Auml' => "\xC3\x84", 'auml' => "\xC3\xA4", 'Auml;' => "\xC3\x84", 'auml;' => "\xC3\xA4", 'bdquo;' => "\xE2\x80\x9E", 'Beta;' => "\xCE\x92", 'beta;' => "\xCE\xB2", 'brvbar' => "\xC2\xA6", 'brvbar;' => "\xC2\xA6", 'bull;' => "\xE2\x80\xA2", 'cap;' => "\xE2\x88\xA9", 'Ccedil' => "\xC3\x87", 'ccedil' => "\xC3\xA7", 'Ccedil;' => "\xC3\x87", 'ccedil;' => "\xC3\xA7", 'cedil' => "\xC2\xB8", 'cedil;' => "\xC2\xB8", 'cent' => "\xC2\xA2", 'cent;' => "\xC2\xA2", 'Chi;' => "\xCE\xA7", 'chi;' => "\xCF\x87", 'circ;' => "\xCB\x86", 'clubs;' => "\xE2\x99\xA3", 'cong;' => "\xE2\x89\x85", 'COPY' => "\xC2\xA9", 'copy' => "\xC2\xA9", 'COPY;' => "\xC2\xA9", 'copy;' => "\xC2\xA9", 'crarr;' => "\xE2\x86\xB5", 'cup;' => "\xE2\x88\xAA", 'curren' => "\xC2\xA4", 'curren;' => "\xC2\xA4", 'Dagger;' => "\xE2\x80\xA1", 'dagger;' => "\xE2\x80\xA0", 'dArr;' => "\xE2\x87\x93", 'darr;' => "\xE2\x86\x93", 'deg' => "\xC2\xB0", 'deg;' => "\xC2\xB0", 'Delta;' => "\xCE\x94", 'delta;' => "\xCE\xB4", 'diams;' => "\xE2\x99\xA6", 'divide' => "\xC3\xB7", 'divide;' => "\xC3\xB7", 'Eacute' => "\xC3\x89", 'eacute' => "\xC3\xA9", 'Eacute;' => "\xC3\x89", 'eacute;' => "\xC3\xA9", 'Ecirc' => "\xC3\x8A", 'ecirc' => "\xC3\xAA", 'Ecirc;' => "\xC3\x8A", 'ecirc;' => "\xC3\xAA", 'Egrave' => "\xC3\x88", 'egrave' => "\xC3\xA8", 'Egrave;' => "\xC3\x88", 'egrave;' => "\xC3\xA8", 'empty;' => "\xE2\x88\x85", 'emsp;' => "\xE2\x80\x83", 'ensp;' => "\xE2\x80\x82", 'Epsilon;' => "\xCE\x95", 'epsilon;' => "\xCE\xB5", 'equiv;' => "\xE2\x89\xA1", 'Eta;' => "\xCE\x97", 'eta;' => "\xCE\xB7", 'ETH' => "\xC3\x90", 'eth' => "\xC3\xB0", 'ETH;' => "\xC3\x90", 'eth;' => "\xC3\xB0", 'Euml' => "\xC3\x8B", 'euml' => "\xC3\xAB", 'Euml;' => "\xC3\x8B", 'euml;' => "\xC3\xAB", 'euro;' => "\xE2\x82\xAC", 'exist;' => "\xE2\x88\x83", 'fnof;' => "\xC6\x92", 'forall;' => "\xE2\x88\x80", 'frac12' => "\xC2\xBD", 'frac12;' => "\xC2\xBD", 'frac14' => "\xC2\xBC", 'frac14;' => "\xC2\xBC", 'frac34' => "\xC2\xBE", 'frac34;' => "\xC2\xBE", 'frasl;' => "\xE2\x81\x84", 'Gamma;' => "\xCE\x93", 'gamma;' => "\xCE\xB3", 'ge;' => "\xE2\x89\xA5", 'GT' => "\x3E", 'gt' => "\x3E", 'GT;' => "\x3E", 'gt;' => "\x3E", 'hArr;' => "\xE2\x87\x94", 'harr;' => "\xE2\x86\x94", 'hearts;' => "\xE2\x99\xA5", 'hellip;' => "\xE2\x80\xA6", 'Iacute' => "\xC3\x8D", 'iacute' => "\xC3\xAD", 'Iacute;' => "\xC3\x8D", 'iacute;' => "\xC3\xAD", 'Icirc' => "\xC3\x8E", 'icirc' => "\xC3\xAE", 'Icirc;' => "\xC3\x8E", 'icirc;' => "\xC3\xAE", 'iexcl' => "\xC2\xA1", 'iexcl;' => "\xC2\xA1", 'Igrave' => "\xC3\x8C", 'igrave' => "\xC3\xAC", 'Igrave;' => "\xC3\x8C", 'igrave;' => "\xC3\xAC", 'image;' => "\xE2\x84\x91", 'infin;' => "\xE2\x88\x9E", 'int;' => "\xE2\x88\xAB", 'Iota;' => "\xCE\x99", 'iota;' => "\xCE\xB9", 'iquest' => "\xC2\xBF", 'iquest;' => "\xC2\xBF", 'isin;' => "\xE2\x88\x88", 'Iuml' => "\xC3\x8F", 'iuml' => "\xC3\xAF", 'Iuml;' => "\xC3\x8F", 'iuml;' => "\xC3\xAF", 'Kappa;' => "\xCE\x9A", 'kappa;' => "\xCE\xBA", 'Lambda;' => "\xCE\x9B", 'lambda;' => "\xCE\xBB", 'lang;' => "\xE3\x80\x88", 'laquo' => "\xC2\xAB", 'laquo;' => "\xC2\xAB", 'lArr;' => "\xE2\x87\x90", 'larr;' => "\xE2\x86\x90", 'lceil;' => "\xE2\x8C\x88", 'ldquo;' => "\xE2\x80\x9C", 'le;' => "\xE2\x89\xA4", 'lfloor;' => "\xE2\x8C\x8A", 'lowast;' => "\xE2\x88\x97", 'loz;' => "\xE2\x97\x8A", 'lrm;' => "\xE2\x80\x8E", 'lsaquo;' => "\xE2\x80\xB9", 'lsquo;' => "\xE2\x80\x98", 'LT' => "\x3C", 'lt' => "\x3C", 'LT;' => "\x3C", 'lt;' => "\x3C", 'macr' => "\xC2\xAF", 'macr;' => "\xC2\xAF", 'mdash;' => "\xE2\x80\x94", 'micro' => "\xC2\xB5", 'micro;' => "\xC2\xB5", 'middot' => "\xC2\xB7", 'middot;' => "\xC2\xB7", 'minus;' => "\xE2\x88\x92", 'Mu;' => "\xCE\x9C", 'mu;' => "\xCE\xBC", 'nabla;' => "\xE2\x88\x87", 'nbsp' => "\xC2\xA0", 'nbsp;' => "\xC2\xA0", 'ndash;' => "\xE2\x80\x93", 'ne;' => "\xE2\x89\xA0", 'ni;' => "\xE2\x88\x8B", 'not' => "\xC2\xAC", 'not;' => "\xC2\xAC", 'notin;' => "\xE2\x88\x89", 'nsub;' => "\xE2\x8A\x84", 'Ntilde' => "\xC3\x91", 'ntilde' => "\xC3\xB1", 'Ntilde;' => "\xC3\x91", 'ntilde;' => "\xC3\xB1", 'Nu;' => "\xCE\x9D", 'nu;' => "\xCE\xBD", 'Oacute' => "\xC3\x93", 'oacute' => "\xC3\xB3", 'Oacute;' => "\xC3\x93", 'oacute;' => "\xC3\xB3", 'Ocirc' => "\xC3\x94", 'ocirc' => "\xC3\xB4", 'Ocirc;' => "\xC3\x94", 'ocirc;' => "\xC3\xB4", 'OElig;' => "\xC5\x92", 'oelig;' => "\xC5\x93", 'Ograve' => "\xC3\x92", 'ograve' => "\xC3\xB2", 'Ograve;' => "\xC3\x92", 'ograve;' => "\xC3\xB2", 'oline;' => "\xE2\x80\xBE", 'Omega;' => "\xCE\xA9", 'omega;' => "\xCF\x89", 'Omicron;' => "\xCE\x9F", 'omicron;' => "\xCE\xBF", 'oplus;' => "\xE2\x8A\x95", 'or;' => "\xE2\x88\xA8", 'ordf' => "\xC2\xAA", 'ordf;' => "\xC2\xAA", 'ordm' => "\xC2\xBA", 'ordm;' => "\xC2\xBA", 'Oslash' => "\xC3\x98", 'oslash' => "\xC3\xB8", 'Oslash;' => "\xC3\x98", 'oslash;' => "\xC3\xB8", 'Otilde' => "\xC3\x95", 'otilde' => "\xC3\xB5", 'Otilde;' => "\xC3\x95", 'otilde;' => "\xC3\xB5", 'otimes;' => "\xE2\x8A\x97", 'Ouml' => "\xC3\x96", 'ouml' => "\xC3\xB6", 'Ouml;' => "\xC3\x96", 'ouml;' => "\xC3\xB6", 'para' => "\xC2\xB6", 'para;' => "\xC2\xB6", 'part;' => "\xE2\x88\x82", 'permil;' => "\xE2\x80\xB0", 'perp;' => "\xE2\x8A\xA5", 'Phi;' => "\xCE\xA6", 'phi;' => "\xCF\x86", 'Pi;' => "\xCE\xA0", 'pi;' => "\xCF\x80", 'piv;' => "\xCF\x96", 'plusmn' => "\xC2\xB1", 'plusmn;' => "\xC2\xB1", 'pound' => "\xC2\xA3", 'pound;' => "\xC2\xA3", 'Prime;' => "\xE2\x80\xB3", 'prime;' => "\xE2\x80\xB2", 'prod;' => "\xE2\x88\x8F", 'prop;' => "\xE2\x88\x9D", 'Psi;' => "\xCE\xA8", 'psi;' => "\xCF\x88", 'QUOT' => "\x22", 'quot' => "\x22", 'QUOT;' => "\x22", 'quot;' => "\x22", 'radic;' => "\xE2\x88\x9A", 'rang;' => "\xE3\x80\x89", 'raquo' => "\xC2\xBB", 'raquo;' => "\xC2\xBB", 'rArr;' => "\xE2\x87\x92", 'rarr;' => "\xE2\x86\x92", 'rceil;' => "\xE2\x8C\x89", 'rdquo;' => "\xE2\x80\x9D", 'real;' => "\xE2\x84\x9C", 'REG' => "\xC2\xAE", 'reg' => "\xC2\xAE", 'REG;' => "\xC2\xAE", 'reg;' => "\xC2\xAE", 'rfloor;' => "\xE2\x8C\x8B", 'Rho;' => "\xCE\xA1", 'rho;' => "\xCF\x81", 'rlm;' => "\xE2\x80\x8F", 'rsaquo;' => "\xE2\x80\xBA", 'rsquo;' => "\xE2\x80\x99", 'sbquo;' => "\xE2\x80\x9A", 'Scaron;' => "\xC5\xA0", 'scaron;' => "\xC5\xA1", 'sdot;' => "\xE2\x8B\x85", 'sect' => "\xC2\xA7", 'sect;' => "\xC2\xA7", 'shy' => "\xC2\xAD", 'shy;' => "\xC2\xAD", 'Sigma;' => "\xCE\xA3", 'sigma;' => "\xCF\x83", 'sigmaf;' => "\xCF\x82", 'sim;' => "\xE2\x88\xBC", 'spades;' => "\xE2\x99\xA0", 'sub;' => "\xE2\x8A\x82", 'sube;' => "\xE2\x8A\x86", 'sum;' => "\xE2\x88\x91", 'sup;' => "\xE2\x8A\x83", 'sup1' => "\xC2\xB9", 'sup1;' => "\xC2\xB9", 'sup2' => "\xC2\xB2", 'sup2;' => "\xC2\xB2", 'sup3' => "\xC2\xB3", 'sup3;' => "\xC2\xB3", 'supe;' => "\xE2\x8A\x87", 'szlig' => "\xC3\x9F", 'szlig;' => "\xC3\x9F", 'Tau;' => "\xCE\xA4", 'tau;' => "\xCF\x84", 'there4;' => "\xE2\x88\xB4", 'Theta;' => "\xCE\x98", 'theta;' => "\xCE\xB8", 'thetasym;' => "\xCF\x91", 'thinsp;' => "\xE2\x80\x89", 'THORN' => "\xC3\x9E", 'thorn' => "\xC3\xBE", 'THORN;' => "\xC3\x9E", 'thorn;' => "\xC3\xBE", 'tilde;' => "\xCB\x9C", 'times' => "\xC3\x97", 'times;' => "\xC3\x97", 'TRADE;' => "\xE2\x84\xA2", 'trade;' => "\xE2\x84\xA2", 'Uacute' => "\xC3\x9A", 'uacute' => "\xC3\xBA", 'Uacute;' => "\xC3\x9A", 'uacute;' => "\xC3\xBA", 'uArr;' => "\xE2\x87\x91", 'uarr;' => "\xE2\x86\x91", 'Ucirc' => "\xC3\x9B", 'ucirc' => "\xC3\xBB", 'Ucirc;' => "\xC3\x9B", 'ucirc;' => "\xC3\xBB", 'Ugrave' => "\xC3\x99", 'ugrave' => "\xC3\xB9", 'Ugrave;' => "\xC3\x99", 'ugrave;' => "\xC3\xB9", 'uml' => "\xC2\xA8", 'uml;' => "\xC2\xA8", 'upsih;' => "\xCF\x92", 'Upsilon;' => "\xCE\xA5", 'upsilon;' => "\xCF\x85", 'Uuml' => "\xC3\x9C", 'uuml' => "\xC3\xBC", 'Uuml;' => "\xC3\x9C", 'uuml;' => "\xC3\xBC", 'weierp;' => "\xE2\x84\x98", 'Xi;' => "\xCE\x9E", 'xi;' => "\xCE\xBE", 'Yacute' => "\xC3\x9D", 'yacute' => "\xC3\xBD", 'Yacute;' => "\xC3\x9D", 'yacute;' => "\xC3\xBD", 'yen' => "\xC2\xA5", 'yen;' => "\xC2\xA5", 'yuml' => "\xC3\xBF", 'Yuml;' => "\xC5\xB8", 'yuml;' => "\xC3\xBF", 'Zeta;' => "\xCE\x96", 'zeta;' => "\xCE\xB6", 'zwj;' => "\xE2\x80\x8D", 'zwnj;' => "\xE2\x80\x8C"); - case 'KOI8-R': - case 'CSKOI8R': - return 'KOI8-R'; + for ($i = 0, $match = null; $i < 9 && $this->consume() !== false; $i++) + { + $consumed = substr($this->consumed, 1); + if (isset($entities[$consumed])) + { + $match = $consumed; + } + } - case 'HZ-GB-2312': - return 'HZ-GB-2312'; + if ($match !== null) + { + $this->data = substr_replace($this->data, $entities[$match], $this->position - strlen($consumed) - 1, strlen($match) + 1); + $this->position += strlen($entities[$match]) - strlen($consumed) - 1; + } + break; + } + } +} - case 'IBM866': - case 'CP866': - case '866': - case 'CSIBM866': - return 'IBM866'; +/** + * IRI parser/serialiser + * + * @package SimplePie + */ +class SimplePie_IRI +{ + /** + * Scheme + * + * @access private + * @var string + */ + var $scheme; - case 'IBM775': - case 'CP775': - case 'CSPC775BALTIC': - return 'IBM775'; + /** + * User Information + * + * @access private + * @var string + */ + var $userinfo; - case 'KOI8-U': - return 'KOI8-U'; + /** + * Host + * + * @access private + * @var string + */ + var $host; - case 'IBM00858': - case 'CCSID00858': - case 'CP00858': - case 'PC-MULTILINGUAL-850+EURO': - return 'IBM00858'; + /** + * Port + * + * @access private + * @var string + */ + var $port; - case 'IBM00924': - case 'CCSID00924': - case 'CP00924': - case 'EBCDIC-LATIN9--EURO': - return 'IBM00924'; + /** + * Path + * + * @access private + * @var string + */ + var $path; - case 'IBM01140': - case 'CCSID01140': - case 'CP01140': - case 'EBCDIC-US-37+EURO': - return 'IBM01140'; + /** + * Query + * + * @access private + * @var string + */ + var $query; - case 'IBM01141': - case 'CCSID01141': - case 'CP01141': - case 'EBCDIC-DE-273+EURO': - return 'IBM01141'; + /** + * Fragment + * + * @access private + * @var string + */ + var $fragment; - case 'IBM01142': - case 'CCSID01142': - case 'CP01142': - case 'EBCDIC-DK-277+EURO': - case 'EBCDIC-NO-277+EURO': - return 'IBM01142'; + /** + * Whether the object represents a valid IRI + * + * @access private + * @var array + */ + var $valid = array(); - case 'IBM01143': - case 'CCSID01143': - case 'CP01143': - case 'EBCDIC-FI-278+EURO': - case 'EBCDIC-SE-278+EURO': - return 'IBM01143'; + /** + * Return the entire IRI when you try and read the object as a string + * + * @access public + * @return string + */ + function __toString() + { + return $this->get_iri(); + } - case 'IBM01144': - case 'CCSID01144': - case 'CP01144': - case 'EBCDIC-IT-280+EURO': - return 'IBM01144'; + /** + * Create a new IRI object, from a specified string + * + * @access public + * @param string $iri + * @return SimplePie_IRI + */ + function SimplePie_IRI($iri) + { + $iri = (string) $iri; + if ($iri !== '') + { + $parsed = $this->parse_iri($iri); + $this->set_scheme($parsed['scheme']); + $this->set_authority($parsed['authority']); + $this->set_path($parsed['path']); + $this->set_query($parsed['query']); + $this->set_fragment($parsed['fragment']); + } + } - case 'IBM01145': - case 'CCSID01145': - case 'CP01145': - case 'EBCDIC-ES-284+EURO': - return 'IBM01145'; + /** + * Create a new IRI object by resolving a relative IRI + * + * @static + * @access public + * @param SimplePie_IRI $base Base IRI + * @param string $relative Relative IRI + * @return SimplePie_IRI + */ + function absolutize($base, $relative) + { + $relative = (string) $relative; + if ($relative !== '') + { + $relative = new SimplePie_IRI($relative); + if ($relative->get_scheme() !== null) + { + $target = $relative; + } + elseif ($base->get_iri() !== null) + { + if ($relative->get_authority() !== null) + { + $target = $relative; + $target->set_scheme($base->get_scheme()); + } + else + { + $target = new SimplePie_IRI(''); + $target->set_scheme($base->get_scheme()); + $target->set_userinfo($base->get_userinfo()); + $target->set_host($base->get_host()); + $target->set_port($base->get_port()); + if ($relative->get_path() !== null) + { + if (strpos($relative->get_path(), '/') === 0) + { + $target->set_path($relative->get_path()); + } + elseif (($base->get_userinfo() !== null || $base->get_host() !== null || $base->get_port() !== null) && $base->get_path() === null) + { + $target->set_path('/' . $relative->get_path()); + } + elseif (($last_segment = strrpos($base->get_path(), '/')) !== false) + { + $target->set_path(substr($base->get_path(), 0, $last_segment + 1) . $relative->get_path()); + } + else + { + $target->set_path($relative->get_path()); + } + $target->set_query($relative->get_query()); + } + else + { + $target->set_path($base->get_path()); + if ($relative->get_query() !== null) + { + $target->set_query($relative->get_query()); + } + elseif ($base->get_query() !== null) + { + $target->set_query($base->get_query()); + } + } + } + $target->set_fragment($relative->get_fragment()); + } + else + { + // No base URL, just return the relative URL + $target = $relative; + } + } + else + { + $target = $base; + } + return $target; + } - case 'IBM01146': - case 'CCSID01146': - case 'CP01146': - case 'EBCDIC-GB-285+EURO': - return 'IBM01146'; + /** + * Parse an IRI into scheme/authority/path/query/fragment segments + * + * @access private + * @param string $iri + * @return array + */ + function parse_iri($iri) + { + preg_match('/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/', $iri, $match); + for ($i = count($match); $i <= 9; $i++) + { + $match[$i] = ''; + } + return array('scheme' => $match[2], 'authority' => $match[4], 'path' => $match[5], 'query' => $match[7], 'fragment' => $match[9]); + } - case 'IBM01147': - case 'CCSID01147': - case 'CP01147': - case 'EBCDIC-FR-297+EURO': - return 'IBM01147'; + /** + * Remove dot segments from a path + * + * @access private + * @param string $input + * @return string + */ + function remove_dot_segments($input) + { + $output = ''; + while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..') + { + // A: If the input buffer begins with a prefix of "../" or "./", then remove that prefix from the input buffer; otherwise, + if (strpos($input, '../') === 0) + { + $input = substr($input, 3); + } + elseif (strpos($input, './') === 0) + { + $input = substr($input, 2); + } + // B: if the input buffer begins with a prefix of "/./" or "/.", where "." is a complete path segment, then replace that prefix with "/" in the input buffer; otherwise, + elseif (strpos($input, '/./') === 0) + { + $input = substr_replace($input, '/', 0, 3); + } + elseif ($input === '/.') + { + $input = '/'; + } + // C: if the input buffer begins with a prefix of "/../" or "/..", where ".." is a complete path segment, then replace that prefix with "/" in the input buffer and remove the last segment and its preceding "/" (if any) from the output buffer; otherwise, + elseif (strpos($input, '/../') === 0) + { + $input = substr_replace($input, '/', 0, 4); + $output = substr_replace($output, '', strrpos($output, '/')); + } + elseif ($input === '/..') + { + $input = '/'; + $output = substr_replace($output, '', strrpos($output, '/')); + } + // D: if the input buffer consists only of "." or "..", then remove that from the input buffer; otherwise, + elseif ($input === '.' || $input === '..') + { + $input = ''; + } + // E: move the first path segment in the input buffer to the end of the output buffer, including the initial "/" character (if any) and any subsequent characters up to, but not including, the next "/" character or the end of the input buffer + elseif (($pos = strpos($input, '/', 1)) !== false) + { + $output .= substr($input, 0, $pos); + $input = substr_replace($input, '', 0, $pos); + } + else + { + $output .= $input; + $input = ''; + } + } + return $output . $input; + } - case 'IBM01148': - case 'CCSID01148': - case 'CP01148': - case 'EBCDIC-INTERNATIONAL-500+EURO': - return 'IBM01148'; + /** + * Replace invalid character with percent encoding + * + * @access private + * @param string $string Input string + * @param string $valid_chars Valid characters + * @param int $case Normalise case + * @return string + */ + function replace_invalid_with_pct_encoding($string, $valid_chars, $case = SIMPLEPIE_SAME_CASE) + { + // Normalise case + if ($case & SIMPLEPIE_LOWERCASE) + { + $string = strtolower($string); + } + elseif ($case & SIMPLEPIE_UPPERCASE) + { + $string = strtoupper($string); + } - case 'IBM01149': - case 'CCSID01149': - case 'CP01149': - case 'EBCDIC-IS-871+EURO': - return 'IBM01149'; + // Store position and string length (to avoid constantly recalculating this) + $position = 0; + $strlen = strlen($string); - case 'BIG5-HKSCS': - return 'Big5-HKSCS'; + // Loop as long as we have invalid characters, advancing the position to the next invalid character + while (($position += strspn($string, $valid_chars, $position)) < $strlen) + { + // If we have a % character + if ($string[$position] === '%') + { + // If we have a pct-encoded section + if ($position + 2 < $strlen && strspn($string, '0123456789ABCDEFabcdef', $position + 1, 2) === 2) + { + // Get the the represented character + $chr = chr(hexdec(substr($string, $position + 1, 2))); - case 'IBM1047': - case 'IBM-1047': - return 'IBM1047'; + // If the character is valid, replace the pct-encoded with the actual character while normalising case + if (strpos($valid_chars, $chr) !== false) + { + if ($case & SIMPLEPIE_LOWERCASE) + { + $chr = strtolower($chr); + } + elseif ($case & SIMPLEPIE_UPPERCASE) + { + $chr = strtoupper($chr); + } + $string = substr_replace($string, $chr, $position, 3); + $strlen -= 2; + $position++; + } - case 'PTCP154': - case 'CSPTCP154': - case 'PT154': - case 'CP154': - case 'CYRILLIC-ASIAN': - return 'PTCP154'; + // Otherwise just normalise the pct-encoded to uppercase + else + { + $string = substr_replace($string, strtoupper(substr($string, $position + 1, 2)), $position + 1, 2); + $position += 3; + } + } + // If we don't have a pct-encoded section, just replace the % with its own esccaped form + else + { + $string = substr_replace($string, '%25', $position, 1); + $strlen += 2; + $position += 3; + } + } + // If we have an invalid character, change into its pct-encoded form + else + { + $replacement = sprintf("%%%02X", ord($string[$position])); + $string = str_replace($string[$position], $replacement, $string); + $strlen = strlen($string); + } + } + return $string; + } - case 'AMIGA-1251': - case 'AMI1251': - case 'AMIGA1251': - case 'AMI-1251': - return 'Amiga-1251'; + /** + * Check if the object represents a valid IRI + * + * @access public + * @return bool + */ + function is_valid() + { + return array_sum($this->valid) === count($this->valid); + } - case 'KOI7-SWITCHED': - return 'KOI7-switched'; + /** + * Set the scheme. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @access public + * @param string $scheme + * @return bool + */ + function set_scheme($scheme) + { + if ($scheme === null || $scheme === '') + { + $this->scheme = null; + } + else + { + $len = strlen($scheme); + switch (true) + { + case $len > 1: + if (!strspn($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-.', 1)) + { + $this->scheme = null; + $this->valid[__FUNCTION__] = false; + return false; + } - case 'BRF': - case 'CSBRF': - return 'BRF'; + case $len > 0: + if (!strspn($scheme, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 0, 1)) + { + $this->scheme = null; + $this->valid[__FUNCTION__] = false; + return false; + } + } + $this->scheme = strtolower($scheme); + } + $this->valid[__FUNCTION__] = true; + return true; + } - case 'TSCII': - case 'CSTSCII': - return 'TSCII'; + /** + * Set the authority. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @access public + * @param string $authority + * @return bool + */ + function set_authority($authority) + { + if (($userinfo_end = strrpos($authority, '@')) !== false) + { + $userinfo = substr($authority, 0, $userinfo_end); + $authority = substr($authority, $userinfo_end + 1); + } + else + { + $userinfo = null; + } - case 'WINDOWS-1250': - return 'windows-1250'; + if (($port_start = strpos($authority, ':')) !== false) + { + $port = substr($authority, $port_start + 1); + $authority = substr($authority, 0, $port_start); + } + else + { + $port = null; + } - case 'WINDOWS-1251': - return 'windows-1251'; + return $this->set_userinfo($userinfo) && $this->set_host($authority) && $this->set_port($port); + } - case 'WINDOWS-1252': - return 'windows-1252'; + /** + * Set the userinfo. + * + * @access public + * @param string $userinfo + * @return bool + */ + function set_userinfo($userinfo) + { + if ($userinfo === null || $userinfo === '') + { + $this->userinfo = null; + } + else + { + $this->userinfo = $this->replace_invalid_with_pct_encoding($userinfo, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=:'); + } + $this->valid[__FUNCTION__] = true; + return true; + } - case 'WINDOWS-1253': - return 'windows-1253'; + /** + * Set the host. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @access public + * @param string $host + * @return bool + */ + function set_host($host) + { + if ($host === null || $host === '') + { + $this->host = null; + $this->valid[__FUNCTION__] = true; + return true; + } + elseif ($host[0] === '[' && substr($host, -1) === ']') + { + if (Net_IPv6::checkIPv6(substr($host, 1, -1))) + { + $this->host = $host; + $this->valid[__FUNCTION__] = true; + return true; + } + else + { + $this->host = null; + $this->valid[__FUNCTION__] = false; + return false; + } + } + else + { + $this->host = $this->replace_invalid_with_pct_encoding($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=', SIMPLEPIE_LOWERCASE); + $this->valid[__FUNCTION__] = true; + return true; + } + } - case 'WINDOWS-1254': - return 'windows-1254'; + /** + * Set the port. Returns true on success, false on failure (if there are + * any invalid characters). + * + * @access public + * @param string $port + * @return bool + */ + function set_port($port) + { + if ($port === null || $port === '') + { + $this->port = null; + $this->valid[__FUNCTION__] = true; + return true; + } + elseif (strspn($port, '0123456789') === strlen($port)) + { + $this->port = (int) $port; + $this->valid[__FUNCTION__] = true; + return true; + } + else + { + $this->port = null; + $this->valid[__FUNCTION__] = false; + return false; + } + } - case 'WINDOWS-1255': - return 'windows-1255'; + /** + * Set the path. + * + * @access public + * @param string $path + * @return bool + */ + function set_path($path) + { + if ($path === null || $path === '') + { + $this->path = null; + $this->valid[__FUNCTION__] = true; + return true; + } + elseif (substr($path, 0, 2) === '//' && $this->userinfo === null && $this->host === null && $this->port === null) + { + $this->path = null; + $this->valid[__FUNCTION__] = false; + return false; + } + else + { + $this->path = $this->replace_invalid_with_pct_encoding($path, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=@/'); + if ($this->scheme !== null) + { + $this->path = $this->remove_dot_segments($this->path); + } + $this->valid[__FUNCTION__] = true; + return true; + } + } - case 'WINDOWS-1256': - return 'windows-1256'; + /** + * Set the query. + * + * @access public + * @param string $query + * @return bool + */ + function set_query($query) + { + if ($query === null || $query === '') + { + $this->query = null; + } + else + { + $this->query = $this->replace_invalid_with_pct_encoding($query, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$\'()*+,;:@/?'); + } + $this->valid[__FUNCTION__] = true; + return true; + } - case 'WINDOWS-1257': - return 'windows-1257'; + /** + * Set the fragment. + * + * @access public + * @param string $fragment + * @return bool + */ + function set_fragment($fragment) + { + if ($fragment === null || $fragment === '') + { + $this->fragment = null; + } + else + { + $this->fragment = $this->replace_invalid_with_pct_encoding($fragment, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=:@/?'); + } + $this->valid[__FUNCTION__] = true; + return true; + } - case 'WINDOWS-1258': - return 'windows-1258'; + /** + * Get the complete IRI + * + * @access public + * @return string + */ + function get_iri() + { + $iri = ''; + if ($this->scheme !== null) + { + $iri .= $this->scheme . ':'; + } + if (($authority = $this->get_authority()) !== null) + { + $iri .= '//' . $authority; + } + if ($this->path !== null) + { + $iri .= $this->path; + } + if ($this->query !== null) + { + $iri .= '?' . $this->query; + } + if ($this->fragment !== null) + { + $iri .= '#' . $this->fragment; + } - default: - return (string) $encoding; + if ($iri !== '') + { + return $iri; + } + else + { + return null; } } - function get_curl_version() + /** + * Get the scheme + * + * @access public + * @return string + */ + function get_scheme() { - if (is_array($curl = curl_version())) + return $this->scheme; + } + + /** + * Get the complete authority + * + * @access public + * @return string + */ + function get_authority() + { + $authority = ''; + if ($this->userinfo !== null) { - $curl = $curl['version']; + $authority .= $this->userinfo . '@'; } - elseif (substr($curl, 0, 5) == 'curl/') + if ($this->host !== null) { - $curl = substr($curl, 5, strcspn($curl, "\x09\x0A\x0B\x0C\x0D", 5)); + $authority .= $this->host; } - elseif (substr($curl, 0, 8) == 'libcurl/') + if ($this->port !== null) { - $curl = substr($curl, 8, strcspn($curl, "\x09\x0A\x0B\x0C\x0D", 8)); + $authority .= ':' . $this->port; + } + + if ($authority !== '') + { + return $authority; } else { - $curl = 0; + return null; } - return $curl; } - function is_subclass_of($class1, $class2) + /** + * Get the user information + * + * @access public + * @return string + */ + function get_userinfo() + { + return $this->userinfo; + } + + /** + * Get the host + * + * @access public + * @return string + */ + function get_host() { - if (func_num_args() != 2) + return $this->host; + } + + /** + * Get the port + * + * @access public + * @return string + */ + function get_port() + { + return $this->port; + } + + /** + * Get the path + * + * @access public + * @return string + */ + function get_path() + { + return $this->path; + } + + /** + * Get the query + * + * @access public + * @return string + */ + function get_query() + { + return $this->query; + } + + /** + * Get the fragment + * + * @access public + * @return string + */ + function get_fragment() + { + return $this->fragment; + } +} + +/** + * Class to validate and to work with IPv6 addresses. + * + * @package SimplePie + * @copyright 2003-2005 The PHP Group + * @license http://www.opensource.org/licenses/bsd-license.php + * @link http://pear.php.net/package/Net_IPv6 + * @author Alexander Merz + * @author elfrink at introweb dot nl + * @author Josh Peck + * @author Geoffrey Sneddon + */ +class SimplePie_Net_IPv6 +{ + /** + * Removes a possible existing netmask specification of an IP address. + * + * @param string $ip the (compressed) IP as Hex representation + * @return string the IP the without netmask + * @since 1.1.0 + * @access public + * @static + */ + function removeNetmaskSpec($ip) + { + if (strpos($ip, '/') !== false) { - trigger_error('Wrong parameter count for SimplePie_Misc::is_subclass_of()', E_USER_WARNING); + list($addr, $nm) = explode('/', $ip); } - elseif (version_compare(PHP_VERSION, '5.0.3', '>=') || is_object($class1)) + else { - return is_subclass_of($class1, $class2); + $addr = $ip; } - elseif (is_string($class1) && is_string($class2)) + return $addr; + } + + /** + * Uncompresses an IPv6 address + * + * RFC 2373 allows you to compress zeros in an address to '::'. This + * function expects an valid IPv6 address and expands the '::' to + * the required zeros. + * + * Example: FF01::101 -> FF01:0:0:0:0:0:0:101 + * ::1 -> 0:0:0:0:0:0:0:1 + * + * @access public + * @static + * @param string $ip a valid IPv6-address (hex format) + * @return string the uncompressed IPv6-address (hex format) + */ + function Uncompress($ip) + { + $uip = SimplePie_Net_IPv6::removeNetmaskSpec($ip); + $c1 = -1; + $c2 = -1; + if (strpos($ip, '::') !== false) { - if (class_exists($class1)) + list($ip1, $ip2) = explode('::', $ip); + if ($ip1 === '') + { + $c1 = -1; + } + else + { + $pos = 0; + if (($pos = substr_count($ip1, ':')) > 0) + { + $c1 = $pos; + } + else + { + $c1 = 0; + } + } + if ($ip2 === '') { - if (class_exists($class2)) + $c2 = -1; + } + else + { + $pos = 0; + if (($pos = substr_count($ip2, ':')) > 0) { - $class2 = strtolower($class2); - while ($class1 = strtolower(get_parent_class($class1))) - { - if ($class1 == $class2) - { - return true; - } - } + $c2 = $pos; + } + else + { + $c2 = 0; } } + if (strstr($ip2, '.')) + { + $c2++; + } + // :: + if ($c1 === -1 && $c2 === -1) + { + $uip = '0:0:0:0:0:0:0:0'; + } + // ::xxx + else if ($c1 === -1) + { + $fill = str_repeat('0:', 7 - $c2); + $uip = str_replace('::', $fill, $uip); + } + // xxx:: + else if ($c2 === -1) + { + $fill = str_repeat(':0', 7 - $c1); + $uip = str_replace('::', $fill, $uip); + } + // xxx::xxx else { - trigger_error('Unknown class passed as parameter', E_USER_WARNING); + $fill = str_repeat(':0:', 6 - $c2 - $c1); + $uip = str_replace('::', $fill, $uip); + $uip = str_replace('::', ':', $uip); } } - return false; + return $uip; } /** - * Strip HTML comments + * Splits an IPv6 address into the IPv6 and a possible IPv4 part + * + * RFC 2373 allows you to note the last two parts of an IPv6 address as + * an IPv4 compatible address + * + * Example: 0:0:0:0:0:0:13.1.68.3 + * 0:0:0:0:0:FFFF:129.144.52.38 * * @access public - * @param string $data Data to strip comments from - * @return string Comment stripped string + * @static + * @param string $ip a valid IPv6-address (hex format) + * @return array [0] contains the IPv6 part, [1] the IPv4 part (hex format) */ - function strip_comments($data) + function SplitV64($ip) { - $output = ''; - while (($start = strpos($data, '', $start)) !== false) - { - $data = substr_replace($data, '', 0, $end + 3); - } - else - { - $data = ''; - } + $pos = strrpos($ip, ':'); + $ip[$pos] = '_'; + $ipPart = explode('_', $ip); + return $ipPart; + } + else + { + return array($ip, ''); } - return $output . $data; } - function parse_date($dt, $rfc822_tz = true) + /** + * Checks an IPv6 address + * + * Checks if the given IP is IPv6-compatible + * + * @access public + * @static + * @param string $ip a valid IPv6-address + * @return bool true if $ip is an IPv6 address + */ + function checkIPv6($ip) { - static $cache = array(); - if (!isset($cache[$dt][$rfc822_tz])) + $ipPart = SimplePie_Net_IPv6::SplitV64($ip); + $count = 0; + if (!empty($ipPart[0])) { - $dt = SimplePie_Misc::uncomment_rfc822($dt); - /* - Capturing subpatterns: - 1: RFC 822 date - 2: RFC 822 day - 3: RFC 822 month - 4: RFC 822 year - 5: ISO 8601 date - 6: ISO 8601 century - 7: ISO 8601 year - 8: ISO 8601 month - 9: ISO 8601 day - 10: ISO 8601 ordinal day - 11: ISO 8601 month - 12: ISO 8601 day - 13: ISO 8601 week - 14: ISO 8601 day of week - 15: Time - 16: Hour - 17: Hour Decimal - 18: Minute - 19: Minute Decimal - 20: Second - 21: Second Decimal - 22: Timezone - 23: Diff ± - 24: Hour - 25: Hour Decimal - 26: Minute - 27: Minute Decimal - 28: Alphabetic Timezone - */ - if (preg_match('/^(?:(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)[,\s]+)?(([0-9]{1,2})\s*(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s*([0-9]{4}|[0-9]{2}))|(([0-9]{2})(?:([0-9]{2})(?:(?:-|\s)*(?:([0-9]{2})([0-9]{2})|([0-9]{3})|([0-9]{2})(?:(?:-|\s)*([0-9]{2}))?|W([0-9]{2})(?:(?:-|\s)*([0-9]))?))?)?))((?:T|\s)+([0-9]{2})(?:(?:,|\.)([0-9]*)|(?:\:|\s)*([0-9]{2})(?:(?:,|\.)([0-9]*)|(?:\:|\s)*([0-9]{2})(?:(?:,|\.)([0-9]*))?)?)?(?:\s)*((?:(\+|-)([0-9]{2})(?:(?:,|\.)([0-9]*)|(?:\:|\s)*(?:([0-9]{2})(?:(?:,|\.)([0-9]*))?))?)|(UTC|GMT|EST|CST|MST|PST|EDT|CDT|MDT|PDT|UT|[A-IK-Z]))?)?$/i', $dt, $match)) + $ipv6 = explode(':', $ipPart[0]); + for ($i = 0; $i < count($ipv6); $i++) { - // Fill all matches - for ($i = count($match); $i <= 28; $i++) + $dec = hexdec($ipv6[$i]); + $hex = strtoupper(preg_replace('/^[0]{1,3}(.*[0-9a-fA-F])$/', '\\1', $ipv6[$i])); + if ($ipv6[$i] >= 0 && $dec <= 65535 && $hex === strtoupper(dechex($dec))) { - $match[$i] = ''; + $count++; } - - // Set blank vars - $year = 1970; - $month = 1; - $day = 1; - $hour = 0; - $minute = 0; - $second = 0; - $timezone = false; - - // RFC 822 - if ($match[1] !== '') + } + if ($count === 8) + { + return true; + } + elseif ($count === 6 && !empty($ipPart[1])) + { + $ipv4 = explode('.', $ipPart[1]); + $count = 0; + foreach ($ipv4 as $ipv4_part) { - if (strlen($match[4]) == 2) - { - $year = ($match[4] < 70) ? "20$match[4]" : "19$match[4]"; - } - else + if ($ipv4_part >= 0 && $ipv4_part <= 255 && preg_match('/^\d{1,3}$/', $ipv4_part)) { - $year = $match[4]; - } - switch (strtolower($match[3])) - { - case 'jan': - $month = 1; - break; - - case 'feb': - $month = 2; - break; - - case 'mar': - $month = 3; - break; - - case 'apr': - $month = 4; - break; - - case 'may': - $month = 5; - break; - - case 'jun': - $month = 6; - break; - - case 'jul': - $month = 7; - break; - - case 'aug': - $month = 8; - break; - - case 'sep': - $month = 9; - break; - - case 'oct': - $month = 10; - break; - - case 'nov': - $month = 11; - break; - - case 'dec': - $month = 12; - break; + $count++; } - $day = $match[2]; } - // ISO 8601 - else + if ($count === 4) { - // Year - if ($match[7] !== '') - { - $year = "$match[6]$match[7]"; - - // Two Digit Month/Day - if ($match[11] !== '') - { - $month = $match[11]; - if ($match[12] !== '') - { - $day = $match[12]; - } - } - - // Four Digit Month/Day - elseif ($match[8] !== '') - { - $month = $match[8]; - $day = $match[9]; - } - - // Ordinal Day - elseif ($match[10] !== '') - { - $day = $match[10]; - } - - // Week Date - elseif ($match[13] !== '') - { - // Week Day - if ($match[14] !== '') - { - $day = $match[14]; - } - - $first_day_of_year = date('w', mktime(0, 0, 0, 1, 1, $year)); - if ($first_day_of_year == 0) - { - $first_day_of_year = 7; - } - - $day = 7 * ($match[13] - 1) + $day - ($first_day_of_year - 1); - } - } - else - { - $year = "$match[6]00"; - } + return true; } - // Time - if ($match[15] !== '') - { - $time = 0; - $time += ($match[16] + ('.' . $match[17])) * 3600; - $time += ($match[18] + ('.' . $match[19])) * 60; - $time += $match[20] + ('.' . $match[21]); - $hour = floor($time / 3600); - $time -= $hour * 3600; - $minute = floor($time / 60); - $time -= $minute * 60; - $second = round($time); - - // Timezone - if ($match[22] !== '') - { - // Alphabetic Timezone - if ($match[28] !== '') - { - // Military - if (strlen($match[28]) == 1) - { - if ($match[28] == 'Z' || $match[28] == 'z' || !$rfc822_tz) - { - $timezone = 0; - } - else - { - $timezone = ord(strtoupper($match[28])); + } + else + { + return false; + } - if ($timezone > 74) - { - $timezone--; - } + } + else + { + return false; + } + } +} - if ($timezone <= 76) - { - $timezone = -($timezone - 64); - } - else - { - $timezone -= 76; - } +/** + * Date Parser + * + * @package SimplePie + */ +class SimplePie_Parse_Date +{ + /** + * Input data + * + * @access protected + * @var string + */ + var $date; - $timezone *= 3600; - } - } - // Code - else - { - switch (strtoupper($match[28])) - { - case 'UT': - case 'UTC': - case 'GMT': - $timezone = 0; - break; + /** + * List of days, calendar day name => ordinal day number in the week + * + * @access protected + * @var array + */ + var $day = array( + // English + 'mon' => 1, + 'monday' => 1, + 'tue' => 2, + 'tuesday' => 2, + 'wed' => 3, + 'wednesday' => 3, + 'thu' => 4, + 'thursday' => 4, + 'fri' => 5, + 'friday' => 5, + 'sat' => 6, + 'saturday' => 6, + 'sun' => 7, + 'sunday' => 7, + // Dutch + 'maandag' => 1, + 'dinsdag' => 2, + 'woensdag' => 3, + 'donderdag' => 4, + 'vrijdag' => 5, + 'zaterdag' => 6, + 'zondag' => 7, + // French + 'lundi' => 1, + 'mardi' => 2, + 'mercredi' => 3, + 'jeudi' => 4, + 'vendredi' => 5, + 'samedi' => 6, + 'dimanche' => 7, + // German + 'montag' => 1, + 'dienstag' => 2, + 'mittwoch' => 3, + 'donnerstag' => 4, + 'freitag' => 5, + 'samstag' => 6, + 'sonnabend' => 6, + 'sonntag' => 7, + // Italian + 'lunedì' => 1, + 'martedì' => 2, + 'mercoledì' => 3, + 'giovedì' => 4, + 'venerdì' => 5, + 'sabato' => 6, + 'domenica' => 7, + // Spanish + 'lunes' => 1, + 'martes' => 2, + 'miércoles' => 3, + 'jueves' => 4, + 'viernes' => 5, + 'sábado' => 6, + 'domingo' => 7, + // Finnish + 'maanantai' => 1, + 'tiistai' => 2, + 'keskiviikko' => 3, + 'torstai' => 4, + 'perjantai' => 5, + 'lauantai' => 6, + 'sunnuntai' => 7, + // Hungarian + 'hétfő' => 1, + 'kedd' => 2, + 'szerda' => 3, + 'csütörtok' => 4, + 'péntek' => 5, + 'szombat' => 6, + 'vasárnap' => 7, + // Greek + 'Δευ' => 1, + 'Τρι' => 2, + 'Τετ' => 3, + 'Πεμ' => 4, + 'Παρ' => 5, + 'Σαβ' => 6, + 'Κυρ' => 7, + ); - case 'EST': - $timezone = -18000; - break; + /** + * List of months, calendar month name => calendar month number + * + * @access protected + * @var array + */ + var $month = array( + // English + 'jan' => 1, + 'january' => 1, + 'feb' => 2, + 'february' => 2, + 'mar' => 3, + 'march' => 3, + 'apr' => 4, + 'april' => 4, + 'may' => 5, + // No long form of May + 'jun' => 6, + 'june' => 6, + 'jul' => 7, + 'july' => 7, + 'aug' => 8, + 'august' => 8, + 'sep' => 9, + 'september' => 8, + 'oct' => 10, + 'october' => 10, + 'nov' => 11, + 'november' => 11, + 'dec' => 12, + 'december' => 12, + // Dutch + 'januari' => 1, + 'februari' => 2, + 'maart' => 3, + 'april' => 4, + 'mei' => 5, + 'juni' => 6, + 'juli' => 7, + 'augustus' => 8, + 'september' => 9, + 'oktober' => 10, + 'november' => 11, + 'december' => 12, + // French + 'janvier' => 1, + 'février' => 2, + 'mars' => 3, + 'avril' => 4, + 'mai' => 5, + 'juin' => 6, + 'juillet' => 7, + 'août' => 8, + 'septembre' => 9, + 'octobre' => 10, + 'novembre' => 11, + 'décembre' => 12, + // German + 'januar' => 1, + 'februar' => 2, + 'märz' => 3, + 'april' => 4, + 'mai' => 5, + 'juni' => 6, + 'juli' => 7, + 'august' => 8, + 'september' => 9, + 'oktober' => 10, + 'november' => 11, + 'dezember' => 12, + // Italian + 'gennaio' => 1, + 'febbraio' => 2, + 'marzo' => 3, + 'aprile' => 4, + 'maggio' => 5, + 'giugno' => 6, + 'luglio' => 7, + 'agosto' => 8, + 'settembre' => 9, + 'ottobre' => 10, + 'novembre' => 11, + 'dicembre' => 12, + // Spanish + 'enero' => 1, + 'febrero' => 2, + 'marzo' => 3, + 'abril' => 4, + 'mayo' => 5, + 'junio' => 6, + 'julio' => 7, + 'agosto' => 8, + 'septiembre' => 9, + 'setiembre' => 9, + 'octubre' => 10, + 'noviembre' => 11, + 'diciembre' => 12, + // Finnish + 'tammikuu' => 1, + 'helmikuu' => 2, + 'maaliskuu' => 3, + 'huhtikuu' => 4, + 'toukokuu' => 5, + 'kesäkuu' => 6, + 'heinäkuu' => 7, + 'elokuu' => 8, + 'suuskuu' => 9, + 'lokakuu' => 10, + 'marras' => 11, + 'joulukuu' => 12, + // Hungarian + 'január' => 1, + 'február' => 2, + 'március' => 3, + 'április' => 4, + 'május' => 5, + 'június' => 6, + 'július' => 7, + 'augusztus' => 8, + 'szeptember' => 9, + 'október' => 10, + 'november' => 11, + 'december' => 12, + // Greek + 'Ιαν' => 1, + 'Φεβ' => 2, + 'Μάώ' => 3, + 'Μαώ' => 3, + 'Απρ' => 4, + 'Μάι' => 5, + 'Μαϊ' => 5, + 'Μαι' => 5, + 'Ιούν' => 6, + 'Ιον' => 6, + 'Ιούλ' => 7, + 'Ιολ' => 7, + 'Αύγ' => 8, + 'Αυγ' => 8, + 'Σεπ' => 9, + 'Οκτ' => 10, + 'Νοέ' => 11, + 'Δεκ' => 12, + ); - case 'CST': - $timezone = -21600; - break; + /** + * List of timezones, abbreviation => offset from UTC + * + * @access protected + * @var array + */ + var $timezone = array( + 'ACDT' => 37800, + 'ACIT' => 28800, + 'ACST' => 34200, + 'ACT' => -18000, + 'ACWDT' => 35100, + 'ACWST' => 31500, + 'AEDT' => 39600, + 'AEST' => 36000, + 'AFT' => 16200, + 'AKDT' => -28800, + 'AKST' => -32400, + 'AMDT' => 18000, + 'AMT' => -14400, + 'ANAST' => 46800, + 'ANAT' => 43200, + 'ART' => -10800, + 'AZOST' => -3600, + 'AZST' => 18000, + 'AZT' => 14400, + 'BIOT' => 21600, + 'BIT' => -43200, + 'BOT' => -14400, + 'BRST' => -7200, + 'BRT' => -10800, + 'BST' => 3600, + 'BTT' => 21600, + 'CAST' => 18000, + 'CAT' => 7200, + 'CCT' => 23400, + 'CDT' => -18000, + 'CEDT' => 7200, + 'CET' => 3600, + 'CGST' => -7200, + 'CGT' => -10800, + 'CHADT' => 49500, + 'CHAST' => 45900, + 'CIST' => -28800, + 'CKT' => -36000, + 'CLDT' => -10800, + 'CLST' => -14400, + 'COT' => -18000, + 'CST' => -21600, + 'CVT' => -3600, + 'CXT' => 25200, + 'DAVT' => 25200, + 'DTAT' => 36000, + 'EADT' => -18000, + 'EAST' => -21600, + 'EAT' => 10800, + 'ECT' => -18000, + 'EDT' => -14400, + 'EEST' => 10800, + 'EET' => 7200, + 'EGT' => -3600, + 'EKST' => 21600, + 'EST' => -18000, + 'FJT' => 43200, + 'FKDT' => -10800, + 'FKST' => -14400, + 'FNT' => -7200, + 'GALT' => -21600, + 'GEDT' => 14400, + 'GEST' => 10800, + 'GFT' => -10800, + 'GILT' => 43200, + 'GIT' => -32400, + 'GST' => 14400, + 'GST' => -7200, + 'GYT' => -14400, + 'HAA' => -10800, + 'HAC' => -18000, + 'HADT' => -32400, + 'HAE' => -14400, + 'HAP' => -25200, + 'HAR' => -21600, + 'HAST' => -36000, + 'HAT' => -9000, + 'HAY' => -28800, + 'HKST' => 28800, + 'HMT' => 18000, + 'HNA' => -14400, + 'HNC' => -21600, + 'HNE' => -18000, + 'HNP' => -28800, + 'HNR' => -25200, + 'HNT' => -12600, + 'HNY' => -32400, + 'IRDT' => 16200, + 'IRKST' => 32400, + 'IRKT' => 28800, + 'IRST' => 12600, + 'JFDT' => -10800, + 'JFST' => -14400, + 'JST' => 32400, + 'KGST' => 21600, + 'KGT' => 18000, + 'KOST' => 39600, + 'KOVST' => 28800, + 'KOVT' => 25200, + 'KRAST' => 28800, + 'KRAT' => 25200, + 'KST' => 32400, + 'LHDT' => 39600, + 'LHST' => 37800, + 'LINT' => 50400, + 'LKT' => 21600, + 'MAGST' => 43200, + 'MAGT' => 39600, + 'MAWT' => 21600, + 'MDT' => -21600, + 'MESZ' => 7200, + 'MEZ' => 3600, + 'MHT' => 43200, + 'MIT' => -34200, + 'MNST' => 32400, + 'MSDT' => 14400, + 'MSST' => 10800, + 'MST' => -25200, + 'MUT' => 14400, + 'MVT' => 18000, + 'MYT' => 28800, + 'NCT' => 39600, + 'NDT' => -9000, + 'NFT' => 41400, + 'NMIT' => 36000, + 'NOVST' => 25200, + 'NOVT' => 21600, + 'NPT' => 20700, + 'NRT' => 43200, + 'NST' => -12600, + 'NUT' => -39600, + 'NZDT' => 46800, + 'NZST' => 43200, + 'OMSST' => 25200, + 'OMST' => 21600, + 'PDT' => -25200, + 'PET' => -18000, + 'PETST' => 46800, + 'PETT' => 43200, + 'PGT' => 36000, + 'PHOT' => 46800, + 'PHT' => 28800, + 'PKT' => 18000, + 'PMDT' => -7200, + 'PMST' => -10800, + 'PONT' => 39600, + 'PST' => -28800, + 'PWT' => 32400, + 'PYST' => -10800, + 'PYT' => -14400, + 'RET' => 14400, + 'ROTT' => -10800, + 'SAMST' => 18000, + 'SAMT' => 14400, + 'SAST' => 7200, + 'SBT' => 39600, + 'SCDT' => 46800, + 'SCST' => 43200, + 'SCT' => 14400, + 'SEST' => 3600, + 'SGT' => 28800, + 'SIT' => 28800, + 'SRT' => -10800, + 'SST' => -39600, + 'SYST' => 10800, + 'SYT' => 7200, + 'TFT' => 18000, + 'THAT' => -36000, + 'TJT' => 18000, + 'TKT' => -36000, + 'TMT' => 18000, + 'TOT' => 46800, + 'TPT' => 32400, + 'TRUT' => 36000, + 'TVT' => 43200, + 'TWT' => 28800, + 'UYST' => -7200, + 'UYT' => -10800, + 'UZT' => 18000, + 'VET' => -14400, + 'VLAST' => 39600, + 'VLAT' => 36000, + 'VOST' => 21600, + 'VUT' => 39600, + 'WAST' => 7200, + 'WAT' => 3600, + 'WDT' => 32400, + 'WEST' => 3600, + 'WFT' => 43200, + 'WIB' => 25200, + 'WIT' => 32400, + 'WITA' => 28800, + 'WKST' => 18000, + 'WST' => 28800, + 'YAKST' => 36000, + 'YAKT' => 32400, + 'YAPT' => 36000, + 'YEKST' => 21600, + 'YEKT' => 18000, + ); - case 'MST': - $timezone = -25200; - break; + /** + * Cached PCRE for SimplePie_Parse_Date::$day + * + * @access protected + * @var string + */ + var $day_pcre; - case 'PST': - $timezone = -28800; - break; + /** + * Cached PCRE for SimplePie_Parse_Date::$month + * + * @access protected + * @var string + */ + var $month_pcre; - case 'EDT': - $timezone = -14400; - break; + /** + * Array of user-added callback methods + * + * @access private + * @var array + */ + var $built_in = array(); - case 'CDT': - $timezone = -18000; - break; + /** + * Array of user-added callback methods + * + * @access private + * @var array + */ + var $user = array(); - case 'MDT': - $timezone = -21600; - break; + /** + * Create new SimplePie_Parse_Date object, and set self::day_pcre, + * self::month_pcre, and self::built_in + * + * @access private + */ + function SimplePie_Parse_Date() + { + $this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')'; + $this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')'; - case 'PDT': - $timezone = -25200; - break; - } - } - } - // Timezone difference from UTC - else - { - $timezone = 0; - $timezone += ($match[24] + ('.' . $match[25])) * 3600; - $timezone += ($match[26] + ('.' . $match[27])) * 60; - $timezone = (int) round($timezone); + static $cache; + if (!isset($cache[get_class($this)])) + { + $all_methods = get_class_methods($this); - if ($match[23] == '-') - { - $timezone = -$timezone; - } - } - } - } - if ($timezone === false) - { - $cache[$dt][$rfc822_tz] = mktime($hour, $minute, $second, $month, $day, $year); - } - else + foreach ($all_methods as $method) + { + if (strtolower(substr($method, 0, 5)) === 'date_') { - $cache[$dt][$rfc822_tz] = gmmktime($hour, $minute, $second, $month, $day, $year) - $timezone; + $cache[get_class($this)][] = $method; } } - elseif (($time = strtotime($dt)) > 0) - { - $cache[$dt][$rfc822_tz] = $time; - } - else - { - $cache[$dt][$rfc822_tz] = false; - } } - return $cache[$dt][$rfc822_tz]; + + foreach ($cache[get_class($this)] as $method) + { + $this->built_in[] = $method; + } } /** - * Decode HTML entities + * Get the object * - * @static * @access public - * @param string $data Input data - * @return string Output data */ - function entities_decode($data) + function get() { - $decoder = new SimplePie_Decode_HTML_Entities($data); - return $decoder->parse(); + static $object; + if (!$object) + { + $object = new SimplePie_Parse_Date; + } + return $object; } /** - * Remove RFC822 comments + * Parse a date * - * @author Tomas V.V.Cox - * @author Pierre-Alain Joye - * @author Amir Mohammad Saied - * @copyright 1997-2006 Pierre-Alain Joye,Tomas V.V.Cox,Amir Mohammad Saied - * @license http://www.opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: Validate.php,v 1.104 2006/11/17 16:32:06 amir Exp $ - * @link http://pear.php.net/package/Validate + * @final * @access public - * @param string $data Data to strip comments from - * @return string Comment stripped string + * @param string $date Date to parse + * @return int Timestamp corresponding to date string, or false on failure */ - function uncomment_rfc822($data) - { - if ((version_compare(PHP_VERSION, '4.4.6', '>=') && version_compare(PHP_VERSION, '5', '<')) || version_compare(PHP_VERSION, '5.2.2', '>=')) - { - return $data; - } - else - { - return preg_replace('/((?:(?:\\\\"|[^("])*(?:"(?:[^"\\\\\r]|\\\\.)*"\s*)?)*)((?user as $method) { - return trim($mime); + if (($returned = call_user_func($method, $date)) !== false) + { + return $returned; + } } - else + + foreach ($this->built_in as $method) { - return trim(substr($mime, 0, $pos)); + if (($returned = call_user_func(array(&$this, $method), $date)) !== false) + { + return $returned; + } } + + return false; } - function htmlspecialchars_decode($string, $quote_style) + /** + * Add a callback method to parse a date + * + * @final + * @access public + * @param callback $callback + */ + function add_callback($callback) { - if (function_exists('htmlspecialchars_decode')) + if (is_callable($callback)) { - return htmlspecialchars_decode($string, $quote_style); + $this->user[] = $callback; } else { - return strtr($string, array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style))); + trigger_error('User-supplied function must be a valid callback', E_USER_WARNING); } } - function atom_03_construct_type($attribs) + /** + * Parse a superset of W3C-DTF (allows hyphens and colons to be omitted, as + * well as allowing any of upper or lower case "T", horizontal tabs, or + * spaces to be used as the time seperator (including more than one)) + * + * @access protected + * @return int Timestamp + */ + function date_w3cdtf($date) { - if (isset($attribs['']['mode']) && strtolower(trim($attribs['']['mode']) == 'base64')) - { - $mode = SIMPLEPIE_CONSTRUCT_BASE64; - } - else + static $pcre; + if (!$pcre) { - $mode = SIMPLEPIE_CONSTRUCT_NONE; + $year = '([0-9]{4})'; + $month = $day = $hour = $minute = $second = '([0-9]{2})'; + $decimal = '([0-9]*)'; + $zone = '(?:(Z)|([+\-])([0-9]{1,2}):?([0-9]{1,2}))'; + $pcre = '/^' . $year . '(?:-?' . $month . '(?:-?' . $day . '(?:[Tt\x09\x20]+' . $hour . '(?::?' . $minute . '(?::?' . $second . '(?:.' . $decimal . ')?)?)?' . $zone . ')?)?)?$/'; } - if (isset($attribs['']['type'])) + if (preg_match($pcre, $date, $match)) { - switch (strtolower(trim($attribs['']['type']))) - { - case 'text': - case 'text/plain': - return SIMPLEPIE_CONSTRUCT_TEXT | $mode; + /* + Capturing subpatterns: + 1: Year + 2: Month + 3: Day + 4: Hour + 5: Minute + 6: Second + 7: Decimal fraction of a second + 8: Zulu + 9: Timezone ± + 10: Timezone hours + 11: Timezone minutes + */ - case 'html': - case 'text/html': - return SIMPLEPIE_CONSTRUCT_HTML | $mode; + // Fill in empty matches + for ($i = count($match); $i <= 3; $i++) + { + $match[$i] = '1'; + } - case 'xhtml': - case 'application/xhtml+xml': - return SIMPLEPIE_CONSTRUCT_XHTML | $mode; + for ($i = count($match); $i <= 7; $i++) + { + $match[$i] = '0'; + } - default: - return SIMPLEPIE_CONSTRUCT_NONE | $mode; + // Numeric timezone + if (isset($match[9]) && $match[9] !== '') + { + $timezone = $match[10] * 3600; + $timezone += $match[11] * 60; + if ($match[9] === '-') + { + $timezone = 0 - $timezone; + } + } + else + { + $timezone = 0; } + + // Convert the number of seconds to an integer, taking decimals into account + $second = round($match[6] + $match[7] / pow(10, strlen($match[7]))); + + return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone; } else { - return SIMPLEPIE_CONSTRUCT_TEXT | $mode; + return false; } } - function atom_10_construct_type($attribs) + /** + * Remove RFC822 comments + * + * @access protected + * @param string $data Data to strip comments from + * @return string Comment stripped string + */ + function remove_rfc2822_comments($string) { - if (isset($attribs['']['type'])) - { - switch (strtolower(trim($attribs['']['type']))) - { - case 'text': - return SIMPLEPIE_CONSTRUCT_TEXT; + $string = (string) $string; + $position = 0; + $length = strlen($string); + $depth = 0; - case 'html': - return SIMPLEPIE_CONSTRUCT_HTML; + $output = ''; - case 'xhtml': - return SIMPLEPIE_CONSTRUCT_XHTML; + while ($position < $length && ($pos = strpos($string, '(', $position)) !== false) + { + $output .= substr($string, $position, $pos - $position); + $position = $pos + 1; + if ($string[$pos - 1] !== '\\') + { + $depth++; + while ($depth && $position < $length) + { + $position += strcspn($string, '()', $position); + if ($string[$position - 1] === '\\') + { + $position++; + continue; + } + elseif (isset($string[$position])) + { + switch ($string[$position]) + { + case '(': + $depth++; + break; - default: - return SIMPLEPIE_CONSTRUCT_NONE; + case ')': + $depth--; + break; + } + $position++; + } + else + { + break; + } + } + } + else + { + $output .= '('; } } - return SIMPLEPIE_CONSTRUCT_TEXT; + $output .= substr($string, $position); + + return $output; } - function atom_10_content_construct_type($attribs) + /** + * Parse RFC2822's date format + * + * @access protected + * @return int Timestamp + */ + function date_rfc2822($date) { - if (isset($attribs['']['type'])) + static $pcre; + if (!$pcre) { - $type = strtolower(trim($attribs['']['type'])); - switch ($type) - { - case 'text': - return SIMPLEPIE_CONSTRUCT_TEXT; + $wsp = '[\x09\x20]'; + $fws = '(?:' . $wsp . '+|' . $wsp . '*(?:\x0D\x0A' . $wsp . '+)+)'; + $optional_fws = $fws . '?'; + $day_name = $this->day_pcre; + $month = $this->month_pcre; + $day = '([0-9]{1,2})'; + $hour = $minute = $second = '([0-9]{2})'; + $year = '([0-9]{2,4})'; + $num_zone = '([+\-])([0-9]{2})([0-9]{2})'; + $character_zone = '([A-Z]{1,5})'; + $zone = '(?:' . $num_zone . '|' . $character_zone . ')'; + $pcre = '/(?:' . $optional_fws . $day_name . $optional_fws . ',)?' . $optional_fws . $day . $fws . $month . $fws . $year . $fws . $hour . $optional_fws . ':' . $optional_fws . $minute . '(?:' . $optional_fws . ':' . $optional_fws . $second . ')?' . $fws . $zone . '/i'; + } + if (preg_match($pcre, $this->remove_rfc2822_comments($date), $match)) + { + /* + Capturing subpatterns: + 1: Day name + 2: Day + 3: Month + 4: Year + 5: Hour + 6: Minute + 7: Second + 8: Timezone ± + 9: Timezone hours + 10: Timezone minutes + 11: Alphabetic timezone + */ - case 'html': - return SIMPLEPIE_CONSTRUCT_HTML; + // Find the month number + $month = $this->month[strtolower($match[3])]; - case 'xhtml': - return SIMPLEPIE_CONSTRUCT_XHTML; + // Numeric timezone + if ($match[8] !== '') + { + $timezone = $match[9] * 3600; + $timezone += $match[10] * 60; + if ($match[8] === '-') + { + $timezone = 0 - $timezone; + } } - if (in_array(substr($type, -4), array('+xml', '/xml')) || substr($type, 0, 5) == 'text/') + // Character timezone + elseif (isset($this->timezone[strtoupper($match[11])])) { - return SIMPLEPIE_CONSTRUCT_NONE; + $timezone = $this->timezone[strtoupper($match[11])]; } + // Assume everything else to be -0000 else { - return SIMPLEPIE_CONSTRUCT_BASE64; + $timezone = 0; + } + + // Deal with 2/3 digit years + if ($match[4] < 50) + { + $match[4] += 2000; + } + elseif ($match[4] < 1000) + { + $match[4] += 1900; + } + + // Second is optional, if it is empty set it to zero + if ($match[7] !== '') + { + $second = $match[7]; + } + else + { + $second = 0; } + + return gmmktime($match[5], $match[6], $second, $month, $match[2], $match[4]) - $timezone; } else { - return SIMPLEPIE_CONSTRUCT_TEXT; + return false; } } - function is_isegment_nz_nc($string) + /** + * Parse RFC850's date format + * + * @access protected + * @return int Timestamp + */ + function date_rfc850($date) { - return (bool) preg_match('/^([A-Za-z0-9\-._~\x{A0}-\x{D7FF}\x{F900}-\x{FDCF}\x{FDF0}-\x{FFEF}\x{10000}-\x{1FFFD}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}\x{40000}-\x{4FFFD}\x{50000}-\x{5FFFD}\x{60000}-\x{6FFFD}\x{70000}-\x{7FFFD}\x{80000}-\x{8FFFD}\x{90000}-\x{9FFFD}\x{A0000}-\x{AFFFD}\x{B0000}-\x{BFFFD}\x{C0000}-\x{CFFFD}\x{D0000}-\x{DFFFD}\x{E1000}-\x{EFFFD}!$&\'()*+,;=@]|(%[0-9ABCDEF]{2}))+$/u', $string); - } + static $pcre; + if (!$pcre) + { + $space = '[\x09\x20]+'; + $day_name = $this->day_pcre; + $month = $this->month_pcre; + $day = '([0-9]{1,2})'; + $year = $hour = $minute = $second = '([0-9]{2})'; + $zone = '([A-Z]{1,5})'; + $pcre = '/^' . $day_name . ',' . $space . $day . '-' . $month . '-' . $year . $space . $hour . ':' . $minute . ':' . $second . $space . $zone . '$/i'; + } + if (preg_match($pcre, $date, $match)) + { + /* + Capturing subpatterns: + 1: Day name + 2: Day + 3: Month + 4: Year + 5: Hour + 6: Minute + 7: Second + 8: Timezone + */ - function space_seperated_tokens($string) - { - $space_characters = "\x20\x09\x0A\x0B\x0C\x0D"; - $string_length = strlen($string); + // Month + $month = $this->month[strtolower($match[3])]; - $position = strspn($string, $space_characters); - $tokens = array(); + // Character timezone + if (isset($this->timezone[strtoupper($match[8])])) + { + $timezone = $this->timezone[strtoupper($match[8])]; + } + // Assume everything else to be -0000 + else + { + $timezone = 0; + } - while ($position < $string_length) + // Deal with 2 digit year + if ($match[4] < 50) + { + $match[4] += 2000; + } + else + { + $match[4] += 1900; + } + + return gmmktime($match[5], $match[6], $match[7], $month, $match[2], $match[4]) - $timezone; + } + else { - $len = strcspn($string, $space_characters, $position); - $tokens[] = substr($string, $position, $len); - $position += $len; - $position += strspn($string, $space_characters, $position); + return false; } + } - return $tokens; + /** + * Parse C99's asctime()'s date format + * + * @access protected + * @return int Timestamp + */ + function date_asctime($date) + { + static $pcre; + if (!$pcre) + { + $space = '[\x09\x20]+'; + $wday_name = $this->day_pcre; + $mon_name = $this->month_pcre; + $day = '([0-9]{1,2})'; + $hour = $sec = $min = '([0-9]{2})'; + $year = '([0-9]{4})'; + $terminator = '\x0A?\x00?'; + $pcre = '/^' . $wday_name . $space . $mon_name . $space . $day . $space . $hour . ':' . $min . ':' . $sec . $space . $year . $terminator . '$/i'; + } + if (preg_match($pcre, $date, $match)) + { + /* + Capturing subpatterns: + 1: Day name + 2: Month + 3: Day + 4: Hour + 5: Minute + 6: Second + 7: Year + */ + + $month = $this->month[strtolower($match[2])]; + return gmmktime($match[4], $match[5], $match[6], $month, $match[3], $match[7]); + } + else + { + return false; + } } - function array_unique($array) + /** + * Parse dates using strtotime() + * + * @access protected + * @return int Timestamp + */ + function date_strtotime($date) { - if (version_compare(PHP_VERSION, '5.2', '>=')) + $strtotime = strtotime($date); + if ($strtotime === -1 || $strtotime === false) { - return array_unique($array); + return false; } else { - $array = (array) $array; - $new_array = array(); - $new_array_strings = array(); - foreach ($array as $key => $value) + return $strtotime; + } + } +} + +/** + * Content-type sniffing + * + * @package SimplePie + */ +class SimplePie_Content_Type_Sniffer +{ + /** + * File object + * + * @var SimplePie_File + * @access private + */ + var $file; + + /** + * Create an instance of the class with the input file + * + * @access public + * @param SimplePie_Content_Type_Sniffer $file Input file + */ + function SimplePie_Content_Type_Sniffer($file) + { + $this->file = $file; + } + + /** + * Get the Content-Type of the specified file + * + * @access public + * @return string Actual Content-Type + */ + function get_type() + { + if (isset($this->file->headers['content-type'])) + { + if (!isset($this->file->headers['content-encoding']) + && ($this->file->headers['content-type'] === 'text/plain' + || $this->file->headers['content-type'] === 'text/plain; charset=ISO-8859-1' + || $this->file->headers['content-type'] === 'text/plain; charset=iso-8859-1')) { - if (is_object($value)) - { - if (method_exists($value, '__toString')) - { - $cmp = $value->__toString(); - } - else - { - trigger_error('Object of class ' . get_class($value) . ' could not be converted to string', E_USER_ERROR); - } - } - elseif (is_array($value)) + return $this->text_or_binary(); + } + + if (($pos = strpos($this->file->headers['content-type'], ';')) !== false) + { + $official = substr($this->file->headers['content-type'], 0, $pos); + } + else + { + $official = $this->file->headers['content-type']; + } + $official = strtolower($official); + + if ($official === 'unknown/unknown' + || $official === 'application/unknown') + { + return $this->unknown(); + } + elseif (substr($official, -4) === '+xml' + || $official === 'text/xml' + || $official === 'application/xml') + { + return $official; + } + elseif (substr($official, 0, 6) === 'image/') + { + if ($return = $this->image()) { - $cmp = (string) reset($value); + return $return; } else { - $cmp = (string) $value; - } - if (!in_array($cmp, $new_array_strings)) - { - $new_array[$key] = $value; - $new_array_strings[] = $cmp; + return $official; } } - return $new_array; + elseif ($official === 'text/html') + { + return $this->feed_or_html(); + } + else + { + return $official; + } + } + else + { + return $this->unknown(); } } /** - * Converts a unicode codepoint to a UTF-8 character + * Sniff text or binary * - * @static - * @access public - * @param int $codepoint Unicode codepoint - * @return string UTF-8 character + * @access private + * @return string Actual Content-Type */ - function codepoint_to_utf8($codepoint) + function text_or_binary() { - static $cache = array(); - $codepoint = (int) $codepoint; - if (isset($cache[$codepoint])) + if (substr($this->file->body, 0, 2) === "\xFE\xFF" + || substr($this->file->body, 0, 2) === "\xFF\xFE" + || substr($this->file->body, 0, 4) === "\x00\x00\xFE\xFF" + || substr($this->file->body, 0, 3) === "\xEF\xBB\xBF") { - return $cache[$codepoint]; + return 'text/plain'; } - elseif ($codepoint < 0) + elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body)) { - return $cache[$codepoint] = false; + return 'application/octect-stream'; } - else if ($codepoint <= 0x7f) + else { - return $cache[$codepoint] = chr($codepoint); + return 'text/plain'; } - else if ($codepoint <= 0x7ff) + } + + /** + * Sniff unknown + * + * @access private + * @return string Actual Content-Type + */ + function unknown() + { + $ws = strspn($this->file->body, "\x09\x0A\x0B\x0C\x0D\x20"); + if (strtolower(substr($this->file->body, $ws, 14)) === 'file->body, $ws, 5)) === 'file->body, $ws, 7)) === '> 6)) . chr(0x80 | ($codepoint & 0x3f)); + return 'text/html'; } - else if ($codepoint <= 0xffff) + elseif (substr($this->file->body, 0, 5) === '%PDF-') { - return $cache[$codepoint] = chr(0xe0 | ($codepoint >> 12)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f)); + return 'application/pdf'; } - else if ($codepoint <= 0x10ffff) + elseif (substr($this->file->body, 0, 11) === '%!PS-Adobe-') + { + return 'application/postscript'; + } + elseif (substr($this->file->body, 0, 6) === 'GIF87a' + || substr($this->file->body, 0, 6) === 'GIF89a') + { + return 'image/gif'; + } + elseif (substr($this->file->body, 0, 8) === "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A") + { + return 'image/png'; + } + elseif (substr($this->file->body, 0, 3) === "\xFF\xD8\xFF") + { + return 'image/jpeg'; + } + elseif (substr($this->file->body, 0, 2) === "\x42\x4D") { - return $cache[$codepoint] = chr(0xf0 | ($codepoint >> 18)) . chr(0x80 | (($codepoint >> 12) & 0x3f)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f)); + return 'image/bmp'; } else { - // U+FFFD REPLACEMENT CHARACTER - return $cache[$codepoint] = "\xEF\xBF\xBD"; + return $this->text_or_binary(); } } /** - * Re-implementation of PHP 4.2.0's is_a() + * Sniff images * - * @static - * @access public - * @param object $object The tested object - * @param string $class_name The class name - * @return bool Returns true if the object is of this class or has this class as one of its parents, false otherwise - */ - function is_a($object, $class_name) - { - if (function_exists('is_a')) - { - return is_a($object, $class_name); - } - elseif (!is_object($object)) - { - return false; - } - elseif (get_class($object) == strtolower($class_name)) - { - return true; - } - else - { - return is_subclass_of($object, $class_name); - } - } + * @access private + * @return string Actual Content-Type + */ + function image() + { + if (substr($this->file->body, 0, 6) === 'GIF87a' + || substr($this->file->body, 0, 6) === 'GIF89a') + { + return 'image/gif'; + } + elseif (substr($this->file->body, 0, 8) === "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A") + { + return 'image/png'; + } + elseif (substr($this->file->body, 0, 3) === "\xFF\xD8\xFF") + { + return 'image/jpeg'; + } + elseif (substr($this->file->body, 0, 2) === "\x42\x4D") + { + return 'image/bmp'; + } + else + { + return false; + } + } /** - * Re-implementation of PHP 5's stripos() - * - * Returns the numeric position of the first occurrence of needle in the - * haystack string. + * Sniff HTML * - * @static - * @access string - * @param object $haystack - * @param string $needle Note that the needle may be a string of one or more - * characters. If needle is not a string, it is converted to an integer - * and applied as the ordinal value of a character. - * @param int $offset The optional offset parameter allows you to specify which - * character in haystack to start searching. The position returned is still - * relative to the beginning of haystack. - * @return bool If needle is not found, stripos() will return boolean false. + * @access private + * @return string Actual Content-Type */ - function stripos($haystack, $needle, $offset = 0) - { - if (function_exists('stripos')) - { - return stripos($haystack, $needle, $offset); - } - else - { - if (is_string($needle)) - { - $needle = strtolower($needle); - } - elseif (is_int($needle) || is_bool($needle) || is_double($needle)) - { - $needle = strtolower(chr($needle)); - } - else - { - trigger_error('needle is not a string or an integer', E_USER_WARNING); - return false; - } - - return strpos(strtolower($haystack), $needle, $offset); - } - } + function feed_or_html() + { + $len = strlen($this->file->body); + $pos = strspn($this->file->body, "\x09\x0A\x0D\x20"); + + while ($pos < $len) + { + switch ($this->file->body[$pos]) + { + case "\x09": + case "\x0A": + case "\x0D": + case "\x20": + $pos += strspn($this->file->body, "\x09\x0A\x0D\x20", $pos); + continue 2; + + case '<': + $pos++; + break; + + default: + return 'text/html'; + } + + if (substr($this->file->body, $pos, 3) === '!--') + { + $pos += 3; + if ($pos < $len && ($pos = strpos($this->file->body, '-->', $pos)) !== false) + { + $pos += 3; + } + else + { + return 'text/html'; + } + } + elseif (substr($this->file->body, $pos, 1) === '!') + { + if ($pos < $len && ($pos = strpos($this->file->body, '>', $pos)) !== false) + { + $pos++; + } + else + { + return 'text/html'; + } + } + elseif (substr($this->file->body, $pos, 1) === '?') + { + if ($pos < $len && ($pos = strpos($this->file->body, '?>', $pos)) !== false) + { + $pos += 2; + } + else + { + return 'text/html'; + } + } + elseif (substr($this->file->body, $pos, 3) === 'rss' + || substr($this->file->body, $pos, 7) === 'rdf:RDF') + { + return 'application/rss+xml'; + } + elseif (substr($this->file->body, $pos, 4) === 'feed') + { + return 'application/atom+xml'; + } + else + { + return 'text/html'; + } + } + + return 'text/html'; + } } /** - * Decode HTML Entities - * - * This implements HTML5 as of revision 967 (2007-06-28) + * Parses the XML Declaration * * @package SimplePie */ -class SimplePie_Decode_HTML_Entities +class SimplePie_XML_Declaration_Parser { /** - * Data to be parsed + * XML Version + * + * @access public + * @var string + */ + var $version = '1.0'; + + /** + * Encoding + * + * @access public + * @var string + */ + var $encoding = 'UTF-8'; + + /** + * Standalone + * + * @access public + * @var bool + */ + var $standalone = false; + + /** + * Current state of the state machine * * @access private * @var string */ - var $data = ''; + var $state = 'before_version_name'; /** - * Currently consumed bytes + * Input data * * @access private * @var string */ - var $consumed = ''; + var $data = ''; /** - * Position of the current byte being parsed + * Input data length (to avoid calling strlen() everytime this is needed) * * @access private * @var int */ + var $data_length = 0; + + /** + * Current position of the pointer + * + * @var int + * @access private + */ var $position = 0; /** @@ -9824,169 +13822,250 @@ class SimplePie_Decode_HTML_Entities * @access public * @param string $data Input data */ - function SimplePie_Decode_HTML_Entities($data) + function SimplePie_XML_Declaration_Parser($data) { $this->data = $data; + $this->data_length = strlen($this->data); } /** * Parse the input data * * @access public - * @return string Output data + * @return bool true on success, false on failure */ function parse() { - while (($this->position = strpos($this->data, '&', $this->position)) !== false) + while ($this->state && $this->state !== 'emit' && $this->has_data()) + { + $state = $this->state; + $this->$state(); + } + $this->data = ''; + if ($this->state === 'emit') + { + return true; + } + else + { + $this->version = ''; + $this->encoding = ''; + $this->standalone = ''; + return false; + } + } + + /** + * Check whether there is data beyond the pointer + * + * @access private + * @return bool true if there is further data, false if not + */ + function has_data() + { + return (bool) ($this->position < $this->data_length); + } + + /** + * Advance past any whitespace + * + * @return int Number of whitespace characters passed + */ + function skip_whitespace() + { + $whitespace = strspn($this->data, "\x09\x0A\x0D\x20", $this->position); + $this->position += $whitespace; + return $whitespace; + } + + /** + * Read value + */ + function get_value() + { + $quote = substr($this->data, $this->position, 1); + if ($quote === '"' || $quote === "'") + { + $this->position++; + $len = strcspn($this->data, $quote, $this->position); + if ($this->has_data()) + { + $value = substr($this->data, $this->position, $len); + $this->position += $len + 1; + return $value; + } + } + return false; + } + + function before_version_name() + { + if ($this->skip_whitespace()) + { + $this->state = 'version_name'; + } + else + { + $this->state = false; + } + } + + function version_name() + { + if (substr($this->data, $this->position, 7) === 'version') + { + $this->position += 7; + $this->skip_whitespace(); + $this->state = 'version_equals'; + } + else + { + $this->state = false; + } + } + + function version_equals() + { + if (substr($this->data, $this->position, 1) === '=') + { + $this->position++; + $this->skip_whitespace(); + $this->state = 'version_value'; + } + else + { + $this->state = false; + } + } + + function version_value() + { + if ($this->version = $this->get_value()) + { + $this->skip_whitespace(); + if ($this->has_data()) + { + $this->state = 'encoding_name'; + } + else + { + $this->state = 'emit'; + } + } + else + { + $this->state = false; + } + } + + function encoding_name() + { + if (substr($this->data, $this->position, 8) === 'encoding') + { + $this->position += 8; + $this->skip_whitespace(); + $this->state = 'encoding_equals'; + } + else + { + $this->state = 'standalone_name'; + } + } + + function encoding_equals() + { + if (substr($this->data, $this->position, 1) === '=') { - $this->consume(); - $this->entity(); - $this->consumed = ''; + $this->position++; + $this->skip_whitespace(); + $this->state = 'encoding_value'; + } + else + { + $this->state = false; } - return $this->data; } - /** - * Consume the next byte - * - * @access private - * @return mixed The next byte, or false, if there is no more data - */ - function consume() + function encoding_value() { - if (isset($this->data[$this->position])) + if ($this->encoding = $this->get_value()) { - $this->consumed .= $this->data[$this->position]; - return $this->data[$this->position++]; + $this->skip_whitespace(); + if ($this->has_data()) + { + $this->state = 'standalone_name'; + } + else + { + $this->state = 'emit'; + } } else { - $this->consumed = false; - return false; + $this->state = false; } } - /** - * Consume a range of characters - * - * @access private - * @param string $chars Characters to consume - * @return mixed A series of characters that match the range, or false - */ - function consume_range($chars) + function standalone_name() { - if ($len = strspn($this->data, $chars, $this->position)) + if (substr($this->data, $this->position, 10) === 'standalone') { - $data = substr($this->data, $this->position, $len); - $this->consumed .= $data; - $this->position += $len; - return $data; + $this->position += 10; + $this->skip_whitespace(); + $this->state = 'standalone_equals'; } else { - $this->consumed = false; - return false; + $this->state = false; } } - /** - * Unconsume one byte - * - * @access private - */ - function unconsume() + function standalone_equals() { - $this->consumed = substr($this->consumed, 0, -1); - $this->position--; + if (substr($this->data, $this->position, 1) === '=') + { + $this->position++; + $this->skip_whitespace(); + $this->state = 'standalone_value'; + } + else + { + $this->state = false; + } } - /** - * Decode an entity - * - * @access private - */ - function entity() + function standalone_value() { - switch ($this->consume()) + if ($standalone = $this->get_value()) { - case "\x09": - case "\x0A": - case "\x0B": - case "\x0B": - case "\x0C": - case "\x20": - case "\x3C": - case "\x26": - case false: - break; - - case "\x23": - switch ($this->consume()) - { - case "\x78": - case "\x58": - $range = '0123456789ABCDEFabcdef'; - $hex = true; - break; - - default: - $range = '0123456789'; - $hex = false; - $this->unconsume(); - break; - } - - if ($codepoint = $this->consume_range($range)) - { - static $windows_1252_specials = array(0x0D => "\x0A", 0x80 => "\xE2\x82\xAC", 0x81 => "\xEF\xBF\xBD", 0x82 => "\xE2\x80\x9A", 0x83 => "\xC6\x92", 0x84 => "\xE2\x80\x9E", 0x85 => "\xE2\x80\xA6", 0x86 => "\xE2\x80\xA0", 0x87 => "\xE2\x80\xA1", 0x88 => "\xCB\x86", 0x89 => "\xE2\x80\xB0", 0x8A => "\xC5\xA0", 0x8B => "\xE2\x80\xB9", 0x8C => "\xC5\x92", 0x8D => "\xEF\xBF\xBD", 0x8E => "\xC5\xBD", 0x8F => "\xEF\xBF\xBD", 0x90 => "\xEF\xBF\xBD", 0x91 => "\xE2\x80\x98", 0x92 => "\xE2\x80\x99", 0x93 => "\xE2\x80\x9C", 0x94 => "\xE2\x80\x9D", 0x95 => "\xE2\x80\xA2", 0x96 => "\xE2\x80\x93", 0x97 => "\xE2\x80\x94", 0x98 => "\xCB\x9C", 0x99 => "\xE2\x84\xA2", 0x9A => "\xC5\xA1", 0x9B => "\xE2\x80\xBA", 0x9C => "\xC5\x93", 0x9D => "\xEF\xBF\xBD", 0x9E => "\xC5\xBE", 0x9F => "\xC5\xB8"); - - if ($hex) - { - $codepoint = hexdec($codepoint); - } - else - { - $codepoint = intval($codepoint); - } - - if (isset($windows_1252_specials[$codepoint])) - { - $replacement = $windows_1252_specials[$codepoint]; - } - else - { - $replacement = SimplePie_Misc::codepoint_to_utf8($codepoint); - } - - if ($this->consume() != ';') - { - $this->unconsume(); - } - - $consumed_length = strlen($this->consumed); - $this->data = substr_replace($this->data, $replacement, $this->position - $consumed_length, $consumed_length); - $this->position += strlen($replacement) - $consumed_length; - } - break; + switch ($standalone) + { + case 'yes': + $this->standalone = true; + break; - default: - static $entities = array('Aacute' => "\xC3\x81", 'aacute' => "\xC3\xA1", 'Aacute;' => "\xC3\x81", 'aacute;' => "\xC3\xA1", 'Acirc' => "\xC3\x82", 'acirc' => "\xC3\xA2", 'Acirc;' => "\xC3\x82", 'acirc;' => "\xC3\xA2", 'acute' => "\xC2\xB4", 'acute;' => "\xC2\xB4", 'AElig' => "\xC3\x86", 'aelig' => "\xC3\xA6", 'AElig;' => "\xC3\x86", 'aelig;' => "\xC3\xA6", 'Agrave' => "\xC3\x80", 'agrave' => "\xC3\xA0", 'Agrave;' => "\xC3\x80", 'agrave;' => "\xC3\xA0", 'alefsym;' => "\xE2\x84\xB5", 'Alpha;' => "\xCE\x91", 'alpha;' => "\xCE\xB1", 'AMP' => "\x26", 'amp' => "\x26", 'AMP;' => "\x26", 'amp;' => "\x26", 'and;' => "\xE2\x88\xA7", 'ang;' => "\xE2\x88\xA0", 'apos;' => "\x27", 'Aring' => "\xC3\x85", 'aring' => "\xC3\xA5", 'Aring;' => "\xC3\x85", 'aring;' => "\xC3\xA5", 'asymp;' => "\xE2\x89\x88", 'Atilde' => "\xC3\x83", 'atilde' => "\xC3\xA3", 'Atilde;' => "\xC3\x83", 'atilde;' => "\xC3\xA3", 'Auml' => "\xC3\x84", 'auml' => "\xC3\xA4", 'Auml;' => "\xC3\x84", 'auml;' => "\xC3\xA4", 'bdquo;' => "\xE2\x80\x9E", 'Beta;' => "\xCE\x92", 'beta;' => "\xCE\xB2", 'brvbar' => "\xC2\xA6", 'brvbar;' => "\xC2\xA6", 'bull;' => "\xE2\x80\xA2", 'cap;' => "\xE2\x88\xA9", 'Ccedil' => "\xC3\x87", 'ccedil' => "\xC3\xA7", 'Ccedil;' => "\xC3\x87", 'ccedil;' => "\xC3\xA7", 'cedil' => "\xC2\xB8", 'cedil;' => "\xC2\xB8", 'cent' => "\xC2\xA2", 'cent;' => "\xC2\xA2", 'Chi;' => "\xCE\xA7", 'chi;' => "\xCF\x87", 'circ;' => "\xCB\x86", 'clubs;' => "\xE2\x99\xA3", 'cong;' => "\xE2\x89\x85", 'COPY' => "\xC2\xA9", 'copy' => "\xC2\xA9", 'COPY;' => "\xC2\xA9", 'copy;' => "\xC2\xA9", 'crarr;' => "\xE2\x86\xB5", 'cup;' => "\xE2\x88\xAA", 'curren' => "\xC2\xA4", 'curren;' => "\xC2\xA4", 'Dagger;' => "\xE2\x80\xA1", 'dagger;' => "\xE2\x80\xA0", 'dArr;' => "\xE2\x87\x93", 'darr;' => "\xE2\x86\x93", 'deg' => "\xC2\xB0", 'deg;' => "\xC2\xB0", 'Delta;' => "\xCE\x94", 'delta;' => "\xCE\xB4", 'diams;' => "\xE2\x99\xA6", 'divide' => "\xC3\xB7", 'divide;' => "\xC3\xB7", 'Eacute' => "\xC3\x89", 'eacute' => "\xC3\xA9", 'Eacute;' => "\xC3\x89", 'eacute;' => "\xC3\xA9", 'Ecirc' => "\xC3\x8A", 'ecirc' => "\xC3\xAA", 'Ecirc;' => "\xC3\x8A", 'ecirc;' => "\xC3\xAA", 'Egrave' => "\xC3\x88", 'egrave' => "\xC3\xA8", 'Egrave;' => "\xC3\x88", 'egrave;' => "\xC3\xA8", 'empty;' => "\xE2\x88\x85", 'emsp;' => "\xE2\x80\x83", 'ensp;' => "\xE2\x80\x82", 'Epsilon;' => "\xCE\x95", 'epsilon;' => "\xCE\xB5", 'equiv;' => "\xE2\x89\xA1", 'Eta;' => "\xCE\x97", 'eta;' => "\xCE\xB7", 'ETH' => "\xC3\x90", 'eth' => "\xC3\xB0", 'ETH;' => "\xC3\x90", 'eth;' => "\xC3\xB0", 'Euml' => "\xC3\x8B", 'euml' => "\xC3\xAB", 'Euml;' => "\xC3\x8B", 'euml;' => "\xC3\xAB", 'euro;' => "\xE2\x82\xAC", 'exist;' => "\xE2\x88\x83", 'fnof;' => "\xC6\x92", 'forall;' => "\xE2\x88\x80", 'frac12' => "\xC2\xBD", 'frac12;' => "\xC2\xBD", 'frac14' => "\xC2\xBC", 'frac14;' => "\xC2\xBC", 'frac34' => "\xC2\xBE", 'frac34;' => "\xC2\xBE", 'frasl;' => "\xE2\x81\x84", 'Gamma;' => "\xCE\x93", 'gamma;' => "\xCE\xB3", 'ge;' => "\xE2\x89\xA5", 'GT' => "\x3E", 'gt' => "\x3E", 'GT;' => "\x3E", 'gt;' => "\x3E", 'hArr;' => "\xE2\x87\x94", 'harr;' => "\xE2\x86\x94", 'hearts;' => "\xE2\x99\xA5", 'hellip;' => "\xE2\x80\xA6", 'Iacute' => "\xC3\x8D", 'iacute' => "\xC3\xAD", 'Iacute;' => "\xC3\x8D", 'iacute;' => "\xC3\xAD", 'Icirc' => "\xC3\x8E", 'icirc' => "\xC3\xAE", 'Icirc;' => "\xC3\x8E", 'icirc;' => "\xC3\xAE", 'iexcl' => "\xC2\xA1", 'iexcl;' => "\xC2\xA1", 'Igrave' => "\xC3\x8C", 'igrave' => "\xC3\xAC", 'Igrave;' => "\xC3\x8C", 'igrave;' => "\xC3\xAC", 'image;' => "\xE2\x84\x91", 'infin;' => "\xE2\x88\x9E", 'int;' => "\xE2\x88\xAB", 'Iota;' => "\xCE\x99", 'iota;' => "\xCE\xB9", 'iquest' => "\xC2\xBF", 'iquest;' => "\xC2\xBF", 'isin;' => "\xE2\x88\x88", 'Iuml' => "\xC3\x8F", 'iuml' => "\xC3\xAF", 'Iuml;' => "\xC3\x8F", 'iuml;' => "\xC3\xAF", 'Kappa;' => "\xCE\x9A", 'kappa;' => "\xCE\xBA", 'Lambda;' => "\xCE\x9B", 'lambda;' => "\xCE\xBB", 'lang;' => "\xE3\x80\x88", 'laquo' => "\xC2\xAB", 'laquo;' => "\xC2\xAB", 'lArr;' => "\xE2\x87\x90", 'larr;' => "\xE2\x86\x90", 'lceil;' => "\xE2\x8C\x88", 'ldquo;' => "\xE2\x80\x9C", 'le;' => "\xE2\x89\xA4", 'lfloor;' => "\xE2\x8C\x8A", 'lowast;' => "\xE2\x88\x97", 'loz;' => "\xE2\x97\x8A", 'lrm;' => "\xE2\x80\x8E", 'lsaquo;' => "\xE2\x80\xB9", 'lsquo;' => "\xE2\x80\x98", 'LT' => "\x3C", 'lt' => "\x3C", 'LT;' => "\x3C", 'lt;' => "\x3C", 'macr' => "\xC2\xAF", 'macr;' => "\xC2\xAF", 'mdash;' => "\xE2\x80\x94", 'micro' => "\xC2\xB5", 'micro;' => "\xC2\xB5", 'middot' => "\xC2\xB7", 'middot;' => "\xC2\xB7", 'minus;' => "\xE2\x88\x92", 'Mu;' => "\xCE\x9C", 'mu;' => "\xCE\xBC", 'nabla;' => "\xE2\x88\x87", 'nbsp' => "\xC2\xA0", 'nbsp;' => "\xC2\xA0", 'ndash;' => "\xE2\x80\x93", 'ne;' => "\xE2\x89\xA0", 'ni;' => "\xE2\x88\x8B", 'not' => "\xC2\xAC", 'not;' => "\xC2\xAC", 'notin;' => "\xE2\x88\x89", 'nsub;' => "\xE2\x8A\x84", 'Ntilde' => "\xC3\x91", 'ntilde' => "\xC3\xB1", 'Ntilde;' => "\xC3\x91", 'ntilde;' => "\xC3\xB1", 'Nu;' => "\xCE\x9D", 'nu;' => "\xCE\xBD", 'Oacute' => "\xC3\x93", 'oacute' => "\xC3\xB3", 'Oacute;' => "\xC3\x93", 'oacute;' => "\xC3\xB3", 'Ocirc' => "\xC3\x94", 'ocirc' => "\xC3\xB4", 'Ocirc;' => "\xC3\x94", 'ocirc;' => "\xC3\xB4", 'OElig;' => "\xC5\x92", 'oelig;' => "\xC5\x93", 'Ograve' => "\xC3\x92", 'ograve' => "\xC3\xB2", 'Ograve;' => "\xC3\x92", 'ograve;' => "\xC3\xB2", 'oline;' => "\xE2\x80\xBE", 'Omega;' => "\xCE\xA9", 'omega;' => "\xCF\x89", 'Omicron;' => "\xCE\x9F", 'omicron;' => "\xCE\xBF", 'oplus;' => "\xE2\x8A\x95", 'or;' => "\xE2\x88\xA8", 'ordf' => "\xC2\xAA", 'ordf;' => "\xC2\xAA", 'ordm' => "\xC2\xBA", 'ordm;' => "\xC2\xBA", 'Oslash' => "\xC3\x98", 'oslash' => "\xC3\xB8", 'Oslash;' => "\xC3\x98", 'oslash;' => "\xC3\xB8", 'Otilde' => "\xC3\x95", 'otilde' => "\xC3\xB5", 'Otilde;' => "\xC3\x95", 'otilde;' => "\xC3\xB5", 'otimes;' => "\xE2\x8A\x97", 'Ouml' => "\xC3\x96", 'ouml' => "\xC3\xB6", 'Ouml;' => "\xC3\x96", 'ouml;' => "\xC3\xB6", 'para' => "\xC2\xB6", 'para;' => "\xC2\xB6", 'part;' => "\xE2\x88\x82", 'permil;' => "\xE2\x80\xB0", 'perp;' => "\xE2\x8A\xA5", 'Phi;' => "\xCE\xA6", 'phi;' => "\xCF\x86", 'Pi;' => "\xCE\xA0", 'pi;' => "\xCF\x80", 'piv;' => "\xCF\x96", 'plusmn' => "\xC2\xB1", 'plusmn;' => "\xC2\xB1", 'pound' => "\xC2\xA3", 'pound;' => "\xC2\xA3", 'Prime;' => "\xE2\x80\xB3", 'prime;' => "\xE2\x80\xB2", 'prod;' => "\xE2\x88\x8F", 'prop;' => "\xE2\x88\x9D", 'Psi;' => "\xCE\xA8", 'psi;' => "\xCF\x88", 'QUOT' => "\x22", 'quot' => "\x22", 'QUOT;' => "\x22", 'quot;' => "\x22", 'radic;' => "\xE2\x88\x9A", 'rang;' => "\xE3\x80\x89", 'raquo' => "\xC2\xBB", 'raquo;' => "\xC2\xBB", 'rArr;' => "\xE2\x87\x92", 'rarr;' => "\xE2\x86\x92", 'rceil;' => "\xE2\x8C\x89", 'rdquo;' => "\xE2\x80\x9D", 'real;' => "\xE2\x84\x9C", 'REG' => "\xC2\xAE", 'reg' => "\xC2\xAE", 'REG;' => "\xC2\xAE", 'reg;' => "\xC2\xAE", 'rfloor;' => "\xE2\x8C\x8B", 'Rho;' => "\xCE\xA1", 'rho;' => "\xCF\x81", 'rlm;' => "\xE2\x80\x8F", 'rsaquo;' => "\xE2\x80\xBA", 'rsquo;' => "\xE2\x80\x99", 'sbquo;' => "\xE2\x80\x9A", 'Scaron;' => "\xC5\xA0", 'scaron;' => "\xC5\xA1", 'sdot;' => "\xE2\x8B\x85", 'sect' => "\xC2\xA7", 'sect;' => "\xC2\xA7", 'shy' => "\xC2\xAD", 'shy;' => "\xC2\xAD", 'Sigma;' => "\xCE\xA3", 'sigma;' => "\xCF\x83", 'sigmaf;' => "\xCF\x82", 'sim;' => "\xE2\x88\xBC", 'spades;' => "\xE2\x99\xA0", 'sub;' => "\xE2\x8A\x82", 'sube;' => "\xE2\x8A\x86", 'sum;' => "\xE2\x88\x91", 'sup;' => "\xE2\x8A\x83", 'sup1' => "\xC2\xB9", 'sup1;' => "\xC2\xB9", 'sup2' => "\xC2\xB2", 'sup2;' => "\xC2\xB2", 'sup3' => "\xC2\xB3", 'sup3;' => "\xC2\xB3", 'supe;' => "\xE2\x8A\x87", 'szlig' => "\xC3\x9F", 'szlig;' => "\xC3\x9F", 'Tau;' => "\xCE\xA4", 'tau;' => "\xCF\x84", 'there4;' => "\xE2\x88\xB4", 'Theta;' => "\xCE\x98", 'theta;' => "\xCE\xB8", 'thetasym;' => "\xCF\x91", 'thinsp;' => "\xE2\x80\x89", 'THORN' => "\xC3\x9E", 'thorn' => "\xC3\xBE", 'THORN;' => "\xC3\x9E", 'thorn;' => "\xC3\xBE", 'tilde;' => "\xCB\x9C", 'times' => "\xC3\x97", 'times;' => "\xC3\x97", 'TRADE;' => "\xE2\x84\xA2", 'trade;' => "\xE2\x84\xA2", 'Uacute' => "\xC3\x9A", 'uacute' => "\xC3\xBA", 'Uacute;' => "\xC3\x9A", 'uacute;' => "\xC3\xBA", 'uArr;' => "\xE2\x87\x91", 'uarr;' => "\xE2\x86\x91", 'Ucirc' => "\xC3\x9B", 'ucirc' => "\xC3\xBB", 'Ucirc;' => "\xC3\x9B", 'ucirc;' => "\xC3\xBB", 'Ugrave' => "\xC3\x99", 'ugrave' => "\xC3\xB9", 'Ugrave;' => "\xC3\x99", 'ugrave;' => "\xC3\xB9", 'uml' => "\xC2\xA8", 'uml;' => "\xC2\xA8", 'upsih;' => "\xCF\x92", 'Upsilon;' => "\xCE\xA5", 'upsilon;' => "\xCF\x85", 'Uuml' => "\xC3\x9C", 'uuml' => "\xC3\xBC", 'Uuml;' => "\xC3\x9C", 'uuml;' => "\xC3\xBC", 'weierp;' => "\xE2\x84\x98", 'Xi;' => "\xCE\x9E", 'xi;' => "\xCE\xBE", 'Yacute' => "\xC3\x9D", 'yacute' => "\xC3\xBD", 'Yacute;' => "\xC3\x9D", 'yacute;' => "\xC3\xBD", 'yen' => "\xC2\xA5", 'yen;' => "\xC2\xA5", 'yuml' => "\xC3\xBF", 'Yuml;' => "\xC5\xB8", 'yuml;' => "\xC3\xBF", 'Zeta;' => "\xCE\x96", 'zeta;' => "\xCE\xB6", 'zwj;' => "\xE2\x80\x8D", 'zwnj;' => "\xE2\x80\x8C"); + case 'no': + $this->standalone = false; + break; - for ($i = 0, $match = null; $i < 9 && $this->consume(); $i++) - { - $consumed = substr($this->consumed, 1); - if (isset($entities[$consumed])) - { - $match = $consumed; - } - } + default: + $this->state = false; + return; + } - if ($match !== null) - { - $this->data = substr_replace($this->data, $entities[$match], $this->position - strlen($consumed) - 1, strlen($match) + 1); - $this->position += strlen($entities[$match]) - strlen($consumed) - 1; - } - break; + $this->skip_whitespace(); + if ($this->has_data()) + { + $this->state = false; + } + else + { + $this->state = 'emit'; + } + } + else + { + $this->state = false; } } } @@ -10005,23 +14084,34 @@ class SimplePie_Locator var $base_location = 0; var $checked_feeds = 0; var $max_checked_feeds = 10; + var $content_type_sniffer_class = 'SimplePie_Content_Type_Sniffer'; - function SimplePie_Locator(&$file, $timeout = 10, $useragent = null, $file_class = 'SimplePie_File', $max_checked_feeds = 10) + function SimplePie_Locator(&$file, $timeout = 10, $useragent = null, $file_class = 'SimplePie_File', $max_checked_feeds = 10, $content_type_sniffer_class = 'SimplePie_Content_Type_Sniffer') { $this->file =& $file; $this->file_class = $file_class; $this->useragent = $useragent; $this->timeout = $timeout; $this->max_checked_feeds = $max_checked_feeds; + $this->content_type_sniffer_class = $content_type_sniffer_class; } - function find($type = SIMPLEPIE_LOCATOR_ALL) + function find($type = SIMPLEPIE_LOCATOR_ALL, &$working) { if ($this->is_feed($this->file)) { return $this->file; } + if ($this->file->method & SIMPLEPIE_FILE_SOURCE_REMOTE) + { + $sniffer = new $this->content_type_sniffer_class($this->file); + if ($sniffer->get_type() !== 'text/html') + { + return null; + } + } + if ($type & ~SIMPLEPIE_LOCATOR_NONE) { $this->get_base(); @@ -10029,7 +14119,7 @@ class SimplePie_Locator if ($type & SIMPLEPIE_LOCATOR_AUTODISCOVERY && $working = $this->autodiscovery()) { - return $working; + return $working[0]; } if ($type & (SIMPLEPIE_LOCATOR_LOCAL_EXTENSION | SIMPLEPIE_LOCATOR_LOCAL_BODY | SIMPLEPIE_LOCATOR_REMOTE_EXTENSION | SIMPLEPIE_LOCATOR_REMOTE_BODY) && $this->get_links()) @@ -10059,24 +14149,32 @@ class SimplePie_Locator function is_feed(&$file) { - $body = SimplePie_Misc::strip_comments($file->body); - if (preg_match('/<([^\s:]+:)?(rss|RDF|feed)' . SIMPLEPIE_PCRE_XML_ATTRIBUTE . '>/i', $body)) + if ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE) { - return true; + $sniffer = new $this->content_type_sniffer_class($file); + $sniffed = $sniffer->get_type(); + if (in_array($sniffed, array('application/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml'))) + { + return true; + } + else + { + return false; + } } - return false; - } - - function get_base() - { - if (isset($this->file->headers['content-location'])) + elseif ($file->method & SIMPLEPIE_FILE_SOURCE_LOCAL) { - $this->http_base = SimplePie_Misc::absolutize_url(trim($this->file->headers['content-location']), $this->file->url); + return true; } else { - $this->http_base = $this->file->url; + return false; } + } + + function get_base() + { + $this->http_base = $this->file->url; $this->base = $this->http_base; $elements = SimplePie_Misc::get_element('base', $this->file->body); foreach ($elements as $element) @@ -10094,9 +14192,10 @@ class SimplePie_Locator { $links = array_merge(SimplePie_Misc::get_element('link', $this->file->body), SimplePie_Misc::get_element('a', $this->file->body), SimplePie_Misc::get_element('area', $this->file->body)); $done = array(); + $feeds = array(); foreach ($links as $link) { - if ($this->checked_feeds == $this->max_checked_feeds) + if ($this->checked_feeds === $this->max_checked_feeds) { break; } @@ -10113,19 +14212,26 @@ class SimplePie_Locator $href = SimplePie_Misc::absolutize_url(trim($link['attribs']['href']['data']), $this->http_base); } - if (!in_array($href, $done) && in_array('feed', $rel) || (in_array('alternate', $rel) && !empty($link['attribs']['type']['data']) && in_array(strtolower(SimplePie_Misc::parse_mime($link['attribs']['type']['data'])), array('application/rss+xml', 'application/atom+xml')))) + if (!in_array($href, $done) && in_array('feed', $rel) || (in_array('alternate', $rel) && !empty($link['attribs']['type']['data']) && in_array(strtolower(SimplePie_Misc::parse_mime($link['attribs']['type']['data'])), array('application/rss+xml', 'application/atom+xml'))) && !isset($feeds[$href])) { $this->checked_feeds++; $feed = new $this->file_class($href, $this->timeout, 5, null, $this->useragent); - if ($this->is_feed($feed)) + if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) { - return $feed; + $feeds[$href] = $feed; } } $done[] = $href; } } - return null; + + if (!empty($feeds)) + { + return array_values($feeds); + } + else { + return null; + } } function get_links() @@ -10150,7 +14256,7 @@ class SimplePie_Locator $current = SimplePie_Misc::parse_url($this->file->url); - if ($parsed['authority'] === '' || $parsed['authority'] == $current['authority']) + if ($parsed['authority'] === '' || $parsed['authority'] === $current['authority']) { $this->local[] = $href; } @@ -10174,7 +14280,7 @@ class SimplePie_Locator { foreach ($array as $key => $value) { - if ($this->checked_feeds == $this->max_checked_feeds) + if ($this->checked_feeds === $this->max_checked_feeds) { break; } @@ -10182,7 +14288,7 @@ class SimplePie_Locator { $this->checked_feeds++; $feed = new $this->file_class($value, $this->timeout, 5, null, $this->useragent); - if ($this->is_feed($feed)) + if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) { return $feed; } @@ -10199,7 +14305,7 @@ class SimplePie_Locator { foreach ($array as $key => $value) { - if ($this->checked_feeds == $this->max_checked_feeds) + if ($this->checked_feeds === $this->max_checked_feeds) { break; } @@ -10207,7 +14313,7 @@ class SimplePie_Locator { $this->checked_feeds++; $feed = new $this->file_class($value, $this->timeout, 5, null, $this->useragent); - if ($this->is_feed($feed)) + if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed)) { return $feed; } @@ -10223,14 +14329,12 @@ class SimplePie_Locator class SimplePie_Parser { - var $xml; var $error_code; var $error_string; var $current_line; var $current_column; var $current_byte; var $separator = ' '; - var $feed = false; var $namespace = array(''); var $element = array(''); var $xml_base = array(''); @@ -10241,10 +14345,10 @@ class SimplePie_Parser var $current_xhtml_construct = -1; var $encoding; - function pre_process(&$data, $encoding) + function parse(&$data, $encoding) { // Use UTF-8 if we get passed US-ASCII, as every US-ASCII character is a UTF-8 character - if (strtoupper($encoding) == 'US-ASCII') + if (strtoupper($encoding) === 'US-ASCII') { $this->encoding = 'UTF-8'; } @@ -10255,68 +14359,150 @@ class SimplePie_Parser // Strip BOM: // UTF-32 Big Endian BOM - if (strpos($data, "\x0\x0\xFE\xFF") === 0) + if (substr($data, 0, 4) === "\x00\x00\xFE\xFF") { $data = substr($data, 4); } // UTF-32 Little Endian BOM - elseif (strpos($data, "\xFF\xFE\x0\x0") === 0) + elseif (substr($data, 0, 4) === "\xFF\xFE\x00\x00") { $data = substr($data, 4); } // UTF-16 Big Endian BOM - elseif (strpos($data, "\xFE\xFF") === 0) + elseif (substr($data, 0, 2) === "\xFE\xFF") { $data = substr($data, 2); } // UTF-16 Little Endian BOM - elseif (strpos($data, "\xFF\xFE") === 0) + elseif (substr($data, 0, 2) === "\xFF\xFE") { $data = substr($data, 2); } // UTF-8 BOM - elseif (strpos($data, "\xEF\xBB\xBF") === 0) + elseif (substr($data, 0, 3) === "\xEF\xBB\xBF") { $data = substr($data, 3); } - // Make sure the XML prolog is sane and has the correct encoding - $data = preg_replace("/^<\?xml[\x20\x9\xD\xA]+version([\x20\x9\xD\xA]+)?=([\x20\x9\xD\xA]+)?(\"1.0\"|'1.0'|\"1.1\"|'1.1')([\x20\x9\xD\xA]+encoding([\x20\x9\xD\xA]+)?=([\x20\x9\xD\xA]+)?(\"[A-Za-z][A-Za-z0-9._\-]*\"|'[A-Za-z][A-Za-z0-9._\-]*'))?([\x20\x9\xD\xA]+standalone([\x20\x9\xD\xA]+)?=([\x20\x9\xD\xA]+)?(\"(yes|no)\"|'(yes|no)'))?([\x20\x9\xD\xA]+)?\?>/", '', $data); - $data = "\n" . $data; - } + if (substr($data, 0, 5) === '')) !== false) + { + $declaration = new SimplePie_XML_Declaration_Parser(substr($data, 5, $pos - 5)); + if ($declaration->parse()) + { + $data = substr($data, $pos + 2); + $data = 'version . '" encoding="' . $encoding . '" standalone="' . (($declaration->standalone) ? 'yes' : 'no') . '"?>' . $data; + } + else + { + $this->error_string = 'SimplePie bug! Please report this!'; + return false; + } + } - function parse(&$data) - { $return = true; + static $xml_is_sane = null; + if ($xml_is_sane === null) + { + $parser_check = xml_parser_create(); + xml_parse_into_struct($parser_check, '&', $values); + xml_parser_free($parser_check); + $xml_is_sane = isset($values[0]['value']); + } + // Create the parser - $this->xml = xml_parser_create_ns($this->encoding, $this->separator); - xml_parser_set_option($this->xml, XML_OPTION_SKIP_WHITE, 1); - xml_parser_set_option($this->xml, XML_OPTION_CASE_FOLDING, 0); - xml_set_object($this->xml, $this); - xml_set_character_data_handler($this->xml, 'cdata'); - xml_set_element_handler($this->xml, 'tag_open', 'tag_close'); - - // workound for a bug in PHP/libxml2 as described on http://bugs.simplepie.org/issues/show/101 - $data = str_replace('<', '<', $data); - $data = str_replace('>', '>', $data); - $data = str_replace('&', '&', $data); - $data = str_replace(''', ''', $data); - $data = str_replace('"', '"', $data); - - // Parse! - if (!xml_parse($this->xml, $data, true)) - { - $this->data = null; - $this->error_code = xml_get_error_code($this->xml); - $this->error_string = xml_error_string($this->error_code); - $return = false; - } - $this->current_line = xml_get_current_line_number($this->xml); - $this->current_column = xml_get_current_column_number($this->xml); - $this->current_byte = xml_get_current_byte_index($this->xml); - xml_parser_free($this->xml); - return $return; + if ($xml_is_sane) + { + $xml = xml_parser_create_ns($this->encoding, $this->separator); + xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE, 1); + xml_parser_set_option($xml, XML_OPTION_CASE_FOLDING, 0); + xml_set_object($xml, $this); + xml_set_character_data_handler($xml, 'cdata'); + xml_set_element_handler($xml, 'tag_open', 'tag_close'); + + // Parse! + if (!xml_parse($xml, $data, true)) + { + $this->error_code = xml_get_error_code($xml); + $this->error_string = xml_error_string($this->error_code); + $return = false; + } + $this->current_line = xml_get_current_line_number($xml); + $this->current_column = xml_get_current_column_number($xml); + $this->current_byte = xml_get_current_byte_index($xml); + xml_parser_free($xml); + return $return; + } + else + { + libxml_clear_errors(); + $xml = new XMLReader(); + $xml->xml($data); + while (@$xml->read()) + { + switch ($xml->nodeType) + { + + case constant('XMLReader::END_ELEMENT'): + if ($xml->namespaceURI !== '') + { + $tagName = "{$xml->namespaceURI}{$this->separator}{$xml->localName}"; + } + else + { + $tagName = $xml->localName; + } + $this->tag_close(null, $tagName); + break; + case constant('XMLReader::ELEMENT'): + $empty = $xml->isEmptyElement; + if ($xml->namespaceURI !== '') + { + $tagName = "{$xml->namespaceURI}{$this->separator}{$xml->localName}"; + } + else + { + $tagName = $xml->localName; + } + $attributes = array(); + while ($xml->moveToNextAttribute()) + { + if ($xml->namespaceURI !== '') + { + $attrName = "{$xml->namespaceURI}{$this->separator}{$xml->localName}"; + } + else + { + $attrName = $xml->localName; + } + $attributes[$attrName] = $xml->value; + } + $this->tag_open(null, $tagName, $attributes); + if ($empty) + { + $this->tag_close(null, $tagName); + } + break; + case constant('XMLReader::TEXT'): + + case constant('XMLReader::CDATA'): + $this->cdata(null, $xml->value); + break; + } + } + if ($error = libxml_get_last_error()) + { + $this->error_code = $error->code; + $this->error_string = $error->message; + $this->current_line = $error->line; + $this->current_column = $error->column; + return false; + } + else + { + return true; + } + } } function get_error_code() @@ -10351,27 +14537,6 @@ class SimplePie_Parser function tag_open($parser, $tag, $attributes) { - if ($this->feed === 0) - { - return; - } - elseif ($this->feed == false) - { - if (in_array($tag, array( - SIMPLEPIE_NAMESPACE_ATOM_10 . $this->separator . 'feed', - SIMPLEPIE_NAMESPACE_ATOM_03 . $this->separator . 'feed', - 'rss', - SIMPLEPIE_NAMESPACE_RDF . $this->separator . 'RDF' - ))) - { - $this->feed = 1; - } - } - else - { - $this->feed++; - } - list($this->namespace[], $this->element[]) = $this->split_ns($tag); $attribs = array(); @@ -10404,7 +14569,7 @@ class SimplePie_Parser if ($this->current_xhtml_construct >= 0) { $this->current_xhtml_construct++; - if (end($this->namespace) == SIMPLEPIE_NAMESPACE_XHTML) + if (end($this->namespace) === SIMPLEPIE_NAMESPACE_XHTML) { $this->data['data'] .= '<' . end($this->element); if (isset($attribs[''])) @@ -10422,8 +14587,8 @@ class SimplePie_Parser $this->datas[] =& $this->data; $this->data =& $this->data['child'][end($this->namespace)][end($this->element)][]; $this->data = array('data' => '', 'attribs' => $attribs, 'xml_base' => end($this->xml_base), 'xml_base_explicit' => end($this->xml_base_explicit), 'xml_lang' => end($this->xml_lang)); - if ((end($this->namespace) == SIMPLEPIE_NAMESPACE_ATOM_03 && in_array(end($this->element), array('title', 'tagline', 'copyright', 'info', 'summary', 'content')) && isset($attribs['']['mode']) && $attribs['']['mode'] == 'xml') - || (end($this->namespace) == SIMPLEPIE_NAMESPACE_ATOM_10 && in_array(end($this->element), array('rights', 'subtitle', 'summary', 'info', 'title', 'content')) && isset($attribs['']['type']) && $attribs['']['type'] == 'xhtml')) + if ((end($this->namespace) === SIMPLEPIE_NAMESPACE_ATOM_03 && in_array(end($this->element), array('title', 'tagline', 'copyright', 'info', 'summary', 'content')) && isset($attribs['']['mode']) && $attribs['']['mode'] === 'xml') + || (end($this->namespace) === SIMPLEPIE_NAMESPACE_ATOM_10 && in_array(end($this->element), array('rights', 'subtitle', 'summary', 'info', 'title', 'content')) && isset($attribs['']['type']) && $attribs['']['type'] === 'xhtml')) { $this->current_xhtml_construct = 0; } @@ -10436,7 +14601,7 @@ class SimplePie_Parser { $this->data['data'] .= htmlspecialchars($cdata, ENT_QUOTES, $this->encoding); } - elseif ($this->feed > 1) + else { $this->data['data'] .= $cdata; } @@ -10444,22 +14609,17 @@ class SimplePie_Parser function tag_close($parser, $tag) { - if (!$this->feed) - { - return; - } - if ($this->current_xhtml_construct >= 0) { $this->current_xhtml_construct--; - if (end($this->namespace) == SIMPLEPIE_NAMESPACE_XHTML && !in_array(end($this->element), array('area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param'))) + if (end($this->namespace) === SIMPLEPIE_NAMESPACE_XHTML && !in_array(end($this->element), array('area', 'base', 'basefont', 'br', 'col', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param'))) { $this->data['data'] .= 'element) . '>'; } } - if ($this->current_xhtml_construct == -1) + if ($this->current_xhtml_construct === -1) { - $this->data =& $this->datas[$this->feed]; + $this->data =& $this->datas[count($this->datas) - 1]; array_pop($this->datas); } @@ -10468,7 +14628,6 @@ class SimplePie_Parser array_pop($this->xml_base); array_pop($this->xml_base_explicit); array_pop($this->xml_lang); - $this->feed--; } function split_ns($string) @@ -10483,7 +14642,19 @@ class SimplePie_Parser { $separator_length = strlen($this->separator); } - $cache[$string] = array(substr($string, 0, $pos), substr($string, $pos + $separator_length)); + $namespace = substr($string, 0, $pos); + $local_name = substr($string, $pos + $separator_length); + if (strtolower($namespace) === SIMPLEPIE_NAMESPACE_ITUNES) + { + $namespace = SIMPLEPIE_NAMESPACE_ITUNES; + } + + // Normalize the Media RSS namespaces + if ($namespace === SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG) + { + $namespace = SIMPLEPIE_NAMESPACE_MEDIARSS; + } + $cache[$string] = array($namespace, $local_name); } else { @@ -10495,7 +14666,7 @@ class SimplePie_Parser } /** - * @todo Move to using an actual HTML parser (this will allow tags to be properly stripped, and to switch between HTML and XHTML), this will also make it easier to shortern a string while preserving HTML tags + * @todo Move to using an actual HTML parser (this will allow tags to be properly stripped, and to switch between HTML and XHTML), this will also make it easier to shorten a string while preserving HTML tags */ class SimplePie_Sanitize { @@ -10667,7 +14838,7 @@ class SimplePie_Sanitize { if ($type & SIMPLEPIE_CONSTRUCT_MAYBE_HTML) { - if (preg_match('/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/(\w+)' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>)/', $data)) + if (preg_match('/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>)/', $data)) { $type |= SIMPLEPIE_CONSTRUCT_HTML; } @@ -10722,9 +14893,7 @@ class SimplePie_Sanitize { foreach ($this->strip_attributes as $attrib) { - $data = preg_replace('/ '. trim($attrib) .'=("|")(\w|\s|=|-|:|;|\/|\.|\?|&|,|#|!|\(|\)|\'|'|<|>|\+|{|})*("|")/i', '', $data); - $data = preg_replace('/ '. trim($attrib) .'=(\'|')(\w|\s|=|-|:|;|\/|\.|\?|&|,|#|!|\(|\)|"|"|<|>|\+|{|})*(\'|')/i', '', $data); - $data = preg_replace('/ '. trim($attrib) .'=(\w|\s|=|-|:|;|\/|\.|\?|&|,|#|!|\(|\)|\+|{|})*/i', '', $data); + $data = preg_replace('/(<[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*)' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . trim($attrib) . '(?:\s*=\s*(?:"(?:[^"]*)"|\'(?:[^\']*)\'|(?:[^\x09\x0A\x0B\x0C\x0D\x20\x22\x27\x3E][^\x09\x0A\x0B\x0C\x0D\x20\x3E]*)?))?' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>/', '\1\2\3>', $data); } } @@ -10743,27 +14912,30 @@ class SimplePie_Sanitize { if (isset($img['attribs']['src']['data'])) { - $image_url = $img['attribs']['src']['data']; - $cache = new $this->cache_class($this->cache_location, call_user_func($this->cache_name_function, $image_url), 'spi'); + $image_url = call_user_func($this->cache_name_function, $img['attribs']['src']['data']); + $cache = call_user_func(array($this->cache_class, 'create'), $this->cache_location, $image_url, 'spi'); if ($cache->load()) { - $img['attribs']['src']['data'] = $this->image_handler . rawurlencode($img['attribs']['src']['data']); + $img['attribs']['src']['data'] = $this->image_handler . $image_url; $data = str_replace($img['full'], SimplePie_Misc::element_implode($img), $data); } else { - $file = new $this->file_class($image_url, $this->timeout, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen); + $file = new $this->file_class($img['attribs']['src']['data'], $this->timeout, 5, array('X-FORWARDED-FOR' => $_SERVER['REMOTE_ADDR']), $this->useragent, $this->force_fsockopen); $headers = $file->headers; - if ($file->success && ($file->status_code == 200 || ($file->status_code > 206 && $file->status_code < 300))) + if ($file->success && ($file->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($file->status_code === 200 || $file->status_code > 206 && $file->status_code < 300))) { - if (!$cache->save(array('headers' => $file->headers, 'body' => $file->body))) + if ($cache->save(array('headers' => $file->headers, 'body' => $file->body))) + { + $img['attribs']['src']['data'] = $this->image_handler . $image_url; + $data = str_replace($img['full'], SimplePie_Misc::element_implode($img), $data); + } + else { - trigger_error("$cache->name is not writeable", E_USER_WARNING); + trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING); } - $img['attribs']['src']['data'] = $this->image_handler . rawurlencode($img['attribs']['src']['data']); - $data = str_replace($img['full'], SimplePie_Misc::element_implode($img), $data); } } } @@ -10784,7 +14956,7 @@ class SimplePie_Sanitize $data = htmlspecialchars($data, ENT_COMPAT, 'UTF-8'); } - if ($this->output_encoding != 'UTF-8') + if ($this->output_encoding !== 'UTF-8') { $data = SimplePie_Misc::change_encoding($data, 'UTF-8', $this->output_encoding); } @@ -10806,7 +14978,9 @@ class SimplePie_Sanitize if (isset($element['attribs'][$attribute]['data'])) { $element['attribs'][$attribute]['data'] = SimplePie_Misc::absolutize_url($element['attribs'][$attribute]['data'], $this->base); - $data = str_replace($element['full'], SimplePie_Misc::element_implode($element), $data); + $new_element = SimplePie_Misc::element_implode($element); + $data = str_replace($element['full'], $new_element, $data); + $element['full'] = $new_element; } } } -- cgit v1.2.3 From 54cbb215109303681447f900f2029734cc611fc9 Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Sun, 21 Nov 2010 12:25:23 +0100 Subject: Fixed a call to replace_invalid_with_pct_encoding (fixed upstream after SimplePie1.2) to continue to display correctly feeds with = --- inc/SimplePie.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/SimplePie.php b/inc/SimplePie.php index 1bbc2c0ec..d35443165 100644 --- a/inc/SimplePie.php +++ b/inc/SimplePie.php @@ -12151,7 +12151,7 @@ class SimplePie_IRI } else { - $this->query = $this->replace_invalid_with_pct_encoding($query, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$\'()*+,;:@/?'); + $this->query = $this->replace_invalid_with_pct_encoding($query, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$\'()*+,;:@/?&='); } $this->valid[__FUNCTION__] = true; return true; -- cgit v1.2.3 From 5e1ee188750eca4ed2f13227ede216598c9669c8 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Sun, 7 Nov 2010 02:59:21 +0800 Subject: Fix unicode handling. Suggested by: MQ Signed-off-by: Xin LI --- inc/DifferenceEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index a56fe9f6e..1ff6a9fba 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -890,7 +890,7 @@ class WordLevelDiff extends MappedDiff { } function _split($lines) { - if (!preg_match_all('/ ( [^\S\n]+ | [0-9_A-Za-z\x80-\xff]+ | . ) (?: (?!< \n) [^\S\n])? /xs', + if (!preg_match_all('/ ( [^\S\n]+ | [0-9_A-Za-z\x80-\xff]+ | . ) (?: (?!< \n) [^\S\n])? /xsu', implode("\n", $lines), $m)) { return array(array(''), array('')); } -- cgit v1.2.3 From 98214867894eba512bf47cba3439ccba3968f49b Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 22 Nov 2010 21:12:02 +0100 Subject: Render metadata when needed This changes fundamentally when metadata is rendered. This commit introduces a new cache file for every page that just contains a timestamp and is updated whenever the metadata of that page is rendered. Metadata is rendered when p_get_metadata is called and the last rendering has been before a page, metadata, configuration or renderer update or purge is set like in the xhtml renderer cache. Metadata is no longer automatically rendered when the xhtml renderer cache isn't used but will still be rendered when needed as p_get_metadata is called in the cache. Metadata is also no longer rendered in the indexer script when missing as that is already done by pageinfo() before anything else is done so the indexer script won't be called when there is no metadata file. --- inc/cache.php | 31 ++++++------------------------- inc/parserutils.php | 23 +++++++++++++++++++---- lib/exe/indexer.php | 46 ---------------------------------------------- 3 files changed, 25 insertions(+), 75 deletions(-) diff --git a/inc/cache.php b/inc/cache.php index 571b314cd..ff78e37ae 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -197,18 +197,6 @@ class cache_parser extends cache { } class cache_renderer extends cache_parser { - - function useCache($depends=array()) { - $use = parent::useCache($depends); - - // meta data needs to be kept in step with the cache - if (!$use && isset($this->page)) { - p_set_metadata($this->page,array(),true); - } - - return $use; - } - function _useCache() { global $conf; @@ -251,19 +239,12 @@ class cache_renderer extends cache_parser { if (isset($this->page)) { $metafile = metaFN($this->page,'.meta'); - if (@file_exists($metafile)) { - $files[] = $metafile; // ... the page's own metadata - $files[] = DOKU_INC.'inc/parser/metadata.php'; // ... the metadata renderer - - $valid = p_get_metadata($this->page, 'date valid'); - if (!empty($valid['age'])) { - $this->depends['age'] = isset($this->depends['age']) ? - min($this->depends['age'],$valid['age']) : $valid['age']; - } - - } else { - $this->depends['purge'] = true; // ... purging cache will generate metadata - return; + $files[] = $metafile; // ... the page's own metadata + + $valid = p_get_metadata($this->page, 'date valid'); // for xhtml this will render the metadata if needed + if (!empty($valid['age'])) { + $this->depends['age'] = isset($this->depends['age']) ? + min($this->depends['age'],$valid['age']) : $valid['age']; } } diff --git a/inc/parserutils.php b/inc/parserutils.php index a50e3f4f3..d4f55a6e4 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -221,6 +221,7 @@ function p_get_instructions($text){ * returns the metadata of a page * * @author Esther Brunner + * @author Michael Hamann */ function p_get_metadata($id, $key='', $render=false){ global $ID; @@ -231,10 +232,24 @@ function p_get_metadata($id, $key='', $render=false){ $cache = ($ID == $id); $meta = p_read_metadata($id, $cache); - // 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); - p_save_metadata($id, $meta); + // prevent recursive calls in the cache + static $recursion = false; + if (!$recursion){ + $recursion = true; + + $cachefile = new cache_renderer($id, wikiFN($id), 'metadata'); + + if (page_exists($id) && !$cachefile->useCache()){ + $meta = p_render_metadata($id, $meta); + if (p_save_metadata($id, $meta)) { + // store a timestamp in order to make sure that the cachefile is touched + $cachefile->storeCache(time()); + } else { + msg('Unable to save metadata file. Hint: disk full; file permissions; safe_mode setting.',-1); + } + } + + $recursion = false; } $val = $meta['current']; diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 3fa81715b..bf5bad2e7 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -34,7 +34,6 @@ $tmp = array(); // No event data $evt = new Doku_Event('INDEXER_TASKS_RUN', $tmp); if ($evt->advise_before()) { runIndexer() or - metaUpdate() or runSitemapper() or sendDigest() or runTrimRecentChanges() or @@ -174,51 +173,6 @@ function runIndexer(){ return true; } -/** - * Will render the metadata for the page if not exists yet - * - * This makes sure pages which are created from outside DokuWiki will - * gain their data when viewed for the first time. - */ -function metaUpdate(){ - global $ID; - print "metaUpdate(): started".NL; - - if(!$ID) return false; - $file = metaFN($ID, '.meta'); - echo "meta file: $file".NL; - - // rendering needed? - if (@file_exists($file)) return false; - if (!page_exists($ID)) return false; - - global $conf; - - // gather some additional info from changelog - $info = io_grep($conf['changelog'], - '/^(\d+)\t(\d+\.\d+\.\d+\.\d+)\t'.preg_quote($ID,'/').'\t([^\t]+)\t([^\t\n]+)/', - 0,true); - - $meta = array(); - if(!empty($info)){ - $meta['date']['created'] = $info[0][1]; - foreach($info as $item){ - if($item[4] != '*'){ - $meta['date']['modified'] = $item[1]; - if($item[3]){ - $meta['contributor'][$item[3]] = $item[3]; - } - } - } - } - - $meta = p_render_metadata($ID, $meta); - p_save_metadata($ID, $meta); - - echo "metaUpdate(): finished".NL; - return true; -} - /** * Builds a Google Sitemap of all public pages known to the indexer * -- cgit v1.2.3 From d1d99bb9528b5a7ca62b74e60314288602cbd5a0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 24 Nov 2010 16:33:47 +0100 Subject: check for spl_autoload_register() in install.php See http://forum.dokuwiki.org/post/22120 --- install.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.php b/install.php index ef3c848a9..9b852977f 100644 --- a/install.php +++ b/install.php @@ -460,7 +460,8 @@ function check_functions(){ 'glob header ignore_user_abort ini_get mail mkdir '. 'ob_start opendir parse_ini_file readfile realpath '. 'rename rmdir serialize session_start unlink usleep '. - 'preg_replace file_get_contents htmlspecialchars_decode'); + 'preg_replace file_get_contents htmlspecialchars_decode '. + 'spl_autoload_register'); if (!function_exists('mb_substr')) { $funcs[] = 'utf8_encode'; -- cgit v1.2.3 From 4871414204799044c31aa2764c4b4ca020e2331d Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Fri, 26 Nov 2010 16:54:51 +0100 Subject: Fix for $conf['breadcrumbs'] < 0, FS#2107 This fixes an infinite loop in breadcrumbs() and makes the behaviors in all places where breadcrumbs are used consistent so that non-numeric values, values < 0 and 0 are treated the same way. --- doku.php | 2 +- inc/common.php | 3 +++ inc/template.php | 2 +- lib/tpl/default/main.php | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doku.php b/doku.php index 1303f1ade..ccab843ee 100644 --- a/doku.php +++ b/doku.php @@ -69,7 +69,7 @@ if(!$INFO['exists'] && } //prepare breadcrumbs (initialize a static var) -if ($conf['breadcrumbs']) breadcrumbs(); +if ($conf['breadcrumbs'] > 0) breadcrumbs(); // check upstream checkUpdateMessages(); diff --git a/inc/common.php b/inc/common.php index 18f782788..667846804 100644 --- a/inc/common.php +++ b/inc/common.php @@ -268,6 +268,9 @@ function breadcrumbs(){ global $ACT; global $conf; + // Prevent infinite loop later in this function + if (!is_numeric($conf['breadcrumbs']) || $conf['breadcrumbs'] <= 0) return array(); + //first visit? $crumbs = isset($_SESSION[DOKU_COOKIE]['bc']) ? $_SESSION[DOKU_COOKIE]['bc'] : array(); //we only save on show and existing wiki documents diff --git a/inc/template.php b/inc/template.php index e2ea6e386..b89f7abbc 100644 --- a/inc/template.php +++ b/inc/template.php @@ -690,7 +690,7 @@ function tpl_breadcrumbs($sep='»'){ global $conf; //check if enabled - if(!$conf['breadcrumbs']) return false; + if(!is_numeric($conf['breadcrumbs']) || $conf['breadcrumbs'] <= 0) return false; $crumbs = breadcrumbs(); //setup crumb trace diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index 754a6e482..c1b62f12e 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -68,7 +68,7 @@ if (!defined('DOKU_INC')) die();
- + 0){?> - 0){?> + '; $shown[$hash] = 1; } + + unset($GLOBALS['MSG']); } /** diff --git a/inc/infoutils.php b/inc/infoutils.php index d3c6f2918..5f406aa3e 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -258,7 +258,7 @@ function check(){ * @see html_msgarea */ function msg($message,$lvl=0,$line='',$file=''){ - global $MSG; + global $MSG, $MSG_shown; $errors[-1] = 'error'; $errors[0] = 'info'; $errors[1] = 'success'; @@ -268,7 +268,7 @@ function msg($message,$lvl=0,$line='',$file=''){ if(!isset($MSG)) $MSG = array(); $MSG[]=array('lvl' => $errors[$lvl], 'msg' => $message); - if(headers_sent()){ + if(isset($MSG_shown) || headers_sent()){ if(function_exists('html_msgarea')){ html_msgarea(); }else{ -- cgit v1.2.3 From 517a47eca3a26afd3aedfd47eb372596af4029ae Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 10 Jan 2011 22:47:54 +0100 Subject: Call the indexer for hidden pages This makes sure that the indexer is also called for hidden pages so they aren't missing in the title index and digest subscriptions work for them, too. Hidden pages are already filtered from the search results. --- inc/template.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/inc/template.php b/inc/template.php index 413c3af07..e4c74a714 100644 --- a/inc/template.php +++ b/inc/template.php @@ -988,8 +988,6 @@ function tpl_indexerWebBug(){ global $INFO; if(!$INFO['exists']) return false; - if(isHiddenPage($ID)) return false; //no need to index hidden pages - $p = array(); $p['src'] = DOKU_BASE.'lib/exe/indexer.php?id='.rawurlencode($ID). '&'.time(); -- cgit v1.2.3 From ff725173bf45c47b1ed9778524710cce72b1d42d Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 10 Jan 2011 23:41:43 +0100 Subject: Add define for metadata usage limit in p_get_first_heading This commit introduces a new define P_GET_FIRST_HEADING_METADATA_LIMIT that can be set in preload.php in order to change the limit for how many pages the first heading shall be loaded from metadata in p_get_first_heading. Changing this is probably most interesting for Wikis with a lot of pages where loading the title index costs a significant amount of time and memory. --- inc/parserutils.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/inc/parserutils.php b/inc/parserutils.php index b7359d7ef..6e349e984 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -9,6 +9,13 @@ if(!defined('DOKU_INC')) die('meh.'); +/** + * For how many different pages shall the first heading be loaded from the + * metadata? When this limit is reached the title index is loaded and used for + * all following requests. + */ +if (!defined('P_GET_FIRST_HEADING_METADATA_LIMIT')) define('P_GET_FIRST_HEADING_METADATA_LIMIT', 10); + /** * Returns the parsed Wikitext in XHTML for the given id and revision. * @@ -629,7 +636,7 @@ function & p_get_renderer($mode) { */ function p_get_first_heading($id, $render=true){ // counter how many titles have been requested using p_get_metadata - static $count = 0; + static $count = 1; // the index of all titles, only loaded when many titles are requested static $title_index = null; // cache for titles requested using p_get_metadata @@ -643,7 +650,7 @@ function p_get_first_heading($id, $render=true){ // check if already too many titles have been requested and probably // using the title index is better - if ($count > 10) { + if ($count > P_GET_FIRST_HEADING_METADATA_LIMIT) { if (is_null($title_index)) { $pages = array_map('rtrim', idx_getIndex('page', '')); $titles = array_map('rtrim', idx_getIndex('title', '')); -- cgit v1.2.3 From 9063ec149f164f26e583c635f4fa29dcba23eb90 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Wed, 12 Jan 2011 13:09:23 +0100 Subject: Remove trailing whitespace in buildAttributes output --- inc/common.php | 5 ++++- inc/form.php | 16 ++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/inc/common.php b/inc/common.php index 6ea6d56d8..b4866bccf 100644 --- a/inc/common.php +++ b/inc/common.php @@ -242,13 +242,16 @@ function buildURLparams($params, $sep='&'){ */ function buildAttributes($params,$skipempty=false){ $url = ''; + $white = false; foreach($params as $key => $val){ if($key{0} == '_') continue; if($val === '' && $skipempty) continue; + if($white) $url .= ' '; $url .= $key.'="'; $url .= htmlspecialchars ($val); - $url .= '" '; + $url .= '"'; + $white = true; } return $url; } diff --git a/inc/form.php b/inc/form.php index e614d2f30..30e16b626 100644 --- a/inc/form.php +++ b/inc/form.php @@ -696,7 +696,7 @@ function form_wikitext($attrs) { */ function form_button($attrs) { $p = (!empty($attrs['_action'])) ? 'name="do['.$attrs['_action'].']" ' : ''; - return ''; + return ''; } /** @@ -714,7 +714,7 @@ function form_field($attrs) { if ($attrs['_class']) $s .= ' class="'.$attrs['_class'].'"'; if (!empty($attrs['id'])) $s .= ' for="'.$attrs['id'].'"'; $s .= '>'.$attrs['_text'].''; - $s .= ' '; + $s .= ' '; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; return $s; @@ -734,7 +734,7 @@ function form_fieldright($attrs) { $s = ''; + $s .= '>'; $s .= ' '.$attrs['_text'].''; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; @@ -758,7 +758,7 @@ function form_textfield($attrs) { if ($attrs['_class']) $s .= ' class="'.$attrs['_class'].'"'; if (!empty($attrs['id'])) $s .= ' for="'.$attrs['id'].'"'; $s .= '>'.$attrs['_text'].' '; - $s .= ''; + $s .= ''; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; return $s; @@ -781,7 +781,7 @@ function form_passwordfield($attrs) { if ($attrs['_class']) $s .= ' class="'.$attrs['_class'].'"'; if (!empty($attrs['id'])) $s .= ' for="'.$attrs['id'].'"'; $s .= '>'.$attrs['_text'].' '; - $s .= ''; + $s .= ''; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; return $s; @@ -807,7 +807,7 @@ function form_filefield($attrs) { $s .= ''; $attrs['value'] = $attrs['value'][0]; } - $s .= ''; + $s .= ''; $s .= ' '.$attrs['_text'].''; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; @@ -860,7 +860,7 @@ function form_radiofield($attrs) { $s = ''; + $s .= '>'; $s .= ' '.$attrs['_text'].''; if (preg_match('/(^| )block($| )/', $attrs['_class'])) $s .= '
'; -- cgit v1.2.3 From 283c7183458261e20d78d545539cdaa727ee1590 Mon Sep 17 00:00:00 2001 From: Usama Akkad Date: Wed, 12 Jan 2011 20:13:38 +0100 Subject: Arabic language update --- inc/lang/ar/lang.php | 129 ++++++++++++++------------- lib/plugins/config/lang/ar/lang.php | 9 +- lib/plugins/popularity/lang/ar/lang.php | 5 ++ lib/plugins/popularity/lang/ar/submitted.txt | 3 + 4 files changed, 82 insertions(+), 64 deletions(-) create mode 100644 lib/plugins/popularity/lang/ar/submitted.txt diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index 30095347e..0a2341b97 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -28,7 +28,7 @@ $lang['btn_revs'] = 'نسخ قديمة'; $lang['btn_recent'] = 'أحدث التغييرات'; $lang['btn_upload'] = 'ارفع'; $lang['btn_cancel'] = 'ألغ'; -$lang['btn_index'] = 'فهرس'; +$lang['btn_index'] = 'خريطة موقع'; $lang['btn_secedit'] = 'حرر'; $lang['btn_login'] = 'لج'; $lang['btn_logout'] = 'اخرج'; @@ -54,21 +54,21 @@ $lang['newpass'] = 'كلمة سر جديدة'; $lang['oldpass'] = 'أكد كلمة السر الحالية'; $lang['passchk'] = 'مرة أخرى'; $lang['remember'] = 'تذكرني'; -$lang['fullname'] = 'الاسم الكامل'; +$lang['fullname'] = 'الاسم الحقيقي'; $lang['email'] = 'البريد الإلكتروني'; $lang['register'] = 'سجّل'; $lang['profile'] = 'الملف الشخصي'; $lang['badlogin'] = 'عذرا، اسم المشترك أو كلمة السر غير صحيحة'; $lang['minoredit'] = 'تعديلات طفيفة'; -$lang['draftdate'] = 'حفظ المسودات تلقائيا مشغل'; -$lang['nosecedit'] = 'غُيرت الصفحة في هذه الأثناء، معلومات الفقرة اصبحت قديمة. حُمُلت كل الصفحة بدلا.'; -$lang['regmissing'] = 'عذرا، يجب ملء جميع الحقول'; +$lang['draftdate'] = 'حفظ المسودات آليا مفعّل'; +$lang['nosecedit'] = 'غُيرت الصفحة في هذه الأثناء، معلومات الجزء اصبحت قديمة. حُمُلت كل الصفحة بدلا.'; +$lang['regmissing'] = 'عذرا، عليك ملء جميع الحقول.'; $lang['reguexists'] = 'عذرا، يوجد مشترك بنفس الاسم.'; $lang['regsuccess'] = 'أنشئ المستخدم و ارسلت كلمة السر بالبريد.'; $lang['regsuccess2'] = 'أنشئ المستخدم.'; -$lang['regmailfail'] = 'حدث خطأ فى إرسال رسالة كلمة اسرر. يرجى مراسلة المدير'; -$lang['regbadmail'] = 'يبدو البريد الإلكتروني المعطى غير صحيح، إن كنت تظن أن هذا خطأ، راسل المدير'; -$lang['regbadpass'] = 'كلمتى المرور غير متطابقتين، حاول مرة أخرى.'; +$lang['regmailfail'] = 'حدث خطأ فى إرسال رسالة كلمة السر. يرجى مراسلة المدير!'; +$lang['regbadmail'] = 'يبدو البريد الإلكتروني المعطى غيرَ صحيح، إن كنت تظن أن هذا خطأ، راسل المدير'; +$lang['regbadpass'] = 'كلمتا المرور غير متطابقتين، حاول مرة أخرى.'; $lang['regpwmail'] = 'كلمة مرورك إلى دوكو ويكي'; $lang['reghere'] = 'ليس لديك حساب بعد؟ احصل على واحد'; $lang['profna'] = 'هذه الويكي لا تدعم تعديل الملف الشخصي'; @@ -81,35 +81,35 @@ $lang['resendpwd'] = 'إرسال كلمة مرور'; $lang['resendpwdmissing'] = 'عذراّ، يجب أن تملأ كل الحقول.'; $lang['resendpwdnouser'] = 'عذراً، لم نجد المستخدم هذا في قاعدة بياناتنا.'; $lang['resendpwdbadauth'] = 'عذراً، رمز التفعيل هذا غير صحيح. نأكد من استخدامك كامل وصلة التأكيد.'; -$lang['resendpwdconfirm'] = 'أرسل رابط التأكيد بواسطة البريد.'; -$lang['resendpwdsuccess'] = 'كلمة السرالجديدة إرسلت عبر البريد.'; -$lang['license'] = 'مالم يشر لخلاف ذلك، فإن المحتوى على هذه الويكي مرخص وفق الرخصة التالية:'; +$lang['resendpwdconfirm'] = 'اُرسل رابط التأكيد بواسطة البريد.'; +$lang['resendpwdsuccess'] = 'كلمة السرالجديدة اُرسلت عبر البريد.'; +$lang['license'] = 'مالم يشر لخلاف ذلك، فإن المحتوى في هذه الويكي مرخص وفق الرخصة التالية:'; $lang['licenseok'] = 'لاحظ: بتحرير هذه الصفحة أنت توافق على ترخيص محتواها تحت الرخصة التالية:'; -$lang['searchmedia'] = 'ابحث في اسماء الملفات:'; +$lang['searchmedia'] = 'ابحث في أسماء الملفات:'; $lang['searchmedia_in'] = 'ابحث في %s'; $lang['txt_upload'] = 'اختر ملفاً للرفع'; $lang['txt_filename'] = 'رفع كـ (اختياري)'; $lang['txt_overwrt'] = 'اكتب على ملف موجود'; -$lang['lockedby'] = 'حالياً مقفل بواسطة'; +$lang['lockedby'] = 'مقفلة حاليا لـ'; $lang['lockexpire'] = 'ينتهي القفل في'; $lang['willexpire'] = 'سينتهي قفل تحرير هذه الصفحه خلال دقيقة.\nلتجنب التعارض استخدم زر المعاينة لتصفير مؤقت القفل.'; -$lang['js']['notsavedyet'] = 'التعديلات غير المحفوظة ستفقد. اكمل فعلا؟'; +$lang['js']['notsavedyet'] = 'التعديلات غير المحفوظة ستفقد.'; $lang['js']['searchmedia'] = 'ابحث عن ملفات'; $lang['js']['keepopen'] = 'أبقي النافذة مفتوحة أثناء الاختيار'; $lang['js']['hidedetails'] = 'أخف التفاصيل'; -$lang['js']['mediatitle'] = 'اعدادات الرابط'; +$lang['js']['mediatitle'] = 'إعدادات الرابط'; $lang['js']['mediadisplay'] = 'نوع الرابط'; $lang['js']['mediaalign'] = 'المحاذاة'; $lang['js']['mediasize'] = 'حجم الصورة'; $lang['js']['mediatarget'] = 'هدف الرابط'; -$lang['js']['mediaclose'] = 'اغلق'; +$lang['js']['mediaclose'] = 'أغلق'; $lang['js']['mediainsert'] = 'أدرج'; -$lang['js']['mediadisplayimg'] = 'اظهر الصورة.'; +$lang['js']['mediadisplayimg'] = 'أظهر الصورة.'; $lang['js']['mediadisplaylnk'] = 'اظهر الرابط فقط.'; $lang['js']['mediasmall'] = 'نسخة مصغرة'; $lang['js']['mediamedium'] = 'نسخة متوسطة'; $lang['js']['medialarge'] = 'نسخة كبيرة'; -$lang['js']['mediaoriginal'] = 'نسخة أصلية'; +$lang['js']['mediaoriginal'] = 'النسخة الأصلية'; $lang['js']['medialnk'] = 'الرابط لصفحة التفاصيل'; $lang['js']['mediadirect'] = 'رابط مباشر للأصل'; $lang['js']['medianolnk'] = 'لا رابط'; @@ -118,70 +118,73 @@ $lang['js']['medialeft'] = 'حاذي الصورة إلى اليسار.'; $lang['js']['mediaright'] = 'حاذي الصورة إلى اليمين.'; $lang['js']['mediacenter'] = 'حاذي الصورة إلى الوسط.'; $lang['js']['medianoalign'] = 'لا تستعمل المحاذاة.'; -$lang['js']['nosmblinks'] = 'الروابط لمجلدات ويندوز المشاركة تعمل فقط مع متصفح مايكروسفت Internet Explorer. ما زال بإمكانك قص و لصق الرابط.'; +$lang['js']['nosmblinks'] = 'الروابط لمجلدات مشاركة وندز تعمل فقط مع متصفح مايكروسفت Internet Explorer. +ما زال بإمكانك قص و لصق الرابط.'; $lang['js']['linkwiz'] = 'مرشد الروابط'; $lang['js']['linkto'] = 'الرابط إلى :'; $lang['js']['del_confirm'] = 'هل حقاً تريد حذف البنود المختارة؟'; $lang['js']['mu_btn'] = 'رفع عدة ملفات في وقت واحد'; $lang['rssfailed'] = 'خطأ ما حدث أثناء جلب ملف التغذية:'; $lang['nothingfound'] = 'لا يوجد شيء'; -$lang['mediaselect'] = 'ملفات الوسائط المتعددة'; -$lang['fileupload'] = 'تحميل ملف وسائط متعددة'; -$lang['uploadsucc'] = 'تم التحميل بنجاح'; -$lang['uploadfail'] = 'فشل التحميل، قد يكون الخطأ فى التراخيص؟'; -$lang['uploadwrong'] = 'التحميل ممنوع، نوع الملف مرفوض!'; -$lang['uploadexist'] = 'الملف موجود أصلاً. لم يحدث شيء'; -$lang['uploadbadcontent'] = 'المحتوى المحمّل لم يتطابق مع نوع الملف %s'; -$lang['uploadspam'] = 'التحميل محجوب بواسطة القائمة السوداء لبرنامج تقفي التطفل'; -$lang['uploadxss'] = 'التحميل محجوب لمنع المحتويات الخبيثة'; -$lang['uploadsize'] = 'الملف الذي تم رفعه كبير جدا . ( الحد الأقصى %s )'; -$lang['deletesucc'] = 'تم حذف الملف "%s"'; -$lang['deletefail'] = 'لا يمكن حذف "%s"، تأكد من تراخيصك'; -$lang['mediainuse'] = 'لم يحذف الملف "%s"، مازال موجوداً'; +$lang['mediaselect'] = 'ملفات الوسائط'; +$lang['fileupload'] = 'تحميل ملف وسائط'; +$lang['uploadsucc'] = 'تم الرفع بنجاح'; +$lang['uploadfail'] = 'فشل الرفع، ربما خطأ تراخيص؟'; +$lang['uploadwrong'] = 'الرفع ممنوع، نوع الملف مرفوض!'; +$lang['uploadexist'] = 'الملف موجود أصلاً. لم يُعمل شيئ.'; +$lang['uploadbadcontent'] = 'المحتوى المرفوع لم يطابق لاحقة ملفات %s.'; +$lang['uploadspam'] = 'الرفع محجوب بواسطة القائمة السوداء لبرنامج تقفي التطفل.'; +$lang['uploadxss'] = 'رُفض الرفع للإشتباه بمحتوى ضار.'; +$lang['uploadsize'] = 'الملف المرفوع كان كبيرا جدا . ( الحد %s )'; +$lang['deletesucc'] = 'حُذف الملف "%s".'; +$lang['deletefail'] = 'تعذر حذف "%s" - تأكد من الصلاحيات.'; +$lang['mediainuse'] = 'لم يحذف الملف "%s" - مازال مستخدما.'; $lang['namespaces'] = 'فضاء التسمية'; $lang['mediafiles'] = 'ملفات موجودة في'; +$lang['accessdenied'] = 'لا يسمح لك برؤية هذه الصفحة.'; $lang['mediausage'] = 'استخدم هذه الصياغة للدلالة على هذا الملف:'; -$lang['mediaview'] = 'عرض الملف الأصلي'; +$lang['mediaview'] = 'اعرض الملف الأصلي'; $lang['mediaroot'] = 'الجذر'; -$lang['mediaupload'] = 'تحميل ملف إلى فضاء التسمية هنا. لإنشاء فضاءات تسمية فرعية، أضفها إلى بداية خانة تحميل باسم وافصل بينها باستخدام الفواصل'; -$lang['mediaextchange'] = 'تم تغيير نوع الملف من .%s إلى .%s!'; +$lang['mediaupload'] = 'تحميل ملف إلى فضاء التسمية هنا. لإنشاء فضاءات تسمية فرعية، أضفها إلى بداية خانة تحميل باسم وافصل بينها باستخدام الفاصلتان الرأسيتان.'; +$lang['mediaextchange'] = 'غُيرت لاحقة الملف من .%s إلى .%s!'; $lang['reference'] = 'مراجع لـ'; $lang['ref_inuse'] = 'لا يمكن حذف الملف، لأنه مستخدم من قبل الصفحات التالية:'; -$lang['ref_hidden'] = 'بعض المراجع لصفاحات لا تملك ترخيص برؤيتها'; -$lang['hits'] = 'زوار'; -$lang['quickhits'] = 'صفحات بهذا الاسم'; +$lang['ref_hidden'] = 'بعض المراجع على صفحات لا تملك صلاحيات قراءتها'; +$lang['hits'] = 'مرة'; +$lang['quickhits'] = 'صفحات مطابقة'; $lang['toc'] = 'جدول المحتويات'; $lang['current'] = 'حالي'; $lang['yours'] = 'نسختك'; -$lang['diff'] = 'مقارنة بالنسخة الحالية'; -$lang['diff2'] = 'مقارنة بين النسخ المختارة'; +$lang['diff'] = 'أظهر الاختلافات مع النسخة الحالية'; +$lang['diff2'] = 'أظهر الاختلافات بين النسخ المحددة'; +$lang['difflink'] = 'رابط إلى هذه المقارنة'; $lang['line'] = 'سطر'; $lang['breadcrumb'] = 'أثر'; $lang['youarehere'] = 'أنت هنا'; $lang['lastmod'] = 'آخر تعديل'; $lang['by'] = 'بواسطة'; -$lang['deleted'] = 'تم حذف'; -$lang['created'] = 'تم إنشاء'; -$lang['restored'] = 'عودة لنسخة قديمة'; +$lang['deleted'] = 'حذفت'; +$lang['created'] = 'اُنشئت'; +$lang['restored'] = 'استعيدت نسخة قديمة'; $lang['external_edit'] = 'تحرير خارجي'; $lang['summary'] = 'ملخص التحرير'; $lang['noflash'] = 'تحتاج إلىملحق فلاش أدوبي لعرض هذا المحتوى.'; $lang['download'] = 'نزل Snippet'; $lang['mail_newpage'] = 'إضافة صفحة:'; $lang['mail_changed'] = 'تعديل صفحة:'; -$lang['mail_subscribe_list'] = 'صفحات غيرت في النظاق:'; -$lang['mail_new_user'] = 'مشترك جديد'; -$lang['mail_upload'] = 'تحميل ملف:'; +$lang['mail_subscribe_list'] = 'صفحات غيرت في النطاق:'; +$lang['mail_new_user'] = 'مشترك جديد:'; +$lang['mail_upload'] = 'رفع ملف:'; $lang['qb_bold'] = 'نص عريض'; $lang['qb_italic'] = 'نص مائل'; $lang['qb_underl'] = 'نص مسطر'; $lang['qb_code'] = 'نص برمجي'; $lang['qb_strike'] = 'نص مشطوب'; -$lang['qb_h1'] = 'عنوان مستوى أول'; -$lang['qb_h2'] = 'عنوان مستوى ثاني'; -$lang['qb_h3'] = 'عنوان مستوى ثالث'; -$lang['qb_h4'] = 'عنوان مستوى رابع'; -$lang['qb_h5'] = 'عنوان مستوى خامس'; +$lang['qb_h1'] = 'عنوان مستوى ١'; +$lang['qb_h2'] = 'عنوان مستوى ٢'; +$lang['qb_h3'] = 'عنوان مستوى ٣'; +$lang['qb_h4'] = 'عنوان مستوى ٤'; +$lang['qb_h5'] = 'عنوان مستوى ٥'; $lang['qb_h'] = 'الترويسة'; $lang['qb_hs'] = 'حدد الترويسة'; $lang['qb_hplus'] = 'ترويسة أعلى'; @@ -192,29 +195,29 @@ $lang['qb_extlink'] = 'رابط خارجي'; $lang['qb_hr'] = 'سطر أفقي'; $lang['qb_ol'] = 'بند فى قائمة مرتبة'; $lang['qb_ul'] = 'بند فى قائمة غير مرتبة'; -$lang['qb_media'] = 'إضافة صور و ملفات أخرى'; -$lang['qb_sig'] = 'أضف توقيعك'; -$lang['qb_smileys'] = 'الابتسامات'; +$lang['qb_media'] = 'أضف صورا و ملفات أخرى'; +$lang['qb_sig'] = 'أدرج التوقيع'; +$lang['qb_smileys'] = 'الإبتسامات'; $lang['qb_chars'] = 'محارف خاصة'; $lang['upperns'] = 'انتقل للنطاق الأب'; -$lang['admin_register'] = 'إضافة مشترك جديد'; +$lang['admin_register'] = 'أضف مستخدما جديدا'; $lang['metaedit'] = 'تحرير البيانات الشمولية '; -$lang['metasaveerr'] = 'فشلت عملية كتابة البيانات الشمولية'; -$lang['metasaveok'] = 'تم حفظ البيانت الشمولية'; -$lang['img_backto'] = 'العودة إلى'; +$lang['metasaveerr'] = 'فشلت كتابة البيانات الشمولية'; +$lang['metasaveok'] = 'حُفظت البيانات الشمولية'; +$lang['img_backto'] = 'عودة إلى'; $lang['img_title'] = 'العنوان'; -$lang['img_caption'] = 'تنويه الصورة'; +$lang['img_caption'] = 'وصف'; $lang['img_date'] = 'التاريخ'; $lang['img_fname'] = 'اسم الملف'; $lang['img_fsize'] = 'الحجم'; $lang['img_artist'] = 'المصور'; $lang['img_copyr'] = 'حقوق النسخ'; -$lang['img_format'] = 'صيغ رسومية'; -$lang['img_camera'] = 'آلة التصوير'; +$lang['img_format'] = 'الهيئة'; +$lang['img_camera'] = 'الكمرا'; $lang['img_keywords'] = 'كلمات مفتاحية'; $lang['subscr_subscribe_success'] = 'اضيف %s لقائمة اشتراك %s'; $lang['subscr_subscribe_error'] = 'خطأ في إضافة %s لقائمة اشتراك %s'; -$lang['subscr_subscribe_noaddress'] = 'ليس هناك عنوان مرتبط بدخولك، لا يمكن اضافتك لقائمة الاشتراك'; +$lang['subscr_subscribe_noaddress'] = 'ليس هناك عنوان مرتبط بولوجك، لا يمكن اضافتك لقائمة الاشتراك'; $lang['subscr_unsubscribe_success'] = 'أزيل %s من قائمة اشتراك %s'; $lang['subscr_unsubscribe_error'] = 'خطأ في إزالة %s من قائمة اشتراك %s'; $lang['subscr_already_subscribed'] = '%s مشترك مسبقا في %s'; @@ -224,7 +227,7 @@ $lang['subscr_m_new_header'] = 'أضف اشتراكا'; $lang['subscr_m_current_header'] = 'الاشتراكات الحالية'; $lang['subscr_m_unsubscribe'] = 'ألغ الاشتراك'; $lang['subscr_m_subscribe'] = 'اشترك'; -$lang['subscr_m_receive'] = 'استقبل'; +$lang['subscr_m_receive'] = 'استقبال'; $lang['subscr_style_every'] = 'بريدا على كل تغيير'; $lang['subscr_style_digest'] = 'بريد ملخص عن تغييرات كل صفحة'; $lang['subscr_style_list'] = 'قائمة بالصفحات المتغيرة منذ آخر بريد'; diff --git a/lib/plugins/config/lang/ar/lang.php b/lib/plugins/config/lang/ar/lang.php index 5d0ff76b9..26cc16e5c 100644 --- a/lib/plugins/config/lang/ar/lang.php +++ b/lib/plugins/config/lang/ar/lang.php @@ -116,6 +116,7 @@ $lang['rss_update'] = 'تحديث تلقيم XML (ثوان)'; $lang['recent_days'] = 'مدة إبقاء أحدث التغييرات (ايام)'; $lang['rss_show_summary'] = 'تلقيم XML يظهر ملخصا في العنوان'; $lang['target____wiki'] = 'النافذة الهدف للروابط الداخلية'; +$lang['target____interwiki'] = 'النافذة الهدف للروابط الممرة interwiki'; $lang['target____extern'] = 'النافذة الهدف للروابط الخارجية'; $lang['target____media'] = 'النافذة الهدف لروابط الوسائط'; $lang['target____windows'] = 'النافذة الهدف لروابط النوافذ'; @@ -124,6 +125,7 @@ $lang['proxy____port'] = 'منفذ الوكيل'; $lang['proxy____user'] = 'اسم مستخدم الوكيل'; $lang['proxy____pass'] = 'كلمة سر الوكيل'; $lang['proxy____ssl'] = 'استخدم ssl للاتصال بالوكيل'; +$lang['proxy____except'] = 'تعبير شرطي لمقابلة العناوين التي ستتجاوز البروكسي.'; $lang['safemodehack'] = 'مكّن hack الوضع الآمن'; $lang['ftp____host'] = 'خادوم FTP ل hack الوضع الآمن'; $lang['ftp____port'] = 'منفذ FTP ل hack الوضع الآمن'; @@ -136,6 +138,7 @@ $lang['typography_o_1'] = 'استبعاد الاقتباس المفرد'; $lang['typography_o_2'] = 'تضمين علامات اقتباس مفردة (قد لا يعمل دائما)'; $lang['userewrite_o_0'] = 'لاشيء'; $lang['userewrite_o_1'] = '.htaccess'; +$lang['userewrite_o_2'] = 'دو'; $lang['deaccent_o_0'] = 'معطل'; $lang['gdlib_o_0'] = 'مكتبة GD غير متوفرة'; $lang['gdlib_o_1'] = 'الاصدار 1.x'; @@ -156,11 +159,15 @@ $lang['compression_o_0'] = 'لا شيء'; $lang['compression_o_gz'] = 'gzip'; $lang['compression_o_bz2'] = 'bz2'; $lang['xsendfile_o_0'] = 'لا تستخدم'; +$lang['xsendfile_o_1'] = 'ترويسة lighttpd مملوكة (قبل الاصدار 1.5)'; +$lang['xsendfile_o_2'] = 'ترويسة X-Sendfile قياسية'; +$lang['xsendfile_o_3'] = 'ترويسة Nginx X-Accel-Redirect مملوكة'; $lang['showuseras_o_loginname'] = 'اسم الدخول'; $lang['showuseras_o_username'] = 'اسم المستخدم الكامل'; $lang['showuseras_o_email'] = 'عنوان بريد المستخدم (مبهم تبعا لاعدادات حارس_البريد)'; $lang['showuseras_o_email_link'] = 'عنوان بريد المستخدم كـ مالتيو: رابط'; $lang['useheading_o_0'] = 'أبدا'; -$lang['useheading_o_navigation'] = 'ال'; +$lang['useheading_o_navigation'] = 'التنقل فقط'; $lang['useheading_o_content'] = 'محتوى الويكي فقط'; $lang['useheading_o_1'] = 'دائما'; +$lang['readdircache'] = 'المدة القصوى لتخزين '; diff --git a/lib/plugins/popularity/lang/ar/lang.php b/lib/plugins/popularity/lang/ar/lang.php index c0e7dc6af..b2581294a 100644 --- a/lib/plugins/popularity/lang/ar/lang.php +++ b/lib/plugins/popularity/lang/ar/lang.php @@ -7,3 +7,8 @@ */ $lang['name'] = 'رد الشعبية (قد يأخذ بعض الوقت ليحمل)'; $lang['submit'] = 'أرسل البيانات'; +$lang['autosubmit'] = 'ارسل البيانات آليا كل شهر'; +$lang['submissionFailed'] = 'تعذر إرسال البيانات بسبب الخطأ التالي:'; +$lang['submitDirectly'] = 'يمكنك إرسال البيانات يدويا بارسال النموذج التالي.'; +$lang['autosubmitError'] = 'فشلت آخر محاولة للإرسال، بسبب الخطأ التالي:'; +$lang['lastSent'] = 'أرسلت البيانات'; diff --git a/lib/plugins/popularity/lang/ar/submitted.txt b/lib/plugins/popularity/lang/ar/submitted.txt new file mode 100644 index 000000000..085e3bd98 --- /dev/null +++ b/lib/plugins/popularity/lang/ar/submitted.txt @@ -0,0 +1,3 @@ +====== رد الشعبية ====== + +أرسلت البيانات بنجاح. \ No newline at end of file -- cgit v1.2.3 From 01032c33d1c2c00e6c2f04f0bdd9b9ac0057ded6 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 9 Jan 2011 12:59:58 +0100 Subject: Fix FS#2131 - metaFiles returning unrelated files --- inc/pageutils.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/pageutils.php b/inc/pageutils.php index 5d24c12bb..216debd9a 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -316,9 +316,8 @@ function metaFiles($id){ $name = noNS($id); $ns = getNS($id); $dir = ($ns) ? metaFN($ns,'').'/' : metaFN($ns,''); - $files = array(); - $files = glob($dir.$name.'.*'); - return $files; + $files = glob($dir.$name.'.*', GLOB_MARK); + return $files ? preg_grep('/^'.preg_quote($dir.$name, '/').'\.[^.\/]*$/u', $files) : array(); } /** -- cgit v1.2.3 From ba0267b3bcb1b5feeb707e9a92766c4a619409bb Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Wed, 12 Jan 2011 20:46:36 +0100 Subject: Fix metaFiles for ids that require utf-8 escaping Before this change metaFiles didn't return anything for ids where the part without the namespace needs (utf-8) filename escaping. --- inc/pageutils.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/pageutils.php b/inc/pageutils.php index 216debd9a..cd01dcae7 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -311,13 +311,13 @@ function metaFN($id,$ext){ * returns an array of full paths to all metafiles of a given ID * * @author Esther Brunner + * @author Michael Hamann */ function metaFiles($id){ - $name = noNS($id); - $ns = getNS($id); - $dir = ($ns) ? metaFN($ns,'').'/' : metaFN($ns,''); - $files = glob($dir.$name.'.*', GLOB_MARK); - return $files ? preg_grep('/^'.preg_quote($dir.$name, '/').'\.[^.\/]*$/u', $files) : array(); + $basename = metaFN($id, ''); + $files = glob($basename.'.*', GLOB_MARK); + // filter files like foo.bar.meta when $id == 'foo' + return $files ? preg_grep('/^'.preg_quote($basename, '/').'\.[^.\/]*$/u', $files) : array(); } /** -- cgit v1.2.3 From 4481b2a04e9fbc3dd2696f436d5c2d2a725c8386 Mon Sep 17 00:00:00 2001 From: Tobias Sarnowski Date: Tue, 11 Jan 2011 13:12:26 +0100 Subject: added keep-alive capabilities to the http client The DokuHTTPClient is now able to keep connections alive. This feature is enabled by default. It can be disabled with $client->setKeepAlive(false); and asked with $client->isKeepAlive();. --- inc/HTTPClient.php | 84 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 12 deletions(-) diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 43b00034c..d46200697 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -71,6 +71,7 @@ class DokuHTTPClient extends HTTPClient { * @link http://www.splitbrain.org/go/videodb * @author Andreas Goetz * @author Andreas Gohr + * @author Tobias Sarnowski */ class HTTPClient { //set these if you like @@ -86,6 +87,7 @@ class HTTPClient { var $headers; var $debug; var $start = 0; // for timings + var $keep_alive = true; // keep alive rocks // don't set these, read on error var $error; @@ -108,6 +110,9 @@ class HTTPClient { var $proxy_ssl; //boolean set to true if your proxy needs SSL var $proxy_except; // regexp of URLs to exclude from proxy + // list of kept alive connections + var $connections = array(); + // what we use as boundary on multipart/form-data posts var $boundary = '---DokuWikiHTTPClient--4523452351'; @@ -247,7 +252,11 @@ class HTTPClient { if($uri['port']) $headers['Host'].= ':'.$uri['port']; $headers['User-Agent'] = $this->agent; $headers['Referer'] = $this->referer; - $headers['Connection'] = 'Close'; + if ($this->isKeepAlive()) { + $headers['Connection'] = 'Keep-Alive'; + } else { + $headers['Connection'] = 'Close'; + } if($method == 'POST'){ if(is_array($data)){ if($headers['Content-Type'] == 'multipart/form-data'){ @@ -273,15 +282,29 @@ class HTTPClient { // stop time $start = time(); - // open socket - $socket = @fsockopen($server,$port,$errno, $errstr, $this->timeout); - if (!$socket){ - $this->status = -100; - $this->error = "Could not connect to $server:$port\n$errstr ($errno)"; - return false; + // already connected? + $connectionId = $this->_uniqueConnectionId($server,$port); + $this->_debug('connection pool', $this->connections); + if (isset($this->connections[$connectionId])) { + $this->_debug('reusing connection', $connectionId); + $socket = $this->connections[$connectionId]; + } else { + $this->_debug('opening connection', $connectionId); + // open socket + $socket = @fsockopen($server,$port,$errno, $errstr, $this->timeout); + if (!$socket){ + $this->status = -100; + $this->error = "Could not connect to $server:$port\n$errstr ($errno)"; + return false; + } + //set non blocking + stream_set_blocking($socket,0); + + // keep alive? + if ($this->isKeepAlive()) { + $this->connections[$connectionId] = $socket; + } } - //set non blocking - stream_set_blocking($socket,0); // build request $request = "$method $request_url HTTP/".$this->http.HTTP_NL; @@ -359,6 +382,11 @@ class HTTPClient { // check server status code to follow redirect if($this->status == 301 || $this->status == 302 ){ + // close the connection because we don't handle content retrieval here + // that's the easiest way to clean up the connection + fclose($socket); + unset($this->connections[$connectionId]); + if (empty($this->resp_headers['location'])){ $this->error = 'Redirect but no Location Header found'; return false; @@ -450,9 +478,13 @@ class HTTPClient { } } - // close socket - $status = socket_get_status($socket); - fclose($socket); + if (!$this->isKeepAlive() || + (isset($this->resp_headers['connection']) && $this->resp_headers['connection'] == 'Close')) { + // close socket + $status = socket_get_status($socket); + fclose($socket); + unset($this->connections[$connectionId]); + } // decode gzip if needed if(isset($this->resp_headers['content-encoding']) && @@ -598,6 +630,34 @@ class HTTPClient { return $out; } + /** + * Returns if the keep-alive feature is enabled or not. + * + * @return bool keep-alive enabled + * @author Tobias Sarnowski + */ + function isKeepAlive() { + return $this->keep_alive; + } + + /** + * Set the keep-alive feature status. + * + * @param bool $keep_alive if keep-alive should be enabled or not + * @author Tobias Sarnowski + */ + function setKeepAlive($keep_alive) { + $this->keep_alive = $keep_alive; + } + + /** + * Generates a unique identifier for a connection. + * + * @return string unique identifier + */ + function _uniqueConnectionId($server, $port) { + return "$server:$port"; + } } //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 1415e8b5968a264b9a2aa5bac0d77c2a898c8e81 Mon Sep 17 00:00:00 2001 From: Tobias Sarnowski Date: Tue, 11 Jan 2011 13:18:20 +0100 Subject: keep http connections application wide alive Using a static context for the connection pool allows connection reuse throughout the whole application without additional changes in other places. --- inc/HTTPClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index d46200697..1dbcd6be1 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -111,7 +111,7 @@ class HTTPClient { var $proxy_except; // regexp of URLs to exclude from proxy // list of kept alive connections - var $connections = array(); + static $connections = array(); // what we use as boundary on multipart/form-data posts var $boundary = '---DokuWikiHTTPClient--4523452351'; -- cgit v1.2.3 From a6bacf701037fe4798658f00854ec9c5e6ddf835 Mon Sep 17 00:00:00 2001 From: Tobias Sarnowski Date: Tue, 11 Jan 2011 15:07:46 +0100 Subject: do not reuse errornous http connections As soon as something goes wrong while querying a http server do not reuse the same connection again, its state is undefined. In addition, check the connection for feof() before reusing it. --- inc/HTTPClient.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 1dbcd6be1..53b344b76 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -285,10 +285,12 @@ class HTTPClient { // already connected? $connectionId = $this->_uniqueConnectionId($server,$port); $this->_debug('connection pool', $this->connections); + $socket = null; if (isset($this->connections[$connectionId])) { $this->_debug('reusing connection', $connectionId); $socket = $this->connections[$connectionId]; - } else { + } + if (is_null($socket) || feof($socket)) { $this->_debug('opening connection', $connectionId); // open socket $socket = @fsockopen($server,$port,$errno, $errstr, $this->timeout); @@ -303,6 +305,8 @@ class HTTPClient { // keep alive? if ($this->isKeepAlive()) { $this->connections[$connectionId] = $socket; + } else { + unset($this->connections[$connectionId]); } } @@ -323,6 +327,7 @@ class HTTPClient { if($ret === false){ $this->status = -100; $this->error = 'Failed writing to socket'; + unset($this->connections[$connectionId]); return false; } $written += $ret; @@ -334,10 +339,12 @@ class HTTPClient { if(time()-$start > $this->timeout){ $this->status = -100; $this->error = sprintf('Timeout while reading headers (%.3fs)',$this->_time() - $this->start); + unset($this->connections[$connectionId]); return false; } if(feof($socket)){ $this->error = 'Premature End of File (socket)'; + unset($this->connections[$connectionId]); return false; } $r_headers .= fgets($socket,1024); @@ -350,6 +357,7 @@ class HTTPClient { if($match[1] > $this->max_bodysize){ $this->error = 'Reported content length exceeds allowed response size'; if ($this->max_bodysize_abort) + unset($this->connections[$connectionId]); return false; } } @@ -357,6 +365,7 @@ class HTTPClient { // get Status if (!preg_match('/^HTTP\/(\d\.\d)\s*(\d+).*?\n/', $r_headers, $m)) { $this->error = 'Server returned bad answer'; + unset($this->connections[$connectionId]); return false; } $this->status = $m[2]; @@ -414,6 +423,7 @@ class HTTPClient { // check if headers are as expected if($this->header_regexp && !preg_match($this->header_regexp,$r_headers)){ $this->error = 'The received headers did not match the given regexp'; + unset($this->connections[$connectionId]); return false; } @@ -425,11 +435,13 @@ class HTTPClient { do { if(feof($socket)){ $this->error = 'Premature End of File (socket)'; + unset($this->connections[$connectionId]); return false; } if(time()-$start > $this->timeout){ $this->status = -100; $this->error = sprintf('Timeout while reading chunk (%.3fs)',$this->_time() - $this->start); + unset($this->connections[$connectionId]); return false; } $byte = fread($socket,1); @@ -447,6 +459,7 @@ class HTTPClient { if($this->max_bodysize && strlen($r_body) > $this->max_bodysize){ $this->error = 'Allowed response size exceeded'; if ($this->max_bodysize_abort) + unset($this->connections[$connectionId]); return false; else break; @@ -458,6 +471,7 @@ class HTTPClient { if(time()-$start > $this->timeout){ $this->status = -100; $this->error = sprintf('Timeout while reading response (%.3fs)',$this->_time() - $this->start); + unset($this->connections[$connectionId]); return false; } $r_body .= fread($socket,4096); @@ -465,6 +479,7 @@ class HTTPClient { if($this->max_bodysize && $r_size > $this->max_bodysize){ $this->error = 'Allowed response size exceeded'; if ($this->max_bodysize_abort) + unset($this->connections[$connectionId]); return false; else break; -- cgit v1.2.3 From b58bcfed1ea9c70e4103c91723a19c845b06f300 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 12 Jan 2011 20:55:16 +0100 Subject: removed setter/getter to match coding style since we don't use setter/getters for the other options it doesn't make sense to have them for the keep-alive function --- inc/HTTPClient.php | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 53b344b76..7e5e40ee3 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -252,7 +252,7 @@ class HTTPClient { if($uri['port']) $headers['Host'].= ':'.$uri['port']; $headers['User-Agent'] = $this->agent; $headers['Referer'] = $this->referer; - if ($this->isKeepAlive()) { + if ($this->keep_alive) { $headers['Connection'] = 'Keep-Alive'; } else { $headers['Connection'] = 'Close'; @@ -303,7 +303,7 @@ class HTTPClient { stream_set_blocking($socket,0); // keep alive? - if ($this->isKeepAlive()) { + if ($this->keep_alive) { $this->connections[$connectionId] = $socket; } else { unset($this->connections[$connectionId]); @@ -493,7 +493,7 @@ class HTTPClient { } } - if (!$this->isKeepAlive() || + if (!$this->keep_alive || (isset($this->resp_headers['connection']) && $this->resp_headers['connection'] == 'Close')) { // close socket $status = socket_get_status($socket); @@ -645,26 +645,6 @@ class HTTPClient { return $out; } - /** - * Returns if the keep-alive feature is enabled or not. - * - * @return bool keep-alive enabled - * @author Tobias Sarnowski - */ - function isKeepAlive() { - return $this->keep_alive; - } - - /** - * Set the keep-alive feature status. - * - * @param bool $keep_alive if keep-alive should be enabled or not - * @author Tobias Sarnowski - */ - function setKeepAlive($keep_alive) { - $this->keep_alive = $keep_alive; - } - /** * Generates a unique identifier for a connection. * -- cgit v1.2.3 From 299c3423aa580b305c33bbe62c29123815f5419a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 12 Jan 2011 20:56:13 +0100 Subject: fixed brackets --- inc/HTTPClient.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index 7e5e40ee3..7011aa9ed 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -458,11 +458,12 @@ class HTTPClient { if($this->max_bodysize && strlen($r_body) > $this->max_bodysize){ $this->error = 'Allowed response size exceeded'; - if ($this->max_bodysize_abort) + if ($this->max_bodysize_abort){ unset($this->connections[$connectionId]); return false; - else + } else { break; + } } } while ($chunk_size); }else{ @@ -478,11 +479,12 @@ class HTTPClient { $r_size = strlen($r_body); if($this->max_bodysize && $r_size > $this->max_bodysize){ $this->error = 'Allowed response size exceeded'; - if ($this->max_bodysize_abort) + if ($this->max_bodysize_abort) { unset($this->connections[$connectionId]); return false; - else + } else { break; + } } if(isset($this->resp_headers['content-length']) && !isset($this->resp_headers['transfer-encoding']) && -- cgit v1.2.3 From 99fef1646aeb4e3f5f819e991e4079bce08adc75 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Wed, 12 Jan 2011 23:15:52 +0100 Subject: Hebrew language update --- inc/lang/he/conflict.txt | 6 +- inc/lang/he/denied.txt | 2 +- inc/lang/he/draft.txt | 4 +- inc/lang/he/edit.txt | 2 +- inc/lang/he/editrev.txt | 2 +- inc/lang/he/index.txt | 4 +- inc/lang/he/install.html | 16 +- inc/lang/he/lang.php | 328 +++++++++++++++++-------------- inc/lang/he/mailtext.txt | 20 +- inc/lang/he/password.txt | 8 +- inc/lang/he/pwconfirm.txt | 8 +- inc/lang/he/read.txt | 2 +- inc/lang/he/register.txt | 2 +- inc/lang/he/registermail.txt | 10 +- inc/lang/he/resendpwd.txt | 4 +- inc/lang/he/subscr_digest.txt | 20 ++ inc/lang/he/subscr_single.txt | 22 +++ lib/plugins/acl/lang/he/lang.php | 1 + lib/plugins/config/lang/he/lang.php | 1 + lib/plugins/plugin/lang/he/lang.php | 1 + lib/plugins/popularity/lang/he/lang.php | 1 + lib/plugins/revert/lang/he/lang.php | 1 + lib/plugins/usermanager/lang/he/lang.php | 1 + 23 files changed, 275 insertions(+), 191 deletions(-) create mode 100644 inc/lang/he/subscr_digest.txt create mode 100644 inc/lang/he/subscr_single.txt diff --git a/inc/lang/he/conflict.txt b/inc/lang/he/conflict.txt index d27a78559..c1cccdfcf 100644 --- a/inc/lang/he/conflict.txt +++ b/inc/lang/he/conflict.txt @@ -1,6 +1,6 @@ -====== גירסה עדכנית יותר של הקובץ קיימת ====== +====== קיימת גרסה עדכנית יותר של הקובץ ====== -גירסה עדכנית יותר של המסמך קיימת. דבר זה קורה כאשר משתמש אחר שינה את המסמך בזמן שערכת אותו. +ישנה גרסה עדכנית יותר של המסמך. מצב כזה קורה כאשר משתמש אחר שינה את המסמך בזמן שערכת אותו. -מומלץ לעיין בהבדלים תחת הודעה ולאחר מכן להחליט איזו גירסה כדאי לשמור. לחיצה על הכפתור "שמור" תשמור את הגרסה שערכת. לחיצה על הכפתור "בטל" תשמור את הגרסה הקיימת. +מומלץ לעיין בהבדלים המופיעים להלן ולאחר מכן להחליט איזו גרסה כדאי לשמור. לחיצה על הכפתור "שמירה" תשמור את הגרסה שערכת. לחיצה על הכפתור "ביטול" תשמור את הגרסה הקיימת. diff --git a/inc/lang/he/denied.txt b/inc/lang/he/denied.txt index 34c8417b4..a366fc198 100644 --- a/inc/lang/he/denied.txt +++ b/inc/lang/he/denied.txt @@ -1,3 +1,3 @@ ====== הרשאה נדחתה ====== -אנו מצטערים אך אין לך הרשאות מתאימות כדי להמשיך. אולי שכחת להכנס למערכת? \ No newline at end of file +אנו מצטערים אך אין לך הרשאות מתאימות כדי להמשיך. אולי שכחת להיכנס למערכת? \ No newline at end of file diff --git a/inc/lang/he/draft.txt b/inc/lang/he/draft.txt index 22fc88d9f..b999cc187 100644 --- a/inc/lang/he/draft.txt +++ b/inc/lang/he/draft.txt @@ -1,5 +1,5 @@ -====== נמצא קובץ טיוטא ====== +====== נמצא קובץ טיוטה ====== -העריכה האחרונה שבוצעה לדף זה לא הסתימה כהלכה. DokuWiki שמר באופן אוטומטי טיוטה של העבודה ובאפשרותך להשתמש בה כדי להמשיך את העריכה. ניתן לראות מטה את המידע שנשמר מהפעם הקודמת. +העריכה האחרונה שבוצעה לדף זה לא הושלמה כראוי. DokuWiki שמר באופן אוטומטי טיוטה של העבודה ובאפשרותך להשתמש בה כדי להמשיך את העריכה. ניתן לראות להלן את הנתונים שנשמרו מהפעם הקודמת. באפשרותך לבחור ב//שחזור הטיוטה// של אותה עריכה //מחיקת הטיוטה// או //ביטול// העריכה כליל. \ No newline at end of file diff --git a/inc/lang/he/edit.txt b/inc/lang/he/edit.txt index 4d8151e9d..74b3cefeb 100644 --- a/inc/lang/he/edit.txt +++ b/inc/lang/he/edit.txt @@ -1 +1 @@ -עריכת הדף ולחיצה על הכפתור "שמור" תעדכן את תוכנו. מומלץ לעיין בדף ה[[wiki:syntax|תחביר]] כדי להכיר את כללי תחביר הויקי. נא לערוך את הדף רק אם הדבר נעשה כדי **לשפר** אותו. אם העריכה היא לצורך התנסות מומלץ לבקר ב[[playground:playground|ארגז החול]]. +עריכת הדף ולחיצה על הלחצן "שמירה" תעדכן את תוכנו. מומלץ לעיין בדף ה[[wiki:syntax|תחביר]] כדי להכיר את כללי תחביר הוויקי. נא לערוך את הדף רק אם הדבר נעשה כדי **לשפר** אותו. אם העריכה היא לצורך התנסות מומלץ לבקר ב[[playground:playground|ארגז החול]]. diff --git a/inc/lang/he/editrev.txt b/inc/lang/he/editrev.txt index a6c755cba..e33001fa3 100644 --- a/inc/lang/he/editrev.txt +++ b/inc/lang/he/editrev.txt @@ -1,2 +1,2 @@ -**הדף שנפתח הוא גרסה ישנה של המסמך!** לחיצה על הכפתור "שמור" תשחזר את המסמך לגרסה המוצגת כעת. +**הדף שנפתח הוא גרסה ישנה של המסמך!** לחיצה על הלחצן "שמירה" תשחזר את המסמך לגרסה המוצגת כעת. ---- \ No newline at end of file diff --git a/inc/lang/he/index.txt b/inc/lang/he/index.txt index 12b7a960e..4b0623f84 100644 --- a/inc/lang/he/index.txt +++ b/inc/lang/he/index.txt @@ -1,4 +1,4 @@ -====== אינדקס ====== +====== מפת אתר ====== -זהו קובץ אינדקס הנמצא מעל לכל הדפים המאורגנים ב[[ויקי:דוקיוויקי]]. +זהו קובץ מפת אתר הנמצא מעל לכל הדפים המאורגנים ב[[ויקי:דוקיוויקי]]. diff --git a/inc/lang/he/install.html b/inc/lang/he/install.html index 7831623c9..3832fb5fb 100644 --- a/inc/lang/he/install.html +++ b/inc/lang/he/install.html @@ -1,13 +1,13 @@ -

דף זה מסייע להתקנה וההגדרה הראשוניות של -Dokuwiki. מידע נוסף על מתקין זה זמין בדף +

דף זה מסייע בהליכי ההתקנה וההגדרה הראשוניים של +Dokuwiki. מידע נוסף על תכנית התקנה זו זמין בדף התיעוד שלו.

-

DokuWiki עושה שימוש בקבצים רגילים לשמירת דפי ויקי ומידע נוסף הקשור לדפים אלו (לדוגמה תמונות, רשימות חיפוש, גרסאות קודמות וכו'). -לתפקוד תקין DokuWiki חייב גישה לכתיבה לתיקיות המכילות קבצים אלו. מתקין זה אינו יכול לקבוע הרשאות לתיקיות. -פעולה זו צריכה בד"כ להתבצע ישירות משורת הפקודה או במקרה שנעשה שימוש בשרת מארח דרך FTP או מנשק הניהול של המארח (cPanell לדוגמה).

+

DokuWiki עושה שימוש בקבצים רגילים לשמירת דפי ויקי ומידע נוסף הקשור לדפים אלו (לדוגמה: תמונות, רשימות חיפוש, גרסאות קודמות וכו׳). +לצורך תפקוד תקין DokuWiki חייב גישה לכתיבה לתיקיות המכילות קבצים אלו. תכנית התקנה זו אינה יכולה להגדיר הרשאות לתיקיות. +פעולה זו צריכה בד״כ להתבצע ישירות משורת הפקודה או במקרה שנעשה שימוש בשרת מארח דרך FTP או מנשק הניהול של המארח (cPanell לדוגמה).

-

מתקין זה יגדיר את תצורת ה-ACL ב-DokuWiki שלך +

מתקין זה יגדיר את תצורת ה־ACL ב-DokuWiki שלך , זה בתורו מאפשר גישת מנהל לתפריט הניהול של DokuWiki כדי להתקין הרחבות, לנהל משתמשים, לנהל גישות לדפי ויקי ושינויים בהגדרות התצורה. -אין הוא הכרחי לתפקוד DokuWiki אך הוא יהפוך את Dokuwiki קל יותר לניהול.

+אין הוא הכרחי לתפקוד DokuWiki אך הוא יהפוך את Dokuwiki לפשוט יותר לניהול.

-

על משתמשים מנוסים או כאלו עם דרישות מיוחדות להתקנה להשתמש בקישורים אלו לפרטים בנוגע להוראות התקנה והגדרות תצורה.

+

על משתמשים מנוסים או כאלו עם דרישות מיוחדות להתקנה להשתמש בקישורים אלו לפרטים בנוגע להוראות התקנה ולהגדרות תצורה.

diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php index a411764d2..47310d4d1 100644 --- a/inc/lang/he/lang.php +++ b/inc/lang/he/lang.php @@ -10,6 +10,7 @@ * @author Dotan Kamber * @author Moshe Kaplan * @author Yaron Yogev + * @author Yaron Shahrabani */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'rtl'; @@ -18,132 +19,153 @@ $lang['doublequoteclosing'] = '”'; $lang['singlequoteopening'] = '‘'; $lang['singlequoteclosing'] = '’'; $lang['apostrophe'] = '\''; -$lang['btn_edit'] = 'עריכה'; -$lang['btn_source'] = 'הצג את מקור הדף'; -$lang['btn_show'] = 'הצג דף'; +$lang['btn_edit'] = 'עריכת דף זה'; +$lang['btn_source'] = 'הצגת מקור הדף'; +$lang['btn_show'] = 'הצגת דף'; $lang['btn_create'] = 'יצירת דף'; -$lang['btn_search'] = 'חפש'; -$lang['btn_save'] = 'שמור'; +$lang['btn_search'] = 'חיפוש'; +$lang['btn_save'] = 'שמירה'; $lang['btn_preview'] = 'תצוגה מקדימה'; -$lang['btn_top'] = 'חזור למעלה'; -$lang['btn_newer'] = '<< יותר חדש'; -$lang['btn_older'] = 'פחות חדש >>'; +$lang['btn_top'] = 'חזרה למעלה'; +$lang['btn_newer'] = '<< חדש יותר'; +$lang['btn_older'] = 'פחות חדש >>'; $lang['btn_revs'] = 'גרסאות קודמות'; $lang['btn_recent'] = 'שינויים אחרונים'; -$lang['btn_upload'] = 'העלה'; -$lang['btn_cancel'] = 'בטל'; -$lang['btn_index'] = 'אינדקס'; +$lang['btn_upload'] = 'העלאה'; +$lang['btn_cancel'] = 'ביטול'; +$lang['btn_index'] = 'מפת האתר'; $lang['btn_secedit'] = 'עריכה'; $lang['btn_login'] = 'כניסה'; $lang['btn_logout'] = 'יציאה'; -$lang['btn_admin'] = 'מנהל'; -$lang['btn_update'] = 'עדכן'; -$lang['btn_delete'] = 'מחק'; -$lang['btn_back'] = 'חזור'; +$lang['btn_admin'] = 'ניהול'; +$lang['btn_update'] = 'עדכון'; +$lang['btn_delete'] = 'מחיקה'; +$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_backtomedia'] = 'חזרה לבחירת קובץ מדיה'; +$lang['btn_subscribe'] = 'מעקב אחרי שינוים'; +$lang['btn_profile'] = 'עדכון הפרופיל'; $lang['btn_reset'] = 'איפוס'; -$lang['btn_resendpwd'] = 'שלח סיסמה חדשה'; +$lang['btn_resendpwd'] = 'שליחת ססמה חדשה'; $lang['btn_draft'] = 'עריכת טיוטה'; $lang['btn_recover'] = 'שחזור טיוטה'; $lang['btn_draftdel'] = 'מחיקת טיוטה'; -$lang['btn_revert'] = 'שחזר'; -$lang['loggedinas'] = 'רשום כ-'; +$lang['btn_revert'] = 'שחזור'; +$lang['loggedinas'] = 'נכנסת בשם'; $lang['user'] = 'שם משתמש'; -$lang['pass'] = 'סיסמה'; -$lang['newpass'] = 'סיסמה חדשה'; -$lang['oldpass'] = 'אשר את הסיסמה הנוכחית'; -$lang['passchk'] = 'שוב'; -$lang['remember'] = 'זכור אותי'; +$lang['pass'] = 'ססמה'; +$lang['newpass'] = 'ססמה חדשה'; +$lang['oldpass'] = 'אישור הססמה הנוכחית'; +$lang['passchk'] = 'פעם נוספת'; +$lang['remember'] = 'שמירת הפרטים שלי'; $lang['fullname'] = 'שם מלא'; -$lang['email'] = 'דוא"ל'; +$lang['email'] = 'דוא״ל'; $lang['register'] = 'הרשמה'; -$lang['profile'] = 'פרופיל'; -$lang['badlogin'] = 'סליחה, שם המשתמש או הסיסמה שגויים'; -$lang['minoredit'] = 'שינוים מינוריים'; -$lang['draftdate'] = 'טיוטה נשמרה ב-'; +$lang['profile'] = 'פרופיל המשתמש'; +$lang['badlogin'] = 'שם המשתמש או הססמה שגויים, עמך הסליחה'; +$lang['minoredit'] = 'שינוים מזעריים'; +$lang['draftdate'] = 'הטיוטה נשמרה אוטומטית ב־'; $lang['nosecedit'] = 'הדף השתנה בינתיים, הקטע שערכת אינו מעודכן - העמוד כולו נטען במקום זאת.'; -$lang['regmissing'] = 'סליחה, עליך למלא את כל השדות'; -$lang['reguexists'] = 'סליחה, משתמש בשם זה כבר נרשם'; -$lang['regsuccess'] = 'הרשמה הצליחה, המשתמש נרשם והודעה נשלחה בדואר'; -$lang['regsuccess2'] = 'הרשמה הצליחה, המשתמש נרשם.'; -$lang['regmailfail'] = 'שליחת הודעת הדואר כשלה, נא ליצור קשר עם מנהל האתר'; -$lang['regbadmail'] = 'כתובת דואר כנראה לא תקפה, אם לא כך היא יש ליצור קשר עם מנהל האתר'; -$lang['regbadpass'] = 'שתי הסיסמות הן לא זהות, נא לנסות שוב'; -$lang['regpwmail'] = 'סיסמת הדוקוויקי שלך'; -$lang['reghere'] = 'עדיין ללא שם-משתמש? ההרשמה כאן'; +$lang['regmissing'] = 'עליך למלא את כל השדות, עמך הסליחה.'; +$lang['reguexists'] = 'משתמש בשם זה כבר נרשם, עמך הסליחה.'; +$lang['regsuccess'] = 'ההרשמה הצליחה, המשתמש נרשם והודעה נשלחה בדוא״ל.'; +$lang['regsuccess2'] = 'ההרשמה הצליחה, המשתמש נוצר.'; +$lang['regmailfail'] = 'שליחת הודעת הדוא״ל כשלה, נא ליצור קשר עם מנהל האתר!'; +$lang['regbadmail'] = 'יתכן כי כתובת הדוא״ל אינה תקפה, אם לא כך הדבר ליצור קשר עם מנהל האתר'; +$lang['regbadpass'] = 'שתי הססמאות אינן זהות זו לזו, נא לנסות שוב.'; +$lang['regpwmail'] = 'ססמת הדוקוויקי שלך'; +$lang['reghere'] = 'עדיין אין לך חשבון? ההרשמה כאן'; $lang['profna'] = 'בוויקי הזה לא ניתן לשנות פרופיל'; -$lang['profnochange'] = 'אין שינוים, פרופיל לא עודכן'; -$lang['profnoempty'] = 'שם וכתובת דוא"ל לא יכולים להיות ריקים'; -$lang['profchanged'] = 'פרופיל עודכן בהצלחה'; -$lang['pwdforget'] = 'שכחת סיסמה? קבל חדשה'; -$lang['resendna'] = 'הוויקי הזה לא תומך בחידוש סיסמה'; -$lang['resendpwd'] = 'שלח סיסמה חדשה עבור'; -$lang['resendpwdmissing'] = 'סליחה, עליך למלא את כל השדות'; -$lang['resendpwdnouser'] = 'סליחה, משתמש בשם זה לא נמצא'; -$lang['resendpwdbadauth'] = 'סליחה, קוד אימות זה אינו תקף. יש לודא כי נעשה שימוש במלוא קישור האימות.'; -$lang['resendpwdconfirm'] = 'קישור אימות נשלח בדוא"ל.'; -$lang['resendpwdsuccess'] = 'סיסמה חדשה נשלחה בדואר'; -$lang['license'] = 'למעט מקרים בהם צוין אחרת, התוכן בוויקי זה זמין לפי הרשיון הבא:'; -$lang['licenseok'] = 'שים לב: עריכת דף זה מהווה הסכמה מצידך להצגת התוכן שהוספת לפי הרשיון הבא:'; -$lang['searchmedia'] = 'חפש שם קובץ:'; -$lang['txt_upload'] = 'בחר קובץ להעלות'; -$lang['txt_filename'] = 'הכנס שם לוויקי (בחירה)'; -$lang['txt_overwrt'] = 'לכתוב במקום קובץ קיים'; +$lang['profnochange'] = 'אין שינויים, הפרופיל לא עודכן'; +$lang['profnoempty'] = 'השם וכתובת הדוא״ל לא יכולים להיות ריקים'; +$lang['profchanged'] = 'הפרופיל עודכן בהצלחה'; +$lang['pwdforget'] = 'שכחת את הססמה שלך? ניתן לקבל חדשה'; +$lang['resendna'] = 'הוויקי הזה אינו תומך בחידוש ססמה'; +$lang['resendpwd'] = 'שליחת ססמה חדשה עבור'; +$lang['resendpwdmissing'] = 'עליך למלא את כל השדות, עמך הסליחה.'; +$lang['resendpwdnouser'] = 'משתמש בשם זה לא נמצא במסד הנתונים, עמך הסליחה.'; +$lang['resendpwdbadauth'] = 'קוד אימות זה אינו תקף. יש לוודא כי נעשה שימוש בקישור האימות המלא, עמך הסליחה.'; +$lang['resendpwdconfirm'] = 'נשלח קישור לאימות נשלח בדוא״ל.'; +$lang['resendpwdsuccess'] = 'נשלחה ססמה חדשה בדוא״ל'; +$lang['license'] = 'למעט מקרים בהם צוין אחרת, התוכן בוויקי זה זמין לפי הרישיון הבא:'; +$lang['licenseok'] = 'נא לשים לב: עריכת דף זה מהווה הסכמה מצדך להצגת התוכן שהוספת בהתאם הרישיון הבא:'; +$lang['searchmedia'] = 'חיפוש שם קובץ:'; +$lang['searchmedia_in'] = 'חיפוש תחת %s'; +$lang['txt_upload'] = 'בחירת קובץ להעלות'; +$lang['txt_filename'] = 'העלאה בשם (נתון לבחירה)'; +$lang['txt_overwrt'] = 'שכתוב על קובץ קיים'; $lang['lockedby'] = 'נעול על ידי'; -$lang['lockexpire'] = 'נעילה פגה'; -$lang['willexpire'] = 'נעילה תחלוף עוד זמן קצר. \nלמניעת התנגשויות יש להשתמש בכפתור הרענון מטה כדי לאתחל את הנעילה שנית'; -$lang['js']['notsavedyet'] = "קיימים שינויים שטרם נשמרו ואשר יאבדו \n האם להמשיך?"; -$lang['rssfailed'] = 'כשל ב-RSS'; -$lang['nothingfound'] = 'לא נמצאו תוצאות'; -$lang['mediaselect'] = 'בחירת קובץ מדיה'; -$lang['fileupload'] = 'העלאת קובץ מדיה'; -$lang['uploadsucc'] = 'העלאת הקובץ בוצעה בהצלחה'; -$lang['uploadfail'] = 'קרתה שגיאה בעת העלאת הקובץ. תיתכן ובעייה זו נוצרה עקב הרשאות שגיות.'; -$lang['uploadwrong'] = 'העלאה לא אושרה. קבצים בסיומת זו אסורים'; -$lang['uploadexist'] = 'הקובץ כבר קיים. פעולה בוטלה'; +$lang['lockexpire'] = 'הנעילה פגה'; +$lang['willexpire'] = 'הנעילה תחלוף עוד זמן קצר. \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']['mediadisplaylnk'] = 'הצגת הקישור בלבד.'; +$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'] = 'קישור לכונני שיתוף של Windows עובד רק באמצעות Microsoft Internet Explorer. +עדיין ניתן להעתיק ולהדביק את הקישור.'; +$lang['js']['linkwiz'] = 'אשף הקישורים'; +$lang['js']['linkto'] = 'קישור אל:'; +$lang['js']['del_confirm'] = 'באמת למחוק?'; +$lang['js']['mu_btn'] = 'העלאת מספר קבצים יחד'; +$lang['rssfailed'] = 'אירע כשל בעת קבלת הזנה זו:'; +$lang['nothingfound'] = 'לא נמצאו תוצאות.'; +$lang['mediaselect'] = 'קובצי מדיה'; +$lang['fileupload'] = 'העלאת קובצי מדיה'; +$lang['uploadsucc'] = 'ההעלאה הושלמה בהצלחה'; +$lang['uploadfail'] = 'אירעה שגיאה בעת העלאת הקובץ. היתכן שתקלה זו נוצרה עקב הרשאות שגיות?'; +$lang['uploadwrong'] = 'ההעלאה לא אושרה. קבצים בסיומת זו אסורים!'; +$lang['uploadexist'] = 'הקובץ כבר קיים. הפעולה בוטלה.'; $lang['uploadbadcontent'] = 'התוכן שהועלה לא תאם את הסיומת %s של הקובץ.'; -$lang['uploadspam'] = 'ההעלאה נחסמה על ידי הרשימה השחורה של הספאם.'; +$lang['uploadspam'] = 'ההעלאה נחסמה על ידי רשימת חסימת הספאם.'; $lang['uploadxss'] = 'ההעלאה נחסמה בשל חשד לתוכן זדוני.'; -$lang['uploadsize'] = 'הקובץ שהועלה היה גדול מדי. (מקסימום %s)'; -$lang['deletesucc'] = 'קובץ %s נמחק'; -$lang['deletefail'] = 'לא יכולתי למחוק "%s" -- בדקו הרשאות'; -$lang['mediainuse'] = 'קובץ "%s" לא נמחק - הוא עדיין בשימוש'; +$lang['uploadsize'] = 'הקובץ שהועלה היה גדול מדי. (%s לכל היותר)'; +$lang['deletesucc'] = 'הקובץ %s נמחק.'; +$lang['deletefail'] = 'לא ניתן למחוק את "%s" -- נא לבדוק את ההרשאות.'; +$lang['mediainuse'] = 'הקובץ "%s" לא נמחק - הוא עדיין בשימוש.'; $lang['namespaces'] = 'שמות מתחם'; -$lang['mediafiles'] = 'קבצים זמינים ב-'; -$lang['js']['searchmedia'] = 'חיפוש קבצים'; -$lang['js']['keepopen'] = 'השאר חלון פתוח בבחירה'; -$lang['js']['hidedetails'] = 'הסתר פרטים'; -$lang['js']['nosmblinks'] = ':( קישור למערכת קבצים של חלונות פועל רק בדפדפן אינטרנט אקספלורר. - זה בסדר, אין צורך לעבור. אפשר להעתיק ולהדביק את הקישור'; -$lang['js']['linkwiz'] = 'אשף הקישורים'; -$lang['js']['linkto'] = 'קשר אל:'; -$lang['js']['del_confirm'] = 'באמת למחוק?'; -$lang['js']['mu_btn'] = 'העלאת קבצים מרובים'; -$lang['mediausage'] = 'השתמש בתחביר הבא להתיחסות אל קובץ זה:'; -$lang['mediaview'] = 'הצג את הקובץ המקורי'; +$lang['mediafiles'] = 'קבצים זמינים תחת'; +$lang['accessdenied'] = 'אין לך הרשאה לצפות בדף זה.'; +$lang['mediausage'] = 'יש להשתמש בתחביר הבא כדי להפנות לקובץ זה:'; +$lang['mediaview'] = 'הצגת הקובץ המקורי'; $lang['mediaroot'] = 'root'; -$lang['mediaupload'] = 'כאן ניתן להעלות קובץ למרחב השמות הנוכחי. ליצירת תתי-מרחבי שמות צרפם ב-"העלה" לתחילת שם הקובץ מופרדים בפסיקים'; -$lang['mediaextchange'] = 'סיומת הקובץ השתנתה מ-.%s ל-.%s!'; -$lang['reference'] = 'קישורים ל'; +$lang['mediaupload'] = 'כאן ניתן להעלות קובץ למרחב השם הנוכחי. ליצירת תת־מרחבי שם יש לצרף אותם לתחילת שם הקובץ, מופרדים בפסיקים, בשם הקובץ תחת "העלאה בתור".'; +$lang['mediaextchange'] = 'סיומת הקובץ השתנתה מ־‎.%s ל־‎.%s!'; +$lang['reference'] = 'הפניות אל'; $lang['ref_inuse'] = 'לא ניתן למחוק קובץ זה, כיוון שהדפים הבאים עדיין משתמשים בו:'; -$lang['ref_hidden'] = 'יש קישורים לדפים ללא הרשאת קריאה'; -$lang['hits'] = 'פגיעות'; -$lang['quickhits'] = 'דפים שנמצאו'; +$lang['ref_hidden'] = 'חלק מההפניות נמצאות בדפים שאין לך הרשאות לקרוא אותם'; +$lang['hits'] = 'ביקורים'; +$lang['quickhits'] = 'שמות דפים שנמצאו'; $lang['toc'] = 'תוכן עניינים'; -$lang['current'] = 'גירסה נוכחית'; +$lang['current'] = 'הגרסה הנוכחית'; $lang['yours'] = 'הגרסה שלך'; -$lang['diff'] = 'הצג שינוים מגרסה זו ועד הנוכחית'; +$lang['diff'] = 'הצגת שינוים מגרסה זו ועד הנוכחית'; $lang['diff2'] = 'הצגת הבדלים בין הגרסאות שנבחרו'; +$lang['difflink'] = 'קישור לתצוגה השוואה זו'; $lang['line'] = 'שורה'; $lang['breadcrumb'] = 'ביקורים אחרונים'; -$lang['youarehere'] = 'אתה נמצא כאן'; -$lang['lastmod'] = 'שונה לאחרונה ב'; +$lang['youarehere'] = 'זהו מיקומך'; +$lang['lastmod'] = 'מועד השינוי האחרון'; $lang['by'] = 'על ידי'; $lang['deleted'] = 'נמחק'; $lang['created'] = 'נוצר'; @@ -151,9 +173,10 @@ $lang['restored'] = 'שוחזר'; $lang['external_edit'] = 'עריכה חיצונית'; $lang['summary'] = 'תקציר העריכה'; $lang['noflash'] = 'תוסף פלאש לדפדפן נדרש כדי להציג תוכן זה.'; -$lang['download'] = 'הורד מקטע'; +$lang['download'] = 'הורדת מקטע'; $lang['mail_newpage'] = 'דף נוסף:'; $lang['mail_changed'] = 'דף שונה:'; +$lang['mail_subscribe_list'] = 'דפים שהשתנו במרחב השם:'; $lang['mail_new_user'] = 'משתמש חדש:'; $lang['mail_upload'] = 'קובץ הועלה:'; $lang['qb_bold'] = 'טקסט מודגש'; @@ -167,7 +190,7 @@ $lang['qb_h3'] = 'כותרת רמה 3'; $lang['qb_h4'] = 'כותרת רמה 4'; $lang['qb_h5'] = 'כותרת רמה 5'; $lang['qb_h'] = 'כותרת'; -$lang['qb_hs'] = 'בחירת כותרת'; +$lang['qb_hs'] = 'כותרת נבחרת'; $lang['qb_hplus'] = 'כותרת ברמה גבוהה יותר'; $lang['qb_hminus'] = 'כותרת ברמה נמוכה יותר'; $lang['qb_hequal'] = 'כותרת באותה רמה'; @@ -175,73 +198,85 @@ $lang['qb_link'] = 'קישור פנימי'; $lang['qb_extlink'] = 'קישור חיצוני'; $lang['qb_hr'] = 'קו אופקי'; $lang['qb_ol'] = 'איבר ברשימה ממוספרת'; -$lang['qb_ul'] = 'אבר ברשימה לא ממוספרת'; -$lang['qb_media'] = 'תמונות או קובץ אחר'; -$lang['qb_sig'] = 'הזנת חתימה'; -$lang['qb_smileys'] = 'פרצופונים'; -$lang['qb_chars'] = 'סימנים מיוחדים'; -$lang['upperns'] = 'עבור למרחב השם שברמה שמעל הנוכחית'; -$lang['admin_register'] = 'להוסיף משתמש חדש'; -$lang['metaedit'] = 'ערוך נתונים'; -$lang['metasaveerr'] = 'כשל בשמירת נתונים'; -$lang['metasaveok'] = 'נתונים נשמרו'; -$lang['img_backto'] = 'הזור ל'; -$lang['img_title'] = 'כותרת'; -$lang['img_caption'] = 'תיאור'; +$lang['qb_ul'] = 'איבר ברשימה לא ממוספרת'; +$lang['qb_media'] = 'תמונות וקבצים אחרים'; +$lang['qb_sig'] = 'הוספת חתימה'; +$lang['qb_smileys'] = 'חייכנים'; +$lang['qb_chars'] = 'תווים מיוחדים'; +$lang['upperns'] = 'מעבר למרחב השם שברמה שמעל הנוכחית'; +$lang['admin_register'] = 'הוספת משתמש חדש'; +$lang['metaedit'] = 'עריכת נתוני העל'; +$lang['metasaveerr'] = 'אירע כשל בשמירת נתוני העל'; +$lang['metasaveok'] = 'נתוני העל נשמרו'; +$lang['img_backto'] = 'חזרה אל'; +$lang['img_title'] = 'שם'; +$lang['img_caption'] = 'כותרת'; $lang['img_date'] = 'תאריך'; $lang['img_fname'] = 'שם הקובץ'; $lang['img_fsize'] = 'גודל'; $lang['img_artist'] = 'צלם'; -$lang['img_copyr'] = 'זכויות'; -$lang['img_format'] = 'פורמט'; +$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['authmodfailed'] = 'תצורת אימות משתמשים גרועה. נא לדווח למנהל הויקי.'; -$lang['authtempfail'] = 'אימות משתמשים אינו זמין כרגע. אם מצב זה נמשך נא להודיע למנהל הויקי.'; +$lang['subscr_subscribe_success'] = '%s נוסף לרשימת המינויים לדף %s'; +$lang['subscr_subscribe_error'] = 'אירעה שגיאה בהוספת %s לרשימת המינויים לדף %s'; +$lang['subscr_subscribe_noaddress'] = 'אין כתובת המשויכת עם הכניסה שלך, נא ניתן להוסיף אותך לרשימת המינויים'; +$lang['subscr_unsubscribe_success'] = 'המשתמש %s הוסר מרשימת המינויים לדף %s'; +$lang['subscr_unsubscribe_error'] = 'אירעה שגיאה בהסרת %s מרשימת המינויים לדף %s'; +$lang['subscr_already_subscribed'] = 'המשתמש %s כבר מנוי לדף %s'; +$lang['subscr_not_subscribed'] = 'המשתמש %s איננו רשום לדף %s'; +$lang['subscr_m_not_subscribed'] = 'המשתמש שלך אינו רשום, נכון לעכשיו, לדף הנוכחי או למרחב השם.'; +$lang['subscr_m_new_header'] = 'הוספת מינוי'; +$lang['subscr_m_current_header'] = 'המינויים הנוכחיים'; +$lang['subscr_m_unsubscribe'] = 'ביטול המינוי'; +$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'] = 'נא לבחור שפה'; -$lang['i_installer'] = 'DokuWiki Installer'; -$lang['i_wikiname'] = 'שם הויקי'; -$lang['i_enableacl'] = 'אפשר ACL (מומלץ)'; -$lang['i_superuser'] = 'משתמש-על'; -$lang['i_problems'] = 'המתקין זיהה מספר בעיות המצוינות מטה. אין באפשרותך להמשיך לפני תיקונן.'; -$lang['i_modified'] = 'משיקולי אבטחה תסריט זה יעבוד אך ורק עם התקנת DokuWiki חדשה שלא עברה כל שינוי. - עליך לחלץ שנית את הקבצים מהחבילה שהורדה או להעזר בדף +$lang['i_installer'] = 'תכנית ההתקנה של DokuWiki'; +$lang['i_wikiname'] = 'שם הוויקי'; +$lang['i_enableacl'] = 'הפעלת ACL (מומלץ)'; +$lang['i_superuser'] = 'משתמש־על'; +$lang['i_problems'] = 'תכנית ההתקנה זיהתה מספר בעיות המפורטות להלן. אין באפשרותך להמשיך לפני תיקונן.'; +$lang['i_modified'] = 'משיקולי אבטחה סקריפט זה יעבוד אך ורק עם התקנת DokuWiki חדשה שלא עברה כל שינוי. + עליך לחלץ שנית את הקבצים מהחבילה שהורדה או להיעזר בדף Dokuwiki installation instructions'; -$lang['i_funcna'] = 'פונקצית ה-PHP %s אינה זמינה. יתכן כי מארח האתר חסם אותה מסיבה כלשהי?'; -$lang['i_phpver'] = 'גרסת ה-PHP שלך %s נמוכה מהדרוש. עליך לשדרג את התקנת ה-PHP'; -$lang['i_permfail'] = '%s אינה ברת כתיבה על ידי DokuWiki. עליך לשנות הרשאות ספריה זו!'; +$lang['i_funcna'] = 'פונקציית ה-PHP‏ %s אינה זמינה. יתכן כי מארח האתר חסם אותה מסיבה כלשהי?'; +$lang['i_phpver'] = 'גרסת ה־PHP שלך %s נמוכה מהדרוש. עליך לשדרג את התקנת ה־PHP שלך.'; +$lang['i_permfail'] = '%s אינה ניתנת לכתיבה על ידי DokuWiki. עליך לשנות הרשאות תיקייה זו!'; $lang['i_confexists'] = '%s כבר קיים'; -$lang['i_writeerr'] = 'אין אפשרות ליצור את %s. נא לבדוק את הרשאות הקובץ/ספריה וליצור את הקובץ ידנית.'; -$lang['i_badhash'] = 'קובץ Dokuwiki.php לא מזוהה או שעבר שינויים (hash=%s)'; -$lang['i_badval'] = '%s - ערך לא חוקי או ריק'; -$lang['i_success'] = 'ההגדרה הסתימה בהצלחה. באפשרותך למחוק עתה את הקובץ install.php ולהמשיך אל DokuWiki החדש שלך.'; -$lang['i_failure'] = 'מספר שגיאות ארעו בעת כתיבת קבצי התצורה. ייתכן כי יהיה צורך לתקנם ידנית לפני שניתן יהיה להשתמש בDokuWiki החדש שלך.'; -$lang['i_policy'] = 'מדיניות ACL תחילית'; +$lang['i_writeerr'] = 'אין אפשרות ליצור את %s. נא לבדוק את הרשאות הקובץ/תיקייה וליצור את הקובץ ידנית.'; +$lang['i_badhash'] = 'הקובץ Dokuwiki.php אינו מזוהה או שעבר שינויים (hash=%s)'; +$lang['i_badval'] = '%s - הערך אינו חוקי או ריק'; +$lang['i_success'] = 'תהליך ההגדרה הסתיים בהצלחה. כעת ניתן למחוק את הקובץ install.php ולהמשיך אל ה־DokuWiki החדש שלך.'; +$lang['i_failure'] = 'מספר שגיאות אירעו בעת כתיבת קובצי התצורה. יתכן כי יהיה צורך לתקנם ידנית לפני שניתן יהיה להשתמש ב־DokuWiki החדש שלך.'; +$lang['i_policy'] = 'מדיניות ACL התחלתית'; $lang['i_pol0'] = 'ויקי פתוח (קריאה, כתיבה והעלאה לכולם)'; $lang['i_pol1'] = ' ויקי ציבורי (קריאה לכולם, כתיבה והעלאה למשתמשים רשומים)'; $lang['i_pol2'] = 'ויקי סגור (קריאה, כתיבה והעלאה למשתמשים רשומים בלבד)'; -$lang['i_retry'] = 'נסיון נוסף'; -$lang['mu_intro'] = 'כאן תוכל להעלות קבצים מרובים. לחץ על כפתור החיפוש להוסיף אותם למחסנית. לחץ על העלאה לסיום.'; -$lang['mu_gridname'] = 'שם קובץ'; +$lang['i_retry'] = 'ניסיון נוסף'; +$lang['i_license'] = 'נא לבחור את הרישיון שיחול על התוכן שבוויקי שלך:'; +$lang['mu_intro'] = 'דרך כאן ניתן להעלות מספר קבצים בבת אחת. יש ללחוץ על לחצן החיפוש להוסיף אותם למחסנית. ניתן ללחוץ על העלאה לסיום.'; +$lang['mu_gridname'] = 'שם הקובץ'; $lang['mu_gridsize'] = 'גודל'; -$lang['mu_gridstat'] = 'סטאטןס'; +$lang['mu_gridstat'] = 'מצב'; $lang['mu_namespace'] = 'מרחב שם'; $lang['mu_browse'] = 'חיפוש'; $lang['mu_toobig'] = 'גדול מדי'; -$lang['mu_ready'] = 'מוכן להעלאה'; -$lang['mu_done'] = 'סיים'; +$lang['mu_ready'] = 'בהמתנה להעלאה'; +$lang['mu_done'] = 'הסתיים'; $lang['mu_fail'] = 'נכשל'; -$lang['mu_authfail'] = 'תקוף נעילת עריכה פג'; +$lang['mu_authfail'] = 'תוקף ההפעלה פג'; $lang['mu_progress'] = '@PCT@% הועלה'; $lang['mu_filetypes'] = 'סוגי קבצים מורשים'; $lang['mu_info'] = 'הקבצים הועלו'; $lang['mu_lasterr'] = 'שגיאה אחרונה:'; -$lang['recent_global'] = 'אתה צופה כעת בשינויים בתוך מרחב השם %s. אתה יכול גם לצפות בשינויים האחרונים של כל הוויקי .'; +$lang['recent_global'] = 'נכון לעכשיו מתנהל על ידיך מעקב אחר מרחב השם %s. כמו כן, באפשרותך לצפות בשינויים האחרונים בוויקי כולו.'; $lang['years'] = 'לפני %d שנים'; $lang['months'] = 'לפני %d חודשים'; $lang['weeks'] = 'לפני %d שבועות'; @@ -249,3 +284,4 @@ $lang['days'] = 'לפני %d ימים'; $lang['hours'] = 'לפני %d שעות'; $lang['minutes'] = 'לפני %d דקות'; $lang['seconds'] = 'לפני %d שניות'; +$lang['wordblock'] = 'השינויים שלך לא נשמרו כיוון שהם מכילים טקסט חסום (ספאם).'; diff --git a/inc/lang/he/mailtext.txt b/inc/lang/he/mailtext.txt index d7990b2b3..222ee1b6d 100644 --- a/inc/lang/he/mailtext.txt +++ b/inc/lang/he/mailtext.txt @@ -1,17 +1,17 @@ -דף בDokuWiki נוסף או שונה. הנה הפרטים: +דף בDokuWiki נוסף או שונה. להלן הפרטים: -Date : @DATE@ -Browser : @BROWSER@ -IP-Address : @IPADDRESS@ -Hostname : @HOSTNAME@ -Old Revision: @OLDPAGE@ -New Revision: @NEWPAGE@ -Edit Summary: @SUMMARY@ -User : @USER@ +תאריך : @DATE@ +דפדפן : @BROWSER@ +כתובת ה־IP‏ : @IPADDRESS@ +שם המארח : @HOSTNAME@ +המהדורה הישנה: @OLDPAGE@ +המהדורה החדשה: @NEWPAGE@ +תקציר העריכה: @SUMMARY@ +משתמש : @USER@ @DIFF@ -- -דף זה נוצר ע"י DokuWiki ב- +דף זה נוצר ע״י ה־DokuWiki הזמין בכתובת @DOKUWIKIURL@ diff --git a/inc/lang/he/password.txt b/inc/lang/he/password.txt index 29742ebda..745c5cb5c 100644 --- a/inc/lang/he/password.txt +++ b/inc/lang/he/password.txt @@ -1,10 +1,10 @@ שלום @FULLNAME@! -הנה נתוני המשתמש שלך עבור @TITLE@ ב- @DOKUWIKIURL@ +הנה נתוני המשתמש שלך עבור @TITLE@ ב־@DOKUWIKIURL@ -כניסה : @LOGIN@ -סיסמה : @PASSWORD@ +שם כניסה : @LOGIN@ +ססמה : @PASSWORD@ -- -מכתב זה נוצר על ידי דוקוויקי ב- +מכתב זה נוצר על ידי ה־DokuWiki הזמין בכתובת @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/he/pwconfirm.txt b/inc/lang/he/pwconfirm.txt index 255195c7f..7dc46c340 100644 --- a/inc/lang/he/pwconfirm.txt +++ b/inc/lang/he/pwconfirm.txt @@ -1,13 +1,13 @@ שלום @FULLNAME@! -מישהו ביקש סיסמה חדשה עבור הכניסה שלך ל-@TITLE@ ב-@DOKUWIKIURL@ +מישהו ביקש ססמה חדשה עבור שם הכניסה שלך לוויקי @TITLE@ בכתובת @DOKUWIKIURL@ -אם לא ביקשת סיסמה חדשה פשוט התעלם מדוא"ל זה. +אם לא ביקשת ססמה חדשה באפשרותך פשוט להתעלם מהודעת דוא״ל זו. -כדי לאשר שהבקשה באמת נשלחה על ידך נא השתמש בקישור הבא. +כדי לאשר שהבקשה באמת נשלחה על ידך עליך השתמש בקישור הבא. @CONFIRM@ -- -דואר זה נוצר על ידי DokuWiki ב- +הודעת דוא״ל זו נוצרה על ידי ה־DokuWiki הזמין בכתובת @DOKUWIKIURL@ diff --git a/inc/lang/he/read.txt b/inc/lang/he/read.txt index 8e4c177ee..18efc5e03 100644 --- a/inc/lang/he/read.txt +++ b/inc/lang/he/read.txt @@ -1,2 +1,2 @@ -דף זה הוא דף לקריאה בלבד. ניתן לצפות בקוד המקור שלו, אבל לא ניתן לערוך אותו. ניתן לפנות אל מנהל הויקי אם לדעתך נפלה טעות. +דף זה הוא דף לקריאה בלבד. ניתן לצפות בקוד המקור שלו, אך לא ניתן לערוך אותו. ניתן לפנות למנהל הוויקי אם לדעתך נפלה טעות. diff --git a/inc/lang/he/register.txt b/inc/lang/he/register.txt index 7225b02fd..c4dfad752 100644 --- a/inc/lang/he/register.txt +++ b/inc/lang/he/register.txt @@ -1,3 +1,3 @@ ====== הרשמה כמשתמש חדש ====== -יש למלא את כל המידע מטה כדי ליצור חשבון חדש בויקי זה. יש לודא כי מוזנת **כתובת דוא"ל תקפה**- סיסמתך החדשה תשלח לכתובת זו\\ על שם המשתמש להיות [[hdoku>ויקי:שם דף|שם דף]] תקף. +יש למלא את כל המידע להלן כדי ליצור חשבון חדש בוויקי זה. עליך לוודא כי הזנת **כתובת דוא״ל תקפה**- ססמתך החדשה תשלח לכתובת זו. על שם המשתמש להיות [[hdoku>ויקי:שם דף|שם דף]] תקף. diff --git a/inc/lang/he/registermail.txt b/inc/lang/he/registermail.txt index bb64a8158..3edca3fa0 100644 --- a/inc/lang/he/registermail.txt +++ b/inc/lang/he/registermail.txt @@ -1,14 +1,14 @@ -משתמש חדש נרשם. הנה הפרטים: +משתמש חדש נרשם. להלן הפרטים: שם משתמש : @NEWUSER@ שם מלא : @NEWNAME@ -דוא"ל : @NEWEMAIL@ +דוא״ל : @NEWEMAIL@ תאריך : @DATE@ דפדפן : @BROWSER@ -כתובת רשת : @IPADDRESS@ -שם המחשב : @HOSTNAME@ +כתובת IP‏ : @IPADDRESS@ +שם המארח : @HOSTNAME@ -- -דוא"ל זה נוצר על ידי DokuWiki ב- +הודעת דוא״ל זו נוצרה על ידי ה־DokuWiki הזמין בכתובת @DOKUWIKIURL@ diff --git a/inc/lang/he/resendpwd.txt b/inc/lang/he/resendpwd.txt index 47e7749c2..8ca27207b 100644 --- a/inc/lang/he/resendpwd.txt +++ b/inc/lang/he/resendpwd.txt @@ -1,4 +1,4 @@ -====== שליחת סיסמה חדשה ====== +====== שליחת ססמה חדשה ====== -יש להזין את שם המשתמש בטופס מטה ולבקש סיסמה חדשה לחשבון שלך בויקי זה. קישור לאימות ישלח לכתובת הדו"ל איתה נרשמת. +יש להזין את שם המשתמש בטופס מטה ולבקש ססמה חדשה לחשבון שלך בוויקי זה. הקישור לאימות יישלח לכתובת הדוא״ל באמצעותה נרשמת. diff --git a/inc/lang/he/subscr_digest.txt b/inc/lang/he/subscr_digest.txt new file mode 100644 index 000000000..af5220229 --- /dev/null +++ b/inc/lang/he/subscr_digest.txt @@ -0,0 +1,20 @@ +שלום! + +הדף @PAGE@ שבאתר הוויקי @TITLE@ השתנה. +להלן השינויים: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +המהדורה הישנה: @OLDPAGE@ +המהדורה החדשה: @NEWPAGE@ + +כדי לבטל את ההתרעות לשינויי העמוד, יש להיכנס לאתר הוויקי בכתובת +@DOKUWIKIURL@ ואז לבקר באגף +@SUBSCRIBE@ +ולבטל את המינוי לשינויים בדף ו/או במרחב השם. + +-- +הודעת דוא״ל זו נוצרה על ידי ה־DokuWiki שבכתובת +@DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/he/subscr_single.txt b/inc/lang/he/subscr_single.txt new file mode 100644 index 000000000..123b186c8 --- /dev/null +++ b/inc/lang/he/subscr_single.txt @@ -0,0 +1,22 @@ +שלום! + +הדף @PAGE@ באתר הוויקי @TITLE@ השתנה. + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +תאריך : @DATE@ +משתמש : @USER@ +תקציר העריכה: @SUMMARY@ +המהדורה הישנה: @OLDPAGE@ +המהדורה החדשה: @NEWPAGE@ + +לביטול התרעות בנוגע לעמוד, יש להיכנס לאתר הוויקי בכתובת +@DOKUWIKIURL@ ואז לבקר בדף +@NEWPAGE@ +ולבטל את המינוי לקבלת שינויים בדף ו/או במרחב השם. + +-- +הודעת דוא״ל זו נוצרה על ידי ה־DokuWiki הזמין בכתובת +@DOKUWIKIURL@ \ No newline at end of file diff --git a/lib/plugins/acl/lang/he/lang.php b/lib/plugins/acl/lang/he/lang.php index ac00730dd..91025f4b8 100644 --- a/lib/plugins/acl/lang/he/lang.php +++ b/lib/plugins/acl/lang/he/lang.php @@ -7,6 +7,7 @@ * @author Dotan Kamber * @author Moshe Kaplan * @author Yaron Yogev + * @author Yaron Shahrabani */ $lang['admin_acl'] = 'ניהול רשימת בקרת גישות'; $lang['acl_group'] = 'קבוצה'; diff --git a/lib/plugins/config/lang/he/lang.php b/lib/plugins/config/lang/he/lang.php index a39d0ab5c..ab4a8928e 100644 --- a/lib/plugins/config/lang/he/lang.php +++ b/lib/plugins/config/lang/he/lang.php @@ -7,6 +7,7 @@ * @author Dotan Kamber * @author Moshe Kaplan * @author Yaron Yogev + * @author Yaron Shahrabani */ $lang['menu'] = 'הגדרות תצורה'; $lang['error'] = 'ההגדרות לא עודכנו בגלל ערך לא תקף, נא לעיין בשינויים ולשלוח שנית. diff --git a/lib/plugins/plugin/lang/he/lang.php b/lib/plugins/plugin/lang/he/lang.php index c6e462193..47253e335 100644 --- a/lib/plugins/plugin/lang/he/lang.php +++ b/lib/plugins/plugin/lang/he/lang.php @@ -7,6 +7,7 @@ * @author Dotan Kamber * @author Moshe Kaplan * @author Yaron Yogev + * @author Yaron Shahrabani */ $lang['menu'] = 'ניהול הרחבות'; $lang['download'] = 'הורדת והתקנת הרחבה חדשה'; diff --git a/lib/plugins/popularity/lang/he/lang.php b/lib/plugins/popularity/lang/he/lang.php index 024f94ae8..f619127cd 100644 --- a/lib/plugins/popularity/lang/he/lang.php +++ b/lib/plugins/popularity/lang/he/lang.php @@ -5,6 +5,7 @@ * @author Dotan Kamber * @author Moshe Kaplan * @author Yaron Yogev + * @author Yaron Shahrabani */ $lang['name'] = 'משוב פופולריות (יתכן זמן טעינה ארוך)'; $lang['submit'] = 'שלח מידע'; diff --git a/lib/plugins/revert/lang/he/lang.php b/lib/plugins/revert/lang/he/lang.php index 585487816..ac3c3412e 100644 --- a/lib/plugins/revert/lang/he/lang.php +++ b/lib/plugins/revert/lang/he/lang.php @@ -5,6 +5,7 @@ * @author Dotan Kamber * @author Moshe Kaplan * @author Yaron Yogev + * @author Yaron Shahrabani */ $lang['menu'] = 'מנהל שחזור'; $lang['filter'] = 'חפש דפים עם ספאם'; diff --git a/lib/plugins/usermanager/lang/he/lang.php b/lib/plugins/usermanager/lang/he/lang.php index b2b55c3b4..601163013 100644 --- a/lib/plugins/usermanager/lang/he/lang.php +++ b/lib/plugins/usermanager/lang/he/lang.php @@ -6,6 +6,7 @@ * @author Dotan Kamber * @author Moshe Kaplan * @author Yaron Yogev + * @author Yaron Shahrabani */ $lang['menu'] = 'מנהל משתמשים'; $lang['noauth'] = '(אימות משתמשים אינו זמין)'; -- cgit v1.2.3 From 11aec52adf81e5d1a752ce9c3d83692014bfc19f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 14 Jan 2011 10:50:13 +0100 Subject: updated adLDAP library to 3.3.2 [+] New feature: Move the user to a new OU using user_move() function [-] Bug fix: Prevent an 'undefined index' error in recursive_groups() when full PHP E_ALL logging is enabled [-] Bug fix: user_groups() does not return primary group when objectsid is not given (Tracker ID:2931213) [-] Bug fix: Undefined index in function user_info for non-existent users (Tracker ID:2922729) [-] Bug fix: Force user_info to find objectCategory of person as if a sAMAccountName also exists in a group it will return that group. (Tracker ID:3006096) [-] Bug fix: Return false for user_info if the user does not exist [-] Bug fix: user_info, checks for for a "count" value that not exist in $entries array if "memberof" isn't passed in $fields array. (Tracker ID:2993172) [-] Bug fix: In authenticate() if user authentication fails function returns and does not rebind with admin credentials - so the other funcions don't work anymore as $this->_bind === false. (Tracker ID:2987887) [-] Bug fix: When calling $ldap->user_modify('user', array("expires"=>0)) the function fails due to the value being 0. Changed to isset (Tracker ID:3036726) --- inc/adLDAP.php | 118 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 92 insertions(+), 26 deletions(-) diff --git a/inc/adLDAP.php b/inc/adLDAP.php index 94cd8a50d..4c8ee5db3 100644 --- a/inc/adLDAP.php +++ b/inc/adLDAP.php @@ -1,7 +1,7 @@ _bind = @ldap_bind($this->_conn,$username.$this->_account_suffix,$password); - if (!$this->_bind){ return (false); } + $ret = true; + $this->_bind = @ldap_bind($this->_conn, $username . $this->_account_suffix, $password); + if (!$this->_bind){ $ret = false; } // Cnce we've checked their details, kick back into admin mode if we have it - if ($this->_ad_username!=NULL && !$prevent_rebind){ - $this->_bind = @ldap_bind($this->_conn,$this->_ad_username.$this->_account_suffix,$this->_ad_password); + if ($this->_ad_username !== NULL && !$prevent_rebind) { + $this->_bind = @ldap_bind($this->_conn, $this->_ad_username . $this->_account_suffix , $this->_ad_password); if (!$this->_bind){ // This should never happen in theory throw new adLDAPException('Rebind to Active Directory failed. AD said: ' . $this->get_last_error()); } } - return (true); + return $ret; } //***************************************************************************************************************** @@ -758,7 +759,7 @@ class adLDAP { $ret_groups=array(); $groups=$this->group_info($group,array("memberof")); - if (is_array($groups[0]["memberof"])) { + if (isset($groups[0]["memberof"]) && is_array($groups[0]["memberof"])) { $groups=$groups[0]["memberof"]; if ($groups){ @@ -861,7 +862,7 @@ class adLDAP { * @param array $attributes The attributes to set to the user account * @return bool */ - public function user_create($attributes){ + public function user_create($attributes){ // Check for compulsory fields if (!array_key_exists("username",$attributes)){ return ("Missing compulsory field [username]"); } if (!array_key_exists("firstname",$attributes)){ return ("Missing compulsory field [firstname]"); } @@ -963,25 +964,36 @@ class adLDAP { $username = $this->strguid2hex($username); $filter="objectguid=".$username; } + else if (strstr($username, "@")) { + $filter="userPrincipalName=".$username; + } else { - $filter="samaccountname=".$username; + $filter="samaccountname=".$username; } + $filter = "(&(objectCategory=person)({$filter}))"; if ($fields===NULL){ $fields=array("samaccountname","mail","memberof","department","displayname","telephonenumber","primarygroupid","objectsid"); } + if (!in_array("objectsid",$fields)){ + $fields[] = "objectsid"; + } $sr=ldap_search($this->_conn,$this->_base_dn,$filter,$fields); $entries = ldap_get_entries($this->_conn, $sr); - if ($entries[0]['count'] >= 1) { - // AD does not return the primary group in the ldap query, we may need to fudge it - if ($this->_real_primarygroup && isset($entries[0]["primarygroupid"][0]) && isset($entries[0]["objectsid"][0])){ - //$entries[0]["memberof"][]=$this->group_cn($entries[0]["primarygroupid"][0]); - $entries[0]["memberof"][]=$this->get_primary_group($entries[0]["primarygroupid"][0], $entries[0]["objectsid"][0]); - } else { - $entries[0]["memberof"][]="CN=Domain Users,CN=Users,".$this->_base_dn; + if (isset($entries[0])) { + if ($entries[0]['count'] >= 1) { + if (in_array("memberof", $fields)) { + // AD does not return the primary group in the ldap query, we may need to fudge it + if ($this->_real_primarygroup && isset($entries[0]["primarygroupid"][0]) && isset($entries[0]["objectsid"][0])){ + //$entries[0]["memberof"][]=$this->group_cn($entries[0]["primarygroupid"][0]); + $entries[0]["memberof"][]=$this->get_primary_group($entries[0]["primarygroupid"][0], $entries[0]["objectsid"][0]); + } else { + $entries[0]["memberof"][]="CN=Domain Users,CN=Users,".$this->_base_dn; + } + $entries[0]["memberof"]["count"]++; + } } + return $entries; } - - $entries[0]["memberof"]["count"]++; - return ($entries); + return false; } /** @@ -1232,6 +1244,33 @@ class adLDAP { } } + /** + * Move a user account to a different OU + * + * @param string $username The username to move (please be careful here!) + * @param array $container The container or containers to move the user to (please be careful here!). + * accepts containers in 1. parent 2. child order + * @return array + */ + public function user_move($username, $container) { + if (!$this->_bind){ return (false); } + if ($username === null){ return ("Missing compulsory field [username]"); } + if ($container === null){ return ("Missing compulsory field [container]"); } + if (!is_array($container)){ return ("Container must be an array"); } + + $userinfo = $this->user_info($username, array("*")); + $dn = $userinfo[0]['distinguishedname'][0]; + $newrdn = "cn=" . $username; + $container = array_reverse($container); + $newcontainer = "ou=" . implode(",ou=",$container); + $newbasedn = strtolower($newcontainer) . "," . $this->_base_dn; + $result=@ldap_rename($this->_conn,$dn,$newrdn,$newbasedn,true); + if ($result !== true) { + return (false); + } + return (true); + } + //***************************************************************************************************************** // CONTACT FUNCTIONS // * Still work to do in this area, and new functions to write @@ -1567,6 +1606,32 @@ class adLDAP { return ($groups); } + //************************************************************************************************************ + // ORGANIZATIONAL UNIT FUNCTIONS + + /** + * Create an organizational unit + * + * @param array $attributes Default attributes of the ou + * @return bool + */ + public function ou_create($attributes){ + if (!is_array($attributes)){ return ("Attributes must be an array"); } + if (!array_key_exists("ou_name",$attributes)){ return ("Missing compulsory field [ou_name]"); } + if (!array_key_exists("container",$attributes)){ return ("Missing compulsory field [container]"); } + if (!is_array($attributes["container"])){ return ("Container attribute must be an array."); } + $attributes["container"]=array_reverse($attributes["container"]); + + $add=array(); + $add["objectClass"] = "organizationalUnit"; + + $container="OU=".implode(",OU=",$attributes["container"]); + $result=ldap_add($this->_conn,"CN=".$add["cn"].", ".$container.",".$this->_base_dn,$add); + if ($result!=true){ return (false); } + + return (true); + } + //************************************************************************************************************ // EXCHANGE FUNCTIONS @@ -1998,6 +2063,7 @@ class adLDAP { if ($attributes["exchange_usedefaults"]){ $mod["mDBUseDefaults"][0]=$attributes["exchange_usedefaults"]; } if ($attributes["exchange_policyexclude"]){ $mod["msExchPoliciesExcluded"][0]=$attributes["exchange_policyexclude"]; } if ($attributes["exchange_policyinclude"]){ $mod["msExchPoliciesIncluded"][0]=$attributes["exchange_policyinclude"]; } + if ($attributes["exchange_addressbook"]){ $mod["showInAddressBook"][0]=$attributes["exchange_addressbook"]; } // This schema is designed for contacts if ($attributes["exchange_hidefromlists"]){ $mod["msExchHideFromAddressLists"][0]=$attributes["exchange_hidefromlists"]; } -- cgit v1.2.3 From d0b9cae13d5b6d7dc15d57fff452054235ca8662 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 14 Jan 2011 11:19:43 +0100 Subject: coding style fix --- lib/exe/ajax.php | 456 +++++++++++++++++++++++++++---------------------------- 1 file changed, 227 insertions(+), 229 deletions(-) diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index e514762fd..540399a59 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -8,7 +8,7 @@ //fix for Opera XMLHttpRequests if(!count($_POST) && !empty($HTTP_RAW_POST_DATA)){ - parse_str($HTTP_RAW_POST_DATA, $_POST); + parse_str($HTTP_RAW_POST_DATA, $_POST); } if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); @@ -20,25 +20,25 @@ header('Content-Type: text/html; charset=utf-8'); //call the requested function -if(isset($_POST['call'])) - $call = $_POST['call']; -else if(isset($_GET['call'])) - $call = $_GET['call']; -else - exit; - +if(isset($_POST['call'])){ + $call = $_POST['call']; +}else if(isset($_GET['call'])){ + $call = $_GET['call']; +}else{ + exit; +} $callfn = 'ajax_'.$call; if(function_exists($callfn)){ - $callfn(); + $callfn(); }else{ - $evt = new Doku_Event('AJAX_CALL_UNKNOWN', $call); - if ($evt->advise_before()) { - print "AJAX call '".htmlspecialchars($call)."' unknown!\n"; - exit; - } - $evt->advise_after(); - unset($evt); + $evt = new Doku_Event('AJAX_CALL_UNKNOWN', $call); + if ($evt->advise_before()) { + print "AJAX call '".htmlspecialchars($call)."' unknown!\n"; + exit; + } + $evt->advise_after(); + unset($evt); } /** @@ -47,33 +47,33 @@ if(function_exists($callfn)){ * @author Andreas Gohr */ function ajax_qsearch(){ - global $conf; - global $lang; - - $query = $_POST['q']; - if(empty($query)) $query = $_GET['q']; - if(empty($query)) return; - - $data = ft_pageLookup($query, true, useHeading('navigation')); - - if(!count($data)) return; - - print ''.$lang['quickhits'].''; - print '
    '; - foreach($data as $id => $title){ - if (useHeading('navigation')) { - $name = $title; - } else { - $ns = getNS($id); - if($ns){ - $name = shorten(noNS($id), ' ('.$ns.')',30); - }else{ - $name = $id; + global $conf; + global $lang; + + $query = $_POST['q']; + if(empty($query)) $query = $_GET['q']; + if(empty($query)) return; + + $data = ft_pageLookup($query, true, useHeading('navigation')); + + if(!count($data)) return; + + print ''.$lang['quickhits'].''; + print '
      '; + foreach($data as $id => $title){ + if (useHeading('navigation')) { + $name = $title; + } else { + $ns = getNS($id); + if($ns){ + $name = shorten(noNS($id), ' ('.$ns.')',30); + }else{ + $name = $id; + } } + echo '
    • ' . html_wikilink(':'.$id,$name) . '
    • '; } - echo '
    • ' . html_wikilink(':'.$id,$name) . '
    • '; - } - print '
    '; + print '
'; } /** @@ -83,36 +83,36 @@ function ajax_qsearch(){ * @author Mike Frysinger */ function ajax_suggestions() { - global $conf; - global $lang; - - $query = cleanID($_POST['q']); - if(empty($query)) $query = cleanID($_GET['q']); - if(empty($query)) return; - - $data = array(); - $data = ft_pageLookup($query); - if(!count($data)) return; - $data = array_keys($data); - - // limit results to 15 hits - $data = array_slice($data, 0, 15); - $data = array_map('trim',$data); - $data = array_map('noNS',$data); - $data = array_unique($data); - sort($data); - - /* now construct a json */ - $suggestions = array( - $query, // the original query - $data, // some suggestions - array(), // no description - array() // no urls - ); - $json = new JSON(); - - header('Content-Type: application/x-suggestions+json'); - print $json->encode($suggestions); + global $conf; + global $lang; + + $query = cleanID($_POST['q']); + if(empty($query)) $query = cleanID($_GET['q']); + if(empty($query)) return; + + $data = array(); + $data = ft_pageLookup($query); + if(!count($data)) return; + $data = array_keys($data); + + // limit results to 15 hits + $data = array_slice($data, 0, 15); + $data = array_map('trim',$data); + $data = array_map('noNS',$data); + $data = array_unique($data); + sort($data); + + /* now construct a json */ + $suggestions = array( + $query, // the original query + $data, // some suggestions + array(), // no description + array() // no urls + ); + $json = new JSON(); + + header('Content-Type: application/x-suggestions+json'); + print $json->encode($suggestions); } /** @@ -121,32 +121,32 @@ function ajax_suggestions() { * Andreas Gohr */ function ajax_lock(){ - global $conf; - global $lang; - $id = cleanID($_POST['id']); - if(empty($id)) return; - - if(!checklock($id)){ - lock($id); - echo 1; - } - - if($conf['usedraft'] && $_POST['wikitext']){ - $client = $_SERVER['REMOTE_USER']; - if(!$client) $client = clientIP(true); + global $conf; + global $lang; + $id = cleanID($_POST['id']); + if(empty($id)) return; + + if(!checklock($id)){ + lock($id); + echo 1; + } - $draft = array('id' => $id, - 'prefix' => substr($_POST['prefix'], 0, -1), - 'text' => $_POST['wikitext'], - 'suffix' => $_POST['suffix'], - 'date' => (int) $_POST['date'], - 'client' => $client, - ); - $cname = getCacheName($draft['client'].$id,'.draft'); - if(io_saveFile($cname,serialize($draft))){ - echo $lang['draftdate'].' '.dformat(); + if($conf['usedraft'] && $_POST['wikitext']){ + $client = $_SERVER['REMOTE_USER']; + if(!$client) $client = clientIP(true); + + $draft = array('id' => $id, + 'prefix' => substr($_POST['prefix'], 0, -1), + 'text' => $_POST['wikitext'], + 'suffix' => $_POST['suffix'], + 'date' => (int) $_POST['date'], + 'client' => $client, + ); + $cname = getCacheName($draft['client'].$id,'.draft'); + if(io_saveFile($cname,serialize($draft))){ + echo $lang['draftdate'].' '.dformat(); + } } - } } @@ -156,14 +156,14 @@ function ajax_lock(){ * @author Andreas Gohr */ function ajax_draftdel(){ - $id = cleanID($_REQUEST['id']); - if(empty($id)) return; + $id = cleanID($_REQUEST['id']); + if(empty($id)) return; - $client = $_SERVER['REMOTE_USER']; - if(!$client) $client = clientIP(true); + $client = $_SERVER['REMOTE_USER']; + if(!$client) $client = clientIP(true); - $cname = getCacheName($client.$id,'.draft'); - @unlink($cname); + $cname = getCacheName($client.$id,'.draft'); + @unlink($cname); } /** @@ -172,22 +172,22 @@ function ajax_draftdel(){ * @author Andreas Gohr */ function ajax_medians(){ - global $conf; - - // wanted namespace - $ns = cleanID($_POST['ns']); - $dir = utf8_encodeFN(str_replace(':','/',$ns)); - - $lvl = count(explode(':',$ns)); - - $data = array(); - search($data,$conf['mediadir'],'search_index',array('nofiles' => true),$dir); - foreach($data as $item){ - $item['level'] = $lvl+1; - echo media_nstree_li($item); - echo media_nstree_item($item); - echo ''; - } + global $conf; + + // wanted namespace + $ns = cleanID($_POST['ns']); + $dir = utf8_encodeFN(str_replace(':','/',$ns)); + + $lvl = count(explode(':',$ns)); + + $data = array(); + search($data,$conf['mediadir'],'search_index',array('nofiles' => true),$dir); + foreach($data as $item){ + $item['level'] = $lvl+1; + echo media_nstree_li($item); + echo media_nstree_item($item); + echo ''; + } } /** @@ -196,11 +196,11 @@ function ajax_medians(){ * @author Andreas Gohr */ function ajax_medialist(){ - global $conf; - global $NS; + global $conf; + global $NS; - $NS = $_POST['ns']; - tpl_mediaContent(true); + $NS = $_POST['ns']; + tpl_mediaContent(true); } /** @@ -209,24 +209,24 @@ function ajax_medialist(){ * @author Andreas Gohr */ function ajax_index(){ - global $conf; - - // wanted namespace - $ns = cleanID($_POST['idx']); - $dir = utf8_encodeFN(str_replace(':','/',$ns)); - - $lvl = count(explode(':',$ns)); - - $data = array(); - search($data,$conf['datadir'],'search_index',array('ns' => $ns),$dir); - foreach($data as $item){ - $item['level'] = $lvl+1; - echo html_li_index($item); - echo '
'; - echo html_list_index($item); - echo '
'; - echo ''; - } + global $conf; + + // wanted namespace + $ns = cleanID($_POST['idx']); + $dir = utf8_encodeFN(str_replace(':','/',$ns)); + + $lvl = count(explode(':',$ns)); + + $data = array(); + search($data,$conf['datadir'],'search_index',array('ns' => $ns),$dir); + foreach($data as $item){ + $item['level'] = $lvl+1; + echo html_li_index($item); + echo '
'; + echo html_list_index($item); + echo '
'; + echo ''; + } } /** @@ -235,107 +235,105 @@ function ajax_index(){ * @author Andreas Gohr */ function ajax_linkwiz(){ - global $conf; - global $lang; - - $q = ltrim($_POST['q'],':'); - $id = noNS($q); - $ns = getNS($q); - - $ns = cleanID($ns); - $id = cleanID($id); - - $nsd = utf8_encodeFN(str_replace(':','/',$ns)); - $idd = utf8_encodeFN(str_replace(':','/',$id)); - - $data = array(); - if($q && !$ns){ - - // use index to lookup matching pages - $pages = array(); - $pages = ft_pageLookup($id,true); - - // result contains matches in pages and namespaces - // we now extract the matching namespaces to show - // them seperately - $dirs = array(); - - - foreach($pages as $pid => $title){ - if(strpos(noNS($pid),$id) === false){ - // match was in the namespace - $dirs[getNS($pid)] = 1; // assoc array avoids dupes - }else{ - // it is a matching page, add it to the result - $data[] = array( - 'id' => $pid, - 'title' => $title, - 'type' => 'f', - ); - } - unset($pages[$pid]); - } - foreach($dirs as $dir => $junk){ - $data[] = array( - 'id' => $dir, - 'type' => 'd', - ); - } + global $conf; + global $lang; + + $q = ltrim($_POST['q'],':'); + $id = noNS($q); + $ns = getNS($q); + + $ns = cleanID($ns); + $id = cleanID($id); + + $nsd = utf8_encodeFN(str_replace(':','/',$ns)); + $idd = utf8_encodeFN(str_replace(':','/',$id)); + + $data = array(); + if($q && !$ns){ + + // use index to lookup matching pages + $pages = array(); + $pages = ft_pageLookup($id,true); + + // result contains matches in pages and namespaces + // we now extract the matching namespaces to show + // them seperately + $dirs = array(); + + foreach($pages as $pid => $title){ + if(strpos(noNS($pid),$id) === false){ + // match was in the namespace + $dirs[getNS($pid)] = 1; // assoc array avoids dupes + }else{ + // it is a matching page, add it to the result + $data[] = array( + 'id' => $pid, + 'title' => $title, + 'type' => 'f', + ); + } + unset($pages[$pid]); + } + foreach($dirs as $dir => $junk){ + $data[] = array( + 'id' => $dir, + 'type' => 'd', + ); + } - }else{ - - $opts = array( - 'depth' => 1, - 'listfiles' => true, - 'listdirs' => true, - 'pagesonly' => true, - 'firsthead' => true, - 'sneakyacl' => $conf['sneaky_index'], - ); - if($id) $opts['filematch'] = '^.*\/'.$id; - if($id) $opts['dirmatch'] = '^.*\/'.$id; - search($data,$conf['datadir'],'search_universal',$opts,$nsd); - - // add back to upper - if($ns){ - array_unshift($data,array( - 'id' => getNS($ns), - 'type' => 'u', - )); - } - } + }else{ - // fixme sort results in a useful way ? + $opts = array( + 'depth' => 1, + 'listfiles' => true, + 'listdirs' => true, + 'pagesonly' => true, + 'firsthead' => true, + 'sneakyacl' => $conf['sneaky_index'], + ); + if($id) $opts['filematch'] = '^.*\/'.$id; + if($id) $opts['dirmatch'] = '^.*\/'.$id; + search($data,$conf['datadir'],'search_universal',$opts,$nsd); + + // add back to upper + if($ns){ + array_unshift($data,array( + 'id' => getNS($ns), + 'type' => 'u', + )); + } + } - if(!count($data)){ - echo $lang['nothingfound']; - exit; - } + // fixme sort results in a useful way ? - // output the found data - $even = 1; - foreach($data as $item){ - $even *= -1; //zebra + if(!count($data)){ + echo $lang['nothingfound']; + exit; + } - if(($item['type'] == 'd' || $item['type'] == 'u') && $item['id']) $item['id'] .= ':'; - $link = wl($item['id']); + // output the found data + $even = 1; + foreach($data as $item){ + $even *= -1; //zebra - echo '
'; + if(($item['type'] == 'd' || $item['type'] == 'u') && $item['id']) $item['id'] .= ':'; + $link = wl($item['id']); + echo '
'; - if($item['type'] == 'u'){ - $name = $lang['upperns']; - }else{ - $name = htmlspecialchars($item['id']); - } + if($item['type'] == 'u'){ + $name = $lang['upperns']; + }else{ + $name = htmlspecialchars($item['id']); + } - echo ''.$name.''; + echo ''.$name.''; - if($item['title']){ - echo ''.htmlspecialchars($item['title']).''; + if($item['title']){ + echo ''.htmlspecialchars($item['title']).''; + } + echo '
'; } - echo '
'; - } } -- cgit v1.2.3 From 168cead4e4c7d7c79cc57fa557dd21428243b2f9 Mon Sep 17 00:00:00 2001 From: Christian Wichmann Date: Fri, 14 Jan 2011 11:22:52 +0100 Subject: German language update --- inc/lang/de/lang.php | 1 + lib/plugins/acl/lang/de/lang.php | 1 + lib/plugins/config/lang/de/lang.php | 2 ++ lib/plugins/plugin/lang/de/lang.php | 1 + lib/plugins/popularity/lang/de/lang.php | 1 + lib/plugins/revert/lang/de/lang.php | 1 + lib/plugins/usermanager/lang/de/lang.php | 1 + 7 files changed, 8 insertions(+) diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index c220b706d..a353b98ed 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -18,6 +18,7 @@ * @author Robert Bogenschneider * @author Robert Bogenschneider * @author Niels Lange + * @author Christian Wichmann */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/lib/plugins/acl/lang/de/lang.php b/lib/plugins/acl/lang/de/lang.php index 13b3f3f05..3c6bf8cf0 100644 --- a/lib/plugins/acl/lang/de/lang.php +++ b/lib/plugins/acl/lang/de/lang.php @@ -18,6 +18,7 @@ * @author Robert Bogenschneider * @author Robert Bogenschneider * @author Niels Lange + * @author Christian Wichmann */ $lang['admin_acl'] = 'Zugangsverwaltung'; $lang['acl_group'] = 'Gruppe'; diff --git a/lib/plugins/config/lang/de/lang.php b/lib/plugins/config/lang/de/lang.php index a5205c16b..b26df4993 100644 --- a/lib/plugins/config/lang/de/lang.php +++ b/lib/plugins/config/lang/de/lang.php @@ -14,6 +14,7 @@ * @author Robert Bogenschneider * @author Robert Bogenschneider * @author Niels Lange + * @author Christian Wichmann */ $lang['menu'] = 'Konfiguration'; $lang['error'] = 'Die Einstellungen wurden wegen einer fehlerhaften Eingabe nicht gespeichert. @@ -112,6 +113,7 @@ $lang['fetchsize'] = 'Maximale Größe (in Bytes), die fetch.php von $lang['notify'] = 'Änderungsmitteilungen an diese E-Mail-Adresse versenden'; $lang['registernotify'] = 'Information über neu registrierte Nutzer an diese E-Mail-Adresse senden'; $lang['mailfrom'] = 'Absender-E-Mail-Adresse für automatische Mails'; +$lang['mailprefix'] = 'Präfix für E-Mail-Betreff beim automatischen Versand von Benachrichtigungen'; $lang['gzip_output'] = 'Seiten mit gzip komprimiert ausliefern'; $lang['gdlib'] = 'GD Lib Version'; $lang['im_convert'] = 'Pfad zu ImageMagicks Konvertierwerkzeug'; diff --git a/lib/plugins/plugin/lang/de/lang.php b/lib/plugins/plugin/lang/de/lang.php index bbc3506f5..6f785168b 100644 --- a/lib/plugins/plugin/lang/de/lang.php +++ b/lib/plugins/plugin/lang/de/lang.php @@ -15,6 +15,7 @@ * @author Robert Bogenschneider * @author Robert Bogenschneider * @author Niels Lange + * @author Christian Wichmann */ $lang['menu'] = 'Plugins verwalten'; $lang['download'] = 'Neues Plugin herunterladen und installieren'; diff --git a/lib/plugins/popularity/lang/de/lang.php b/lib/plugins/popularity/lang/de/lang.php index b5094520b..4649062f7 100644 --- a/lib/plugins/popularity/lang/de/lang.php +++ b/lib/plugins/popularity/lang/de/lang.php @@ -12,6 +12,7 @@ * @author Robert Bogenschneider * @author Robert Bogenschneider * @author Niels Lange + * @author Christian Wichmann */ $lang['name'] = 'Popularitäts-Feedback (Eventuell längere Ladezeit)'; $lang['submit'] = 'Daten senden'; diff --git a/lib/plugins/revert/lang/de/lang.php b/lib/plugins/revert/lang/de/lang.php index 8918c8b28..0bc8e2ce0 100644 --- a/lib/plugins/revert/lang/de/lang.php +++ b/lib/plugins/revert/lang/de/lang.php @@ -13,6 +13,7 @@ * @author Robert Bogenschneider * @author Robert Bogenschneider * @author Niels Lange + * @author Christian Wichmann */ $lang['menu'] = 'Seiten wieder herstellen'; $lang['filter'] = 'Nach betroffenen Seiten suchen'; diff --git a/lib/plugins/usermanager/lang/de/lang.php b/lib/plugins/usermanager/lang/de/lang.php index 9ae049d3e..090d1d1d9 100644 --- a/lib/plugins/usermanager/lang/de/lang.php +++ b/lib/plugins/usermanager/lang/de/lang.php @@ -14,6 +14,7 @@ * @author Robert Bogenschneider * @author Robert Bogenschneider * @author Niels Lange + * @author Christian Wichmann */ $lang['menu'] = 'Benutzerverwaltung'; $lang['noauth'] = '(Authentifizierungssystem nicht verfügbar)'; -- cgit v1.2.3 From ef7acde6835f3eda384a189e4d6f2f86a3ad9d3c Mon Sep 17 00:00:00 2001 From: Christian Wichmann Date: Fri, 14 Jan 2011 11:23:23 +0100 Subject: German (informal) language update --- inc/lang/de-informal/lang.php | 72 +++++++++++----------- lib/plugins/acl/lang/de-informal/lang.php | 1 + lib/plugins/config/lang/de-informal/lang.php | 2 + lib/plugins/plugin/lang/de-informal/lang.php | 1 + lib/plugins/popularity/lang/de-informal/lang.php | 1 + .../popularity/lang/de-informal/submitted.txt | 3 + lib/plugins/revert/lang/de-informal/lang.php | 1 + lib/plugins/usermanager/lang/de-informal/lang.php | 1 + 8 files changed, 46 insertions(+), 36 deletions(-) create mode 100644 lib/plugins/popularity/lang/de-informal/submitted.txt diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index c79f26227..b7c446656 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -17,6 +17,7 @@ * @author Juergen Schwarzer * @author Marcel Metz * @author Matthias Schulte + * @author Christian Wichmann */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -107,27 +108,27 @@ $lang['js']['notsavedyet'] = 'Nicht gespeicherte Änderungen gehen verloren! $lang['js']['searchmedia'] = 'Suche nach Dateien'; $lang['js']['keepopen'] = 'Fenster nach Auswahl nicht schließen'; $lang['js']['hidedetails'] = 'Details ausblenden'; -$lang['js']['mediatitle'] = 'Link-Eigenschaften'; -$lang['js']['mediadisplay'] = 'Linktyp'; -$lang['js']['mediaalign'] = 'Ausrichtung'; -$lang['js']['mediasize'] = 'Bildgröße'; -$lang['js']['mediatarget'] = 'Linkziel'; -$lang['js']['mediaclose'] = 'Schließen'; -$lang['js']['mediainsert'] = 'Einfügen'; -$lang['js']['mediadisplayimg'] = 'Bild anzeigen.'; -$lang['js']['mediadisplaylnk'] = 'Nur den Link anzeigen.'; -$lang['js']['mediasmall'] = 'Kleine Version'; -$lang['js']['mediamedium'] = 'Mittelgroße Version'; -$lang['js']['medialarge'] = 'Große Version'; -$lang['js']['mediaoriginal'] = 'Original Version'; -$lang['js']['medialnk'] = 'Link zu der Detailseite'; -$lang['js']['mediadirect'] = 'Direkter Link zum Original'; -$lang['js']['medianolnk'] = 'Kein link'; -$lang['js']['medianolink'] = 'Keine Verlinkung des Bildes'; -$lang['js']['medialeft'] = 'Bild nach links ausrichten.'; -$lang['js']['mediaright'] = 'Bild nach rechts ausrichten.'; -$lang['js']['mediacenter'] = 'Bild in der Mitte ausrichten'; -$lang['js']['medianoalign'] = 'Keine Ausrichtung des Bildes.'; +$lang['js']['mediatitle'] = 'Link-Eigenschaften'; +$lang['js']['mediadisplay'] = 'Linktyp'; +$lang['js']['mediaalign'] = 'Ausrichtung'; +$lang['js']['mediasize'] = 'Bildgröße'; +$lang['js']['mediatarget'] = 'Linkziel'; +$lang['js']['mediaclose'] = 'Schließen'; +$lang['js']['mediainsert'] = 'Einfügen'; +$lang['js']['mediadisplayimg'] = 'Bild anzeigen.'; +$lang['js']['mediadisplaylnk'] = 'Nur den Link anzeigen.'; +$lang['js']['mediasmall'] = 'Kleine Version'; +$lang['js']['mediamedium'] = 'Mittelgroße Version'; +$lang['js']['medialarge'] = 'Große Version'; +$lang['js']['mediaoriginal'] = 'Original Version'; +$lang['js']['medialnk'] = 'Link zu der Detailseite'; +$lang['js']['mediadirect'] = 'Direkter Link zum Original'; +$lang['js']['medianolnk'] = 'Kein link'; +$lang['js']['medianolink'] = 'Keine Verlinkung des Bildes'; +$lang['js']['medialeft'] = 'Bild nach links ausrichten.'; +$lang['js']['mediaright'] = 'Bild nach rechts ausrichten.'; +$lang['js']['mediacenter'] = 'Bild in der Mitte ausrichten'; +$lang['js']['medianoalign'] = 'Keine Ausrichtung des Bildes.'; $lang['js']['nosmblinks'] = 'Das Verlinken von Windows-Freigaben funktioniert nur im Microsoft Internet-Explorer.\nDer Link kann jedoch durch Kopieren und Einfügen verwendet werden.'; $lang['js']['linkwiz'] = 'Link-Assistent'; $lang['js']['linkto'] = 'Link zu:'; @@ -148,7 +149,6 @@ $lang['uploadsize'] = 'Die hochgeladene Datei war zu groß. (max. %s) $lang['deletesucc'] = 'Die Datei "%s" wurde gelöscht.'; $lang['deletefail'] = '"%s" konnte nicht gelöscht werden. Keine Berechtigung?.'; $lang['mediainuse'] = 'Die Datei "%s" wurde nicht gelöscht. Sie wird noch verwendet.'; -$lang['mediainuse'] = 'Die Datei "%s" wurde nicht gelöscht. Sie wird noch verwendet.'; $lang['namespaces'] = 'Namensräume'; $lang['mediafiles'] = 'Vorhandene Dateien in'; $lang['accessdenied'] = 'Du hast keinen Zugriff auf diese Seite'; @@ -225,22 +225,22 @@ $lang['img_copyr'] = 'Copyright'; $lang['img_format'] = 'Format'; $lang['img_camera'] = 'Kamera'; $lang['img_keywords'] = 'Schlagwörter'; -$lang['subscr_subscribe_success'] = 'Die Seite %s wurde zur Abonnementenliste von %s hinzugefügt'; -$lang['subscr_subscribe_error'] = 'Fehler beim Hinzufügen von %s zur Abonnementenliste von %s'; +$lang['subscr_subscribe_success'] = 'Die Seite %s wurde zur Abonnementenliste von %s hinzugefügt'; +$lang['subscr_subscribe_error'] = 'Fehler beim Hinzufügen von %s zur Abonnementenliste von %s'; $lang['subscr_subscribe_noaddress'] = 'In deinem Account ist keine E-Mail-Adresse hinterlegt. Dadurch kann die Seite nicht abonniert werden'; $lang['subscr_unsubscribe_success'] = 'Die Seite %s wurde von der Abonnementenliste von %s entfernt'; -$lang['subscr_unsubscribe_error'] = 'Fehler beim Entfernen von %s von der Abonnementenliste von %s'; -$lang['subscr_already_subscribed'] = '%s ist bereits auf der Abonnementenliste von %s'; -$lang['subscr_not_subscribed'] = '%s ist nicht auf der Abonnementenliste von %s'; -$lang['subscr_m_not_subscribed'] = 'Du hast kein Abonnement von dieser Seite oder dem Namensraum.'; -$lang['subscr_m_new_header'] = 'Abonnementen hinzufügen'; -$lang['subscr_m_current_header'] = 'Aktive Abonnements'; -$lang['subscr_m_unsubscribe'] = 'Abbestellen'; -$lang['subscr_m_subscribe'] = 'Abonnieren'; -$lang['subscr_m_receive'] = 'Erhalten'; -$lang['subscr_style_every'] = 'E-Mail bei jeder Änderung'; -$lang['subscr_style_digest'] = 'E-Mail mit zusammengefasster Übersicht der Seitenänderungen (alle %.2f Tage)'; -$lang['subscr_style_list'] = 'Auflistung aller geänderten Seiten seit der letzten E-Mail (alle %.2f Tage)'; +$lang['subscr_unsubscribe_error'] = 'Fehler beim Entfernen von %s von der Abonnementenliste von %s'; +$lang['subscr_already_subscribed'] = '%s ist bereits auf der Abonnementenliste von %s'; +$lang['subscr_not_subscribed'] = '%s ist nicht auf der Abonnementenliste von %s'; +$lang['subscr_m_not_subscribed'] = 'Du hast kein Abonnement von dieser Seite oder dem Namensraum.'; +$lang['subscr_m_new_header'] = 'Abonnementen hinzufügen'; +$lang['subscr_m_current_header'] = 'Aktive Abonnements'; +$lang['subscr_m_unsubscribe'] = 'Abbestellen'; +$lang['subscr_m_subscribe'] = 'Abonnieren'; +$lang['subscr_m_receive'] = 'Erhalten'; +$lang['subscr_style_every'] = 'E-Mail bei jeder Änderung'; +$lang['subscr_style_digest'] = 'E-Mail mit zusammengefasster Übersicht der Seitenänderungen (alle %.2f Tage)'; +$lang['subscr_style_list'] = 'Auflistung aller geänderten Seiten seit der letzten E-Mail (alle %.2f Tage)'; $lang['authmodfailed'] = 'Benutzerüberprüfung nicht möglich. Bitte wende dich an den Admin.'; $lang['authtempfail'] = 'Benutzerüberprüfung momentan nicht möglich. Falls das Problem andauert, wende dich an den Admin.'; $lang['i_chooselang'] = 'Wähle deine Sprache'; diff --git a/lib/plugins/acl/lang/de-informal/lang.php b/lib/plugins/acl/lang/de-informal/lang.php index fdb6f5a89..e24584a55 100644 --- a/lib/plugins/acl/lang/de-informal/lang.php +++ b/lib/plugins/acl/lang/de-informal/lang.php @@ -6,6 +6,7 @@ * @author Juergen Schwarzer * @author Marcel Metz * @author Matthias Schulte + * @author Christian Wichmann */ $lang['admin_acl'] = 'Zugriffskontrollsystem Management'; $lang['acl_group'] = 'Gruppe'; diff --git a/lib/plugins/config/lang/de-informal/lang.php b/lib/plugins/config/lang/de-informal/lang.php index 01beeeeb9..f6ddaa8e9 100644 --- a/lib/plugins/config/lang/de-informal/lang.php +++ b/lib/plugins/config/lang/de-informal/lang.php @@ -6,6 +6,7 @@ * @author Juergen Schwarzer * @author Marcel Metz * @author Matthias Schulte + * @author Christian Wichmann */ $lang['menu'] = 'Einstellungen'; $lang['error'] = 'Einstellungen wurden nicht aktualisiert auf Grund eines ungültigen Wertes. Bitte überprüfe deine Änderungen und versuche es erneut.
Die/der ungültige(n) Wert(e) werden durch eine rote Umrandung hervorgehoben.'; @@ -102,6 +103,7 @@ $lang['fetchsize'] = 'Maximale Größe (in Bytes), die fetch.php von $lang['notify'] = 'Sende Änderungsbenachrichtigungen an diese E-Mail-Adresse.'; $lang['registernotify'] = 'Sende Information bei neu registrierten Benutzern an diese E-Mail-Adresse.'; $lang['mailfrom'] = 'Absenderadresse für automatisch erzeugte E-Mails'; +$lang['mailprefix'] = 'Präfix für E-Mail-Betreff beim automatischen Versand von Benachrichtigungen'; $lang['gzip_output'] = 'Seiten mit gzip komprimiert ausliefern'; $lang['gdlib'] = 'GD Lib Version'; $lang['im_convert'] = 'Pfad zu ImageMagicks Konvertierwerkzeug'; diff --git a/lib/plugins/plugin/lang/de-informal/lang.php b/lib/plugins/plugin/lang/de-informal/lang.php index 65050b896..3ba729fd6 100644 --- a/lib/plugins/plugin/lang/de-informal/lang.php +++ b/lib/plugins/plugin/lang/de-informal/lang.php @@ -6,6 +6,7 @@ * @author Juergen Schwarzer * @author Marcel Metz * @author Matthias Schulte + * @author Christian Wichmann */ $lang['menu'] = 'Plugins verwalten'; $lang['download'] = 'Herunterladen und installieren einer neuen Erweiterung'; diff --git a/lib/plugins/popularity/lang/de-informal/lang.php b/lib/plugins/popularity/lang/de-informal/lang.php index 61a7db7b1..f884ed690 100644 --- a/lib/plugins/popularity/lang/de-informal/lang.php +++ b/lib/plugins/popularity/lang/de-informal/lang.php @@ -6,6 +6,7 @@ * @author Juergen Schwarzer * @author Marcel Metz * @author Matthias Schulte + * @author Christian Wichmann */ $lang['name'] = 'Popularitätsrückmeldung (kann eine Weile dauern, bis es fertig geladen wurde)'; $lang['submit'] = 'Sende Daten'; diff --git a/lib/plugins/popularity/lang/de-informal/submitted.txt b/lib/plugins/popularity/lang/de-informal/submitted.txt new file mode 100644 index 000000000..e7b45b5b7 --- /dev/null +++ b/lib/plugins/popularity/lang/de-informal/submitted.txt @@ -0,0 +1,3 @@ +====== Popularitäts-Feedback ====== + +Die Daten wurden erfolgreich versandt. \ No newline at end of file diff --git a/lib/plugins/revert/lang/de-informal/lang.php b/lib/plugins/revert/lang/de-informal/lang.php index ac2f35e85..b6709d2fa 100644 --- a/lib/plugins/revert/lang/de-informal/lang.php +++ b/lib/plugins/revert/lang/de-informal/lang.php @@ -6,6 +6,7 @@ * @author Juergen Schwarzer * @author Marcel Metz * @author Matthias Schulte + * @author Christian Wichmann */ $lang['menu'] = 'Zurückstellungsmanager'; $lang['filter'] = 'Durchsuche als Spam markierte Seiten'; diff --git a/lib/plugins/usermanager/lang/de-informal/lang.php b/lib/plugins/usermanager/lang/de-informal/lang.php index e906c0cf8..95b36c60f 100644 --- a/lib/plugins/usermanager/lang/de-informal/lang.php +++ b/lib/plugins/usermanager/lang/de-informal/lang.php @@ -6,6 +6,7 @@ * @author Juergen Schwarzer * @author Marcel Metz * @author Matthias Schulte + * @author Christian Wichmann */ $lang['menu'] = 'Benutzerverwalter'; $lang['noauth'] = '(Benutzeranmeldung ist nicht verfügbar)'; -- cgit v1.2.3 From 5ba8d196ffe346ef6fbd8e6ffc11f0c849537ed3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 14 Jan 2011 12:20:19 +0100 Subject: shorten quicksearch namespaces in JavaScript This patch moves the shortening of namespaces in the quicksearch results to JavaScript. This makes it independend from used template and will always try to fill the width of the result pane correctly. Things missing: * Make it work with RTL-languages * Check Browser compatibility (only tested in Chrome so far) --- lib/scripts/ajax.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/lib/scripts/ajax.js b/lib/scripts/ajax.js index de009d448..761329f0f 100644 --- a/lib/scripts/ajax.js +++ b/lib/scripts/ajax.js @@ -31,6 +31,47 @@ addInitEvent(function () { outObj.innerHTML = data; outObj.style.display = 'block'; + outObj.style['white-space'] = 'nowrap'; + + // shorten namespaces if too long + var width = outObj.clientWidth; + var links = outObj.getElementsByTagName('a'); + for(var i=0; i 3) && links[i].offsetWidth > max ){ + if(runaway++ > 500) return; // just in case something went wrong + + if(eli){ + // elipsis already inserted + if( (eli - nsL) > (nsR - eli) ){ + // cut left + links[i].innerText = links[i].innerText.substring(0,eli-2)+ + links[i].innerText.substring(eli); + }else{ + // cut right + links[i].innerText = links[i].innerText.substring(0,eli+1)+ + links[i].innerText.substring(eli+2); + } + }else{ + // replace middle with ellipsis + var mid = Math.floor( nsL + ((nsR-nsL)/2) ); + links[i].innerText = links[i].innerText.substring(0,mid)+'…'+ + links[i].innerText.substring(mid+1); + } + eli = links[i].innerText.indexOf('…'); + nsL = links[i].innerText.indexOf('('); + nsR = links[i].innerText.indexOf(')'); + } + } + }; // attach eventhandler to search field -- cgit v1.2.3 From 301971b3769a2d1a440cf58fd84f2c100a1348e3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 14 Jan 2011 13:59:23 +0100 Subject: correctly(?) shorten namespaces for RTL langunages in quicksearch --- lib/scripts/ajax.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/scripts/ajax.js b/lib/scripts/ajax.js index 761329f0f..d752edb38 100644 --- a/lib/scripts/ajax.js +++ b/lib/scripts/ajax.js @@ -38,15 +38,23 @@ addInitEvent(function () { var links = outObj.getElementsByTagName('a'); for(var i=0; i 0) continue; var nsL = links[i].innerText.indexOf('('); var nsR = links[i].innerText.indexOf(')'); var eli = 0; var runaway = 0; - while( (nsR - nsL > 3) && links[i].offsetWidth > max ){ + while( (nsR - nsL > 3) && + ( + (!isRTL && links[i].offsetWidth > max) || + (isRTL && links[i].offsetLeft < 0) + ) + ){ if(runaway++ > 500) return; // just in case something went wrong if(eli){ -- cgit v1.2.3 From bced4159c8c5f1b4da2e98b2242c2ec1c09ec74e Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 14 Jan 2011 23:32:29 +0100 Subject: Deprecate $NS in doku.php $NS is only used in lib/exe/{ajax,mediamanager}.php when no $ID context is present. The two functions which use $NS in inc/template.php are only called through those both endpoints, not through doku.php. In doku.php, $ID is the only correct value, $NS is not kept synchronous with $ID. Use getNS($ID) in functions which are called through doku.php. --- doku.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doku.php b/doku.php index 816acd3da..b0312fb25 100644 --- a/doku.php +++ b/doku.php @@ -30,7 +30,10 @@ $old = error_reporting(E_ALL ^ E_NOTICE); //import variables $QUERY = trim($_REQUEST['id']); $ID = getID(); + +// deprecated 2011-01-14 $NS = getNS($ID); + $REV = $_REQUEST['rev']; $IDX = $_REQUEST['idx']; $DATE = $_REQUEST['date']; -- cgit v1.2.3 From d83e78edb7657053f07161bbace2dba26ee83905 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Jan 2011 09:46:17 +0100 Subject: added missing change for path length shortener in ajax backend --- lib/exe/ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 540399a59..1939a7bcb 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -66,7 +66,7 @@ function ajax_qsearch(){ } else { $ns = getNS($id); if($ns){ - $name = shorten(noNS($id), ' ('.$ns.')',30); + $name = noNS($id).' ('.$ns.')'; }else{ $name = $id; } -- cgit v1.2.3 From a8254dfa8d8e02d4ac011fe915f3dcb4fdf7a361 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Jan 2011 10:29:42 +0100 Subject: made ajax quicksearch its own object This makes it possible for plugin and template authors to overwrite or extend the quicksearch JavaScript logic. --- lib/scripts/ajax.js | 79 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/lib/scripts/ajax.js b/lib/scripts/ajax.js index d752edb38..44dcee999 100644 --- a/lib/scripts/ajax.js +++ b/lib/scripts/ajax.js @@ -5,30 +5,58 @@ * @author Andreas Gohr * @author Adrian Lang */ -addInitEvent(function () { +var ajax_quicksearch = { - var inID = 'qsearch__in'; - var outID = 'qsearch__out'; + inObj: null, + outObj: null, + sackObj: null, + delay: null, - var inObj = document.getElementById(inID); - var outObj = document.getElementById(outID); + init: function(inID, outID) { - // objects found? - if (inObj === null){ return; } - if (outObj === null){ return; } + this.inObj = $(inID); + this.outObj = $(outID); - function clear_results(){ - outObj.style.display = 'none'; - outObj.innerHTML = ''; - } + // objects found? + if (this.inObj === null) return; + if (this.outObj === null) return; + + // prepare AJAX + this.sackObj = new sack(DOKU_BASE + 'lib/exe/ajax.php'); + this.sackObj.AjaxFailedAlert = ''; + this.sackObj.encodeURIString = false; + this.sackObj.onCompletion = ajax_quicksearch.onCompletion; + + // attach eventhandler to search field + this.delay = new Delay(function () { + ajax_quicksearch.clear_results(); + var value = ajax_quicksearch.inObj.value; + if(value === ''){ return; } + ajax_quicksearch.sackObj.runAJAX('call=qsearch&q=' + encodeURI(value)); + }); + + addEvent(this.inObj, 'keyup', function () { + ajax_quicksearch.clear_results(); + ajax_quicksearch.delay.start(); + }); + + // attach eventhandler to output field + addEvent(this.outObj, 'click', function () { + ajax_quicksearch.outObj.style.display = 'none'; + }); + }, - var sack_obj = new sack(DOKU_BASE + 'lib/exe/ajax.php'); - sack_obj.AjaxFailedAlert = ''; - sack_obj.encodeURIString = false; - sack_obj.onCompletion = function () { - var data = sack_obj.response; + clear_results: function(){ + ajax_quicksearch.outObj.style.display = 'none'; + ajax_quicksearch.outObj.innerHTML = ''; + }, + + onCompletion: function() { + var data = this.response; // 'this' is sack context if (data === '') { return; } + var outObj = ajax_quicksearch.outObj; + outObj.innerHTML = data; outObj.style.display = 'block'; outObj.style['white-space'] = 'nowrap'; @@ -79,19 +107,12 @@ addInitEvent(function () { nsR = links[i].innerText.indexOf(')'); } } + } - }; - - // attach eventhandler to search field - var delay = new Delay(function () { - clear_results(); - var value = inObj.value; - if(value === ''){ return; } - sack_obj.runAJAX('call=qsearch&q=' + encodeURI(value)); - }); +}; - addEvent(inObj, 'keyup', function () {clear_results(); delay.start(); }); - // attach eventhandler to output field - addEvent(outObj, 'click', function () {outObj.style.display = 'none'; }); +addInitEvent(function(){ + ajax_quicksearch.init('qsearch__in','qsearch__out'); }); + -- cgit v1.2.3 From 99f04cb741f14f2ccea37163786f1ea4824c2eb0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Jan 2011 10:39:42 +0100 Subject: don't use » for non hierarchical breadcrumbs FS#2135 Not sure if this sympol is the best to use. I'm open for different suggestions. Template auhtors still can overwrite the symbol of course. --- inc/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/template.php b/inc/template.php index e4c74a714..6d25a7171 100644 --- a/inc/template.php +++ b/inc/template.php @@ -685,7 +685,7 @@ function tpl_searchform($ajax=true,$autocomplete=true){ * * @author Andreas Gohr */ -function tpl_breadcrumbs($sep='»'){ +function tpl_breadcrumbs($sep='♦'){ global $lang; global $conf; -- cgit v1.2.3 From ef7df687e4ebf910c7eb86b5a8b2a47b9d121917 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Jan 2011 11:28:59 +0100 Subject: added unit test for kmd5 password hashing --- _test/cases/inc/auth_password.test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_test/cases/inc/auth_password.test.php b/_test/cases/inc/auth_password.test.php index cb1cd5593..77ee9eed3 100644 --- a/_test/cases/inc/auth_password.test.php +++ b/_test/cases/inc/auth_password.test.php @@ -15,6 +15,7 @@ class auth_password_test extends UnitTestCase { 'crypt' => 'ablvoGr1hvZ5k', 'mysql' => '4a1fa3780bd6fd55', 'my411' => '*e5929347e25f82e19e4ebe92f1dc6b6e7c2dbd29', + 'kmd5' => 'a579299436d7969791189acadd86fcb716', ); @@ -22,7 +23,7 @@ class auth_password_test extends UnitTestCase { foreach($this->passes as $method => $hash){ $info = "testing method $method"; $this->signal('failinfo',$info); - $this->assertEqual(auth_cryptPassword('foo'.$method,$method,'abcdefgh'),$hash); + $this->assertEqual(auth_cryptPassword('foo'.$method,$method,'abcdefgh12345678912345678912345678'),$hash); } } -- cgit v1.2.3 From f91977c212fd1c1645f521f6190e1ec32259f7a2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Jan 2011 12:24:14 +0100 Subject: Added support for Wordpress' password hashing FS#2134 --- _test/cases/inc/auth_password.test.php | 7 +++++ inc/auth.php | 47 ++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/_test/cases/inc/auth_password.test.php b/_test/cases/inc/auth_password.test.php index 77ee9eed3..140c7c23e 100644 --- a/_test/cases/inc/auth_password.test.php +++ b/_test/cases/inc/auth_password.test.php @@ -16,6 +16,8 @@ class auth_password_test extends UnitTestCase { 'mysql' => '4a1fa3780bd6fd55', 'my411' => '*e5929347e25f82e19e4ebe92f1dc6b6e7c2dbd29', 'kmd5' => 'a579299436d7969791189acadd86fcb716', + 'pmd5' => '$P$abcdefgh1RC6Fd32heUzl7EYCG9uGw.', + 'hmd5' => '$H$abcdefgh1ZbJodHxmeXVAhEzTG7IAp.', ); @@ -39,6 +41,11 @@ class auth_password_test extends UnitTestCase { $this->assertTrue(auth_verifyPassword('foo','$1$$n1rTiFE0nRifwV/43bVon/')); } + function test_verifyPassword_fixedpmd5(){ + $this->assertTrue(auth_verifyPassword('test12345','$P$9IQRaTwmfeRo7ud9Fh4E2PdI0S3r.L0')); + $this->assertTrue(auth_verifyPassword('test12345','$H$9IQRaTwmfeRo7ud9Fh4E2PdI0S3r.L0')); + } + } //Setup VIM: ex: et ts=4 : diff --git a/inc/auth.php b/inc/auth.php index 83d1d4159..5cdcec830 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -937,6 +937,8 @@ function act_resendpwd(){ * mysql - MySQL password (old method) * my411 - MySQL 4.1.1 password * kmd5 - Salted MD5 hashing as used by UNB + * pmd5 - Salted multi iteration MD5 as used by Wordpress + * hmd5 - Same as pmd5 but PhpBB3 flavour * * @author Andreas Gohr * @return string The crypted password @@ -1016,6 +1018,45 @@ function auth_cryptPassword($clear,$method='',$salt=null){ $hash1 = strtolower(md5($key . md5($clear))); $hash2 = substr($hash1, 0, 16) . $key . substr($hash1, 16); return $hash2; + case 'hmd5': + $key = 'H'; + // hmd5 is exactly the same as pmd5, but uses an H as identifier + // PhpBB3 uses it that way, so we just fall through here + case 'pmd5': + if(!$key) $key = 'P'; + $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; + $iterc = $salt[0]; // pos 0 of salt is iteration count + $iter = strpos($itoa64,$iterc); + $iter = 1 << $iter; + $salt = substr($salt,1,8); + + // iterate + $hash = md5($salt . $clear, true); + do { + $hash = md5($hash . $clear, true); + } while (--$iter); + + // encode + $output = ''; + $count = 16; + $i = 0; + do { + $value = ord($hash[$i++]); + $output .= $itoa64[$value & 0x3f]; + if ($i < $count) + $value |= ord($hash[$i]) << 8; + $output .= $itoa64[($value >> 6) & 0x3f]; + if ($i++ >= $count) + break; + if ($i < $count) + $value |= ord($hash[$i]) << 16; + $output .= $itoa64[($value >> 12) & 0x3f]; + if ($i++ >= $count) + break; + $output .= $itoa64[($value >> 18) & 0x3f]; + } while ($i < $count); + + return '$'.$key.'$'.$iterc.$salt.$output; default: msg("Unsupported crypt method $method",-1); } @@ -1043,6 +1084,12 @@ function auth_verifyPassword($clear,$crypt){ }elseif(preg_match('/^\$apr1\$([^\$]{0,8})\$/',$crypt,$m)){ $method = 'apr1'; $salt = $m[1]; + }elseif(preg_match('/^\$P\$(.{31})$/',$crypt,$m)){ + $method = 'pmd5'; + $salt = $m[1]; + }elseif(preg_match('/^\$H\$(.{31})$/',$crypt,$m)){ + $method = 'hmd5'; + $salt = $m[1]; }elseif(substr($crypt,0,6) == '{SSHA}'){ $method = 'ssha'; $salt = substr(base64_decode(substr($crypt, 6)),20); -- cgit v1.2.3 From 0c94c420c9dc14fc16700de5cca04959ca38e2c1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 15 Jan 2011 12:25:58 +0100 Subject: Added hmd5 and pmd5 as passcrypt choices in config manager --- lib/plugins/config/settings/config.metadata.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index f5eb1da18..af7e63a61 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -122,7 +122,7 @@ $meta['_authentication'] = array('fieldset'); $meta['useacl'] = array('onoff'); $meta['autopasswd'] = array('onoff'); $meta['authtype'] = array('authtype'); -$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','apr1','sha1','ssha','crypt','mysql','my411','kmd5')); +$meta['passcrypt'] = array('multichoice','_choices' => array('smd5','md5','apr1','sha1','ssha','crypt','mysql','my411','kmd5','pmd5','hmd5')); $meta['defaultgroup']= array('string'); $meta['superuser'] = array('string'); $meta['manager'] = array('string'); -- cgit v1.2.3 From b2665af72cdba76ca409b7e00e150746f2f83ced Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 27 Dec 2010 22:53:18 +0100 Subject: Handle renamed authorization variables Sometimes (when using rewriting with the workaround for CGI mode described at http://www.besthostratings.com/articles/http-auth-php-cgi.html) the HTTP_AUTHORIZATION variable is renamed, this change detects this renaming and uses the renamed variable. --- inc/auth.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/auth.php b/inc/auth.php index 5cdcec830..38d1c925d 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -70,6 +70,12 @@ function auth_setup(){ $_REQUEST['http_credentials'] = false; if (!$conf['rememberme']) $_REQUEST['r'] = false; + // handle renamed HTTP_AUTHORIZATION variable (can happen when a fix like + // the one presented at + // http://www.besthostratings.com/articles/http-auth-php-cgi.html is used + // for enabling HTTP authentication with CGI/SuExec) + if(isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) + $_SERVER['HTTP_AUTHORIZATION'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; // streamline HTTP auth credentials (IIS/rewrite -> mod_php) if(isset($_SERVER['HTTP_AUTHORIZATION'])){ list($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']) = -- cgit v1.2.3 From 278a5eb294b2df859c7eb20c6e35e32280a8b613 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 15 Jan 2011 12:18:09 +0100 Subject: Remove superfluous headers, fix XML-RPC with gzip enabled This removes headers that are sent by PHP/the webserver anyway as they are possibly wrong as e.g. when gzip compression is enabled in inc/init.php (which does happen when the client supports gzip) the content size is smaller than the one that was specified by the content-length header and thus e.g. the Python XML-RPC client fails with an error message because of the size mismatch. Additionally the content encoding is now set to utf-8 in the http headers. --- inc/IXR_Library.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/inc/IXR_Library.php b/inc/IXR_Library.php index c7f83a6d6..c8255e6d9 100644 --- a/inc/IXR_Library.php +++ b/inc/IXR_Library.php @@ -395,13 +395,8 @@ EOD; $this->output($error->getXml()); } function output($xml) { - $xml = ''."\n".$xml; - $length = strlen($xml); - header('Connection: close'); - header('Content-Length: '.$length); - header('Content-Type: text/xml'); - header('Date: '.date('r')); - echo $xml; + header('Content-Type: text/xml; charset=utf-8'); + echo '', "\n", $xml; exit; } function hasMethod($method) { -- cgit v1.2.3 From 876d3278dce690fbf6a38e29a82e8bad24813fe7 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 16 Jan 2011 11:25:46 +0100 Subject: Revert "tmp: disable notices in doku.php" This reverts commit 58a22bd0570451af9e62b659343dd47a26bacb3f. It was accidentally pushed to the repo. --- doku.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/doku.php b/doku.php index b0312fb25..d7d270d40 100644 --- a/doku.php +++ b/doku.php @@ -26,7 +26,6 @@ if (isset($_SERVER['HTTP_X_DOKUWIKI_DO'])){ // load and initialize the core system require_once(DOKU_INC.'inc/init.php'); -$old = error_reporting(E_ALL ^ E_NOTICE); //import variables $QUERY = trim($_REQUEST['id']); $ID = getID(); @@ -47,7 +46,6 @@ if (isset($_POST['wikitext'])) { $PRE = cleanText(substr($_POST['prefix'], 0, -1)); $SUF = cleanText($_POST['suffix']); $SUM = $_REQUEST['summary']; -error_reporting($old); //sanitize revision $REV = preg_replace('/[^0-9]/','',$REV); -- cgit v1.2.3 From eff795ac6482d5885761f6688ce183c66becd7e1 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 16 Jan 2011 13:30:49 +0100 Subject: Fix several security issues in the XML-RPC interface For locks and getRevisions there hasn't been any acl check. In many other cases the id hadn't been cleaned before the acl check was done which means that many acl rules that should be applied weren't applied. So e.g. when you have read permissions for the root namespace but not for a subnamespace you could add a leading ":" and the permissions for the root namespace will be used instead of the permissions for the subnamespace. This did not apply to writing pages and reading media files, but writing and deleting media files have been concerned as well as reading both plain and html versions of pages. This only concerns installations where XML-RPC is enabled (default is disabled) and XML-RPC is allowed for all or untrusted users. --- lib/exe/xmlrpc.php | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/lib/exe/xmlrpc.php b/lib/exe/xmlrpc.php index d232930a3..d40e338b2 100644 --- a/lib/exe/xmlrpc.php +++ b/lib/exe/xmlrpc.php @@ -296,6 +296,7 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { * Return a raw wiki page */ function rawPage($id,$rev=''){ + $id = cleanID($id); if(auth_quickaclcheck($id) < AUTH_READ){ return new IXR_Error(1, 'You are not allowed to read this page'); } @@ -351,6 +352,7 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { * Return a wiki page rendered to html */ function htmlPage($id,$rev=''){ + $id = cleanID($id); if(auth_quickaclcheck($id) < AUTH_READ){ return new IXR_Error(1, 'You are not allowed to read this page'); } @@ -488,6 +490,7 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { * Return some basic data about a page */ function pageInfo($id,$rev=''){ + $id = cleanID($id); if(auth_quickaclcheck($id) < AUTH_READ){ return new IXR_Error(1, 'You are not allowed to read this page'); } @@ -601,6 +604,7 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { * Michael Klier */ function putAttachment($id, $file, $params) { + $id = cleanID($id); global $conf; global $lang; @@ -668,6 +672,7 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { * @author Gina Haeussge */ function deleteAttachment($id){ + $id = cleanID($id); $auth = auth_quickaclcheck(getNS($id).':*'); if($auth < AUTH_DELETE) return new IXR_ERROR(1, "You don't have permissions to delete files."); global $conf; @@ -725,6 +730,7 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { * Returns the permissions of a given wiki page */ function aclCheck($id) { + $id = cleanID($id); return auth_quickaclcheck($id); } @@ -734,13 +740,14 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { * @author Michael Klier */ function listLinks($id) { + $id = cleanID($id); if(auth_quickaclcheck($id) < AUTH_READ){ return new IXR_Error(1, 'You are not allowed to read this page'); } $links = array(); // resolve page instructions - $ins = p_cached_instructions(wikiFN(cleanID($id))); + $ins = p_cached_instructions(wikiFN($id)); // instantiate new Renderer - needed for interwiki links include(DOKU_INC.'inc/parser/xhtml.php'); @@ -848,6 +855,10 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { * @author Michael Klier */ function pageVersions($id, $first) { + $id = cleanID($id); + if(auth_quickaclcheck($id) < AUTH_READ){ + return new IXR_Error(1, 'You are not allowed to read this page'); + } global $conf; $versions = array(); @@ -923,7 +934,8 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { $unlockfail = array(); foreach((array) $set['lock'] as $id){ - if(checklock($id)){ + $id = cleanID($id); + if(auth_quickaclcheck($id) < AUTH_EDIT || checklock($id)){ $lockfail[] = $id; }else{ lock($id); @@ -932,10 +944,11 @@ class dokuwiki_xmlrpc_server extends IXR_IntrospectionServer { } foreach((array) $set['unlock'] as $id){ - if(unlock($id)){ - $unlocked[] = $id; - }else{ + $id = cleanID($id); + if(auth_quickaclcheck($id) < AUTH_EDIT || !unlock($id)){ $unlockfail[] = $id; + }else{ + $unlocked[] = $id; } } -- cgit v1.2.3 From dbd545d51b77a8684d6790ee5283b520884dd79f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 16 Jan 2011 18:46:26 +0100 Subject: increased msg count --- doku.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doku.php b/doku.php index d7d270d40..6cd0c0e0c 100644 --- a/doku.php +++ b/doku.php @@ -7,7 +7,7 @@ */ // update message version -$updateVersion = 29; +$updateVersion = 30; // xdebug_start_profiling(); -- cgit v1.2.3 From 1b052f5cb72bee256af579602cbbed59492b2759 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 16 Jan 2011 19:29:03 +0100 Subject: increase indexer version to reforce rebuild for the new title index --- lib/exe/indexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 58b0d0787..eec8c968c 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -12,7 +12,7 @@ session_write_close(); //close session if(!defined('NL')) define('NL',"\n"); // Version tag used to force rebuild on upgrade -define('INDEXER_VERSION', 2); +define('INDEXER_VERSION', 3); // keep running after browser closes connection @ignore_user_abort(true); -- cgit v1.2.3 From 204b27c8e0c1bcfa6810ee45bd12fda3f5d83960 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 16 Jan 2011 22:23:54 +0100 Subject: Fix getBaseURL for literal IPv6 addresses in URLs (RFC 2732) + test case --- _test/cases/inc/init_getbaseurl.test.php | 25 +++++++++++++++++++++++++ inc/init.php | 13 +++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/_test/cases/inc/init_getbaseurl.test.php b/_test/cases/inc/init_getbaseurl.test.php index d9c76801f..a22172feb 100644 --- a/_test/cases/inc/init_getbaseurl.test.php +++ b/_test/cases/inc/init_getbaseurl.test.php @@ -275,6 +275,31 @@ class init_getBaseURL_test extends UnitTestCase { $this->assertEqual(getBaseURL(true),$correct_result); } } + + /** + * Absolute URL with IPv6 domain name. + * lighttpd, fastcgi + * + * data provided by Michael Hamann + */ + function test12() { + global $conf; + $conf['basedir'] = ''; + $conf['baseurl'] = ''; + $conf['canonical'] = 0; + + $_SERVER['DOCUMENT_ROOT'] = '/srv/http/'; + $_SERVER['HTTP_HOST'] = '[fd00::6592:39ed:a2ed:2c78]'; + $_SERVER['SCRIPT_FILENAME'] = '/srv/http/~michitux/dokuwiki/doku.php'; + $_SERVER['REQUEST_URI'] = '/~michitux/dokuwiki/doku.php?do=debug'; + $_SERVER['SCRIPT_NAME'] = '/~michitux/dokuwiki/doku.php'; + $_SERVER['PATH_INFO'] = null; + $_SERVER['PATH_TRANSLATED'] = null; + $_SERVER['PHP_SELF'] = '/~michitux/dokuwiki/doku.php'; + $_SERVER['SERVER_PORT'] = '80'; + $_SERVER['SERVER_NAME'] = '[fd00'; + $this->assertEqual(getBaseURL(true), 'http://[fd00::6592:39ed:a2ed:2c78]/~michitux/dokuwiki/'); + } } //Setup VIM: ex: et ts=2 : diff --git a/inc/init.php b/inc/init.php index 3b438f15b..6f4ba1ca9 100644 --- a/inc/init.php +++ b/inc/init.php @@ -420,9 +420,13 @@ function getBaseURL($abs=null){ //split hostheader into host and port if(isset($_SERVER['HTTP_HOST'])){ - list($host,$port) = explode(':',$_SERVER['HTTP_HOST']); + $parsed_host = parse_url('http://'.$_SERVER['HTTP_HOST']); + $host = $parsed_host['host']; + $port = $parsed_host['port']; }elseif(isset($_SERVER['SERVER_NAME'])){ - list($host,$port) = explode(':',$_SERVER['SERVER_NAME']); + $parsed_host = parse_url('http://'.$_SERVER['SERVER_NAME']); + $host = $parsed_host['host']; + $port = $parsed_host['port']; }else{ $host = php_uname('n'); $port = ''; @@ -431,6 +435,11 @@ function getBaseURL($abs=null){ if(!$port && isset($_SERVER['SERVER_PORT'])) { $port = $_SERVER['SERVER_PORT']; } + + if(is_null($port)){ + $port = ''; + } + if(!is_ssl()){ $proto = 'http://'; if ($port == '80') { -- cgit v1.2.3 From 820923f1328bcfe6002831570eb65238411c5b70 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Tue, 18 Jan 2011 00:04:41 +0100 Subject: Revert "tmp" for inc/html.php as it breaks the diff output This reverts commit fa7c70ff4d7f9999466436e7d559eb0c81571779. --- inc/html.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/inc/html.php b/inc/html.php index 67b1c10b7..bd87ee7a1 100644 --- a/inc/html.php +++ b/inc/html.php @@ -876,7 +876,7 @@ function html_diff($text='',$intro=true){ // array in rev2. $rev1 = $REV; - if (is_array($_REQUEST['rev2'])){ + if(is_array($_REQUEST['rev2'])){ $rev1 = (int) $_REQUEST['rev2'][0]; $rev2 = (int) $_REQUEST['rev2'][1]; @@ -948,12 +948,8 @@ function html_diff($text='',$intro=true){ '
'.$l_user.' '.$l_sum; } - $_r_rev = $r_rev; - if (!$_r_rev) { - $_r_rev = @filemtime(wikiFN($ID)); - } - if($_r_rev){ - $r_info = getRevisionInfo($ID,$_r_rev,true); + if($r_rev){ + $r_info = getRevisionInfo($ID,$r_rev,true); if($r_info['user']){ $r_user = editorinfo($r_info['user']); if(auth_ismanager()) $r_user .= ' ('.$r_info['ip'].')'; -- cgit v1.2.3 From 7ec569933a6fe3e3ad1f473f1f68c43e54baa11d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 22 Jan 2011 13:17:54 +0100 Subject: use • as breadcrumb separator --- inc/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/template.php b/inc/template.php index 6d25a7171..ad9a454b4 100644 --- a/inc/template.php +++ b/inc/template.php @@ -685,7 +685,7 @@ function tpl_searchform($ajax=true,$autocomplete=true){ * * @author Andreas Gohr */ -function tpl_breadcrumbs($sep='♦'){ +function tpl_breadcrumbs($sep='•'){ global $lang; global $conf; -- cgit v1.2.3 From e6aac8cd181c0f27347f316a04ac968c649d20e7 Mon Sep 17 00:00:00 2001 From: Ladyko Andrey Date: Sat, 22 Jan 2011 13:24:38 +0100 Subject: Russian language update --- inc/lang/ru/lang.php | 1 + inc/lang/ru/subscr_list.txt | 1 - lib/plugins/acl/lang/ru/lang.php | 1 + lib/plugins/config/lang/ru/lang.php | 2 ++ lib/plugins/plugin/lang/ru/lang.php | 1 + lib/plugins/popularity/lang/ru/lang.php | 1 + lib/plugins/popularity/lang/ru/submitted.txt | 2 ++ lib/plugins/revert/lang/ru/lang.php | 1 + lib/plugins/usermanager/lang/ru/lang.php | 1 + 9 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 lib/plugins/popularity/lang/ru/submitted.txt diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index 2968d72bd..fc9e53b3a 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -17,6 +17,7 @@ * @author Vlad Tsybenko * @author Aleksey Osadchiy * @author Aleksandr Selivanov + * @author Ladyko Andrey */ $lang['encoding'] = ' utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/ru/subscr_list.txt b/inc/lang/ru/subscr_list.txt index df5c2aa54..41e1323bc 100644 --- a/inc/lang/ru/subscr_list.txt +++ b/inc/lang/ru/subscr_list.txt @@ -1,4 +1,3 @@ - Привет. Страницы в пространстве имён @PAGE@ в вики @TITLE@ были изменены. diff --git a/lib/plugins/acl/lang/ru/lang.php b/lib/plugins/acl/lang/ru/lang.php index f49e4b55a..20e887240 100644 --- a/lib/plugins/acl/lang/ru/lang.php +++ b/lib/plugins/acl/lang/ru/lang.php @@ -13,6 +13,7 @@ * @author Vlad Tsybenko * @author Aleksey Osadchiy * @author Aleksandr Selivanov + * @author Ladyko Andrey */ $lang['admin_acl'] = 'Управление списками контроля доступа'; $lang['acl_group'] = 'Группа'; diff --git a/lib/plugins/config/lang/ru/lang.php b/lib/plugins/config/lang/ru/lang.php index 5e624eda0..47cb09a0a 100644 --- a/lib/plugins/config/lang/ru/lang.php +++ b/lib/plugins/config/lang/ru/lang.php @@ -14,6 +14,7 @@ * @author Vlad Tsybenko * @author Aleksey Osadchiy * @author Aleksandr Selivanov + * @author Ladyko Andrey */ $lang['menu'] = 'Настройки вики'; $lang['error'] = 'Настройки не были сохранены из-за ошибки в одном из значений. Пожалуйста, проверьте свои изменения и попробуйте ещё раз.
Неправильные значения будут обведены красной рамкой.'; @@ -110,6 +111,7 @@ $lang['fetchsize'] = 'Максимальный размер файл $lang['notify'] = 'Электронный адрес для извещений'; $lang['registernotify'] = 'Посылать информацию о новых зарегистрированных пользователях на этот электронный адрес'; $lang['mailfrom'] = 'Электронный адрес вики (От:)'; +$lang['mailprefix'] = 'Префикс используемый для автоматического письма станет темой сообщений'; $lang['gzip_output'] = 'Использовать gzip-сжатие для xhtml'; $lang['gdlib'] = 'Версия LibGD'; $lang['im_convert'] = 'Путь к ImageMagick'; diff --git a/lib/plugins/plugin/lang/ru/lang.php b/lib/plugins/plugin/lang/ru/lang.php index ed1fc22b3..b4f39beeb 100644 --- a/lib/plugins/plugin/lang/ru/lang.php +++ b/lib/plugins/plugin/lang/ru/lang.php @@ -14,6 +14,7 @@ * @author Vlad Tsybenko * @author Aleksey Osadchiy * @author Aleksandr Selivanov + * @author Ladyko Andrey */ $lang['menu'] = 'Управление плагинами'; $lang['download'] = 'Скачать и установить новый плагин'; diff --git a/lib/plugins/popularity/lang/ru/lang.php b/lib/plugins/popularity/lang/ru/lang.php index b63558134..257326310 100644 --- a/lib/plugins/popularity/lang/ru/lang.php +++ b/lib/plugins/popularity/lang/ru/lang.php @@ -11,6 +11,7 @@ * @author Vlad Tsybenko * @author Aleksey Osadchiy * @author Aleksandr Selivanov + * @author Ladyko Andrey */ $lang['name'] = 'Сбор информации о популярности (для загрузки может потребоваться некоторое время)'; $lang['submit'] = 'Отправить данные'; diff --git a/lib/plugins/popularity/lang/ru/submitted.txt b/lib/plugins/popularity/lang/ru/submitted.txt new file mode 100644 index 000000000..a239943a4 --- /dev/null +++ b/lib/plugins/popularity/lang/ru/submitted.txt @@ -0,0 +1,2 @@ +====== Общественная обратная связь ====== +Данные были успешно отправлены. \ No newline at end of file diff --git a/lib/plugins/revert/lang/ru/lang.php b/lib/plugins/revert/lang/ru/lang.php index 712a41f08..8208377b1 100644 --- a/lib/plugins/revert/lang/ru/lang.php +++ b/lib/plugins/revert/lang/ru/lang.php @@ -12,6 +12,7 @@ * @author Vlad Tsybenko * @author Aleksey Osadchiy * @author Aleksandr Selivanov + * @author Ladyko Andrey */ $lang['menu'] = 'Менеджер откаток'; $lang['filter'] = 'Поиск спам-страниц'; diff --git a/lib/plugins/usermanager/lang/ru/lang.php b/lib/plugins/usermanager/lang/ru/lang.php index d7a0591ab..f6137aab7 100644 --- a/lib/plugins/usermanager/lang/ru/lang.php +++ b/lib/plugins/usermanager/lang/ru/lang.php @@ -14,6 +14,7 @@ * @author Vlad Tsybenko * @author Aleksey Osadchiy * @author Aleksandr Selivanov + * @author Ladyko Andrey */ $lang['menu'] = 'Управление пользователями'; $lang['noauth'] = '(авторизация пользователей недоступна)'; -- cgit v1.2.3 From 3bfb17c905aee9d0b5b237e017631271c4b53608 Mon Sep 17 00:00:00 2001 From: danny0838 Date: Sat, 22 Jan 2011 13:26:10 +0100 Subject: Traditional Chinese update --- inc/lang/zh-tw/conflict.txt | 5 +- inc/lang/zh-tw/denied.txt | 4 +- inc/lang/zh-tw/diff.txt | 2 +- inc/lang/zh-tw/edit.txt | 2 +- inc/lang/zh-tw/editrev.txt | 2 +- inc/lang/zh-tw/index.txt | 4 +- inc/lang/zh-tw/install.html | 10 +- inc/lang/zh-tw/lang.php | 161 ++++++++++++++---------- inc/lang/zh-tw/locked.txt | 4 +- inc/lang/zh-tw/login.txt | 2 +- inc/lang/zh-tw/mailtext.txt | 18 +-- inc/lang/zh-tw/newpage.txt | 4 +- inc/lang/zh-tw/norev.txt | 5 +- inc/lang/zh-tw/password.txt | 2 +- inc/lang/zh-tw/pwconfirm.txt | 6 +- inc/lang/zh-tw/read.txt | 4 +- inc/lang/zh-tw/register.txt | 3 +- inc/lang/zh-tw/registermail.txt | 4 +- inc/lang/zh-tw/searchpage.txt | 2 +- inc/lang/zh-tw/showrev.txt | 2 +- inc/lang/zh-tw/subscr_digest.txt | 19 +++ inc/lang/zh-tw/subscr_form.txt | 3 + inc/lang/zh-tw/subscr_list.txt | 19 +++ inc/lang/zh-tw/subscr_single.txt | 22 ++++ inc/lang/zh-tw/updateprofile.txt | 4 +- inc/lang/zh-tw/uploadmail.txt | 4 +- lib/plugins/acl/lang/zh-tw/lang.php | 3 +- lib/plugins/config/lang/zh-tw/intro.txt | 6 +- lib/plugins/config/lang/zh-tw/lang.php | 168 +++++++++++++------------ lib/plugins/plugin/lang/zh-tw/admin_plugin.txt | 2 +- lib/plugins/plugin/lang/zh-tw/lang.php | 35 +++--- lib/plugins/popularity/lang/zh-tw/intro.txt | 6 +- lib/plugins/popularity/lang/zh-tw/lang.php | 3 +- lib/plugins/revert/lang/zh-tw/intro.txt | 3 +- lib/plugins/revert/lang/zh-tw/lang.php | 7 +- lib/plugins/usermanager/lang/zh-tw/lang.php | 3 +- 36 files changed, 328 insertions(+), 225 deletions(-) create mode 100644 inc/lang/zh-tw/subscr_digest.txt create mode 100644 inc/lang/zh-tw/subscr_form.txt create mode 100644 inc/lang/zh-tw/subscr_list.txt create mode 100644 inc/lang/zh-tw/subscr_single.txt diff --git a/inc/lang/zh-tw/conflict.txt b/inc/lang/zh-tw/conflict.txt index e52613dc8..4f31f665f 100644 --- a/inc/lang/zh-tw/conflict.txt +++ b/inc/lang/zh-tw/conflict.txt @@ -1,4 +1,5 @@ -====== 有一個更新的版本已存在 ====== +====== 已存在更新版本 ====== -有一個您所編輯的更新版本已經存在了。\\ 這狀況之所以會發生:乃是因為當您正在編修它的時候,而其他使用者已變更這份文件。\\ 請檢驗以下的差異,然後決定要用哪一份。\\ 若您選擇「''儲存''」,那您的版本就會被存下來了。而「取消」則會保留為現在這版本。 +此檔案已存在更新的版本。這是因為有其他使用者在您編輯時變更了這份文件。 +請仔細檢查以下差異,再決定保留哪份。您可選擇「儲存」您的版本或「取消」保留目前版本。 \ No newline at end of file diff --git a/inc/lang/zh-tw/denied.txt b/inc/lang/zh-tw/denied.txt index 20c512abc..5a4d483a5 100644 --- a/inc/lang/zh-tw/denied.txt +++ b/inc/lang/zh-tw/denied.txt @@ -1,4 +1,4 @@ -====== 拒絕尚未授權 ====== +====== 權限拒絕 ====== -很抱歉您權限不夠以致無法繼續。或許您忘了先登入您的帳號嗎? +抱歉,您沒有足夠權限繼續執行。或許您忘了登入? diff --git a/inc/lang/zh-tw/diff.txt b/inc/lang/zh-tw/diff.txt index a064f81ed..b2b662ec3 100644 --- a/inc/lang/zh-tw/diff.txt +++ b/inc/lang/zh-tw/diff.txt @@ -1,4 +1,4 @@ ====== 差異處 ====== -這裡會顯示出所選的版次與目前版次的差異處。 +這裡顯示二個版本的差異處。 diff --git a/inc/lang/zh-tw/edit.txt b/inc/lang/zh-tw/edit.txt index 5be7fbb4e..768b06ce3 100644 --- a/inc/lang/zh-tw/edit.txt +++ b/inc/lang/zh-tw/edit.txt @@ -1 +1 @@ -提示:編修本頁並按「''儲存''」即可。 不懂 Wiki 語法?沒關係點一下 [[wiki:syntax|中文語法]] 。若您覺得可讓本文品質「**更好**」的話,那就請繼續吧 :) \\    但若只想練習或測試東西的話,那麼請先多利用 [[playground:playground|新手試煉場]] 來試煉您的身手吧。 +編輯本頁並按下''儲存''即可。可在[[wiki:syntax|維基語法]]找到語法說明。請您只在您能讓本文品質「**更好**」時才編輯。若您只是要測試,請使用 [[playground:playground|新手試煉場]]。 diff --git a/inc/lang/zh-tw/editrev.txt b/inc/lang/zh-tw/editrev.txt index b344e0772..96f9a7c6a 100644 --- a/inc/lang/zh-tw/editrev.txt +++ b/inc/lang/zh-tw/editrev.txt @@ -1,2 +1,2 @@ -**您目前載入的是本份文件的舊版!!** 若存檔的話,那這些資料就會被存成另一份了喔。 +**您目前載入的是本份文件的舊版!** 您如果存檔,這些資料就會被存成另一份。 ---- diff --git a/inc/lang/zh-tw/index.txt b/inc/lang/zh-tw/index.txt index 961095bff..11ec223d9 100644 --- a/inc/lang/zh-tw/index.txt +++ b/inc/lang/zh-tw/index.txt @@ -1,3 +1,3 @@ -====== 索引頁 ====== +====== 站台地圖 ====== -目前您所看到的是用 [[doku>namespaces|namespaces]] 來排序目前所有可用的頁面清單。\\ 請直接按您想要的頁面或者用「顯示頁面」來檢視目前所在頁面 +這個站台地圖列出了所有允許的頁面,依 [[doku>namespaces|命名空間]] 排序。 diff --git a/inc/lang/zh-tw/install.html b/inc/lang/zh-tw/install.html index 879c152b5..88af0b394 100644 --- a/inc/lang/zh-tw/install.html +++ b/inc/lang/zh-tw/install.html @@ -1,8 +1,8 @@ -

本页面旨在帮助您完成第一次安装和配置 Dokuwiki。关于安装工具的更多信息请参阅其 官方文档页面

+

本頁面旨在幫助您完成第一次安装和配置 Dokuwiki。關於安裝工具的更多訊息請參閱 官方文檔頁面

-

DokuWiki 使用普通的文件保存维基页面和其他与这些页面挂钩的信息(例如:图像,搜索索引,修订记录等)。为了能正常运行,DokuWiki 必须 拥有针对那些路径和文件的写权限。本安装工具不能用于设置这些权限。对权限的操作通常通过命令行或使用您的网络服务提供商的 FTP 或控制面板(例如 cPanel)进行操作。

+

DokuWiki 使用普通檔案儲存維基頁面以及與頁面相關的訊息(例如:圖像,搜尋索引,修訂記錄等)。為了正常運作,DokuWiki 必須 擁有針對那些路徑和檔案的寫入權限。本安裝工具無法設定目錄權限,這通常要透過命令行、FTP 或您主機上的控制台(如cPanel)進行。

-

本安装工具将设置您的 DokuWiki 配置 ACL,它能让管理员登录并使用“管理”功能来安装插件,管理用户,管理访问权限和其他配置设置。它并不是 DokuWiki 正常运行所必须的,但安装之后它将更方便您的管理。

+

本安裝工具將設定您的 DokuWiki 用於 ACL 的配置檔,它能讓管理員登入並使用「管理」功能來安裝插件、管理用户、管理訪問權限和其他配置設定。它並不是 DokuWiki 正常運作所必須,但安裝之後將更方便管理。

-

有经验的用户或有特殊需求的用户请参阅更详细的 安装指南 -和 配置设置

\ No newline at end of file +

有經驗的用戶或有特殊需求的用戶請參閱更詳細的 安裝指南 +和 配置設定

\ No newline at end of file diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index eca7de4c8..6cd428d58 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -9,6 +9,7 @@ * @author Wayne San * @author Li-Jiun Huang * @author Cheng-Wei Chien + * @author Danny Lin */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -18,7 +19,7 @@ $lang['singlequoteopening'] = '‘'; $lang['singlequoteclosing'] = '’'; $lang['apostrophe'] = '’'; $lang['btn_edit'] = '編修本頁'; -$lang['btn_source'] = '顯示頁面來源'; +$lang['btn_source'] = '顯示頁面原始碼'; $lang['btn_show'] = '顯示頁面'; $lang['btn_create'] = '建立此頁'; $lang['btn_search'] = '搜尋'; @@ -31,7 +32,7 @@ $lang['btn_revs'] = '舊版'; $lang['btn_recent'] = '最近更新'; $lang['btn_upload'] = '上傳'; $lang['btn_cancel'] = '取消'; -$lang['btn_index'] = '索引頁'; +$lang['btn_index'] = '站台地圖'; $lang['btn_secedit'] = '改這段'; $lang['btn_login'] = '登入'; $lang['btn_logout'] = '登出'; @@ -42,9 +43,6 @@ $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'] = '寄新密碼'; @@ -78,17 +76,17 @@ $lang['regpwmail'] = '您的 DokuWiki 帳號密碼'; $lang['reghere'] = '您還沒有帳號對吧?來註冊一個吧。'; $lang['profna'] = '本 wiki 不開放修改個人資料'; $lang['profnochange'] = '未做任何變更'; -$lang['profnoempty'] = '帳號或 email 地址不可以沒有寫喔!'; +$lang['profnoempty'] = '帳號或 email 地址不可空白!'; $lang['profchanged'] = '個人資料已成功更新囉。'; -$lang['pwdforget'] = '忘記密碼嗎?寄新密碼!'; +$lang['pwdforget'] = '忘記密碼了?索取新密碼!'; $lang['resendna'] = '本 wiki 不開放重寄新密碼'; $lang['resendpwd'] = '寄新密碼給'; -$lang['resendpwdmissing'] = '很抱歉,您必須全填這些資料才可以'; -$lang['resendpwdnouser'] = '很抱歉,資料庫內查無此人'; -$lang['resendpwdbadauth'] = '對不起,該認証碼錯誤。請使用完整的確認鏈接。'; -$lang['resendpwdconfirm'] = '確認鏈接已經通過郵件發送給您了。'; -$lang['resendpwdsuccess'] = '新密碼函已經以 email 寄出了。'; -$lang['license'] = '如未特別註明,此 wiki 上得內容都是根據以下的授權方式:'; +$lang['resendpwdmissing'] = '抱歉,您必須填寫所有欄位。'; +$lang['resendpwdnouser'] = '抱歉,資料庫內找不到這個使用者'; +$lang['resendpwdbadauth'] = '抱歉,認證碼無效。請確認您使用了完整的確認連結。'; +$lang['resendpwdconfirm'] = '確認連結已通過郵件發送給您了。'; +$lang['resendpwdsuccess'] = '您的新密碼已寄出。'; +$lang['license'] = '若未特別註明,此維基上的內容都是採用以下授權方式:'; $lang['licenseok'] = '注意:編輯此頁面表示你已同意以下的授權方式:'; $lang['searchmedia'] = '搜尋檔名:'; $lang['searchmedia_in'] = '在 %s 裡搜尋'; @@ -97,63 +95,87 @@ $lang['txt_filename'] = '請輸入要存在 wiki 內的檔案名稱 ( $lang['txt_overwrt'] = '是否要覆蓋原有檔案'; $lang['lockedby'] = '目前已被下列人員鎖定'; $lang['lockexpire'] = '預計解除鎖定於'; -$lang['willexpire'] = '您目前編輯這頁的鎖定將會在一分鐘內解除。\若要避免發生意外,請按「預覽」鍵來重新設定鎖定狀態'; -$lang['js']['notsavedyet'] = "有尚未儲存的變更將會遺失。\n真的要繼續嗎?"; -$lang['rssfailed'] = '當抓取餵送過來的 RSS 資料時發生錯誤: '; -$lang['nothingfound'] = '沒找到任何結果。'; -$lang['mediaselect'] = '選擇圖檔'; -$lang['fileupload'] = '上傳圖檔'; -$lang['uploadsucc'] = '上傳成功'; -$lang['uploadfail'] = '上傳失敗。或許權限設定錯誤了嗎?'; -$lang['uploadwrong'] = '拒絕上傳。該檔案類型不被支援。'; -$lang['uploadexist'] = '該檔案已有存在了喔,故取消上傳動作。'; -$lang['uploadbadcontent'] = '上傳檔案的內容不符合 %s 檔的副檔名'; -$lang['uploadspam'] = '被SPAM黑名單限制上傳'; -$lang['uploadxss'] = '因為可能惡意的內容被限制上傳'; -$lang['uploadsize'] = '上傳的檔案尺寸過大(最大:%s)'; -$lang['deletesucc'] = '"%s" 檔已刪除完畢。'; -$lang['deletefail'] = '"%s" 檔無法刪除,請先檢查權限設定。'; -$lang['mediainuse'] = '"%s" 檔因還在使用中,故目前尚無法刪除。'; -$lang['namespaces'] = '命名空間'; -$lang['mediafiles'] = '可用的檔案有'; +$lang['willexpire'] = '您目前編輯這頁的鎖定將會在一分鐘內解除。若要避免發生衝突,請按「預覽」鍵重新設定鎖定計時。'; +$lang['js']['notsavedyet'] = '尚未儲存的變更將會遺失,要繼續嗎?'; $lang['js']['searchmedia'] = '搜尋檔案'; -$lang['js']['keepopen'] = '於選擇時保持視窗開啟'; +$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']['mediadisplaylnk'] = '只顯示連結'; +$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'] = '只有在 Microsoft IE 下才能執行「連結到 Windows shares」。 不過您仍可拷貝、複製這連結'; $lang['js']['linkwiz'] = '建立連結精靈'; $lang['js']['linkto'] = '連至:'; -$lang['js']['del_confirm'] = '確定要刪除該管理規則?'; +$lang['js']['del_confirm'] = '確定刪除選取的項目?'; $lang['js']['mu_btn'] = '上傳多個檔案'; +$lang['rssfailed'] = '擷取 RSS 饋送檔時發生錯誤:'; +$lang['nothingfound'] = '沒找到任何結果。'; +$lang['mediaselect'] = '媒體檔案'; +$lang['fileupload'] = '上傳媒體檔案'; +$lang['uploadsucc'] = '上傳成功'; +$lang['uploadfail'] = '上傳失敗。似乎是權限錯誤?'; +$lang['uploadwrong'] = '拒絕上傳。這個副檔名被禁止了!'; +$lang['uploadexist'] = '檔案已存在,未處理。'; +$lang['uploadbadcontent'] = '上傳檔案的內容不符合 %s 檔的副檔名'; +$lang['uploadspam'] = '這次的上傳被垃圾訊息黑名單阻檔了。'; +$lang['uploadxss'] = '這次的上傳因可能的惡意的內容而被阻檔。'; +$lang['uploadsize'] = '上傳的檔案太大了(最大:%s)'; +$lang['deletesucc'] = '檔案 "%s" 已刪除。'; +$lang['deletefail'] = '檔案 "%s" 無法刪除,請檢查權限定。'; +$lang['mediainuse'] = '檔案 "%s" 未刪除,因為它正被使用。'; +$lang['namespaces'] = '命名空間'; +$lang['mediafiles'] = '可用的檔案有'; +$lang['accessdenied'] = '您不被允許檢視此頁面'; $lang['mediausage'] = '使用以下的語法來連結此檔案:'; $lang['mediaview'] = '檢視原始檔案'; $lang['mediaroot'] = 'root'; -$lang['mediaupload'] = '上傳文件至當前的命名空間。要創建次級命名空間,將其名稱加在“上傳並重命名為”文件名的前面,並用英文冒號隔開'; -$lang['mediaextchange'] = '檔案類型已由 .%s 變更為 .%s 囉!'; +$lang['mediaupload'] = '上傳檔案至目前的命名空間。要建立次級命名空間,將其名稱加在「上傳並重命名為」檔案名的前面,並用英文冒號隔開'; +$lang['mediaextchange'] = '檔案類型已由 .%s 變更為 .%s !'; $lang['reference'] = '引用到本頁的,合計有'; -$lang['ref_inuse'] = '這檔還不能刪除,因為還有以下的頁面在使用它:'; -$lang['ref_hidden'] = '有些引用到這個的頁面,您目前還沒有權限可讀取喔。'; +$lang['ref_inuse'] = '此檔案無法刪除,因為它正被以下頁面使用:'; +$lang['ref_hidden'] = '一些參考內容位於您沒有讀取權限的頁面中'; $lang['hits'] = '個符合'; -$lang['quickhits'] = '符合的頁面名稱'; -$lang['toc'] = '本頁目錄'; +$lang['quickhits'] = '比對頁面名稱'; +$lang['toc'] = '目錄表'; $lang['current'] = '目前版本'; $lang['yours'] = '您的版本'; -$lang['diff'] = '顯示跟目前版本的差異'; +$lang['diff'] = '顯示與目前版本的差異'; $lang['diff2'] = '顯示與選擇版本的差異'; +$lang['difflink'] = '連向這個比對檢視'; $lang['line'] = '行'; -$lang['breadcrumb'] = '目前的足跡'; +$lang['breadcrumb'] = '足跡'; $lang['youarehere'] = '(目前所在位置)'; $lang['lastmod'] = '上一次變更'; -$lang['by'] = '來自'; +$lang['by'] = '由'; $lang['deleted'] = '移除'; $lang['created'] = '建立'; -$lang['restored'] = '已恢復為舊版'; +$lang['restored'] = '恢復為舊版'; $lang['external_edit'] = '外部編輯'; $lang['summary'] = '編輯摘要'; $lang['noflash'] = '顯示此內容需要Adobe Flash Plugin'; $lang['download'] = '下載程式碼片段'; $lang['mail_newpage'] = '增加的頁面:'; $lang['mail_changed'] = '變更的頁面:'; +$lang['mail_subscribe_list'] = '命名空間中更動的頁面:'; $lang['mail_new_user'] = '新使用者:'; $lang['mail_upload'] = '已上傳檔案:'; $lang['qb_bold'] = '粗體'; @@ -182,9 +204,9 @@ $lang['qb_smileys'] = '表情符號'; $lang['qb_chars'] = '特殊字元'; $lang['upperns'] = '前往父命名空間'; $lang['admin_register'] = '新增使用者中'; -$lang['metaedit'] = '更改相片資料(EXIF)'; -$lang['metasaveerr'] = '相片資料(EXIF)儲存失敗喔'; -$lang['metasaveok'] = '相片資料已成功儲存'; +$lang['metaedit'] = '編輯後設資料'; +$lang['metasaveerr'] = '後設資料寫入失敗'; +$lang['metasaveok'] = '後設資料已儲存'; $lang['img_backto'] = '回上一頁'; $lang['img_title'] = '標題'; $lang['img_caption'] = '照片說明'; @@ -196,11 +218,22 @@ $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'] = '您的帳號內並無 Email 資料,因此還無法使用訂閱功能唷。'; -$lang['unsubscribe_success'] = '已將『%s』從 %s 訂閱清單中移除'; -$lang['unsubscribe_error'] = '要把『%s』從 %s 訂閱清單中移除時,發生錯誤'; +$lang['subscr_subscribe_success'] = '已將 %s 添加到 %s 的訂閱列表'; +$lang['subscr_subscribe_error'] = '將 %s 添加到 %s 的訂閱列表時發生錯誤'; +$lang['subscr_subscribe_noaddress'] = '沒有與您登入信息相關的地址,您無法被添加到訂閱列表'; +$lang['subscr_unsubscribe_success'] = '已將 %s 移除自 %s 的訂閱列表'; +$lang['subscr_unsubscribe_error'] = '將 %s 移除自 %s 的訂閱列表時發生錯誤'; +$lang['subscr_already_subscribed'] = '%s 已經被 %s 訂閱了'; +$lang['subscr_not_subscribed'] = '%s 尚未被 %s 訂閱'; +$lang['subscr_m_not_subscribed'] = '您尚未訂閱目前頁面或命名空間。'; +$lang['subscr_m_new_header'] = '添加訂閱'; +$lang['subscr_m_current_header'] = '目前訂閱'; +$lang['subscr_m_unsubscribe'] = '取消訂閱'; +$lang['subscr_m_subscribe'] = '訂閱'; +$lang['subscr_m_receive'] = '接收'; +$lang['subscr_style_every'] = '每次更改都發送信件'; +$lang['subscr_style_digest'] = '對每個頁面發送更改的摘要信件(每 %.2f 天)'; +$lang['subscr_style_list'] = '自上次發信以來更改的頁面的列表(每 %.2f 天)'; $lang['authmodfailed'] = '帳號認證的設定不正確,請通知該 Wiki 管理員。'; $lang['authtempfail'] = '帳號認證目前暫不提供,若本狀況持續發生的話,請通知該 Wiki 管理員。'; $lang['i_chooselang'] = '選擇您的語系'; @@ -212,21 +245,22 @@ $lang['i_problems'] = 'Installer發現一些問題,顯示如下。 $lang['i_modified'] = '由於安全上的考慮,該腳本隻能用於全新且做任何改動的 Dokuwiki 安裝包。 您可以重新解壓下載的程序包,或查閱完整的 Dokuwiki 安裝指南'; -$lang['i_funcna'] = 'PHP function %s 無法使用. 也許你的主機供應者停用它或是其他原因?'; -$lang['i_phpver'] = '您的 PHP 版本 %s 比所需要的版本 %s 還低. 您需要更新您的PHP.'; -$lang['i_permfail'] = '%s 無法被 DokuWiki 所寫入. 您需要修正該目錄的權限!'; +$lang['i_funcna'] = 'PHP 函數 %s 無法使用。也許你的主機供應者基於某些理由停用了它?'; +$lang['i_phpver'] = '您的 PHP 版本 %s 比需要的版本 %s 還低。您必須更新您的PHP。'; +$lang['i_permfail'] = '%s 無法被 DokuWiki 寫入。您必須修正該目錄的權限!'; $lang['i_confexists'] = '%s已經存在'; -$lang['i_writeerr'] = '無法建立 %s. 您必須檢查目錄/檔案的權限並手動建立該檔案.'; -$lang['i_badhash'] = '無法辨識或被變更的dokuwiki.php (hash=%s)'; -$lang['i_badval'] = '%s - 非法或是空的值'; -$lang['i_success'] = '設定已經成功地完成. 您現在可以刪除 install.php 這個檔案. 繼續到 +$lang['i_writeerr'] = '無法建立 %s。您必須檢查目錄/檔案的權限並手動建立該檔案。'; +$lang['i_badhash'] = '無法辨識或被變更的 dokuwiki.php (hash=%s)'; +$lang['i_badval'] = '%s - 非法或空白值'; +$lang['i_success'] = '設定已成功完成。您現在可以刪除 install.php 檔案。繼續到 您的新 DokuWiki.'; -$lang['i_failure'] = '在寫入設定檔時發生了一些錯誤.您必須在使用你的新 Dokuwiki 之前手動修正它們'; +$lang['i_failure'] = '寫入設定檔時發生了一些錯誤。您必須在使用你的新 Dokuwiki 之前手動修正它們。'; $lang['i_policy'] = '初步的ACL政策'; -$lang['i_pol0'] = '開放的 Wiki (可被任何人讀, 寫, 上傳)'; -$lang['i_pol1'] = '公開的 Wiki (可被任何人讀, 但是只能被註冊的使用者寫與上傳)'; -$lang['i_pol2'] = '封閉的 Wiki (只能被註冊的使用者讀, 寫, 上傳)'; +$lang['i_pol0'] = '開放的維基 (任何人可讀取、寫入、上傳)'; +$lang['i_pol1'] = '公開的維基 (任何人可讀取,註冊使用者可寫入與上傳)'; +$lang['i_pol2'] = '封閉的維基 (只有註冊使用者可讀取、寫入、上傳)'; $lang['i_retry'] = '重試'; +$lang['i_license'] = '請選擇您想要的內容發布許可協議:'; $lang['mu_intro'] = '您可以在這裡一次上傳多個檔案。按下瀏覽按鈕加入檔案,然後按上傳按鈕開始上傳。'; $lang['mu_gridname'] = '檔案名稱'; $lang['mu_gridsize'] = '檔案大小'; @@ -250,3 +284,4 @@ $lang['days'] = '%d 天前'; $lang['hours'] = '%d 個小時前'; $lang['minutes'] = '%d 分鐘前'; $lang['seconds'] = '%s 秒鐘前'; +$lang['wordblock'] = '您的更改沒有被儲存,因为它包含被阻擋的文字(垃圾訊息)。'; diff --git a/inc/lang/zh-tw/locked.txt b/inc/lang/zh-tw/locked.txt index 16a06e802..e13fdc890 100644 --- a/inc/lang/zh-tw/locked.txt +++ b/inc/lang/zh-tw/locked.txt @@ -1,3 +1,3 @@ -====== 頁面目前是鎖定狀態中 ====== +====== 頁面鎖定 ====== -本頁目前正由其他使用者編修中,您必須先等到他完成或者鎖定狀態自動解除。 +本頁目前正由其他使用者編修中,您必須等他完成編輯或等鎖定時間過去。 diff --git a/inc/lang/zh-tw/login.txt b/inc/lang/zh-tw/login.txt index fda49a199..058cc5712 100644 --- a/inc/lang/zh-tw/login.txt +++ b/inc/lang/zh-tw/login.txt @@ -1,5 +1,5 @@ ====== 登入 ====== -您尚未登入,請輸入您的使用者名稱跟密碼。 另外,瀏覽器需要打開 cookies 設定以進行登入。 +您尚未登入,請輸入您的使用者名稱和密碼。 另外,瀏覽器需要打開 cookies 設定以進行登入。 diff --git a/inc/lang/zh-tw/mailtext.txt b/inc/lang/zh-tw/mailtext.txt index f6bb0480e..570238217 100644 --- a/inc/lang/zh-tw/mailtext.txt +++ b/inc/lang/zh-tw/mailtext.txt @@ -1,13 +1,13 @@ -在您的 DokuWiki 有新增、變動過一頁了。以下是細節資料: +您的 DokuWiki 有個新增或變動的頁面。以下是詳細資料: -日期 : @DATE@ -瀏覽器 : @BROWSER@ -IP-Address : @IPADDRESS@ -機器名稱 : @HOSTNAME@ -舊版次 : @OLDPAGE@ -新版次 : @NEWPAGE@ -編輯摘要 : @SUMMARY@ -User : @USER@ +日期 : @DATE@ +瀏覽器 : @BROWSER@ +IP位址 : @IPADDRESS@ +主機名稱 : @HOSTNAME@ +舊版本 : @OLDPAGE@ +新版本 : @NEWPAGE@ +編輯摘要 : @SUMMARY@ +使用者 : @USER@ @DIFF@ diff --git a/inc/lang/zh-tw/newpage.txt b/inc/lang/zh-tw/newpage.txt index bd38f5586..06ccd3d75 100644 --- a/inc/lang/zh-tw/newpage.txt +++ b/inc/lang/zh-tw/newpage.txt @@ -1,3 +1,3 @@ -====== 目前尚未有該主題喔 ====== +====== 此主題不存在 ====== -您目前到的這主題尚未建立頁面。但也可以用 「''建立此頁''」來建立。 \ No newline at end of file +您來到了一個未建立頁面的主題。如果權限允許,您可以用 「建立此頁」按鈕建立頁面。 \ No newline at end of file diff --git a/inc/lang/zh-tw/norev.txt b/inc/lang/zh-tw/norev.txt index e2b6a175b..bd1c7a623 100644 --- a/inc/lang/zh-tw/norev.txt +++ b/inc/lang/zh-tw/norev.txt @@ -1,4 +1,3 @@ -====== 很抱歉,並無該版次的 ====== - -該版次的文件並不存在。請用 「''舊版''」 鍵來檢視目前該文件的所有舊版次。 +====== 無此版本 ====== +該版本的文件不存在。請用 「舊版」按鈕檢視該文件所有舊版本清單。 \ No newline at end of file diff --git a/inc/lang/zh-tw/password.txt b/inc/lang/zh-tw/password.txt index 14edb6016..f7c915e32 100644 --- a/inc/lang/zh-tw/password.txt +++ b/inc/lang/zh-tw/password.txt @@ -2,7 +2,7 @@ 嗨,@LOGIN@(@FULLNAME@) 您好! -這裡是您在 @TITLE@(@DOKUWIKIURL@) 的使用者資料 +這是您在 @TITLE@(@DOKUWIKIURL@) 的使用者資料 使用者名稱: @LOGIN@    密碼: @PASSWORD@ diff --git a/inc/lang/zh-tw/pwconfirm.txt b/inc/lang/zh-tw/pwconfirm.txt index b8ad7e1ed..7d2e4eab0 100644 --- a/inc/lang/zh-tw/pwconfirm.txt +++ b/inc/lang/zh-tw/pwconfirm.txt @@ -1,13 +1,13 @@ @FULLNAME@ 您好! -有人請求為您在 @DOKUWIKIURL@ 注冊的用戶名 @TITLE@ 發送新密碼 +有人請求為您在 @DOKUWIKIURL@ 註冊的用戶 @TITLE@ 發送新密碼 如果您沒有請求發送新密碼,請忽略這封郵件。 -為了確認發送新密碼請求的確來自您,請使用下面的鏈接。 +為了確認發送新密碼請求的確來自您,請使用下面的連結。 @CONFIRM@ -- -本郵件由 DokuWiki 自動創建 +本郵件由 DokuWiki 自動建立 @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/zh-tw/read.txt b/inc/lang/zh-tw/read.txt index 364f4adea..a8305611f 100644 --- a/inc/lang/zh-tw/read.txt +++ b/inc/lang/zh-tw/read.txt @@ -1,3 +1 @@ -本頁是唯讀的,可以看是怎麼寫的,但不能更動它。如這是誤判,請向管理員詢問。 - - +本頁是唯讀的,您可以看到原始碼,但不能更動它。您如果覺得這是誤判,請詢問管理員。 \ No newline at end of file diff --git a/inc/lang/zh-tw/register.txt b/inc/lang/zh-tw/register.txt index 1a5ec67e7..77a6c3683 100644 --- a/inc/lang/zh-tw/register.txt +++ b/inc/lang/zh-tw/register.txt @@ -1,4 +1,3 @@ ====== 註冊新使用者 ====== -請填以下欄位的資料來註冊 wiki 帳號,\\ 還有請確定您有提供一個 **合法的 e-mail 地址** - 也就是您的新密碼會被寄到那。\\ 而登錄的使用者名稱應該是合法的。 [[doku>pagename|pagename]]. - +填寫下欄位的資料以註冊 wiki 帳號,請確定您提供的是 **合法的 e-mail 地址** - 如果您沒有填寫密碼,您的新密碼會被寄到該地址。登錄名稱必須是合法的[[doku>pagename|頁面名稱]]。 \ No newline at end of file diff --git a/inc/lang/zh-tw/registermail.txt b/inc/lang/zh-tw/registermail.txt index 434f4f877..edb2dd5ce 100644 --- a/inc/lang/zh-tw/registermail.txt +++ b/inc/lang/zh-tw/registermail.txt @@ -6,8 +6,8 @@ E-mail : @NEWEMAIL@ 日期 : @DATE@ 瀏覽器 : @BROWSER@ -IP-Address : @IPADDRESS@ -Hostname : @HOSTNAME@ +IP位址 : @IPADDRESS@ +主機名稱 : @HOSTNAME@ -- 這封信是由 @DOKUWIKIURL@ 的 DokuWiki 所產生的 \ No newline at end of file diff --git a/inc/lang/zh-tw/searchpage.txt b/inc/lang/zh-tw/searchpage.txt index 9f3d8ee94..b4e00475c 100644 --- a/inc/lang/zh-tw/searchpage.txt +++ b/inc/lang/zh-tw/searchpage.txt @@ -1,5 +1,5 @@ ====== 搜尋精靈 ====== -提示:您可以在下列找到您的搜尋結果。若沒找到妳想找的東西,那麼可以在妳查詢之後用「建立此頁」來建立新的頁面哦。 +提示:您可以在下面找到您的搜尋結果。若沒找到你想找的東西,那麼可以在你查詢之後用「建立此頁」來建立新的頁面。 ===== 搜尋結果 ===== diff --git a/inc/lang/zh-tw/showrev.txt b/inc/lang/zh-tw/showrev.txt index 35b6aa59f..306aa6ea7 100644 --- a/inc/lang/zh-tw/showrev.txt +++ b/inc/lang/zh-tw/showrev.txt @@ -1,2 +1,2 @@ -**這是本文件的舊版了喔!** +**這是本文件的舊版!** ---- diff --git a/inc/lang/zh-tw/subscr_digest.txt b/inc/lang/zh-tw/subscr_digest.txt new file mode 100644 index 000000000..c082a6772 --- /dev/null +++ b/inc/lang/zh-tw/subscr_digest.txt @@ -0,0 +1,19 @@ +您好! + +@TITLE@ 維基中的頁面 @PAGE@ 已經更改。 +這裡是更改的内容: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +舊版本:@OLDPAGE@ +新版本:@NEWPAGE@ + +要取消頁面提醒,從 @DOKUWIKIURL@ 登入維基,然後拜訪 +@SUBSCRIBE@ +並取消訂閱頁面或命名空間的更改。 + +-- +本信件由以下 DokuWiki 產生 +@DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/zh-tw/subscr_form.txt b/inc/lang/zh-tw/subscr_form.txt new file mode 100644 index 000000000..0ad675cc8 --- /dev/null +++ b/inc/lang/zh-tw/subscr_form.txt @@ -0,0 +1,3 @@ +====== 訂閱管理 ====== + +這個頁面允許您管理在目前頁面和命名空間的訂閱。 \ No newline at end of file diff --git a/inc/lang/zh-tw/subscr_list.txt b/inc/lang/zh-tw/subscr_list.txt new file mode 100644 index 000000000..46e2bb1ad --- /dev/null +++ b/inc/lang/zh-tw/subscr_list.txt @@ -0,0 +1,19 @@ +您好! + +@TITLE@ 維基的命名空間的 @PAGE@ 頁面已經更改。 +這裡是更改的内容: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +舊版本:@OLDPAGE@ +新版本:@NEWPAGE@ + +要取消頁面提醒,從 @DOKUWIKIURL@ 登入維基,然後拜訪 +@SUBSCRIBE@ +並取消訂閱頁面或命名空間的更改。 + +-- +本信件由以下 DokuWiki 產生 +@DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/zh-tw/subscr_single.txt b/inc/lang/zh-tw/subscr_single.txt new file mode 100644 index 000000000..8be47261b --- /dev/null +++ b/inc/lang/zh-tw/subscr_single.txt @@ -0,0 +1,22 @@ +您好! + +@TITLE@ 維基中的頁面 @PAGE@ 已經更改。 +這裡是更改的内容: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +時間:@DATE@ +用戶:@USER@ +編輯摘要:@SUMMARY@ +舊版本:@OLDPAGE@ +新版本:@NEWPAGE@ + +要取消頁面提醒,從 @DOKUWIKIURL@ 登入維基,然後拜訪 +@SUBSCRIBE@ +並取消訂閱頁面或命名空間的更改。 + +-- +本信件由以下 DokuWiki 產生 +@DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/zh-tw/updateprofile.txt b/inc/lang/zh-tw/updateprofile.txt index f92c215ea..47f2ae1c4 100644 --- a/inc/lang/zh-tw/updateprofile.txt +++ b/inc/lang/zh-tw/updateprofile.txt @@ -1,5 +1,3 @@ ====== 更新個人資料 ====== -請注意:只需變更想更新的資料欄位就好,而帳號名稱是不可以變更的。 - - +您只需變更想更新的欄位就好,帳號名稱不能變更。 \ No newline at end of file diff --git a/inc/lang/zh-tw/uploadmail.txt b/inc/lang/zh-tw/uploadmail.txt index e7222959b..25433cc61 100644 --- a/inc/lang/zh-tw/uploadmail.txt +++ b/inc/lang/zh-tw/uploadmail.txt @@ -3,8 +3,8 @@ 檔名 : @MEDIA@ 日期 : @DATE@ 瀏覽器 : @BROWSER@ -IP-Address : @IPADDRESS@ -Hostname : @HOSTNAME@ +IP位址 : @IPADDRESS@ +主機名稱 : @HOSTNAME@ 尺寸 : @SIZE@ MIME Type : @MIME@ 帳號 : @USER@ diff --git a/lib/plugins/acl/lang/zh-tw/lang.php b/lib/plugins/acl/lang/zh-tw/lang.php index d64e85a92..36d28e42a 100644 --- a/lib/plugins/acl/lang/zh-tw/lang.php +++ b/lib/plugins/acl/lang/zh-tw/lang.php @@ -9,6 +9,7 @@ * @author Wayne San * @author Li-Jiun Huang * @author Cheng-Wei Chien + * @author Danny Lin */ $lang['admin_acl'] = '設定 ACL 存取名單'; $lang['acl_group'] = '群組'; @@ -22,7 +23,7 @@ $lang['p_user_ns'] = '用戶 %s 當前在 $lang['p_group_id'] = '群組 %s 的成員目前對於頁面 %s 擁有以下的權限: %s.'; $lang['p_group_ns'] = '%s 組成員當前在命名空間 %s 擁有以下權限:%s。'; $lang['p_choose_id'] = '請在上方的表格中 輸入一個帳號或群組 來觀看或編輯頁面 %s 的權限.'; -$lang['p_choose_ns'] = '請在上表中輸入用戶名或組名稱,來查看或編輯命名空間 %s 的權限設置。'; +$lang['p_choose_ns'] = '請在上表中輸入用戶名或組名稱,來查看或編輯命名空間 %s 的權限設定。'; $lang['p_inherited'] = '請注意:這些權限並沒有明確設定,而是從其他組或更高級的名稱空間繼承而來。'; $lang['p_isadmin'] = '請注意:選定的組或用戶擁有完全權限,因為它被設定為超級用戶。'; $lang['p_include'] = '較高的權限亦包含了較低的權限。新增、上傳與刪除權限只能在命名空間中使用,而非頁面。'; diff --git a/lib/plugins/config/lang/zh-tw/intro.txt b/lib/plugins/config/lang/zh-tw/intro.txt index e27b18ba2..c257947d9 100644 --- a/lib/plugins/config/lang/zh-tw/intro.txt +++ b/lib/plugins/config/lang/zh-tw/intro.txt @@ -1,7 +1,7 @@ ====== 配置管理器 ====== -使用本頁中的內容來控制您的 Dokuwiki 設置。 每個單獨設置的相關信息請參閱 [[doku>config]]。 配置管理器的更多信息請參閱 [[doku>plugin:config]]。 +使用本頁控制您的 Dokuwiki 設定。每個獨立設定的相關訊息可參閱 [[doku>config]]。配置管理器的更多訊息請參閱 [[doku>plugin:config]]。 -淡紅色背景的項目被保護,不能通過這個管理器更改。 藍色背景的項目是系統的默認值,白色背景的項目是您作出更改的項目。藍色和白色的設置項目都可以更改。 +淡紅色背景的項目是被保護的,不能通過這個管理器更改。藍色背景的項目是系統的預設值,白色背景的項目是您更改過的。藍色和白色的設定項目都可以更改。 -離開本頁之前不要忘記點擊最后的 **保存** 按鈕,否則您做的修改不會生效。 +離開本頁之前不要忘記點擊最下面的 **儲存** 按鈕,否則您的修改將不會生效。 diff --git a/lib/plugins/config/lang/zh-tw/lang.php b/lib/plugins/config/lang/zh-tw/lang.php index c363fb709..8ebdb99ad 100644 --- a/lib/plugins/config/lang/zh-tw/lang.php +++ b/lib/plugins/config/lang/zh-tw/lang.php @@ -7,150 +7,153 @@ * @author Wayne San * @author Li-Jiun Huang * @author Cheng-Wei Chien + * @author Danny Lin */ $lang['menu'] = '系統配置設定'; -$lang['error'] = '設定因為不合法的值而失敗,請檢查您的改變並重新送出。 -
不正確的值會被紅色方框圍住。'; +$lang['error'] = '設定因為不合法的值而未更新,請檢查您的更改並重新送出。 +
不正確的值會被紅色方框包住。'; $lang['updated'] = '成功地更新設定。'; -$lang['nochoice'] = '(無其他選項可選)'; -$lang['locked'] = '設定檔無法被更新, 如果這不是故意的,
-請確定設定檔名以及權限是正確的.'; -$lang['danger'] = '危險:改變此選項可能使得您的 wiki 以及其設定選單無法存取。'; -$lang['warning'] = '警告:改變此選項可能導致未預期的行為。'; -$lang['security'] = '安全性警告:改變此選項可能造成安全上的危險。'; -$lang['_configuration_manager'] = '設定管理'; +$lang['nochoice'] = '(無其他可用選項)'; +$lang['locked'] = '設定檔無法更新,若非故意,請確認本地檔名及權限正確。'; +$lang['danger'] = '危險:改變此選項可能使您無法存取維基及配置選單。'; +$lang['warning'] = '警告:改變此選項可能導致不可預期的行為。'; +$lang['security'] = '安全性警告:改變此選項可能造成安全風險。'; +$lang['_configuration_manager'] = '配置管理'; $lang['_header_dokuwiki'] = 'DokuWiki 設定'; -$lang['_header_plugin'] = '外掛設定'; +$lang['_header_plugin'] = '插件設定'; $lang['_header_template'] = '樣板設定'; -$lang['_header_undefined'] = '不明確的設定'; +$lang['_header_undefined'] = '未定義設定'; $lang['_basic'] = '基本設定'; $lang['_display'] = '顯示設定'; $lang['_authentication'] = '認證設定'; -$lang['_anti_spam'] = 'Anti-Spam 設定'; +$lang['_anti_spam'] = '反垃圾設定'; $lang['_editing'] = '編輯設定'; $lang['_links'] = '連結設定'; $lang['_media'] = '媒體設定'; $lang['_advanced'] = '進階設定'; $lang['_network'] = '網路設定'; -$lang['_plugin_sufix'] = '外掛設定'; +$lang['_plugin_sufix'] = '插件設定'; $lang['_template_sufix'] = '樣板設定'; -$lang['_msg_setting_undefined'] = '设置的元数据不存在。'; -$lang['_msg_setting_no_class'] = '設置的分類不存在。'; +$lang['_msg_setting_undefined'] = '設定的後設數據不存在。'; +$lang['_msg_setting_no_class'] = '設定的分類不存在。'; $lang['_msg_setting_no_default'] = '無預設值'; $lang['fmode'] = '檔案建立模式'; $lang['dmode'] = '目錄建立模式'; $lang['lang'] = '語系'; $lang['basedir'] = '根目錄'; -$lang['baseurl'] = '根路徑(URL)'; +$lang['baseurl'] = '根路徑 (URL)'; $lang['savedir'] = '儲存資料的目錄'; $lang['start'] = '開始頁面的名稱'; -$lang['title'] = 'Wiki 標題'; +$lang['title'] = '維基標題'; $lang['template'] = '樣板'; $lang['license'] = '您希望您的內容為何種授權方式?'; $lang['fullpath'] = '顯示完整的路徑於頁面底部'; $lang['recent'] = '最近更新'; -$lang['breadcrumbs'] = '显示“足迹”的数量'; -$lang['youarehere'] = '顯示“您在這裡”'; -$lang['typography'] = '進行字符替換'; -$lang['htmlok'] = '允許嵌入式HTML'; -$lang['phpok'] = '允許嵌入式PHP'; -$lang['dformat'] = '日期格式(請見 PHP\'s strftime function)'; +$lang['breadcrumbs'] = '導覽鏈數量'; +$lang['youarehere'] = '顯示階層式導覽鏈'; +$lang['typography'] = '進行字元替換'; +$lang['htmlok'] = '允許嵌入式 HTML'; +$lang['phpok'] = '允許嵌入式 PHP'; +$lang['dformat'] = '日期格式 (參見 PHP 的 strftime 函數)'; $lang['signature'] = '簽名'; -$lang['toptoclevel'] = '本頁目錄的最高層級'; -$lang['tocminheads'] = '決定是否建立本頁目錄的最少標題數量'; -$lang['maxtoclevel'] = '本頁目錄顯示的最大層級'; +$lang['toptoclevel'] = '目錄表的最上層級'; +$lang['tocminheads'] = '決定是否建立目錄表的最少標題數量'; +$lang['maxtoclevel'] = '目錄表顯示的最大層級'; $lang['maxseclevel'] = '可編輯段落的最大層級'; -$lang['camelcase'] = '對鏈接使用 CamelCase'; +$lang['camelcase'] = '對連結使用 CamelCase'; $lang['deaccent'] = '清理頁面名稱'; $lang['useheading'] = '使用第一個標題作為頁面名稱'; $lang['refcheck'] = '媒體連結檢查'; $lang['refshow'] = '媒體連結的顯示數量'; -$lang['allowdebug'] = '允許 debug 如果不需要則停用! '; -$lang['usewordblock'] = '基於 wordlist 來限制 spam'; -$lang['indexdelay'] = '建立索引前的延遲時間(秒)'; -$lang['relnofollow'] = '使用 rel="nofollow" 於外部連結'; -$lang['mailguard'] = '暗化E-mail位址'; +$lang['allowdebug'] = '允許除錯 (不需要請停用!)'; +$lang['usewordblock'] = '根據字詞表阻擋垃圾訊息'; +$lang['indexdelay'] = '建立索引前的延遲時間 (秒)'; +$lang['relnofollow'] = '外部連結使用 rel="nofollow"'; +$lang['mailguard'] = '混淆 E-mail 位址'; $lang['iexssprotect'] = '檢查上傳的檔案中是否隱含惡意的 JavaScript 或 HTML 碼'; -$lang['showuseras'] = '在顯示最近修改頁面,將使用者顯示為:'; +$lang['showuseras'] = '將最後編輯頁面的使用者顯示為:'; $lang['useacl'] = '使用存取控制名單'; $lang['autopasswd'] = '自動產生密碼'; -$lang['authtype'] = '认证后台管理方式'; +$lang['authtype'] = '認證後台管理方式'; $lang['passcrypt'] = '密碼加密方式'; $lang['defaultgroup'] = '預設群組'; -$lang['superuser'] = '超級用戶 - 不論 ACL 如何設置,都能訪問所有頁面與功能的用戶組/用戶'; -$lang['manager'] = '管理员 - 能访问相应管理功能的用户组/用户'; +$lang['superuser'] = '超級用戶 - 不論 ACL 如何設定,都能訪問所有頁面與功能的用戶組/用戶'; +$lang['manager'] = '管理員 - 能訪問相應管理功能的用戶组/用戶'; $lang['profileconfirm'] = '修改個人資料時需要確認密碼'; -$lang['disableactions'] = '停用DokuWiki功能'; +$lang['disableactions'] = '停用的 DokuWiki 動作'; $lang['disableactions_check'] = '檢查'; $lang['disableactions_subscription'] = '訂閱/取消訂閱'; -$lang['disableactions_wikicode'] = '查看源文件/導出源文件'; -$lang['disableactions_other'] = '其他功能(以逗號分隔)'; -$lang['sneaky_index'] = '默認情況下,DokuWiki 在索引頁會顯示所有 namespace。啟用該選項能隱藏那些用戶沒有權限閱讀的頁面。但也可能將用戶能夠閱讀的子頁面一並隱藏。這有可能導致在特定 ACL 設置下,索引功能不可用。'; -$lang['auth_security_timeout'] = '認證確定的 Timeout (秒)'; -$lang['securecookie'] = '「cookies set via HTTPS」是否只能由瀏覽器經 HTTPS 傳送?當你登入 wiki 是被 SSL 所保護但瀏覽 wiki 是沒有被保護時,取消此選項。'; +$lang['disableactions_wikicode'] = '檢視原始碼/匯出原始檔'; +$lang['disableactions_other'] = '其他功能 (逗號分隔)'; +$lang['sneaky_index'] = '預設情況下,DokuWiki 會在索引頁會顯示所有命名空間。啟用此選項會隱藏用戶沒有閱讀權限的頁面,但也可能將能閱讀的子頁面一併隱藏。在特定 ACL 設定下,這可能導致索引無法使用。'; +$lang['auth_security_timeout'] = '安全認證的計時 (秒)'; +$lang['securecookie'] = 'HTTPS 頁面設定的 cookie 是否只能由瀏覽器經 HTTPS 傳送?取消此選項後,只有登入維基會被 SSL 保護而瀏覽時不會。'; $lang['xmlrpc'] = '啟用/停用 XML-RPC 介面'; -$lang['xmlrpcuser'] = 'XML-RPC 存取權限將局限於在此提供的群組或使用者(逗點分隔)。若要開放權限給所有人請留白。'; -$lang['updatecheck'] = '檢查更新與安全性警告? 使用此功能, DokuWiki 需要聯繫 splitbrain.org.'; -$lang['userewrite'] = '使用更整潔的 URL'; -$lang['useslash'] = '在 URL 中使用斜杠作为命名空间的分隔符'; +$lang['xmlrpcuser'] = 'XML-RPC 存取權限將局限於在此提供的群組或使用者 (逗號分隔)。若要開放權限給所有人請留白。'; +$lang['updatecheck'] = '檢查更新與安全性警告?DokuWiki 需要聯繫 splitbrain.org 才能使用此功能。'; +$lang['userewrite'] = '使用好看的 URL'; +$lang['useslash'] = '在 URL 中使用斜線作為命名空間的分隔字元'; $lang['usedraft'] = '編輯時自動儲存草稿'; $lang['sepchar'] = '頁面名稱中單字的分隔字元'; -$lang['canonical'] = '使用完全標准的 URL'; -$lang['autoplural'] = '在鏈接中檢查多種格式'; +$lang['canonical'] = '使用最典型的 URL'; +$lang['fnencode'] = '非 ASCII 文件名稱的編輯方法。'; +$lang['autoplural'] = '檢查複數形式的連結 (英文)'; $lang['compression'] = 'attic 文件的壓縮方式'; -$lang['cachetime'] = 'cache的最大時間(秒)'; -$lang['locktime'] = '鎖定檔案的最大時間(秒)'; -$lang['fetchsize'] = 'fetch.php可以從外部下載的最大檔案尺寸(bytes)'; -$lang['notify'] = '寄送變更通知信到這個E-mail位址'; -$lang['registernotify'] = '寄送新使用者註冊資訊到這個E-mail位址'; +$lang['cachetime'] = '緩存的最大存在時間 (秒)'; +$lang['locktime'] = '檔案的最大鎖定時間 (秒)'; +$lang['fetchsize'] = 'fetch.php 可以從外部下載的最大檔案尺寸 (bytes)'; +$lang['notify'] = '寄送變更通知信到這個 E-mail 位址'; +$lang['registernotify'] = '寄送新使用者註冊資訊到這個 E-mail 位址'; $lang['mailfrom'] = '自動發送郵件時使用的郵件地址'; $lang['gzip_output'] = '對 xhtml 使用 gzip 內容編碼'; $lang['gdlib'] = 'GD Lib 版本'; -$lang['im_convert'] = 'ImageMagick的轉換工具路徑'; +$lang['im_convert'] = 'ImageMagick 的轉換工具路徑'; $lang['jpg_quality'] = 'JPG 壓縮品質(0-100)'; $lang['subscribers'] = '啟用頁面訂閱'; -$lang['compress'] = '緊密CSS與JavaScript的輸出'; -$lang['hidepages'] = '隱藏匹配的界面(正則表達式)'; -$lang['send404'] = '存取不存在的頁面時送出"HTTP 404/Page Not Found"'; -$lang['sitemap'] = '產生 Google sitemap (天)'; +$lang['subscribe_time'] = '訂閱列表和摘要發送的時間間隔 (秒);這個值應該小於指定的最近更改保留時間 (recent_days)。'; +$lang['compress'] = '壓縮 CSS 與 JavaScript 的輸出'; +$lang['hidepages'] = '隱藏匹配的界面 (正規式)'; +$lang['send404'] = '存取不存在的頁面時送出 "HTTP 404/Page Not Found"'; +$lang['sitemap'] = '產生 Google 站台地圖 (天)'; $lang['broken_iua'] = 'ignore_user_abort 功能失效了?這有可能導致搜索索引不可用。IIS+PHP/CGI 已損壞。請參閱 Bug 852 獲取更多信息。'; $lang['xsendfile'] = '使用 X-Sendfile 頭讓服務器發送狀態文件?您的服務器需要支持該功能。'; -$lang['renderer_xhtml'] = '主维基页面 (xhtml) 输出使用的渲染'; +$lang['renderer_xhtml'] = '主要維基輸出 (xhtml) 的的渲染器'; $lang['renderer__core'] = '%s (dokuwiki 核心)'; -$lang['renderer__plugin'] = '%s (外掛)'; -$lang['rememberme'] = '是否在登入畫面顯示記住我'; +$lang['renderer__plugin'] = '%s (插件)'; +$lang['rememberme'] = '允許自動登入 (記住我)'; $lang['rss_type'] = 'XML feed 類型'; $lang['rss_linkto'] = 'XML feed 連結到'; $lang['rss_content'] = 'XML feed 項目中顯示什麼呢?'; -$lang['rss_update'] = 'XML feed 更新間隔時間(秒)'; -$lang['recent_days'] = '保存多少天內的變更'; -$lang['rss_show_summary'] = '於標題中顯示簡要的XML feed'; +$lang['rss_update'] = 'XML feed 更新間隔時間 (秒)'; +$lang['recent_days'] = '儲存多少天內的變更'; +$lang['rss_show_summary'] = '於標題中顯示簡要的 XML feed'; $lang['target____wiki'] = '內部連結的目標視窗'; -$lang['target____interwiki'] = 'wiki內部連結的目標視窗'; +$lang['target____interwiki'] = '跨維基連結的目標視窗'; $lang['target____extern'] = '外部連結的目標視窗'; $lang['target____media'] = '媒體連結的目標視窗'; -$lang['target____windows'] = '視窗連結的目標視窗'; +$lang['target____windows'] = 'Windows 連結的目標視窗'; $lang['proxy____host'] = 'Proxy 伺服器名稱'; $lang['proxy____port'] = 'Proxy 連接埠'; $lang['proxy____user'] = 'Proxy 使用者名稱'; $lang['proxy____pass'] = 'Proxy 密碼'; $lang['proxy____ssl'] = '使用 SSL 連接到 Proxy'; +$lang['proxy____except'] = '比對 proxy 代理時應跳過的地址的正規式。'; $lang['safemodehack'] = '啟用 Safemode Hack'; -$lang['ftp____host'] = 'Safemode Hack 的 FTP 服務器'; +$lang['ftp____host'] = 'Safemode Hack 的 FTP 伺服器'; $lang['ftp____port'] = 'Safemode Hack 的 FTP 端口'; -$lang['ftp____user'] = 'Safemode Hack 的 FTP 用戶名'; +$lang['ftp____user'] = 'Safemode Hack 的 FTP 帳戶'; $lang['ftp____pass'] = 'Safemode Hack 的 FTP 密碼'; $lang['ftp____root'] = 'Safemode Hack 的 FTP 根路徑'; $lang['license_o_'] = '未選擇'; $lang['typography_o_0'] = '無'; -$lang['typography_o_1'] = '仅限双引号'; -$lang['typography_o_2'] = '所有引號(不一定能正常運行)'; +$lang['typography_o_1'] = '只限雙引號'; +$lang['typography_o_2'] = '包括單引號 (未必能運作)'; $lang['userewrite_o_0'] = '無'; $lang['userewrite_o_1'] = '.htaccess'; $lang['userewrite_o_2'] = 'DokuWiki 內部控制'; $lang['deaccent_o_0'] = '關閉'; $lang['deaccent_o_1'] = '移除重音符號'; -$lang['deaccent_o_2'] = '用羅馬字拼寫'; +$lang['deaccent_o_2'] = '羅馬字母轉寫'; $lang['gdlib_o_0'] = 'GD Lib 無法使用'; $lang['gdlib_o_1'] = '版本 1.x'; $lang['gdlib_o_2'] = '自動偵測'; @@ -159,11 +162,11 @@ $lang['rss_type_o_rss1'] = 'RSS 1.0'; $lang['rss_type_o_rss2'] = 'RSS 2.0'; $lang['rss_type_o_atom'] = 'Atom 0.3'; $lang['rss_type_o_atom1'] = 'Atom 1.0'; -$lang['rss_content_o_abstract'] = '概要'; -$lang['rss_content_o_diff'] = '統一差異'; -$lang['rss_content_o_htmldiff'] = 'HTML格式的差異對照表'; +$lang['rss_content_o_abstract'] = '摘要'; +$lang['rss_content_o_diff'] = '統一的差異'; +$lang['rss_content_o_htmldiff'] = 'HTML 格式的差異對照表'; $lang['rss_content_o_html'] = '完整的 HTML 頁面內容'; -$lang['rss_linkto_o_diff'] = '差別查看'; +$lang['rss_linkto_o_diff'] = '差異檢視'; $lang['rss_linkto_o_page'] = '已修訂的頁面'; $lang['rss_linkto_o_rev'] = '版本清單'; $lang['rss_linkto_o_current'] = '目前頁面'; @@ -171,14 +174,15 @@ $lang['compression_o_0'] = '無'; $lang['compression_o_gz'] = 'gzip'; $lang['compression_o_bz2'] = 'bz2'; $lang['xsendfile_o_0'] = '不使用'; -$lang['xsendfile_o_1'] = '專有 lighttpd 頭(1.5 發布前)'; -$lang['xsendfile_o_2'] = '標准 X-Sendfile 頭'; -$lang['xsendfile_o_3'] = '專有 Nginx X-Accel-Redirect 頭'; +$lang['xsendfile_o_1'] = '專有 lighttpd 標頭 (1.5 發布前)'; +$lang['xsendfile_o_2'] = '標準 X-Sendfile 標頭'; +$lang['xsendfile_o_3'] = '專有 Nginx X-Accel-Redirect 標頭'; $lang['showuseras_o_loginname'] = '登入名稱'; $lang['showuseras_o_username'] = '完整姓名'; -$lang['showuseras_o_email'] = '使用者的 email 位址 (根據郵件監控設定來暗化)'; -$lang['showuseras_o_email_link'] = '使用者的 eamil 位址標示成 mailto: link'; +$lang['showuseras_o_email'] = '使用者的 email 位址 (根據郵件監控設定混淆化)'; +$lang['showuseras_o_email_link'] = '使用者的 email 位址標示成 mailto: link'; $lang['useheading_o_0'] = '永不'; -$lang['useheading_o_navigation'] = '只有導覽'; -$lang['useheading_o_content'] = '只有 Wiki 內容'; +$lang['useheading_o_navigation'] = '僅導覽'; +$lang['useheading_o_content'] = '僅維基內容'; $lang['useheading_o_1'] = '總是'; +$lang['readdircache'] = 'readdir 緩存的最大存在時間 (秒)'; diff --git a/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt b/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt index 41d630199..84d095f51 100644 --- a/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt +++ b/lib/plugins/plugin/lang/zh-tw/admin_plugin.txt @@ -1,3 +1,3 @@ ====== 插件管理器 ====== -本頁中您可以管理與 Dokuwiki [[doku>plugins|插件]] 相關的選項。 要通過插件管理器正常下載並安裝插件,插件所在的文件夾必須可寫。 +您可以用本頁管理與 Dokuwiki [[doku>plugins|插件]] 相關的選項。若要正常下載及安裝插件,插件所在的資料夾必須允許網頁伺服器寫入。 diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php index 2e480ee15..ee9a55e31 100644 --- a/lib/plugins/plugin/lang/zh-tw/lang.php +++ b/lib/plugins/plugin/lang/zh-tw/lang.php @@ -7,10 +7,11 @@ * @author Wayne San * @author Li-Jiun Huang * @author Cheng-Wei Chien + * @author Danny Lin */ -$lang['menu'] = '管理外掛(Plugins)'; -$lang['download'] = '下載與安裝外掛'; -$lang['manage'] = '已安裝的外掛'; +$lang['menu'] = '管理插件(Plugins)'; +$lang['download'] = '下載與安裝插件'; +$lang['manage'] = '已安裝的插件'; $lang['btn_info'] = '資訊'; $lang['btn_update'] = '更新'; $lang['btn_delete'] = '刪除'; @@ -20,21 +21,21 @@ $lang['btn_enable'] = '儲存'; $lang['url'] = 'URL'; $lang['installed'] = '安裝:'; $lang['lastupdate'] = '上次更新:'; -$lang['source'] = '来源:'; +$lang['source'] = '來源:'; $lang['unknown'] = '未知'; $lang['updating'] = '更新中 ...'; -$lang['updated'] = '外掛(Plugin) %s 成功地更新'; -$lang['updates'] = '以下的外掛(Plugin)已經成功地更新'; +$lang['updated'] = '插件 %s 成功地更新'; +$lang['updates'] = '以下的插件已經成功地更新'; $lang['update_none'] = '找不到更新'; $lang['deleting'] = '刪除中 ...'; -$lang['deleted'] = '外掛(Plugin) %s 已刪除。'; +$lang['deleted'] = '插件 %s 已刪除。'; $lang['downloading'] = '下載中 ...'; -$lang['downloaded'] = '外掛(Plugin) %s 已成功地安裝'; -$lang['downloads'] = '以下的外掛(Plugins)已成功地安裝:'; -$lang['download_none'] = '找不到外掛, 或是下載與安裝的期間發生了一些未知的問題'; -$lang['plugin'] = '外掛(Plugin):'; +$lang['downloaded'] = '插件 %s 已成功地安裝'; +$lang['downloads'] = '以下的插件已成功地安裝:'; +$lang['download_none'] = '找不到插件,或在下載與安裝時發生了未知的問題'; +$lang['plugin'] = '插件:'; $lang['components'] = '元件'; -$lang['noinfo'] = '此外掛沒有回傳任何資訊, 可能是無效的'; +$lang['noinfo'] = '此插件沒有回傳任何資訊,可能是無效的'; $lang['name'] = '名稱:'; $lang['date'] = '日期:'; $lang['type'] = '類型:'; @@ -42,13 +43,13 @@ $lang['desc'] = '描述:'; $lang['author'] = '作者:'; $lang['www'] = '網頁:'; $lang['error'] = '一個未知的錯誤發生。'; -$lang['error_download'] = '無法下載外掛檔案: %s'; +$lang['error_download'] = '無法下載插件檔案: %s'; $lang['error_badurl'] = 'URL 可能有問題 - 從 URL 中無法得知文件名'; $lang['error_dircreate'] = '無法建立暫存目錄來接收下載的內容'; $lang['error_decompress'] = '插件管理器無法解壓下載的文件。這可能是由於下載出現錯誤,遇到這種情況,請您再次嘗試;或者是壓縮格式無法識別,遇到這種情況,您需要手動下載並安裝該插件。'; -$lang['error_copy'] = '嘗試安裝插件 %s 的相關文件時產生一個復制錯誤:磁盤空間已滿或文件訪問權限錯誤。這可能是由於一個安裝了一部分的插件,並使得您的維基系統不穩定。'; -$lang['error_delete'] = '嘗試刪除插件 %s 時產生一個錯誤。最有可能的情況是文件或路徑的訪問權限不夠'; -$lang['enabled'] = '插件 %s 已啟動。'; -$lang['notenabled'] = '插件 %s 無法啟動,請檢查檔案權限。'; +$lang['error_copy'] = '嘗試安裝插件 %s 的相關文件時發生複製錯誤:可能是磁碟空間不足或檔案存取權限錯誤。這可能是由於未安裝完全的插件使維基系統不穩定導致。'; +$lang['error_delete'] = '嘗試刪除插件 %s 時發生錯誤。最可能原因是檔案或目錄存取權限不足'; +$lang['enabled'] = '插件 %s 已啟用。'; +$lang['notenabled'] = '插件 %s 無法啟用,請檢查檔案權限。'; $lang['disabled'] = '插件 %s 已停用。'; $lang['notdisabled'] = '插件 %s 無法停用,請檢查檔案權限。'; diff --git a/lib/plugins/popularity/lang/zh-tw/intro.txt b/lib/plugins/popularity/lang/zh-tw/intro.txt index 54444afc0..af0f4a282 100644 --- a/lib/plugins/popularity/lang/zh-tw/intro.txt +++ b/lib/plugins/popularity/lang/zh-tw/intro.txt @@ -2,8 +2,8 @@ 本工具收集關於您維基站點的匿名信息,並允許您將其發送給 DokuWiki 的開發者。這樣做有助於我們了解用戶是如何使用 DokuWiki 的,並能使我們未來的開發決策建立在現實使用數據上。 -我們鼓勵您不時重復該步驟,以便我們能了解您的維基站點發展進度。您的數據集將被匿名 ID 標識。 +我們鼓勵您不時重複該步驟,以便我們能了解您的維基站台發展進度。您的數據集將被匿名 ID 標識。 -收集的數據包括 DokuWiki 版本、您的頁面數量以及文件大小、已安裝的插件、服務器上的 PHP 相關信息。 +收集的資料包括 DokuWiki 版本、您的頁面數量以及文件大小、已安裝的插件、服務器上的 PHP 相關信息。 -將被發送的原始數據如下所示。請點擊“發送數據”按扭進行傳輸。 \ No newline at end of file +將被發送的原始數據如下所示。請點擊「發送數據」按扭進行傳輸。 \ No newline at end of file diff --git a/lib/plugins/popularity/lang/zh-tw/lang.php b/lib/plugins/popularity/lang/zh-tw/lang.php index 4757ab84b..7e177f1b0 100644 --- a/lib/plugins/popularity/lang/zh-tw/lang.php +++ b/lib/plugins/popularity/lang/zh-tw/lang.php @@ -7,6 +7,7 @@ * @author Wayne San * @author Li-Jiun Huang * @author Cheng-Wei Chien + * @author Danny Lin */ $lang['name'] = '人氣反饋(載入可能需要一些時間)'; -$lang['submit'] = '發送數據'; +$lang['submit'] = '發送資料'; diff --git a/lib/plugins/revert/lang/zh-tw/intro.txt b/lib/plugins/revert/lang/zh-tw/intro.txt index 2aad10206..b01b15d52 100644 --- a/lib/plugins/revert/lang/zh-tw/intro.txt +++ b/lib/plugins/revert/lang/zh-tw/intro.txt @@ -1,3 +1,4 @@ ====== 還原管理器 ====== -該頁面能幫助您的頁面從垃圾信息的攻擊中自動還原過來。 請先輸入關鍵詞搜索包含垃圾信息的頁面(如某個垃圾信息的 URL),然后請確定搜索結果的確包含垃圾信息,並將其還原至先前的修訂版。 +該頁面能幫助您的頁面從垃圾信息的攻擊中自動還原過來。 +請先輸入關鍵字詞搜尋包含垃圾信息的頁面(如垃圾信息的 URL),確認搜尋結果的確包含垃圾訊息,再將它們還原。 diff --git a/lib/plugins/revert/lang/zh-tw/lang.php b/lib/plugins/revert/lang/zh-tw/lang.php index 40a137dc0..f72cdc5e0 100644 --- a/lib/plugins/revert/lang/zh-tw/lang.php +++ b/lib/plugins/revert/lang/zh-tw/lang.php @@ -7,13 +7,14 @@ * @author Wayne San * @author Li-Jiun Huang * @author Cheng-Wei Chien + * @author Danny Lin */ $lang['menu'] = '還原管理'; $lang['filter'] = '搜索包含垃圾信息的頁面'; -$lang['revert'] = '還原所選的頁面'; +$lang['revert'] = '還原選取的頁面'; $lang['reverted'] = '%s已還原到版本%s'; $lang['removed'] = '%s已移除'; $lang['revstart'] = '已開始還原操作。有可能需要很長時間。如果計時器在還原操作完成前停止了,請嘗試還原較少的內容。'; -$lang['revstop'] = '還原程序已成工的完成。'; +$lang['revstop'] = '還原程序已成功完成。'; $lang['note1'] = '注意: 搜尋有分大小寫'; -$lang['note2'] = '注意: 此頁將會被還原到不包含給予的spam term %s 的最新版本.'; +$lang['note2'] = '注意:此頁面將被還原到不含垃圾訊息 %s 的最新版本。'; diff --git a/lib/plugins/usermanager/lang/zh-tw/lang.php b/lib/plugins/usermanager/lang/zh-tw/lang.php index 26c87205d..5deacc073 100644 --- a/lib/plugins/usermanager/lang/zh-tw/lang.php +++ b/lib/plugins/usermanager/lang/zh-tw/lang.php @@ -8,6 +8,7 @@ * @author Wayne San * @author Li-Jiun Huang * @author Cheng-Wei Chien + * @author Danny Lin */ $lang['menu'] = '帳號管理員(User Manager)'; $lang['noauth'] = '(帳號認證尚未開放)'; @@ -41,7 +42,7 @@ $lang['start'] = '開始'; $lang['prev'] = '上一步'; $lang['next'] = '下一步'; $lang['last'] = '最後步驟'; -$lang['edit_usermissing'] = '找不到所選的帳號,該帳號可能已經被刪除或是改為其他名稱喔。'; +$lang['edit_usermissing'] = '找不到所選的帳號,可能是被刪除或被改為其他名稱。'; $lang['user_notify'] = '通知使用者'; $lang['note_notify'] = '通知信只有在給予使用者新密碼時寄送。'; $lang['note_group'] = '如果沒有指定群組,新使用者將會被加入到預設群組(%s)當中。'; -- cgit v1.2.3 From 09c9364122228f0f5af667a94832f15dbc308c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Urban=C4=8Di=C4=8D?= Date: Sat, 22 Jan 2011 13:33:44 +0100 Subject: Slovenian language update --- inc/lang/sl/admin.txt | 4 +- inc/lang/sl/adminplugins.txt | 2 +- inc/lang/sl/backlinks.txt | 4 +- inc/lang/sl/conflict.txt | 7 +- inc/lang/sl/denied.txt | 5 +- inc/lang/sl/diff.txt | 5 +- inc/lang/sl/draft.txt | 6 +- inc/lang/sl/edit.txt | 3 +- inc/lang/sl/editrev.txt | 2 +- inc/lang/sl/index.txt | 2 +- inc/lang/sl/lang.php | 323 ++++++++++++++--------------- inc/lang/sl/locked.txt | 2 +- inc/lang/sl/login.txt | 3 +- inc/lang/sl/mailtext.txt | 12 +- inc/lang/sl/newpage.txt | 4 +- inc/lang/sl/norev.txt | 5 +- inc/lang/sl/password.txt | 13 +- inc/lang/sl/preview.txt | 3 +- inc/lang/sl/pwconfirm.txt | 14 +- inc/lang/sl/read.txt | 2 +- inc/lang/sl/recent.txt | 6 +- inc/lang/sl/register.txt | 5 +- inc/lang/sl/registermail.txt | 20 +- inc/lang/sl/resendpwd.txt | 4 +- inc/lang/sl/revisions.txt | 3 +- inc/lang/sl/searchpage.txt | 4 +- inc/lang/sl/showrev.txt | 2 +- inc/lang/sl/subscr_digest.txt | 17 +- inc/lang/sl/subscr_list.txt | 13 +- inc/lang/sl/updateprofile.txt | 4 +- inc/lang/sl/uploadmail.txt | 21 +- lib/plugins/acl/lang/sl/lang.php | 21 +- lib/plugins/config/lang/sl/lang.php | 3 +- lib/plugins/plugin/lang/sl/lang.php | 3 +- lib/plugins/popularity/lang/sl/lang.php | 1 + lib/plugins/revert/lang/sl/lang.php | 1 + lib/plugins/usermanager/lang/sl/add.txt | 2 +- lib/plugins/usermanager/lang/sl/delete.txt | 2 +- lib/plugins/usermanager/lang/sl/edit.txt | 2 +- lib/plugins/usermanager/lang/sl/lang.php | 21 +- 40 files changed, 282 insertions(+), 294 deletions(-) diff --git a/inc/lang/sl/admin.txt b/inc/lang/sl/admin.txt index fc78273ac..89b924e08 100644 --- a/inc/lang/sl/admin.txt +++ b/inc/lang/sl/admin.txt @@ -1,3 +1,3 @@ -===== Administracija ===== +===== Skrbnitvo ===== -Spodaj lahko vidite seznam administrativnih opravil v DokuWikiju. \ No newline at end of file +Spodaj je naveden seznam skrbnikih opravil sistema DokuWiki. \ No newline at end of file diff --git a/inc/lang/sl/adminplugins.txt b/inc/lang/sl/adminplugins.txt index 9438b4759..899c854fc 100644 --- a/inc/lang/sl/adminplugins.txt +++ b/inc/lang/sl/adminplugins.txt @@ -1 +1 @@ -===== Dodatni vtičniki ===== \ No newline at end of file +===== Dodatni vstavki ===== \ No newline at end of file diff --git a/inc/lang/sl/backlinks.txt b/inc/lang/sl/backlinks.txt index e637199c0..466f96cf4 100644 --- a/inc/lang/sl/backlinks.txt +++ b/inc/lang/sl/backlinks.txt @@ -1,4 +1,4 @@ -====== Kaj je povezano sem ====== +====== Povratne povezave ====== -To je seznam strani, ki so povezane na trenutno stran. Opomba: CamelCase povezave niso zaznane kot take povezave. +Spodaj je naveden seznam strani, ki so povezane na trenutno stran. CamelCase povezave niso zaznane kot povratne povezave. diff --git a/inc/lang/sl/conflict.txt b/inc/lang/sl/conflict.txt index 7ada08b5f..ec5b37016 100644 --- a/inc/lang/sl/conflict.txt +++ b/inc/lang/sl/conflict.txt @@ -1,6 +1,5 @@ -====== Obstaja novejša različica ====== +====== Obstaja novejša različica dokumenta ====== -Obstaja novejša različica dokumenta, ki ga urejate. Do tega pride, ko kak drugi uporabnik spremeni dokument med vašim urejanjem. - -Temeljito preglejte spodaj prikazane razlike in se potem odločite, katero verzijo želite obdržati. Če izberete ''shrani'', bo shranjena vaša različica. Pritisnite ''prekliči'', če želite ohraniti trenutno različico. +Obstaja novejša različica dokumenta, ki ga trenutno urejate. Do zapleta pride, ko drug uporabnik spremeni dokument med vašim urejanjem in ga pred vami shrani. +Temeljito preglejte spodaj izpisane razlike med dokumentoma in izberite različico, ki jo želite ohraniti. V kolikor je izbrana možnost ''shrani'', bo shranjena vaša zadnja različica. Z izbiro možnosti ''prekliči'', pa bo ohranjena trenutno shranjena različica. diff --git a/inc/lang/sl/denied.txt b/inc/lang/sl/denied.txt index 96c03a569..5b5fd4d3a 100644 --- a/inc/lang/sl/denied.txt +++ b/inc/lang/sl/denied.txt @@ -1,4 +1,3 @@ -====== Nimate dovoljenja ====== - -Oprostite, za nadaljevanje nimati dovolj dovoljenj. Mogoče ste se pozabili prijaviti? +====== Ni ustreznih dovoljenj ====== +Za nadaljevanje opravila je treba imeti ustrezna dovoljenja. Ali ste se morda pozabili prijaviti? diff --git a/inc/lang/sl/diff.txt b/inc/lang/sl/diff.txt index f98f7e5ce..5cb2e3a12 100644 --- a/inc/lang/sl/diff.txt +++ b/inc/lang/sl/diff.txt @@ -1,4 +1,3 @@ -====== Primerjaj izbrane različice ====== - -Prikazana je razlika med izbrano in trenutno različico te strani. +====== Primerjava izbranih različic ====== +Prikazane so razlike med izbrano in trenutno različico strani. diff --git a/inc/lang/sl/draft.txt b/inc/lang/sl/draft.txt index 9fea86fd1..b3fe4de35 100644 --- a/inc/lang/sl/draft.txt +++ b/inc/lang/sl/draft.txt @@ -1,5 +1,5 @@ -=====Najden je bil osnutek strani===== +===== Zaznan je shranjen osnutek strani ===== -Vaša zadnja seja na tej strani ni bila pravilno zaključena. DokuWiki je samodejno shranil osnutek med vašim delom, katerega sedaj lahko nadaljujete. Spodaj lahko vidite podatke, ki so bili samodejno shranjeni v vaši zadnji seji. +Zadnja seja te strani ni bila pravilno zaključena. Sistem DokuWiki je samodejno shranil osnutek strani, ki ga je mogoče naprej urejati. Spodaj so navedeni podatki samodejnega shranjevanja zadnje seje. -Prosimo, odločite se ali boste //obnovili// vašo sejo, //izbrisali// samodejno shranjen osnutek alo //prekinili// proces urejanja. \ No newline at end of file +Vsebino osnutka je mogoče //obnoviti// na zadnjo sejo, //izbrisati// samodejno shranjen osnutek ali pa //prekiniti// urejanje. \ No newline at end of file diff --git a/inc/lang/sl/edit.txt b/inc/lang/sl/edit.txt index 180a97ade..71d5fb02f 100644 --- a/inc/lang/sl/edit.txt +++ b/inc/lang/sl/edit.txt @@ -1,2 +1 @@ -Uredite stran in pritisnite ''Shrani''. Glej [[wiki:syntax]] za navodila za urejanje. Prosimo vas, da stran spremenite le, če jo nameravate **izboljšati**. Če hočete preizkusiti kakšno zadevo, se poigrajte v [[playground:playground|peskovniku]]. - +Po koncu urejanja strani, je stran treba ''shraniti''. Navodila in podrobnosti za urejanje je mogoče najti na strani [[wiki:syntax|skladnje]]. Možnosti urejanja in pravila skladnje je mogoče varno preizkusiti v [[playground:playground|peskovniku]]. diff --git a/inc/lang/sl/editrev.txt b/inc/lang/sl/editrev.txt index cf2b4ec7b..baaacd270 100644 --- a/inc/lang/sl/editrev.txt +++ b/inc/lang/sl/editrev.txt @@ -1,2 +1,2 @@ -**Naložili ste staro različico dokumenta!** Če jo shranite, boste ustvarili novo različico s to vsebino. +**Naložena je stara različica dokumenta!** V kolikor staro različico shranite, bo shranjena kot najnovejša različica. ---- \ No newline at end of file diff --git a/inc/lang/sl/index.txt b/inc/lang/sl/index.txt index 89dd05fbe..81ccd47ad 100644 --- a/inc/lang/sl/index.txt +++ b/inc/lang/sl/index.txt @@ -1,4 +1,4 @@ ====== Kazalo ====== -To je kazalo vseh strani, ki so na voljo, urejenimi po [[doku>namespaces|imenskih prostorih]]. +Na spodnjem seznamu so izpisane vse wiki strani, ki so na voljo, urejene pa so skladno z [[doku>namespaces|imenskimi prostori]]. diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php index 8014d8a70..ed6b6db81 100644 --- a/inc/lang/sl/lang.php +++ b/inc/lang/sl/lang.php @@ -1,45 +1,46 @@ * @author Boštjan Seničar * @author Dejan Levec * @author Gregor Skumavc (grega.skumavc@gmail.com) + * @author Matej Urbančič (mateju@svn.gnome.org) */ $lang['encoding'] = 'utf-8'; -$lang['direction'] = 'ltr'; +$lang['direction'] = 'L-D'; $lang['doublequoteopening'] = '„'; $lang['doublequoteclosing'] = '“'; $lang['singlequoteopening'] = '‚'; $lang['singlequoteclosing'] = '‘'; $lang['apostrophe'] = '’'; -$lang['btn_edit'] = 'Uredi to stran'; -$lang['btn_source'] = 'Prikaži izvorno kodo strani'; -$lang['btn_show'] = 'Prikaži stran'; -$lang['btn_create'] = 'Ustvari to stran'; -$lang['btn_search'] = 'Išči'; +$lang['btn_edit'] = 'Uredi stran'; +$lang['btn_source'] = 'Pokaži izvorno kodo strani'; +$lang['btn_show'] = 'Pokaži stran'; +$lang['btn_create'] = 'Ustvari stran'; +$lang['btn_search'] = 'Poišči'; $lang['btn_save'] = 'Shrani'; $lang['btn_preview'] = 'Predogled'; $lang['btn_top'] = 'Nazaj na vrh'; $lang['btn_newer'] = '<< novejši'; $lang['btn_older'] = 'starejši >>'; $lang['btn_revs'] = 'Stare različice'; -$lang['btn_recent'] = 'Novosti'; +$lang['btn_recent'] = 'Nedavne spremembe'; $lang['btn_upload'] = 'Pošlji'; $lang['btn_cancel'] = 'Prekliči'; $lang['btn_index'] = 'Kazalo'; $lang['btn_secedit'] = 'Uredi'; $lang['btn_login'] = 'Prijava'; $lang['btn_logout'] = 'Odjava'; -$lang['btn_admin'] = 'Administrator'; +$lang['btn_admin'] = 'Skrbništvo'; $lang['btn_update'] = 'Posodobi'; $lang['btn_delete'] = 'Izbriši'; $lang['btn_back'] = 'Nazaj'; -$lang['btn_backlink'] = 'Navzkrižne povezave'; -$lang['btn_backtomedia'] = 'Nazaj na izbiro medijskih datotek'; -$lang['btn_subscribe'] = 'Uredi naročnine'; +$lang['btn_backlink'] = 'Povratne povezave'; +$lang['btn_backtomedia'] = 'Nazaj na izbiro predstavnih datotek'; +$lang['btn_subscribe'] = 'Urejanje naročnin'; $lang['btn_profile'] = 'Posodobi profil'; $lang['btn_reset'] = 'Ponastavi'; $lang['btn_resendpwd'] = 'Pošlji novo geslo'; @@ -47,59 +48,58 @@ $lang['btn_draft'] = 'Uredi osnutek'; $lang['btn_recover'] = 'Obnovi osnutek'; $lang['btn_draftdel'] = 'Izbriši osnutek'; $lang['btn_revert'] = 'Povrni'; -$lang['loggedinas'] = 'Prijavljen kot'; +$lang['loggedinas'] = 'Prijava kot'; $lang['user'] = 'Uporabniško ime'; $lang['pass'] = 'Geslo'; $lang['newpass'] = 'Novo geslo'; $lang['oldpass'] = 'Potrdi trenutno geslo'; -$lang['passchk'] = 'ponovno'; +$lang['passchk'] = 'znova'; $lang['remember'] = 'Zapomni si me'; $lang['fullname'] = 'Pravo ime'; -$lang['email'] = 'Elektronska pošta'; -$lang['register'] = 'Odpri nov račun'; -$lang['profile'] = 'Profil uporabnika'; -$lang['badlogin'] = 'Oprostite, uporabniško ime ali geslo ni pravo.'; +$lang['email'] = 'Elektronski naslov'; +$lang['register'] = 'Vpis računa'; +$lang['profile'] = 'Uporabniški profil'; +$lang['badlogin'] = 'Uporabniško ime ali geslo je napačno.'; $lang['minoredit'] = 'Manjše spremembe'; -$lang['draftdate'] = 'Samodejno shranjevanje osnutka vključeno'; -$lang['nosecedit'] = 'Stran se je medtem spremenila, informacije odseka so bile stare, naložila se je celotna stran.'; -$lang['regmissing'] = 'Oprostite, zapolniti morate vsa polja.'; -$lang['reguexists'] = 'Oprostite, uporabnik s tem imenom že obstaja.'; -$lang['regsuccess'] = 'Uporabnik je bil ustvarjen. Geslo je bilo poslano na vaš elektronski naslov.'; -$lang['regsuccess2'] = 'Uporabnik je bil ustvarjen.'; -$lang['regmailfail'] = 'Zgleda, da je prišlo do napake pri pošiljanju gesla. Prosimo da stopite v stik z administratorjem!'; -$lang['regbadmail'] = 'Podan elektronski naslov izgleda neveljaven - če mislite da je to napaka, stopite v stik z administratorjem.'; -$lang['regbadpass'] = 'Gesli nista enaki.'; -$lang['regpwmail'] = 'Vaše geslo za DokuWiki'; -$lang['reghere'] = 'Nimate še računa? Priskrbite si ga'; -$lang['profna'] = 'Ta wiki ne podpira sprememb profila'; -$lang['profnochange'] = 'Brez sprememb, ničesar za storiti.'; -$lang['profnoempty'] = 'Prazno polje "e-pošta" ali "ime" ni dovoljeno.'; -$lang['profchanged'] = 'Uporabniški profil uspešno posodobljen'; -$lang['pwdforget'] = 'Pozabili geslo? Pridobite novega'; -$lang['resendna'] = 'Ta wiki ne podpira ponovnega pošiljanja gesel.'; +$lang['draftdate'] = 'Samodejno shranjevanje osnutka je omogočeno'; +$lang['nosecedit'] = 'Stran je bila v vmesnem času spremenjena. Podatki strani so bili zastareli, zato se je celotna vsebina naložila znova.'; +$lang['regmissing'] = 'Izpolniti je treba vsa polja.'; +$lang['reguexists'] = 'Uporabnik s tem imenom že obstaja.'; +$lang['regsuccess'] = 'Uporabniški račun je uspešno ustvarjen. Geslo je bilo poslano na naveden elektronski naslov.'; +$lang['regsuccess2'] = 'Uporabniški račun je uspešno ustvarjen.'; +$lang['regmailfail'] = 'Videti je, da je prišlo do napake med pošiljanjem gesla. Stopite v stik s skrbnikom sistema!'; +$lang['regbadmail'] = 'Videti je, da je naveden elektronski naslov neveljaven - v kolikor je to napaka, stopite v stik s skrbnikom sistema.'; +$lang['regbadpass'] = 'Gesli nista enaki. Poskusite znova.'; +$lang['regpwmail'] = 'Geslo za DokuWiki'; +$lang['reghere'] = 'Nimate še računa? Vpišite se za nov račun.'; +$lang['profna'] = 'Wiki ne podpira spreminjanja profila.'; +$lang['profnochange'] = 'Brez sprememb.'; +$lang['profnoempty'] = 'Prazno polje elektronskega naslova ali imena ni dovoljeno.'; +$lang['profchanged'] = 'Uporabniški profil je uspešno posodobljen.'; +$lang['pwdforget'] = 'Ali ste pozabili geslo? Pridobite si novo geslo.'; +$lang['resendna'] = 'Wiki ne podpira možnosti ponovnega pošiljanja gesel.'; $lang['resendpwd'] = 'Pošlji novo geslo za'; -$lang['resendpwdmissing'] = 'Se opravičujemo, vendar morate izpolniti vsa polja.'; -$lang['resendpwdnouser'] = 'Se opravičujemo, vendar tega uporabniškega imena ni v bazi.'; -$lang['resendpwdbadauth'] = 'Oprostite, ta avtorizacijska koda ni prava. Prepričajte se, da ste uporabili celotno povezavo za potrditev.'; -$lang['resendpwdconfirm'] = 'Potrditvena povezava je bila poslana na vaš elektronski naslov'; -$lang['resendpwdsuccess'] = 'Vaše novo geslo je bilo poslano na vaš elektronski naslov'; -$lang['license'] = 'Če ni drugače navedeno, je vsebina tega wikija licencirana z naslednjo licenco:'; -$lang['licenseok'] = 'Pomembno: Z urejanjem te strani se strinjate s tem, da se vsebina zaščiti z naslednjo licenco:'; -$lang['searchmedia'] = 'Išči datoteko:'; -$lang['searchmedia_in'] = 'Išči v %s'; +$lang['resendpwdmissing'] = 'Izpolniti je treba vsa polja.'; +$lang['resendpwdnouser'] = 'Podanega uporabniškega imena v podatkovni zbirki ni mogoče najti.'; +$lang['resendpwdbadauth'] = 'Koda za overitev ni prava. Prepričajte se, da ste uporabili celotno povezavo za potrditev.'; +$lang['resendpwdconfirm'] = 'Povezava za potrditev računa je bila poslana na elektronski naslov.'; +$lang['resendpwdsuccess'] = 'Novo geslo je bilo poslano na elektronski naslov.'; +$lang['license'] = 'V kolikor ni posebej določeno, je vsebina Wiki strani objavljena pod pogoji dovoljenja:'; +$lang['licenseok'] = 'Opomba: z urejanjem vsebine strani, se strinjate z objavo pod pogoji dovoljenja:'; +$lang['searchmedia'] = 'Poišči ime datoteke:'; +$lang['searchmedia_in'] = 'Poišči v %s'; $lang['txt_upload'] = 'Izberite datoteko za pošiljanje'; -$lang['txt_filename'] = 'Vnesite wikiname (neobvezno)'; +$lang['txt_filename'] = 'Pošlji z imenom (izborno)'; $lang['txt_overwrt'] = 'Prepiši obstoječo datoteko'; -$lang['lockedby'] = 'Trenutno zaklenjeno od'; -$lang['lockexpire'] = 'Zaklep preteče'; -$lang['willexpire'] = 'Vaš zaklep za urejevanje bo pretekel čez eno minuto.\nDa se izognete konfliktom, uporabite predogled, da se merilnik časa za zaklep ponastavi.'; -$lang['js']['notsavedyet'] = 'Obstajajo neshranjene spremembe, ki bodo izgubljene. -Res želite nadaljevati?'; -$lang['js']['searchmedia'] = 'Išči datoteke'; -$lang['js']['keepopen'] = 'Od izbiri obdrži okno odprto'; +$lang['lockedby'] = 'Trenutno je zaklenjeno s strani'; +$lang['lockexpire'] = 'Zaklep preteče ob'; +$lang['willexpire'] = 'Zaklep za urejevanje bo pretekel čez eno minuto.\nV izogib sporom, uporabite predogled, da se merilnik časa za zaklep ponastavi.'; +$lang['js']['notsavedyet'] = 'Neshranjene spremembe bodo izgubljene.'; +$lang['js']['searchmedia'] = 'Poišči datoteke'; +$lang['js']['keepopen'] = 'Od izbiri ohrani okno odprto'; $lang['js']['hidedetails'] = 'Skrij podrobnosti'; $lang['js']['mediatitle'] = 'Nastavitve povezave'; -$lang['js']['mediadisplay'] = 'Vrsta povezave'; +$lang['js']['mediadisplay'] = 'Vrsta povezaave'; $lang['js']['mediaalign'] = 'Poravnava'; $lang['js']['mediasize'] = 'Velikost slike'; $lang['js']['mediatarget'] = 'Mesto povezave'; @@ -107,104 +107,103 @@ $lang['js']['mediaclose'] = 'Zapri'; $lang['js']['mediainsert'] = 'Vstavi'; $lang['js']['mediadisplayimg'] = 'Pokaži sliko.'; $lang['js']['mediadisplaylnk'] = 'Pokaži le povezavo.'; -$lang['js']['mediasmall'] = 'Manjša različica'; +$lang['js']['mediasmall'] = 'Majhna različica'; $lang['js']['mediamedium'] = 'Srednja različica'; $lang['js']['medialarge'] = 'Velika različica'; -$lang['js']['mediaoriginal'] = 'Originalna različica'; -$lang['js']['medialnk'] = 'Povezava na detajle strani'; -$lang['js']['mediadirect'] = 'Direktna povezava na original'; +$lang['js']['mediaoriginal'] = 'Izvorna različica'; +$lang['js']['medialnk'] = 'Povezava na strani podrobnosti'; +$lang['js']['mediadirect'] = 'Neposredna povezava do izvorne različice'; $lang['js']['medianolnk'] = 'Brez povezave'; -$lang['js']['medianolink'] = 'Ne poveži na sliko'; -$lang['js']['medialeft'] = 'Poravnaj sliko na levi'; -$lang['js']['mediaright'] = 'Poravnaj sliko na desni'; -$lang['js']['mediacenter'] = 'Poravnaj sliko na sredino'; -$lang['js']['medianoalign'] = 'Ne uporabi poravnave'; -$lang['js']['nosmblinks'] = 'Povezovanje do Windows deljenih datotek deluje samo v Microsoft Internet Explorer-ju. -Še vedno pa lahko ročno kopirate povezavo.'; +$lang['js']['medianolink'] = 'Ne poveži s sliko'; +$lang['js']['medialeft'] = 'Poravnaj sliko na levo.'; +$lang['js']['mediaright'] = 'Poravnaj sliko na desno.'; +$lang['js']['mediacenter'] = 'Poravnaj sliko na sredini.'; +$lang['js']['medianoalign'] = 'Ne uporabi poravnave.'; +$lang['js']['nosmblinks'] = 'Povezovanje do souporabenih datotek sistema Windows deluje le pri uporabi brskalnika Microsoft Internet Explorer. Povezavo je mogoče kopirati ročno.'; $lang['js']['linkwiz'] = 'Čarovnik za povezave'; $lang['js']['linkto'] = 'Poveži na:'; -$lang['js']['del_confirm'] = 'Resnično brišem izbrano(e) sliko(e)?'; -$lang['js']['mu_btn'] = 'Prenesite več dokumentov naenkrat.'; -$lang['rssfailed'] = 'Prišlo je do napake pri prenašanju tega dovoda: '; -$lang['nothingfound'] = 'Nič ni bilo najdeno.'; -$lang['mediaselect'] = 'Mediafile Izbira'; -$lang['fileupload'] = 'Mediafile Pošiljanje'; -$lang['uploadsucc'] = 'Pošiljanje uspelo'; -$lang['uploadfail'] = 'Pošiljanje je spodletelo. Mogoče nimate dovoljenj?'; -$lang['uploadwrong'] = 'Pošiljanje zavrnjeno. Ta datotečna končnica je prepovedana'; -$lang['uploadexist'] = 'Dokument že obstaja. Brez sprememb.'; -$lang['uploadbadcontent'] = 'Naložena datoteka se ne ujema z/s %s končnico datoteke.'; -$lang['uploadspam'] = 'Nalaganje je bilo ustavljeno zaradi "črne liste" neželenih datotek.'; -$lang['uploadxss'] = 'Prenos je bil zaustavljen zaradi možne zlonamerne vsebine.'; -$lang['uploadsize'] = 'Prenesen dokument je prevelik. (max. %s)'; -$lang['deletesucc'] = 'Datoteka "%s" je bila izbrisana.'; -$lang['deletefail'] = '"%s" ni bilo možno izbrisati - preverite nastavitve CHMOD'; -$lang['mediainuse'] = 'Dokument "%s" ni bil izbrisan - je še vedno v uporabi.'; +$lang['js']['del_confirm'] = 'Ali naj se res izbrišejo izbrani predmeti?'; +$lang['js']['mu_btn'] = 'Pošiljanje več dokumentov hkrati.'; +$lang['rssfailed'] = 'Prišlo je do napake med pridobivanjem vira: '; +$lang['nothingfound'] = 'Ni najdenih predmetov.'; +$lang['mediaselect'] = 'Predstavne datoteke'; +$lang['fileupload'] = 'Pošiljanje predstavnih datotek'; +$lang['uploadsucc'] = 'Pošiljanje je bilo uspešno končano.'; +$lang['uploadfail'] = 'Pošiljanje je spodletelo. Morda so uporabljena neustrezna dovoljenja.'; +$lang['uploadwrong'] = 'Pošiljanje je zavrnjeno. Uporabljena pripona datoteke je prepovedana.'; +$lang['uploadexist'] = 'Datoteka že obstaja. Ni sprememb.'; +$lang['uploadbadcontent'] = 'Poslana datoteka se ne sklada s pripono (%s) datoteke.'; +$lang['uploadspam'] = 'Pošiljanje je bilo ustavljeno na podlagi zapisa na črnem seznamu neželenih datotek.'; +$lang['uploadxss'] = 'Pošiljanje je zaustavljeno zaradi morebitne zlonamerne vsebine.'; +$lang['uploadsize'] = 'poslana datoteka prevelika (največja dovoljena velikost je %s).'; +$lang['deletesucc'] = 'Datoteka "%s" je izbrisana.'; +$lang['deletefail'] = 'Datoteke "%s" ni mogoče izbrisati - preverite uporabniška dovoljenja.'; +$lang['mediainuse'] = 'Datoteka "%s" ni izbrisana - datoteka je še vedno v uporabi.'; $lang['namespaces'] = 'Imenski prostori'; -$lang['mediafiles'] = 'Datoteke ki so na voljo v'; -$lang['accessdenied'] = 'Nimate dovoljenja za ogled te strani.'; -$lang['mediausage'] = 'Uporabite naslednjo kodo za navajanje te datoteke:'; -$lang['mediaview'] = 'Poglej originalno datoteko'; -$lang['mediaroot'] = 'korenska mapa'; -$lang['mediaupload'] = 'Naložite datoteko v trenutno mapo. Za ustvarjanje novih podmap, jih pripnite pred "Naloži kot" ime in jih ločite z navpičnico.'; -$lang['mediaextchange'] = 'Končnica datoteke se je spremenila iz .%s v .%s!'; -$lang['reference'] = 'Reference za'; -$lang['ref_inuse'] = 'Te datoteke ni možno izbrisati, ker jo še vedno uporablja(jo) stran(i):'; -$lang['ref_hidden'] = 'Nekaj referenc je na straneh, do katerih nimate dostopa.'; -$lang['hits'] = 'Zadetkov'; -$lang['quickhits'] = 'Ujemanja v imenih strani'; +$lang['mediafiles'] = 'Datoteke, ki so na voljo v'; +$lang['accessdenied'] = 'Za ogled te strani so zahtevana posebna dovoljenja.'; +$lang['mediausage'] = 'Za navajanje datoteke je treba uporabiti navedeno skladnjo:'; +$lang['mediaview'] = 'Pogled izvorne datoteke'; +$lang['mediaroot'] = 'koren'; +$lang['mediaupload'] = 'Pošiljanje datoteke v trenutni imenski prostor. Za ustvarjanje novih imenskih prostorov, jih pripnite k imenu datoteke navedene pri vnosnem polju "Naloži kot" in jih ločite z dvopičjem.'; +$lang['mediaextchange'] = 'Pripona datoteke je spremenjena iz .%s v .%s!'; +$lang['reference'] = 'Sklic za'; +$lang['ref_inuse'] = 'Datoteke ni mogoče izbrisati, saj je še vedno povezana s stranmi:'; +$lang['ref_hidden'] = 'Nekaj sklicev je navedenih na straneh, do katerih s trenutnimi dovoljenji ni mogoč dostop.'; +$lang['hits'] = 'Zadetki'; +$lang['quickhits'] = 'Ujemanje imen strani'; $lang['toc'] = 'Kazalo'; -$lang['current'] = 'trenutna'; +$lang['current'] = 'Trenutna'; $lang['yours'] = 'Vaša različica'; -$lang['diff'] = 'prikaži razlike s trenutno različico'; -$lang['diff2'] = 'Pokaži razlike med izbranimi revizijami'; -$lang['difflink'] = 'Naredi povezavo na to primerjavo'; +$lang['diff'] = 'Pokaži razlike s trenutno različico'; +$lang['diff2'] = 'Pokaži razlike med izbranimi različicami.'; +$lang['difflink'] = 'Poveži s tem pogledom primerjave.'; $lang['line'] = 'Vrstica'; $lang['breadcrumb'] = 'Sled'; -$lang['youarehere'] = 'Tukaj ste'; -$lang['lastmod'] = 'Zadnjič spremenil/a'; -$lang['by'] = 'od'; +$lang['youarehere'] = 'Trenutno dejavna stran'; +$lang['lastmod'] = 'Zadnja sprememba'; +$lang['by'] = 'uporabnika'; $lang['deleted'] = 'odstranjena'; $lang['created'] = 'ustvarjena'; -$lang['restored'] = 'stara različica povrnjena'; +$lang['restored'] = 'povrnjena stara različica'; $lang['external_edit'] = 'urejanje v zunanjem urejevalniku'; $lang['summary'] = 'Povzetek urejanja'; -$lang['noflash'] = 'Za prikaz vsebine potrebujete Adobe Flash Plugin'; +$lang['noflash'] = 'Za prikaz vsebine je treba namestiti Adobe Flash Plugin'; $lang['download'] = 'Naloži izrezek'; $lang['mail_newpage'] = '[DokuWiki] stran dodana:'; $lang['mail_changed'] = '[DokuWiki] stran spremenjena:'; $lang['mail_subscribe_list'] = 'strani s spremenjenim imenom:'; -$lang['mail_new_user'] = 'nov uporabnik.'; +$lang['mail_new_user'] = 'nov uporabnik:'; $lang['mail_upload'] = 'naložena datoteka:'; -$lang['qb_bold'] = 'Krepki tisk'; -$lang['qb_italic'] = 'Ležeči tisk'; +$lang['qb_bold'] = 'Krepko besedilo'; +$lang['qb_italic'] = 'Ležeče besedilo'; $lang['qb_underl'] = 'Podčrtano besedilo'; -$lang['qb_code'] = 'Koda'; +$lang['qb_code'] = 'Oznaka kode'; $lang['qb_strike'] = 'Prečrtano besedilo'; -$lang['qb_h1'] = 'Naslov prve stopnje'; -$lang['qb_h2'] = 'Naslov drugee stopnje'; -$lang['qb_h3'] = 'Naslov tretje stopnje'; -$lang['qb_h4'] = 'Naslov četrte stopnje'; -$lang['qb_h5'] = 'Naslov pete stopnje'; +$lang['qb_h1'] = 'Naslov prve ravni'; +$lang['qb_h2'] = 'Naslov druge ravni'; +$lang['qb_h3'] = 'Naslov tretje ravni'; +$lang['qb_h4'] = 'Naslov četrte ravni'; +$lang['qb_h5'] = 'Naslov pete ravni'; $lang['qb_h'] = 'Naslov'; $lang['qb_hs'] = 'Izberi naslov'; -$lang['qb_hplus'] = 'Naslov na višjem nivoju'; -$lang['qb_hminus'] = 'Naslov na nižjem nivoju'; -$lang['qb_hequal'] = 'Naslov na istem nivoju'; +$lang['qb_hplus'] = 'Naslov na višji ravni'; +$lang['qb_hminus'] = 'Naslov na nižji ravni'; +$lang['qb_hequal'] = 'Naslov na isti ravni'; $lang['qb_link'] = 'Notranja povezava'; $lang['qb_extlink'] = 'Zunanja povezava'; $lang['qb_hr'] = 'Vodoravna črta'; -$lang['qb_ol'] = 'Element urejenega seznama'; -$lang['qb_ul'] = 'Element neurejenega seznama'; -$lang['qb_media'] = 'Dodaj slike in druge datoteke'; +$lang['qb_ol'] = 'Številčna oznaka predmeta'; +$lang['qb_ul'] = 'Vrstična oznaka predmeta'; +$lang['qb_media'] = 'Dodajanje slik in drugih datotek'; $lang['qb_sig'] = 'Vstavi podpis'; $lang['qb_smileys'] = 'Smeški'; $lang['qb_chars'] = 'Posebni znaki'; -$lang['upperns'] = 'skoči na starševski članek'; +$lang['upperns'] = 'skoči na nadrejeni imenski prostor'; $lang['admin_register'] = 'Dodaj novega uporabnika'; -$lang['metaedit'] = 'Popravi metapodatke'; -$lang['metasaveerr'] = 'Zapisovanje metapodatkov ni uspelo'; -$lang['metasaveok'] = 'Meta podatki shranjeni'; +$lang['metaedit'] = 'Uredi metapodatke'; +$lang['metasaveerr'] = 'Zapisovanje metapodatkov je spodletelo'; +$lang['metasaveok'] = 'Metapodatki so shranjeni'; $lang['img_backto'] = 'Nazaj na'; $lang['img_title'] = 'Naslov'; $lang['img_caption'] = 'Opis'; @@ -212,66 +211,66 @@ $lang['img_date'] = 'Datum'; $lang['img_fname'] = 'Ime datoteke'; $lang['img_fsize'] = 'Velikost'; $lang['img_artist'] = 'Fotograf'; -$lang['img_copyr'] = 'Avtorska zaščita'; -$lang['img_format'] = 'Velikost'; +$lang['img_copyr'] = 'Avtorska pravica'; +$lang['img_format'] = 'Zapis'; $lang['img_camera'] = 'Fotoaparat'; $lang['img_keywords'] = 'Ključne besede'; -$lang['subscr_subscribe_success'] = 'Dodan %s na seznam naročnin za %s'; -$lang['subscr_subscribe_error'] = 'Napaka pri dodajanju %s na seznam naročnin za %s'; -$lang['subscr_subscribe_noaddress'] = 'Z vašo prijavo ni povezan noben e-naslov, zato vas ne moremo dodati na seznam naročnikov'; -$lang['subscr_unsubscribe_success'] = 'Odstranjeno %s s seznama naročnin za %s'; -$lang['subscr_unsubscribe_error'] = 'Napaka pri odstranjevanju %s s seznama naročnin za %s'; +$lang['subscr_subscribe_success'] = 'Uporabniški račun %s je dodan na seznam naročnin na %s'; +$lang['subscr_subscribe_error'] = 'Napaka med dodajanjem %s na seznam naročnin na %s'; +$lang['subscr_subscribe_noaddress'] = 'S trenutnimi prijavnimi podatki ni povezanega elektronskega naslova, zato uporabniškega računa ni mogoče dodati na seznam naročnikov.'; +$lang['subscr_unsubscribe_success'] = 'Uporabniški račun %s je odstranjen s seznama naročnin na %s'; +$lang['subscr_unsubscribe_error'] = 'Napaka med odstranjevanjem %s s seznama naročnin na %s'; $lang['subscr_already_subscribed'] = '%s je že naročen na %s'; $lang['subscr_not_subscribed'] = '%s ni naročen na %s'; -$lang['subscr_m_not_subscribed'] = 'Niste naročeni na trenutno stran ali članek.'; -$lang['subscr_m_new_header'] = 'Naroči se na spremembe'; +$lang['subscr_m_not_subscribed'] = 'Trenutni uporabniški račun nima prijavljene naročnine na trenutno stran ali imenski prostor.'; +$lang['subscr_m_new_header'] = 'Naročanje'; $lang['subscr_m_current_header'] = 'Trenutne naročnine'; -$lang['subscr_m_unsubscribe'] = 'Odjavi se'; -$lang['subscr_m_subscribe'] = 'Naroči se'; +$lang['subscr_m_unsubscribe'] = 'Prekliči naročnino'; +$lang['subscr_m_subscribe'] = 'Prijavi naročnino'; $lang['subscr_m_receive'] = 'Prejmi'; -$lang['subscr_style_every'] = 'e-pošto ob vsaki spremembi'; -$lang['subscr_style_digest'] = 'strnjeno e-pošti sprememb za vsako stran (vsake %.2f dni)'; -$lang['subscr_style_list'] = 'seznam spremenjenih strani od zadnje pošte (vsake %.2f dni)'; -$lang['authmodfailed'] = 'Slaba nastavitev potrditve. Prosimo obvestite administratorja wikija.'; -$lang['authtempfail'] = 'Potrditev uporabnika je trenutno nedostopna. Če se ta napaka ponavlja, prosimo obvestite administratorja wikija.'; +$lang['subscr_style_every'] = 'elektronsko sporočilo ob vsaki spremembi'; +$lang['subscr_style_digest'] = 'strnjeno elektronsko sporočilo sprememb za vsako stran (vsakih %.2f dni)'; +$lang['subscr_style_list'] = 'seznam spremenjenih strani od zadnjega elektronskega sporočila (vsakih %.2f dni)'; +$lang['authmodfailed'] = 'Slaba nastavitev overitve uporabniškega računa. Stopite v stik s skrbnikom sistema wiki.'; +$lang['authtempfail'] = 'Potrditev uporabnika je trenutno nedostopna. Stopite v stik s skrbnikom sistema wiki.'; $lang['i_chooselang'] = 'Izberite jezik'; $lang['i_installer'] = 'DokuWiki namestitev'; -$lang['i_wikiname'] = 'Wiki ime'; +$lang['i_wikiname'] = 'Ime Wiki spletišča'; $lang['i_enableacl'] = 'Omogoči ACL (priporočeno)'; -$lang['i_superuser'] = 'Naduporabnik'; -$lang['i_problems'] = 'Installer je naletel na težave, ki so opisane spodaj. Ne morete nadaljevati, dokler jih ne odpravite.'; -$lang['i_modified'] = 'Iz varnostnih razlogov bo ta skrip deloval le v novi in nespremenjeneni namestitvi DokuWikija. Potrebno je ali ponovno razširiti datoteke iz naloženega paketa, ali preberete popolna Dokuwiki navodila za namestitev.'; -$lang['i_funcna'] = 'PHP funkcija %s ni na voljo. Morda jo je vaš ponudnik onemogočil?'; -$lang['i_phpver'] = 'Verzija vašega PHP-ja %s je nižja od potrebne %s. Potrebno je posodobiti PHP inštalacijo.'; -$lang['i_permfail'] = '%s ni zapisljiva. Potrebno je nastaviti CHMOD nastavitve dostopa do direktorija.'; -$lang['i_confexists'] = '%s že obstaja'; -$lang['i_writeerr'] = 'Ni mogoče ustvariti %s. Preveriti morate CHMOD nastavitve dostopa direktorija ali datoteke in ustvariti datoteko ročno.'; -$lang['i_badhash'] = 'nepoznana ali spremenjena dokuwiki.php (hash=%s)'; +$lang['i_superuser'] = 'Skrbnik'; +$lang['i_problems'] = 'Namestilnik je naletel na težave, ki so izpisane spodaj. Namestitve ni mogoče nadaljevati, dokler težave ne bodo odpravljene.'; +$lang['i_modified'] = 'Iz varnostnih razlogov skript deluje le v novi in neprilagojeni namestitvi sistema DokuWiki. Postopek namestitve je treba začeti znova ali pa sistem namestiti ročno s pomočjo navodil nameščanja Dokuwiki.'; +$lang['i_funcna'] = 'Funkcija PHP %s ni na voljo. Morda je možnost na strežniku zaradi varnostnih razlogov onemogočena.'; +$lang['i_phpver'] = 'Različica PHP %s je nižja od zahtevane različice %s. Pred nadaljevanjem je treba posodobiti namestitev PHP.'; +$lang['i_permfail'] = 'Predmet %s ni zapisljiv. Zahtevana je sprememba dovoljenj za to mapo.'; +$lang['i_confexists'] = 'Predmet %s že obstaja.'; +$lang['i_writeerr'] = 'Ni mogoče ustvariti predmeta %s. Preveriti je treba dovoljenja datotek in map in nato ustvariti datoteko ročno.'; +$lang['i_badhash'] = 'nepoznana ali spremenjena datoteka dokuwiki.php (razpršilo=%s)'; $lang['i_badval'] = '%s - neveljavna ali prazna vrednost'; -$lang['i_success'] = 'Konfiguracija se je zaključila uspešno. Datoteko install.php lahko sedaj izbrišete. Nadaljujte v vaš novi DokuWiki.'; -$lang['i_failure'] = 'Med zapisovanjem nastavitvenih datotek je prišlo do nekaj napak. Preden lahko uporabite vaš novi DokuWiki, jih boste morali ročno popraviti.'; -$lang['i_policy'] = 'Namesti ACL'; +$lang['i_success'] = 'Nastavitev je uspešno končana. Datoteko install.php lahko sedaj izbrišete. Nadaljujte v novi DokuWiki.'; +$lang['i_failure'] = 'Med zapisovanjem nastavitvenih datotek je prišlo do napak. Preden lahko uporabite vaš DokuWiki, jih je treba odpraviti.'; +$lang['i_policy'] = 'Začetna določila ACL'; $lang['i_pol0'] = 'Odprt Wiki (branje, zapis, nalaganje datotek je javno za vse)'; $lang['i_pol1'] = 'Javni Wiki (branje za vse, zapis in nalaganje datotek za prijavljene uporabnike)'; $lang['i_pol2'] = 'Zaprt Wiki (berejo in urejajo lahko le prijavljeni uporabniki)'; $lang['i_retry'] = 'Ponovni poskus'; -$lang['i_license'] = 'Prosimo, izberite licenco, pod katero bo objsavljena vsebina:'; -$lang['mu_intro'] = 'Tukaj lahko naložite več datotek hkrati. Kliknite gumb "Brskaj", da jih dodate v vrsto. Kliknite "Naloži", ko ste končali'; +$lang['i_license'] = 'Izbor dovoljenja objave vsebine:'; +$lang['mu_intro'] = 'Naložiti je mogoče več datotek hkrati. S klikom na gumb "Prebrskaj", jih je mogoče dodati v vrsto. S klikom na povezavo "naloži" bodo datoteke poslane na strežnik.'; $lang['mu_gridname'] = 'Ime datoteke'; $lang['mu_gridsize'] = 'Velikost'; -$lang['mu_gridstat'] = 'Status'; -$lang['mu_namespace'] = 'Ime'; -$lang['mu_browse'] = 'Brskaj'; +$lang['mu_gridstat'] = 'Stanje'; +$lang['mu_namespace'] = 'Imenski prostor'; +$lang['mu_browse'] = 'Prebrskaj'; $lang['mu_toobig'] = 'prevelika datoteka'; -$lang['mu_ready'] = 'pripravljena na nalaganje'; +$lang['mu_ready'] = 'pripravljena na pošiljanje'; $lang['mu_done'] = 'končano'; $lang['mu_fail'] = 'ni uspelo'; $lang['mu_authfail'] = 'seja je potekla'; -$lang['mu_progress'] = '@PCT@% naloženo'; -$lang['mu_filetypes'] = 'Dovoljeni tipi datotek'; -$lang['mu_info'] = 'datoteke naložene'; +$lang['mu_progress'] = '@PCT@% je poslano'; +$lang['mu_filetypes'] = 'Dovoljene vrste datotek'; +$lang['mu_info'] = 'poslanih datotek.'; $lang['mu_lasterr'] = 'Zadnja napaka:'; -$lang['recent_global'] = 'Trenutno gledate spremembe znotraj imenskega prostora %s. Lahko si ogledate tudi spremembe, narejene v celotnem wikiju.'; +$lang['recent_global'] = 'Trenutno so prikazane spremembe znotraj imenskega prostora %s. Mogoče si je ogledati tudi spremembe celotnega sistema Wiki.'; $lang['years'] = '%d let nazaj'; $lang['months'] = '%d mesecev nazaj'; $lang['weeks'] = '%d tednov nazaj'; @@ -279,4 +278,4 @@ $lang['days'] = '%d dni nazaj'; $lang['hours'] = '%d ur nazaj'; $lang['minutes'] = '%d minut nazaj'; $lang['seconds'] = '%d sekund nazaj'; -$lang['wordblock'] = 'Vaša sprememba ni bila shranjena, ker vsebuje neželeno besedilo (spam).'; +$lang['wordblock'] = 'Spremembe niso shranjene, ker je v vsebini navedeno neželeno besedilo (spam).'; diff --git a/inc/lang/sl/locked.txt b/inc/lang/sl/locked.txt index dbdcf48a1..d51e940b7 100644 --- a/inc/lang/sl/locked.txt +++ b/inc/lang/sl/locked.txt @@ -1,3 +1,3 @@ ====== Stran je zaklenjena ====== -To stran je nekdo zaklenjenil za urejanje. Počakati morate, da jo ta uporabnik neha urejati ali pa da poteče zaklep. +Stran je zaklenjenjena za urejanje. Počakati je treba, da zaklep strani poteče. diff --git a/inc/lang/sl/login.txt b/inc/lang/sl/login.txt index f385d0099..297cd53f5 100644 --- a/inc/lang/sl/login.txt +++ b/inc/lang/sl/login.txt @@ -1,4 +1,3 @@ ====== Prijava ====== -Niste prijavljeni! Spodaj vnesite svoje podatke in se prijavite. Da se lahko prijavite, morate imeti omogočene piškotke. - +Niste prijavljeni! Spodaj vnesite ustrezne podatke in se prijavite. Prijaviti se je mogoče, če so omogočeni piškotki. diff --git a/inc/lang/sl/mailtext.txt b/inc/lang/sl/mailtext.txt index a46c672d6..e08d01d9e 100644 --- a/inc/lang/sl/mailtext.txt +++ b/inc/lang/sl/mailtext.txt @@ -2,16 +2,14 @@ Stran na vašem DokuWiki je bila dodana ali spremenjena. Podrobnosti: Datum : @DATE@ Brskalnik : @BROWSER@ -IP-naslov : @IPADDRESS@ -Gostitelj : @HOSTNAME@ +Naslov IP : @IPADDRESS@ +Ime gostitelja : @HOSTNAME@ Stara različica : @OLDPAGE@ -Nova Različica : @NEWPAGE@ +Nova različica : @NEWPAGE@ Povzetek urejanja: @SUMMARY@ Uporabnik : @USER@ @DIFF@ - --- -To sporočilo je ustvaril DokuWiki na -@DOKUWIKIURL@ +-- +Sporočilo je samodejno ustvarjeno na spletišču @DOKUWIKIURL@ diff --git a/inc/lang/sl/newpage.txt b/inc/lang/sl/newpage.txt index c58ab17ff..2f11bbf55 100644 --- a/inc/lang/sl/newpage.txt +++ b/inc/lang/sl/newpage.txt @@ -1,3 +1,3 @@ -====== Ta stran še ne obstaja ====== +====== Stran še ne obstaja ====== -Sledili ste povezavi na stran, ki še ne obstaja. Ustvarite jo lahko, tako da pritisnete na ''Ustvari to stran''. +Sledili ste povezavi na stran, ki še ne obstaja. Stran je mogoče ustvariti preko povezave ''Ustvari stran''. diff --git a/inc/lang/sl/norev.txt b/inc/lang/sl/norev.txt index 28b9f8ac5..adaa22d11 100644 --- a/inc/lang/sl/norev.txt +++ b/inc/lang/sl/norev.txt @@ -1,4 +1,3 @@ -====== Ta različica ne obstaja ====== - -Podana različica ne obstaja. Uporabite gumb ''Stare različice'' za seznam starih različic tega dokumenta. +====== Neobstoječa različica strani ====== +Zahtevana različica strani ne obstaja. Uporabite gumb ''Stare različice'' za izpis seznama starih različic tega dokumenta. diff --git a/inc/lang/sl/password.txt b/inc/lang/sl/password.txt index 794fd97b1..61929dccd 100644 --- a/inc/lang/sl/password.txt +++ b/inc/lang/sl/password.txt @@ -1,10 +1,9 @@ -Pozdravljeni @FULLNAME@! +Pozdravljeni, @FULLNAME@! -Tukaj so vaši podatki za @TITLE@ na @DOKUWIKIURL@ +Spodaj so navedeni podatki za @TITLE@ na wiki spletišču @DOKUWIKIURL@ -Uporabniško ime : @LOGIN@ -Geslo : @PASSWORD@ +Uporabniško ime: @LOGIN@ +Geslo : @PASSWORD@ --- -To sporočilo je ustvaril DokuWiki na -@DOKUWIKIURL@ +-- +Sporočilo je samodejno ustvarjeno na spletišču @DOKUWIKIURL@ diff --git a/inc/lang/sl/preview.txt b/inc/lang/sl/preview.txt index 4ebf183ec..c49de6617 100644 --- a/inc/lang/sl/preview.txt +++ b/inc/lang/sl/preview.txt @@ -1,4 +1,3 @@ ====== Predogled ====== -To je predogled strani. Lahko si ogledate kako bo izgledal dokument. Ne pozabite pa, da še ni shranjen! - +Prikazan je predogled strani. Stran še ni shranjena! diff --git a/inc/lang/sl/pwconfirm.txt b/inc/lang/sl/pwconfirm.txt index 96c3a64d5..a621821e5 100644 --- a/inc/lang/sl/pwconfirm.txt +++ b/inc/lang/sl/pwconfirm.txt @@ -1,13 +1,11 @@ -Pozdravljen @FULLNAME@! +Pozdravljeni, @FULLNAME@! -Nekdo je v vašem imenu zahteval novo geslo za uporabniško ime @TITLE@ na @DOKUWIKIURL@. +S podatki vašega imena je bila poslana zahteva za pridobitev novega gesla za uporabniško ime @TITLE@ na wiki spletišču @DOKUWIKIURL@. -Če novega gesla niste zahtevali, prezrite to sporočilo. - -Za potrditev novega gesla, kliknite spodnjo povezavo. + - V kolikor novega gesla niste zahtevali, prezrite to sporočilo. + - Za potrditev zahteve za pridobitev novega gesla, kliknite spodnjo povezavo. @CONFIRM@ --- -To sporočilo je ustvaril DokuWiki na -@DOKUWIKIURL@ +-- +Sporočilo je samodejno ustvarjeno na spletišču @DOKUWIKIURL@ diff --git a/inc/lang/sl/read.txt b/inc/lang/sl/read.txt index 1423a4f16..5ba9a2eb0 100644 --- a/inc/lang/sl/read.txt +++ b/inc/lang/sl/read.txt @@ -1,2 +1,2 @@ -Ta stran je samo za branje. Lahko si ogledate njeno izvorno kodo, spreminjati pa je ne morete. Vprašajte administratorja, če se vam to zdi narobe. +Stran je odprta z dovoljenji le za branje. Dovoljeno je ogledati si izvorno kodo strani, vsebine pa ni mogoče spreminjati. Za več podrobnosti stopite v stik s skrbnikom sistema. diff --git a/inc/lang/sl/recent.txt b/inc/lang/sl/recent.txt index 534063384..282a492be 100644 --- a/inc/lang/sl/recent.txt +++ b/inc/lang/sl/recent.txt @@ -1,5 +1,3 @@ -====== Trenutne spremembe ====== - -Sledeče strani so bile nedavno spremenjene. - +====== Nedavne spremembe ====== +Izpisane wiki strani so bile nedavno spremenjene. diff --git a/inc/lang/sl/register.txt b/inc/lang/sl/register.txt index d1f7ab49e..f1b22f933 100644 --- a/inc/lang/sl/register.txt +++ b/inc/lang/sl/register.txt @@ -1,4 +1,3 @@ -====== Odpri nov račun ====== - -Vnesite vse potrebne podatke in si ustvarite račun za ta wiki. Preverite da ste vnesli **veljaven e-mail naslov** - tja bo poslano geslo. Uporabniško ime mora biti veljavno [[doku>pagename|ime strani]]. +====== Vpis novega računa ====== +V spodnji obrazec je treba vnesti vse zahtevane podatke za ustvarjanje novega računa. Vnesti je treba veljaven **elektronski naslov**, na katerega bo poslano geslo. Uporabniško ime mora biti veljavno [[doku>pagename|ime strani]]. diff --git a/inc/lang/sl/registermail.txt b/inc/lang/sl/registermail.txt index d9622325e..801b7d0db 100644 --- a/inc/lang/sl/registermail.txt +++ b/inc/lang/sl/registermail.txt @@ -1,14 +1,14 @@ -Nov uporabnik registriran. Podatki: +Nov uporabniški račun je uspešno vpisan. +Podatki računa: -Uporabniško ime: @NEWUSER@ -Polno ime: @NEWNAME@ -E-mail: @NEWEMAIL@ +Uporabniško ime : @NEWUSER@ +Polno ime : @NEWNAME@ +Elektronski naslov: @NEWEMAIL@ -Datum: @DATE@ -Brskalnik: @BROWSER@ -IP naslov: @IPADDRESS@ -Hostname: @HOSTNAME@ +Datum : @DATE@ +Brskalnik : @BROWSER@ +Naslov IP : @IPADDRESS@ +Ime gostitelja : @HOSTNAME@ -- -To sporočilo je ustvaril DokuWiki na -@DOKUWIKIURL@ +Sporočilo je samodejno ustvarjeno na spletišču @DOKUWIKIURL@ diff --git a/inc/lang/sl/resendpwd.txt b/inc/lang/sl/resendpwd.txt index 9f46a7a59..8a1e614f7 100644 --- a/inc/lang/sl/resendpwd.txt +++ b/inc/lang/sl/resendpwd.txt @@ -1,3 +1,3 @@ -====== Pošlji novo geslo ====== +====== Pošiljanje novega gesla ====== -Za pridobitev novega gesla, vnesite vaše uporabniško ime v obrazec spodaj. Na vaš email naslov bo poslano sporočilo s povezavo za potrditev avtentičnosti. \ No newline at end of file +Za pridobitev novega gesla, vnesite vaše uporabniško ime ustrezno polje spodnjega obrazca. Na naveden elektronski naslov bo poslano sporočilo v katerem bo navedena povezava do strani za overjanje istovetnosti uporabnika. diff --git a/inc/lang/sl/revisions.txt b/inc/lang/sl/revisions.txt index 19bf39a87..86ede9ded 100644 --- a/inc/lang/sl/revisions.txt +++ b/inc/lang/sl/revisions.txt @@ -1,4 +1,3 @@ ====== Stare različice ====== -To so stare različice tega dokumenta. Da ga povrnete na starejšo različico, to prvo izberite, pritisnite na ''Uredi to stran'' in jo še shranite. - +Prikazana je stara različica tega dokumenta. Stran je mogoče povrniti na starejšo različico tako, da stran izberete, pritisnete na povezavo ''Uredi stran'' in stran nato shranite. diff --git a/inc/lang/sl/searchpage.txt b/inc/lang/sl/searchpage.txt index b41c6dd44..736a36182 100644 --- a/inc/lang/sl/searchpage.txt +++ b/inc/lang/sl/searchpage.txt @@ -1,5 +1,5 @@ -====== Išči ====== +====== Iskanje ====== -Spodaj so prikazani rezultati vašega iskanja. Če niste našli kar ste iskali, lahko ustvarite novo stran z imenom vaše poizvedbe, tako da uporabite gumb ''Uredi to stran''. +Spodaj so izpisani rezultati iskanja. V kolikor rezultati niso skladni z zahtevami iskanja, je mogoče ustvariti novo stran z nazivom vaše poizvedbe preko povezave ''Uredi stran''. ===== Rezultati ===== \ No newline at end of file diff --git a/inc/lang/sl/showrev.txt b/inc/lang/sl/showrev.txt index 00111ffc5..838339217 100644 --- a/inc/lang/sl/showrev.txt +++ b/inc/lang/sl/showrev.txt @@ -1,2 +1,2 @@ -**To je stara različica tega dokumenta!** +**Stara različica tega dokumenta!** ---- diff --git a/inc/lang/sl/subscr_digest.txt b/inc/lang/sl/subscr_digest.txt index 983cab233..aeb548beb 100644 --- a/inc/lang/sl/subscr_digest.txt +++ b/inc/lang/sl/subscr_digest.txt @@ -1,20 +1,19 @@ Pozdravljeni! -Stran @PAGE@ v wikiju @TITLE@ je bila spremenjena. -Tu so spremembe: +Strani v imenskem prostoru @PAGE@ wiki spletišča @TITLE@ so spremenjene. +Podrobnosti sprememb so navedene spodaj. ------------------------------------------------ @DIFF@ ------------------------------------------------ -Stara revizija: @OLDPAGE@ -Nova revizija: @NEWPAGE@ +Stara različica: @OLDPAGE@ +Nova različica : @NEWPAGE@ -Za odjavo pošiljanja sprememb se prijavite v wiki na naslovu -@DOKUWIKIURL@, nato obiščite +Za odjavo prejemanja podrobnosti sprememb, se je treba prijaviti na spletišče +@DOKUWIKIURL@ in med možnostmi naročanja @SUBSCRIBE@ -in se odjavite od sprememb strani in/ali imenskega prostora. +odjaviti prejemanje poročil sprememb strani ali imenskega prostora. -- -To sporočilo je generiral DokuWiki na naslovu -@DUKOWIKIURL@ \ No newline at end of file +Sporočilo je samodejno ustvarjeno na spletišču @DOKUWIKIURL@ diff --git a/inc/lang/sl/subscr_list.txt b/inc/lang/sl/subscr_list.txt index f4cfbc268..253cb4104 100644 --- a/inc/lang/sl/subscr_list.txt +++ b/inc/lang/sl/subscr_list.txt @@ -1,17 +1,16 @@ Pozdravljeni! -Strani v imenskem prostoru @PAGE@ wikija @TITLE@ so se spremenile. -Tu so spremenjene strani: +Strani v imenskem prostoru @PAGE@ wiki spletišča @TITLE@ so spremenjene. +Podrobnosti sprememb so navedene spodaj. ------------------------------------------------ @DIFF@ ------------------------------------------------ -Za odjavo pošiljanja sprememb se prijavite v wiki na naslovu -@DOKUWIKIURL@, nato obiščite +Za odjavo prejemanja podrobnosti sprememb, se je treba prijaviti na spletišče +@DOKUWIKIURL@ in med možnostmi naročanja @SUBSCRIBE@ -in se odjavite od sprememb strani in/ali imenskega prostora. +odjaviti prejemanje poročil sprememb strani ali imenskega prostora. -- -To sporočilo je generiral DokuWiki na naslovu -@DUKOWIKIURL@ \ No newline at end of file +Sporočilo je samodejno ustvarjeno na spletišču @DOKUWIKIURL@ diff --git a/inc/lang/sl/updateprofile.txt b/inc/lang/sl/updateprofile.txt index 45aa7d92f..5e939f2f2 100644 --- a/inc/lang/sl/updateprofile.txt +++ b/inc/lang/sl/updateprofile.txt @@ -1,3 +1,3 @@ -===== Posodobite svoj profil računa ===== +===== Posodabljanje računa ===== -Posodobite le tista polja, ki jih želite spremeniti. Svojega uporabiškega imena ne morete spreminjati. \ No newline at end of file +Posodobiti ali spremeniti je mogoče le nekatere podatke. Uporabniškega imena ni mogoče spremeniti. \ No newline at end of file diff --git a/inc/lang/sl/uploadmail.txt b/inc/lang/sl/uploadmail.txt index 6006bd379..0479be75f 100644 --- a/inc/lang/sl/uploadmail.txt +++ b/inc/lang/sl/uploadmail.txt @@ -1,13 +1,14 @@ -Datoteka je bila naložena v vaš DokuWiki. Tu so podatki: +Datoteka je bila uspešno naložena na DokuWiki spletišče. +Podrobnosti o datoteki: -Datoteka: @MEDIA@ -Datum: @DATE@ -Brskalnik: @BROWSER@ -IP naslov: @IPADDRESS@ -Ponudnik: @HOSTNAME@ -Velikost: @SIZE@ -MIME tip: @MIME@ -Uporabnik: @USER@ +Datoteka : @MEDIA@ +Datum : @DATE@ +Brskalnik : @BROWSER@ +Naslov IP : @IPADDRESS@ +Ponudnik : @HOSTNAME@ +Velikost : @SIZE@ +Vrsta MIME: @MIME@ +Uporabnik : @USER@ -- -Sporočilo je generiral DokuWiki na naslovu @DOKUWIKIURL@ \ No newline at end of file +Sporočilo je samodejno ustvarjeno na spletišču @DOKUWIKIURL@ \ No newline at end of file diff --git a/lib/plugins/acl/lang/sl/lang.php b/lib/plugins/acl/lang/sl/lang.php index f6dec25ef..45fdc98f4 100644 --- a/lib/plugins/acl/lang/sl/lang.php +++ b/lib/plugins/acl/lang/sl/lang.php @@ -5,23 +5,24 @@ * @author Dejan Levec * @author Boštjan Seničar * @author Gregor Skumavc (grega.skumavc@gmail.com) + * @author Matej Urbančič (mateju@svn.gnome.org) */ -$lang['admin_acl'] = 'ACL administracija'; +$lang['admin_acl'] = 'Skrbništvo ACL'; $lang['acl_group'] = 'Skupina'; $lang['acl_user'] = 'Uporabnik'; $lang['acl_perms'] = 'Dovoljenja za'; $lang['page'] = 'Stran'; $lang['namespace'] = 'Imenski prostor'; $lang['btn_select'] = 'Izberi'; -$lang['p_user_id'] = 'Uporabnik %s ima trenutno naslednje pravice na strani %s: %s.'; -$lang['p_user_ns'] = 'Uporabnik %s ima trenutno naslednje pravice v imenskem prostoru %s: %s.'; -$lang['p_group_id'] = 'Uporabnikka skupina %s ima trenutno naslednje pravice na strani %s: %s.'; -$lang['p_group_ns'] = 'Uporabniška skupina %s ima trenutno naslednje pravice v imenskem prostoru %s: %s.'; -$lang['p_choose_id'] = 'Prosimo vnesite uporabnika ali skupino v zgornji obrazec za ogled ali urejanje pravic za stran %s.'; -$lang['p_choose_ns'] = 'Prosimo vnesite uporabnika ali skupino v zgornji obrazec za ogled ali urejanje pravic za imenski prostor %s.'; -$lang['p_inherited'] = 'Opomba: Te pravice niso bile posebej nastavljene, temveč prevzete iz drugih skupin ali višjih imenskih prostorov.'; -$lang['p_isadmin'] = 'Opomba: Izbrana skupina ali uporabnik imajo vedno vse pravice, ker so določeni kot superuporabniki.'; -$lang['p_include'] = 'Višje pravice vključujejo tudi nižje. '; +$lang['p_user_id'] = 'Uporabnik %s ima naslednja dovoljenja za stran %s: %s.'; +$lang['p_user_ns'] = 'Uporabnik %s ima naslednja dovoljenja za imenski prostor %s: %s.'; +$lang['p_group_id'] = 'Uporabniška skupina %s ima naslednja dovoljenja za stran %s: %s.'; +$lang['p_group_ns'] = 'Uporabniška skupina %s ima naslednja dovoljenja za imenski prostor %s: %s.'; +$lang['p_choose_id'] = 'Vnesite ime uporabnika ali skupine v zgornji obrazec za ogled ali urejanje dovoljenj za stran %s.'; +$lang['p_choose_ns'] = 'Vnesite ime uporabnika ali skupine v zgornji obrazec za ogled ali urejanje dovoljenj za imenski prostor %s.'; +$lang['p_inherited'] = 'Opomba: trenutna dovoljenja niso bila posebej določena, temveč so bila prevzeta iz drugih skupin ali višjih imenskih prostorov.'; +$lang['p_isadmin'] = 'Opomba: izbrana skupina ali uporabnik imajo vsa dovoljenja za spreminjanje, saj so določeni kot skrbniki sistema.'; +$lang['p_include'] = 'Višja dovoljenja vključujejo tudi nižja. '; $lang['current'] = 'Trenutna ACL pravila'; $lang['where'] = 'Stran / Imenski prostor'; $lang['who'] = 'Uporabnik/Skupina'; diff --git a/lib/plugins/config/lang/sl/lang.php b/lib/plugins/config/lang/sl/lang.php index 5b5b3d3d8..e8fd34533 100644 --- a/lib/plugins/config/lang/sl/lang.php +++ b/lib/plugins/config/lang/sl/lang.php @@ -5,6 +5,7 @@ * @author Dejan Levec * @author Boštjan Seničar * @author Gregor Skumavc (grega.skumavc@gmail.com) + * @author Matej Urbančič (mateju@svn.gnome.org) */ $lang['lang'] = 'Jezik'; $lang['template'] = 'Predloga'; @@ -12,7 +13,7 @@ $lang['recent'] = 'Zadnje spremembe'; $lang['signature'] = 'Podpis'; $lang['defaultgroup'] = 'Privzeta skupina'; $lang['disableactions_check'] = 'Preveri'; -$lang['userewrite'] = 'Uporabi lepše URL naslove'; +$lang['userewrite'] = 'Uporabi olepšane naslove URL'; $lang['userewrite_o_1'] = '.htaccess'; $lang['rss_type_o_rss'] = 'RSS 0.91'; $lang['rss_type_o_rss1'] = 'RSS 1.0'; diff --git a/lib/plugins/plugin/lang/sl/lang.php b/lib/plugins/plugin/lang/sl/lang.php index 41d857979..2605a1948 100644 --- a/lib/plugins/plugin/lang/sl/lang.php +++ b/lib/plugins/plugin/lang/sl/lang.php @@ -5,6 +5,7 @@ * @author Dejan Levec * @author Boštjan Seničar * @author Gregor Skumavc (grega.skumavc@gmail.com) + * @author Matej Urbančič (mateju@svn.gnome.org) */ $lang['btn_delete'] = 'Izbriši'; $lang['btn_settings'] = 'Nastavitve'; @@ -17,7 +18,7 @@ $lang['updating'] = 'Posodabljanje ...'; $lang['deleting'] = 'Brisanje ...'; $lang['name'] = 'Ime:'; $lang['date'] = 'Datum:'; -$lang['type'] = 'Tip:'; +$lang['type'] = 'Vrsta:'; $lang['desc'] = 'Opis:'; $lang['author'] = 'Avtor:'; $lang['www'] = 'Spletna stran:'; diff --git a/lib/plugins/popularity/lang/sl/lang.php b/lib/plugins/popularity/lang/sl/lang.php index dc81ec060..2191d7597 100644 --- a/lib/plugins/popularity/lang/sl/lang.php +++ b/lib/plugins/popularity/lang/sl/lang.php @@ -5,5 +5,6 @@ * @author Dejan Levec * @author Boštjan Seničar * @author Gregor Skumavc (grega.skumavc@gmail.com) + * @author Matej Urbančič (mateju@svn.gnome.org) */ $lang['submit'] = 'Pošlji'; diff --git a/lib/plugins/revert/lang/sl/lang.php b/lib/plugins/revert/lang/sl/lang.php index 57ae9d092..9d249edbd 100644 --- a/lib/plugins/revert/lang/sl/lang.php +++ b/lib/plugins/revert/lang/sl/lang.php @@ -5,4 +5,5 @@ * @author Dejan Levec * @author Boštjan Seničar * @author Gregor Skumavc (grega.skumavc@gmail.com) + * @author Matej Urbančič (mateju@svn.gnome.org) */ diff --git a/lib/plugins/usermanager/lang/sl/add.txt b/lib/plugins/usermanager/lang/sl/add.txt index 985fa607e..c1d8913b4 100644 --- a/lib/plugins/usermanager/lang/sl/add.txt +++ b/lib/plugins/usermanager/lang/sl/add.txt @@ -1 +1 @@ -===== Dodaj uporabnika ===== \ No newline at end of file +===== Dodajanje uporabnika ===== \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/sl/delete.txt b/lib/plugins/usermanager/lang/sl/delete.txt index 515b343e5..7d9de54e6 100644 --- a/lib/plugins/usermanager/lang/sl/delete.txt +++ b/lib/plugins/usermanager/lang/sl/delete.txt @@ -1 +1 @@ -===== Izbriši uporabnika ===== \ No newline at end of file +===== Izbrisanje uporabnika ===== \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/sl/edit.txt b/lib/plugins/usermanager/lang/sl/edit.txt index 23aeb0c3b..4ad01441f 100644 --- a/lib/plugins/usermanager/lang/sl/edit.txt +++ b/lib/plugins/usermanager/lang/sl/edit.txt @@ -1 +1 @@ -===== Uredi uporabnika ===== \ No newline at end of file +===== Urejanje uporabnika ===== \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/sl/lang.php b/lib/plugins/usermanager/lang/sl/lang.php index b671d65dc..ac073b1c9 100644 --- a/lib/plugins/usermanager/lang/sl/lang.php +++ b/lib/plugins/usermanager/lang/sl/lang.php @@ -5,15 +5,16 @@ * @author Dejan Levec * @author Boštjan Seničar * @author Gregor Skumavc (grega.skumavc@gmail.com) + * @author Matej Urbančič (mateju@svn.gnome.org) */ $lang['menu'] = 'Urejanje uporabnikov'; -$lang['noauth'] = '(preverjanje uporabnikov ni na voljo)'; +$lang['noauth'] = '(overjanje istovetnosti uporabnikov ni na voljo)'; $lang['nosupport'] = '(urejanje uporabnikov ni podprto)'; -$lang['badauth'] = 'neeljaven mehanizem za preverjanje'; +$lang['badauth'] = 'neveljaven način overjanja'; $lang['user_id'] = 'Uporabnik'; $lang['user_pass'] = 'Geslo'; $lang['user_name'] = 'Pravo ime'; -$lang['user_mail'] = 'Email'; +$lang['user_mail'] = 'Elektronski naslov'; $lang['user_groups'] = 'Skupine'; $lang['field'] = 'Polje'; $lang['value'] = 'Vrednost'; @@ -24,15 +25,15 @@ $lang['edit'] = 'Uredi'; $lang['edit_prompt'] = 'Uredi tega uporabnika'; $lang['modify'] = 'Shrani spremembe'; $lang['search'] = 'Iskanje'; -$lang['search_prompt'] = 'Išči'; +$lang['search_prompt'] = 'Poišči'; $lang['clear'] = 'Ponastavi filter iskanja'; $lang['filter'] = 'Filter'; -$lang['summary'] = 'Prikazujem uporabnike %1$d-%2$d od najdenih %3$d. Vseh je %4$d.'; +$lang['summary'] = 'Izpisani so uporabniki %1$d-%2$d od skupno %3$d. Vseh uporabnikov je %4$d.'; $lang['nonefound'] = 'Ni najdenih uporabnikov. Vseh uporabnikov je %d.'; -$lang['delete_ok'] = '%d uporabnikov izbrisanih'; -$lang['delete_fail'] = '%d ni bilo možno izbrisati'; -$lang['update_ok'] = 'Uporabnik uspešno posodobljen'; -$lang['update_fail'] = 'Posodobitev uporabnika ni uspela'; -$lang['prev'] = 'Prejšnji'; +$lang['delete_ok'] = '%d uporabnikov je izbrisanih'; +$lang['delete_fail'] = '%d ni bilo mogoče izbrisati'; +$lang['update_ok'] = 'Uporabniški račun je uspešno posodobljen'; +$lang['update_fail'] = 'Posodobitev uporabniškega računa je spodletela'; +$lang['prev'] = 'Predhodni'; $lang['next'] = 'Naslednji'; $lang['last'] = 'Zadnji'; -- cgit v1.2.3 From 3a0a2d05635920b64626448302afb12c22bb6cf6 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 22 Jan 2011 21:52:30 +0100 Subject: refactored passowrd hashing functions to a class this splits the long auth_cryptPassword() function into many member functions of a new class PassHash which should make it more maintainable and reusable for other projects. This also adds two new methods djangomd5 and djangosha1 as used by the popular python framework Django. Maybe the auth_cryptPassword() and auth_verifyPassword() functions should be deprecated in favor of using the class directly? --- _test/cases/inc/auth_password.test.php | 2 + inc/PassHash.class.php | 375 +++++++++++++++++++++++++++++++++ inc/auth.php | 181 +--------------- inc/load.php | 1 + 4 files changed, 388 insertions(+), 171 deletions(-) create mode 100644 inc/PassHash.class.php diff --git a/_test/cases/inc/auth_password.test.php b/_test/cases/inc/auth_password.test.php index 140c7c23e..d19b2a0e7 100644 --- a/_test/cases/inc/auth_password.test.php +++ b/_test/cases/inc/auth_password.test.php @@ -18,6 +18,8 @@ class auth_password_test extends UnitTestCase { 'kmd5' => 'a579299436d7969791189acadd86fcb716', 'pmd5' => '$P$abcdefgh1RC6Fd32heUzl7EYCG9uGw.', 'hmd5' => '$H$abcdefgh1ZbJodHxmeXVAhEzTG7IAp.', + 'djangomd5' => '$md5$abcde$d0fdddeda8cd92725d2b54148ac09158', + 'djangosha1' => '$sha1$abcde$c8e65a7f0acc9158843048a53dcc5a6bc4d17678', ); diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php new file mode 100644 index 000000000..dce1a5ace --- /dev/null +++ b/inc/PassHash.class.php @@ -0,0 +1,375 @@ + + * @license LGPL2 + */ +class PassHash { + /** + * Verifies a cleartext password against a crypted hash + * + * The method and salt used for the crypted hash is determined automatically, + * then the clear text password is crypted using the same method. If both hashs + * match true is is returned else false + * + * @author Andreas Gohr + * @return bool + */ + function verify_hash($clear,$hash){ + $method=''; + $salt=''; + $magic=''; + + //determine the used method and salt + $len = strlen($hash); + if(preg_match('/^\$1\$([^\$]{0,8})\$/',$hash,$m)){ + $method = 'smd5'; + $salt = $m[1]; + $magic = '1'; + }elseif(preg_match('/^\$apr1\$([^\$]{0,8})\$/',$hash,$m)){ + $method = 'apr1'; + $salt = $m[1]; + $magic = 'apr1'; + }elseif(preg_match('/^\$P\$(.{31})$/',$hash,$m)){ + $method = 'pmd5'; + $salt = $m[1]; + $magic = 'P'; + }elseif(preg_match('/^\$H\$(.{31})$/',$hash,$m)){ + $method = 'pmd5'; + $salt = $m[1]; + $magic = 'H'; + }elseif(preg_match('/^\$sha1\$(.{5})\$/',$hash,$m)){ + $method = 'djangosha1'; + $salt = $m[1]; + }elseif(preg_match('/^\$md5\$(.{5})\$/',$hash,$m)){ + $method = 'djangomd5'; + $salt = $m[1]; + }elseif(substr($hash,0,6) == '{SSHA}'){ + $method = 'ssha'; + $salt = substr(base64_decode(substr($hash, 6)),20); + }elseif($len == 32){ + $method = 'md5'; + }elseif($len == 40){ + $method = 'sha1'; + }elseif($len == 16){ + $method = 'mysql'; + }elseif($len == 41 && $hash[0] == '*'){ + $method = 'my411'; + }elseif($len == 34){ + $method = 'kmd5'; + $salt = $hash; + }else{ + $method = 'crypt'; + $salt = substr($hash,0,2); + } + + //crypt and compare + $call = 'hash_'.$method; + if($this->$call($clear,$salt,$magic) === $hash){ + return true; + } + return false; + } + + /** + * Create a random salt + * + * @todo use full range of characters instead of hex values only + * @param int $len - The length of the salt + */ + public function gen_salt($len=32){ + return substr(md5(uniqid(rand(), true)),0,$len); + } + + /** + * Initialize the passed variable with a salt if needed. + * + * If $salt is not null, the value is kept, but the lenght restriction is + * applied. + * + * @param stringref $salt - The salt, pass null if you want one generated + * @param int $len - The length of the salt + */ + public function init_salt(&$salt,$len=32){ + if(is_null($salt)) $salt = $this->gen_salt($len); + if(strlen($salt) > $len) $salt = substr($salt,0,$len); + } + + // Password hashing methods follow below + + /** + * Password hashing method 'smd5' + * + * Uses salted MD5 hashs. Salt is 8 bytes long. + * + * The same mechanism is used by Apache's 'apr1' method. This will + * fallback to a implementation in pure PHP if MD5 support is not + * available in crypt() + * + * @author Andreas Gohr + * @author + * @link http://de.php.net/manual/en/function.crypt.php#73619 + * @param string $clear - the clear text to hash + * @param string $salt - the salt to use, null for random + * @param string $magic - the hash identifier (apr1 or 1) + * @returns string - hashed password + */ + public function hash_smd5($clear, $salt=null){ + $this->init_salt($salt,8); + + if(defined('CRYPT_MD5') && CRYPT_MD5){ + return crypt($clear,'$1$'.$salt.'$'); + }else{ + // Fall back to PHP-only implementation + return $this->apr1($clear, $salt, '1'); + } + } + + /** + * Password hashing method 'apr1' + * + * Uses salted MD5 hashs. Salt is 8 bytes long. + * + * This is basically the same as smd1 above, but as used by Apache. + * + * @author + * @link http://de.php.net/manual/en/function.crypt.php#73619 + * @param string $clear - the clear text to hash + * @param string $salt - the salt to use, null for random + * @param string $magic - the hash identifier (apr1 or 1) + * @returns string - hashed password + */ + public function hash_apr1($clear, $salt=null, $magic='apr1'){ + $this->init_salt($salt,8); + + $len = strlen($clear); + $text = $clear.'$'.$magic.'$'.$salt; + $bin = pack("H32", md5($clear.$salt.$clear)); + for($i = $len; $i > 0; $i -= 16) { + $text .= substr($bin, 0, min(16, $i)); + } + for($i = $len; $i > 0; $i >>= 1) { + $text .= ($i & 1) ? chr(0) : $clear{0}; + } + $bin = pack("H32", md5($text)); + for($i = 0; $i < 1000; $i++) { + $new = ($i & 1) ? $clear : $bin; + if ($i % 3) $new .= $salt; + if ($i % 7) $new .= $clear; + $new .= ($i & 1) ? $bin : $clear; + $bin = pack("H32", md5($new)); + } + $tmp = ''; + for ($i = 0; $i < 5; $i++) { + $k = $i + 6; + $j = $i + 12; + if ($j == 16) $j = 5; + $tmp = $bin[$i].$bin[$k].$bin[$j].$tmp; + } + $tmp = chr(0).chr(0).$bin[11].$tmp; + $tmp = strtr(strrev(substr(base64_encode($tmp), 2)), + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); + return '$'.$magic.'$'.$salt.'$'.$tmp; + } + + /** + * Password hashing method 'md5' + * + * Uses MD5 hashs. + * + * @param string $clear - the clear text to hash + * @returns string - hashed password + */ + public function hash_md5($clear){ + return md5($clear); + } + + /** + * Password hashing method 'sha1' + * + * Uses SHA1 hashs. + * + * @param string $clear - the clear text to hash + * @returns string - hashed password + */ + public function hash_sha1($clear){ + return sha1($clear); + } + + /** + * Password hashing method 'ssha' as used by LDAP + * + * Uses salted SHA1 hashs. Salt is 4 bytes long. + * + * @param string $clear - the clear text to hash + * @param string $salt - the salt to use, null for random + * @returns string - hashed password + */ + public function hash_ssha($clear, $salt=null){ + $this->init_salt($salt,4); + return '{SSHA}'.base64_encode(pack("H*", sha1($clear.$salt)).$salt); + } + + /** + * Password hashing method 'crypt' + * + * Uses salted crypt hashs. Salt is 2 bytes long. + * + * @param string $clear - the clear text to hash + * @param string $salt - the salt to use, null for random + * @returns string - hashed password + */ + public function hash_crypt($clear, $salt=null){ + $this->init_salt($salt,2); + return crypt($clear,$salt); + } + + /** + * Password hashing method 'mysql' + * + * This method was used by old MySQL systems + * + * @link http://www.php.net/mysql + * @author + * @param string $clear - the clear text to hash + * @returns string - hashed password + */ + public function hash_mysql($clear){ + $nr=0x50305735; + $nr2=0x12345671; + $add=7; + $charArr = preg_split("//", $clear); + foreach ($charArr as $char) { + if (($char == '') || ($char == ' ') || ($char == '\t')) continue; + $charVal = ord($char); + $nr ^= ((($nr & 63) + $add) * $charVal) + ($nr << 8); + $nr2 += ($nr2 << 8) ^ $nr; + $add += $charVal; + } + return sprintf("%08x%08x", ($nr & 0x7fffffff), ($nr2 & 0x7fffffff)); + } + + /** + * Password hashing method 'my411' + * + * Uses SHA1 hashs. This method is used by MySQL 4.11 and above + * + * @param string $clear - the clear text to hash + * @returns string - hashed password + */ + public function hash_my411($clear){ + return '*'.sha1(pack("H*", sha1($clear))); + } + + /** + * Password hashing method 'kmd5' + * + * Uses salted MD5 hashs. + * + * Salt is 2 bytes long, but stored at position 16, so you need to pass at + * least 18 bytes. You can pass the crypted hash as salt. + * + * @param string $clear - the clear text to hash + * @param string $salt - the salt to use, null for random + * @returns string - hashed password + */ + public function hash_kmd5($clear, $salt=null){ + $this->init_salt($salt); + + $key = substr($salt, 16, 2); + $hash1 = strtolower(md5($key . md5($clear))); + $hash2 = substr($hash1, 0, 16) . $key . substr($hash1, 16); + return $hash2; + } + + /** + * Password hashing method 'pmd5' + * + * Uses salted MD5 hashs. Salt is 1+8 bytes long, 1st byte is the + * iteration count. + * + * @param string $clear - the clear text to hash + * @param string $salt - the salt to use, null for random + * @param string $magic - the hash identifier (P or H) + * @returns string - hashed password + */ + public function hash_pmd5($clear, $salt=null, $magic='P'){ + $this->init_salt($salt); + + $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; + $iterc = $salt[0]; // pos 0 of salt is iteration count + $iter = strpos($itoa64,$iterc); + $iter = 1 << $iter; + $salt = substr($salt,1,8); + + // iterate + $hash = md5($salt . $clear, true); + do { + $hash = md5($hash . $clear, true); + } while (--$iter); + + // encode + $output = ''; + $count = 16; + $i = 0; + do { + $value = ord($hash[$i++]); + $output .= $itoa64[$value & 0x3f]; + if ($i < $count) + $value |= ord($hash[$i]) << 8; + $output .= $itoa64[($value >> 6) & 0x3f]; + if ($i++ >= $count) + break; + if ($i < $count) + $value |= ord($hash[$i]) << 16; + $output .= $itoa64[($value >> 12) & 0x3f]; + if ($i++ >= $count) + break; + $output .= $itoa64[($value >> 18) & 0x3f]; + } while ($i < $count); + + return '$'.$magic.'$'.$iterc.$salt.$output; + } + + /** + * Alias for hash_pmd5 + */ + public function hash_hmd5($clear, $salt=null, $magic='H'){ + return $this->hash_pmd5($clear, $salt, $magic); + } + + /** + * Password hashing method 'djangosha1' + * + * Uses salted SHA1 hashs. Salt is 5 bytes long. + * This is used by the Django Python framework + * + * @param string $clear - the clear text to hash + * @param string $salt - the salt to use, null for random + * @returns string - hashed password + */ + public function hash_djangosha1($clear, $salt=null){ + $this->init_salt($salt,5); + return '$sha1$'.$salt.'$'.sha1($salt.$clear); + } + + /** + * Password hashing method 'djangomd5' + * + * Uses salted MD5 hashs. Salt is 5 bytes long. + * This is used by the Django Python framework + * + * @param string $clear - the clear text to hash + * @param string $salt - the salt to use, null for random + * @returns string - hashed password + */ + public function hash_djangomd5($clear, $salt=null){ + $this->init_salt($salt,5); + return '$md5$'.$salt.'$'.md5($salt.$clear); + } + +} diff --git a/inc/auth.php b/inc/auth.php index 38d1c925d..7449fd635 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -932,20 +932,6 @@ function act_resendpwd(){ * If the selected method needs a salt and none was given, a random one * is chosen. * - * The following methods are understood: - * - * smd5 - Salted MD5 hashing - * apr1 - Apache salted MD5 hashing - * md5 - Simple MD5 hashing - * sha1 - SHA1 hashing - * ssha - Salted SHA1 hashing - * crypt - Unix crypt - * mysql - MySQL password (old method) - * my411 - MySQL 4.1.1 password - * kmd5 - Salted MD5 hashing as used by UNB - * pmd5 - Salted multi iteration MD5 as used by Wordpress - * hmd5 - Same as pmd5 but PhpBB3 flavour - * * @author Andreas Gohr * @return string The crypted password */ @@ -953,173 +939,26 @@ function auth_cryptPassword($clear,$method='',$salt=null){ global $conf; if(empty($method)) $method = $conf['passcrypt']; - //prepare a salt - if(is_null($salt)) $salt = md5(uniqid(rand(), true)); - - switch(strtolower($method)){ - case 'smd5': - if(defined('CRYPT_MD5') && CRYPT_MD5) return crypt($clear,'$1$'.substr($salt,0,8).'$'); - // when crypt can't handle SMD5, falls through to pure PHP implementation - $magic = '1'; - case 'apr1': - //from http://de.php.net/manual/en/function.crypt.php#73619 comment by - if(!isset($magic)) $magic = 'apr1'; - $salt = substr($salt,0,8); - $len = strlen($clear); - $text = $clear.'$'.$magic.'$'.$salt; - $bin = pack("H32", md5($clear.$salt.$clear)); - for($i = $len; $i > 0; $i -= 16) { - $text .= substr($bin, 0, min(16, $i)); - } - for($i = $len; $i > 0; $i >>= 1) { - $text .= ($i & 1) ? chr(0) : $clear{0}; - } - $bin = pack("H32", md5($text)); - for($i = 0; $i < 1000; $i++) { - $new = ($i & 1) ? $clear : $bin; - if ($i % 3) $new .= $salt; - if ($i % 7) $new .= $clear; - $new .= ($i & 1) ? $bin : $clear; - $bin = pack("H32", md5($new)); - } - $tmp = ''; - for ($i = 0; $i < 5; $i++) { - $k = $i + 6; - $j = $i + 12; - if ($j == 16) $j = 5; - $tmp = $bin[$i].$bin[$k].$bin[$j].$tmp; - } - $tmp = chr(0).chr(0).$bin[11].$tmp; - $tmp = strtr(strrev(substr(base64_encode($tmp), 2)), - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", - "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"); - return '$'.$magic.'$'.$salt.'$'.$tmp; - case 'md5': - return md5($clear); - case 'sha1': - return sha1($clear); - case 'ssha': - $salt=substr($salt,0,4); - return '{SSHA}'.base64_encode(pack("H*", sha1($clear.$salt)).$salt); - case 'crypt': - return crypt($clear,substr($salt,0,2)); - case 'mysql': - //from http://www.php.net/mysql comment by - $nr=0x50305735; - $nr2=0x12345671; - $add=7; - $charArr = preg_split("//", $clear); - foreach ($charArr as $char) { - if (($char == '') || ($char == ' ') || ($char == '\t')) continue; - $charVal = ord($char); - $nr ^= ((($nr & 63) + $add) * $charVal) + ($nr << 8); - $nr2 += ($nr2 << 8) ^ $nr; - $add += $charVal; - } - return sprintf("%08x%08x", ($nr & 0x7fffffff), ($nr2 & 0x7fffffff)); - case 'my411': - return '*'.sha1(pack("H*", sha1($clear))); - case 'kmd5': - $key = substr($salt, 16, 2); - $hash1 = strtolower(md5($key . md5($clear))); - $hash2 = substr($hash1, 0, 16) . $key . substr($hash1, 16); - return $hash2; - case 'hmd5': - $key = 'H'; - // hmd5 is exactly the same as pmd5, but uses an H as identifier - // PhpBB3 uses it that way, so we just fall through here - case 'pmd5': - if(!$key) $key = 'P'; - $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; - $iterc = $salt[0]; // pos 0 of salt is iteration count - $iter = strpos($itoa64,$iterc); - $iter = 1 << $iter; - $salt = substr($salt,1,8); - - // iterate - $hash = md5($salt . $clear, true); - do { - $hash = md5($hash . $clear, true); - } while (--$iter); - - // encode - $output = ''; - $count = 16; - $i = 0; - do { - $value = ord($hash[$i++]); - $output .= $itoa64[$value & 0x3f]; - if ($i < $count) - $value |= ord($hash[$i]) << 8; - $output .= $itoa64[($value >> 6) & 0x3f]; - if ($i++ >= $count) - break; - if ($i < $count) - $value |= ord($hash[$i]) << 16; - $output .= $itoa64[($value >> 12) & 0x3f]; - if ($i++ >= $count) - break; - $output .= $itoa64[($value >> 18) & 0x3f]; - } while ($i < $count); - - return '$'.$key.'$'.$iterc.$salt.$output; - default: - msg("Unsupported crypt method $method",-1); + $pass = new PassHash(); + $call = 'hash_'.$method; + + if(!method_exists($pass,$call)){ + msg("Unsupported crypt method $method",-1); + return false; } + + return $pass->$call($clear,$salt); } /** * Verifies a cleartext password against a crypted hash * - * The method and salt used for the crypted hash is determined automatically - * then the clear text password is crypted using the same method. If both hashs - * match true is is returned else false - * * @author Andreas Gohr * @return bool */ function auth_verifyPassword($clear,$crypt){ - $method=''; - $salt=''; - - //determine the used method and salt - $len = strlen($crypt); - if(preg_match('/^\$1\$([^\$]{0,8})\$/',$crypt,$m)){ - $method = 'smd5'; - $salt = $m[1]; - }elseif(preg_match('/^\$apr1\$([^\$]{0,8})\$/',$crypt,$m)){ - $method = 'apr1'; - $salt = $m[1]; - }elseif(preg_match('/^\$P\$(.{31})$/',$crypt,$m)){ - $method = 'pmd5'; - $salt = $m[1]; - }elseif(preg_match('/^\$H\$(.{31})$/',$crypt,$m)){ - $method = 'hmd5'; - $salt = $m[1]; - }elseif(substr($crypt,0,6) == '{SSHA}'){ - $method = 'ssha'; - $salt = substr(base64_decode(substr($crypt, 6)),20); - }elseif($len == 32){ - $method = 'md5'; - }elseif($len == 40){ - $method = 'sha1'; - }elseif($len == 16){ - $method = 'mysql'; - }elseif($len == 41 && $crypt[0] == '*'){ - $method = 'my411'; - }elseif($len == 34){ - $method = 'kmd5'; - $salt = $crypt; - }else{ - $method = 'crypt'; - $salt = substr($crypt,0,2); - } - - //crypt and compare - if(auth_cryptPassword($clear,$method,$salt) === $crypt){ - return true; - } - return false; + $pass = new PassHash(); + return $pass->verify_hash($clear,$crypt); } /** diff --git a/inc/load.php b/inc/load.php index 478ee7c76..ef6f7f31c 100644 --- a/inc/load.php +++ b/inc/load.php @@ -75,6 +75,7 @@ function load_autoload($name){ 'Doku_Parser_Mode' => DOKU_INC.'inc/parser/parser.php', 'SafeFN' => DOKU_INC.'inc/SafeFN.class.php', 'Sitemapper' => DOKU_INC.'inc/Sitemapper.php', + 'PassHash' => DOKU_INC.'inc/PassHash.class.php', 'DokuWiki_Action_Plugin' => DOKU_PLUGIN.'action.php', 'DokuWiki_Admin_Plugin' => DOKU_PLUGIN.'admin.php', -- cgit v1.2.3 From 3e1ca056e645515478add4931738a5f476e1bf3e Mon Sep 17 00:00:00 2001 From: Jacopo Corbetta Date: Sat, 22 Jan 2011 22:12:46 +0100 Subject: Italian language update --- inc/lang/it/denied.txt | 2 +- inc/lang/it/install.html | 10 ++--- inc/lang/it/lang.php | 66 ++++++++++++++-------------- inc/lang/it/mailtext.txt | 15 ++++--- inc/lang/it/password.txt | 2 +- inc/lang/it/pwconfirm.txt | 2 +- inc/lang/it/register.txt | 3 +- inc/lang/it/registermail.txt | 10 ++--- inc/lang/it/resendpwd.txt | 2 +- inc/lang/it/subscr_digest.txt | 4 +- inc/lang/it/subscr_list.txt | 4 +- inc/lang/it/subscr_single.txt | 11 ++--- inc/lang/it/uploadmail.txt | 2 +- lib/plugins/acl/lang/it/lang.php | 1 + lib/plugins/config/lang/it/intro.txt | 2 +- lib/plugins/config/lang/it/lang.php | 4 +- lib/plugins/plugin/lang/it/lang.php | 1 + lib/plugins/popularity/lang/it/intro.txt | 6 +-- lib/plugins/popularity/lang/it/lang.php | 6 +++ lib/plugins/popularity/lang/it/submitted.txt | 3 ++ lib/plugins/revert/lang/it/lang.php | 1 + lib/plugins/usermanager/lang/it/lang.php | 1 + 22 files changed, 87 insertions(+), 71 deletions(-) create mode 100644 lib/plugins/popularity/lang/it/submitted.txt diff --git a/inc/lang/it/denied.txt b/inc/lang/it/denied.txt index c6ba610c4..d21956a5b 100644 --- a/inc/lang/it/denied.txt +++ b/inc/lang/it/denied.txt @@ -1,5 +1,5 @@ ====== Accesso negato ====== -Non hai i diritti per continuare. Hai forse dimenticato di effettuare l'accesso? +Non hai i diritti per continuare. Forse hai dimenticato di effettuare l'accesso? diff --git a/inc/lang/it/install.html b/inc/lang/it/install.html index 471734412..3454fbc3e 100644 --- a/inc/lang/it/install.html +++ b/inc/lang/it/install.html @@ -1,10 +1,10 @@ -

Questa pagina ti assisterà durante la prima installazione e configurazione di +

Questa pagina ti assisterà durante l'installazione e la prima configurazione di Dokuwiki. Ulteriori informazioni sulla procedura di installazione sono reperibili nella pagina di documentazione.

-

DokuWiki utilizza normali file per la memorizzazione di pagine wiki ed altre -informazioni associate a tali pagine (es. immagini, indici per la ricerca, vecchie +

DokuWiki utilizza dei normali file per la memorizzazione delle pagine del wiki e +delle altre informazioni associate a tali pagine (es. immagini, indici per la ricerca, vecchie revisioni, ecc.). Per poter operare correttamente DokuWiki deve accedere in scrittura alle directory che contengono tali file. La procedura di installazione non è in grado di impostare i permessi sulle directory. Questo @@ -19,6 +19,6 @@ Non è necessario per il funzionamento di DokuWiki, ma renderà Dokuwiki più fa da amministrare.

Gli utenti esperti o con particolari esigenze di installazione dovrebbero far riferimento ai -seguenti link per i dettagli riguardanti +seguenti link per dettagli sulle istruzioni per l'installazione -e i parametri di configurazione.

+e sui parametri di configurazione.

diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index 4bfafb060..419b7053b 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -14,6 +14,7 @@ * @author robocap * @author Matteo Carnevali * @author Osman Tekin osman.tekin93@hotmail.it + * @author Jacopo Corbetta */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -44,7 +45,7 @@ $lang['btn_admin'] = 'Amministrazione'; $lang['btn_update'] = 'Aggiorna'; $lang['btn_delete'] = 'Elimina'; $lang['btn_back'] = 'Indietro'; -$lang['btn_backlink'] = 'Backlinks'; +$lang['btn_backlink'] = 'Puntano qui'; $lang['btn_backtomedia'] = 'Torna alla selezione file'; $lang['btn_subscribe'] = 'Sottoscrivi modifiche'; $lang['btn_profile'] = 'Aggiorna profilo'; @@ -60,7 +61,7 @@ $lang['pass'] = 'Password'; $lang['newpass'] = 'Nuova password'; $lang['oldpass'] = 'Conferma password attuale'; $lang['passchk'] = 'Ripeti password'; -$lang['remember'] = 'Ricorda automaticamente'; +$lang['remember'] = 'Memorizza nome utente e password'; $lang['fullname'] = 'Nome completo'; $lang['email'] = 'Email'; $lang['register'] = 'Registrazione'; @@ -68,16 +69,16 @@ $lang['profile'] = 'Profilo utente'; $lang['badlogin'] = 'Il nome utente o la password non sono validi.'; $lang['minoredit'] = 'Modifiche minori'; $lang['draftdate'] = 'Bozza salvata in automatico il'; -$lang['nosecedit'] = 'La pagina nel frattempo è cambiata, la sezione info è scaduta, caricata invece la pagina intera.'; +$lang['nosecedit'] = 'La pagina è stata modificata nel frattempo; è impossibile modificare solo la sezione scelta, quindi è stata caricata la pagina intera.'; $lang['regmissing'] = 'Devi riempire tutti i campi.'; $lang['reguexists'] = 'Il nome utente inserito esiste già.'; $lang['regsuccess'] = 'L\'utente è stato creato. La password è stata spedita via email.'; $lang['regsuccess2'] = 'L\'utente è stato creato.'; -$lang['regmailfail'] = 'Sembra che ci sia stato un errore nell\'invio della email. Contatta il tuo amministratore!'; -$lang['regbadmail'] = 'L\'indirizzo email fornito sembra essere non valido - se pensi che ci sia un errore contatta il tuo amministratore'; +$lang['regmailfail'] = 'Sembra che ci sia stato un errore nell\'invio della email. Contatta l\'amministratore!'; +$lang['regbadmail'] = 'L\'indirizzo email fornito sembra essere non valido - se pensi che ci sia un errore contatta l\'amministratore'; $lang['regbadpass'] = 'Le due password inserite non coincidono, prova di nuovo.'; -$lang['regpwmail'] = 'La tua password DokuWiki'; -$lang['reghere'] = 'Non hai ancora un accesso? Registrati qui.'; +$lang['regpwmail'] = 'La tua password per DokuWiki'; +$lang['reghere'] = 'Non sei ancora registrato? Registrati qui.'; $lang['profna'] = 'Questo wiki non supporta modifiche al profilo'; $lang['profnochange'] = 'Nessuna modifica, niente da aggiornare.'; $lang['profnoempty'] = 'Nome o indirizzo email vuoti non sono consentiti.'; @@ -90,9 +91,9 @@ $lang['resendpwdnouser'] = 'Impossibile trovare questo utente nel database $lang['resendpwdbadauth'] = 'Spiacenti, questo codice di autorizzazione non è valido. Assicurati di aver usato il link completo di conferma.'; $lang['resendpwdconfirm'] = 'Un link di conferma è stato spedito via email.'; $lang['resendpwdsuccess'] = 'La nuova password è stata spedita via email.'; -$lang['license'] = 'Ad eccezione da dove è diversamente indicato, il contenuto di questo wiki è sotto la seguente licenza:'; +$lang['license'] = 'Ad eccezione da dove è diversamente indicato, il contenuto di questo wiki è soggetto alla seguente licenza:'; $lang['licenseok'] = 'Nota: modificando questa pagina accetti di rilasciare il contenuto sotto la seguente licenza:'; -$lang['searchmedia'] = 'Cerca nome file:'; +$lang['searchmedia'] = 'Cerca file di nome:'; $lang['searchmedia_in'] = 'Cerca in &s'; $lang['txt_upload'] = 'Seleziona un file da caricare'; $lang['txt_filename'] = 'Carica come (opzionale)'; @@ -126,7 +127,7 @@ $lang['js']['mediaright'] = 'Allinea l\'immagine a destra.'; $lang['js']['mediacenter'] = 'Allinea l\'immagine al centro.'; $lang['js']['medianoalign'] = 'Non allineare.'; $lang['js']['nosmblinks'] = 'I collegamenti con le risorse condivise di Windows funzionano solo con Microsoft Internet Explorer. -Puoi fare un copia/incolla di questo collegamento.'; +È comunque possibile copiare e incollare il collegamento.'; $lang['js']['linkwiz'] = 'Collegamento guidato'; $lang['js']['linkto'] = 'Collega a:'; $lang['js']['del_confirm'] = 'Eliminare veramente questa voce?'; @@ -136,12 +137,12 @@ $lang['nothingfound'] = 'Nessun risultato trovato.'; $lang['mediaselect'] = 'Selezione dei file'; $lang['fileupload'] = 'File caricato'; $lang['uploadsucc'] = 'Invio riuscito'; -$lang['uploadfail'] = 'Invio fallito. Contatta l\'amministratore.'; +$lang['uploadfail'] = 'Invio fallito. È possibile che si tratti di un problema di permessi.'; $lang['uploadwrong'] = 'Invio rifiutato. Questa estensione di file non è ammessa'; -$lang['uploadexist'] = 'Il file esiste già . Invio annullato.'; -$lang['uploadbadcontent'] = 'Il contenuto caricato non corrisponde all\'estensione del file %s.'; -$lang['uploadspam'] = 'Il caricamento è stato bloccato dalla lista nera di spam.'; -$lang['uploadxss'] = 'Il caricamento è stato bloccato perchè il contenuto potrebbe essere malizioso.'; +$lang['uploadexist'] = 'Il file esiste già. Invio annullato.'; +$lang['uploadbadcontent'] = 'Il tipo di contenuto caricato non corrisponde all\'estensione del file %s.'; +$lang['uploadspam'] = 'Il caricamento è stato bloccato come spam perché presente nella lista nera.'; +$lang['uploadxss'] = 'Il caricamento è stato bloccato perchè il contenuto potrebbe essere un virus o presentare problemi di sicurezza.'; $lang['uploadsize'] = 'Il file caricato è troppo grande. (massimo %s)'; $lang['deletesucc'] = 'Il file "%s" è stato eliminato.'; $lang['deletefail'] = '"%s" non può essere eliminato - verifica i permessi.'; @@ -164,7 +165,7 @@ $lang['current'] = 'versione attuale'; $lang['yours'] = 'la tua versione'; $lang['diff'] = 'differenze con la versione attuale'; $lang['diff2'] = 'differenze tra le versioni selezionate'; -$lang['difflink'] = 'Link all visualizzazione della comparazione'; +$lang['difflink'] = 'Link a questa pagina di confronto'; $lang['line'] = 'Linea'; $lang['breadcrumb'] = 'Traccia'; $lang['youarehere'] = 'Ti trovi qui'; @@ -175,7 +176,7 @@ $lang['created'] = 'creata'; $lang['restored'] = 'versione precedente ripristinata'; $lang['external_edit'] = 'modifica esterna'; $lang['summary'] = 'Oggetto della modifica'; -$lang['noflash'] = 'E\' necessario Adobe Flash Plugin per visualizzare questo contenuto.'; +$lang['noflash'] = 'E\' necessario il plugin Adobe Flash per visualizzare questo contenuto.'; $lang['download'] = 'Scarica lo "snippet"'; $lang['mail_newpage'] = 'pagina aggiunta:'; $lang['mail_changed'] = 'pagina modificata:'; @@ -222,11 +223,11 @@ $lang['img_copyr'] = 'Copyright'; $lang['img_format'] = 'Formato'; $lang['img_camera'] = 'Camera'; $lang['img_keywords'] = 'Parole chiave'; -$lang['subscr_subscribe_success'] = 'Aggiunto %s alla lista di sottoscrizione %s'; -$lang['subscr_subscribe_error'] = 'Impossibile aggiungere %s alla lista di sottoscrizione %s'; -$lang['subscr_subscribe_noaddress'] = 'Non esiste alcun indirizzo associato al tuo account, non puoi essere aggiunto alla lista di sottoscrizione'; -$lang['subscr_unsubscribe_success'] = 'Rimosso %s dalla lista di sottoscrizione %s'; -$lang['subscr_unsubscribe_error'] = 'Impossibile rimuovere %s dalla lista di sottoscrizione %s'; +$lang['subscr_subscribe_success'] = 'Aggiunto %s alla lista di sottoscrizioni %s'; +$lang['subscr_subscribe_error'] = 'Impossibile aggiungere %s alla lista di sottoscrizioni %s'; +$lang['subscr_subscribe_noaddress'] = 'Non esiste alcun indirizzo associato al tuo account, non puoi essere aggiunto alla lista di sottoscrizioni'; +$lang['subscr_unsubscribe_success'] = 'Rimosso %s dalla lista di sottoscrizioni %s'; +$lang['subscr_unsubscribe_error'] = 'Impossibile rimuovere %s dalla lista di sottoscrizioni %s'; $lang['subscr_already_subscribed'] = '% è già iscritto a %s'; $lang['subscr_not_subscribed'] = '% non è iscritto a %s'; $lang['subscr_m_not_subscribed'] = 'Attualmente non sei iscritto alla pagina o categoria corrente'; @@ -238,34 +239,33 @@ $lang['subscr_m_receive'] = 'Ricevi'; $lang['subscr_style_every'] = 'email per ogni modifica'; $lang['subscr_style_digest'] = 'email riassuntiva delle modifiche di ogni pagina'; $lang['subscr_style_list'] = 'elenco delle pagine modificate dall\'ultima email'; -$lang['authmodfailed'] = 'La configurazione dell\'autenticazione non è corretta. Informa l\'amministratore di questo Wiki.'; -$lang['authtempfail'] = 'L\'autenticazione è temporaneamente non disponibile. Se questa situazione persiste, informa l\'amministratore di questo Wiki.'; +$lang['authmodfailed'] = 'La configurazione dell\'autenticazione non è corretta. Informa l\'amministratore di questo wiki.'; +$lang['authtempfail'] = 'L\'autenticazione è temporaneamente non disponibile. Se questa situazione persiste, informa l\'amministratore di questo wiki.'; $lang['i_chooselang'] = 'Scegli la lingua'; -$lang['i_installer'] = 'Installazione DokuWiki'; +$lang['i_installer'] = 'Installazione di DokuWiki'; $lang['i_wikiname'] = 'Nome Wiki'; $lang['i_enableacl'] = 'Abilita ACL (consigliato)'; $lang['i_superuser'] = 'Amministratore'; $lang['i_problems'] = 'Si sono verificati problemi durante l\'installazione, indicati di seguito. Non è possibile continuare finché non saranno risolti.'; $lang['i_modified'] = 'Per motivi di sicurezza questa procedura funziona solamente con un\'installazione Dokuwiki nuova e non modificata. -Dovresti ri-estrarre i file dal pacchetto scaricato oppure consultare tutte le +Prova a estrarre di nuovo i file dal pacchetto scaricato oppure consulta le istruzioni per l\'installazione di Dokuwiki'; $lang['i_funcna'] = 'La funzione PHP %s non è disponibile. Forse è stata disabilitata dal tuo provider per qualche motivo?'; $lang['i_phpver'] = 'La versione di PHP %s è inferiore a quella richiesta %s. Devi aggiornare l\'installazione di PHP.'; $lang['i_permfail'] = 'DokuWiki non può scrivere %s. E\' necessario correggere i permessi per questa directory!'; $lang['i_confexists'] = '%s esiste già'; -$lang['i_writeerr'] = 'Impossibile creare %s. E\' necessario verificare i permessi della directory/file e creare il file manualmente.'; +$lang['i_writeerr'] = 'Impossibile creare %s. E\' necessario verificare i permessi della directory o del file oppure creare il file manualmente.'; $lang['i_badhash'] = 'dokuwiki.php (hash=%s) non riconosciuto o modificato'; $lang['i_badval'] = '%s - valore vuoto o non valido'; -$lang['i_success'] = 'La configurazione è stata completata correttamente. Ora è possibile eliminare il file install.php. Continuare con -il nuovo DokuWiki.'; -$lang['i_failure'] = 'Si sono verificati errori durante la scrittura dei file di configurazione. Potrebbe essere necessario correggerli manualmente prima di poter utilizzare il nuovo DokuWiki.'; +$lang['i_success'] = 'La configurazione è stata completata correttamente. Ora è possibile eliminare il file install.php. Poi, visita il tuo nuovo DokuWiki.'; +$lang['i_failure'] = 'Si sono verificati errori durante la scrittura dei file di configurazione. Potrebbe essere necessario correggerli manualmente prima di poter utilizzare il tuo nuovo DokuWiki.'; $lang['i_policy'] = 'Regole di accesso iniziali'; $lang['i_pol0'] = 'Wiki Aperto (lettura, scrittura, caricamento file per tutti)'; $lang['i_pol1'] = 'Wiki Pubblico (lettura per tutti, scrittura e caricamento file per gli utenti registrati)'; $lang['i_pol2'] = 'Wiki Chiuso (lettura, scrittura, caricamento file solamente per gli utenti registrati)'; $lang['i_retry'] = 'Riprova'; -$lang['i_license'] = 'Perfavore scegli la licenza in cui vuoi inserire il tuo contenuto:'; -$lang['mu_intro'] = 'Qui si possono caricare più di un file alla volta. Cliccare su "Sfoglia..." per aggiungere i file in coda. Fai click su "Invia file" quando si è pronti.'; +$lang['i_license'] = 'Per favore scegli la licenza sotto cui vuoi rilasciare il contenuto:'; +$lang['mu_intro'] = 'Qui si possono caricare più di un file alla volta. Scegliere "Sfoglia..." per aggiungere file alla coda. Alla fine, fai click su "Invia file".'; $lang['mu_gridname'] = 'Nome file'; $lang['mu_gridsize'] = 'Dimensione'; $lang['mu_gridstat'] = 'Stato'; @@ -280,7 +280,7 @@ $lang['mu_progress'] = '@PCT@% caricato'; $lang['mu_filetypes'] = 'Tipi di file permessi'; $lang['mu_info'] = 'file caricati.'; $lang['mu_lasterr'] = 'Ultimo errore:'; -$lang['recent_global'] = 'Stai attualmente vedendo le modifiche dentro l\'area %s. Puoi anche vedere le modifiche recenti dell\'intero wiki.'; +$lang['recent_global'] = 'Stai attualmente vedendo le modifiche effettuate nell\'area %s. Puoi anche vedere le modifiche recenti dell\'intero wiki.'; $lang['years'] = '%d anni fa'; $lang['months'] = '%d mesi fa'; $lang['weeks'] = '%d settimane fa'; diff --git a/inc/lang/it/mailtext.txt b/inc/lang/it/mailtext.txt index a4506e951..3a326961e 100644 --- a/inc/lang/it/mailtext.txt +++ b/inc/lang/it/mailtext.txt @@ -1,16 +1,17 @@ Una pagina su DokuWiki è stata aggiunta o modificata. Questi sono i dettagli: -Data : @DATE@ -Browser : @BROWSER@ -Indirizzo IP : @IPADDRESS@ -Nome host : @HOSTNAME@ -Vecchia revisione : @OLDPAGE@ -Nuova revisione : @NEWPAGE@ +Data : @DATE@ +Browser : @BROWSER@ +Indirizzo IP : @IPADDRESS@ +Nome host : @HOSTNAME@ +Vecchia revisione : @OLDPAGE@ +Nuova revisione : @NEWPAGE@ Oggetto della modifica : @SUMMARY@ +Utente : @USER@ @DIFF@ -- -Questa email è stata generata dal DokuWiki di +Questa email è stata generata dal DokuWiki all'indirizzo @DOKUWIKIURL@ diff --git a/inc/lang/it/password.txt b/inc/lang/it/password.txt index d57c78913..670d5ae44 100644 --- a/inc/lang/it/password.txt +++ b/inc/lang/it/password.txt @@ -6,5 +6,5 @@ Nome utente : @LOGIN@ Password : @PASSWORD@ -- -Questa email è stata generata dal DokuWiki di +Questa email è stata generata dal DokuWiki all'indirizzo @DOKUWIKIURL@ diff --git a/inc/lang/it/pwconfirm.txt b/inc/lang/it/pwconfirm.txt index dfcd8a346..8a594ded8 100644 --- a/inc/lang/it/pwconfirm.txt +++ b/inc/lang/it/pwconfirm.txt @@ -11,5 +11,5 @@ seguente collegamento. @CONFIRM@ -- -Questa email è stata generata dal DokuWiki di +Questa email è stata generata dal DokuWiki all'indirizzo @DOKUWIKIURL@ diff --git a/inc/lang/it/register.txt b/inc/lang/it/register.txt index 74f57094d..5a336a971 100644 --- a/inc/lang/it/register.txt +++ b/inc/lang/it/register.txt @@ -1,4 +1,3 @@ ====== Registrazione nuovo utente ====== -Riempi tutte le informazioni seguenti per creare un nuovo account in questo wiki. Assicurati di inserire un **indirizzo email valido** - la tua nuova password ti sarà inviata con un messaggio di posta elettronica. L'account dovrebbe essere un [[doku>pagename|nome di pagina]] valido. - +Riempi tutte le informazioni seguenti per creare un nuovo account in questo wiki. Assicurati di inserire un **indirizzo email valido** - a meno che tu non l'abbia già inserita qui, la password ti sarà inviata con un messaggio di posta elettronica. Il nome utente deve soddisfare i criteri per i [[doku>pagename|nomi delle pagine]]. \ No newline at end of file diff --git a/inc/lang/it/registermail.txt b/inc/lang/it/registermail.txt index e8af0d323..30a6fed48 100644 --- a/inc/lang/it/registermail.txt +++ b/inc/lang/it/registermail.txt @@ -4,11 +4,11 @@ Nome utente : @NEWUSER@ Nome completo : @NEWNAME@ EMail : @NEWEMAIL@ -Data : @DATE@ -Browser : @BROWSER@ -Indirizzo IP : @IPADDRESS@ -Nome macchina : @HOSTNAME@ +Data : @DATE@ +Browser : @BROWSER@ +Indirizzo IP : @IPADDRESS@ +Nome host : @HOSTNAME@ -- -Questa email è stata generata dal DokuWiki di +Questa email è stata generata dal DokuWiki all'indirizzo @DOKUWIKIURL@ diff --git a/inc/lang/it/resendpwd.txt b/inc/lang/it/resendpwd.txt index fc3f09414..54604d7f3 100644 --- a/inc/lang/it/resendpwd.txt +++ b/inc/lang/it/resendpwd.txt @@ -1,3 +1,3 @@ ====== Invia nuova password ====== -Riempi tutte le informazioni seguenti per ottenere una nuova password per il tuo account su questo wiki. La nuova password sarà inviata al tuo indirizzo di posta elettronica registrato. Il nome utente deve essere il tuo nome utente di questo wiki. +Inserisci tutte le informazioni per ottenere una nuova password per il tuo account su questo wiki. La nuova password sarà inviata al tuo indirizzo di posta elettronica registrato. Il nome utente deve essere il tuo nome utente in questo wiki. diff --git a/inc/lang/it/subscr_digest.txt b/inc/lang/it/subscr_digest.txt index 8656f8536..a19128702 100644 --- a/inc/lang/it/subscr_digest.txt +++ b/inc/lang/it/subscr_digest.txt @@ -10,11 +10,11 @@ Queste sono le modifiche: Vecchia revisione: @OLDPAGE@ Nuova revisione: @NEWPAGE@ -Per annullare la pagina delle notifiche collegati al +Per non ricevere più queste notifiche collegati al wiki @DOKUWIKIURL@ e poi visita @SUBSCRIBE@ e rimuovi la sottoscrizione alle modifiche delle pagine e/o categorie. -- -Questa email è stata generata dal DokuWiki di +Questa email è stata generata dal DokuWiki all'indirizzo @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/it/subscr_list.txt b/inc/lang/it/subscr_list.txt index e42f7d1ad..8eb7acd3c 100644 --- a/inc/lang/it/subscr_list.txt +++ b/inc/lang/it/subscr_list.txt @@ -8,11 +8,11 @@ Queste sono le pagine modificate: @DIFF@ -------------------------------------------------------- -Per annullare la pagina delle notifiche collegati al +Per non ricevere più queste notifiche collegati al wiki @DOKUWIKIURL@ e poi visita @SUBSCRIBE@ e rimuovi la sottoscrizione alle modifiche delle pagine e/o categorie. -- -Questa email è stata generata dal DokuWiki di +Questa email è stata generata dal DokuWiki all'indirizzo @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/it/subscr_single.txt b/inc/lang/it/subscr_single.txt index 2c4d5cbb8..8cde8ea0f 100644 --- a/inc/lang/it/subscr_single.txt +++ b/inc/lang/it/subscr_single.txt @@ -13,11 +13,12 @@ Sommario modifica: @SUMMARY@ Vecchia revisione: @OLDPAGE@ Nuova revisione: @NEWPAGE@ -Per annullare la pagina delle notifiche collegati al -wiki @DOKUWIKIURL@ e poi visita @SUBSCRIBE@ -e rimuovi la sottoscrizione alle modifiche delle -pagine e/o categorie. +Per non ricevere più queste notifiche, collegati al +wiki all'indirizzo @DOKUWIKIURL@ e poi visita +@NEWPAGE@ +e rimuovi la sottoscrizione alle modifiche della +pagina o categoria. -- -Questa email è stata generata dal DokuWiki di +Questa email è stata generata dal DokuWiki all'indirizzo @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/it/uploadmail.txt b/inc/lang/it/uploadmail.txt index d8d17a378..da3dacd36 100644 --- a/inc/lang/it/uploadmail.txt +++ b/inc/lang/it/uploadmail.txt @@ -10,5 +10,5 @@ Tipo MIME : @MIME@ Utente : @USER@ -- -Questa email è stata generata dal DokuWiki di +Questa email è stata generata dal DokuWiki all'indirizzo @DOKUWIKIURL@ \ No newline at end of file diff --git a/lib/plugins/acl/lang/it/lang.php b/lib/plugins/acl/lang/it/lang.php index 89e421bbb..f789b979f 100644 --- a/lib/plugins/acl/lang/it/lang.php +++ b/lib/plugins/acl/lang/it/lang.php @@ -12,6 +12,7 @@ * @author snarchio@alice.it * @author robocap * @author Osman Tekin osman.tekin93@hotmail.it + * @author Jacopo Corbetta */ $lang['admin_acl'] = 'Gestione Lista Controllo Accessi (ACL)'; $lang['acl_group'] = 'Gruppo'; diff --git a/lib/plugins/config/lang/it/intro.txt b/lib/plugins/config/lang/it/intro.txt index 95e7151f3..617e8c7b5 100644 --- a/lib/plugins/config/lang/it/intro.txt +++ b/lib/plugins/config/lang/it/intro.txt @@ -4,6 +4,6 @@ Usa questa pagina per gestire la configurazione della tua installazione DokuWiki Le impostazioni con lo sfondo rosso chiaro sono protette e non possono essere modificate con questo plugin. Le impostazioni con lo sfondo blu contengono i valori predefiniti, e le impostazioni con lo sfondo bianco sono relative solo a questa particolare installazione. Sia le impostazioni su sfondo blu che quelle su sfondo bianco possono essere modificate. -Ricordati di premere il pulsante **SALVA** prima di lasciare questa pagina altrimenti le modifiche saranno perse. +Ricordati di premere il pulsante **SALVA** prima di lasciare questa pagina altrimenti le modifiche andranno perse. diff --git a/lib/plugins/config/lang/it/lang.php b/lib/plugins/config/lang/it/lang.php index 5bbc6894f..2208ff86b 100644 --- a/lib/plugins/config/lang/it/lang.php +++ b/lib/plugins/config/lang/it/lang.php @@ -12,6 +12,7 @@ * @author snarchio@alice.it * @author robocap * @author Osman Tekin osman.tekin93@hotmail.it + * @author Jacopo Corbetta */ $lang['menu'] = 'Configurazione Wiki'; $lang['error'] = 'Impostazioni non aggiornate a causa di un valore non corretto, controlla le modifiche apportate e salva di nuovo. @@ -110,6 +111,7 @@ $lang['fetchsize'] = 'Dimensione massima (bytes) scaricabile da fetc $lang['notify'] = 'Invia notifiche sulle modifiche a questo indirizzo'; $lang['registernotify'] = 'Invia informazioni sui nuovi utenti registrati a questo indirizzo email'; $lang['mailfrom'] = 'Mittente per le mail automatiche'; +$lang['mailprefix'] = 'Prefisso da inserire nell\'oggetto delle mail automatiche'; $lang['gzip_output'] = 'Usa il Content-Encoding gzip per xhtml'; $lang['gdlib'] = 'Versione GD Lib '; $lang['im_convert'] = 'Percorso per il convertitore di ImageMagick'; @@ -182,7 +184,7 @@ $lang['xsendfile_o_0'] = 'non usare'; $lang['xsendfile_o_1'] = 'Header proprietario lighttpd (prima della versione 1.5)'; $lang['xsendfile_o_2'] = 'Header standard X-Sendfile'; $lang['xsendfile_o_3'] = 'Header proprietario Nginx X-Accel-Redirect'; -$lang['showuseras_o_loginname'] = 'Nome accesso'; +$lang['showuseras_o_loginname'] = 'Nome utente'; $lang['showuseras_o_username'] = 'Nome completo dell\'utente'; $lang['showuseras_o_email'] = 'Indirizzo email dell\'utente (offuscato in base alle impostazioni di sicurezza posta)'; $lang['showuseras_o_email_link'] = 'Indirizzo email dell\'utente come collegamento mailto:'; diff --git a/lib/plugins/plugin/lang/it/lang.php b/lib/plugins/plugin/lang/it/lang.php index c7ce28a59..e675c5530 100644 --- a/lib/plugins/plugin/lang/it/lang.php +++ b/lib/plugins/plugin/lang/it/lang.php @@ -12,6 +12,7 @@ * @author snarchio@alice.it * @author robocap * @author Osman Tekin osman.tekin93@hotmail.it + * @author Jacopo Corbetta */ $lang['menu'] = 'Gestione Plugin'; $lang['download'] = 'Scarica e installa un nuovo plugin'; diff --git a/lib/plugins/popularity/lang/it/intro.txt b/lib/plugins/popularity/lang/it/intro.txt index 62303eca7..f65310a5a 100644 --- a/lib/plugins/popularity/lang/it/intro.txt +++ b/lib/plugins/popularity/lang/it/intro.txt @@ -2,8 +2,8 @@ Questo strumento raccoglie dati anonimi sul tuo wiki e ti permette di inviarli agli sviluppatori di Dokuwiki. Questo aiuta loro a capire come Dokuwiki viene utilizzato dagli utenti e prendere decisioni future sullo sviluppo in base a quelle che sono le reali statistiche di utilizzo da parte degli utenti. -Ti incoraggiamo a ripetere questa operazione al più spesso per mantenere informati gli sviluppatori sulla crescita del tuo wiki. L'insieme dei dati raccolti saranno identificati tramite un ID anonimo. +Ti incoraggiamo a ripetere ogni tanto questa operazione per mantenere informati gli sviluppatori sulla crescita del tuo wiki. L'insieme dei dati raccolti saranno identificati tramite un ID anonimo. -I dati raccolti contengono informazioni come la versione di DokuWiki, il numero e le dimensioni delle pagine e dei files, i plugins installati e qualche informazione sulla versione di PHP presente nel sistema. +I dati raccolti contengono informazioni come la versione di DokuWiki, il numero e le dimensioni delle pagine e dei file, i plugin installati e informazioni sulla versione di PHP presente nel sistema. -A continuazione puoi vedere un'anteprima dei dati che saranno inviati. Utilizza il tasto "Invia dati" per trasferire le informazioni. \ No newline at end of file +A continuazione puoi vedere un'anteprima dei dati che saranno inviati. Utilizza il pulsante "Invia dati" per trasferire le informazioni. \ No newline at end of file diff --git a/lib/plugins/popularity/lang/it/lang.php b/lib/plugins/popularity/lang/it/lang.php index 583dfae26..a7852f22c 100644 --- a/lib/plugins/popularity/lang/it/lang.php +++ b/lib/plugins/popularity/lang/it/lang.php @@ -8,6 +8,12 @@ * @author snarchio@alice.it * @author robocap * @author Osman Tekin osman.tekin93@hotmail.it + * @author Jacopo Corbetta */ $lang['name'] = 'Raccolta dati sul wiki (può impiegare del tempo per caricarsi)'; $lang['submit'] = 'Invia dati'; +$lang['autosubmit'] = 'Invia automaticamente i dati una volta al mese'; +$lang['submissionFailed'] = 'È stato impossibile inviare i dati a causa del seguente errore:'; +$lang['submitDirectly'] = 'È possibile inviare i dati manualmente utilizzando il pulsante sottostante.'; +$lang['autosubmitError'] = 'L\'ultimo invio automatico non è andato a buon fine a causa del seguente errore:'; +$lang['lastSent'] = 'I dati sono stati inviati'; diff --git a/lib/plugins/popularity/lang/it/submitted.txt b/lib/plugins/popularity/lang/it/submitted.txt new file mode 100644 index 000000000..78247154e --- /dev/null +++ b/lib/plugins/popularity/lang/it/submitted.txt @@ -0,0 +1,3 @@ +====== Raccolta dati sul wiki ====== + +I dati sono stati inviati correttamente. \ No newline at end of file diff --git a/lib/plugins/revert/lang/it/lang.php b/lib/plugins/revert/lang/it/lang.php index 319493acd..79565655b 100644 --- a/lib/plugins/revert/lang/it/lang.php +++ b/lib/plugins/revert/lang/it/lang.php @@ -9,6 +9,7 @@ * @author snarchio@alice.it * @author robocap * @author Osman Tekin osman.tekin93@hotmail.it + * @author Jacopo Corbetta */ $lang['menu'] = 'Gestore di ripristini'; $lang['filter'] = 'Cerca pagine con spam'; diff --git a/lib/plugins/usermanager/lang/it/lang.php b/lib/plugins/usermanager/lang/it/lang.php index a766e5d07..34c510def 100644 --- a/lib/plugins/usermanager/lang/it/lang.php +++ b/lib/plugins/usermanager/lang/it/lang.php @@ -11,6 +11,7 @@ * @author snarchio@alice.it * @author robocap * @author Osman Tekin osman.tekin93@hotmail.it + * @author Jacopo Corbetta */ $lang['menu'] = 'Gestione Utenti'; $lang['noauth'] = '(autenticazione non disponibile)'; -- cgit v1.2.3 From d64516f5d992bb47a765949743506d8433a07d55 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 22 Jan 2011 23:01:56 +0100 Subject: Indexer v3 Rewrite: fix obvious typos and type errors --- inc/indexer.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index a61f3772a..087113587 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -277,7 +277,7 @@ class Doku_Indexer { else unset($val_idx[$id]); } $val_idx = array_keys($val_idx); - $this->_saveIndexKey($metaname.'_p', '', $pid, $val_idx); + $this->_saveIndexKey($metaname.'_p', '', $pid, implode(':', $val_idx)); } unset($metaidx); unset($metawords); @@ -559,8 +559,8 @@ class Doku_Indexer { private function _getIndex($idx, $suffix) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; - if (!@file_exists($fn, FILE_IGNORE_NEW_LINES)) return array(); - return file($fn); + if (!@file_exists($fn)) return array(); + return file($fn, FILE_IGNORE_NEW_LINES); } /** @@ -773,7 +773,7 @@ class Doku_Indexer { $newLine = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $newLine); $newLine = trim($newLine, ':'); if ($count) { - if ($strlen($newLine) > 0) + if (strlen($newLine) > 0) return "$id*$count:".$newLine; else return "$id*$count".$newLine; @@ -794,7 +794,7 @@ class Doku_Indexer { foreach ($parts as $tuple) { if ($tuple == '') continue; list($key, $cnt) = explode('*', $tuple); - if (!$cnd) continue; + if (!$cnt) continue; $key = $keys[$key]; if (!$key) continue; $result[$key] = $cnt; -- cgit v1.2.3 From 4373c7b59390347515bcf9615f4e9133a5b88aee Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 22 Jan 2011 23:06:00 +0100 Subject: Indexer v3 Rewrite: _saveIndexKey now really writes on the desired line Now _saveIndexKey inserts empty lines when the index isn't long enough. This is necessary because the page ids are taken from the global page index, but there is not every page in the metadata key specific index so e.g. line 10 might be the first entry in the index. --- inc/indexer.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/indexer.php b/inc/indexer.php index 087113587..34ce0cdd0 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -620,10 +620,16 @@ class Doku_Indexer { while (($curline = fgets($ih)) !== false) { fwrite($fh, (++$ln == $id) ? $line : $curline); } - if ($id > $ln) + if ($id > $ln) { + while ($id > ++$ln) + fwrite($fh, "\n"); fwrite($fh, $line); + } fclose($ih); } else { + $ln = -1; + while ($id > ++$ln) + fwrite($fh, "\n"); fwrite($fh, $line); } fclose($fh); -- cgit v1.2.3 From cd763a5b1584197f6e9adf3bbb4f982b6bbaca05 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sat, 22 Jan 2011 23:10:01 +0100 Subject: Indexer v3 Rewrite: implement lookupKey() Saving and looking up metadata key/value pairs seems to work now at least with some basic tests. --- inc/indexer.php | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/inc/indexer.php b/inc/indexer.php index 34ce0cdd0..4219dbe75 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -400,9 +400,44 @@ class Doku_Indexer { * @param callback $func comparison function * @return array list with page names, keys are query values if more than one given * @author Tom N Harris + * @author Michael Hamann */ public function lookupKey($key, $value, $func=null) { - return array(); + $metaname = idx_cleanName($key); + + // get all words in order to search the matching ids + $words = $this->_getIndex($metaname, '_w'); + + // the matching ids for the provided value(s) + $value_ids = array(); + + if (!is_array($value)) $value = array($value); + + foreach ($value as $val) { + if (is_null($func)) { + if (($i = array_search($val, $words)) !== false) + $value_ids[$i] = $val; + } else { + foreach ($words as $i => $word) { + if (call_user_func_array($func, array($word, $value))) + $value_ids[$i] = $val; + } + } + } + + unset($words); // free the used memory + + // load all lines and pages so the used lines can be taken and matched with the pages + $lines = $this->_getIndex($metaname, '_i'); + $page_idx = $this->_getIndex('page', ''); + + $result = array(); + foreach ($value_ids as $value_id => $val) { + // parse the tuples of the form page_id*1:page2_id*1 and so on, return value + // is an array with page_id => 1, page2_id => 1 etc. so take the keys only + $result[$val] = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); + } + return $result; } /** -- cgit v1.2.3 From e1e1a7e012189660a2cfd7631e82234b5ae92f69 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 23 Jan 2011 01:52:31 +0100 Subject: Indexer v3 Rewrite: fix addMetaKeys and locking This fixes addMetaKeys so it actually removes values. This also changes the functionality of the function: It now updates the key for the page with the current value instead of adding new values as this will be the default use case. A new parameter could be added to restore the "old" behavior when needed. addMetaKeys now only saves the index when the content has really been changed. Furthermore no empty number is added anymore to the reverse index when it has been empty previously. addMetaKeys now releases the lock again and really fails when the lock can't be gained. --- inc/indexer.php | 68 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 4219dbe75..d3d05ecd8 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -210,7 +210,7 @@ class Doku_Indexer { } /** - * Add keys to the metadata index. + * Add/update keys to/of the metadata index. * * Adding new keys does not remove other keys for the page. * An empty value will erase the key. @@ -222,6 +222,7 @@ class Doku_Indexer { * @param mixed $value the value or list of values * @return boolean the function completed successfully * @author Tom N Harris + * @author Michael Hamann */ public function addMetaKeys($page, $key, $value=null) { if (!is_array($key)) { @@ -231,7 +232,8 @@ class Doku_Indexer { trigger_error("array passed to addMetaKeys but value is not null", E_USER_WARNING); } - $this->_lock(); + if (!$this->_lock()) + return "locked"; // load known documents $pid = $this->_addIndexKey('page', '', $page); @@ -245,8 +247,19 @@ class Doku_Indexer { $metaidx = $this->_getIndex($metaname, '_i'); $metawords = $this->_getIndex($metaname, '_w'); $addwords = false; - $update = array(); - if (!is_array($val)) $values = array($values); + + if (!is_array($values)) $values = array($values); + + $val_idx = $this->_getIndexKey($metaname, '_p', $pid); + if ($val_idx != '') { + $val_idx = explode(':', $val_idx); + // -1 means remove, 0 keep, 1 add + $val_idx = array_combine($val_idx, array_fill(0, count($val_idx), -1)); + } else { + $val_idx = array(); + } + + foreach ($values as $val) { $val = (string)$val; if ($val !== "") { @@ -256,32 +269,39 @@ class Doku_Indexer { $metawords[$id] = $val; $addwords = true; } + // test if value is already in the index + if (isset($val_idx[$id]) && $val_idx[$id] <= 0) + $val_idx[$id] = 0; + else // else add it + $val_idx[$id] = 1; + } + } + + if ($addwords) + $this->_saveIndex($metaname.'_w', '', $metawords); + $vals_changed = false; + foreach ($val_idx as $id => $action) { + if ($action == -1) { + $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 0); + $vals_changed = true; + unset($val_idx[$id]); + } elseif ($action == 1) { $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 1); - $update[$id] = 1; - } else { - $id = array_search($val, $metawords); - if ($id !== false) { - $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 0); - $update[$id] = 0; - } + $vals_changed = true; } } - if (!empty($update)) { - if ($addwords) - $this->_saveIndex($metaname.'_w', '', $metawords); + + if ($vals_changed) { $this->_saveIndex($metaname.'_i', '', $metaidx); - $val_idx = $this->_getIndexKey($metaname, '_p', $pid); - $val_idx = array_flip(explode(':', $val_idx)); - foreach ($update as $id => $add) { - if ($add) $val_idx[$id] = 1; - else unset($val_idx[$id]); - } - $val_idx = array_keys($val_idx); - $this->_saveIndexKey($metaname.'_p', '', $pid, implode(':', $val_idx)); + $val_idx = implode(':', array_keys($val_idx)); + $this->_saveIndexKey($metaname.'_p', '', $pid, $val_idx); } + unset($metaidx); unset($metawords); } + + $this->_unlock(); return true; } @@ -398,7 +418,7 @@ class Doku_Indexer { * @param string $key name of the metadata key to look for * @param string $value search term to look for * @param callback $func comparison function - * @return array list with page names, keys are query values if more than one given + * @return array lists with page names, keys are query values * @author Tom N Harris * @author Michael Hamann */ @@ -911,7 +931,7 @@ function idx_addPage($page, $verbose=false) { $Indexer = idx_get_indexer(); $result = $Indexer->addPageWords($page, $body); - if ($result == "locked") { + if ($result === "locked") { if ($verbose) print("Indexer: locked".DOKU_LF); return false; } -- cgit v1.2.3 From 320f489ae6a653f52f9d489b84b9bdd26f4241ac Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 23 Jan 2011 02:00:32 +0100 Subject: Indexer v3 Rewrite: Use the metadata index for backlinks; add INDEXER_METADATA_INDEX event This new event allows plugins to add or modify the metadata that will be indexed. Collecting this metadata in an event allows plugins to see if other plugins have already added the metadata they need and leads to just one single indexer call thus fewer files are read and written. Plugins could also replace/prevent the metadata indexer call using this event. --- inc/fulltext.php | 19 +++---------------- inc/indexer.php | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/inc/fulltext.php b/inc/fulltext.php index 0411b9f99..35ee4ba34 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -124,26 +124,13 @@ function _ft_pageSearch(&$data) { /** * Returns the backlinks for a given page * - * Does a quick lookup with the fulltext index, then - * evaluates the instructions of the found pages + * Uses the metadata index. */ function ft_backlinks($id){ $result = array(); - // quick lookup of the pagename - // FIXME use metadata key lookup - $page = noNS($id); - $matches = idx_lookup(idx_tokenizer($page)); // pagename may contain specials (_ or .) - $docs = array_keys(ft_resultCombine(array_values($matches))); - $docs = array_filter($docs,'isVisiblePage'); // discard hidden pages - if(!count($docs)) return $result; - - // check metadata for matching links - foreach($docs as $match){ - // metadata relation reference links are already resolved - $links = p_get_metadata($match,'relation references'); - if (isset($links[$id])) $result[] = $match; - } + $result = idx_get_indexer()->lookupKey('relation_references', $id); + $result = $result[$id]; if(!count($result)) return $result; diff --git a/inc/indexer.php b/inc/indexer.php index d3d05ecd8..8859ada33 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -935,6 +935,25 @@ function idx_addPage($page, $verbose=false) { if ($verbose) print("Indexer: locked".DOKU_LF); return false; } + + if ($result) { + $data = array('page' => $page, 'metadata' => array()); + + if (($references = p_get_metadata($page, 'relation references')) !== null) + $data['metadata']['relation_references'] = array_keys($references); + + $evt = new Doku_Event('INDEXER_METADATA_INDEX', $data); + if ($evt->advise_before()) { + $result = $Indexer->addMetaKeys($page, $data['metadata']); + if ($result === "locked") { + if ($verbose) print("Indexer: locked".DOKU_LF); + return false; + } + } + $evt->advise_after(); + unset($evt); + } + if ($result) io_saveFile(metaFN($page,'.indexed'), idx_get_version()); if ($verbose) { -- cgit v1.2.3 From c5982caa2e7089b1ace770dab8da1de167fa2f94 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sun, 23 Jan 2011 16:50:04 +0800 Subject: InlineWordLevelDiff regex should be /xsu - FS#2142 --- inc/DifferenceEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index dd096a55a..1e1d4c3a3 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -932,7 +932,7 @@ class InlineWordLevelDiff extends MappedDiff { } function _split($lines) { - if (!preg_match_all('/ ( [^\S\n]+ | [0-9_A-Za-z\x80-\xff]+ | . ) (?: (?!< \n) [^\S\n])? /xs', + if (!preg_match_all('/ ( [^\S\n]+ | [0-9_A-Za-z\x80-\xff]+ | . ) (?: (?!< \n) [^\S\n])? /xsu', implode("\n", $lines), $m)) { return array(array(''), array('')); } -- cgit v1.2.3 From ae6c4ec0c31ea6c434f9c4adfd5585f2c0ca2b1a Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sun, 23 Jan 2011 16:51:05 +0800 Subject: Add CJK characters to IDX_ASIAN2 - FS#2143 --- inc/indexer.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/indexer.php b/inc/indexer.php index 943c2a8c4..9cf079261 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -23,6 +23,10 @@ define('IDX_ASIAN2','['. '\x{30FD}-\x{31EF}\x{3200}-\x{D7AF}'. '\x{F900}-\x{FAFF}'. // CJK Compatibility Ideographs '\x{FE30}-\x{FE4F}'. // CJK Compatibility Forms + "\xF0\xA0\x80\x80-\xF0\xAA\x9B\x9F". // CJK Extension B + "\xF0\xAA\x9C\x80-\xF0\xAB\x9C\xBF". // CJK Extension C + "\xF0\xAB\x9D\x80-\xF0\xAB\xA0\x9F". // CJK Extension D + "\xF0\xAF\xA0\x80-\xF0\xAF\xAB\xBF". // CJK Compatibility Supplement ']'); define('IDX_ASIAN3','['. // Hiragana/Katakana (can be two characters) '\x{3042}\x{3044}\x{3046}\x{3048}'. -- cgit v1.2.3 From b8709913aad1d5eecc496bb1328193f0b613d3c6 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sun, 23 Jan 2011 16:58:31 +0800 Subject: Traditional Chinese update --- inc/lang/zh-tw/lang.php | 109 ++++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 55 deletions(-) diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 6cd428d58..443d60129 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -19,7 +19,7 @@ $lang['singlequoteopening'] = '‘'; $lang['singlequoteclosing'] = '’'; $lang['apostrophe'] = '’'; $lang['btn_edit'] = '編修本頁'; -$lang['btn_source'] = '顯示頁面原始碼'; +$lang['btn_source'] = '顯示原始碼'; $lang['btn_show'] = '顯示頁面'; $lang['btn_create'] = '建立此頁'; $lang['btn_search'] = '搜尋'; @@ -53,33 +53,33 @@ $lang['btn_revert'] = '復原'; $lang['loggedinas'] = '登入為'; $lang['user'] = '帳號'; $lang['pass'] = '密碼'; -$lang['newpass'] = '新的密碼'; -$lang['oldpass'] = '目前的密碼'; -$lang['passchk'] = '再次打新的密碼'; +$lang['newpass'] = '新密碼'; +$lang['oldpass'] = '目前密碼'; +$lang['passchk'] = '確認密碼'; $lang['remember'] = '記住帳號密碼'; $lang['fullname'] = '暱稱'; $lang['email'] = 'E-Mail'; $lang['register'] = '註冊'; $lang['profile'] = '使用者個人資料'; $lang['badlogin'] = '很抱歉,您的使用者名稱或密碼可能有錯誤'; -$lang['minoredit'] = '次要性的修改'; -$lang['draftdate'] = '草稿自動存檔於'; -$lang['nosecedit'] = '此頁面已經同時被修改,部份過時的資料取代了全頁。'; -$lang['regmissing'] = '很抱歉,所有的欄位都要填哦'; -$lang['reguexists'] = '很抱歉,已有人註冊該帳號了喔'; -$lang['regsuccess'] = '使用者已建立,密碼已經用 email 寄到您信箱了唷。'; +$lang['minoredit'] = '小修改'; +$lang['draftdate'] = '草稿已自動存檔於'; +$lang['nosecedit'] = '頁面在這之間已被修改,過時的區段資料已載入全頁取代。'; +$lang['regmissing'] = '很抱歉,所有欄位都要填寫'; +$lang['reguexists'] = '很抱歉,本帳號已被註冊'; +$lang['regsuccess'] = '使用者已建立,密碼已寄發至該 email。'; $lang['regsuccess2'] = '使用者已建立'; -$lang['regmailfail'] = '寄出密碼信似乎發生錯誤,請跟管理者聯絡!'; -$lang['regbadmail'] = '您輸入的 email 似乎不對,如果您認為是正確的,請與管理者聯絡。'; -$lang['regbadpass'] = '兩次打的密碼不一致,請再重試,謝謝。'; +$lang['regmailfail'] = '寄出密碼信似乎發生錯誤,請跟管理員聯絡!'; +$lang['regbadmail'] = '您輸入的 email 似乎不對,如果您認為是正確的,請與管理員聯絡。'; +$lang['regbadpass'] = '兩次輸入的密碼不一致,請再試一次。'; $lang['regpwmail'] = '您的 DokuWiki 帳號密碼'; -$lang['reghere'] = '您還沒有帳號對吧?來註冊一個吧。'; -$lang['profna'] = '本 wiki 不開放修改個人資料'; +$lang['reghere'] = '您還沒有帳號嗎?註冊一個吧。'; +$lang['profna'] = '本維基不開放修改個人資料'; $lang['profnochange'] = '未做任何變更'; $lang['profnoempty'] = '帳號或 email 地址不可空白!'; $lang['profchanged'] = '個人資料已成功更新囉。'; $lang['pwdforget'] = '忘記密碼了?索取新密碼!'; -$lang['resendna'] = '本 wiki 不開放重寄新密碼'; +$lang['resendna'] = '本維基不開放重寄密碼'; $lang['resendpwd'] = '寄新密碼給'; $lang['resendpwdmissing'] = '抱歉,您必須填寫所有欄位。'; $lang['resendpwdnouser'] = '抱歉,資料庫內找不到這個使用者'; @@ -87,16 +87,16 @@ $lang['resendpwdbadauth'] = '抱歉,認證碼無效。請確認您使用 $lang['resendpwdconfirm'] = '確認連結已通過郵件發送給您了。'; $lang['resendpwdsuccess'] = '您的新密碼已寄出。'; $lang['license'] = '若未特別註明,此維基上的內容都是採用以下授權方式:'; -$lang['licenseok'] = '注意:編輯此頁面表示你已同意以下的授權方式:'; +$lang['licenseok'] = '注意:編輯此頁面表示您已同意以下的授權方式:'; $lang['searchmedia'] = '搜尋檔名:'; $lang['searchmedia_in'] = '在 %s 裡搜尋'; $lang['txt_upload'] = '請選擇要上傳的檔案'; -$lang['txt_filename'] = '請輸入要存在 wiki 內的檔案名稱 (非必要)'; +$lang['txt_filename'] = '請輸入要存在維基內的檔案名稱 (非必要)'; $lang['txt_overwrt'] = '是否要覆蓋原有檔案'; $lang['lockedby'] = '目前已被下列人員鎖定'; $lang['lockexpire'] = '預計解除鎖定於'; -$lang['willexpire'] = '您目前編輯這頁的鎖定將會在一分鐘內解除。若要避免發生衝突,請按「預覽」鍵重新設定鎖定計時。'; -$lang['js']['notsavedyet'] = '尚未儲存的變更將會遺失,要繼續嗎?'; +$lang['willexpire'] = '本頁的編輯鎖定將在一分鐘內到期。要避免發生衝突,請按「預覽」鍵重設鎖定計時。'; +$lang['js']['notsavedyet'] = '未儲存的變更將會遺失,繼續嗎?'; $lang['js']['searchmedia'] = '搜尋檔案'; $lang['js']['keepopen'] = '選擇時保持視窗開啟'; $lang['js']['hidedetails'] = '隱藏詳細內容'; @@ -122,9 +122,9 @@ $lang['js']['mediaright'] = '圖像靠右對齊'; $lang['js']['mediacenter'] = '圖像置中對齊'; $lang['js']['medianoalign'] = '不對齊'; $lang['js']['nosmblinks'] = '只有在 Microsoft IE 下才能執行「連結到 Windows shares」。 -不過您仍可拷貝、複製這連結'; +不過您仍可複製及貼上這個連結'; $lang['js']['linkwiz'] = '建立連結精靈'; -$lang['js']['linkto'] = '連至:'; +$lang['js']['linkto'] = '連結至:'; $lang['js']['del_confirm'] = '確定刪除選取的項目?'; $lang['js']['mu_btn'] = '上傳多個檔案'; $lang['rssfailed'] = '擷取 RSS 饋送檔時發生錯誤:'; @@ -138,7 +138,7 @@ $lang['uploadexist'] = '檔案已存在,未處理。'; $lang['uploadbadcontent'] = '上傳檔案的內容不符合 %s 檔的副檔名'; $lang['uploadspam'] = '這次的上傳被垃圾訊息黑名單阻檔了。'; $lang['uploadxss'] = '這次的上傳因可能的惡意的內容而被阻檔。'; -$lang['uploadsize'] = '上傳的檔案太大了(最大:%s)'; +$lang['uploadsize'] = '上傳的檔案太大了 (最大:%s)'; $lang['deletesucc'] = '檔案 "%s" 已刪除。'; $lang['deletefail'] = '檔案 "%s" 無法刪除,請檢查權限定。'; $lang['mediainuse'] = '檔案 "%s" 未刪除,因為它正被使用。'; @@ -154,16 +154,16 @@ $lang['reference'] = '引用到本頁的,合計有'; $lang['ref_inuse'] = '此檔案無法刪除,因為它正被以下頁面使用:'; $lang['ref_hidden'] = '一些參考內容位於您沒有讀取權限的頁面中'; $lang['hits'] = '個符合'; -$lang['quickhits'] = '比對頁面名稱'; +$lang['quickhits'] = '符合的頁面名稱'; $lang['toc'] = '目錄表'; $lang['current'] = '目前版本'; $lang['yours'] = '您的版本'; $lang['diff'] = '顯示與目前版本的差異'; -$lang['diff2'] = '顯示與選擇版本的差異'; +$lang['diff2'] = '顯示選擇版本間的差異'; $lang['difflink'] = '連向這個比對檢視'; $lang['line'] = '行'; $lang['breadcrumb'] = '足跡'; -$lang['youarehere'] = '(目前所在位置)'; +$lang['youarehere'] = '您在這裡'; $lang['lastmod'] = '上一次變更'; $lang['by'] = '由'; $lang['deleted'] = '移除'; @@ -171,7 +171,7 @@ $lang['created'] = '建立'; $lang['restored'] = '恢復為舊版'; $lang['external_edit'] = '外部編輯'; $lang['summary'] = '編輯摘要'; -$lang['noflash'] = '顯示此內容需要Adobe Flash Plugin'; +$lang['noflash'] = '顯示此內容需要 Adobe Flash Plugin'; $lang['download'] = '下載程式碼片段'; $lang['mail_newpage'] = '增加的頁面:'; $lang['mail_changed'] = '變更的頁面:'; @@ -193,17 +193,17 @@ $lang['qb_hs'] = '選擇標題'; $lang['qb_hplus'] = '較大標題'; $lang['qb_hminus'] = '較小標題'; $lang['qb_hequal'] = '同等標題'; -$lang['qb_link'] = 'WIKI內部連結'; -$lang['qb_extlink'] = '連結外部URL'; +$lang['qb_link'] = '內部連結'; +$lang['qb_extlink'] = '外部連結'; $lang['qb_hr'] = '水平線'; -$lang['qb_ol'] = '項目表(數字)'; -$lang['qb_ul'] = '項目表(符號)'; +$lang['qb_ol'] = '有序列表項目'; +$lang['qb_ul'] = '無序列表項目'; $lang['qb_media'] = '加入圖片或檔案'; $lang['qb_sig'] = '插入簽名'; $lang['qb_smileys'] = '表情符號'; $lang['qb_chars'] = '特殊字元'; -$lang['upperns'] = '前往父命名空間'; -$lang['admin_register'] = '新增使用者中'; +$lang['upperns'] = '前往父層命名空間'; +$lang['admin_register'] = '新增使用者'; $lang['metaedit'] = '編輯後設資料'; $lang['metasaveerr'] = '後設資料寫入失敗'; $lang['metasaveok'] = '後設資料已儲存'; @@ -218,44 +218,43 @@ $lang['img_copyr'] = '版權'; $lang['img_format'] = '格式'; $lang['img_camera'] = '相機'; $lang['img_keywords'] = '關鍵字'; -$lang['subscr_subscribe_success'] = '已將 %s 添加到 %s 的訂閱列表'; -$lang['subscr_subscribe_error'] = '將 %s 添加到 %s 的訂閱列表時發生錯誤'; -$lang['subscr_subscribe_noaddress'] = '沒有與您登入信息相關的地址,您無法被添加到訂閱列表'; +$lang['subscr_subscribe_success'] = '已將 %s 加入至 %s 的訂閱列表'; +$lang['subscr_subscribe_error'] = '將 %s 加入至 %s 的訂閱列表時發生錯誤'; +$lang['subscr_subscribe_noaddress'] = '沒有與您登入相關的地址,無法將您加入訂閱列表'; $lang['subscr_unsubscribe_success'] = '已將 %s 移除自 %s 的訂閱列表'; $lang['subscr_unsubscribe_error'] = '將 %s 移除自 %s 的訂閱列表時發生錯誤'; $lang['subscr_already_subscribed'] = '%s 已經被 %s 訂閱了'; $lang['subscr_not_subscribed'] = '%s 尚未被 %s 訂閱'; -$lang['subscr_m_not_subscribed'] = '您尚未訂閱目前頁面或命名空間。'; -$lang['subscr_m_new_header'] = '添加訂閱'; +$lang['subscr_m_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'] = '帳號認證的設定不正確,請通知該 Wiki 管理員。'; -$lang['authtempfail'] = '帳號認證目前暫不提供,若本狀況持續發生的話,請通知該 Wiki 管理員。'; +$lang['subscr_style_digest'] = '對每個頁面發送更改的摘要信件 (每 %.2f 天)'; +$lang['subscr_style_list'] = '自上次發信以來更改的頁面的列表 (每 %.2f 天)'; +$lang['authmodfailed'] = '帳號認證的設定不正確,請通知該維基管理員。'; +$lang['authtempfail'] = '帳號認證目前暫不提供,若本狀況持續發生的話,請通知該維基管理員。'; $lang['i_chooselang'] = '選擇您的語系'; $lang['i_installer'] = 'DokuWiki 安裝工具'; -$lang['i_wikiname'] = 'Wiki名稱'; -$lang['i_enableacl'] = '使用ACL(建議)'; +$lang['i_wikiname'] = '維基名稱'; +$lang['i_enableacl'] = '啟用 ACL (建議)'; $lang['i_superuser'] = '超級用戶'; -$lang['i_problems'] = 'Installer發現一些問題,顯示如下。您將無法繼續直到您修正它們。'; -$lang['i_modified'] = '由於安全上的考慮,該腳本隻能用於全新且做任何改動的 Dokuwiki 安裝包。 - 您可以重新解壓下載的程序包,或查閱完整的 - Dokuwiki 安裝指南'; -$lang['i_funcna'] = 'PHP 函數 %s 無法使用。也許你的主機供應者基於某些理由停用了它?'; +$lang['i_problems'] = '安裝程式發現如下的問題。您必須修正它們才能繼續。'; +$lang['i_modified'] = '出於安全考量,本腳本只能用於安裝全新且未修改的 Dokuwiki。 +您可以重新解壓下載的封包或查閱完整的Dokuwiki 安裝指南'; +$lang['i_funcna'] = 'PHP 函數 %s 無法使用。也許您的主機供應者基於某些理由停用了它?'; $lang['i_phpver'] = '您的 PHP 版本 %s 比需要的版本 %s 還低。您必須更新您的PHP。'; $lang['i_permfail'] = '%s 無法被 DokuWiki 寫入。您必須修正該目錄的權限!'; -$lang['i_confexists'] = '%s已經存在'; +$lang['i_confexists'] = '%s 已經存在'; $lang['i_writeerr'] = '無法建立 %s。您必須檢查目錄/檔案的權限並手動建立該檔案。'; $lang['i_badhash'] = '無法辨識或被變更的 dokuwiki.php (hash=%s)'; -$lang['i_badval'] = '%s - 非法或空白值'; +$lang['i_badval'] = '%s - 非法或空白的值'; $lang['i_success'] = '設定已成功完成。您現在可以刪除 install.php 檔案。繼續到 您的新 DokuWiki.'; -$lang['i_failure'] = '寫入設定檔時發生了一些錯誤。您必須在使用你的新 Dokuwiki 之前手動修正它們。'; -$lang['i_policy'] = '初步的ACL政策'; +$lang['i_failure'] = '寫入設定檔時發生了一些錯誤。您必須在使用您的新 Dokuwiki 之前手動修正它們。'; +$lang['i_policy'] = '初步的 ACL 政策'; $lang['i_pol0'] = '開放的維基 (任何人可讀取、寫入、上傳)'; $lang['i_pol1'] = '公開的維基 (任何人可讀取,註冊使用者可寫入與上傳)'; $lang['i_pol2'] = '封閉的維基 (只有註冊使用者可讀取、寫入、上傳)'; @@ -276,7 +275,7 @@ $lang['mu_progress'] = '@PCT@% 已上傳'; $lang['mu_filetypes'] = '接受的檔案類型'; $lang['mu_info'] = '檔案已上傳。'; $lang['mu_lasterr'] = '最新一筆錯誤紀錄:'; -$lang['recent_global'] = '您正在閱讀命名空間: %s 中的變更。您亦可觀看整個 wiki 的最近更新。'; +$lang['recent_global'] = '您正在閱讀命名空間: %s 中的變更。您亦可觀看整個維基的最近更新。'; $lang['years'] = '%d 年前'; $lang['months'] = '%d 個月前'; $lang['weeks'] = '%d 週前'; @@ -284,4 +283,4 @@ $lang['days'] = '%d 天前'; $lang['hours'] = '%d 個小時前'; $lang['minutes'] = '%d 分鐘前'; $lang['seconds'] = '%s 秒鐘前'; -$lang['wordblock'] = '您的更改沒有被儲存,因为它包含被阻擋的文字(垃圾訊息)。'; +$lang['wordblock'] = '您的更改沒有被儲存,因为它包含被阻擋的文字 (垃圾訊息)。'; -- cgit v1.2.3 From 52c9860c6e3a36b884ca186f1c9ea3d7acdf2b13 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 23 Jan 2011 10:55:23 +0100 Subject: django pass hashes have no leading $ --- _test/cases/inc/auth_password.test.php | 4 ++-- inc/PassHash.class.php | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/_test/cases/inc/auth_password.test.php b/_test/cases/inc/auth_password.test.php index d19b2a0e7..1c0942239 100644 --- a/_test/cases/inc/auth_password.test.php +++ b/_test/cases/inc/auth_password.test.php @@ -18,8 +18,8 @@ class auth_password_test extends UnitTestCase { 'kmd5' => 'a579299436d7969791189acadd86fcb716', 'pmd5' => '$P$abcdefgh1RC6Fd32heUzl7EYCG9uGw.', 'hmd5' => '$H$abcdefgh1ZbJodHxmeXVAhEzTG7IAp.', - 'djangomd5' => '$md5$abcde$d0fdddeda8cd92725d2b54148ac09158', - 'djangosha1' => '$sha1$abcde$c8e65a7f0acc9158843048a53dcc5a6bc4d17678', + 'djangomd5' => 'md5$abcde$d0fdddeda8cd92725d2b54148ac09158', + 'djangosha1' => 'sha1$abcde$c8e65a7f0acc9158843048a53dcc5a6bc4d17678', ); diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index dce1a5ace..c4a6d78d0 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -41,10 +41,10 @@ class PassHash { $method = 'pmd5'; $salt = $m[1]; $magic = 'H'; - }elseif(preg_match('/^\$sha1\$(.{5})\$/',$hash,$m)){ + }elseif(preg_match('/^sha1\$(.{5})\$/',$hash,$m)){ $method = 'djangosha1'; $salt = $m[1]; - }elseif(preg_match('/^\$md5\$(.{5})\$/',$hash,$m)){ + }elseif(preg_match('/^md5\$(.{5})\$/',$hash,$m)){ $method = 'djangomd5'; $salt = $m[1]; }elseif(substr($hash,0,6) == '{SSHA}'){ @@ -348,13 +348,14 @@ class PassHash { * Uses salted SHA1 hashs. Salt is 5 bytes long. * This is used by the Django Python framework * + * @link http://docs.djangoproject.com/en/dev/topics/auth/#passwords * @param string $clear - the clear text to hash * @param string $salt - the salt to use, null for random * @returns string - hashed password */ public function hash_djangosha1($clear, $salt=null){ $this->init_salt($salt,5); - return '$sha1$'.$salt.'$'.sha1($salt.$clear); + return 'sha1$'.$salt.'$'.sha1($salt.$clear); } /** @@ -363,13 +364,14 @@ class PassHash { * Uses salted MD5 hashs. Salt is 5 bytes long. * This is used by the Django Python framework * + * @link http://docs.djangoproject.com/en/dev/topics/auth/#passwords * @param string $clear - the clear text to hash * @param string $salt - the salt to use, null for random * @returns string - hashed password */ public function hash_djangomd5($clear, $salt=null){ $this->init_salt($salt,5); - return '$md5$'.$salt.'$'.md5($salt.$clear); + return 'md5$'.$salt.'$'.md5($salt.$clear); } } -- cgit v1.2.3 From 62bbd5ef5f25e1d89d67a00cc3b51a954013d7cb Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 23 Jan 2011 11:15:33 +0100 Subject: use a bigger range of characters for password salts --- _test/cases/inc/auth_password.test.php | 10 ++++++++++ inc/PassHash.class.php | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/_test/cases/inc/auth_password.test.php b/_test/cases/inc/auth_password.test.php index 1c0942239..8646e3226 100644 --- a/_test/cases/inc/auth_password.test.php +++ b/_test/cases/inc/auth_password.test.php @@ -39,6 +39,16 @@ class auth_password_test extends UnitTestCase { } } + function test_verifySelf(){ + foreach($this->passes as $method => $hash){ + $info = "testing method $method"; + $this->signal('failinfo',$info); + + $hash = auth_cryptPassword('foo'.$method); + $this->assertTrue(auth_verifyPassword('foo'.$method,$hash)); + } + } + function test_verifyPassword_nohash(){ $this->assertTrue(auth_verifyPassword('foo','$1$$n1rTiFE0nRifwV/43bVon/')); } diff --git a/inc/PassHash.class.php b/inc/PassHash.class.php index c4a6d78d0..cb46c5928 100644 --- a/inc/PassHash.class.php +++ b/inc/PassHash.class.php @@ -77,11 +77,13 @@ class PassHash { /** * Create a random salt * - * @todo use full range of characters instead of hex values only * @param int $len - The length of the salt */ public function gen_salt($len=32){ - return substr(md5(uniqid(rand(), true)),0,$len); + $salt = ''; + $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + for($i=0;$i<$len,$i++;) $salt .= $chars[mt_rand(0,61)]; + return $salt; } /** -- cgit v1.2.3 From 33c72f1de00e99df631e7267ab3fc142b61269f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Schmitz?= Date: Sun, 23 Jan 2011 11:19:52 +0100 Subject: French language update --- lib/plugins/config/lang/fr/lang.php | 2 +- lib/plugins/popularity/lang/fr/lang.php | 7 ++++++- lib/plugins/popularity/lang/fr/submitted.txt | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 lib/plugins/popularity/lang/fr/submitted.txt diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index b51c260fc..7f3e39845 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -161,7 +161,7 @@ $lang['userewrite_o_2'] = 'Interne à DokuWiki'; $lang['deaccent_o_0'] = 'off'; $lang['deaccent_o_1'] = 'supprimer les accents'; $lang['deaccent_o_2'] = 'convertir en roman'; -$lang['gdlib_o_0'] = 'GD Lib non disponible'; +$lang['gdlib_o_0'] = 'Librairie GD non disponible'; $lang['gdlib_o_1'] = 'version 1.x'; $lang['gdlib_o_2'] = 'auto-détectée'; $lang['rss_type_o_rss'] = 'RSS 0.91'; diff --git a/lib/plugins/popularity/lang/fr/lang.php b/lib/plugins/popularity/lang/fr/lang.php index 5ddd074a7..1157d1fa6 100644 --- a/lib/plugins/popularity/lang/fr/lang.php +++ b/lib/plugins/popularity/lang/fr/lang.php @@ -13,5 +13,10 @@ * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net */ -$lang['name'] = 'Enquête de popularité (peut nécessiter un certain temps pour être chargé)'; +$lang['name'] = 'Enquête de popularité (peut nécessiter un certain temps pour être chargée)'; $lang['submit'] = 'Envoyer les données'; +$lang['autosubmit'] = 'Envoyer les données automatiquement chaque mois'; +$lang['submissionFailed'] = 'Les données ne peuvent pas être envoyées à cause des erreurs suivantes :'; +$lang['submitDirectly'] = 'Vous pouvez envoyer le données manuellement en soumettant ce formulaire.'; +$lang['autosubmitError'] = 'La dernière soumission automatique a échoué pour les raisons suivantes :'; +$lang['lastSent'] = 'Les données ont été envoyées'; diff --git a/lib/plugins/popularity/lang/fr/submitted.txt b/lib/plugins/popularity/lang/fr/submitted.txt new file mode 100644 index 000000000..0bc4cfe71 --- /dev/null +++ b/lib/plugins/popularity/lang/fr/submitted.txt @@ -0,0 +1,2 @@ +====== Enquête de popularité ====== +Les données ont été envoyées avec succès. \ No newline at end of file -- cgit v1.2.3 From 5b718e235e1d9b39e7db0f8641945353ea7fa8ab Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Sun, 23 Jan 2011 22:08:04 +0800 Subject: Traditional Chinese update --- inc/lang/zh-tw/backlinks.txt | 5 ++--- inc/lang/zh-tw/draft.txt | 4 ++-- inc/lang/zh-tw/edit.txt | 2 +- inc/lang/zh-tw/lang.php | 2 +- inc/lang/zh-tw/mailtext.txt | 19 +++++++++--------- inc/lang/zh-tw/password.txt | 15 +++++++------- inc/lang/zh-tw/pwconfirm.txt | 12 +++++------ inc/lang/zh-tw/register.txt | 3 ++- inc/lang/zh-tw/registermail.txt | 19 +++++++++--------- inc/lang/zh-tw/resendpwd.txt | 2 +- inc/lang/zh-tw/searchpage.txt | 2 +- inc/lang/zh-tw/subscr_digest.txt | 12 +++++------ inc/lang/zh-tw/subscr_list.txt | 15 ++++++-------- inc/lang/zh-tw/subscr_single.txt | 22 ++++++++++---------- inc/lang/zh-tw/uploadmail.txt | 21 +++++++++---------- lib/plugins/acl/lang/zh-tw/help.txt | 11 +++++----- lib/plugins/acl/lang/zh-tw/lang.php | 30 ++++++++++++++-------------- lib/plugins/plugin/lang/zh-tw/lang.php | 2 +- lib/plugins/popularity/lang/zh-tw/intro.txt | 11 +++++----- lib/plugins/popularity/lang/zh-tw/lang.php | 2 +- lib/plugins/revert/lang/zh-tw/intro.txt | 3 +-- lib/plugins/revert/lang/zh-tw/lang.php | 19 +++++++++++------- lib/plugins/usermanager/lang/zh-tw/intro.txt | 2 +- lib/plugins/usermanager/lang/zh-tw/lang.php | 24 +++++++++++----------- 24 files changed, 132 insertions(+), 127 deletions(-) diff --git a/inc/lang/zh-tw/backlinks.txt b/inc/lang/zh-tw/backlinks.txt index 381a76812..5b36728e7 100644 --- a/inc/lang/zh-tw/backlinks.txt +++ b/inc/lang/zh-tw/backlinks.txt @@ -1,5 +1,4 @@ -====== 被引用的連結(Backlinks) ====== - -這裡是有引用、連結到原先頁面的清單。 +====== 反向連結 ====== +這裡是引用、連結到目前頁面的頁面清單。 diff --git a/inc/lang/zh-tw/draft.txt b/inc/lang/zh-tw/draft.txt index 81a092be0..f14702efb 100644 --- a/inc/lang/zh-tw/draft.txt +++ b/inc/lang/zh-tw/draft.txt @@ -1,5 +1,5 @@ ====== 發現草稿檔案 ====== -您上次編輯此頁面並未正確的完成。DokuWiki在您編輯的時候自動儲存一份草稿使得您可以繼續編輯。以下您可以觀看上次編輯的資料。 +您上次的編輯程序並未正確完成。DokuWiki 已在您編輯時自動儲存了一份草稿使您可以繼續編輯。以下是上次的編輯資料。 -請決定你要//復原//您遺失的編輯文件,//刪除//這份草稿,或者//取消//目前的編輯程序。 +請決定要//復原//您遺失的編輯文件,//刪除//這份草稿,或者//取消//編輯程序。 diff --git a/inc/lang/zh-tw/edit.txt b/inc/lang/zh-tw/edit.txt index 768b06ce3..bbe5bb8ed 100644 --- a/inc/lang/zh-tw/edit.txt +++ b/inc/lang/zh-tw/edit.txt @@ -1 +1 @@ -編輯本頁並按下''儲存''即可。可在[[wiki:syntax|維基語法]]找到語法說明。請您只在您能讓本文品質「**更好**」時才編輯。若您只是要測試,請使用 [[playground:playground|新手試煉場]]。 +編輯本頁並按下''儲存''即可。可在[[wiki:syntax|維基語法]]找到語法說明。請只在能讓本文品質「**更好**」時才編輯。如果只是要測試,請使用 [[playground:playground|遊樂場]]。 diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 443d60129..62996ea8a 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -57,7 +57,7 @@ $lang['newpass'] = '新密碼'; $lang['oldpass'] = '目前密碼'; $lang['passchk'] = '確認密碼'; $lang['remember'] = '記住帳號密碼'; -$lang['fullname'] = '暱稱'; +$lang['fullname'] = '真實姓名'; $lang['email'] = 'E-Mail'; $lang['register'] = '註冊'; $lang['profile'] = '使用者個人資料'; diff --git a/inc/lang/zh-tw/mailtext.txt b/inc/lang/zh-tw/mailtext.txt index 570238217..3b6ece377 100644 --- a/inc/lang/zh-tw/mailtext.txt +++ b/inc/lang/zh-tw/mailtext.txt @@ -1,16 +1,17 @@ -您的 DokuWiki 有個新增或變動的頁面。以下是詳細資料: +您的 DokuWiki 有個新增或變動的頁面。詳細資料如下: -日期 : @DATE@ -瀏覽器 : @BROWSER@ -IP位址 : @IPADDRESS@ +日期 : @DATE@ +瀏覽器 : @BROWSER@ +IP位址 : @IPADDRESS@ 主機名稱 : @HOSTNAME@ -舊版本 : @OLDPAGE@ -新版本 : @NEWPAGE@ +舊版本 : @OLDPAGE@ +新版本 : @NEWPAGE@ 編輯摘要 : @SUMMARY@ -使用者 : @USER@ +使用者 : @USER@ @DIFF@ --- -這封信是由 @DOKUWIKIURL@ 的 DokuWiki 自動產生 +-- +本信件由以下 DokuWiki 站台產生: +@DOKUWIKIURL@ diff --git a/inc/lang/zh-tw/password.txt b/inc/lang/zh-tw/password.txt index f7c915e32..5d383b528 100644 --- a/inc/lang/zh-tw/password.txt +++ b/inc/lang/zh-tw/password.txt @@ -1,11 +1,10 @@ -(NOTE: This mail is an UTF-8 encoding email) +@FULLNAME@ 您好! -嗨,@LOGIN@(@FULLNAME@) 您好! +這是您在位於 @DOKUWIKIURL@ 之 @TITLE@ 的使用者資料 -這是您在 @TITLE@(@DOKUWIKIURL@) 的使用者資料 +帳號 : @LOGIN@ +密碼 : @PASSWORD@ -使用者名稱: @LOGIN@ -   密碼: @PASSWORD@ - --- -這封信是由 @DOKUWIKIURL@ 的 DokuWiki 自動產生。 +-- +本信件由以下 DokuWiki 站台產生: +@DOKUWIKIURL@ diff --git a/inc/lang/zh-tw/pwconfirm.txt b/inc/lang/zh-tw/pwconfirm.txt index 7d2e4eab0..994367980 100644 --- a/inc/lang/zh-tw/pwconfirm.txt +++ b/inc/lang/zh-tw/pwconfirm.txt @@ -1,13 +1,13 @@ @FULLNAME@ 您好! -有人請求為您在 @DOKUWIKIURL@ 註冊的用戶 @TITLE@ 發送新密碼 +有人為您在 @DOKUWIKIURL@ 註冊的使用者 @TITLE@ 請求新密碼 -如果您沒有請求發送新密碼,請忽略這封郵件。 +如果您沒有請求新密碼,請忽略這封郵件。 -為了確認發送新密碼請求的確來自您,請使用下面的連結。 +要確認使用新密碼,請拜訪以下的連結。 @CONFIRM@ --- -本郵件由 DokuWiki 自動建立 -@DOKUWIKIURL@ \ No newline at end of file +-- +本信件由以下 DokuWiki 站台產生: +@DOKUWIKIURL@ diff --git a/inc/lang/zh-tw/register.txt b/inc/lang/zh-tw/register.txt index 77a6c3683..0da401ccd 100644 --- a/inc/lang/zh-tw/register.txt +++ b/inc/lang/zh-tw/register.txt @@ -1,3 +1,4 @@ ====== 註冊新使用者 ====== -填寫下欄位的資料以註冊 wiki 帳號,請確定您提供的是 **合法的 e-mail 地址** - 如果您沒有填寫密碼,您的新密碼會被寄到該地址。登錄名稱必須是合法的[[doku>pagename|頁面名稱]]。 \ No newline at end of file +填寫以下資料以註冊維基帳號,請確定您提供的是**合法的 email 地址**-如果這裡沒要求您填寫密碼,您的新密碼會自動產生並寄送到該地址。登錄名稱必須是合法的[[doku>pagename|頁面名稱]]。 + diff --git a/inc/lang/zh-tw/registermail.txt b/inc/lang/zh-tw/registermail.txt index edb2dd5ce..489e3f9d3 100644 --- a/inc/lang/zh-tw/registermail.txt +++ b/inc/lang/zh-tw/registermail.txt @@ -1,13 +1,14 @@ -一個新使用者已經註冊. 以下是詳細內容: +有新的使用者註冊。詳細資料如下: -帳號 : @NEWUSER@ -全名 : @NEWNAME@ -E-mail : @NEWEMAIL@ +帳號 : @NEWUSER@ +姓名 : @NEWNAME@ +E-mail : @NEWEMAIL@ -日期 : @DATE@ -瀏覽器 : @BROWSER@ -IP位址 : @IPADDRESS@ +日期 : @DATE@ +瀏覽器 : @BROWSER@ +IP位址 : @IPADDRESS@ 主機名稱 : @HOSTNAME@ --- -這封信是由 @DOKUWIKIURL@ 的 DokuWiki 所產生的 \ No newline at end of file +-- +本信件由以下 DokuWiki 站台產生: +@DOKUWIKIURL@ diff --git a/inc/lang/zh-tw/resendpwd.txt b/inc/lang/zh-tw/resendpwd.txt index 9250bf4e0..3dbfad750 100644 --- a/inc/lang/zh-tw/resendpwd.txt +++ b/inc/lang/zh-tw/resendpwd.txt @@ -1,3 +1,3 @@ ====== 寄送新密碼 ====== -請在下面的欄位填上資料,以便重新寄發新的 wiki 密碼到您註冊時所填的 email 地址。 帳號(user name)就是你的 wiki 帳號。 +請在以下欄位輸入您的帳號,新密碼將會寄送到您註冊時填寫的 email 地址。 diff --git a/inc/lang/zh-tw/searchpage.txt b/inc/lang/zh-tw/searchpage.txt index b4e00475c..e0f04c433 100644 --- a/inc/lang/zh-tw/searchpage.txt +++ b/inc/lang/zh-tw/searchpage.txt @@ -1,5 +1,5 @@ ====== 搜尋精靈 ====== -提示:您可以在下面找到您的搜尋結果。若沒找到你想找的東西,那麼可以在你查詢之後用「建立此頁」來建立新的頁面。 +提示:您可以在下面找到您的搜尋結果。若沒找到您想要的,可按下按鈕建立或編輯和查詢關鍵字同名的頁面。 ===== 搜尋結果 ===== diff --git a/inc/lang/zh-tw/subscr_digest.txt b/inc/lang/zh-tw/subscr_digest.txt index c082a6772..a26e73050 100644 --- a/inc/lang/zh-tw/subscr_digest.txt +++ b/inc/lang/zh-tw/subscr_digest.txt @@ -1,7 +1,7 @@ 您好! -@TITLE@ 維基中的頁面 @PAGE@ 已經更改。 -這裡是更改的内容: +維基 @TITLE@ 的頁面 @PAGE@ 已更改。 +更改內容如下: -------------------------------------------------------- @DIFF@ @@ -10,10 +10,10 @@ 舊版本:@OLDPAGE@ 新版本:@NEWPAGE@ -要取消頁面提醒,從 @DOKUWIKIURL@ 登入維基,然後拜訪 -@SUBSCRIBE@ +要取消頁面提醒,請登入維基 @DOKUWIKIURL@ +然後拜訪 @SUBSCRIBE@ 並取消訂閱頁面或命名空間的更改。 -- -本信件由以下 DokuWiki 產生 -@DOKUWIKIURL@ \ No newline at end of file +本信件由以下 DokuWiki 站台產生: +@DOKUWIKIURL@ diff --git a/inc/lang/zh-tw/subscr_list.txt b/inc/lang/zh-tw/subscr_list.txt index 46e2bb1ad..2a1b26c6e 100644 --- a/inc/lang/zh-tw/subscr_list.txt +++ b/inc/lang/zh-tw/subscr_list.txt @@ -1,19 +1,16 @@ 您好! -@TITLE@ 維基的命名空間的 @PAGE@ 頁面已經更改。 -這裡是更改的内容: +維基 @TITLE@ 的 @PAGE@ 命名空間的頁面已更改。 +更改內容如下: -------------------------------------------------------- @DIFF@ -------------------------------------------------------- -舊版本:@OLDPAGE@ -新版本:@NEWPAGE@ - -要取消頁面提醒,從 @DOKUWIKIURL@ 登入維基,然後拜訪 -@SUBSCRIBE@ +要取消頁面提醒,請登入維基 @DOKUWIKIURL@ +然後拜訪 @SUBSCRIBE@ 並取消訂閱頁面或命名空間的更改。 -- -本信件由以下 DokuWiki 產生 -@DOKUWIKIURL@ \ No newline at end of file +本信件由以下 DokuWiki 站台產生: +@DOKUWIKIURL@ diff --git a/inc/lang/zh-tw/subscr_single.txt b/inc/lang/zh-tw/subscr_single.txt index 8be47261b..f3c623c5c 100644 --- a/inc/lang/zh-tw/subscr_single.txt +++ b/inc/lang/zh-tw/subscr_single.txt @@ -1,22 +1,22 @@ 您好! -@TITLE@ 維基中的頁面 @PAGE@ 已經更改。 -這裡是更改的内容: +維基 @TITLE@ 的頁面 @PAGE@ 已更改。 +更改內容如下: -------------------------------------------------------- @DIFF@ -------------------------------------------------------- -時間:@DATE@ -用戶:@USER@ -編輯摘要:@SUMMARY@ -舊版本:@OLDPAGE@ -新版本:@NEWPAGE@ +時間 : @DATE@ +使用者 : @USER@ +編輯摘要 : @SUMMARY@ +舊版本 : @OLDPAGE@ +新版本 : @NEWPAGE@ -要取消頁面提醒,從 @DOKUWIKIURL@ 登入維基,然後拜訪 -@SUBSCRIBE@ +要取消頁面提醒,請登入維基 @DOKUWIKIURL@ +然後拜訪 @NEWPAGE@ 並取消訂閱頁面或命名空間的更改。 -- -本信件由以下 DokuWiki 產生 -@DOKUWIKIURL@ \ No newline at end of file +本信件由以下 DokuWiki 站台產生: +@DOKUWIKIURL@ diff --git a/inc/lang/zh-tw/uploadmail.txt b/inc/lang/zh-tw/uploadmail.txt index 25433cc61..b4c1311ba 100644 --- a/inc/lang/zh-tw/uploadmail.txt +++ b/inc/lang/zh-tw/uploadmail.txt @@ -1,13 +1,14 @@ -一個檔案已經被上傳到您的 DokuWiki. 以下是詳細內容: +有人把檔案上傳到您的 DokuWiki。詳細資料如下: -檔名 : @MEDIA@ -日期 : @DATE@ -瀏覽器 : @BROWSER@ -IP位址 : @IPADDRESS@ +檔名 : @MEDIA@ +日期 : @DATE@ +瀏覽器 : @BROWSER@ +IP位址 : @IPADDRESS@ 主機名稱 : @HOSTNAME@ -尺寸 : @SIZE@ -MIME Type : @MIME@ -帳號 : @USER@ +大小 : @SIZE@ +MIME類型 : @MIME@ +使用者 : @USER@ --- -這封信是由 @DOKUWIKIURL@ 的 DokuWiki 所產生的 \ No newline at end of file +-- +本信件由以下 DokuWiki 站台產生: +@DOKUWIKIURL@ diff --git a/lib/plugins/acl/lang/zh-tw/help.txt b/lib/plugins/acl/lang/zh-tw/help.txt index 871c1f4f1..bc1bddb00 100644 --- a/lib/plugins/acl/lang/zh-tw/help.txt +++ b/lib/plugins/acl/lang/zh-tw/help.txt @@ -1,11 +1,12 @@ === 快速指南: === -在此頁面你可以為你的wiki中的namespace以及頁面增加或移除權限 +你可以用這個頁面為維基中的命名空間或頁面增加或移除權限。 -左方的面板顯示了所有的namespace以及頁面 +左方面板顯示了所有命名空間和頁面。 -上方的表格允許你觀看以及修改被選擇的使用者或群組的權限 +上方表格允許你觀看及修改選取的使用者或群組的權限。 -下方的表格顯示了目前所有的存取控制規則(ACL) 你可以使用它快速的刪除或更改多項規則 +下方表格顯示了目前所有的存取控制表 (ACL),你可以用它快速刪除或更改多項規則。 + +閱讀 [[doku>acl|official documentation on ACL]] 可以幫助你完整地了解 DokuWiki 存取控制的運作。 -閱讀 [[doku>acl|official documentation on ACL]] 也許可以幫助你去完整地了解在DokuWiki中, 存取控制是如何運作的. diff --git a/lib/plugins/acl/lang/zh-tw/lang.php b/lib/plugins/acl/lang/zh-tw/lang.php index 36d28e42a..067d15d94 100644 --- a/lib/plugins/acl/lang/zh-tw/lang.php +++ b/lib/plugins/acl/lang/zh-tw/lang.php @@ -9,33 +9,33 @@ * @author Wayne San * @author Li-Jiun Huang * @author Cheng-Wei Chien - * @author Danny Lin + * @author Danny Lin */ -$lang['admin_acl'] = '設定 ACL 存取名單'; +$lang['admin_acl'] = '管理存取控制表 (ACL)'; $lang['acl_group'] = '群組'; -$lang['acl_user'] = '帳號'; +$lang['acl_user'] = '使用者'; $lang['acl_perms'] = '設定權限於'; $lang['page'] = '頁面'; $lang['namespace'] = '命名空間'; $lang['btn_select'] = '選擇'; -$lang['p_user_id'] = '使用者 %s 在頁面 %s目前擁有以下的權限: %s.'; -$lang['p_user_ns'] = '用戶 %s 當前在命名空間 %s 擁有以下權限:%s。'; -$lang['p_group_id'] = '群組 %s 的成員目前對於頁面 %s 擁有以下的權限: %s.'; -$lang['p_group_ns'] = '%s 組成員當前在命名空間 %s 擁有以下權限:%s。'; -$lang['p_choose_id'] = '請在上方的表格中 輸入一個帳號或群組 來觀看或編輯頁面 %s 的權限.'; -$lang['p_choose_ns'] = '請在上表中輸入用戶名或組名稱,來查看或編輯命名空間 %s 的權限設定。'; -$lang['p_inherited'] = '請注意:這些權限並沒有明確設定,而是從其他組或更高級的名稱空間繼承而來。'; -$lang['p_isadmin'] = '請注意:選定的組或用戶擁有完全權限,因為它被設定為超級用戶。'; -$lang['p_include'] = '較高的權限亦包含了較低的權限。新增、上傳與刪除權限只能在命名空間中使用,而非頁面。'; -$lang['current'] = '目前的ACL規則'; +$lang['p_user_id'] = '使用者 %s 目前在頁面 %s 擁有以下權限:%s。'; +$lang['p_user_ns'] = '使用者 %s 目前在命名空間 %s 擁有以下權限:%s。'; +$lang['p_group_id'] = '群組 %s 的成員目前在頁面 %s 擁有以下權限:%s。'; +$lang['p_group_ns'] = '群組 %s 的成員目前在命名空間 %s 擁有以下權限:%s。'; +$lang['p_choose_id'] = '請在上方表格輸入使用者或群組以檢視或編輯頁面 %s 的權限設定。'; +$lang['p_choose_ns'] = '請在上方表格輸入使用者或群組以檢視或編輯命名空間 %s 的權限設定。'; +$lang['p_inherited'] = '注意:這些權限並未明確指定,而是從群組或上層的命名空間繼承而來。'; +$lang['p_isadmin'] = '注意:選取的群組或使用者擁有完整權限,因為它被設定為超級使用者。'; +$lang['p_include'] = '較高的權限亦包含了較低的權限。新增、上傳與刪除權限只能設定在命名空間,不能設定在頁面。'; +$lang['current'] = '目前的存取控制規則'; $lang['where'] = '頁面/命名空間'; $lang['who'] = '使用者/群組'; $lang['perm'] = '權限'; $lang['acl_perm0'] = '無'; -$lang['acl_perm1'] = '讀取權限'; +$lang['acl_perm1'] = '讀取頁面'; $lang['acl_perm2'] = '編輯頁面'; $lang['acl_perm4'] = '新增頁面'; $lang['acl_perm8'] = '上傳圖檔'; $lang['acl_perm16'] = '刪除檔案'; -$lang['acl_new'] = '新增管理規則'; +$lang['acl_new'] = '增加規則'; $lang['acl_mod'] = '修改規則'; diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php index ee9a55e31..f1c399c68 100644 --- a/lib/plugins/plugin/lang/zh-tw/lang.php +++ b/lib/plugins/plugin/lang/zh-tw/lang.php @@ -9,7 +9,7 @@ * @author Cheng-Wei Chien * @author Danny Lin */ -$lang['menu'] = '管理插件(Plugins)'; +$lang['menu'] = '管理插件 (Plugins)'; $lang['download'] = '下載與安裝插件'; $lang['manage'] = '已安裝的插件'; $lang['btn_info'] = '資訊'; diff --git a/lib/plugins/popularity/lang/zh-tw/intro.txt b/lib/plugins/popularity/lang/zh-tw/intro.txt index af0f4a282..37c63dced 100644 --- a/lib/plugins/popularity/lang/zh-tw/intro.txt +++ b/lib/plugins/popularity/lang/zh-tw/intro.txt @@ -1,9 +1,10 @@ -====== 人氣反饋 ====== +====== 人氣回饋 ====== -本工具收集關於您維基站點的匿名信息,並允許您將其發送給 DokuWiki 的開發者。這樣做有助於我們了解用戶是如何使用 DokuWiki 的,並能使我們未來的開發決策建立在現實使用數據上。 +本工具會從您的維基站台收集訊息,並以匿名的方式發送給 DokuWiki 的開發者。這有助於他們了解使用者們如何使用 DokuWiki ,並能基於實際統計資料對未來開發做出更準確的決策。 -我們鼓勵您不時重複該步驟,以便我們能了解您的維基站台發展進度。您的數據集將被匿名 ID 標識。 +我們鼓勵您經常重複這個步驟,讓開發者了解您的維基站台的成長情形。您的資料集將會被標識為一個匿名的識別碼 (ID)。 -收集的資料包括 DokuWiki 版本、您的頁面數量以及文件大小、已安裝的插件、服務器上的 PHP 相關信息。 +收集的資料包括 DokuWiki 版本、頁面數量、檔案大小、安裝的插件、伺服器的 PHP 資訊。 + +將被發送的原始資料顯示如下。請點擊「發送資料」按鈕進行傳輸。 -將被發送的原始數據如下所示。請點擊「發送數據」按扭進行傳輸。 \ No newline at end of file diff --git a/lib/plugins/popularity/lang/zh-tw/lang.php b/lib/plugins/popularity/lang/zh-tw/lang.php index 7e177f1b0..cc96300ee 100644 --- a/lib/plugins/popularity/lang/zh-tw/lang.php +++ b/lib/plugins/popularity/lang/zh-tw/lang.php @@ -9,5 +9,5 @@ * @author Cheng-Wei Chien * @author Danny Lin */ -$lang['name'] = '人氣反饋(載入可能需要一些時間)'; +$lang['name'] = '人氣回饋(載入可能需要一些時間)'; $lang['submit'] = '發送資料'; diff --git a/lib/plugins/revert/lang/zh-tw/intro.txt b/lib/plugins/revert/lang/zh-tw/intro.txt index b01b15d52..17632b1dd 100644 --- a/lib/plugins/revert/lang/zh-tw/intro.txt +++ b/lib/plugins/revert/lang/zh-tw/intro.txt @@ -1,4 +1,3 @@ ====== 還原管理器 ====== -該頁面能幫助您的頁面從垃圾信息的攻擊中自動還原過來。 -請先輸入關鍵字詞搜尋包含垃圾信息的頁面(如垃圾信息的 URL),確認搜尋結果的確包含垃圾訊息,再將它們還原。 +本頁面能幫助您自動還原被垃圾訊息攻擊的頁面過來。先輸入關鍵字詞搜尋包含垃圾訊息的頁面(如垃圾訊息的 URL),確認找到的頁面確實包含垃圾訊息,再將它們還原。 diff --git a/lib/plugins/revert/lang/zh-tw/lang.php b/lib/plugins/revert/lang/zh-tw/lang.php index f72cdc5e0..68fd3dce5 100644 --- a/lib/plugins/revert/lang/zh-tw/lang.php +++ b/lib/plugins/revert/lang/zh-tw/lang.php @@ -7,14 +7,19 @@ * @author Wayne San * @author Li-Jiun Huang * @author Cheng-Wei Chien - * @author Danny Lin + * @author Danny Lin */ + +// for admin plugins, the menu prompt to be displayed in the admin menu +// if set here, the plugin doesn't need to override the getMenuText() method $lang['menu'] = '還原管理'; -$lang['filter'] = '搜索包含垃圾信息的頁面'; + +// custom language strings for the plugin +$lang['filter'] = '搜索包含垃圾訊息的頁面'; $lang['revert'] = '還原選取的頁面'; -$lang['reverted'] = '%s已還原到版本%s'; -$lang['removed'] = '%s已移除'; -$lang['revstart'] = '已開始還原操作。有可能需要很長時間。如果計時器在還原操作完成前停止了,請嘗試還原較少的內容。'; +$lang['reverted'] = '%s 已還原為版本 %s'; +$lang['removed'] = '%s 已移除'; +$lang['revstart'] = '已開始還原操作。有可能需要很長時間。如果程式執行逾時,請嘗試分次還原少量內容。'; $lang['revstop'] = '還原程序已成功完成。'; -$lang['note1'] = '注意: 搜尋有分大小寫'; -$lang['note2'] = '注意:此頁面將被還原到不含垃圾訊息 %s 的最新版本。'; +$lang['note1'] = '注意:搜尋區分大小寫'; +$lang['note2'] = '注意:此頁面將被還原為最後一個不含垃圾訊息 %s 的版本。'; diff --git a/lib/plugins/usermanager/lang/zh-tw/intro.txt b/lib/plugins/usermanager/lang/zh-tw/intro.txt index 9c499d862..8f9488d7d 100644 --- a/lib/plugins/usermanager/lang/zh-tw/intro.txt +++ b/lib/plugins/usermanager/lang/zh-tw/intro.txt @@ -1 +1 @@ -====== 帳號管理員(User Manager) ====== +====== 帳號管理員 ====== diff --git a/lib/plugins/usermanager/lang/zh-tw/lang.php b/lib/plugins/usermanager/lang/zh-tw/lang.php index 5deacc073..a46492685 100644 --- a/lib/plugins/usermanager/lang/zh-tw/lang.php +++ b/lib/plugins/usermanager/lang/zh-tw/lang.php @@ -8,9 +8,9 @@ * @author Wayne San * @author Li-Jiun Huang * @author Cheng-Wei Chien - * @author Danny Lin + * @author Danny Lin */ -$lang['menu'] = '帳號管理員(User Manager)'; +$lang['menu'] = '帳號管理員'; $lang['noauth'] = '(帳號認證尚未開放)'; $lang['nosupport'] = '(尚不支援帳號管理)'; $lang['badauth'] = '錯誤的認證機制'; @@ -29,25 +29,25 @@ $lang['edit_prompt'] = '修改該帳號'; $lang['modify'] = '儲存變更'; $lang['search'] = '搜尋'; $lang['search_prompt'] = '開始搜尋'; -$lang['clear'] = '重新設定搜尋的條件'; +$lang['clear'] = '重設篩選條件'; $lang['filter'] = '篩選條件(Filter)'; -$lang['summary'] = '顯示帳號 %1$d 至 %2$d 共 %3$d 筆符合. 總共有 %4$d 個帳號'; -$lang['nonefound'] = '找不到該用戶(共 %d 帳號)。'; +$lang['summary'] = '顯示帳號 %1$d-%2$d,共 %3$d 筆符合。共有 %4$d 個帳號。'; +$lang['nonefound'] = '找不到帳號。共有 %d 個帳號。'; $lang['delete_ok'] = '已刪除 %d 個帳號'; $lang['delete_fail'] = '%d 個帳號刪除失敗'; $lang['update_ok'] = '成功更新該帳號'; $lang['update_fail'] = '更新該帳號時失敗'; -$lang['update_exists'] = '變更帳號名稱 (%s) 時失敗,應該是已有同名的帳號,不過除了帳號名稱之外的其他修改仍會儲存。'; +$lang['update_exists'] = '變更帳號名稱 (%s) 失敗,因為有同名帳號存在(其他修改已套用)。'; $lang['start'] = '開始'; -$lang['prev'] = '上一步'; -$lang['next'] = '下一步'; -$lang['last'] = '最後步驟'; -$lang['edit_usermissing'] = '找不到所選的帳號,可能是被刪除或被改為其他名稱。'; +$lang['prev'] = '上一頁'; +$lang['next'] = '下一頁'; +$lang['last'] = '最後一頁'; +$lang['edit_usermissing'] = '找不到選取的帳號,可能已被刪除或改為其他名稱。'; $lang['user_notify'] = '通知使用者'; -$lang['note_notify'] = '通知信只有在給予使用者新密碼時寄送。'; +$lang['note_notify'] = '通知信只會在指定使用者新密碼時寄送。'; $lang['note_group'] = '如果沒有指定群組,新使用者將會被加入到預設群組(%s)當中。'; $lang['note_pass'] = '如果沒有輸入這個欄位而且有勾選通知使用者,則會自動產生一組密碼。'; $lang['add_ok'] = '新增使用者成功'; $lang['add_fail'] = '新增使用者失敗'; $lang['notify_ok'] = '通知信已寄出'; -$lang['notify_fail'] = '通知信無法被寄出'; +$lang['notify_fail'] = '通知信無法寄出'; -- cgit v1.2.3 From 8605afb1b4e2a6a9e11e21a7bf0775bbb0d5af03 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 23 Jan 2011 20:23:26 +0100 Subject: Add INDEXER_VERSION_GET event so plugins can add their version This allows plugins to add their own version strings like plugin_tag=1 so pages can be reindexed when plugins update their index content. --- inc/indexer.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 8859ada33..91d6842e4 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -51,13 +51,18 @@ define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')'); * The indexer is only compatible with data written by the same version. * * @author Tom N Harris + * @author Michael Hamann */ function idx_get_version(){ global $conf; if($conf['external_tokenizer']) - return INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); + $version = INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); else - return INDEXER_VERSION; + $version = INDEXER_VERSION; + + $data = array($version); + trigger_event('INDEXER_VERSION_GET', $data, null, false); + return implode('+', $data); } /** -- cgit v1.2.3 From bbc85ee4bc98fadf89707309f923f8ae2c16f727 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Mon, 24 Jan 2011 02:52:10 -0500 Subject: Indexer v3 Rewrite: streamline indexing of deleted or disabled pages --- inc/indexer.php | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/inc/indexer.php b/inc/indexer.php index 8859ada33..5f37ec46c 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -315,6 +315,46 @@ class Doku_Indexer { * @author Tom N Harris */ public function deletePage($page) { + if (!$this->_lock()) + return "locked"; + + // load known documents + $page_idx = $this->_getIndexKey('page', '', $page); + if ($page_idx === false) { + $this->_unlock(); + return false; + } + + // Remove obsolete index entries + $pageword_idx = $this->_getIndexKey('pageword', '', $pid); + if ($pageword_idx !== '') { + $delwords = explode(':',$pageword_idx); + $upwords = array(); + foreach ($delwords as $word) { + if ($word != '') { + list($wlen,$wid) = explode('*', $word); + $wid = (int)$wid; + $upwords[$wlen][] = $wid; + } + } + foreach ($upwords as $wlen => $widx) { + $index = $this->_getIndex('i', $wlen); + foreach ($widx as $wid) { + $index[$wid] = $this->_updateTuple($index[$wid], $pid, 0); + } + $this->_saveIndex('i', $wlen, $index); + } + } + // Save the reverse index + if (!$this->_saveIndexKey('pageword', '', $pid, "")) { + $this->_unlock(); + return false; + } + + // XXX TODO: delete meta keys + + $this->_unlock(); + return true; } /** @@ -921,6 +961,36 @@ function idx_addPage($page, $verbose=false) { } } + if (!page_exists($page)) { + if (!@file_exists($idxtag)) { + if ($verbose) print("Indexer: $page does not exist, ignoring".DOKU_LF); + return false; + } + $Indexer = idx_get_indexer(); + $result = $Indexer->deletePage($page); + if ($result === "locked") { + if ($verbose) print("Indexer: locked".DOKU_LF); + return false; + } + @unlink($idxtag); + return $result; + } + $indexenabled = p_get_metadata($page, 'internal index', false); + if ($indexenabled === false) { + $result = false; + if (@file_exists($idxtag)) { + $Indexer = idx_get_indexer(); + $result = $Indexer->deletePage($page); + if ($result === "locked") { + if ($verbose) print("Indexer: locked".DOKU_LF); + return false; + } + @unlink($idxtag); + } + if ($verbose) print("Indexer: index disabled for $page".DOKU_LF); + return $result; + } + $body = ''; $data = array($page, $body); $evt = new Doku_Event('INDEXER_PAGE_ADD', $data); @@ -939,7 +1009,8 @@ function idx_addPage($page, $verbose=false) { if ($result) { $data = array('page' => $page, 'metadata' => array()); - if (($references = p_get_metadata($page, 'relation references')) !== null) + $data['metadata']['title'] = p_get_metadata($page, 'title', false); + if (($references = p_get_metadata($page, 'relation references', false)) !== null) $data['metadata']['relation_references'] = array_keys($references); $evt = new Doku_Event('INDEXER_METADATA_INDEX', $data); -- cgit v1.2.3 From f078bb0088870b4b68b348d546afa30a80a07e87 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Mon, 24 Jan 2011 03:46:11 -0500 Subject: Indexer Rewrite v3: wildcards in lookupKey and automatically unwrap single result --- inc/fulltext.php | 9 ++++++--- inc/indexer.php | 48 +++++++++++++++++++++++++++++++++++------------- 2 files changed, 41 insertions(+), 16 deletions(-) diff --git a/inc/fulltext.php b/inc/fulltext.php index 35ee4ba34..f477e826e 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -130,7 +130,6 @@ function ft_backlinks($id){ $result = array(); $result = idx_get_indexer()->lookupKey('relation_references', $id); - $result = $result[$id]; if(!count($result)) return $result; @@ -234,8 +233,12 @@ function _ft_pageLookup(&$data){ $pages[$p_id] = p_get_first_heading($p_id, false); } } - //if ($in_title) - // $titles = $Indexer->lookupKey('title', "*$id*"); + if ($in_title) { + foreach ($Indexer->lookupKey('title', "*$id*") as $p_id) { + if (!isset($pages[$p_id])) + $pages[$p_id] = p_get_first_heading($p_id, false); + } + } } if (isset($ns)) { foreach ($page_idx as $p_id) { diff --git a/inc/indexer.php b/inc/indexer.php index 5f37ec46c..6af2de15d 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -458,7 +458,7 @@ class Doku_Indexer { * @param string $key name of the metadata key to look for * @param string $value search term to look for * @param callback $func comparison function - * @return array lists with page names, keys are query values + * @return array lists with page names, keys are query values if $key is array * @author Tom N Harris * @author Michael Hamann */ @@ -471,15 +471,38 @@ class Doku_Indexer { // the matching ids for the provided value(s) $value_ids = array(); - if (!is_array($value)) $value = array($value); + if (!is_array($value)) + $value_array = array($value); + else + $value_array =& $value; - foreach ($value as $val) { - if (is_null($func)) { - if (($i = array_search($val, $words)) !== false) - $value_ids[$i] = $val; - } else { + if (!is_null($func)) { + foreach ($value_array as $val) { foreach ($words as $i => $word) { - if (call_user_func_array($func, array($word, $value))) + if (call_user_func_array($func, array($word, $val))) + $value_ids[$i] = $val; + } + } + } else { + foreach ($value_array as $val) { + $xval = $val; + $caret = false; + $dollar = false; + // check for wildcards + if (substr($xval, 0, 1) == '*') { + $xval = substr($xval, 1); + $caret = '^'; + } + if (substr($xval, -1, 1) == '*') { + $xval = substr($xval, 0, -1); + $dollar = '$'; + } + if ($caret || $dollar) { + $re = $caret.preg_quote($xval, '/').$dollar; + foreach(array_keys(preg_grep('/'.$re.'/', $words)) as $i) + $value_ids[$i] = $val; + } else { + if (($i = array_search($val, $words)) !== false) $value_ids[$i] = $val; } } @@ -497,6 +520,7 @@ class Doku_Indexer { // is an array with page_id => 1, page2_id => 1 etc. so take the keys only $result[$val] = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); } + if (!is_array($value)) $result = $result[$value]; return $result; } @@ -527,12 +551,12 @@ class Doku_Indexer { // check for wildcards if (substr($xword, 0, 1) == '*') { $xword = substr($xword, 1); - $caret = true; + $caret = '^'; $wlen -= 1; } if (substr($xword, -1, 1) == '*') { $xword = substr($xword, 0, -1); - $dollar = true; + $dollar = '$'; $wlen -= 1; } if ($wlen < IDX_MINWORDLENGTH && !$caret && !$dollar && !is_numeric($xword)) @@ -540,9 +564,7 @@ class Doku_Indexer { if (!isset($tokens[$xword])) $tokenlength[$wlen][] = $xword; if ($caret || $dollar) { - $re = preg_quote($xword, '/'); - if ($caret) $re = '^'.$re; - if ($dollar) $re = $re.'$'; + $re = $caret.preg_quote($xword, '/').$dollar; $tokens[$xword][] = array($word, '/'.$re.'/'); if (!isset($tokenwild[$xword])) $tokenwild[$xword] = $wlen; -- cgit v1.2.3 From 14a7c26b85836db9a38608feff653b4b9a8dfa17 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 24 Jan 2011 14:17:15 +0100 Subject: correctly catch password policy problems in adLDAP This patch supresses a warning in the adLDAP library when a password change is attempted but fails due to the configured Active Directory Password Policy. Instead of the error an Exception is thrown. This change probably needs to be replicated in the user modification function. Patch sent to upstream. --- inc/adLDAP.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/inc/adLDAP.php b/inc/adLDAP.php index 4c8ee5db3..a64096b85 100644 --- a/inc/adLDAP.php +++ b/inc/adLDAP.php @@ -1183,8 +1183,17 @@ class adLDAP { $add=array(); $add["unicodePwd"][0]=$this->encode_password($password); - $result=ldap_mod_replace($this->_conn,$user_dn,$add); - if ($result==false){ return (false); } + $result=@ldap_mod_replace($this->_conn,$user_dn,$add); + if ($result==false){ + $err = ldap_errno($this->_conn); + if($err){ + $msg = 'Error '.$err.': '.ldap_err2str($err).'.'; + if($err == 53) $msg .= ' Your password might not match the password policy.'; + throw new adLDAPException($msg); + }else{ + return false; + } + } return (true); } -- cgit v1.2.3 From 9aa0e6c6087e616511fc95d1650ca9b608edece8 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Wed, 26 Jan 2011 08:16:45 +0800 Subject: Like others, there's no need to define $sectionedits as private, and it prevents plugins that ought to handle headers from working and require a lot of ugly workarounds (such as header2). If there's a concern, "protected" may be another choice. --- inc/parser/xhtml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 9405d9420..b502b4f6b 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -29,7 +29,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { var $doc = ''; // will contain the whole document var $toc = array(); // will contain the Table of Contents - private $sectionedits = array(); // A stack of section edit data + var $sectionedits = array(); // A stack of section edit data var $headers = array(); var $footnotes = array(); -- cgit v1.2.3 From 08162f005f3ced0555de590dc1a53155af99d998 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Wed, 26 Jan 2011 08:25:21 +0800 Subject: Fixes an issue of metadata missing on links with empty altname. FS#2144 --- inc/parser/metadata.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index fc2c8cbc5..bd396e2b4 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -455,16 +455,16 @@ class Doku_Renderer_metadata extends Doku_Renderer { global $conf; $isImage = false; - if (is_null($title)){ + if (is_array($title)){ + if($title['title']) return '['.$title['title'].']'; + } else if (is_null($title) || trim($title)==''){ if (useHeading('content') && $id){ $heading = p_get_first_heading($id,false); if ($heading) return $heading; } return $default; - } else if (is_string($title)){ + } else { return $title; - } else if (is_array($title)){ - if($title['title']) return '['.$title['title'].']'; } } -- cgit v1.2.3 From b5a0b131e99eb6028e5ca5fed9c798982cdfe168 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Wed, 26 Jan 2011 08:33:01 +0800 Subject: First attempt to improve rewrite blocks; also eliminates post-paragraph starting single linebreaks. --- inc/parser/handler.php | 124 +++++++++++++++++++------------------------------ 1 file changed, 49 insertions(+), 75 deletions(-) diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 4d0b56b44..3bd3a3b3c 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -1489,6 +1489,11 @@ class Doku_Handler_Block { } } + function openParagraph($pos){ + $this->calls[] = array('p_open',array(), $pos); + $this->inParagraph = true; + } + /** * Close a paragraph if needed * @@ -1548,7 +1553,7 @@ class Doku_Handler_Block { $this->closeParagraph($call[2]); } $this->calls[] = $call; - + $this->skipEolKey = $key+1; continue; } @@ -1561,104 +1566,73 @@ class Doku_Handler_Block { if ($this->removeFromStack()) { $this->calls[] = array('p_open',array(), $call[2]); } + $this->skipEolKey = $key+1; continue; } - if ( !$this->atStart ) { - - if ( $cname == 'eol' ) { - - // Check this isn't an eol instruction to skip... - if ( $this->skipEolKey != $key ) { - // Look to see if the next instruction is an EOL - if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { - - if ( $this->inParagraph ) { - //$this->calls[] = array('p_close',array(), $call[2]); - $this->closeParagraph($call[2]); - } - - $this->calls[] = array('p_open',array(), $call[2]); - $this->inParagraph = true; - - - // Mark the next instruction for skipping - $this->skipEolKey = $key+1; - - }else{ - //if this is just a single eol make a space from it - $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); - } - } + // Always opens a paragraph on stack start + // If this is a block start, it will soon be closed later + if ( $this->atStart ) { + $this->openParagraph($call[2]); + $this->atStart = false; + $this->skipEolKey = $key; + } + if ( $cname == 'eol' ) { - } else { + // Check this isn't an eol instruction to skip... + if ( $this->skipEolKey != $key ) { + // Look to see if the next instruction is an EOL + if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { - $storeCall = true; - if ( $this->inParagraph && (in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open))) { - $this->closeParagraph($call[2]); - $this->calls[] = $call; - $storeCall = false; - } - - if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { if ( $this->inParagraph ) { $this->closeParagraph($call[2]); } - if ( $storeCall ) { - $this->calls[] = $call; - $storeCall = false; - } - - // This really sucks and suggests this whole class sucks but... - if ( isset($calls[$key+1])) { - $cname_plusone = $calls[$key+1][0]; - if ($cname_plusone == 'plugin') { - $cname_plusone = 'plugin'.$calls[$key+1][1][0]; - - // plugin test, true if plugin has a state which precludes it requiring blockOpen or blockClose - $plugin_plusone = true; - $plugin_test = ($call[$key+1][1][2] == DOKU_LEXER_MATCHED) || ($call[$key+1][1][2] == DOKU_LEXER_MATCHED); - } else { - $plugin_plusone = false; - } - if ((!in_array($cname_plusone, $this->blockOpen) && !in_array($cname_plusone, $this->blockClose)) || - ($plugin_plusone && $plugin_test) - ) { - - $this->calls[] = array('p_open',array(), $call[2]); - $this->inParagraph = true; - } - } - } - - if ( $storeCall ) { - $this->addCall($call); + $this->openParagraph($call[2]); + // Mark the next instruction for skipping + $this->skipEolKey = $key+1; + } else { + //if this is just a single eol make a space from it + $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); } - + } else { + $this->skipEolKey = $key+1; } } else { - // Unless there's already a block at the start, start a paragraph - if ( !in_array($cname,$this->blockOpen) ) { - $this->calls[] = array('p_open',array(), $call[2]); - if ( $call[0] != 'eol' ) { + $storeCall = true; + if ( $this->inParagraph && (in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open))) { + $this->closeParagraph($call[2]); + $this->calls[] = $call; + $storeCall = false; + // Mark next eol(s) for skipping + $this->skipEolKey = $key+1; + } + + if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { + if ( $this->inParagraph ) { + $this->closeParagraph($call[2]); + } + if ( $storeCall ) { $this->calls[] = $call; + $storeCall = false; } - $this->atStart = false; - $this->inParagraph = true; - } else { + $this->openParagraph($call[2]); + // Mark next eol(s) for skipping + $this->skipEolKey = $key+1; + } + if ( $storeCall ) { $this->addCall($call); - $this->atStart = false; } - } } if ( $this->inParagraph ) { + $call = end($this->calls); + $cname = $call[0]; if ( $cname == 'p_open' ) { // Ditch the last call array_pop($this->calls); -- cgit v1.2.3 From 9569a107742372a9dcfac06600e3d59c289ba142 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Wed, 26 Jan 2011 11:06:41 +0800 Subject: Major rework of rewrite block in handler.php. (FS#2145) -Simplify the algorithm. May improve performance. -Treat footnote as pure block and section as pure stack. -Remove post-p-open and pre-p-close linefeeds. Affects the effect of xbr plugin. --- inc/parser/handler.php | 201 ++++++++++++++++--------------------------------- 1 file changed, 66 insertions(+), 135 deletions(-) diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 3bd3a3b3c..e7eb94dd2 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -1427,14 +1427,8 @@ class Doku_Handler_Table { * @author Harry Fuecks */ class Doku_Handler_Block { - var $calls = array(); - - var $blockStack = array(); - - var $inParagraph = false; - var $atStart = true; - var $skipEolKey = -1; + var $skipEol = false; // Blocks these should not be inside paragraphs var $blockOpen = array( @@ -1442,9 +1436,9 @@ class Doku_Handler_Block { 'listu_open','listo_open','listitem_open','listcontent_open', 'table_open','tablerow_open','tablecell_open','tableheader_open', 'quote_open', - 'section_open', // Needed to prevent p_open between header and section_open 'code','file','hr','preformatted','rss', 'htmlblock','phpblock', + 'footnote_open', ); var $blockClose = array( @@ -1452,18 +1446,18 @@ class Doku_Handler_Block { 'listu_close','listo_close','listitem_close','listcontent_close', 'table_close','tablerow_close','tablecell_close','tableheader_close', 'quote_close', - 'section_close', // Needed to prevent p_close after section_close 'code','file','hr','preformatted','rss', 'htmlblock','phpblock', + 'footnote_close', ); // Stacks can contain paragraphs var $stackOpen = array( - 'footnote_open','section_open', + 'section_open', ); var $stackClose = array( - 'footnote_close','section_close', + 'section_close', ); @@ -1489,9 +1483,11 @@ class Doku_Handler_Block { } } - function openParagraph($pos){ + function openParagraph($pos){ + if ($this->inParagraph) return; $this->calls[] = array('p_open',array(), $pos); - $this->inParagraph = true; + $this->inParagraph = true; + $this->skipEol = true; } /** @@ -1501,7 +1497,8 @@ class Doku_Handler_Block { * * @author Andreas Gohr */ - function closeParagraph($pos){ + function closeParagraph($pos){ + if (!$this->inParagraph) return; // look back if there was any content - we don't want empty paragraphs $content = ''; for($i=count($this->calls)-1; $i>=0; $i--){ @@ -1518,11 +1515,29 @@ class Doku_Handler_Block { if(trim($content)==''){ //remove the whole paragraph array_splice($this->calls,$i); - }else{ + }else{ + // remove ending linebreaks in the paragraph + $i=count($this->calls)-1; + if ($this->calls[$i][0] == 'cdata') $this->calls[$i][1][0] = rtrim($this->calls[$i][1][0],DOKU_PARSER_EOL); $this->calls[] = array('p_close',array(), $pos); } - $this->inParagraph = false; + $this->inParagraph = false; + $this->skipEol = true; + } + + function addCall($call) { + $key = count($this->calls); + if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { + $this->calls[$key-1][1][0] .= $call[1][0]; + } else { + $this->calls[] = $call; + } + } + + // simple version of addCall, without checking cdata + function storeCall($call) { + $this->calls[] = $call; } /** @@ -1530,155 +1545,71 @@ class Doku_Handler_Block { * * @author Harry Fuecks * @author Andreas Gohr - * @todo This thing is really messy and should be rewritten */ function process($calls) { + // open first paragraph + $this->openParagraph(0); foreach ( $calls as $key => $call ) { $cname = $call[0]; - if($cname == 'plugin') { + if ($cname == 'plugin') { $cname='plugin_'.$call[1][0]; - $plugin = true; $plugin_open = (($call[1][2] == DOKU_LEXER_ENTER) || ($call[1][2] == DOKU_LEXER_SPECIAL)); $plugin_close = (($call[1][2] == DOKU_LEXER_EXIT) || ($call[1][2] == DOKU_LEXER_SPECIAL)); } else { $plugin = false; } - - // Process blocks which are stack like... (contain linefeeds) - if ( in_array($cname,$this->stackOpen ) && (!$plugin || $plugin_open) ) { - - // Hack - footnotes shouldn't immediately contain a p_open - if ($this->addToStack($cname != 'footnote_open')) { - $this->closeParagraph($call[2]); - } - $this->calls[] = $call; - $this->skipEolKey = $key+1; + /* stack */ + if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) { + $this->closeParagraph($call[2]); + $this->storeCall($call); + $this->openParagraph($call[2]); continue; } - - if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) { - - if ( $this->inParagraph ) { - $this->closeParagraph($call[2]); - } - $this->calls[] = $call; - if ($this->removeFromStack()) { - $this->calls[] = array('p_open',array(), $call[2]); - } - $this->skipEolKey = $key+1; + if ( in_array($cname,$this->stackOpen ) && (!$plugin || $plugin_open) ) { + $this->closeParagraph($call[2]); + $this->storeCall($call); + $this->openParagraph($call[2]); continue; } - - // Always opens a paragraph on stack start - // If this is a block start, it will soon be closed later - if ( $this->atStart ) { + /* block */ + // If it's a substition it opens and closes at the same call. + // To make sure next paragraph is correctly started, let close go first. + if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { + $this->closeParagraph($call[2]); + $this->storeCall($call); $this->openParagraph($call[2]); - $this->atStart = false; - $this->skipEolKey = $key; + continue; } - + if ( in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open)) { + $this->closeParagraph($call[2]); + $this->storeCall($call); + continue; + } + /* eol */ if ( $cname == 'eol' ) { - // Check this isn't an eol instruction to skip... - if ( $this->skipEolKey != $key ) { - // Look to see if the next instruction is an EOL + if ( !$this->skipEol ) { + // Next is EOL => double eol => mark as paragraph if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { - - if ( $this->inParagraph ) { - $this->closeParagraph($call[2]); - } + $this->closeParagraph($call[2]); $this->openParagraph($call[2]); - // Mark the next instruction for skipping - $this->skipEolKey = $key+1; } else { //if this is just a single eol make a space from it $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); } - } else { - $this->skipEolKey = $key+1; } - - - } else { - - $storeCall = true; - if ( $this->inParagraph && (in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open))) { - $this->closeParagraph($call[2]); - $this->calls[] = $call; - $storeCall = false; - // Mark next eol(s) for skipping - $this->skipEolKey = $key+1; - } - - if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { - if ( $this->inParagraph ) { - $this->closeParagraph($call[2]); - } - if ( $storeCall ) { - $this->calls[] = $call; - $storeCall = false; - } - $this->openParagraph($call[2]); - // Mark next eol(s) for skipping - $this->skipEolKey = $key+1; - } - if ( $storeCall ) { - $this->addCall($call); - } - } - - } - - if ( $this->inParagraph ) { - $call = end($this->calls); - $cname = $call[0]; - if ( $cname == 'p_open' ) { - // Ditch the last call - array_pop($this->calls); - } else if ( !in_array($cname, $this->blockClose) ) { - //$this->calls[] = array('p_close',array(), $call[2]); - $this->closeParagraph($call[2]); - } else { - $last_call = array_pop($this->calls); - //$this->calls[] = array('p_close',array(), $call[2]); - $this->closeParagraph($call[2]); - $this->calls[] = $last_call; + continue; } + /* normal */ + $this->addCall($call); + $this->skipEol = false; } - + // close last paragraph + $call = end($this->calls); + $this->closeParagraph($call[2]); return $this->calls; } - - /** - * - * @return bool true when a p_close() is required - */ - function addToStack($newStart = true) { - $ret = $this->inParagraph; - $this->blockStack[] = array($this->atStart, $this->inParagraph); - $this->atStart = $newStart; - $this->inParagraph = false; - - return $ret; - } - - function removeFromStack() { - $state = array_pop($this->blockStack); - $this->atStart = $state[0]; - $this->inParagraph = $state[1]; - - return $this->inParagraph; - } - - function addCall($call) { - $key = count($this->calls); - if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { - $this->calls[$key-1][1][0] .= $call[1][0]; - } else { - $this->calls[] = $call; - } - } } //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 48176364390fb988f2194074842d84d8a0b8b73e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 26 Jan 2011 09:46:24 +0100 Subject: AD auth: allow users to modify their profile data --- inc/auth/ad.class.php | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index 5478d64b9..7c4f69c67 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -51,6 +51,13 @@ class auth_ad extends auth_basic { global $conf; $this->cnf = $conf['auth']['ad']; + // we can change the password if SSL is set + if($this->cnf['use_ssl']){ + $this->cando['modPass'] = true; + } + $this->cando['modName'] = true; + $this->cando['modMail'] = true; + // additional information fields if (isset($this->cnf['additional'])) { $this->cnf['additional'] = str_replace(' ', '', $this->cnf['additional']); @@ -60,7 +67,7 @@ class auth_ad extends auth_basic { // ldap extension is needed if (!function_exists('ldap_connect')) { if ($this->cnf['debug']) - msg("LDAP err: PHP LDAP extension not found.",-1); + msg("AD Auth: PHP LDAP extension not found.",-1); $this->success = false; return; } @@ -246,6 +253,49 @@ class auth_ad extends auth_basic { return $result; } + /** + * Modify user data + * + * @param $user nick of the user to be changed + * @param $changes array of field/value pairs to be changed + * @return bool + */ + function modifyUser($user, $changes) { + $return = true; + + // password changing + if(isset($changes['pass'])){ + try { + $return = $this->adldap->user_password($user,$changes['pass']); + } catch (adLDAPException $e) { + if ($this->cnf['debug']) msg('AD Auth: '.$e->getMessage(), -1); + $return = false; + } + if(!$return) msg('AD Auth: failed to change the password. Maybe the password policy was not met?',-1); + } + + // changing user data + $adchanges = array(); + if(isset($changes['name'])){ + // get first and last name + $parts = explode(' ',$changes['name']); + $adchanges['surname'] = array_pop($parts); + $adchanges['firstname'] = join(' ',$parts); + $adchanges['display_name'] = $changes['name']; + } + if(isset($changes['mail'])){ + $adchanges['email'] = $changes['mail']; + } + try { + $return = $return & $this->adldap->user_modify($user,$adchanges); + } catch (adLDAPException $e) { + if ($this->cnf['debug']) msg('AD Auth: '.$e->getMessage(), -1); + $return = false; + } + + return $return; + } + /** * Initialize the AdLDAP library and connect to the server */ @@ -261,7 +311,7 @@ class auth_ad extends auth_basic { return true; } catch (adLDAPException $e) { if ($this->cnf['debug']) { - msg($e->getMessage(), -1); + msg('AD Auth: '.$e->getMessage(), -1); } $this->success = false; $this->adldap = null; -- cgit v1.2.3 From 6c3ec20e45addc534ed8337b9b4733df1d51ff02 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 26 Jan 2011 09:49:50 +0100 Subject: AD auth: password changing works via TLS as well --- inc/auth/ad.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index 7c4f69c67..93186d9a1 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -24,6 +24,7 @@ * $conf['auth']['ad']['ad_password'] = 'pass'; * $conf['auth']['ad']['real_primarygroup'] = 1; * $conf['auth']['ad']['use_ssl'] = 1; + * $conf['auth']['ad']['use_tls'] = 1; * $conf['auth']['ad']['debug'] = 1; * * // get additional information to the userinfo array @@ -52,7 +53,7 @@ class auth_ad extends auth_basic { $this->cnf = $conf['auth']['ad']; // we can change the password if SSL is set - if($this->cnf['use_ssl']){ + if($this->cnf['use_ssl'] || $this->cnf['use_tls']){ $this->cando['modPass'] = true; } $this->cando['modName'] = true; -- cgit v1.2.3 From 267e765e7f9433997a7e31ccaca5d8b3bfa49fe1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 26 Jan 2011 09:54:49 +0100 Subject: AD auth: set capabilities after handling multi domain setups --- inc/auth/ad.class.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/inc/auth/ad.class.php b/inc/auth/ad.class.php index 93186d9a1..9ffd3e18b 100644 --- a/inc/auth/ad.class.php +++ b/inc/auth/ad.class.php @@ -52,12 +52,6 @@ class auth_ad extends auth_basic { global $conf; $this->cnf = $conf['auth']['ad']; - // we can change the password if SSL is set - if($this->cnf['use_ssl'] || $this->cnf['use_tls']){ - $this->cando['modPass'] = true; - } - $this->cando['modName'] = true; - $this->cando['modMail'] = true; // additional information fields if (isset($this->cnf['additional'])) { @@ -105,7 +99,12 @@ class auth_ad extends auth_basic { $this->opts['domain_controllers'] = array_map('trim',$this->opts['domain_controllers']); $this->opts['domain_controllers'] = array_filter($this->opts['domain_controllers']); - // we currently just handle authentication, so no capabilities are set + // we can change the password if SSL is set + if($this->opts['use_ssl'] || $this->opts['use_tls']){ + $this->cando['modPass'] = true; + } + $this->cando['modName'] = true; + $this->cando['modMail'] = true; } /** -- cgit v1.2.3 From 3c896238111421b5906a3155de5736d62d830221 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 26 Jan 2011 14:33:04 +0100 Subject: adjusted dokubug> interwiki URL --- conf/interwiki.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/interwiki.conf b/conf/interwiki.conf index 702696792..b14bfef9f 100644 --- a/conf/interwiki.conf +++ b/conf/interwiki.conf @@ -15,7 +15,7 @@ wppl http://pl.wikipedia.org/wiki/{NAME} wpjp http://ja.wikipedia.org/wiki/{NAME} wpmeta http://meta.wikipedia.org/wiki/{NAME} doku http://www.dokuwiki.org/ -dokubug http://bugs.splitbrain.org/index.php?do=details&task_id= +dokubug http://bugs.dokuwiki.org/index.php?do=details&task_id= rfc http://www.cs.ccu.edu.tw/~chm91u/rfc2html.php?in= man http://man.cx/ amazon http://www.amazon.com/exec/obidos/ASIN/{URL}/splitbrain-20/ -- cgit v1.2.3 From 06756ad2b150ae2ce564043d0e7f02de5fa22b59 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 27 Jan 2011 15:17:39 +0100 Subject: allow placeholders in search intro text This patch allows to use the placeholders in the search intro message that will be replaced with the search term. @SEARCH@ will be replaced with the search query @QUERY@ will be replaced with the URL encoded search query for use in URL parameters Please note that the replacement is don't on the XHTML *after* parsing and rendering the intro wiki text. This means you can not use the query where an ID would be expected. Examples: This will work: [[http://www.google.com/search?q=@QUERY@|Google for @SEARCH@]]. This will not work and will link to the page "search" instead: [[@SEARCH@|Your page]]. You could use this instead: [[this>doku.php?id=@QUERY@|Your page]]. --- inc/html.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index bd87ee7a1..b962c6075 100644 --- a/inc/html.php +++ b/inc/html.php @@ -318,7 +318,13 @@ function html_search(){ global $ID; global $lang; - print p_locale_xhtml('searchpage'); + $intro = p_locale_xhtml('searchpage'); + // allow use of placeholder in search intro + $intro = str_replace( + array('@QUERY@','@SEARCH@'), + array(hsc(rawurlencode($QUERY)),hsc($QUERY)), + $intro); + echo $intro; flush(); //show progressbar -- cgit v1.2.3 From ceea734a6e745087356b0119fc7a4acac821c5aa Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 31 Jan 2011 13:49:10 +0100 Subject: Made the auto submit script more versatile When a tag has the class "quickselect", this script will + * automatically submit its parent form when the select value changes. + * It also hides the submit button of the form. * * @author Andreas Gohr */ addInitEvent(function(){ - var selector = $('action__selector'); - if(!selector) return; - - addEvent(selector,'change',function(e){ - this.form.submit(); - }); - - $('action__selectorbtn').style.display = 'none'; + var selects = getElementsByClass('quickselect',document,'select'); + for(var i=0; i Date: Mon, 31 Jan 2011 13:58:24 +0100 Subject: make use of quickselect in the action dropdown --- inc/template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/template.php b/inc/template.php index ad9a454b4..828f64c85 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1164,7 +1164,7 @@ function tpl_actiondropdown($empty='',$button='>'){ if($REV) echo ''; echo ''; - echo ''; echo ''; echo ''; @@ -1204,7 +1204,7 @@ function tpl_actiondropdown($empty='',$button='>'){ echo ''; echo ''; - echo ''; + echo ''; echo ''; } -- cgit v1.2.3 From c495dc45dedcf43c372ac75d0f966501950bfb6e Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 31 Jan 2011 13:59:22 +0100 Subject: Added colspan option for the InlineDiffFormatter --- inc/DifferenceEngine.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 1e1d4c3a3..36322d222 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -1087,6 +1087,7 @@ class TableDiffFormatter extends DiffFormatter { * */ class InlineDiffFormatter extends DiffFormatter { + var $colspan = 4; function InlineDiffFormatter() { $this->leading_context_lines = 2; @@ -1113,7 +1114,7 @@ class InlineDiffFormatter extends DiffFormatter { $xbeg .= "," . $xlen; if ($ylen != 1) $ybeg .= "," . $ylen; - $r = '@@ '.$lang['line']." -$xbeg +$ybeg @@"; + $r = '@@ '.$lang['line']." -$xbeg +$ybeg @@"; $r .= ' '.$lang['deleted'].''; $r .= ' '.$lang['created'].''; $r .= "\n"; @@ -1132,19 +1133,19 @@ class InlineDiffFormatter extends DiffFormatter { function _added($lines) { foreach ($lines as $line) { - print(''. $line . "\n"); + print(''. $line . "\n"); } } function _deleted($lines) { foreach ($lines as $line) { - print('' . $line . "\n"); + print('' . $line . "\n"); } } function _context($lines) { foreach ($lines as $line) { - print(''.$line."\n"); + print(''.$line."\n"); } } @@ -1153,7 +1154,7 @@ class InlineDiffFormatter extends DiffFormatter { $add = $diff->inline(); foreach ($add as $line) - print(''.$line."\n"); + print(''.$line."\n"); } } -- cgit v1.2.3 From 7216538165621816dc3f751adc0746bf66805421 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 31 Jan 2011 14:00:32 +0100 Subject: Make diff type selectable --- inc/html.php | 46 +++++++++++++++++++++++++++++++++++++++++----- inc/lang/en/lang.php | 3 +++ lib/tpl/default/design.css | 6 ++++-- 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/inc/html.php b/inc/html.php index b962c6075..7abb05d2e 100644 --- a/inc/html.php +++ b/inc/html.php @@ -870,13 +870,18 @@ function html_backlinks(){ * show diff * * @author Andreas Gohr + * @param string $text - compare with this text with most current version + * @param bool $intr - display the intro text */ -function html_diff($text='',$intro=true){ +function html_diff($text='',$intro=true,$type=null){ global $ID; global $REV; global $lang; global $conf; + if(!$type) $type = $_REQUEST['difftype']; + if($type != 'inline') $type = 'sidebyside'; + // we're trying to be clever here, revisions to compare can be either // given as rev and rev2 parameters, with rev2 being optional. Or in an // array in rev2. @@ -993,17 +998,48 @@ function html_diff($text='',$intro=true){ $df = new Diff(explode("\n",htmlspecialchars($l_text)), explode("\n",htmlspecialchars($r_text))); - $tdf = new TableDiffFormatter(); + if($type == 'inline'){ + $tdf = new InlineDiffFormatter(); + } else { + $tdf = new TableDiffFormatter(); + } + + + if($intro) print p_locale_xhtml('diff'); if (!$text) { - $diffurl = wl($ID, array('do'=>'diff', 'rev2[0]'=>$l_rev, 'rev2[1]'=>$r_rev)); ptln(''); } ?> - +
+ + +'); + $this->assertEqual($tdf->format($df), + ' +     + + +'); + } +} +//Setup VIM: ex: et ts=4 : diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 36322d222..906a17b2d 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -943,7 +943,7 @@ class InlineWordLevelDiff extends MappedDiff { $orig = new _HWLDF_WordAccumulator; foreach ($this->edits as $edit) { if ($edit->type == 'copy') - $orig->addWords($edit->orig); + $orig->addWords($edit->closing); elseif ($edit->type == 'change'){ $orig->addWords($edit->orig, 'del'); $orig->addWords($edit->closing, 'add'); -- cgit v1.2.3 From 0993d1c5d3a1738d8aeef80d1d03d3189f5ca858 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 6 Feb 2011 16:13:14 +0000 Subject: FS#2067: fixed monospace font sizes --- lib/tpl/default/design.css | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index 42f9f622e..1fdf2bfac 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -85,8 +85,10 @@ div.dokuwiki fieldset { } div.dokuwiki textarea.edit { - font-family: monospace; - font-size: 14px; + font-family: monospace, serif; + /* second generic font fixes problem with font-size, see + http://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/ */ + font-size: 100%; color: __text__; background-color: __background__; border: 1px solid __border__; @@ -464,9 +466,14 @@ div.dokuwiki blockquote { padding-left: 3px; } +div.dokuwiki pre, +div.dokuwiki code { + font-family: monospace, serif; + /* second generic font fixes problem with font-size, see + http://meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/ */ + font-size: 100%; +} div.dokuwiki pre { - font-family: monospace; - font-size: 120%; padding: 0.5em; border: 1px dashed __border__; color: __text__; @@ -519,11 +526,6 @@ div.dokuwiki dl.file dt { } -/* inline code words */ -div.dokuwiki code { - font-size: 120%; -} - /* inline tables */ div.dokuwiki table.inline { background-color: __background__; -- cgit v1.2.3 From 9f881d099df700f068e5cc014d089dd9639db731 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 6 Feb 2011 16:47:38 +0100 Subject: Only remove the indexer lock when there is really a stale lock Previously the rmdir could be executed when the lock directory had been deleted by another indexer already. This could lead to a race condition when another indexer call creates the lock again between the if and the rmdir. This issue still exists for stale lock directories but they normally shouldn't exist. This also prevents the loop from becoming an endless loop when the lock directory can't be created. This change also fixes a syntax error in the indexer and prevents an endless loop when the lock directory exists but can't be deleted. --- lib/exe/indexer.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 010ca7987..0042e92d2 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -153,11 +153,15 @@ function runIndexer(){ $lock = $conf['lockdir'].'/_indexer.lock'; while(!@mkdir($lock,$conf['dmode'])){ usleep(50); - if(time()-@filemtime($lock) > 60*5){ + if(is_dir($lock) && time()-@filemtime($lock) > 60*5){ // looks like a stale lock - remove it - @rmdir($lock); - print "runIndexer(): stale lock removed".NL; - }elseif($run++ = 1000){ + if (!@rmdir($lock)) { + print "runIndexer(): removing the stale lock failed".NL; + return false; + } else { + print "runIndexer(): stale lock removed".NL; + } + }elseif($run++ == 1000){ // we waited 5 seconds for that lock print "runIndexer(): indexer locked".NL; return false; -- cgit v1.2.3 From 7441e340554a7a982047997cf61f72adaefacc99 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 6 Feb 2011 18:00:12 +0100 Subject: apply cleanUser and cleanGroup in user manager FS#1859 --- lib/plugins/usermanager/admin.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index df13f65e3..e40ee9b7e 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -562,16 +562,19 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { * @return array(user, password, full name, email, array(groups)) */ function _retrieveUser($clean=true) { + global $auth; - $user[0] = ($clean) ? cleanID(preg_replace('/.*:/','',$_REQUEST['userid'])) : $_REQUEST['userid']; + $user[0] = ($clean) ? $auth->cleanUser($_REQUEST['userid']) : $_REQUEST['userid']; $user[1] = $_REQUEST['userpass']; $user[2] = $_REQUEST['username']; $user[3] = $_REQUEST['usermail']; - $user[4] = preg_split('/\s*,\s*/',$_REQUEST['usergroups'],-1,PREG_SPLIT_NO_EMPTY); + $user[4] = explode(',',$_REQUEST['usergroups']); - if (empty($user[4]) || (is_array($user[4]) && (count($user[4]) == 1) && (trim($user[4][0]) == ''))) { - $user[4] = null; - } + $user[4] = array_map('trim',$user[4]); + if($clean) $user[4] = array_map(array($auth,'cleanGroup'),$user[4]); + $user[4] = array_filter($user[4]); + $user[4] = array_unique($user[4]); + if(!count($user[4])) $user[4] = null; return $user; } -- cgit v1.2.3 From e8188911ccbdab0473f7deef630d2083fd8fe44a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 6 Feb 2011 18:11:50 +0100 Subject: hide security check image if everything is alright --- inc/html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index 3afa4862f..c91888494 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1443,7 +1443,8 @@ function html_admin(){ // @todo: could be checked and only displayed if $conf['savedir'] is under the web root echo ' - Broken image? Everything\'s alright!'; + Your data directory seems to be protected properly.'; print p_locale_xhtml('admin'); -- cgit v1.2.3 From 412b5df14aaa2104af3d82e77380c5321cd94389 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 6 Feb 2011 18:36:24 +0100 Subject: Prevent infinite loop in the subscription lock There is no reason why the subscription should wait for other calls because the lock is only for one page so once the other call has finished the work has already been done. This simplifies the lock mechanism so there is no more loop. --- inc/subscription.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/inc/subscription.php b/inc/subscription.php index 1b5476553..8e3a99a8f 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -50,18 +50,19 @@ function subscription_lock_filename ($id){ } function subscription_lock($id) { - // FIXME merge this with the indexer lock generation, abstract out global $conf; $lock = subscription_lock_filename($id); - while(!@mkdir($lock,$conf['dmode'])){ - usleep(50); - if(time()-@filemtime($lock) > 60*5){ - // looks like a stale lock - remove it - @rmdir($lock); - }else{ - return false; - } + + if (is_dir($lock) && time()-@filemtime($lock) > 60*5) { + // looks like a stale lock - remove it + @rmdir($lock); } + + // try creating the lock directory + if (!@mkdir($lock,$conf['dmode'])) { + return false; + } + if($conf['dperm']) chmod($lock, $conf['dperm']); return true; } -- cgit v1.2.3 From 4f0030dd466f56b3dc0c864656fb1bf0e76d2932 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 6 Feb 2011 19:07:31 +0100 Subject: ignore soft-hyphens for search FS#2049 This makes it possible to find words that include soft-hyphens. However, search higlighting will not work and I have no idea how to make it work. --- doku.php | 1 + inc/fulltext.php | 1 + inc/indexer.php | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doku.php b/doku.php index 6cd0c0e0c..dc5e0ec66 100644 --- a/doku.php +++ b/doku.php @@ -27,6 +27,7 @@ if (isset($_SERVER['HTTP_X_DOKUWIKI_DO'])){ require_once(DOKU_INC.'inc/init.php'); //import variables +$_REQUEST['id'] = str_replace("\xC2\xAD",'',$_REQUEST['id']); //soft-hyphen $QUERY = trim($_REQUEST['id']); $ID = getID(); diff --git a/inc/fulltext.php b/inc/fulltext.php index be3938cac..0f2414213 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -304,6 +304,7 @@ function ft_pagesorter($a, $b){ */ function ft_snippet($id,$highlight){ $text = rawWiki($id); + $text = str_replace("\xC2\xAD",'',$text); // remove soft-hyphens $evdata = array( 'id' => $id, 'text' => &$text, diff --git a/inc/indexer.php b/inc/indexer.php index 9cf079261..526c8db05 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -221,7 +221,14 @@ function idx_getPageWords($page){ list($page,$body) = $data; - $body = strtr($body, "\r\n\t", ' '); + $body = strtr($body, + array( + "\r" => ' ', + "\n" => ' ', + "\t" => ' ', + "\xC2\xAD" => '', //soft-hyphen + ) + ); $tokens = explode(' ', $body); $tokens = array_count_values($tokens); // count the frequency of each token -- cgit v1.2.3 From a8a3aa33b73d21c50ce7aa202a6eff90a5ffc588 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 6 Feb 2011 19:16:47 +0100 Subject: make hierarchical breadcrumb consistent on search FS#2078 A search equivalent to a new ID so it should show up in the bread crumbs. --- inc/template.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/inc/template.php b/inc/template.php index 828f64c85..7ac3437fb 100644 --- a/inc/template.php +++ b/inc/template.php @@ -739,12 +739,6 @@ function tpl_youarehere($sep=' » '){ $parts = explode(':', $ID); $count = count($parts); - if($GLOBALS['ACT'] == 'search') - { - $parts = array($conf['start']); - $count = 1; - } - echo ''.$lang['youarehere'].': '; // always print the startpage -- cgit v1.2.3 From b17e20ac9cca30b612968d02f06fa9c5df5c01f0 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 6 Feb 2011 18:54:38 +0000 Subject: merged branch 'danny0838:rewrite_block' and resolved conflict --- inc/parser/handler.php | 241 +++++++++++++++--------------------------------- inc/parser/metadata.php | 8 +- inc/parser/xhtml.php | 2 +- 3 files changed, 78 insertions(+), 173 deletions(-) diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 85a353dca..26a560c3c 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -1433,14 +1433,8 @@ class Doku_Handler_Table { * @author Harry Fuecks */ class Doku_Handler_Block { - var $calls = array(); - - var $blockStack = array(); - - var $inParagraph = false; - var $atStart = true; - var $skipEolKey = -1; + var $skipEol = false; // Blocks these should not be inside paragraphs var $blockOpen = array( @@ -1448,9 +1442,9 @@ class Doku_Handler_Block { 'listu_open','listo_open','listitem_open','listcontent_open', 'table_open','tablerow_open','tablecell_open','tableheader_open', 'quote_open', - 'section_open', // Needed to prevent p_open between header and section_open 'code','file','hr','preformatted','rss', 'htmlblock','phpblock', + 'footnote_open', ); var $blockClose = array( @@ -1458,18 +1452,18 @@ class Doku_Handler_Block { 'listu_close','listo_close','listitem_close','listcontent_close', 'table_close','tablerow_close','tablecell_close','tableheader_close', 'quote_close', - 'section_close', // Needed to prevent p_close after section_close 'code','file','hr','preformatted','rss', 'htmlblock','phpblock', + 'footnote_close', ); // Stacks can contain paragraphs var $stackOpen = array( - 'footnote_open','section_open', + 'section_open', ); var $stackClose = array( - 'footnote_close','section_close', + 'section_close', ); @@ -1495,6 +1489,13 @@ class Doku_Handler_Block { } } + function openParagraph($pos){ + if ($this->inParagraph) return; + $this->calls[] = array('p_open',array(), $pos); + $this->inParagraph = true; + $this->skipEol = true; + } + /** * Close a paragraph if needed * @@ -1503,6 +1504,7 @@ class Doku_Handler_Block { * @author Andreas Gohr */ function closeParagraph($pos){ + if (!$this->inParagraph) return; // look back if there was any content - we don't want empty paragraphs $content = ''; for($i=count($this->calls)-1; $i>=0; $i--){ @@ -1520,10 +1522,28 @@ class Doku_Handler_Block { //remove the whole paragraph array_splice($this->calls,$i); }else{ + // remove ending linebreaks in the paragraph + $i=count($this->calls)-1; + if ($this->calls[$i][0] == 'cdata') $this->calls[$i][1][0] = rtrim($this->calls[$i][1][0],DOKU_PARSER_EOL); $this->calls[] = array('p_close',array(), $pos); } $this->inParagraph = false; + $this->skipEol = true; + } + + function addCall($call) { + $key = count($this->calls); + if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { + $this->calls[$key-1][1][0] .= $call[1][0]; + } else { + $this->calls[] = $call; + } + } + + // simple version of addCall, without checking cdata + function storeCall($call) { + $this->calls[] = $call; } /** @@ -1531,186 +1551,71 @@ class Doku_Handler_Block { * * @author Harry Fuecks * @author Andreas Gohr - * @todo This thing is really messy and should be rewritten */ function process($calls) { + // open first paragraph + $this->openParagraph(0); foreach ( $calls as $key => $call ) { $cname = $call[0]; - if($cname == 'plugin') { + if ($cname == 'plugin') { $cname='plugin_'.$call[1][0]; - $plugin = true; $plugin_open = (($call[1][2] == DOKU_LEXER_ENTER) || ($call[1][2] == DOKU_LEXER_SPECIAL)); $plugin_close = (($call[1][2] == DOKU_LEXER_EXIT) || ($call[1][2] == DOKU_LEXER_SPECIAL)); } else { $plugin = false; } - - // Process blocks which are stack like... (contain linefeeds) + /* stack */ + if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) { + $this->closeParagraph($call[2]); + $this->storeCall($call); + $this->openParagraph($call[2]); + continue; + } if ( in_array($cname,$this->stackOpen ) && (!$plugin || $plugin_open) ) { - - // Hack - footnotes shouldn't immediately contain a p_open - if ($this->addToStack($cname != 'footnote_open')) { - $this->closeParagraph($call[2]); - } - $this->calls[] = $call; - + $this->closeParagraph($call[2]); + $this->storeCall($call); + $this->openParagraph($call[2]); continue; } - - if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) { - - if ( $this->inParagraph ) { - $this->closeParagraph($call[2]); - } - $this->calls[] = $call; - if ($this->removeFromStack()) { - $this->calls[] = array('p_open',array(), $call[2]); - } + /* block */ + // If it's a substition it opens and closes at the same call. + // To make sure next paragraph is correctly started, let close go first. + if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { + $this->closeParagraph($call[2]); + $this->storeCall($call); + $this->openParagraph($call[2]); continue; } - - if ( !$this->atStart ) { - - if ( $cname == 'eol' ) { - - // Check this isn't an eol instruction to skip... - if ( $this->skipEolKey != $key ) { - // Look to see if the next instruction is an EOL - if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { - - if ( $this->inParagraph ) { - //$this->calls[] = array('p_close',array(), $call[2]); - $this->closeParagraph($call[2]); - } - - $this->calls[] = array('p_open',array(), $call[2]); - $this->inParagraph = true; - - - // Mark the next instruction for skipping - $this->skipEolKey = $key+1; - - }else{ - //if this is just a single eol make a space from it - $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); - } - } - - - } else { - - $storeCall = true; - if ( $this->inParagraph && (in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open))) { + if ( in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open)) { + $this->closeParagraph($call[2]); + $this->storeCall($call); + continue; + } + /* eol */ + if ( $cname == 'eol' ) { + // Check this isn't an eol instruction to skip... + if ( !$this->skipEol ) { + // Next is EOL => double eol => mark as paragraph + if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { $this->closeParagraph($call[2]); - $this->calls[] = $call; - $storeCall = false; - } - - if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { - if ( $this->inParagraph ) { - $this->closeParagraph($call[2]); - } - if ( $storeCall ) { - $this->calls[] = $call; - $storeCall = false; - } - - // This really sucks and suggests this whole class sucks but... - if ( isset($calls[$key+1])) { - $cname_plusone = $calls[$key+1][0]; - if ($cname_plusone == 'plugin') { - $cname_plusone = 'plugin'.$calls[$key+1][1][0]; - - // plugin test, true if plugin has a state which precludes it requiring blockOpen or blockClose - $plugin_plusone = true; - $plugin_test = ($call[$key+1][1][2] == DOKU_LEXER_MATCHED) || ($call[$key+1][1][2] == DOKU_LEXER_MATCHED); - } else { - $plugin_plusone = false; - } - if ((!in_array($cname_plusone, $this->blockOpen) && !in_array($cname_plusone, $this->blockClose)) || - ($plugin_plusone && $plugin_test) - ) { - - $this->calls[] = array('p_open',array(), $call[2]); - $this->inParagraph = true; - } - } - } - - if ( $storeCall ) { - $this->addCall($call); - } - - } - - - } else { - - // Unless there's already a block at the start, start a paragraph - if ( !in_array($cname,$this->blockOpen) ) { - $this->calls[] = array('p_open',array(), $call[2]); - if ( $call[0] != 'eol' ) { - $this->calls[] = $call; + $this->openParagraph($call[2]); + } else { + //if this is just a single eol make a space from it + $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); } - $this->atStart = false; - $this->inParagraph = true; - } else { - $this->addCall($call); - $this->atStart = false; } - - } - - } - - if ( $this->inParagraph ) { - if ( $cname == 'p_open' ) { - // Ditch the last call - array_pop($this->calls); - } else if ( !in_array($cname, $this->blockClose) ) { - //$this->calls[] = array('p_close',array(), $call[2]); - $this->closeParagraph($call[2]); - } else { - $last_call = array_pop($this->calls); - //$this->calls[] = array('p_close',array(), $call[2]); - $this->closeParagraph($call[2]); - $this->calls[] = $last_call; + continue; } + /* normal */ + $this->addCall($call); + $this->skipEol = false; } - + // close last paragraph + $call = end($this->calls); + $this->closeParagraph($call[2]); return $this->calls; } - - /** - * - * @return bool true when a p_close() is required - */ - function addToStack($newStart = true) { - $ret = $this->inParagraph; - $this->blockStack[] = array($this->atStart, $this->inParagraph); - $this->atStart = $newStart; - $this->inParagraph = false; - - return $ret; - } - - function removeFromStack() { - $state = array_pop($this->blockStack); - $this->atStart = $state[0]; - $this->inParagraph = $state[1]; - - return $this->inParagraph; - } - - function addCall($call) { - $key = count($this->calls); - if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { - $this->calls[$key-1][1][0] .= $call[1][0]; - } else { - $this->calls[] = $call; - } - } } //Setup VIM: ex: et ts=4 : diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index fc2c8cbc5..bd396e2b4 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -455,16 +455,16 @@ class Doku_Renderer_metadata extends Doku_Renderer { global $conf; $isImage = false; - if (is_null($title)){ + if (is_array($title)){ + if($title['title']) return '['.$title['title'].']'; + } else if (is_null($title) || trim($title)==''){ if (useHeading('content') && $id){ $heading = p_get_first_heading($id,false); if ($heading) return $heading; } return $default; - } else if (is_string($title)){ + } else { return $title; - } else if (is_array($title)){ - if($title['title']) return '['.$title['title'].']'; } } diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 9405d9420..b502b4f6b 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -29,7 +29,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { var $doc = ''; // will contain the whole document var $toc = array(); // will contain the Table of Contents - private $sectionedits = array(); // A stack of section edit data + var $sectionedits = array(); // A stack of section edit data var $headers = array(); var $footnotes = array(); -- cgit v1.2.3 From c45608df2e8efbaeb1b4c29d87b976c0e6366ad1 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sun, 6 Feb 2011 19:59:37 +0100 Subject: Honor conf[pluginmanager] again (closes FS#1856) --- inc/plugincontroller.class.php | 5 ++++- lib/plugins/plugin/admin.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index ad394e11f..6e361e172 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -125,6 +125,7 @@ class Doku_Plugin_Controller { } function _populateMasterList() { + global $conf; if ($dh = opendir(DOKU_PLUGIN)) { while (false !== ($plugin = readdir($dh))) { if ($plugin[0] == '.') continue; // skip hidden entries @@ -134,7 +135,9 @@ class Doku_Plugin_Controller { // the plugin was disabled by rc2009-01-26 // disabling mechanism was changed back very soon again // to keep everything simple we just skip the plugin completely - }elseif(@file_exists(DOKU_PLUGIN.$plugin.'/disabled')){ + }elseif(@file_exists(DOKU_PLUGIN.$plugin.'/disabled') || + ($plugin === 'plugin' && isset($conf['pluginmanager']) && + !$conf['pluginmanager'])){ $this->list_disabled[] = $plugin; } else { $this->list_enabled[] = $plugin; diff --git a/lib/plugins/plugin/admin.php b/lib/plugins/plugin/admin.php index c662b565a..b2108f185 100644 --- a/lib/plugins/plugin/admin.php +++ b/lib/plugins/plugin/admin.php @@ -44,7 +44,7 @@ class admin_plugin_plugin extends DokuWiki_Admin_Plugin { function admin_plugin_plugin() { global $conf; - $this->disabled = (isset($conf['pluginmanager']) && ($conf['pluginmanager'] == 0)); + $this->disabled = plugin_isdisabled('plugin'); } /** -- cgit v1.2.3 From 14739a206f851219daa577abdfd7489d86b0072b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 6 Feb 2011 20:28:39 +0100 Subject: Revert "merged branch 'danny0838:rewrite_block' and resolved conflict" Anika's merge did not pul in the individual patches as one would expect. Then I messed up when trying to fix this by merging with danny's repo again but used the wrong branch. So we're still missing two patches. To have them apply cleanly I have to revert Anika's merge here. Another merge for the missing two patches will follow. This reverts commit b17e20ac9cca30b612968d02f06fa9c5df5c01f0. --- inc/parser/handler.php | 241 +++++++++++++++++++++++++++++++++--------------- inc/parser/metadata.php | 8 +- inc/parser/xhtml.php | 2 +- 3 files changed, 173 insertions(+), 78 deletions(-) diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 26a560c3c..85a353dca 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -1433,8 +1433,14 @@ class Doku_Handler_Table { * @author Harry Fuecks */ class Doku_Handler_Block { + var $calls = array(); - var $skipEol = false; + + var $blockStack = array(); + + var $inParagraph = false; + var $atStart = true; + var $skipEolKey = -1; // Blocks these should not be inside paragraphs var $blockOpen = array( @@ -1442,9 +1448,9 @@ class Doku_Handler_Block { 'listu_open','listo_open','listitem_open','listcontent_open', 'table_open','tablerow_open','tablecell_open','tableheader_open', 'quote_open', + 'section_open', // Needed to prevent p_open between header and section_open 'code','file','hr','preformatted','rss', 'htmlblock','phpblock', - 'footnote_open', ); var $blockClose = array( @@ -1452,18 +1458,18 @@ class Doku_Handler_Block { 'listu_close','listo_close','listitem_close','listcontent_close', 'table_close','tablerow_close','tablecell_close','tableheader_close', 'quote_close', + 'section_close', // Needed to prevent p_close after section_close 'code','file','hr','preformatted','rss', 'htmlblock','phpblock', - 'footnote_close', ); // Stacks can contain paragraphs var $stackOpen = array( - 'section_open', + 'footnote_open','section_open', ); var $stackClose = array( - 'section_close', + 'footnote_close','section_close', ); @@ -1489,13 +1495,6 @@ class Doku_Handler_Block { } } - function openParagraph($pos){ - if ($this->inParagraph) return; - $this->calls[] = array('p_open',array(), $pos); - $this->inParagraph = true; - $this->skipEol = true; - } - /** * Close a paragraph if needed * @@ -1504,7 +1503,6 @@ class Doku_Handler_Block { * @author Andreas Gohr */ function closeParagraph($pos){ - if (!$this->inParagraph) return; // look back if there was any content - we don't want empty paragraphs $content = ''; for($i=count($this->calls)-1; $i>=0; $i--){ @@ -1522,28 +1520,10 @@ class Doku_Handler_Block { //remove the whole paragraph array_splice($this->calls,$i); }else{ - // remove ending linebreaks in the paragraph - $i=count($this->calls)-1; - if ($this->calls[$i][0] == 'cdata') $this->calls[$i][1][0] = rtrim($this->calls[$i][1][0],DOKU_PARSER_EOL); $this->calls[] = array('p_close',array(), $pos); } $this->inParagraph = false; - $this->skipEol = true; - } - - function addCall($call) { - $key = count($this->calls); - if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { - $this->calls[$key-1][1][0] .= $call[1][0]; - } else { - $this->calls[] = $call; - } - } - - // simple version of addCall, without checking cdata - function storeCall($call) { - $this->calls[] = $call; } /** @@ -1551,71 +1531,186 @@ class Doku_Handler_Block { * * @author Harry Fuecks * @author Andreas Gohr + * @todo This thing is really messy and should be rewritten */ function process($calls) { - // open first paragraph - $this->openParagraph(0); foreach ( $calls as $key => $call ) { $cname = $call[0]; - if ($cname == 'plugin') { + if($cname == 'plugin') { $cname='plugin_'.$call[1][0]; + $plugin = true; $plugin_open = (($call[1][2] == DOKU_LEXER_ENTER) || ($call[1][2] == DOKU_LEXER_SPECIAL)); $plugin_close = (($call[1][2] == DOKU_LEXER_EXIT) || ($call[1][2] == DOKU_LEXER_SPECIAL)); } else { $plugin = false; } - /* stack */ - if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) { - $this->closeParagraph($call[2]); - $this->storeCall($call); - $this->openParagraph($call[2]); - continue; - } + + // Process blocks which are stack like... (contain linefeeds) if ( in_array($cname,$this->stackOpen ) && (!$plugin || $plugin_open) ) { - $this->closeParagraph($call[2]); - $this->storeCall($call); - $this->openParagraph($call[2]); - continue; - } - /* block */ - // If it's a substition it opens and closes at the same call. - // To make sure next paragraph is correctly started, let close go first. - if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { - $this->closeParagraph($call[2]); - $this->storeCall($call); - $this->openParagraph($call[2]); + + // Hack - footnotes shouldn't immediately contain a p_open + if ($this->addToStack($cname != 'footnote_open')) { + $this->closeParagraph($call[2]); + } + $this->calls[] = $call; + continue; } - if ( in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open)) { - $this->closeParagraph($call[2]); - $this->storeCall($call); + + if ( in_array($cname,$this->stackClose ) && (!$plugin || $plugin_close)) { + + if ( $this->inParagraph ) { + $this->closeParagraph($call[2]); + } + $this->calls[] = $call; + if ($this->removeFromStack()) { + $this->calls[] = array('p_open',array(), $call[2]); + } continue; } - /* eol */ - if ( $cname == 'eol' ) { - // Check this isn't an eol instruction to skip... - if ( !$this->skipEol ) { - // Next is EOL => double eol => mark as paragraph - if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { + + if ( !$this->atStart ) { + + if ( $cname == 'eol' ) { + + // Check this isn't an eol instruction to skip... + if ( $this->skipEolKey != $key ) { + // Look to see if the next instruction is an EOL + if ( isset($calls[$key+1]) && $calls[$key+1][0] == 'eol' ) { + + if ( $this->inParagraph ) { + //$this->calls[] = array('p_close',array(), $call[2]); + $this->closeParagraph($call[2]); + } + + $this->calls[] = array('p_open',array(), $call[2]); + $this->inParagraph = true; + + + // Mark the next instruction for skipping + $this->skipEolKey = $key+1; + + }else{ + //if this is just a single eol make a space from it + $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); + } + } + + + } else { + + $storeCall = true; + if ( $this->inParagraph && (in_array($cname, $this->blockOpen) && (!$plugin || $plugin_open))) { $this->closeParagraph($call[2]); - $this->openParagraph($call[2]); - } else { - //if this is just a single eol make a space from it - $this->addCall(array('cdata',array(DOKU_PARSER_EOL), $call[2])); + $this->calls[] = $call; + $storeCall = false; } + + if ( in_array($cname, $this->blockClose) && (!$plugin || $plugin_close)) { + if ( $this->inParagraph ) { + $this->closeParagraph($call[2]); + } + if ( $storeCall ) { + $this->calls[] = $call; + $storeCall = false; + } + + // This really sucks and suggests this whole class sucks but... + if ( isset($calls[$key+1])) { + $cname_plusone = $calls[$key+1][0]; + if ($cname_plusone == 'plugin') { + $cname_plusone = 'plugin'.$calls[$key+1][1][0]; + + // plugin test, true if plugin has a state which precludes it requiring blockOpen or blockClose + $plugin_plusone = true; + $plugin_test = ($call[$key+1][1][2] == DOKU_LEXER_MATCHED) || ($call[$key+1][1][2] == DOKU_LEXER_MATCHED); + } else { + $plugin_plusone = false; + } + if ((!in_array($cname_plusone, $this->blockOpen) && !in_array($cname_plusone, $this->blockClose)) || + ($plugin_plusone && $plugin_test) + ) { + + $this->calls[] = array('p_open',array(), $call[2]); + $this->inParagraph = true; + } + } + } + + if ( $storeCall ) { + $this->addCall($call); + } + } - continue; + + + } else { + + // Unless there's already a block at the start, start a paragraph + if ( !in_array($cname,$this->blockOpen) ) { + $this->calls[] = array('p_open',array(), $call[2]); + if ( $call[0] != 'eol' ) { + $this->calls[] = $call; + } + $this->atStart = false; + $this->inParagraph = true; + } else { + $this->addCall($call); + $this->atStart = false; + } + } - /* normal */ - $this->addCall($call); - $this->skipEol = false; + } - // close last paragraph - $call = end($this->calls); - $this->closeParagraph($call[2]); + + if ( $this->inParagraph ) { + if ( $cname == 'p_open' ) { + // Ditch the last call + array_pop($this->calls); + } else if ( !in_array($cname, $this->blockClose) ) { + //$this->calls[] = array('p_close',array(), $call[2]); + $this->closeParagraph($call[2]); + } else { + $last_call = array_pop($this->calls); + //$this->calls[] = array('p_close',array(), $call[2]); + $this->closeParagraph($call[2]); + $this->calls[] = $last_call; + } + } + return $this->calls; } + + /** + * + * @return bool true when a p_close() is required + */ + function addToStack($newStart = true) { + $ret = $this->inParagraph; + $this->blockStack[] = array($this->atStart, $this->inParagraph); + $this->atStart = $newStart; + $this->inParagraph = false; + + return $ret; + } + + function removeFromStack() { + $state = array_pop($this->blockStack); + $this->atStart = $state[0]; + $this->inParagraph = $state[1]; + + return $this->inParagraph; + } + + function addCall($call) { + $key = count($this->calls); + if ($key and ($call[0] == 'cdata') and ($this->calls[$key-1][0] == 'cdata')) { + $this->calls[$key-1][1][0] .= $call[1][0]; + } else { + $this->calls[] = $call; + } + } } //Setup VIM: ex: et ts=4 : diff --git a/inc/parser/metadata.php b/inc/parser/metadata.php index bd396e2b4..fc2c8cbc5 100644 --- a/inc/parser/metadata.php +++ b/inc/parser/metadata.php @@ -455,16 +455,16 @@ class Doku_Renderer_metadata extends Doku_Renderer { global $conf; $isImage = false; - if (is_array($title)){ - if($title['title']) return '['.$title['title'].']'; - } else if (is_null($title) || trim($title)==''){ + if (is_null($title)){ if (useHeading('content') && $id){ $heading = p_get_first_heading($id,false); if ($heading) return $heading; } return $default; - } else { + } else if (is_string($title)){ return $title; + } else if (is_array($title)){ + if($title['title']) return '['.$title['title'].']'; } } diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index b502b4f6b..9405d9420 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -29,7 +29,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { var $doc = ''; // will contain the whole document var $toc = array(); // will contain the Table of Contents - var $sectionedits = array(); // A stack of section edit data + private $sectionedits = array(); // A stack of section edit data var $headers = array(); var $footnotes = array(); -- cgit v1.2.3 From 999913b8ccbcd63a3bc3d3350c8eb9a17bcdf305 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 6 Feb 2011 20:38:08 +0100 Subject: no final comma in class members or IE craps out --- lib/scripts/locktimer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scripts/locktimer.js b/lib/scripts/locktimer.js index 51d533056..f5ba1c60d 100644 --- a/lib/scripts/locktimer.js +++ b/lib/scripts/locktimer.js @@ -94,6 +94,6 @@ var locktimer = { $('draft__status').innerHTML=data; if(error != '1') return; // locking failed locktimer.reset(); - }, + } }; -- cgit v1.2.3 From 4c5a5d3dd4fcc2636b2861f06d52a2ac32ad5544 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 6 Feb 2011 20:41:58 +0100 Subject: JS: Add style helper and fix footnotes in non-static containers --- lib/scripts/script.js | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/lib/scripts/script.js b/lib/scripts/script.js index b9b324f96..2cc1246f9 100644 --- a/lib/scripts/script.js +++ b/lib/scripts/script.js @@ -113,6 +113,20 @@ function findPosY(object){ return curtop; } //end findPosY function +/** + * Get the computed style of a node. + * + * @link https://acidmartin.wordpress.com/2008/08/26/style-get-any-css-property-value-of-an-object/ + * @link http://svn.dojotoolkit.org/src/dojo/trunk/_base/html.js + */ +function gcs(node){ + if(node.currentStyle){ + return node.currentStyle; + }else{ + return node.ownerDocument.defaultView.getComputedStyle(node, null); + } +} + /** * Escape special chars in JavaScript * @@ -260,10 +274,32 @@ function insitu_popup(target, popup_id) { getElementsByClass('dokuwiki', document.body, 'div')[0].appendChild(fndiv); } + var non_static_parent = fndiv.parentNode; + while (non_static_parent != document && gcs(non_static_parent)['position'] == 'static') { + non_static_parent = non_static_parent.parentNode; + } + + var fixed_target_parent = target; + while (fixed_target_parent != document && gcs(fixed_target_parent)['position'] != 'fixed') { + fixed_target_parent = fixed_target_parent.parentNode; + } + // position the div and make it visible - fndiv.style.position = 'absolute'; - fndiv.style.left = findPosX(target)+'px'; - fndiv.style.top = (findPosY(target)+target.offsetHeight * 1.5) + 'px'; + if (fixed_target_parent != document) { + // the target has position fixed, that means the footnote needs to be fixed, too + fndiv.style.position = 'fixed'; + } else { + fndiv.style.position = 'absolute'; + } + + if (fixed_target_parent != document || non_static_parent == document) { + fndiv.style.left = findPosX(target)+'px'; + fndiv.style.top = (findPosY(target)+target.offsetHeight * 1.5) + 'px'; + } else { + fndiv.style.left = (findPosX(target) - findPosX(non_static_parent)) +'px'; + fndiv.style.top = (findPosY(target)+target.offsetHeight * 1.5 - findPosY(non_static_parent)) + 'px'; + } + fndiv.style.display = ''; return fndiv; } -- cgit v1.2.3 From 1a6a1c042a16fc7ed8be4d870dbf32d60c05560b Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 6 Feb 2011 20:50:58 +0100 Subject: Revert "use CRLF in quoted printable encoding FS#1755" This research suggests that, the change does not help, but in fact breaks previoulsy working setups: https://bugs.dokuwiki.org/index.php?do=details&task_id=1755#comment3446 I'm still at loss on how to fix this bug. This reverts commit 2ae68f97446ff6bae5fbbe463eb00312598be840. --- inc/mail.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inc/mail.php b/inc/mail.php index aa9d195d1..c45a7c57e 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -11,7 +11,6 @@ if(!defined('DOKU_INC')) die('meh.'); // end of line for mail lines - RFC822 says CRLF but postfix (and other MTAs?) // think different if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n"); -if(!defined('QUOTEDPRINTABLE_EOL')) define('QUOTEDPRINTABLE_EOL',"\015\012"); #define('MAILHEADER_ASCIIONLY',1); /** @@ -290,11 +289,11 @@ function mail_quotedprintable_encode($sText,$maxlen=74,$bEmulate_imap_8bit=true) // but this wouldn't be caught by such an easy RegExp if($maxlen){ preg_match_all( '/.{1,'.($maxlen - 2).'}([^=]{0,2})?/', $sLine, $aMatch ); - $sLine = implode( '=' . QUOTEDPRINTABLE_EOL, $aMatch[0] ); // add soft crlf's + $sLine = implode( '=' . MAILHEADER_EOL, $aMatch[0] ); // add soft crlf's } } // join lines into text - return implode(QUOTEDPRINTABLE_EOL,$aLines); + return implode(MAILHEADER_EOL,$aLines); } -- cgit v1.2.3 From cca94fbcfc035dabe5597e8565671c84862268e9 Mon Sep 17 00:00:00 2001 From: Roland Hager Date: Sun, 6 Feb 2011 19:57:16 +0000 Subject: made config cascade more flexible --- inc/config_cascade.php | 5 ++++- inc/init.php | 9 ++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/inc/config_cascade.php b/inc/config_cascade.php index 3ae68a000..32001be81 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -5,7 +5,8 @@ * This array configures the default locations of various files in the * DokuWiki directory hierarchy. It can be overriden in inc/preload.php */ -$config_cascade = array( +$config_cascade = array_merge( + array( 'main' => array( 'default' => array(DOKU_CONF.'dokuwiki.php'), 'local' => array(DOKU_CONF.'local.php'), @@ -62,5 +63,7 @@ $config_cascade = array( 'plainauth.users' => array( 'default' => DOKU_CONF.'users.auth.php', ), + ), + $config_cascade ); diff --git a/inc/init.php b/inc/init.php index 6f4ba1ca9..d632bd8f8 100644 --- a/inc/init.php +++ b/inc/init.php @@ -11,7 +11,7 @@ function delta_time($start=0) { define('DOKU_START_TIME', delta_time()); global $config_cascade; -$config_cascade = ''; +$config_cascade = array(); // if available load a preload config file $preload = fullpath(dirname(__FILE__)).'/preload.php'; @@ -52,10 +52,9 @@ global $cache_authname; global $cache_metadata; $cache_metadata = array(); -//set the configuration cascade - but only if its not already been set in preload.php -if (empty($config_cascade)) { - include(DOKU_INC.'inc/config_cascade.php'); -} +// always include 'inc/config_cascade.php' +// previously in preload.php set fields of $config_cascade will be merged with the defaults +include(DOKU_INC.'inc/config_cascade.php'); //prepare config array() global $conf; -- cgit v1.2.3 From 28ac81641d6db55bfadc51abf2ff97157c3cfdf4 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 7 Feb 2011 22:24:54 +0100 Subject: added one of the most important smileys --- conf/smileys.conf | 1 + lib/images/smileys/facepalm.gif | Bin 0 -> 185 bytes 2 files changed, 1 insertion(+) create mode 100644 lib/images/smileys/facepalm.gif diff --git a/conf/smileys.conf b/conf/smileys.conf index 47e4537e2..5ff230e60 100644 --- a/conf/smileys.conf +++ b/conf/smileys.conf @@ -18,6 +18,7 @@ :-X icon_silenced.gif :-| icon_neutral.gif ;-) icon_wink.gif +m) facepalm.gif ^_^ icon_fun.gif :?: icon_question.gif :!: icon_exclaim.gif diff --git a/lib/images/smileys/facepalm.gif b/lib/images/smileys/facepalm.gif new file mode 100644 index 000000000..4ce005e63 Binary files /dev/null and b/lib/images/smileys/facepalm.gif differ -- cgit v1.2.3 From 3d7ac595bb629f3ee3bf26cefe9309e1d20d4470 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 7 Feb 2011 23:23:32 +0100 Subject: Fix namespace template loading (load $data['tplfile'] instead of $data['tpl']) --- inc/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/common.php b/inc/common.php index 23d9c7155..ac7ddd653 100644 --- a/inc/common.php +++ b/inc/common.php @@ -843,7 +843,7 @@ function pageTemplate($id){ } } // load the content - $data['tpl'] = io_readFile($data['tpl']); + $data['tpl'] = io_readFile($data['tplfile']); } if($data['doreplace']) parsePageTemplate(&$data); } -- cgit v1.2.3 From 714260d8366708d8d89e6d244980bc2cd6f9c2dc Mon Sep 17 00:00:00 2001 From: Georgios Petsagourakis Date: Mon, 7 Feb 2011 23:48:50 +0100 Subject: Greek language update --- inc/lang/el/lang.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index 83a869df0..aaf7f6421 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -159,6 +159,9 @@ $lang['yours'] = 'Η έκδοσή σας'; $lang['diff'] = 'προβολή διαφορών με την τρέχουσα έκδοση'; $lang['diff2'] = 'Προβολή διαφορών μεταξύ των επιλεγμένων εκδόσεων'; $lang['difflink'] = 'Σύνδεσμος σε αυτή την προβολή διαφορών.'; +$lang['diff_type'] = 'Προβολή διαφορών:'; +$lang['diff_inline'] = 'Σε σειρά'; +$lang['diff_side'] = 'Δίπλα-δίπλα'; $lang['line'] = 'Γραμμή'; $lang['breadcrumb'] = 'Ιστορικό'; $lang['youarehere'] = 'Είστε εδώ'; -- cgit v1.2.3 From 0411c186caeff3347eccfa98d5cacc280a356d20 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 8 Feb 2011 09:00:41 +0100 Subject: that smiley was far too happy --- conf/smileys.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/smileys.conf b/conf/smileys.conf index 5ff230e60..80daed57a 100644 --- a/conf/smileys.conf +++ b/conf/smileys.conf @@ -18,7 +18,7 @@ :-X icon_silenced.gif :-| icon_neutral.gif ;-) icon_wink.gif -m) facepalm.gif +m( facepalm.gif ^_^ icon_fun.gif :?: icon_question.gif :!: icon_exclaim.gif -- cgit v1.2.3 From f25fcf537e1a3223cce417ba01dc63d79b80a6f7 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Wed, 9 Feb 2011 11:14:09 +0100 Subject: Make the regex for internal links more restrictive This fixes a PCRE backtrack error that occurred on large pages like :users on dokuwiki.org. --- inc/parser/parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/parser/parser.php b/inc/parser/parser.php index a7764ee9c..e47ce56fa 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -828,7 +828,7 @@ class Doku_Parser_Mode_internallink extends Doku_Parser_Mode { function connectTo($mode) { // Word boundaries? - $this->Lexer->addSpecialPattern("\[\[(?:(?:.*?\[.*?\])|.+?)\]\]",$mode,'internallink'); + $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.+?)\]\]",$mode,'internallink'); } function getSort() { -- cgit v1.2.3 From 4a39d803480c4931547cd33821b07c3f6e292c15 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Wed, 9 Feb 2011 12:32:13 +0100 Subject: Fix test cases so they work with e7f59597d0b90f64f3479ebacc190717e067dc99 All linebreaks before p_close have been removed. --- _test/cases/inc/parser/parser_eol.test.php | 12 ++-- _test/cases/inc/parser/parser_footnote.test.php | 32 ++++----- _test/cases/inc/parser/parser_formatting.test.php | 48 ++++++------- _test/cases/inc/parser/parser_headers.test.php | 56 ++++++++-------- _test/cases/inc/parser/parser_i18n.test.php | 14 ++-- _test/cases/inc/parser/parser_links.test.php | 78 +++++++++++----------- _test/cases/inc/parser/parser_lists.test.php | 4 +- .../cases/inc/parser/parser_preformatted.test.php | 22 +++--- _test/cases/inc/parser/parser_quote.test.php | 6 +- _test/cases/inc/parser/parser_quotes.test.php | 28 ++++---- .../cases/inc/parser/parser_replacements.test.php | 42 ++++++------ _test/cases/inc/parser/parser_table.test.php | 28 ++++---- _test/cases/inc/parser/parser_unformatted.test.php | 4 +- 13 files changed, 187 insertions(+), 187 deletions(-) diff --git a/_test/cases/inc/parser/parser_eol.test.php b/_test/cases/inc/parser/parser_eol.test.php index 8d3a812b2..692882c6c 100644 --- a/_test/cases/inc/parser/parser_eol.test.php +++ b/_test/cases/inc/parser/parser_eol.test.php @@ -13,7 +13,7 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("Foo".DOKU_PARSER_EOL."Bar".DOKU_PARSER_EOL)), + array('cdata',array("Foo".DOKU_PARSER_EOL."Bar")), array('p_close',array()), array('document_end',array()), ); @@ -29,7 +29,7 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { array('cdata',array("Foo")), array('p_close',array()), array('p_open',array()), - array('cdata',array("bar".DOKU_PARSER_EOL."Foo".DOKU_PARSER_EOL)), + array('cdata',array("bar".DOKU_PARSER_EOL."Foo")), array('p_close',array()), array('document_end',array()), ); @@ -42,7 +42,7 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("Foo".DOKU_PARSER_EOL."Bar".DOKU_PARSER_EOL)), + array('cdata',array("Foo".DOKU_PARSER_EOL."Bar")), array('p_close',array()), array('document_end',array()), ); @@ -57,7 +57,7 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\nFoo")), array('linebreak',array()), - array('cdata',array("Bar\n")), + array('cdata',array("Bar")), array('p_close',array()), array('document_end',array()), ); @@ -76,7 +76,7 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { array('linebreak',array()), array('p_close',array()), array('p_open',array()), - array('cdata',array("Bar".DOKU_PARSER_EOL)), + array('cdata',array("Bar")), array('p_close',array()), array('document_end',array()), ); @@ -89,7 +89,7 @@ class TestOfDoku_Parser_Eol extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\n".'Foo\\\\Bar'."\n")), + array('cdata',array("\n".'Foo\\\\Bar')), array('p_close',array()), array('document_end',array()), ); diff --git a/_test/cases/inc/parser/parser_footnote.test.php b/_test/cases/inc/parser/parser_footnote.test.php index a1da2ab06..e3571d8e7 100644 --- a/_test/cases/inc/parser/parser_footnote.test.php +++ b/_test/cases/inc/parser/parser_footnote.test.php @@ -23,7 +23,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(' testing ')), array('footnote_close',array()), ))), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -35,7 +35,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nFoo (( testing\n Bar\n")), + array('cdata',array("\nFoo (( testing\n Bar")), array('p_close',array()), array('document_end',array()), ); @@ -54,7 +54,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(" testing\ntesting ")), array('footnote_close',array()), ))), - array('cdata',array(' Bar'.DOKU_PARSER_EOL)), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -72,7 +72,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(' x((y')), array('footnote_close',array()), ))), - array('cdata',array('z )) Bar'."\n")), + array('cdata',array('z )) Bar')), array('p_close',array()), array('document_end',array()), ); @@ -91,7 +91,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(" test\ning ")), array('footnote_close',array()), ))), - array('cdata',array('Y'.DOKU_PARSER_EOL.' Bar'.DOKU_PARSER_EOL)), + array('cdata',array('Y'.DOKU_PARSER_EOL.' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -114,7 +114,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(' ')), array('footnote_close',array()), ))), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -135,7 +135,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array("\n ")), array('footnote_close',array()), ))), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -156,7 +156,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(' ')), array('footnote_close',array()), ))), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -177,7 +177,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(' ')), array('footnote_close',array()), ))), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -199,7 +199,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(' ')), array('footnote_close',array()), ))), - array('cdata',array(' Bar'.DOKU_PARSER_EOL)), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -221,7 +221,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(' ')), array('footnote_close',array()), ))), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -240,7 +240,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(" \n====Test====\n ")), array('footnote_close',array()), ))), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -286,7 +286,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(' ')), array('footnote_close',array()), ))), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -328,7 +328,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(' ')), array('footnote_close',array()), ))), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -356,7 +356,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { array('cdata',array(' ')), array('footnote_close',array()), ))), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -381,7 +381,7 @@ class TestOfDoku_Parser_Footnote extends TestOfDoku_Parser { ))), array('cdata',array(" ")), array('strong_close',array()), - array('cdata',array(" c ))\n")), + array('cdata',array(" c ))")), array('p_close',array()), array('document_end',array()), ); diff --git a/_test/cases/inc/parser/parser_formatting.test.php b/_test/cases/inc/parser/parser_formatting.test.php index f2eda81b8..69c57dfb5 100644 --- a/_test/cases/inc/parser/parser_formatting.test.php +++ b/_test/cases/inc/parser/parser_formatting.test.php @@ -17,7 +17,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('strong_open',array()), array('cdata',array('bar')), array('strong_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -30,7 +30,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc **bar def\n")), + array('cdata',array("\nabc **bar def")), array('p_close',array()), array('document_end',array()), ); @@ -47,7 +47,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('emphasis_open',array()), array('cdata',array('bar')), array('emphasis_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -64,7 +64,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('emphasis_open',array()), array('cdata',array('Тест: ')), array('emphasis_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -81,7 +81,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('emphasis_open',array()), array('cdata',array('b')), array('emphasis_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -98,7 +98,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('emphasis_open',array()), array('cdata',array('foo:')), array('emphasis_close',array()), - array('cdata',array(' bar// def'."\n")), + array('cdata',array(' bar// def')), array('p_close',array()), array('document_end',array()), ); @@ -118,7 +118,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('externallink',array('http://www.google.com', NULL)), array('cdata',array(' bar')), array('emphasis_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -131,7 +131,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc //bar def\n")), + array('cdata',array("\nabc //bar def")), array('p_close',array()), array('document_end',array()), ); @@ -148,7 +148,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('emphasis_open',array()), array('cdata',array('bar')), array('emphasis_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -161,7 +161,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc //http:// def\n")), + array('cdata',array("\nabc //http:// def")), array('p_close',array()), array('document_end',array()), ); @@ -185,7 +185,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('emphasis_open',array()), array('cdata',array('text:')), array('emphasis_close',array()), - array('cdata',array(" another Blablabla Blablabla\n")), + array('cdata',array(" another Blablabla Blablabla")), array('p_close',array()), array('document_end',array()), ); @@ -203,7 +203,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('emphasis_open',array()), array('cdata',array('Тест:')), array('emphasis_close',array()), - array('cdata',array("\n")), + array('cdata', array('')), array('p_close',array()), array('document_end',array()), ); @@ -248,7 +248,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('underline_open',array()), array('cdata',array('bar')), array('underline_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -261,7 +261,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc __bar def\n")), + array('cdata',array("\nabc __bar def")), array('p_close',array()), array('document_end',array()), ); @@ -278,7 +278,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('monospace_open',array()), array('cdata',array('bar')), array('monospace_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -291,7 +291,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc ''bar def\n")), + array('cdata',array("\nabc ''bar def")), array('p_close',array()), array('document_end',array()), ); @@ -308,7 +308,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('subscript_open',array()), array('cdata',array('bar')), array('subscript_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -321,7 +321,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc bar def\n")), + array('cdata',array("\nabc bar def")), array('p_close',array()), array('document_end',array()), ); @@ -338,7 +338,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('superscript_open',array()), array('cdata',array('bar')), array('superscript_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -351,7 +351,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc bar def\n")), + array('cdata',array("\nabc bar def")), array('p_close',array()), array('document_end',array()), ); @@ -368,7 +368,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('deleted_open',array()), array('cdata',array('bar')), array('deleted_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -381,7 +381,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc bar def\n")), + array('cdata',array("\nabc bar def")), array('p_close',array()), array('document_end',array()), ); @@ -403,7 +403,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('emphasis_close',array()), array('cdata',array('c')), array('strong_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); @@ -424,7 +424,7 @@ class TestOfDoku_Parser_Formatting extends TestOfDoku_Parser { array('strong_open',array()), array('cdata',array('c')), array('strong_close',array()), - array('cdata',array(' def'."\n")), + array('cdata',array(' def')), array('p_close',array()), array('document_end',array()), ); diff --git a/_test/cases/inc/parser/parser_headers.test.php b/_test/cases/inc/parser/parser_headers.test.php index e1c6783f5..688bac2eb 100644 --- a/_test/cases/inc/parser/parser_headers.test.php +++ b/_test/cases/inc/parser/parser_headers.test.php @@ -13,12 +13,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('Header',1,6)), array('section_open',array(1)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -32,12 +32,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('Header',2,6)), array('section_open',array(2)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -51,12 +51,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('Header',3,6)), array('section_open',array(3)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -70,12 +70,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('Header',4,6)), array('section_open',array(4)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -89,12 +89,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('Header',5,6)), array('section_open',array(5)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -108,12 +108,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('Header',2,6)), array('section_open',array(2)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -127,12 +127,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('Header',2,6)), array('section_open',array(2)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -146,12 +146,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('Header',1,6)), array('section_open',array(1)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -165,7 +165,7 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n= Header =\n def\n")), + array('cdata',array("\nabc \n= Header =\n def")), array('p_close',array()), array('document_end',array()), ); @@ -179,12 +179,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('== Header ==',1,6)), array('section_open',array(1)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -198,12 +198,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('====== Header ======',5,6)), array('section_open',array(5)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -217,12 +217,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n== ====== Header\n")), + array('cdata',array("\nabc \n== ====== Header")), array('p_close',array()), array('header',array('',1,23)), array('section_open',array(1)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -243,12 +243,12 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array('abc '.DOKU_PARSER_EOL)), + array('cdata',array('abc ')), array('p_close',array()), array('header',array('Header',1, 6)), array('section_open',array(1)), array('p_open',array()), - array('cdata',array(' def'.DOKU_PARSER_EOL)), + array('cdata',array(' def')), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -263,18 +263,18 @@ class TestOfDoku_Parser_Headers extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc \n")), + array('cdata',array("\nabc ")), array('p_close',array()), array('header',array('Header',1,6)), array('section_open',array(1)), array('p_open',array()), - array('cdata',array("\n def abc \n")), + array('cdata',array("\n def abc ")), array('p_close',array()), array('section_close',array()), array('header',array('Header2',2,39)), array('section_open',array(2)), array('p_open',array()), - array('cdata',array("\n def\n")), + array('cdata',array("\n def")), array('p_close',array()), array('section_close',array()), array('document_end',array()) diff --git a/_test/cases/inc/parser/parser_i18n.test.php b/_test/cases/inc/parser/parser_i18n.test.php index f0cceb69e..27ec3c78b 100644 --- a/_test/cases/inc/parser/parser_i18n.test.php +++ b/_test/cases/inc/parser/parser_i18n.test.php @@ -47,7 +47,7 @@ class TestOfDoku_Parser_i18n extends TestOfDoku_Parser { array('deleted_open',array()), array('cdata',array('æ')), array('deleted_close',array()), - array('cdata',array("tiøn\n")), + array('cdata',array("tiøn")), array('p_close',array()), array('document_end',array()), ); @@ -60,12 +60,12 @@ class TestOfDoku_Parser_i18n extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nFoo\n")), + array('cdata',array("\nFoo")), array('p_close',array()), array('header',array('Iñtërnâtiônàlizætiøn',3,5)), array('section_open',array(3)), array('p_open',array()), - array('cdata',array("\n Bar\n")), + array('cdata',array("\n Bar")), array('p_close',array()), array('section_close',array()), array('document_end',array()), @@ -110,7 +110,7 @@ def'); array('tablerow_close',array()), array('table_close',array(153)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -126,7 +126,7 @@ def'); array('p_open',array()), array('cdata',array("\nFoo ")), array('acronym',array('Iñtërnâtiônàlizætiøn')), - array('cdata',array(" Bar\n")), + array('cdata',array(" Bar")), array('p_close',array()), array('document_end',array()), ); @@ -141,7 +141,7 @@ def'); array('p_open',array()), array('cdata',array("\n".'Foo ')), array('interwikilink',array('wp>Iñtërnâtiônàlizætiøn','Iñtërnâtiônàlizætiøn','wp','Iñtërnâtiônàlizætiøn')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -156,7 +156,7 @@ def'); array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internallink',array('x:Iñtërnâtiônàlizætiøn:y:foo_bar:z','Iñtërnâtiônàlizætiøn')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); diff --git a/_test/cases/inc/parser/parser_links.test.php b/_test/cases/inc/parser/parser_links.test.php index 81186ef5e..a4a8c5826 100644 --- a/_test/cases/inc/parser/parser_links.test.php +++ b/_test/cases/inc/parser/parser_links.test.php @@ -16,7 +16,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externallink',array('http://www.google.com', NULL)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -31,7 +31,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externallink',array('HTTP://WWW.GOOGLE.COM', NULL)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -46,7 +46,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externallink',array('http://123.123.3.21/foo', NULL)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -61,7 +61,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externallink',array('http://[3ffe:2a00:100:7031::1]/foo', NULL)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -106,7 +106,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externallink',array($link, $name)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -124,7 +124,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nFoo javascript:alert('XSS'); Bar\n")), + array('cdata',array("\nFoo javascript:alert('XSS'); Bar")), array('p_close',array()), array('document_end',array()), ); @@ -139,7 +139,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externallink',array('http://www.google.com', 'www.google.com')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -154,7 +154,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externallink',array('ftp://ftp.sunsite.com', 'ftp.sunsite.com')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -168,7 +168,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('emaillink',array('bugs@php.net', NULL)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -183,7 +183,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('emaillink',array("~fix+bug's.for/ev{e}r@php.net", NULL)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -198,7 +198,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('emaillink',array('bugs@pHp.net', NULL)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -214,7 +214,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internallink',array('l',NULL)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -229,7 +229,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internallink',array('foo:bar',NULL)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -244,7 +244,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internallink',array('x:1:y:foo_bar:z','Test')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -259,7 +259,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internallink',array('wiki:syntax#internal','Syntax')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -274,7 +274,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externallink',array('http://www.google.com','Google')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -289,7 +289,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('interwikilink',array('iw>somepage','Some Page','iw','somepage')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -304,7 +304,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('interwikilink',array('IW>somepage','Some Page','iw','somepage')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -319,7 +319,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('interwikilink',array('wp>Callback_(computer_science)','callbacks','wp','Callback_(computer_science)')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -334,7 +334,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('camelcaselink',array('FooBar')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -349,7 +349,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('filelink',array('file://temp/file.txt ',NULL)), - array('cdata',array('Bar'."\n")), + array('cdata',array('Bar')), array('p_close',array()), array('document_end',array()), ); @@ -364,7 +364,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externallink',array('file://temp/file.txt','Some File')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -379,7 +379,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('windowssharelink',array('\\\server\share',NULL)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -394,7 +394,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('windowssharelink',array('\\\server\share','My Documents')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -409,7 +409,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internalmedia',array('img.gif',NULL,NULL,NULL,NULL,'cache','details')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -424,7 +424,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internalmedia',array('img.gif',NULL,NULL,NULL,NULL,'cache','linkonly')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -439,7 +439,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internalmedia',array('foo.txt','Some File',null,10,10,'cache','details')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -454,7 +454,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internalmedia',array('img.gif',NULL,'left',NULL,NULL,'cache','details')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -469,7 +469,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internalmedia',array('img.gif',NULL,'right',NULL,NULL,'cache','details')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -484,7 +484,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internalmedia',array('img.gif',NULL,'center',NULL,NULL,'cache','details')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -499,7 +499,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internalmedia',array('img.gif',NULL,NULL,'50','100','nocache','details')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -514,7 +514,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internalmedia',array('img.gif','Some Image',NULL,'50','100','cache','details')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -529,7 +529,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externalmedia',array('http://www.google.com/img.gif',NULL,NULL,NULL,NULL,'cache','details')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -544,7 +544,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('externalmedia',array('http://www.google.com/img.gif',NULL,NULL,'50','100','nocache','details')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -560,7 +560,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('cdata',array("\n".'Foo ')), array('externalmedia', array('http://www.google.com/img.gif','Some Image',NULL,'50','100','cache','details')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -587,7 +587,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internallink',array('x:1:y:foo_bar:z',$image)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -614,7 +614,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('internallink',array('x:1:y:foo_bar:z',$image)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -641,7 +641,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('emaillink',array('foo@example.com',$image)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -657,7 +657,7 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { array('cdata',array("\n".'Foo ')), array('internalmedia', array('img.gif','{{foo.gif|{{bar.gif|Bar',NULL,NULL,NULL,'cache','details')), - array('cdata',array('}}}} Bar'."\n")), + array('cdata',array('}}}} Bar')), array('p_close',array()), array('document_end',array()), ); diff --git a/_test/cases/inc/parser/parser_lists.test.php b/_test/cases/inc/parser/parser_lists.test.php index 34f0eb760..6e61da1a1 100644 --- a/_test/cases/inc/parser/parser_lists.test.php +++ b/_test/cases/inc/parser/parser_lists.test.php @@ -171,7 +171,7 @@ class TestOfDoku_Parser_Lists extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nFoo -bar *foo Bar\n")), + array('cdata',array("\nFoo -bar *foo Bar")), array('p_close',array()), array('document_end',array()), ); @@ -211,7 +211,7 @@ Bar'); array('listitem_close',array()), array('listu_close',array()), array('p_open',array()), - array('cdata',array("Bar".DOKU_PARSER_EOL)), + array('cdata',array("Bar")), array('p_close',array()), array('document_end',array()), ); diff --git a/_test/cases/inc/parser/parser_preformatted.test.php b/_test/cases/inc/parser/parser_preformatted.test.php index 8e3bd591b..7a00f3599 100644 --- a/_test/cases/inc/parser/parser_preformatted.test.php +++ b/_test/cases/inc/parser/parser_preformatted.test.php @@ -17,7 +17,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('file',array('testing',null,null)), array('p_open',array()), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -35,7 +35,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('code',array('testing', null, null)), array('p_open',array()), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -52,7 +52,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('code',array('testing', null, null)), array('p_open',array()), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -69,7 +69,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('code',array('testing', 'php', null)), array('p_open',array()), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -86,7 +86,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('preformatted',array("x \n y ")), array('p_open',array()), - array('cdata',array('Bar'."\n\n")), + array('cdata',array('Bar')), array('p_close',array()), array('document_end',array()), ); @@ -103,7 +103,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('preformatted',array("x \n y ")), array('p_open',array()), - array('cdata',array('Bar'."\n\n")), + array('cdata',array('Bar')), array('p_close',array()), array('document_end',array()), ); @@ -120,7 +120,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('preformatted',array("x\t\n\ty\t")), array('p_open',array()), - array('cdata',array("Bar\n\n")), + array('cdata',array("Bar")), array('p_close',array()), array('document_end',array()), ); @@ -137,7 +137,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('preformatted',array("x\t\n\ty\t")), array('p_open',array()), - array('cdata',array("Bar\n\n")), + array('cdata',array("Bar")), array('p_close',array()), array('document_end',array()), ); @@ -169,7 +169,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_close',array()), array('preformatted',array("x \n y \n-X\n*Y")), array('p_open',array()), - array('cdata',array("Bar\n\n")), + array('cdata',array("Bar")), array('p_close',array()), array('document_end',array()), ); @@ -186,7 +186,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('php',array('testing')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -203,7 +203,7 @@ class TestOfDoku_Parser_Preformatted extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('html',array('testing')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); diff --git a/_test/cases/inc/parser/parser_quote.test.php b/_test/cases/inc/parser/parser_quote.test.php index 5d5a7e2a5..ebc5da604 100644 --- a/_test/cases/inc/parser/parser_quote.test.php +++ b/_test/cases/inc/parser/parser_quote.test.php @@ -22,7 +22,7 @@ class TestOfDoku_Parser_Quote extends TestOfDoku_Parser { array('quote_close',array()), array('quote_close',array()), array('p_open',array()), - array('cdata',array("klm\n")), + array('cdata',array("klm")), array('p_close',array()), array('document_end',array()), @@ -45,7 +45,7 @@ class TestOfDoku_Parser_Quote extends TestOfDoku_Parser { array('quote_close',array()), array('quote_close',array()), array('p_open',array()), - array('cdata',array("klm\n")), + array('cdata',array("klm")), array('p_close',array()), array('document_end',array()), @@ -86,7 +86,7 @@ class TestOfDoku_Parser_Quote extends TestOfDoku_Parser { array('quote_close',array()), array('quote_close',array()), array('p_open',array()), - array('cdata',array("klm".DOKU_PARSER_EOL)), + array('cdata',array("klm")), array('p_close',array()), array('document_end',array()), diff --git a/_test/cases/inc/parser/parser_quotes.test.php b/_test/cases/inc/parser/parser_quotes.test.php index 9f191d6b0..77e323799 100644 --- a/_test/cases/inc/parser/parser_quotes.test.php +++ b/_test/cases/inc/parser/parser_quotes.test.php @@ -22,7 +22,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('singlequoteopening',array()), - array('cdata',array('hello Bar'."\n")), + array('cdata',array('hello Bar')), array('p_close',array()), array('document_end',array()), ); @@ -39,7 +39,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo said:')), array('singlequoteopening',array()), - array('cdata',array('hello Bar'."\n")), + array('cdata',array('hello Bar')), array('p_close',array()), array('document_end',array()), ); @@ -56,7 +56,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo hello')), array('singlequoteclosing',array()), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -73,7 +73,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo hello')), array('singlequoteclosing',array()), - array('cdata',array(') Bar'."\n")), + array('cdata',array(') Bar')), array('p_close',array()), array('document_end',array()), ); @@ -92,7 +92,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('singlequoteopening',array()), array('cdata',array('hello')), array('singlequoteclosing',array()), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -109,7 +109,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'hey it')), array('apostrophe',array()), - array('cdata',array('s fine weather today'."\n")), + array('cdata',array('s fine weather today')), array('p_close',array()), array('document_end',array()), ); @@ -129,7 +129,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('singlequoteopening',array()), array('cdata',array('hello')), array('singlequoteclosing',array()), - array('cdata',array(') Bar'."\n")), + array('cdata',array(') Bar')), array('p_close',array()), array('document_end',array()), ); @@ -146,7 +146,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('doublequoteopening',array()), - array('cdata',array('hello Bar'."\n")), + array('cdata',array('hello Bar')), array('p_close',array()), array('document_end',array()), ); @@ -163,7 +163,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo said:')), array('doublequoteopening',array()), - array('cdata',array('hello Bar'."\n")), + array('cdata',array('hello Bar')), array('p_close',array()), array('document_end',array()), ); @@ -180,7 +180,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo hello')), array('doublequoteclosing',array()), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -197,7 +197,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo hello')), array('doublequoteclosing',array()), - array('cdata',array(') Bar'."\n")), + array('cdata',array(') Bar')), array('p_close',array()), array('document_end',array()), ); @@ -216,7 +216,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('doublequoteopening',array()), array('cdata',array('hello')), array('doublequoteclosing',array()), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -235,7 +235,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('doublequoteopening',array()), array('cdata',array('hello')), array('doublequoteclosing',array()), - array('cdata',array(') Bar'."\n")), + array('cdata',array(') Bar')), array('p_close',array()), array('document_end',array()), ); @@ -261,7 +261,7 @@ class TestOfDoku_Parser_Quotes extends TestOfDoku_Parser { array('cdata',array('s world')), array('singlequoteclosing',array()), array('doublequoteclosing',array()), - array('cdata',array(".\n")), + array('cdata',array(".")), array('p_close',array()), array('document_end',array()), ); diff --git a/_test/cases/inc/parser/parser_replacements.test.php b/_test/cases/inc/parser/parser_replacements.test.php index 6aa9069a1..d277560c7 100644 --- a/_test/cases/inc/parser/parser_replacements.test.php +++ b/_test/cases/inc/parser/parser_replacements.test.php @@ -17,7 +17,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'abc ')), array('acronym',array('FOOBAR')), - array('cdata',array(' xyz'."\n")), + array('cdata',array(' xyz')), array('p_close',array()), array('document_end',array()), ); @@ -32,7 +32,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\n".'abcFOOBARxyz'."\n")), + array('cdata',array("\n".'abcFOOBARxyz')), array('p_close',array()), array('document_end',array()), ); @@ -49,7 +49,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'FOOBAR ')), array('acronym',array('FOO')), - array('cdata',array("\n")), + array('cdata',array('')), array('p_close',array()), array('document_end',array()), ); @@ -68,7 +68,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('acronym',array('FOO')), array('cdata',array(' def ')), array('acronym',array('BAR')), - array('cdata',array(' xyz'."\n")), + array('cdata',array(' xyz')), array('p_close',array()), array('document_end',array()), ); @@ -92,7 +92,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('acronym',array('FOO.1')), array('cdata',array(" ")), array('acronym',array('A.FOO.1')), - array('cdata',array("\n")), + array('cdata',array('')), array('p_close',array()), array('document_end',array()), ); @@ -115,7 +115,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('acronym',array('FOO.1')), array('cdata',array(" ")), array('acronym',array('A.FOO.1')), - array('cdata',array("\n")), + array('cdata',array('')), array('p_close',array()), array('document_end',array()), ); @@ -130,7 +130,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc:-)xyz\n")), + array('cdata',array("\nabc:-)xyz")), array('p_close',array()), array('document_end',array()), ); @@ -147,7 +147,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'abc ')), array('smiley',array(':-)')), - array('cdata',array(' xyz'."\n")), + array('cdata',array(' xyz')), array('p_close',array()), array('document_end',array()), ); @@ -162,7 +162,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc:-)x^_^yz\n")), + array('cdata',array("\nabc:-)x^_^yz")), array('p_close',array()), array('document_end',array()), ); @@ -181,7 +181,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('smiley',array(':-)')), array('cdata',array(' x ')), array('smiley',array('^_^')), - array('cdata',array(' yz'."\n")), + array('cdata',array(' yz')), array('p_close',array()), array('document_end',array()), ); @@ -197,7 +197,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\nabc".':-\\\\'."xyz\n")), + array('cdata',array("\nabc".':-\\\\'."xyz")), array('p_close',array()), array('document_end',array()), ); @@ -215,7 +215,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'abc ')), array('smiley',array(':-\\\\')), - array('cdata',array(' xyz'."\n")), + array('cdata',array(' xyz')), array('p_close',array()), array('document_end',array()), ); @@ -232,7 +232,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'abc ')), array('wordblock',array('CAT')), - array('cdata',array(' xyz'."\n")), + array('cdata',array(' xyz')), array('p_close',array()), array('document_end',array()), ); @@ -249,7 +249,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'abc ')), array('wordblock',array('cat')), - array('cdata',array(' xyz'."\n")), + array('cdata',array(' xyz')), array('p_close',array()), array('document_end',array()), ); @@ -268,7 +268,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('wordblock',array('cat')), array('cdata',array(' x ')), array('wordblock',array('DOG')), - array('cdata',array(' yz'."\n")), + array('cdata',array(' yz')), array('p_close',array()), array('document_end',array()), ); @@ -285,7 +285,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'x ')), array('entity',array('->')), - array('cdata',array(' y'."\n")), + array('cdata',array(' y')), array('p_close',array()), array('document_end',array()), ); @@ -304,7 +304,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('entity',array('->')), array('cdata',array(' y ')), array('entity',array('<-')), - array('cdata',array(' z'."\n")), + array('cdata',array(' z')), array('p_close',array()), array('document_end',array()), ); @@ -321,7 +321,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('multiplyentity',array(10,20)), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -337,7 +337,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array("\n".'Foo 0x123 Bar'."\n")), + array('cdata',array("\n".'Foo 0x123 Bar')), array('p_close',array()), array('document_end',array()), ); @@ -356,7 +356,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_close',array()), array('hr',array()), array('p_open',array()), - array('cdata',array("\n Bar\n")), + array('cdata',array("\n Bar")), array('p_close',array()), array('document_end',array()), ); @@ -374,7 +374,7 @@ class TestOfDoku_Parser_Replacements extends TestOfDoku_Parser { array('p_close',array()), array('hr',array()), array('p_open',array()), - array('cdata',array("\n Bar\n")), + array('cdata',array("\n Bar")), array('p_close',array()), array('document_end',array()), ); diff --git a/_test/cases/inc/parser/parser_table.test.php b/_test/cases/inc/parser/parser_table.test.php index 04bce650a..12898860c 100644 --- a/_test/cases/inc/parser/parser_table.test.php +++ b/_test/cases/inc/parser/parser_table.test.php @@ -44,7 +44,7 @@ def'); array('tablerow_close',array()), array('table_close',array(121)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -84,7 +84,7 @@ def'); array('tablerow_close',array()), array('table_close',array(121)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -108,7 +108,7 @@ def'); array('tablerow_close',array()), array('table_close',array(7)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -142,7 +142,7 @@ def'); array('tablerow_close',array()), array('table_close',array(19)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -177,7 +177,7 @@ def'); array('tablerow_close',array()), array('table_close',array(23)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -220,7 +220,7 @@ def'); array('tablerow_close',array()), array('table_close',array(31)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -268,7 +268,7 @@ def'); array('tablerow_close',array()), array('table_close',array(51)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -306,7 +306,7 @@ def'); array('tablerow_close',array()), array('table_close',array(27)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -326,7 +326,7 @@ def'); $calls = array ( array('document_start',array()), array('p_open',array()), - array('cdata',array(DOKU_PARSER_EOL."abc")), + array('cdata',array("abc")), array('p_close',array()), array('table_open',array(3, 2, 6)), array('tablerow_open',array()), @@ -353,7 +353,7 @@ def'); array('tablerow_close',array()), array('table_close',array(121)), array('p_open',array()), - array('cdata',array('def'.DOKU_PARSER_EOL)), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -408,7 +408,7 @@ def'); array('tablerow_close',array()), array('table_close',array(129)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -459,7 +459,7 @@ def'); array('tablerow_close',array()), array('table_close',array(155)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -506,7 +506,7 @@ def'); array('tablerow_close',array()), array('table_close',array(123)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); @@ -566,7 +566,7 @@ def'); array('tablerow_close',array()), array('table_close',array(129)), array('p_open',array()), - array('cdata',array('def'."\n")), + array('cdata',array('def')), array('p_close',array()), array('document_end',array()), ); diff --git a/_test/cases/inc/parser/parser_unformatted.test.php b/_test/cases/inc/parser/parser_unformatted.test.php index 56820a27a..dd69564b4 100644 --- a/_test/cases/inc/parser/parser_unformatted.test.php +++ b/_test/cases/inc/parser/parser_unformatted.test.php @@ -15,7 +15,7 @@ class TestOfDoku_Parser_Unformatted extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('unformatted',array('testing')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); @@ -32,7 +32,7 @@ class TestOfDoku_Parser_Unformatted extends TestOfDoku_Parser { array('p_open',array()), array('cdata',array("\n".'Foo ')), array('unformatted',array('testing')), - array('cdata',array(' Bar'."\n")), + array('cdata',array(' Bar')), array('p_close',array()), array('document_end',array()), ); -- cgit v1.2.3 From 95412639d7371a2448aa3c791d9bb3c5e00f1b57 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 9 Feb 2011 18:34:28 +0100 Subject: added some spammers to the blacklist --- conf/wordblock.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conf/wordblock.conf b/conf/wordblock.conf index b3822a29c..fe451f278 100644 --- a/conf/wordblock.conf +++ b/conf/wordblock.conf @@ -26,4 +26,7 @@ downgradetowindowsxp\.com elegantugg\.com classicedhardy\.com research-service\.com -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) +https?:\/\/(\S*?)(2-pay-secure|911essay|academia-research|anypapers|applicationessay|bestbuyessay|bestdissertation|bestessay|bestresume|besttermpaper|businessessay|college-paper|customessay|custom-made-paper|custom-writing|degree-?result|dissertationblog|dissertation-service|dissertations?expert|essaybank|essay-?blog|essaycapital|essaylogic|essaymill|essayontime|essaypaper|essays?land|essaytownsucks|essay-?writ|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) +flatsinmumbai\.co\.in +https?:\/\/(\S*?)penny-?stock +mattressreview\.biz -- cgit v1.2.3 From 3ec19a6ad26bf02a10a848e2257c9d5a44e6f5e9 Mon Sep 17 00:00:00 2001 From: Windy Wanderer Date: Wed, 9 Feb 2011 18:37:58 +0100 Subject: Russian language update --- inc/lang/ru/lang.php | 4 ++++ lib/plugins/acl/lang/ru/lang.php | 1 + lib/plugins/config/lang/ru/lang.php | 1 + lib/plugins/plugin/lang/ru/lang.php | 1 + lib/plugins/popularity/lang/ru/lang.php | 1 + lib/plugins/revert/lang/ru/lang.php | 1 + lib/plugins/usermanager/lang/ru/lang.php | 1 + 7 files changed, 10 insertions(+) diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index fc9e53b3a..977f7fde4 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -18,6 +18,7 @@ * @author Aleksey Osadchiy * @author Aleksandr Selivanov * @author Ladyko Andrey + * @author Eugene */ $lang['encoding'] = ' utf-8'; $lang['direction'] = 'ltr'; @@ -168,6 +169,9 @@ $lang['yours'] = 'Ваша версия'; $lang['diff'] = 'показать отличия от текущей версии'; $lang['diff2'] = 'Показать различия между ревизиями '; $lang['difflink'] = 'Ссылка на это сравнение'; +$lang['diff_type'] = 'Посмотреть отличия'; +$lang['diff_inline'] = 'Встроенный'; +$lang['diff_side'] = 'Бок о бок'; $lang['line'] = 'Строка'; $lang['breadcrumb'] = 'Вы посетили'; $lang['youarehere'] = 'Вы находитесь здесь'; diff --git a/lib/plugins/acl/lang/ru/lang.php b/lib/plugins/acl/lang/ru/lang.php index 20e887240..6d04dde21 100644 --- a/lib/plugins/acl/lang/ru/lang.php +++ b/lib/plugins/acl/lang/ru/lang.php @@ -14,6 +14,7 @@ * @author Aleksey Osadchiy * @author Aleksandr Selivanov * @author Ladyko Andrey + * @author Eugene */ $lang['admin_acl'] = 'Управление списками контроля доступа'; $lang['acl_group'] = 'Группа'; diff --git a/lib/plugins/config/lang/ru/lang.php b/lib/plugins/config/lang/ru/lang.php index 47cb09a0a..f29257a28 100644 --- a/lib/plugins/config/lang/ru/lang.php +++ b/lib/plugins/config/lang/ru/lang.php @@ -15,6 +15,7 @@ * @author Aleksey Osadchiy * @author Aleksandr Selivanov * @author Ladyko Andrey + * @author Eugene */ $lang['menu'] = 'Настройки вики'; $lang['error'] = 'Настройки не были сохранены из-за ошибки в одном из значений. Пожалуйста, проверьте свои изменения и попробуйте ещё раз.
Неправильные значения будут обведены красной рамкой.'; diff --git a/lib/plugins/plugin/lang/ru/lang.php b/lib/plugins/plugin/lang/ru/lang.php index b4f39beeb..757b607f5 100644 --- a/lib/plugins/plugin/lang/ru/lang.php +++ b/lib/plugins/plugin/lang/ru/lang.php @@ -15,6 +15,7 @@ * @author Aleksey Osadchiy * @author Aleksandr Selivanov * @author Ladyko Andrey + * @author Eugene */ $lang['menu'] = 'Управление плагинами'; $lang['download'] = 'Скачать и установить новый плагин'; diff --git a/lib/plugins/popularity/lang/ru/lang.php b/lib/plugins/popularity/lang/ru/lang.php index 257326310..79b3e224d 100644 --- a/lib/plugins/popularity/lang/ru/lang.php +++ b/lib/plugins/popularity/lang/ru/lang.php @@ -12,6 +12,7 @@ * @author Aleksey Osadchiy * @author Aleksandr Selivanov * @author Ladyko Andrey + * @author Eugene */ $lang['name'] = 'Сбор информации о популярности (для загрузки может потребоваться некоторое время)'; $lang['submit'] = 'Отправить данные'; diff --git a/lib/plugins/revert/lang/ru/lang.php b/lib/plugins/revert/lang/ru/lang.php index 8208377b1..9624d8fd6 100644 --- a/lib/plugins/revert/lang/ru/lang.php +++ b/lib/plugins/revert/lang/ru/lang.php @@ -13,6 +13,7 @@ * @author Aleksey Osadchiy * @author Aleksandr Selivanov * @author Ladyko Andrey + * @author Eugene */ $lang['menu'] = 'Менеджер откаток'; $lang['filter'] = 'Поиск спам-страниц'; diff --git a/lib/plugins/usermanager/lang/ru/lang.php b/lib/plugins/usermanager/lang/ru/lang.php index f6137aab7..456ba5b29 100644 --- a/lib/plugins/usermanager/lang/ru/lang.php +++ b/lib/plugins/usermanager/lang/ru/lang.php @@ -15,6 +15,7 @@ * @author Aleksey Osadchiy * @author Aleksandr Selivanov * @author Ladyko Andrey + * @author Eugene */ $lang['menu'] = 'Управление пользователями'; $lang['noauth'] = '(авторизация пользователей недоступна)'; -- cgit v1.2.3 From 7e8e923f9382c30776c2983fc4ae90eeadf0eb64 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 10 Feb 2011 14:16:44 +0100 Subject: Use Base64 encoding for long subjects FS#2169 Quoted-Printable specifies a maximum line length and some mail tools (Apple mail and Thunderbird) take this quite serious and will fail to decode subjects encoded with quoted-printable when the subject exceeds the length limit. The correct fix would be to wrap the header into multiple lines. But this seems not to be possible with mails() $subject variable. This patch switches to Base64 encoding for long subjects. A general decision if switching completely to Base64 is the best way to go is still open. (see bugreport) --- inc/mail.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/inc/mail.php b/inc/mail.php index c45a7c57e..f991909d0 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -112,9 +112,16 @@ function _mail_send_action($data) { } if(!utf8_isASCII($subject)) { - $subject = '=?UTF-8?Q?'.mail_quotedprintable_encode($subject,0).'?='; + $enc_subj = '=?UTF-8?Q?'.mail_quotedprintable_encode($subject,0).'?='; // Spaces must be encoded according to rfc2047. Use the "_" shorthand - $subject = preg_replace('/ /', '_', $subject); + $enc_sub = preg_replace('/ /', '_', $enc_sub); + + // quoted printable has length restriction, use base64 if needed + if(strlen($subject) > 74){ + $enc_subj = '=?UTF-8?B?'.base64_encode($subject).'?='; + } + + $subject = $enc_subj; } $header = ''; -- cgit v1.2.3 From 52784dd85122f75ca221c53d4fd9dcc98bfd2450 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 10 Feb 2011 18:51:40 +0100 Subject: do not (re)render metadata in backlinks A page could have possibly hundreds of backlinks, when the cache is outdated they should not be rererendered at once --- inc/fulltext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/fulltext.php b/inc/fulltext.php index 0f2414213..bb2647165 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -142,7 +142,7 @@ function ft_backlinks($id){ // check metadata for matching links foreach($docs as $match){ // metadata relation reference links are already resolved - $links = p_get_metadata($match,'relation references'); + $links = p_get_metadata($match,'relation references',false); if (isset($links[$id])) $result[] = $match; } -- cgit v1.2.3 From 0667123fd26e32f9e914b6bb4a2bfcd6f894c076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 11 Feb 2011 11:10:53 +0100 Subject: correctly encode quoted email names --- inc/mail.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/inc/mail.php b/inc/mail.php index f991909d0..bd6c0db6a 100644 --- a/inc/mail.php +++ b/inc/mail.php @@ -203,7 +203,16 @@ function mail_encode_address($string,$header='',$names=true){ } if(!utf8_isASCII($text)){ - $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text,0).'?='; + // put the quotes outside as in =?UTF-8?Q?"Elan Ruusam=C3=A4e"?= vs "=?UTF-8?Q?Elan Ruusam=C3=A4e?=" + if (preg_match('/^"(.+)"$/', $text, $matches)) { + $text = '"=?UTF-8?Q?'.mail_quotedprintable_encode($matches[1], 0).'?="'; + } else { + $text = '=?UTF-8?Q?'.mail_quotedprintable_encode($text, 0).'?='; + } + // additionally the space character should be encoded as =20 (or each + // word QP encoded separately). + // however this is needed only in mail headers, not globally in mail_quotedprintable_encode(). + $text = str_replace(" ", "=20", $text); } }else{ $text = ''; -- cgit v1.2.3 From 023e47d6f2d7d5b726cf38fd83805eedf55a8075 Mon Sep 17 00:00:00 2001 From: lupo49 Date: Fri, 11 Feb 2011 16:18:20 +0100 Subject: Support for VoIP/SIP callto-links (FS#2167) --- conf/interwiki.conf | 6 +++++- lib/images/interwiki/callto.gif | Bin 0 -> 586 bytes 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 lib/images/interwiki/callto.gif diff --git a/conf/interwiki.conf b/conf/interwiki.conf index b14bfef9f..6def35949 100644 --- a/conf/interwiki.conf +++ b/conf/interwiki.conf @@ -5,7 +5,8 @@ # no further encoding is done # If no placeholder is defined the urlencoded name is appended to the URL -# You can add more InterWiki shortcuts here. +# To prevent losing your added InterWiki shortcuts after an upgrade, +# you should add new ones to interwiki.local.conf wp http://en.wikipedia.org/wiki/{NAME} wpfr http://fr.wikipedia.org/wiki/{NAME} @@ -29,6 +30,9 @@ sb http://www.splitbrain.org/go/ google.de http://www.google.de/search?q= go http://www.google.com/search?q={URL}&btnI=lucky +# To support VoIP/SIP links +callto callto://{NAME} + # Standards from http://usemod.com/intermap.txt follow AbbeNormal http://www.ourpla.net/cgi-bin/pikie.cgi? diff --git a/lib/images/interwiki/callto.gif b/lib/images/interwiki/callto.gif new file mode 100644 index 000000000..880e9d8e7 Binary files /dev/null and b/lib/images/interwiki/callto.gif differ -- cgit v1.2.3 From c6497d393c535ea8007f277eca65d7083be02159 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 11 Feb 2011 22:23:24 +0100 Subject: avoid warning in linkwizard when a space is entered as query --- lib/exe/ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 1939a7bcb..7d594dc04 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -238,7 +238,7 @@ function ajax_linkwiz(){ global $conf; global $lang; - $q = ltrim($_POST['q'],':'); + $q = ltrim(trim($_POST['q']),':'); $id = noNS($q); $ns = getNS($q); -- cgit v1.2.3 From e86ed94b44e3e250bf2cb97e784a4b7b1caf94aa Mon Sep 17 00:00:00 2001 From: Petsagourakis George Date: Sat, 12 Feb 2011 14:46:27 +0200 Subject: Greek translation revisited --- inc/lang/el/admin.txt | 2 +- inc/lang/el/adminplugins.txt | 2 +- inc/lang/el/conflict.txt | 7 ++- inc/lang/el/denied.txt | 2 +- inc/lang/el/draft.txt | 4 +- inc/lang/el/edit.txt | 4 +- inc/lang/el/index.txt | 2 +- inc/lang/el/install.html | 39 ++++++------- inc/lang/el/lang.php | 80 +++++++++++++-------------- inc/lang/el/locked.txt | 3 +- inc/lang/el/login.txt | 6 +- inc/lang/el/newpage.txt | 3 +- inc/lang/el/norev.txt | 5 +- inc/lang/el/password.txt | 4 +- inc/lang/el/preview.txt | 3 +- inc/lang/el/pwconfirm.txt | 6 +- inc/lang/el/read.txt | 3 +- inc/lang/el/recent.txt | 2 +- inc/lang/el/register.txt | 4 +- inc/lang/el/registermail.txt | 2 +- inc/lang/el/resendpwd.txt | 4 +- inc/lang/el/revisions.txt | 7 ++- inc/lang/el/searchpage.txt | 3 +- inc/lang/el/showrev.txt | 2 +- inc/lang/el/stopwords.txt | 126 +++++++++++++++++++++++++++++++++--------- inc/lang/el/subscr_digest.txt | 7 +-- inc/lang/el/subscr_list.txt | 9 ++- inc/lang/el/subscr_single.txt | 9 ++- inc/lang/el/updateprofile.txt | 3 +- 29 files changed, 224 insertions(+), 129 deletions(-) diff --git a/inc/lang/el/admin.txt b/inc/lang/el/admin.txt index 49e6c657b..729004b05 100644 --- a/inc/lang/el/admin.txt +++ b/inc/lang/el/admin.txt @@ -1,3 +1,3 @@ ====== Διαχείριση ====== -Παρακάτω μπορείτε να βρείτε μια λίστα με τις δυνατότητες διαχείρισης στο DokuWiki +Παρακάτω μπορείτε να βρείτε μια λίστα με τις λειτουργίες διαχείρισης στο DokuWiki diff --git a/inc/lang/el/adminplugins.txt b/inc/lang/el/adminplugins.txt index ea00b959e..ef1a2853b 100644 --- a/inc/lang/el/adminplugins.txt +++ b/inc/lang/el/adminplugins.txt @@ -1 +1 @@ -===== Πρόσθετες συνδεόμενες υπομονάδες ===== \ No newline at end of file +===== Πρόσθετα ===== \ No newline at end of file diff --git a/inc/lang/el/conflict.txt b/inc/lang/el/conflict.txt index 27b80b397..a2065c0f3 100644 --- a/inc/lang/el/conflict.txt +++ b/inc/lang/el/conflict.txt @@ -1,5 +1,8 @@ ====== Υπάρχει μία νεώτερη έκδοση αυτής της σελίδας ====== -Υπάρχει μία νεώτερη έκδοση της σελίδας που τρoποποιήσατε. Αυτό συμβαίνει εάν κάποιος άλλος χρήστης τροποποίησε την ίδια σελίδα ενώ την τροποποιούσατε και εσείς. +Υπάρχει μία νεώτερη έκδοση της σελίδας που τρoποποιήσατε. +Αυτό συμβαίνει εάν κάποιος άλλος χρήστης τροποποίησε την ίδια σελίδα ενώ την επεξεργαζόσασταν και εσείς. -Ελέγξτε προσεκτικά τις διαφορές που παρουσιάζονται παρακάτω και έπειτα αποφασίστε ποια έκδοση θα κρατήσετε. Εάν επιλέξετε ''Αποθήκευση'', η δική σας έκδοση θα αποθηκευτεί. Εάν επιλέξετε ''Ακύρωση'', η νεώτερη έκδοση θα διατηρηθεί ως τρέχουσα. +Ελέγξτε προσεκτικά τις διαφορές που παρουσιάζονται παρακάτω και έπειτα αποφασίστε ποια έκδοση θα κρατήσετε. +Εάν επιλέξετε ''Αποθήκευση'', η δική σας έκδοση θα αποθηκευτεί. +Εάν επιλέξετε ''Ακύρωση'', η νεώτερη έκδοση θα διατηρηθεί ως τρέχουσα. diff --git a/inc/lang/el/denied.txt b/inc/lang/el/denied.txt index 71e9a04b8..36d7ae103 100644 --- a/inc/lang/el/denied.txt +++ b/inc/lang/el/denied.txt @@ -2,4 +2,4 @@ Συγγνώμη, αλλά δεν έχετε επαρκή δικαιώματα για την συγκεκριμένη ενέργεια. -Μήπως παραλείψατε να συνδεθείτε? +Μήπως παραλείψατε να συνδεθείτε; diff --git a/inc/lang/el/draft.txt b/inc/lang/el/draft.txt index 3bb15037f..5ca7b8dfa 100644 --- a/inc/lang/el/draft.txt +++ b/inc/lang/el/draft.txt @@ -1,6 +1,8 @@ ====== Βρέθηκε μία αυτόματα αποθηκευμένη σελίδα ====== -Η τελευταία τροποποίηση αυτής της σελίδας δεν ολοκληρώθηκε επιτυχώς. Η εφαρμογή αποθήκευσε αυτόματα μία εκδοχή της σελίδας την ώρα που την τροποποιούσατε και μπορείτε να την χρησιμοποιήσετε για να συνεχίσετε την εργασία σας. Παρακάτω φαίνεται αυτή η πιο πρόσφατη αυτόματα αποθηκευμένη σελίδα. +Η τελευταία τροποποίηση αυτής της σελίδας δεν ολοκληρώθηκε επιτυχώς. +Η εφαρμογή αποθήκευσε αυτόματα μία εκδοχή της σελίδας την ώρα που την επεξεργαζόσασταν και μπορείτε να την χρησιμοποιήσετε για να συνεχίσετε την εργασία σας. +Παρακάτω φαίνεται αυτή η πιο πρόσφατη αυτόματα αποθηκευμένη σελίδα. Μπορείτε να //επαναφέρετε// αυτή την αυτόματα αποθηκευμένη σελίδα ως τρέχουσα, να την //διαγράψετε// ή να //ακυρώσετε// τη διαδικασία τροποποίησης της τρέχουσας σελίδας. diff --git a/inc/lang/el/edit.txt b/inc/lang/el/edit.txt index 26b52f97a..8d9559fcc 100644 --- a/inc/lang/el/edit.txt +++ b/inc/lang/el/edit.txt @@ -1 +1,3 @@ -Τροποποιήστε την σελίδα **μόνο** εάν μπορείτε να την **βελτιώσετε**. Για να κάνετε δοκιμές με ασφάλεια ή να εξοικειωθείτε με το περιβάλλον χρησιμοποιήστε το [[:playground:playground|playground]]. Αφού τροποποιήστε την σελίδα επιλέξτε ''Αποθήκευση''. Δείτε τις [[:wiki:syntax|οδηγίες]] για την σωστή σύνταξη. +Τροποποιήστε την σελίδα **μόνο** εάν μπορείτε να την **βελτιώσετε**. +Για να κάνετε δοκιμές με ασφάλεια ή να εξοικειωθείτε με το περιβάλλον χρησιμοποιήστε το [[:playground:playground|playground]]. +Αφού τροποποιήστε την σελίδα επιλέξτε ''Αποθήκευση''. Δείτε τις [[:wiki:syntax|οδηγίες]] για την σωστή σύνταξη. diff --git a/inc/lang/el/index.txt b/inc/lang/el/index.txt index 51f1fc600..e2da3a85e 100644 --- a/inc/lang/el/index.txt +++ b/inc/lang/el/index.txt @@ -1,3 +1,3 @@ ====== Κατάλογος ====== -Αυτός είναι ένας κατάλογος όλων των διαθέσιμων σελίδων ταξινομημένων κατά [[doku>namespaces|φακέλους]]. +Εδώ βλέπετε τον κατάλογο όλων των διαθέσιμων σελίδων, ταξινομημένες κατά [[doku>namespaces|φακέλους]]. diff --git a/inc/lang/el/install.html b/inc/lang/el/install.html index 89429d55b..9487de7c7 100644 --- a/inc/lang/el/install.html +++ b/inc/lang/el/install.html @@ -1,25 +1,26 @@

Αυτή η σελίδα περιέχει πληροφορίες που βοηθούν στην αρχική εγκατάσταση και -ρύθμιση της εφαρμογής Dokuwiki. Περισσότερες -πληροφορίες υπάρχουν στη σελίδα τεκμηρίωσης -του οδηγού εγκατάστασης.

+ρύθμιση της εφαρμογής Dokuwiki. +Περισσότερες πληροφορίες υπάρχουν στη +σελίδα τεκμηρίωσης του οδηγού εγκατάστασης.

-

Η εφαρμογή DokuWiki χρησιμοποιεί απλά αρχεία για να αποθηκεύει τις σελίδες wiki -καθώς και πληροφορίες που σχετίζονται με αυτές (π.χ. εικόνες, καταλόγους αναζήτησης, -παλαιότερες εκδόσεις σελίδων, κλπ). Για να λειτουργεί σωστά η εφαρμογή DokuWiki -πρέπει να έχει δικαιώματα εγγραφής στους φακέλους που φιλοξενούν -αυτά τα αρχεία. Ο οδηγός εγκατάστασης δεν έχει την δυνατότητα να παραχωρήσει αυτά τα -δικαιώματα εγγραφής στους σχετικούς φακέλους. Ο κανονικός τρόπος για να γίνει αυτό είναι -είτε απευθείας σε περιβάλλον γραμμής εντολών ή, εάν δεν έχετε τέτοια πρόσβαση, μέσω FTP ή -του πίνακα ελέγχου του περιβάλλοντος φιλοξενίας (π.χ. cPanel).

+

Η εφαρμογή DokuWiki χρησιμοποιεί απλά αρχεία για να αποθηκεύει τις σελίδες +wiki καθώς και πληροφορίες που σχετίζονται με αυτές (π.χ. εικόνες, καταλόγους +αναζήτησης, παλαιότερες εκδόσεις σελίδων, κλπ). Για να λειτουργεί σωστά η εφαρμογή +DokuWiki πρέπει να έχει δικαιώματα εγγραφής στους φακέλους που +φιλοξενούν αυτά τα αρχεία. Ο οδηγός εγκατάστασης δεν έχει την δυνατότητα να +παραχωρήσει αυτά τα δικαιώματα εγγραφής στους σχετικούς φακέλους. Ο κανονικός +τρόπος για να γίνει αυτό είναι είτε απευθείας σε περιβάλλον γραμμής εντολών ή, +εάν δεν έχετε τέτοια πρόσβαση, μέσω FTP ή του πίνακα ελέγχου του περιβάλλοντος +φιλοξενίας (π.χ. cPanel).

Ο οδηγός εγκατάστασης θα ρυθμίσει την εφαρμογή DokuWiki ώστε να χρησιμοποιεί -ACL, με τρόπο ώστε ο διαχειριστής να -έχει δυνατότητα εισόδου και πρόσβαση στο μενού διαχείρισης της εφαρμογής για εγκατάσταση -επεκτάσεων, διαχείριση χρηστών, διαχείριση δικαιωμάτων πρόσβασης στις διάφορες σελίδες και -αλλαγή των ρυθμίσεων. Αυτό δεν είναι απαραίτητο για να λειτουργήσει η εφαρμογή, αλλά -κάνει την διαχείρισή της ευκολότερη.

+ACL, με τρόπο ώστε ο διαχειριστής +να έχει δυνατότητα εισόδου και πρόσβαση στο μενού διαχείρισης της εφαρμογής για +εγκατάσταση επεκτάσεων, διαχείριση χρηστών, διαχείριση δικαιωμάτων πρόσβασης στις +διάφορες σελίδες και αλλαγή των ρυθμίσεων. Αυτό δεν είναι απαραίτητο για να +λειτουργήσει η εφαρμογή, αλλά κάνει την διαχείρισή της ευκολότερη.

Οι έμπειροι χρήστες και οι χρήστες με ειδικές απαιτήσεις μπορούν να επισκεφθούν -τις σελίδες που περιέχουν λεπτομερείς -οδηγίες εγκατάστασης -και πληροφορίες για τις ρυθμίσεις.

+τις σελίδες που περιέχουν λεπτομερείς +οδηγίες εγκατάστασης και πληροφορίες +για τις ρυθμίσεις.

\ No newline at end of file diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index aaf7f6421..b8c8698f5 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -15,7 +15,7 @@ $lang['doublequoteclosing'] = '”'; $lang['singlequoteopening'] = '‘'; $lang['singlequoteclosing'] = '’'; $lang['apostrophe'] = '’'; -$lang['btn_edit'] = 'Τροποποίηση σελίδας'; +$lang['btn_edit'] = 'Επεξεργασία σελίδας'; $lang['btn_source'] = 'Προβολή κώδικα σελίδας'; $lang['btn_show'] = 'Προβολή σελίδας'; $lang['btn_create'] = 'Δημιουργία σελίδας'; @@ -30,20 +30,20 @@ $lang['btn_recent'] = 'Πρόσφατες αλλαγές σελίδω $lang['btn_upload'] = 'Φόρτωση'; $lang['btn_cancel'] = 'Ακύρωση'; $lang['btn_index'] = 'Κατάλογος'; -$lang['btn_secedit'] = 'Τροποποίηση'; -$lang['btn_login'] = 'Είσοδος χρήστη'; -$lang['btn_logout'] = 'Έξοδος χρήστη'; +$lang['btn_secedit'] = 'Επεξεργασία'; +$lang['btn_login'] = 'Σύνδεση χρήστη'; +$lang['btn_logout'] = 'Αποσύνδεση χρήστη'; $lang['btn_admin'] = 'Διαχείριση'; $lang['btn_update'] = 'Ενημέρωση'; $lang['btn_delete'] = 'Σβήσιμο'; $lang['btn_back'] = 'Πίσω'; -$lang['btn_backlink'] = 'Σύνδεσμοι προς την τρέχουσα σελίδα'; +$lang['btn_backlink'] = 'Σύνδεσμοι προς αυτή τη σελίδα'; $lang['btn_backtomedia'] = 'Επιστροφή στην επιλογή αρχείων'; $lang['btn_subscribe'] = 'Εγγραφή σε λήψη ενημερώσεων σελίδας'; -$lang['btn_profile'] = 'Τροποποίηση προφίλ'; +$lang['btn_profile'] = 'Επεξεργασία προφίλ'; $lang['btn_reset'] = 'Ακύρωση'; $lang['btn_resendpwd'] = 'Αποστολή νέου κωδικού'; -$lang['btn_draft'] = 'Τροποποίηση αυτόματα αποθηκευμένης σελίδας'; +$lang['btn_draft'] = 'Επεξεργασία αυτόματα αποθηκευμένης σελίδας'; $lang['btn_recover'] = 'Επαναφορά αυτόματα αποθηκευμένης σελίδας'; $lang['btn_draftdel'] = 'Διαγραφή αυτόματα αποθηκευμένης σελίδας'; $lang['btn_revert'] = 'Αποκατάσταση'; @@ -55,7 +55,7 @@ $lang['oldpass'] = 'Επιβεβαίωση τρέχοντος κω $lang['passchk'] = 'ακόμη μια φορά'; $lang['remember'] = 'Απομνημόνευση στοιχείων λογαριασμού'; $lang['fullname'] = 'Ονοματεπώνυμο'; -$lang['email'] = 'E-Mail'; +$lang['email'] = 'e-mail'; $lang['register'] = 'Εγγραφή'; $lang['profile'] = 'Προφίλ χρήστη'; $lang['badlogin'] = 'Συγνώμη, το όνομα χρήστη ή ο κωδικός ήταν λανθασμένο.'; @@ -67,15 +67,15 @@ $lang['reguexists'] = 'Αυτός ο λογαριασμός υπάρ $lang['regsuccess'] = 'Ο λογαριασμός δημιουργήθηκε και ο κωδικός εστάλει με e-mail.'; $lang['regsuccess2'] = 'Ο λογαριασμός δημιουργήθηκε.'; $lang['regmailfail'] = 'Φαίνεται να υπάρχει πρόβλημα με την αποστολή του κωδικού μέσω e-mail. Παρακαλούμε επικοινωνήστε μαζί μας!'; -$lang['regbadmail'] = 'Η διεύθυνση e-mail δεν δείχνει έγκυρη - εάν πιστεύετε ότι αυτό είναι λάθος, επικοινωνήστε μαζί μας'; +$lang['regbadmail'] = 'Η διεύθυνση e-mail δεν είναι έγκυρη - εάν πιστεύετε ότι αυτό είναι λάθος, επικοινωνήστε μαζί μας'; $lang['regbadpass'] = 'Οι δύο κωδικοί δεν είναι ίδιοι, προσπαθήστε ξανά.'; $lang['regpwmail'] = 'Ο κωδικός σας'; $lang['reghere'] = 'Δεν έχετε λογαριασμό ακόμη? Δημιουργήστε έναν'; -$lang['profna'] = 'Αυτό το wiki δεν υποστηρίζει την τροποποίηση προφίλ.'; +$lang['profna'] = 'Αυτό το wiki δεν υποστηρίζει την επεξεργασία προφίλ.'; $lang['profnochange'] = 'Καμία αλλαγή.'; $lang['profnoempty'] = 'Δεν επιτρέπεται κενό όνομα χρήστη η κενή διεύθυνση email.'; $lang['profchanged'] = 'Το προφίλ χρήστη τροποποιήθηκε επιτυχώς.'; -$lang['pwdforget'] = 'Ξεχάσατε το κωδικό σας? Αποκτήστε νέο.'; +$lang['pwdforget'] = 'Ξεχάσατε το κωδικό σας; Αποκτήστε νέο.'; $lang['resendna'] = 'Αυτό το wiki δεν υποστηρίζει την εκ\' νέου αποστολή κωδικών.'; $lang['resendpwd'] = 'Αποστολή νέων κωδικών για τον χρήστη'; $lang['resendpwdmissing'] = 'Πρέπει να συμπληρώσετε όλα τα πεδία.'; @@ -83,7 +83,7 @@ $lang['resendpwdnouser'] = 'Αυτός ο χρήστης δεν υπάρχ $lang['resendpwdbadauth'] = 'Αυτός ο κωδικός ενεργοποίησης δεν είναι έγκυρος.'; $lang['resendpwdconfirm'] = 'Ο σύνδεσμος προς την σελίδα ενεργοποίησης εστάλει με e-mail.'; $lang['resendpwdsuccess'] = 'Ο νέος σας κωδικός εστάλη με e-mail.'; -$lang['license'] = 'Εκτός εάν αναφέρεται διαφορετικά, το υλικό αυτού του wiki διατίθεται κάτω από την ακόλουθη άδεια:'; +$lang['license'] = 'Εκτός εάν αναφέρεται διαφορετικά, το περιεχόμενο σε αυτο το wiki διέπεται από την ακόλουθη άδεια:'; $lang['licenseok'] = 'Σημείωση: Τροποποιώντας αυτή την σελίδα αποδέχεστε την διάθεση του υλικού σας σύμφωνα με την ακόλουθη άδεια:'; $lang['searchmedia'] = 'Αναζήτηση αρχείου:'; $lang['searchmedia_in'] = 'Αναζήτηση σε %s'; @@ -92,9 +92,9 @@ $lang['txt_filename'] = 'Επιλέξτε νέο όνομα αρχεί $lang['txt_overwrt'] = 'Αντικατάσταση υπάρχοντος αρχείου'; $lang['lockedby'] = 'Προσωρινά κλειδωμένο από'; $lang['lockexpire'] = 'Το κλείδωμα λήγει στις'; -$lang['willexpire'] = 'Το κλείδωμά σας για την επεξεργασία αυτής της σελίδας θα λήξει σε ένα λεπτό.\n Για να το ανανεώσετε χρησιμοποιήστε την επιλογή Προεπισκόπηση.'; +$lang['willexpire'] = 'Το κλείδωμά σας για την επεξεργασία αυτής της σελίδας θα λήξει σε ένα λεπτό.\n Για να το ανανεώσετε χρησιμοποιήστε την Προεπισκόπηση.'; $lang['js']['notsavedyet'] = 'Οι μη αποθηκευμένες αλλαγές θα χαθούν. -Θέλετε να συνεχίσετε?'; +Θέλετε να συνεχίσετε;'; $lang['js']['searchmedia'] = 'Αναζήτηση για αρχεία'; $lang['js']['keepopen'] = 'Το παράθυρο να μην κλείνει'; $lang['js']['hidedetails'] = 'Απόκρυψη λεπτομερειών'; @@ -107,25 +107,25 @@ $lang['js']['mediaclose'] = 'Κλείσιμο'; $lang['js']['mediainsert'] = 'Εισαγωγή'; $lang['js']['mediadisplayimg'] = 'Προβολή εικόνας.'; $lang['js']['mediadisplaylnk'] = 'Προβολή μόνο του συνδέσμου.'; -$lang['js']['mediasmall'] = 'Μικρή έκδοση'; -$lang['js']['mediamedium'] = 'Μεσαία έκδοση'; -$lang['js']['medialarge'] = 'Μεγάλη έκδοση'; -$lang['js']['mediaoriginal'] = 'Κανονική έκδοση'; +$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']['medialeft'] = 'Αριστερή στοίχιση εικόνας.'; +$lang['js']['mediaright'] = 'Δεξιά στοίχιση εικόνας.'; +$lang['js']['mediacenter'] = 'Κέντρική στοίχιση εικόνας.'; +$lang['js']['medianoalign'] = 'Χωρίς στοίχηση.'; $lang['js']['nosmblinks'] = 'Οι σύνδεσμοι προς Windows shares δουλεύουν μόνο στον Microsoft Internet Explorer. Μπορείτε πάντα να κάνετε αντιγραφή και επικόλληση του συνδέσμου.'; $lang['js']['linkwiz'] = 'Αυτόματος Οδηγός Συνδέσμων'; $lang['js']['linkto'] = 'Σύνδεση σε:'; -$lang['js']['del_confirm'] = 'Να διαγραφεί?'; +$lang['js']['del_confirm'] = 'Να διαγραφεί;'; $lang['js']['mu_btn'] = 'Ταυτόχρονη φόρτωση πολλαπλών φακέλων'; -$lang['rssfailed'] = 'Εμφανίστηκε κάποιο σφάλμα κατά την ανάγνωση αυτού του feed: '; +$lang['rssfailed'] = 'Παρουσιάστηκε κάποιο σφάλμα κατά την ανάγνωση αυτού του feed: '; $lang['nothingfound'] = 'Δεν βρέθηκαν σχετικά αποτελέσματα.'; $lang['mediaselect'] = 'Επιλογή Αρχείων'; $lang['fileupload'] = 'Φόρτωση αρχείου'; @@ -156,7 +156,7 @@ $lang['quickhits'] = 'Σχετικές σελίδες'; $lang['toc'] = 'Πίνακας Περιεχομένων'; $lang['current'] = 'τρέχουσα'; $lang['yours'] = 'Η έκδοσή σας'; -$lang['diff'] = 'προβολή διαφορών με την τρέχουσα έκδοση'; +$lang['diff'] = 'Προβολή διαφορών με την τρέχουσα έκδοση'; $lang['diff2'] = 'Προβολή διαφορών μεταξύ των επιλεγμένων εκδόσεων'; $lang['difflink'] = 'Σύνδεσμος σε αυτή την προβολή διαφορών.'; $lang['diff_type'] = 'Προβολή διαφορών:'; @@ -221,12 +221,12 @@ $lang['img_camera'] = 'Camera'; $lang['img_keywords'] = 'Λέξεις-κλειδιά'; $lang['subscr_subscribe_success'] = 'Ο/η %s προστέθηκε στην λίστα ειδοποιήσεων για το %s'; $lang['subscr_subscribe_error'] = 'Σφάλμα κατά την προσθήκη του/της %s στην λίστα ειδοποιήσεων για το %s'; -$lang['subscr_subscribe_noaddress'] = 'Δεν υπάρχει διεύθυνση ταχυδρομείου, συσχετισμένη με το όνομα χρήστη σας, κατά συνέπεια δεν μπορείτε να προστεθείτε στην λίστα ειδοποιήσεων'; +$lang['subscr_subscribe_noaddress'] = 'Δεν υπάρχει διεύθυνση ταχυδρομείου συσχετισμένη με το όνομα χρήστη σας. Κατά συνέπεια δεν μπορείτε να προστεθείτε στην λίστα ειδοποιήσεων'; $lang['subscr_unsubscribe_success'] = 'Ο/η %s, απομακρύνθηκε από την λίστα ειδοποιήσεων για το %s'; $lang['subscr_unsubscribe_error'] = 'Σφάλμα κατά την απομάκρυνση του/της %s στην λίστα ειδοποιήσεων για το %s'; $lang['subscr_already_subscribed'] = 'Ο/η %s είναι ήδη στην λίστα ειδοποίησης για το %s'; $lang['subscr_not_subscribed'] = 'Ο/η %s δεν είναι στην λίστα ειδοποίησης για το %s'; -$lang['subscr_m_not_subscribed'] = 'Αυτήν την στιγμή, δεν είσαστε γραμμένος/η στην λίστα ειδοποίησης της τρέχουσας σελίδας ή φακέλου.'; +$lang['subscr_m_not_subscribed'] = 'Αυτήν την στιγμή, δεν είσαστε εγεγγραμμένος/η στην λίστα ειδοποίησης της τρέχουσας σελίδας ή φακέλου.'; $lang['subscr_m_new_header'] = 'Προσθήκη στην λίστα ειδοποίησης'; $lang['subscr_m_current_header'] = 'Τρέχουσες εγγραφές ειδοποιήσεων'; $lang['subscr_m_unsubscribe'] = 'Διαγραφή'; @@ -234,17 +234,17 @@ $lang['subscr_m_subscribe'] = 'Εγγραφή'; $lang['subscr_m_receive'] = 'Λήψη'; $lang['subscr_style_every'] = 'email σε κάθε αλλαγή'; $lang['subscr_style_digest'] = 'συνοπτικό email αλλαγών της σελίδας (κάθε %.2f μέρες)'; -$lang['subscr_style_list'] = 'λίστα αλλαγμένων σελίδων μετά από το τελευταίο email (κάθε %.2f μέρες)'; +$lang['subscr_style_list'] = 'λίστα σελίδων με αλλαγές μετά από το τελευταίο email (κάθε %.2f μέρες)'; $lang['authmodfailed'] = 'Κακή ρύθμιση λίστας χρηστών. Παρακαλούμε ενημερώστε τον διαχειριστή του wiki.'; -$lang['authtempfail'] = 'Η είσοδος χρηστών δεν λειτουργεί αυτή την στιγμή. Εάν αυτό διαρκεί για πολύ χρόνο, παρακαλούμε ενημερώστε τον διαχειριστή του wiki.'; +$lang['authtempfail'] = 'Η συνδεση χρηστών είναι απενεργοποιημένη αυτή την στιγμή. Αν αυτό διαρκέσει για πολύ, παρακαλούμε ενημερώστε τον διαχειριστή του wiki.'; $lang['i_chooselang'] = 'Επιλογή γλώσσας'; $lang['i_installer'] = 'Οδηγός εγκατάστασης DokuWiki'; $lang['i_wikiname'] = 'Ονομασία wiki'; -$lang['i_enableacl'] = 'Ενεργοποίηση Λίστας Δικαιωμάτων Πρόσβασης - ACL (συνιστάται)'; +$lang['i_enableacl'] = 'Ενεργοποίηση Λίστας Δικαιωμάτων Πρόσβασης - ACL (συνίσταται)'; $lang['i_superuser'] = 'Διαχειριστής'; $lang['i_problems'] = 'Ο οδηγός εγκατάστασης συνάντησε τα προβλήματα που αναφέρονται παρακάτω. Η εγκατάσταση δεν θα ολοκληρωθεί επιτυχώς μέχρι να επιλυθούν αυτά τα προβλήματα.'; $lang['i_modified'] = 'Για λόγους ασφαλείας, ο οδηγός εγκατάστασης λειτουργεί μόνο με νέες και μη τροποποιημένες εγκαταστάσεις Dokuwiki. -Πρέπει είτε να κάνετε νέα εγκατάσταση, χρησιμοποιώντας το αρχικό πακέτο εγκατάστασης, ή να συμβουλευτείτε τις οδηγίες εγκατάστασης της εφαρμογής.'; +Πρέπει είτε να κάνετε νέα εγκατάσταση, χρησιμοποιώντας το αρχικό πακέτο εγκατάστασης, ή να συμβουλευτείτε τις οδηγίες εγκατάστασης της εφαρμογής.'; $lang['i_funcna'] = 'Η λειτουργία %s της PHP δεν είναι διαθέσιμη. Πιθανόν να είναι απενεργοποιημένη στις ρυθμίσεις έναρξης της PHP'; $lang['i_phpver'] = 'Η έκδοση %s της PHP που έχετε είναι παλαιότερη της απαιτούμενης %s. Πρέπει να αναβαθμίσετε την PHP.'; $lang['i_permfail'] = 'Ο φάκελος %s δεν είναι εγγράψιμος από την εφαρμογή DokuWiki. Πρέπει να διορθώσετε τα δικαιώματα πρόσβασης αυτού του φακέλου!'; @@ -271,16 +271,16 @@ $lang['mu_ready'] = 'έτοιμο για φόρτωση'; $lang['mu_done'] = 'ολοκληρώθηκε'; $lang['mu_fail'] = 'απέτυχε'; $lang['mu_authfail'] = 'η συνεδρία έληξε'; -$lang['mu_progress'] = '@PCT@% φορτώθηκε'; +$lang['mu_progress'] = 'φορτώθηκε @PCT@%'; $lang['mu_filetypes'] = 'Επιτρεπτοί τύποι αρχείων'; $lang['mu_info'] = 'τα αρχεία ανέβηκαν.'; $lang['mu_lasterr'] = 'Τελευταίο σφάλμα:'; $lang['recent_global'] = 'Βλέπετε τις αλλαγές εντός του φακέλου %s. Μπορείτε επίσης να δείτε τις πρόσφατες αλλαγές σε όλο το wiki.'; -$lang['years'] = 'πριν από %d χρόνια'; -$lang['months'] = 'πριν από %d μήνες'; -$lang['weeks'] = 'πριν από %d εβδομάδες'; -$lang['days'] = 'πριν από %d ημέρες'; -$lang['hours'] = 'πριν από %d ώρες'; -$lang['minutes'] = 'πριν από %d λεπτά'; -$lang['seconds'] = 'πριν από %d δευτερόλεπτα'; -$lang['wordblock'] = 'Η αλλαγή σας δεν αποθηκεύτηκε γιατί περιείχε μπλοκαρισμένο κείμενο (spam).'; +$lang['years'] = 'πριν %d χρόνια'; +$lang['months'] = 'πριν %d μήνες'; +$lang['weeks'] = 'πριν %d εβδομάδες'; +$lang['days'] = 'πριν %d ημέρες'; +$lang['hours'] = 'πριν %d ώρες'; +$lang['minutes'] = 'πριν %d λεπτά'; +$lang['seconds'] = 'πριν %d δευτερόλεπτα'; +$lang['wordblock'] = 'Η αλλαγή σας δεν αποθηκεύτηκε γιατί περιείχε spam.'; \ No newline at end of file diff --git a/inc/lang/el/locked.txt b/inc/lang/el/locked.txt index d2f542c19..425c334f1 100644 --- a/inc/lang/el/locked.txt +++ b/inc/lang/el/locked.txt @@ -1,4 +1,5 @@ ====== Κλειδωμένη σελίδα ====== -Αυτή η σελίδα είναι προς το παρόν δεσμευμένη για τροποποίηση από άλλον χρήστη. Θα πρέπει να περιμένετε μέχρι ο συγκεκριμένος χρήστης να τελειώσει την τροποποίηση ή να εκπνεύσει το χρονικό όριο για το σχετικό κλείδωμα. +Αυτή η σελίδα είναι προς το παρόν δεσμευμένη για τροποποίηση από άλλον χρήστη. +Θα πρέπει να περιμένετε μέχρι ο συγκεκριμένος χρήστης να σταματήσει να την επεξεργάζεται ή να εκπνεύσει το χρονικό όριο για το σχετικό κλείδωμα. diff --git a/inc/lang/el/login.txt b/inc/lang/el/login.txt index 3839b7279..3021a19ea 100644 --- a/inc/lang/el/login.txt +++ b/inc/lang/el/login.txt @@ -1,3 +1,5 @@ -====== Είσοδος χρήστη ====== +====== Σύνδεση χρήστη ====== -Αυτή την στιγμή δεν έχετε συνδεθεί ως χρήστης! Για να συνδεθείτε, εισάγετε τα στοιχεία σας στην παρακάτω φόρμα. Πρέπει να έχετε ενεργοποιήσει τα cookies στον φυλλομετρητή σας. +Αυτή την στιγμή δεν έχετε συνδεθεί ως χρήστης! +Για να συνδεθείτε, εισάγετε τα στοιχεία σας στην παρακάτω φόρμα. +Πρέπει να έχετε ενεργοποιήσει τα cookies στο πρόγραμμα περιήγηση σας. diff --git a/inc/lang/el/newpage.txt b/inc/lang/el/newpage.txt index e8d65d6e5..3349ad90e 100644 --- a/inc/lang/el/newpage.txt +++ b/inc/lang/el/newpage.txt @@ -1,3 +1,4 @@ ====== Αυτή η σελίδα δεν υπάρχει ακόμη ====== -Η σελίδα που ζητάτε δεν υπάρχει ακόμη. Εάν όμως έχετε επαρκή δικαιώματα, μπορείτε να την δημιουργήσετε επιλέγοντας ''Δημιουργία σελίδας''. +Η σελίδα που ζητάτε δεν υπάρχει ακόμη. +Aν όμως έχετε επαρκή δικαιώματα, μπορείτε να την δημιουργήσετε επιλέγοντας ''Δημιουργία σελίδας''. diff --git a/inc/lang/el/norev.txt b/inc/lang/el/norev.txt index 9ce347948..2b13290ff 100644 --- a/inc/lang/el/norev.txt +++ b/inc/lang/el/norev.txt @@ -1,4 +1,5 @@ -====== Δεν υπάρχει τέτοια έκδοση ====== +====== Αυτή η έκδοση δεν υπάρχει ====== -Η έκδοση που αναζητήσατε δεν υπάρχει. Επιλέξτε ''Παλαιότερες εκδόσεις σελίδας'' για να δείτε την λίστα με τις παλαιότερες εκδόσεις της τρέχουσας σελίδας. +Η έκδοση που αναζητήσατε δεν υπάρχει. +Μπορείτε να δείτε λίστα με τις παλαιότερες εκδόσεις της τρέχουσας σελίδας πατώντας ''Παλαιότερες εκδόσεις σελίδας''. diff --git a/inc/lang/el/password.txt b/inc/lang/el/password.txt index 621a215f0..d27fbb3c3 100644 --- a/inc/lang/el/password.txt +++ b/inc/lang/el/password.txt @@ -2,8 +2,8 @@ Αυτά είναι τα στοιχεία εισόδου για το @TITLE@ στο @DOKUWIKIURL@ -Όνομα : @LOGIN@ -Κωδικός : @PASSWORD@ +Όνομα : @LOGIN@ +Συνθηματικό : @PASSWORD@ -- Αυτό το e-mail δημιουργήθηκε αυτόματα από την εφαρμογή DokuWiki στην διεύθυνση diff --git a/inc/lang/el/preview.txt b/inc/lang/el/preview.txt index f6709a441..aef65c974 100644 --- a/inc/lang/el/preview.txt +++ b/inc/lang/el/preview.txt @@ -1,4 +1,5 @@ ====== Προεπισκόπηση ====== -Αυτή είναι μια προεπισκόπηση του πως θα δείχνει η σελίδα. Θυμηθείτε: Οι αλλαγές σας **δεν έχουν αποθηκευθεί** ακόμη! +Αυτή είναι μια προεπισκόπηση του πως θα δείχνει η σελίδα. +Υπενθύμιση: Οι αλλαγές σας **δεν έχουν αποθηκευθεί** ακόμη! diff --git a/inc/lang/el/pwconfirm.txt b/inc/lang/el/pwconfirm.txt index 03f408819..a9e58be7d 100644 --- a/inc/lang/el/pwconfirm.txt +++ b/inc/lang/el/pwconfirm.txt @@ -1,11 +1,11 @@ Γεια σας @FULLNAME@! -Κάποιος ζήτησε τη δημιουργία νέου κωδικού για τον λογαριασμό @TITLE@ +Κάποιος ζήτησε τη δημιουργία νέου συνθηματικού για τον λογαριασμό @TITLE@ που διατηρείτε στο @DOKUWIKIURL@ -Εάν δεν ζητήσατε εσείς την δημιουργία νέου κωδικού απλά αγνοήστε αυτό το e-mail. +Αν δεν ζητήσατε εσείς την δημιουργία νέου συνθηματικού απλά αγνοήστε αυτό το e-mail. -Εάν όντως εσείς ζητήσατε την δημιουργία νέου κωδικού, ακολουθήστε τον παρακάτω σύνδεσμο για να το επιβεβαιώσετε. +Αν όντως εσείς ζητήσατε την δημιουργία νέου συνθηματικού, ακολουθήστε τον παρακάτω σύνδεσμο για να το επιβεβαιώσετε. @CONFIRM@ diff --git a/inc/lang/el/read.txt b/inc/lang/el/read.txt index 2d43c28fc..a620ab559 100644 --- a/inc/lang/el/read.txt +++ b/inc/lang/el/read.txt @@ -1 +1,2 @@ -Μπορείτε μόνο να διαβάσετε αυτή την σελίδα και όχι να την τροποποιήσετε. Εάν πιστεύετε ότι αυτό δεν είναι σωστό, απευθυνθείτε στον διαχειριστή της εφαρμογής. +Μπορείτε να διαβάσετε αυτή την σελίδα αλλά δεν μπορείτε να την τροποποιήσετε. +Αν πιστεύετε ότι αυτό δεν είναι σωστό, απευθυνθείτε στον διαχειριστή της εφαρμογής. diff --git a/inc/lang/el/recent.txt b/inc/lang/el/recent.txt index cc8051581..78c74a655 100644 --- a/inc/lang/el/recent.txt +++ b/inc/lang/el/recent.txt @@ -1,3 +1,3 @@ -====== Πρόσφατες αλλαγές σελίδων ====== +====== Πρόσφατες αλλαγές ====== Οι παρακάτω σελίδες τροποποιήθηκαν πρόσφατα: diff --git a/inc/lang/el/register.txt b/inc/lang/el/register.txt index 15d64cba3..6a4e963e4 100644 --- a/inc/lang/el/register.txt +++ b/inc/lang/el/register.txt @@ -1,3 +1,5 @@ ====== Εγγραφή νέου χρήστη ====== -Συμπληρώστε όλα τα παρακάτω πεδία για να δημιουργήσετε ένα νέο λογαριασμό σε αυτό το wiki. Πρέπει να δώσετε μια **υπαρκτή e-mail διεύθυνση** - ο κωδικός σας θα σας αποσταλεί σε αυτήν. Το όνομα χρήστη θα πρέπει να πληρεί τις ίδιες απαιτήσεις ονόματος που ισχύουν και για τους [[doku>pagename|φακέλους]]. +Συμπληρώστε όλα τα παρακάτω πεδία για να δημιουργήσετε ένα νέο λογαριασμό σε αυτό το wiki. +Πρέπει να δώσετε μια **υπαρκτή e-mail διεύθυνση** - ο κωδικός σας θα σας αποσταλεί σε αυτήν. +Το όνομα χρήστη θα πρέπει να πληρεί τις ίδιες απαιτήσεις ονόματος που ισχύουν και για τους [[doku>el:pagename|φακέλους]]. diff --git a/inc/lang/el/registermail.txt b/inc/lang/el/registermail.txt index 5d516ee31..0b3e0b78b 100644 --- a/inc/lang/el/registermail.txt +++ b/inc/lang/el/registermail.txt @@ -1,4 +1,4 @@ -Ένας νέος χρήστης εγγράφηκε. Αυτές είναι οι λεπτομέρειες: +Ένας νέος χρήστης εγγράφηκε. Ορίστε οι λεπτομέρειες: Χρήστης : @NEWUSER@ Όνομα : @NEWNAME@ diff --git a/inc/lang/el/resendpwd.txt b/inc/lang/el/resendpwd.txt index 2b91ed017..6b4f3bbca 100644 --- a/inc/lang/el/resendpwd.txt +++ b/inc/lang/el/resendpwd.txt @@ -1,4 +1,6 @@ ====== Αποστολή νέου κωδικού ====== -Συμπληρώστε όλα τα παρακάτω πεδία για να λάβετε ένα νέο κωδικό για τον λογαριασμό σας σε αυτό το wiki. Ο νέος κωδικός σας θα σταλεί στην e-mail διεύθυνση που έχετε ήδη δηλώσει. Το όνομα πρέπει να είναι αυτό που ισχύει για τον λογαριασμό σας σε αυτό το wiki. +Συμπληρώστε όλα τα παρακάτω πεδία για να λάβετε ένα νέο κωδικό για τον λογαριασμό σας σε αυτό το wiki. +Ο νέος κωδικός σας θα σταλεί στην e-mail διεύθυνση που έχετε ήδη δηλώσει. +Το όνομα πρέπει να είναι αυτό που ισχύει για τον λογαριασμό σας σε αυτό το wiki. diff --git a/inc/lang/el/revisions.txt b/inc/lang/el/revisions.txt index 7689c3b2b..955fa1703 100644 --- a/inc/lang/el/revisions.txt +++ b/inc/lang/el/revisions.txt @@ -1,3 +1,8 @@ ====== Παλαιότερες εκδόσεις σελίδας ====== -Οι παρακάτω είναι παλαιότερες εκδόσεις της τρέχουσας σελίδας. Εάν θέλετε να αντικαταστήσετε την τρέχουσα σελίδα με κάποια από τις παλαιότερες εκδόσεις της, επιλέξτε την σχετική έκδοση, επιλέξτε ''Τροποποίηση σελίδας'', κάνετε τυχόν αλλαγές και αποθηκεύστε την. +Οι παρακάτω είναι παλαιότερες εκδόσεις της τρέχουσας σελίδας. +Εάν θέλετε να αντικαταστήσετε την τρέχουσα σελίδα με κάποια από τις παλαιότερες εκδόσεις της κάντε τα παρακάτω: + * επιλέξτε την σχετική έκδοση + * επιλέξτε ''Τροποποίηση σελίδας'' + * κάνετε τυχόν αλλαγές + * αποθηκεύστε την diff --git a/inc/lang/el/searchpage.txt b/inc/lang/el/searchpage.txt index 87f396292..b52162b60 100644 --- a/inc/lang/el/searchpage.txt +++ b/inc/lang/el/searchpage.txt @@ -1,5 +1,4 @@ ====== Αναζήτηση ====== -Τα αποτελέσματα της αναζήτησής σας ακολουθούν. +Τα αποτελέσματα της αναζήτησής σας: -===== Αποτελέσματα ===== \ No newline at end of file diff --git a/inc/lang/el/showrev.txt b/inc/lang/el/showrev.txt index 212245420..a6ba3f99e 100644 --- a/inc/lang/el/showrev.txt +++ b/inc/lang/el/showrev.txt @@ -1,2 +1,2 @@ -**Αυτή είναι μια παλαιότερη έκδοση της σελίδας!** +**Βλέπετε μια παλαιότερη έκδοση της σελίδας!** ---- diff --git a/inc/lang/el/stopwords.txt b/inc/lang/el/stopwords.txt index bc6eb48ae..01d5103b3 100644 --- a/inc/lang/el/stopwords.txt +++ b/inc/lang/el/stopwords.txt @@ -1,29 +1,103 @@ # This is a list of words the indexer ignores, one word per line # When you edit this file be sure to use UNIX line endings (single newline) # No need to include words shorter than 3 chars - these are ignored anyway -# This list is based upon the ones found at http://www.ranks.nl/stopwords/ -about -are -and -you -your -them -their -com -for -from -into -how -that -the -this -was -what -when -where -who -will -with -und -the -www +# This list is provided by Fotis Lazarinis based on his research found at: http://lazarinf.teimes.gr/papers/J8.pdf +και +ήταν +το +ενός +να +πολύ +του +όμως +η +κατά +της +αυτή +με +όταν +που +μέσα +την +οποίο +από +πως +για +έτσι +τα +στους +είναι +μέσω +των +όλα +σε +καθώς +ο +αυτά +οι +προς +στο +ένας +θα +πριν +τη +μου +στην +όχι +τον +χωρίς +τους +επίσης +δεν +μεταξύ +τις +μέχρι +ένα +έναν +μια +μιας +ότι +αφού +ή +ακόμα +στη +όπου +στα +είχε +μας +δηλαδή +αλλά +τρόπος +στον +όσο +στις +ακόμη +αυτό +τόσο +όπως +έχουμε +αν +ώστε +μπορεί +αυτές +μετά +γιατί +σας +πάνω +δύο +τότε +τι +τώρα +ως +κάτι +κάθε +άλλο +πρέπει +μην +πιο +εδώ +οποία +είτε +μόνο +μη +ενώ \ No newline at end of file diff --git a/inc/lang/el/subscr_digest.txt b/inc/lang/el/subscr_digest.txt index 1a0f44d14..7dd0345d7 100644 --- a/inc/lang/el/subscr_digest.txt +++ b/inc/lang/el/subscr_digest.txt @@ -11,10 +11,9 @@ Νέα έκδοση: @NEWPAGE@ Για να σταματήσουν αυτές οι ειδοποιήσεις συνδεθείτε -στο wiki στην διεύθυνση @DOKUWIKIURL@ και στην -συνέχεια επισκεφθείτε το @SUBSCRIBE@ και -διαγραφείτε από τις ειδοποιήσεις της σελίδας ή -φακέλου. +στο wiki στην διεύθυνση @DOKUWIKIURL@ +και στην συνέχεια επισκεφθείτε το @SUBSCRIBE@ +και διαγραφείτε από τις ειδοποιήσεις της σελίδας ή του φακέλου. -- Αυτό το μήνυμα παράχθηκε απο το DokuWiki στην diff --git a/inc/lang/el/subscr_list.txt b/inc/lang/el/subscr_list.txt index f5cb8023d..97b8dc47d 100644 --- a/inc/lang/el/subscr_list.txt +++ b/inc/lang/el/subscr_list.txt @@ -10,11 +10,10 @@ @DIFF@ -------------------------------------------------------- -Για να σταματήσουν αυτές οι ειδοποιήσεις συνδεθείτε -στο wiki στην διεύθυνση @DOKUWIKIURL@ και στην -συνέχεια επισκεφθείτε το @SUBSCRIBE@ και -διαγραφείτε από τις ειδοποιήσεις της σελίδας ή -φακέλου. +Για να σταματήσουν αυτές οι ειδοποιήσεις συνδεθείτε στο wiki +στην διεύθυνση @DOKUWIKIURL@ +και στην συνέχεια επισκεφθείτε το @SUBSCRIBE@ +και διαγραφείτε από τις ειδοποιήσεις της σελίδας ή του φακέλου. -- Αυτό το μήνυμα παράχθηκε απο το DokuWiki στην diff --git a/inc/lang/el/subscr_single.txt b/inc/lang/el/subscr_single.txt index 9815cc0bb..610af49a2 100644 --- a/inc/lang/el/subscr_single.txt +++ b/inc/lang/el/subscr_single.txt @@ -12,11 +12,10 @@ Παλιά έκδοση: @OLDPAGE@ Νέα έκδοση: @NEWPAGE@ -Για να σταματήσουν αυτές οι ειδοποιήσεις συνδεθείτε -στο wiki στην διεύθυνση @DOKUWIKIURL@ και στην -συνέχεια επισκεφθείτε το @SUBSCRIBE@ και -διαγραφείτε από τις ειδοποιήσεις της σελίδας ή -φακέλου. +Για να σταματήσουν αυτές οι ειδοποιήσεις συνδεθείτε στο wiki +στην διεύθυνση @DOKUWIKIURL@ +και στην συνέχεια επισκεφθείτε το @SUBSCRIBE@ +και διαγραφείτε από τις ειδοποιήσεις της σελίδας ή του φακέλου. -- Αυτό το μήνυμα παράχθηκε απο το DokuWiki στην diff --git a/inc/lang/el/updateprofile.txt b/inc/lang/el/updateprofile.txt index ccb9596b6..56f176d37 100644 --- a/inc/lang/el/updateprofile.txt +++ b/inc/lang/el/updateprofile.txt @@ -1,3 +1,4 @@ ====== Τροποποίηση προφίλ ====== -Τροποποιήστε **μόνο** τα πεδία που θέλετε να αλλάξετε. Δεν μπορείτε να αλλάξετε το πεδίο ''Όνομα''. +Τροποποιήστε **μόνο** τα πεδία που θέλετε να αλλάξετε. +Δεν μπορείτε να αλλάξετε το πεδίο ''Όνομα''. -- cgit v1.2.3 From f6896f7b9d2a9e838f146a100203b95056b8eb1b Mon Sep 17 00:00:00 2001 From: Petsagourakis George Date: Sat, 12 Feb 2011 16:56:19 +0200 Subject: fixed error in popularity/helper.php (a quoted array instruction error'd ...) --- lib/plugins/popularity/helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index 629d0bd67..5ce562319 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -60,7 +60,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { $result[] = array( 'name' => 'lastSentTime', 'desc' => 'Compute the last time popularity data was sent', - 'params' => 'array()', + 'params' => array(), 'return' => array('data' => 'int') ); return $result; -- cgit v1.2.3 From 02b284de4efc44cb4bf5024d4605d10b4fa895e3 Mon Sep 17 00:00:00 2001 From: Petsagourakis George Date: Sat, 12 Feb 2011 16:57:36 +0200 Subject: some more fixes on the Greek language --- inc/lang/el/lang.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index b8c8698f5..da79e5711 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -23,10 +23,10 @@ $lang['btn_search'] = 'Αναζήτηση'; $lang['btn_save'] = 'Αποθήκευση'; $lang['btn_preview'] = 'Προεπισκόπηση'; $lang['btn_top'] = 'Επιστροφή στην κορυφή της σελίδας'; -$lang['btn_newer'] = '<< πλέον πρόσφατες'; -$lang['btn_older'] = 'λιγότερο πρόσφατες >>'; +$lang['btn_newer'] = '<< πρόσφατες'; +$lang['btn_older'] = 'παλαιότερες >>'; $lang['btn_revs'] = 'Παλαιότερες εκδόσεις σελίδας'; -$lang['btn_recent'] = 'Πρόσφατες αλλαγές σελίδων'; +$lang['btn_recent'] = 'Πρόσφατες αλλαγές'; $lang['btn_upload'] = 'Φόρτωση'; $lang['btn_cancel'] = 'Ακύρωση'; $lang['btn_index'] = 'Κατάλογος'; -- cgit v1.2.3 From 6e464fc5163b79b488dd47223351210cb7af097a Mon Sep 17 00:00:00 2001 From: Guillaume Turri Date: Sun, 13 Feb 2011 18:47:27 +0100 Subject: French language update --- inc/lang/fr/lang.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 17d35dfa9..b6be994c6 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -174,6 +174,9 @@ $lang['yours'] = 'Votre version'; $lang['diff'] = 'Différences avec la version actuelle'; $lang['diff2'] = 'Différences entre les versions sélectionnées'; $lang['difflink'] = 'Lien vers cette vue'; +$lang['diff_type'] = 'Voir les différences :'; +$lang['diff_inline'] = 'Sur une seule ligne'; +$lang['diff_side'] = 'Côte à côte'; $lang['line'] = 'Ligne'; $lang['breadcrumb'] = 'Piste'; $lang['youarehere'] = 'Vous êtes ici'; -- cgit v1.2.3 From d56f5396654e167eb635689cc3dbbd37c632e601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 13 Feb 2011 13:21:13 +0200 Subject: Add LAN --- conf/acronyms.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/acronyms.conf b/conf/acronyms.conf index 172b9974d..058e85550 100644 --- a/conf/acronyms.conf +++ b/conf/acronyms.conf @@ -62,6 +62,7 @@ JPEG Joint Photographics Experts Group JPG Joint Photographics Experts Group JS JavaScript KISS Keep it simple stupid +LAN Local Area Network LDAP Lightweight Directory Access Protocol LGPL GNU Lesser General Public License LOL Laughing out loud -- cgit v1.2.3 From e6fd17753a51f09dfc4bf01833df638388579178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 13 Feb 2011 13:21:22 +0200 Subject: Add skype interwiki, similar to 023e47d6 Icon downloaded from http://forum.skype.com/style_emoticons/skype/skype.png I asked someone internally for file copyright and answer was ok (do whatever you want) --- lib/images/interwiki/skype.png | Bin 0 -> 946 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 lib/images/interwiki/skype.png diff --git a/lib/images/interwiki/skype.png b/lib/images/interwiki/skype.png new file mode 100644 index 000000000..1f34025c8 Binary files /dev/null and b/lib/images/interwiki/skype.png differ -- cgit v1.2.3 From 9a75132c18b2137de6b86433baed5735c8516751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 13 Feb 2011 13:27:42 +0200 Subject: Add skype interwiki --- conf/interwiki.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/interwiki.conf b/conf/interwiki.conf index 6def35949..28d603de2 100644 --- a/conf/interwiki.conf +++ b/conf/interwiki.conf @@ -27,6 +27,7 @@ phpfn http://www.php.net/{NAME} coral http://{HOST}.{PORT}.nyud.net:8090/{PATH}?{QUERY} freecache http://freecache.org/{NAME} sb http://www.splitbrain.org/go/ +skype skype:{NAME} google.de http://www.google.de/search?q= go http://www.google.com/search?q={URL}&btnI=lucky -- cgit v1.2.3 From d8443bf1e374c48ffa9c075003ad0bf52353455e Mon Sep 17 00:00:00 2001 From: Hakan Sandell Date: Mon, 14 Feb 2011 21:24:31 +0100 Subject: More failsafe XMP parsing in jpeg pictures --- inc/JpegMeta.php | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index fa05f6859..afa70168c 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -1466,16 +1466,21 @@ class JpegMeta { $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); - xml_parse_into_struct($parser, $data, $values, $tags); + $result = xml_parse_into_struct($parser, $data, $values, $tags); xml_parser_free($parser); + if ($result == 0) { + $this->_info['xmp'] = false; + return false; + } + $this->_info['xmp'] = array(); $count = count($values); for ($i = 0; $i < $count; $i++) { if ($values[$i]['tag'] == 'rdf:Description' && $values[$i]['type'] == 'open') { - while ($values[++$i]['tag'] != 'rdf:Description') { - $this->_parseXmpNode($values, $i, $this->_info['xmp'][$values[$i]['tag']]); + while ((++$i < $count) && ($values[$i]['tag'] != 'rdf:Description')) { + $this->_parseXmpNode($values, $i, $this->_info['xmp'][$values[$i]['tag']], $count); } } } @@ -1487,7 +1492,7 @@ class JpegMeta { * * @author Hakan Sandell */ - function _parseXmpNode($values, &$i, &$meta) { + function _parseXmpNode($values, &$i, &$meta, $count) { if ($values[$i]['type'] == 'close') return; if ($values[$i]['type'] == 'complete') { @@ -1497,11 +1502,13 @@ class JpegMeta { } $i++; + if ($i >= $count) return; + if ($values[$i]['tag'] == 'rdf:Bag' || $values[$i]['tag'] == 'rdf:Seq') { // Array property $meta = array(); while ($values[++$i]['tag'] == 'rdf:li') { - $this->_parseXmpNode($values, $i, $meta[]); + $this->_parseXmpNode($values, $i, $meta[], $count); } $i++; // skip closing Bag/Seq tag @@ -1509,8 +1516,8 @@ class JpegMeta { // Language Alternative property, only the first (default) value is used if ($values[$i]['type'] == 'open') { $i++; - $this->_parseXmpNode($values, $i, $meta); - while ($values[++$i]['tag'] != 'rdf:Alt'); + $this->_parseXmpNode($values, $i, $meta, $count); + while ((++$i < $count) && ($values[$i]['tag'] != 'rdf:Alt')); $i++; // skip closing Alt tag } @@ -1519,8 +1526,8 @@ class JpegMeta { $meta = array(); $startTag = $values[$i-1]['tag']; do { - $this->_parseXmpNode($values, $i, $meta[$values[$i]['tag']]); - } while ($values[++$i]['tag'] != $startTag); + $this->_parseXmpNode($values, $i, $meta[$values[$i]['tag']], $count); + } while ((++$i < $count) && ($values[$i]['tag'] != $startTag)); } } -- cgit v1.2.3 From e7327938e66f43615da3ec05a7f9a89d8dfc0c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Je=CC=81ro=CC=82me=20Tamarelle?= Date: Tue, 15 Feb 2011 00:10:41 +0100 Subject: Accept empty MySQL password for database auth. --- inc/auth/mysql.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php index dbdfe5fda..653c725a3 100644 --- a/inc/auth/mysql.class.php +++ b/inc/auth/mysql.class.php @@ -46,7 +46,7 @@ class auth_mysql extends auth_basic { // set capabilities based upon config strings set if (empty($this->cnf['server']) || empty($this->cnf['user']) || - empty($this->cnf['password']) || empty($this->cnf['database'])){ + !isset($this->cnf['password']) || empty($this->cnf['database'])){ if ($this->cnf['debug']) msg("MySQL err: insufficient configuration.",-1,__LINE__,__FILE__); $this->success = false; -- cgit v1.2.3 From 449095130497f47d1f9ec3f67d70d2eb1c99446e Mon Sep 17 00:00:00 2001 From: Petsagourakis George Date: Fri, 18 Feb 2011 19:49:08 +0200 Subject: Passed every png file through http://www.smushit.com/ysmush.it/ saving some 1-2kb of binary image data --- lib/images/admin/acl.png | Bin 1336 -> 1074 bytes lib/images/admin/config.png | Bin 1761 -> 1496 bytes lib/images/admin/plugin.png | Bin 1415 -> 1128 bytes lib/images/admin/popularity.png | Bin 1420 -> 1192 bytes lib/images/admin/revert.png | Bin 1598 -> 1306 bytes lib/images/admin/usermanager.png | Bin 1850 -> 1476 bytes lib/images/close.png | Bin 1345 -> 137 bytes lib/images/del.png | Bin 433 -> 355 bytes lib/images/diff.png | Bin 219 -> 206 bytes lib/images/error.png | Bin 706 -> 648 bytes lib/images/fileicons/bz2.png | Bin 720 -> 641 bytes lib/images/fileicons/c.png | Bin 774 -> 759 bytes lib/images/fileicons/conf.png | Bin 717 -> 664 bytes lib/images/fileicons/cpp.png | Bin 859 -> 822 bytes lib/images/fileicons/cs.png | Bin 808 -> 771 bytes lib/images/fileicons/csv.png | Bin 480 -> 400 bytes lib/images/fileicons/deb.png | Bin 716 -> 652 bytes lib/images/fileicons/doc.png | Bin 659 -> 584 bytes lib/images/fileicons/docx.png | Bin 659 -> 584 bytes lib/images/fileicons/file.png | Bin 720 -> 583 bytes lib/images/fileicons/gif.png | Bin 1001 -> 907 bytes lib/images/fileicons/gz.png | Bin 716 -> 643 bytes lib/images/fileicons/htm.png | Bin 748 -> 695 bytes lib/images/fileicons/html.png | Bin 748 -> 695 bytes lib/images/fileicons/jpeg.png | Bin 1001 -> 907 bytes lib/images/fileicons/jpg.png | Bin 1001 -> 907 bytes lib/images/fileicons/lua.png | Bin 465 -> 449 bytes lib/images/fileicons/mp3.png | Bin 885 -> 832 bytes lib/images/fileicons/odc.png | Bin 749 -> 682 bytes lib/images/fileicons/odf.png | Bin 807 -> 751 bytes lib/images/fileicons/odg.png | Bin 788 -> 735 bytes lib/images/fileicons/odi.png | Bin 788 -> 735 bytes lib/images/fileicons/odp.png | Bin 744 -> 691 bytes lib/images/fileicons/ods.png | Bin 749 -> 682 bytes lib/images/fileicons/odt.png | Bin 577 -> 524 bytes lib/images/fileicons/ogg.png | Bin 865 -> 807 bytes lib/images/fileicons/pdf.png | Bin 663 -> 595 bytes lib/images/fileicons/php.png | Bin 755 -> 749 bytes lib/images/fileicons/pl.png | Bin 698 -> 685 bytes lib/images/fileicons/png.png | Bin 1001 -> 907 bytes lib/images/fileicons/ppt.png | Bin 762 -> 697 bytes lib/images/fileicons/pptx.png | Bin 762 -> 697 bytes lib/images/fileicons/ps.png | Bin 534 -> 473 bytes lib/images/fileicons/py.png | Bin 714 -> 683 bytes lib/images/fileicons/rar.png | Bin 631 -> 557 bytes lib/images/fileicons/rb.png | Bin 828 -> 802 bytes lib/images/fileicons/rpm.png | Bin 638 -> 555 bytes lib/images/fileicons/rtf.png | Bin 474 -> 403 bytes lib/images/fileicons/sql.png | Bin 865 -> 818 bytes lib/images/fileicons/swf.png | Bin 843 -> 732 bytes lib/images/fileicons/sxc.png | Bin 749 -> 682 bytes lib/images/fileicons/sxd.png | Bin 788 -> 735 bytes lib/images/fileicons/sxi.png | Bin 744 -> 691 bytes lib/images/fileicons/sxw.png | Bin 577 -> 524 bytes lib/images/fileicons/tar.png | Bin 747 -> 663 bytes lib/images/fileicons/tgz.png | Bin 716 -> 643 bytes lib/images/fileicons/txt.png | Bin 542 -> 466 bytes lib/images/fileicons/wav.png | Bin 881 -> 822 bytes lib/images/fileicons/xls.png | Bin 731 -> 670 bytes lib/images/fileicons/xlsx.png | Bin 731 -> 670 bytes lib/images/fileicons/xml.png | Bin 475 -> 409 bytes lib/images/fileicons/zip.png | Bin 874 -> 802 bytes lib/images/history.png | Bin 202 -> 149 bytes lib/images/info.png | Bin 783 -> 725 bytes lib/images/interwiki.png | Bin 1089 -> 1016 bytes lib/images/interwiki/skype.png | Bin 946 -> 675 bytes lib/images/license/badge/cc-by-nc-nd.png | Bin 5281 -> 1704 bytes lib/images/license/badge/cc-by-nc-sa.png | Bin 5460 -> 1815 bytes lib/images/license/badge/cc-by-nc.png | Bin 5145 -> 1639 bytes lib/images/license/badge/cc-by-nd.png | Bin 4880 -> 1492 bytes lib/images/license/badge/cc-by-sa.png | Bin 5083 -> 1626 bytes lib/images/license/badge/cc-by.png | Bin 4739 -> 1397 bytes lib/images/license/badge/cc-zero.png | Bin 1266 -> 1202 bytes lib/images/license/badge/cc.png | Bin 958 -> 898 bytes lib/images/license/badge/gnufdl.png | Bin 1748 -> 1667 bytes lib/images/license/badge/publicdomain.png | Bin 4962 -> 1550 bytes lib/images/license/button/cc-by-nc-nd.png | Bin 678 -> 418 bytes lib/images/license/button/cc-by-nc-sa.png | Bin 686 -> 432 bytes lib/images/license/button/cc-by-nc.png | Bin 663 -> 407 bytes lib/images/license/button/cc-by-nd.png | Bin 658 -> 406 bytes lib/images/license/button/cc-by-sa.png | Bin 661 -> 408 bytes lib/images/license/button/cc-by.png | Bin 629 -> 382 bytes lib/images/license/button/cc-zero.png | Bin 706 -> 432 bytes lib/images/license/button/cc.png | Bin 728 -> 450 bytes lib/images/license/button/gnufdl.png | Bin 839 -> 535 bytes lib/images/license/button/publicdomain.png | Bin 621 -> 381 bytes lib/images/magnifier.png | Bin 615 -> 569 bytes lib/images/media_align_center.png | Bin 294 -> 250 bytes lib/images/media_align_left.png | Bin 312 -> 251 bytes lib/images/media_align_noalign.png | Bin 269 -> 220 bytes lib/images/media_align_right.png | Bin 312 -> 252 bytes lib/images/media_link_direct.png | Bin 773 -> 720 bytes lib/images/media_link_displaylnk.png | Bin 343 -> 306 bytes lib/images/media_link_lnk.png | Bin 651 -> 580 bytes lib/images/media_link_nolnk.png | Bin 516 -> 464 bytes lib/images/media_size_large.png | Bin 153 -> 102 bytes lib/images/media_size_medium.png | Bin 296 -> 231 bytes lib/images/media_size_original.png | Bin 312 -> 212 bytes lib/images/media_size_small.png | Bin 305 -> 210 bytes lib/images/multiupload.png | Bin 698 -> 581 bytes lib/images/notify.png | Bin 789 -> 736 bytes lib/images/ns.png | Bin 853 -> 800 bytes lib/images/page.png | Bin 635 -> 582 bytes lib/images/pencil.png | Bin 450 -> 397 bytes lib/images/success.png | Bin 816 -> 728 bytes lib/images/toolbar/bold.png | Bin 433 -> 372 bytes lib/images/toolbar/chars.png | Bin 619 -> 496 bytes lib/images/toolbar/h.png | Bin 360 -> 258 bytes lib/images/toolbar/h1.png | Bin 420 -> 290 bytes lib/images/toolbar/h2.png | Bin 442 -> 328 bytes lib/images/toolbar/h3.png | Bin 452 -> 322 bytes lib/images/toolbar/h4.png | Bin 432 -> 310 bytes lib/images/toolbar/h5.png | Bin 440 -> 325 bytes lib/images/toolbar/hequal.png | Bin 426 -> 311 bytes lib/images/toolbar/hminus.png | Bin 538 -> 409 bytes lib/images/toolbar/hplus.png | Bin 520 -> 396 bytes lib/images/toolbar/hr.png | Bin 329 -> 254 bytes lib/images/toolbar/image.png | Bin 625 -> 554 bytes lib/images/toolbar/italic.png | Bin 322 -> 241 bytes lib/images/toolbar/link.png | Bin 579 -> 405 bytes lib/images/toolbar/linkextern.png | Bin 962 -> 904 bytes lib/images/toolbar/mono.png | Bin 385 -> 296 bytes lib/images/toolbar/ol.png | Bin 403 -> 304 bytes lib/images/toolbar/sig.png | Bin 569 -> 471 bytes lib/images/toolbar/smiley.png | Bin 755 -> 684 bytes lib/images/toolbar/strike.png | Bin 415 -> 318 bytes lib/images/toolbar/ul.png | Bin 383 -> 291 bytes lib/images/toolbar/underline.png | Bin 375 -> 317 bytes lib/images/trash.png | Bin 476 -> 431 bytes lib/images/up.png | Bin 376 -> 260 bytes lib/plugins/acl/pix/group.png | Bin 753 -> 700 bytes lib/plugins/acl/pix/ns.png | Bin 853 -> 800 bytes lib/plugins/acl/pix/page.png | Bin 635 -> 582 bytes lib/plugins/acl/pix/user.png | Bin 706 -> 653 bytes lib/plugins/config/images/danger.png | Bin 701 -> 648 bytes lib/plugins/config/images/security.png | Bin 749 -> 706 bytes lib/plugins/config/images/warning.png | Bin 666 -> 613 bytes lib/plugins/usermanager/images/search.png | Bin 733 -> 550 bytes lib/tpl/default/images/UWEB.png | Bin 1138 -> 1065 bytes lib/tpl/default/images/UWEBshadow.png | Bin 1123 -> 900 bytes lib/tpl/default/images/button-dw.png | Bin 427 -> 404 bytes lib/tpl/default/images/button-rss.png | Bin 280 -> 196 bytes lib/tpl/default/images/buttonshadow.png | Bin 257 -> 218 bytes lib/tpl/default/images/inputshadow.png | Bin 155 -> 93 bytes 144 files changed, 0 insertions(+), 0 deletions(-) diff --git a/lib/images/admin/acl.png b/lib/images/admin/acl.png index 96fb4cd56..c8f610c12 100644 Binary files a/lib/images/admin/acl.png and b/lib/images/admin/acl.png differ diff --git a/lib/images/admin/config.png b/lib/images/admin/config.png index e4d376d85..3ec3923d1 100644 Binary files a/lib/images/admin/config.png and b/lib/images/admin/config.png differ diff --git a/lib/images/admin/plugin.png b/lib/images/admin/plugin.png index e2823bac7..6896a1365 100644 Binary files a/lib/images/admin/plugin.png and b/lib/images/admin/plugin.png differ diff --git a/lib/images/admin/popularity.png b/lib/images/admin/popularity.png index 4e22aaf0d..f7fe254f8 100644 Binary files a/lib/images/admin/popularity.png and b/lib/images/admin/popularity.png differ diff --git a/lib/images/admin/revert.png b/lib/images/admin/revert.png index 002d3a75b..76cc3e9bc 100644 Binary files a/lib/images/admin/revert.png and b/lib/images/admin/revert.png differ diff --git a/lib/images/admin/usermanager.png b/lib/images/admin/usermanager.png index c5c8dc6d6..e1edff2fc 100644 Binary files a/lib/images/admin/usermanager.png and b/lib/images/admin/usermanager.png differ diff --git a/lib/images/close.png b/lib/images/close.png index e1b498c14..4ccef0603 100644 Binary files a/lib/images/close.png and b/lib/images/close.png differ diff --git a/lib/images/del.png b/lib/images/del.png index a3260d718..e59ded55f 100644 Binary files a/lib/images/del.png and b/lib/images/del.png differ diff --git a/lib/images/diff.png b/lib/images/diff.png index 0b98d79ac..657b10999 100644 Binary files a/lib/images/diff.png and b/lib/images/diff.png differ diff --git a/lib/images/error.png b/lib/images/error.png index 8a1ba4c66..7bd84f7a3 100644 Binary files a/lib/images/error.png and b/lib/images/error.png differ diff --git a/lib/images/fileicons/bz2.png b/lib/images/fileicons/bz2.png index d48cae038..6ec2f98ef 100644 Binary files a/lib/images/fileicons/bz2.png and b/lib/images/fileicons/bz2.png differ diff --git a/lib/images/fileicons/c.png b/lib/images/fileicons/c.png index 9446afcb4..6f57337c7 100644 Binary files a/lib/images/fileicons/c.png and b/lib/images/fileicons/c.png differ diff --git a/lib/images/fileicons/conf.png b/lib/images/fileicons/conf.png index ddffe6fd1..20c20fa3d 100644 Binary files a/lib/images/fileicons/conf.png and b/lib/images/fileicons/conf.png differ diff --git a/lib/images/fileicons/cpp.png b/lib/images/fileicons/cpp.png index 2dc51b16d..6f2797da5 100644 Binary files a/lib/images/fileicons/cpp.png and b/lib/images/fileicons/cpp.png differ diff --git a/lib/images/fileicons/cs.png b/lib/images/fileicons/cs.png index d5db29ba5..d3afa112c 100644 Binary files a/lib/images/fileicons/cs.png and b/lib/images/fileicons/cs.png differ diff --git a/lib/images/fileicons/csv.png b/lib/images/fileicons/csv.png index 3a8835360..b604453c4 100644 Binary files a/lib/images/fileicons/csv.png and b/lib/images/fileicons/csv.png differ diff --git a/lib/images/fileicons/deb.png b/lib/images/fileicons/deb.png index 9229d8783..e61300de9 100644 Binary files a/lib/images/fileicons/deb.png and b/lib/images/fileicons/deb.png differ diff --git a/lib/images/fileicons/doc.png b/lib/images/fileicons/doc.png index 932567f8a..b48fdac89 100644 Binary files a/lib/images/fileicons/doc.png and b/lib/images/fileicons/doc.png differ diff --git a/lib/images/fileicons/docx.png b/lib/images/fileicons/docx.png index 932567f8a..b48fdac89 100644 Binary files a/lib/images/fileicons/docx.png and b/lib/images/fileicons/docx.png differ diff --git a/lib/images/fileicons/file.png b/lib/images/fileicons/file.png index 817014fa7..c1a7ef1b4 100644 Binary files a/lib/images/fileicons/file.png and b/lib/images/fileicons/file.png differ diff --git a/lib/images/fileicons/gif.png b/lib/images/fileicons/gif.png index aa4cc23a5..1d9dd562a 100644 Binary files a/lib/images/fileicons/gif.png and b/lib/images/fileicons/gif.png differ diff --git a/lib/images/fileicons/gz.png b/lib/images/fileicons/gz.png index 2426bd169..48f19596c 100644 Binary files a/lib/images/fileicons/gz.png and b/lib/images/fileicons/gz.png differ diff --git a/lib/images/fileicons/htm.png b/lib/images/fileicons/htm.png index 1a6812185..d45e4c19a 100644 Binary files a/lib/images/fileicons/htm.png and b/lib/images/fileicons/htm.png differ diff --git a/lib/images/fileicons/html.png b/lib/images/fileicons/html.png index 1a6812185..d45e4c19a 100644 Binary files a/lib/images/fileicons/html.png and b/lib/images/fileicons/html.png differ diff --git a/lib/images/fileicons/jpeg.png b/lib/images/fileicons/jpeg.png index aa4cc23a5..1d9dd562a 100644 Binary files a/lib/images/fileicons/jpeg.png and b/lib/images/fileicons/jpeg.png differ diff --git a/lib/images/fileicons/jpg.png b/lib/images/fileicons/jpg.png index aa4cc23a5..1d9dd562a 100644 Binary files a/lib/images/fileicons/jpg.png and b/lib/images/fileicons/jpg.png differ diff --git a/lib/images/fileicons/lua.png b/lib/images/fileicons/lua.png index 7c07d023f..dd72770bb 100644 Binary files a/lib/images/fileicons/lua.png and b/lib/images/fileicons/lua.png differ diff --git a/lib/images/fileicons/mp3.png b/lib/images/fileicons/mp3.png index 928705d7a..d5d3ec1e4 100644 Binary files a/lib/images/fileicons/mp3.png and b/lib/images/fileicons/mp3.png differ diff --git a/lib/images/fileicons/odc.png b/lib/images/fileicons/odc.png index 47f65c84d..4d6676c3a 100644 Binary files a/lib/images/fileicons/odc.png and b/lib/images/fileicons/odc.png differ diff --git a/lib/images/fileicons/odf.png b/lib/images/fileicons/odf.png index a2fbc5195..65c62ebbe 100644 Binary files a/lib/images/fileicons/odf.png and b/lib/images/fileicons/odf.png differ diff --git a/lib/images/fileicons/odg.png b/lib/images/fileicons/odg.png index 74f6303d3..a07216f4a 100644 Binary files a/lib/images/fileicons/odg.png and b/lib/images/fileicons/odg.png differ diff --git a/lib/images/fileicons/odi.png b/lib/images/fileicons/odi.png index 74f6303d3..a07216f4a 100644 Binary files a/lib/images/fileicons/odi.png and b/lib/images/fileicons/odi.png differ diff --git a/lib/images/fileicons/odp.png b/lib/images/fileicons/odp.png index 2a94290d7..ed51fcaf1 100644 Binary files a/lib/images/fileicons/odp.png and b/lib/images/fileicons/odp.png differ diff --git a/lib/images/fileicons/ods.png b/lib/images/fileicons/ods.png index 47f65c84d..4d6676c3a 100644 Binary files a/lib/images/fileicons/ods.png and b/lib/images/fileicons/ods.png differ diff --git a/lib/images/fileicons/odt.png b/lib/images/fileicons/odt.png index b0c21fc1f..67ef1a42d 100644 Binary files a/lib/images/fileicons/odt.png and b/lib/images/fileicons/odt.png differ diff --git a/lib/images/fileicons/ogg.png b/lib/images/fileicons/ogg.png index 62cea6aaa..0a21eae65 100644 Binary files a/lib/images/fileicons/ogg.png and b/lib/images/fileicons/ogg.png differ diff --git a/lib/images/fileicons/pdf.png b/lib/images/fileicons/pdf.png index 638066dea..f40f22826 100644 Binary files a/lib/images/fileicons/pdf.png and b/lib/images/fileicons/pdf.png differ diff --git a/lib/images/fileicons/php.png b/lib/images/fileicons/php.png index e735f875b..f81e405de 100644 Binary files a/lib/images/fileicons/php.png and b/lib/images/fileicons/php.png differ diff --git a/lib/images/fileicons/pl.png b/lib/images/fileicons/pl.png index 6ac381cd7..92f3f9754 100644 Binary files a/lib/images/fileicons/pl.png and b/lib/images/fileicons/pl.png differ diff --git a/lib/images/fileicons/png.png b/lib/images/fileicons/png.png index aa4cc23a5..1d9dd562a 100644 Binary files a/lib/images/fileicons/png.png and b/lib/images/fileicons/png.png differ diff --git a/lib/images/fileicons/ppt.png b/lib/images/fileicons/ppt.png index adaefc602..b7afb2266 100644 Binary files a/lib/images/fileicons/ppt.png and b/lib/images/fileicons/ppt.png differ diff --git a/lib/images/fileicons/pptx.png b/lib/images/fileicons/pptx.png index adaefc602..b7afb2266 100644 Binary files a/lib/images/fileicons/pptx.png and b/lib/images/fileicons/pptx.png differ diff --git a/lib/images/fileicons/ps.png b/lib/images/fileicons/ps.png index c51c763ab..78e3af8fb 100644 Binary files a/lib/images/fileicons/ps.png and b/lib/images/fileicons/ps.png differ diff --git a/lib/images/fileicons/py.png b/lib/images/fileicons/py.png index a21b8da49..15a727c54 100644 Binary files a/lib/images/fileicons/py.png and b/lib/images/fileicons/py.png differ diff --git a/lib/images/fileicons/rar.png b/lib/images/fileicons/rar.png index a6af4d1ca..c761a4f7f 100644 Binary files a/lib/images/fileicons/rar.png and b/lib/images/fileicons/rar.png differ diff --git a/lib/images/fileicons/rb.png b/lib/images/fileicons/rb.png index 45f448978..408f708a1 100644 Binary files a/lib/images/fileicons/rb.png and b/lib/images/fileicons/rb.png differ diff --git a/lib/images/fileicons/rpm.png b/lib/images/fileicons/rpm.png index 22212eafa..5cf727de0 100644 Binary files a/lib/images/fileicons/rpm.png and b/lib/images/fileicons/rpm.png differ diff --git a/lib/images/fileicons/rtf.png b/lib/images/fileicons/rtf.png index d8bada5fe..a1170af7f 100644 Binary files a/lib/images/fileicons/rtf.png and b/lib/images/fileicons/rtf.png differ diff --git a/lib/images/fileicons/sql.png b/lib/images/fileicons/sql.png index f60054a3a..13772b73c 100644 Binary files a/lib/images/fileicons/sql.png and b/lib/images/fileicons/sql.png differ diff --git a/lib/images/fileicons/swf.png b/lib/images/fileicons/swf.png index 0729ed020..ecc7309ad 100644 Binary files a/lib/images/fileicons/swf.png and b/lib/images/fileicons/swf.png differ diff --git a/lib/images/fileicons/sxc.png b/lib/images/fileicons/sxc.png index 47f65c84d..4d6676c3a 100644 Binary files a/lib/images/fileicons/sxc.png and b/lib/images/fileicons/sxc.png differ diff --git a/lib/images/fileicons/sxd.png b/lib/images/fileicons/sxd.png index 74f6303d3..a07216f4a 100644 Binary files a/lib/images/fileicons/sxd.png and b/lib/images/fileicons/sxd.png differ diff --git a/lib/images/fileicons/sxi.png b/lib/images/fileicons/sxi.png index 2a94290d7..ed51fcaf1 100644 Binary files a/lib/images/fileicons/sxi.png and b/lib/images/fileicons/sxi.png differ diff --git a/lib/images/fileicons/sxw.png b/lib/images/fileicons/sxw.png index b0c21fc1f..67ef1a42d 100644 Binary files a/lib/images/fileicons/sxw.png and b/lib/images/fileicons/sxw.png differ diff --git a/lib/images/fileicons/tar.png b/lib/images/fileicons/tar.png index 5a2f717fc..a28c86f2d 100644 Binary files a/lib/images/fileicons/tar.png and b/lib/images/fileicons/tar.png differ diff --git a/lib/images/fileicons/tgz.png b/lib/images/fileicons/tgz.png index 2426bd169..48f19596c 100644 Binary files a/lib/images/fileicons/tgz.png and b/lib/images/fileicons/tgz.png differ diff --git a/lib/images/fileicons/txt.png b/lib/images/fileicons/txt.png index da20009c6..bb94949f6 100644 Binary files a/lib/images/fileicons/txt.png and b/lib/images/fileicons/txt.png differ diff --git a/lib/images/fileicons/wav.png b/lib/images/fileicons/wav.png index 79e80760e..46ff63f0f 100644 Binary files a/lib/images/fileicons/wav.png and b/lib/images/fileicons/wav.png differ diff --git a/lib/images/fileicons/xls.png b/lib/images/fileicons/xls.png index e8cd58dc0..24911b802 100644 Binary files a/lib/images/fileicons/xls.png and b/lib/images/fileicons/xls.png differ diff --git a/lib/images/fileicons/xlsx.png b/lib/images/fileicons/xlsx.png index e8cd58dc0..24911b802 100644 Binary files a/lib/images/fileicons/xlsx.png and b/lib/images/fileicons/xlsx.png differ diff --git a/lib/images/fileicons/xml.png b/lib/images/fileicons/xml.png index eb4632397..ae9831b34 100644 Binary files a/lib/images/fileicons/xml.png and b/lib/images/fileicons/xml.png differ diff --git a/lib/images/fileicons/zip.png b/lib/images/fileicons/zip.png index 999ffbe80..f4a10bf9c 100644 Binary files a/lib/images/fileicons/zip.png and b/lib/images/fileicons/zip.png differ diff --git a/lib/images/history.png b/lib/images/history.png index ef9e311d3..82a418d44 100644 Binary files a/lib/images/history.png and b/lib/images/history.png differ diff --git a/lib/images/info.png b/lib/images/info.png index a237c1782..121c7336d 100644 Binary files a/lib/images/info.png and b/lib/images/info.png differ diff --git a/lib/images/interwiki.png b/lib/images/interwiki.png index 73d6f8d39..f9c73d505 100644 Binary files a/lib/images/interwiki.png and b/lib/images/interwiki.png differ diff --git a/lib/images/interwiki/skype.png b/lib/images/interwiki/skype.png index 1f34025c8..c70216702 100644 Binary files a/lib/images/interwiki/skype.png and b/lib/images/interwiki/skype.png differ diff --git a/lib/images/license/badge/cc-by-nc-nd.png b/lib/images/license/badge/cc-by-nc-nd.png index 49f272f82..3231da3a3 100644 Binary files a/lib/images/license/badge/cc-by-nc-nd.png and b/lib/images/license/badge/cc-by-nc-nd.png differ diff --git a/lib/images/license/badge/cc-by-nc-sa.png b/lib/images/license/badge/cc-by-nc-sa.png index 0f2a0f107..6bcf6a11d 100644 Binary files a/lib/images/license/badge/cc-by-nc-sa.png and b/lib/images/license/badge/cc-by-nc-sa.png differ diff --git a/lib/images/license/badge/cc-by-nc.png b/lib/images/license/badge/cc-by-nc.png index 5f9821470..6d646321f 100644 Binary files a/lib/images/license/badge/cc-by-nc.png and b/lib/images/license/badge/cc-by-nc.png differ diff --git a/lib/images/license/badge/cc-by-nd.png b/lib/images/license/badge/cc-by-nd.png index 8f317035e..442353808 100644 Binary files a/lib/images/license/badge/cc-by-nd.png and b/lib/images/license/badge/cc-by-nd.png differ diff --git a/lib/images/license/badge/cc-by-sa.png b/lib/images/license/badge/cc-by-sa.png index f0a944e0b..e9fb436af 100644 Binary files a/lib/images/license/badge/cc-by-sa.png and b/lib/images/license/badge/cc-by-sa.png differ diff --git a/lib/images/license/badge/cc-by.png b/lib/images/license/badge/cc-by.png index 822491edb..cdc1f58fa 100644 Binary files a/lib/images/license/badge/cc-by.png and b/lib/images/license/badge/cc-by.png differ diff --git a/lib/images/license/badge/cc-zero.png b/lib/images/license/badge/cc-zero.png index 8a0ef3e3b..fd3dff422 100644 Binary files a/lib/images/license/badge/cc-zero.png and b/lib/images/license/badge/cc-zero.png differ diff --git a/lib/images/license/badge/cc.png b/lib/images/license/badge/cc.png index a66f4d1a0..8ac73aa4e 100644 Binary files a/lib/images/license/badge/cc.png and b/lib/images/license/badge/cc.png differ diff --git a/lib/images/license/badge/gnufdl.png b/lib/images/license/badge/gnufdl.png index 1371aba88..e92910128 100644 Binary files a/lib/images/license/badge/gnufdl.png and b/lib/images/license/badge/gnufdl.png differ diff --git a/lib/images/license/badge/publicdomain.png b/lib/images/license/badge/publicdomain.png index cedc39c62..ea8eeb4e1 100644 Binary files a/lib/images/license/badge/publicdomain.png and b/lib/images/license/badge/publicdomain.png differ diff --git a/lib/images/license/button/cc-by-nc-nd.png b/lib/images/license/button/cc-by-nc-nd.png index b27ead2f6..e1344a954 100644 Binary files a/lib/images/license/button/cc-by-nc-nd.png and b/lib/images/license/button/cc-by-nc-nd.png differ diff --git a/lib/images/license/button/cc-by-nc-sa.png b/lib/images/license/button/cc-by-nc-sa.png index 1c54f994d..6855a7586 100644 Binary files a/lib/images/license/button/cc-by-nc-sa.png and b/lib/images/license/button/cc-by-nc-sa.png differ diff --git a/lib/images/license/button/cc-by-nc.png b/lib/images/license/button/cc-by-nc.png index 33c7b1fa4..0b4d97268 100644 Binary files a/lib/images/license/button/cc-by-nc.png and b/lib/images/license/button/cc-by-nc.png differ diff --git a/lib/images/license/button/cc-by-nd.png b/lib/images/license/button/cc-by-nd.png index 52073c043..cdd3da9cc 100644 Binary files a/lib/images/license/button/cc-by-nd.png and b/lib/images/license/button/cc-by-nd.png differ diff --git a/lib/images/license/button/cc-by-sa.png b/lib/images/license/button/cc-by-sa.png index 0b1880f91..c512da0c4 100644 Binary files a/lib/images/license/button/cc-by-sa.png and b/lib/images/license/button/cc-by-sa.png differ diff --git a/lib/images/license/button/cc-by.png b/lib/images/license/button/cc-by.png index 99d8efd35..9179e2f57 100644 Binary files a/lib/images/license/button/cc-by.png and b/lib/images/license/button/cc-by.png differ diff --git a/lib/images/license/button/cc-zero.png b/lib/images/license/button/cc-zero.png index fc99eff61..9243a8097 100644 Binary files a/lib/images/license/button/cc-zero.png and b/lib/images/license/button/cc-zero.png differ diff --git a/lib/images/license/button/cc.png b/lib/images/license/button/cc.png index adfa085bd..087115aa6 100644 Binary files a/lib/images/license/button/cc.png and b/lib/images/license/button/cc.png differ diff --git a/lib/images/license/button/gnufdl.png b/lib/images/license/button/gnufdl.png index cb815ac13..d26e95f77 100644 Binary files a/lib/images/license/button/gnufdl.png and b/lib/images/license/button/gnufdl.png differ diff --git a/lib/images/license/button/publicdomain.png b/lib/images/license/button/publicdomain.png index f78e73d02..1dcde15eb 100644 Binary files a/lib/images/license/button/publicdomain.png and b/lib/images/license/button/publicdomain.png differ diff --git a/lib/images/magnifier.png b/lib/images/magnifier.png index cf3d97f75..89febff10 100644 Binary files a/lib/images/magnifier.png and b/lib/images/magnifier.png differ diff --git a/lib/images/media_align_center.png b/lib/images/media_align_center.png index 3db90fc17..807f9d9a8 100644 Binary files a/lib/images/media_align_center.png and b/lib/images/media_align_center.png differ diff --git a/lib/images/media_align_left.png b/lib/images/media_align_left.png index cebbb1a9a..fa6cf33ca 100644 Binary files a/lib/images/media_align_left.png and b/lib/images/media_align_left.png differ diff --git a/lib/images/media_align_noalign.png b/lib/images/media_align_noalign.png index 74f34e5f1..263e090fe 100644 Binary files a/lib/images/media_align_noalign.png and b/lib/images/media_align_noalign.png differ diff --git a/lib/images/media_align_right.png b/lib/images/media_align_right.png index 5f54a4a49..33539dbdb 100644 Binary files a/lib/images/media_align_right.png and b/lib/images/media_align_right.png differ diff --git a/lib/images/media_link_direct.png b/lib/images/media_link_direct.png index 4bdb3541e..4350b803d 100644 Binary files a/lib/images/media_link_direct.png and b/lib/images/media_link_direct.png differ diff --git a/lib/images/media_link_displaylnk.png b/lib/images/media_link_displaylnk.png index 25eacb7c2..53927566a 100644 Binary files a/lib/images/media_link_displaylnk.png and b/lib/images/media_link_displaylnk.png differ diff --git a/lib/images/media_link_lnk.png b/lib/images/media_link_lnk.png index 1209164ca..5ff4ee182 100644 Binary files a/lib/images/media_link_lnk.png and b/lib/images/media_link_lnk.png differ diff --git a/lib/images/media_link_nolnk.png b/lib/images/media_link_nolnk.png index fc3c393ca..c9378c7fd 100644 Binary files a/lib/images/media_link_nolnk.png and b/lib/images/media_link_nolnk.png differ diff --git a/lib/images/media_size_large.png b/lib/images/media_size_large.png index e2fb548d9..012a418c3 100644 Binary files a/lib/images/media_size_large.png and b/lib/images/media_size_large.png differ diff --git a/lib/images/media_size_medium.png b/lib/images/media_size_medium.png index b33157256..1469f519f 100644 Binary files a/lib/images/media_size_medium.png and b/lib/images/media_size_medium.png differ diff --git a/lib/images/media_size_original.png b/lib/images/media_size_original.png index d179aa2db..f58d056aa 100644 Binary files a/lib/images/media_size_original.png and b/lib/images/media_size_original.png differ diff --git a/lib/images/media_size_small.png b/lib/images/media_size_small.png index 04efe7080..a0aafa4a7 100644 Binary files a/lib/images/media_size_small.png and b/lib/images/media_size_small.png differ diff --git a/lib/images/multiupload.png b/lib/images/multiupload.png index 1e8efa063..bc16c76d6 100644 Binary files a/lib/images/multiupload.png and b/lib/images/multiupload.png differ diff --git a/lib/images/notify.png b/lib/images/notify.png index 6e0015df4..c18ef1001 100644 Binary files a/lib/images/notify.png and b/lib/images/notify.png differ diff --git a/lib/images/ns.png b/lib/images/ns.png index da3c2a2d7..c35e832da 100644 Binary files a/lib/images/ns.png and b/lib/images/ns.png differ diff --git a/lib/images/page.png b/lib/images/page.png index 03ddd799f..b1b7ebe94 100644 Binary files a/lib/images/page.png and b/lib/images/page.png differ diff --git a/lib/images/pencil.png b/lib/images/pencil.png index 0bfecd50e..3ea754120 100644 Binary files a/lib/images/pencil.png and b/lib/images/pencil.png differ diff --git a/lib/images/success.png b/lib/images/success.png index a5ae9f11b..9241adbb2 100644 Binary files a/lib/images/success.png and b/lib/images/success.png differ diff --git a/lib/images/toolbar/bold.png b/lib/images/toolbar/bold.png index 7ebe99ee9..1fc8a9cc4 100644 Binary files a/lib/images/toolbar/bold.png and b/lib/images/toolbar/bold.png differ diff --git a/lib/images/toolbar/chars.png b/lib/images/toolbar/chars.png index 3f3396aeb..bad37e503 100644 Binary files a/lib/images/toolbar/chars.png and b/lib/images/toolbar/chars.png differ diff --git a/lib/images/toolbar/h.png b/lib/images/toolbar/h.png index aae052462..6a48cbbc0 100644 Binary files a/lib/images/toolbar/h.png and b/lib/images/toolbar/h.png differ diff --git a/lib/images/toolbar/h1.png b/lib/images/toolbar/h1.png index 93dae935f..85bd06e6c 100644 Binary files a/lib/images/toolbar/h1.png and b/lib/images/toolbar/h1.png differ diff --git a/lib/images/toolbar/h2.png b/lib/images/toolbar/h2.png index f0eee3bd0..be2c60031 100644 Binary files a/lib/images/toolbar/h2.png and b/lib/images/toolbar/h2.png differ diff --git a/lib/images/toolbar/h3.png b/lib/images/toolbar/h3.png index 8cfd4c077..350da88b6 100644 Binary files a/lib/images/toolbar/h3.png and b/lib/images/toolbar/h3.png differ diff --git a/lib/images/toolbar/h4.png b/lib/images/toolbar/h4.png index 7b8f51a1b..bc1b7038f 100644 Binary files a/lib/images/toolbar/h4.png and b/lib/images/toolbar/h4.png differ diff --git a/lib/images/toolbar/h5.png b/lib/images/toolbar/h5.png index 44b00d9c8..b6c263dfb 100644 Binary files a/lib/images/toolbar/h5.png and b/lib/images/toolbar/h5.png differ diff --git a/lib/images/toolbar/hequal.png b/lib/images/toolbar/hequal.png index 8fc6b0d75..da4e921ff 100644 Binary files a/lib/images/toolbar/hequal.png and b/lib/images/toolbar/hequal.png differ diff --git a/lib/images/toolbar/hminus.png b/lib/images/toolbar/hminus.png index f9d67adcb..c00f70223 100644 Binary files a/lib/images/toolbar/hminus.png and b/lib/images/toolbar/hminus.png differ diff --git a/lib/images/toolbar/hplus.png b/lib/images/toolbar/hplus.png index 66f3d5e33..6124b5c33 100644 Binary files a/lib/images/toolbar/hplus.png and b/lib/images/toolbar/hplus.png differ diff --git a/lib/images/toolbar/hr.png b/lib/images/toolbar/hr.png index f86a8ec94..de3a8a55b 100644 Binary files a/lib/images/toolbar/hr.png and b/lib/images/toolbar/hr.png differ diff --git a/lib/images/toolbar/image.png b/lib/images/toolbar/image.png index 1aab5d7de..70b12fcc2 100644 Binary files a/lib/images/toolbar/image.png and b/lib/images/toolbar/image.png differ diff --git a/lib/images/toolbar/italic.png b/lib/images/toolbar/italic.png index 324e7c036..d69e66070 100644 Binary files a/lib/images/toolbar/italic.png and b/lib/images/toolbar/italic.png differ diff --git a/lib/images/toolbar/link.png b/lib/images/toolbar/link.png index 41e52c6ab..01105b0d3 100644 Binary files a/lib/images/toolbar/link.png and b/lib/images/toolbar/link.png differ diff --git a/lib/images/toolbar/linkextern.png b/lib/images/toolbar/linkextern.png index 75afd3dc2..acc0c6fc5 100644 Binary files a/lib/images/toolbar/linkextern.png and b/lib/images/toolbar/linkextern.png differ diff --git a/lib/images/toolbar/mono.png b/lib/images/toolbar/mono.png index 178cec9f2..b91ad2e0d 100644 Binary files a/lib/images/toolbar/mono.png and b/lib/images/toolbar/mono.png differ diff --git a/lib/images/toolbar/ol.png b/lib/images/toolbar/ol.png index 3162fa21d..186f1fad4 100644 Binary files a/lib/images/toolbar/ol.png and b/lib/images/toolbar/ol.png differ diff --git a/lib/images/toolbar/sig.png b/lib/images/toolbar/sig.png index ef997b7cd..72fdad0a0 100644 Binary files a/lib/images/toolbar/sig.png and b/lib/images/toolbar/sig.png differ diff --git a/lib/images/toolbar/smiley.png b/lib/images/toolbar/smiley.png index e92845cb4..85036c1a8 100644 Binary files a/lib/images/toolbar/smiley.png and b/lib/images/toolbar/smiley.png differ diff --git a/lib/images/toolbar/strike.png b/lib/images/toolbar/strike.png index 203aacc2b..e532d1f07 100644 Binary files a/lib/images/toolbar/strike.png and b/lib/images/toolbar/strike.png differ diff --git a/lib/images/toolbar/ul.png b/lib/images/toolbar/ul.png index 471171db4..008820722 100644 Binary files a/lib/images/toolbar/ul.png and b/lib/images/toolbar/ul.png differ diff --git a/lib/images/toolbar/underline.png b/lib/images/toolbar/underline.png index bf9665a68..fa271517c 100644 Binary files a/lib/images/toolbar/underline.png and b/lib/images/toolbar/underline.png differ diff --git a/lib/images/trash.png b/lib/images/trash.png index ebad933c8..efc97ba8f 100644 Binary files a/lib/images/trash.png and b/lib/images/trash.png differ diff --git a/lib/images/up.png b/lib/images/up.png index 557d5e6a9..27beb4445 100644 Binary files a/lib/images/up.png and b/lib/images/up.png differ diff --git a/lib/plugins/acl/pix/group.png b/lib/plugins/acl/pix/group.png index 7fb4e1f1e..d80eb2606 100644 Binary files a/lib/plugins/acl/pix/group.png and b/lib/plugins/acl/pix/group.png differ diff --git a/lib/plugins/acl/pix/ns.png b/lib/plugins/acl/pix/ns.png index da3c2a2d7..c35e832da 100644 Binary files a/lib/plugins/acl/pix/ns.png and b/lib/plugins/acl/pix/ns.png differ diff --git a/lib/plugins/acl/pix/page.png b/lib/plugins/acl/pix/page.png index 03ddd799f..b1b7ebe94 100644 Binary files a/lib/plugins/acl/pix/page.png and b/lib/plugins/acl/pix/page.png differ diff --git a/lib/plugins/acl/pix/user.png b/lib/plugins/acl/pix/user.png index 8fd539e9c..7b4a507a0 100644 Binary files a/lib/plugins/acl/pix/user.png and b/lib/plugins/acl/pix/user.png differ diff --git a/lib/plugins/config/images/danger.png b/lib/plugins/config/images/danger.png index c37bd062e..7bd84f7a3 100644 Binary files a/lib/plugins/config/images/danger.png and b/lib/plugins/config/images/danger.png differ diff --git a/lib/plugins/config/images/security.png b/lib/plugins/config/images/security.png index 2ebc4f6f9..1800f8e56 100644 Binary files a/lib/plugins/config/images/security.png and b/lib/plugins/config/images/security.png differ diff --git a/lib/plugins/config/images/warning.png b/lib/plugins/config/images/warning.png index 628cf2dae..c5e482f84 100644 Binary files a/lib/plugins/config/images/warning.png and b/lib/plugins/config/images/warning.png differ diff --git a/lib/plugins/usermanager/images/search.png b/lib/plugins/usermanager/images/search.png index 1aa445f03..e9dabc11e 100644 Binary files a/lib/plugins/usermanager/images/search.png and b/lib/plugins/usermanager/images/search.png differ diff --git a/lib/tpl/default/images/UWEB.png b/lib/tpl/default/images/UWEB.png index ea03aec94..bded2c76f 100644 Binary files a/lib/tpl/default/images/UWEB.png and b/lib/tpl/default/images/UWEB.png differ diff --git a/lib/tpl/default/images/UWEBshadow.png b/lib/tpl/default/images/UWEBshadow.png index 212444f0e..8c4e5f829 100644 Binary files a/lib/tpl/default/images/UWEBshadow.png and b/lib/tpl/default/images/UWEBshadow.png differ diff --git a/lib/tpl/default/images/button-dw.png b/lib/tpl/default/images/button-dw.png index 39d5f56a9..97272d968 100644 Binary files a/lib/tpl/default/images/button-dw.png and b/lib/tpl/default/images/button-dw.png differ diff --git a/lib/tpl/default/images/button-rss.png b/lib/tpl/default/images/button-rss.png index b036f7152..0a55642ef 100644 Binary files a/lib/tpl/default/images/button-rss.png and b/lib/tpl/default/images/button-rss.png differ diff --git a/lib/tpl/default/images/buttonshadow.png b/lib/tpl/default/images/buttonshadow.png index f60be309f..b96ebf759 100644 Binary files a/lib/tpl/default/images/buttonshadow.png and b/lib/tpl/default/images/buttonshadow.png differ diff --git a/lib/tpl/default/images/inputshadow.png b/lib/tpl/default/images/inputshadow.png index d286beb22..480044986 100644 Binary files a/lib/tpl/default/images/inputshadow.png and b/lib/tpl/default/images/inputshadow.png differ -- cgit v1.2.3 From c1209673030dd03537a2ece21331203ff0a6bf34 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Fri, 18 Feb 2011 18:30:49 -0500 Subject: Special handling of title metadata index --- inc/indexer.php | 86 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 68 insertions(+), 18 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 3a0331302..b6a586985 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -247,6 +247,15 @@ class Doku_Indexer { return false; } + // Special handling for titles so the index file is simpler + if (array_key_exists('title', $key)) { + $value = $key['title']; + if (is_array($value)) + $value = $value[0]; + $this->_saveIndexKey('title', '', $pid, $value); + unset($key['title']); + } + foreach ($key as $name => $values) { $metaname = idx_cleanName($name); $metaidx = $this->_getIndex($metaname, '_i'); @@ -357,6 +366,7 @@ class Doku_Indexer { } // XXX TODO: delete meta keys + $this->_saveIndexKey('title', '', $pid, ""); $this->_unlock(); return true; @@ -468,24 +478,28 @@ class Doku_Indexer { * @author Michael Hamann */ public function lookupKey($key, $value, $func=null) { - $metaname = idx_cleanName($key); - - // get all words in order to search the matching ids - $words = $this->_getIndex($metaname, '_w'); - - // the matching ids for the provided value(s) - $value_ids = array(); - if (!is_array($value)) $value_array = array($value); else $value_array =& $value; + // the matching ids for the provided value(s) + $value_ids = array(); + + $metaname = idx_cleanName($key); + + // get all words in order to search the matching ids + if ($key == 'title') { + $words = $this->_getIndex('title', ''); + } else { + $words = $this->_getIndex($metaname, '_w'); + } + if (!is_null($func)) { foreach ($value_array as $val) { foreach ($words as $i => $word) { if (call_user_func_array($func, array($word, $val))) - $value_ids[$i] = $val; + $value_ids[$i][] = $val; } } } else { @@ -505,25 +519,42 @@ class Doku_Indexer { if ($caret || $dollar) { $re = $caret.preg_quote($xval, '/').$dollar; foreach(array_keys(preg_grep('/'.$re.'/', $words)) as $i) - $value_ids[$i] = $val; + $value_ids[$i][] = $val; } else { if (($i = array_search($val, $words)) !== false) - $value_ids[$i] = $val; + $value_ids[$i][] = $val; } } } unset($words); // free the used memory - // load all lines and pages so the used lines can be taken and matched with the pages - $lines = $this->_getIndex($metaname, '_i'); + $result = array(); $page_idx = $this->_getIndex('page', ''); - $result = array(); - foreach ($value_ids as $value_id => $val) { - // parse the tuples of the form page_id*1:page2_id*1 and so on, return value - // is an array with page_id => 1, page2_id => 1 etc. so take the keys only - $result[$val] = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); + // Special handling for titles + if ($key == 'title') { + foreach ($value_ids as $pid => $val_list) { + $page = $page_idx[$pid]; + foreach ($val_list as $val) { + $result[$val][] = $page; + } + } + } else { + // load all lines and pages so the used lines can be taken and matched with the pages + $lines = $this->_getIndex($metaname, '_i'); + + foreach ($value_ids as $value_id => $val_list) { + // parse the tuples of the form page_id*1:page2_id*1 and so on, return value + // is an array with page_id => 1, page2_id => 1 etc. so take the keys only + $pages = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); + foreach ($val_list as $val) { + if (!isset($result[$val])) + $result[$val] = $pages; + else + $result[$val] = array_merge($result[$val], $pages); + } + } } if (!is_array($value)) $result = $result[$value]; return $result; @@ -616,6 +647,7 @@ class Doku_Indexer { /** * Return a list of all pages + * Warning: pages may not exist! * * @param string $key list only pages containing the metadata key (optional) * @return array list of page names @@ -624,6 +656,24 @@ class Doku_Indexer { public function getPages($key=null) { $page_idx = $this->_getIndex('page', ''); if (is_null($key)) return $page_idx; + + $metaname = idx_cleanName($key); + + // Special handling for titles + if ($key == 'title') { + $title_idx = $this->_getIndex('title', ''); + array_splice($page_idx, count($title_idx)); + foreach ($title_idx as $i => $title) + if ($title === "") unset($page_idx[$i]); + return $page_idx; + } + + $pages = array(); + $lines = $this->_getIndex($metaname, '_i'); + foreach ($lines as $line) { + $pages = array_merge($pages, $this->_parseTuples($page_idx, $line)); + } + return array_keys($pages); } /** -- cgit v1.2.3 From 9a8fba1f4e040693794fc1b640787cbdeb71007e Mon Sep 17 00:00:00 2001 From: Edward H Date: Sat, 19 Feb 2011 08:54:36 +0100 Subject: Swedish language update --- inc/lang/sv/lang.php | 59 +++++++++++++++++++--------- lib/plugins/config/lang/sv/lang.php | 1 + lib/plugins/popularity/lang/sv/lang.php | 5 +++ lib/plugins/popularity/lang/sv/submitted.txt | 3 ++ 4 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 lib/plugins/popularity/lang/sv/submitted.txt diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 09dec8edd..9308bc6c8 100644 --- a/inc/lang/sv/lang.php +++ b/inc/lang/sv/lang.php @@ -49,10 +49,6 @@ $lang['btn_back'] = 'Tillbaka'; $lang['btn_backlink'] = 'Tillbakalänkar'; $lang['btn_backtomedia'] = 'Tillbaka till val av Mediafil'; $lang['btn_subscribe'] = 'Prenumerera på ändringar'; -$lang['btn_unsubscribe'] = 'Säg upp prenumeration på ändringar'; -$lang['btn_subscribens'] = 'Prenumerera på namnrymdsändringar'; -$lang['btn_unsubscribens'] = 'Sluta prenumerera på namnrymdsändringar -'; $lang['btn_profile'] = 'Uppdatera profil'; $lang['btn_reset'] = 'Återställ'; $lang['btn_resendpwd'] = 'Skicka nytt lösenord'; @@ -106,7 +102,35 @@ $lang['txt_overwrt'] = 'Skriv över befintlig fil'; $lang['lockedby'] = 'Låst av'; $lang['lockexpire'] = 'Lås upphör att gälla'; $lang['willexpire'] = 'Ditt redigeringslås för detta dokument kommer snart att upphöra.\nFör att undvika versionskonflikter bör du förhandsgranska ditt dokument för att förlänga redigeringslåset.'; -$lang['js']['notsavedyet'] = "Det finns ändringar som inte är sparade.\nÄr du säker på att du vill fortsätta?"; +$lang['js']['notsavedyet'] = 'Det finns ändringar som inte är sparade. +Är du säker på att du vill fortsätta?'; +$lang['js']['searchmedia'] = 'Sök efter filer'; +$lang['js']['keepopen'] = 'Lämna fönstret öppet efter val av fil'; +$lang['js']['hidedetails'] = 'Dölj detaljer'; +$lang['js']['mediatitle'] = 'Länkinställningar'; +$lang['js']['mediadisplay'] = 'Länktyp'; +$lang['js']['mediaalign'] = 'Justering'; +$lang['js']['mediasize'] = 'Bildstorlek'; +$lang['js']['mediatarget'] = 'Länköppning'; +$lang['js']['mediaclose'] = 'Stäng'; +$lang['js']['mediadisplayimg'] = 'Visa bilden.'; +$lang['js']['mediadisplaylnk'] = 'Visa endast länken.'; +$lang['js']['mediasmall'] = 'Liten storlek'; +$lang['js']['mediamedium'] = 'Mellanstor storlek'; +$lang['js']['medialarge'] = 'Stor storlek'; +$lang['js']['mediaoriginal'] = 'Originalstorlek'; +$lang['js']['mediadirect'] = 'Direktlänk till originalet'; +$lang['js']['medianolnk'] = 'Ingen länk'; +$lang['js']['medianolink'] = 'Länka inte bilden'; +$lang['js']['medialeft'] = 'Justera bilden till vänster.'; +$lang['js']['mediaright'] = 'Justera bilden till höger.'; +$lang['js']['mediacenter'] = 'Centrera bilden.'; +$lang['js']['nosmblinks'] = 'Länkning till Windowsresurser fungerar bara med Microsofts Internet Explorer. +Du kan fortfarande klippa och klistra in länken om du använder en annan webbläsare än MSIE.'; +$lang['js']['linkwiz'] = 'Snabbguide Länkar'; +$lang['js']['linkto'] = 'Länk till:'; +$lang['js']['del_confirm'] = 'Vill du verkligen radera?'; +$lang['js']['mu_btn'] = 'Ladda upp flera filer samtidigt'; $lang['rssfailed'] = 'Ett fel uppstod när detta RSS-flöde skulle hämtas: '; $lang['nothingfound'] = 'Inga filer hittades.'; $lang['mediaselect'] = 'Mediafiler'; @@ -124,15 +148,7 @@ $lang['deletefail'] = 'Kunde inte radera "%s" - kontrollera filskydd. $lang['mediainuse'] = 'Filen "%s" har inte raderats - den används fortfarande.'; $lang['namespaces'] = 'Namnrymder'; $lang['mediafiles'] = 'Tillgängliga filer i'; -$lang['js']['searchmedia'] = 'Sök efter filer'; -$lang['js']['keepopen'] = 'Lämna fönstret öppet efter val av fil'; -$lang['js']['hidedetails'] = 'Dölj detaljer'; -$lang['js']['nosmblinks'] = 'Länkning till Windowsresurser fungerar bara med Microsofts Internet Explorer. -Du kan fortfarande klippa och klistra in länken om du använder en annan webbläsare än MSIE.'; -$lang['js']['linkwiz'] = 'Snabbguide Länkar'; -$lang['js']['linkto'] = 'Länk till:'; -$lang['js']['del_confirm'] = 'Vill du verkligen radera?'; -$lang['js']['mu_btn'] = 'Ladda upp flera filer samtidigt'; +$lang['accessdenied'] = 'Du får inte läsa den här sidan.'; $lang['mediausage'] = 'Använd följande syntax för att referera till denna fil:'; $lang['mediaview'] = 'Visa originalfilen'; $lang['mediaroot'] = 'rot'; @@ -148,6 +164,9 @@ $lang['current'] = 'aktuell'; $lang['yours'] = 'Din version'; $lang['diff'] = 'visa skillnader mot aktuell version'; $lang['diff2'] = 'Visa skillnader mellan valda versioner'; +$lang['difflink'] = 'Länk till den här jämförelsesidan'; +$lang['diff_type'] = 'Visa skillnader:'; +$lang['diff_side'] = 'Sida vid sida'; $lang['line'] = 'Rad'; $lang['breadcrumb'] = 'Spår'; $lang['youarehere'] = 'Här är du'; @@ -204,11 +223,12 @@ $lang['img_copyr'] = 'Copyright'; $lang['img_format'] = 'Format'; $lang['img_camera'] = 'Kamera'; $lang['img_keywords'] = 'Nyckelord'; -$lang['subscribe_success'] = 'Lade till %s i prenumerationslistan för %s'; -$lang['subscribe_error'] = 'Fel vid tillägg av %s i prenumerationslistan för %s'; -$lang['subscribe_noaddress'] = 'Det finns ingen adress knuten till ditt konto, det går inte att lägga till dig i prenumerationslistan'; -$lang['unsubscribe_success'] = 'Tog bort %s från prenumerationslistan för %s'; -$lang['unsubscribe_error'] = 'Fel vid borttagning %s från prenumerationslistan list för %s'; +$lang['subscr_m_new_header'] = 'Lägg till prenumeration'; +$lang['subscr_m_current_header'] = 'Nuvarande prenumerationer'; +$lang['subscr_m_unsubscribe'] = 'Prenumerera'; +$lang['subscr_m_subscribe'] = 'Avsluta prenumeration'; +$lang['subscr_m_receive'] = 'Ta emot'; +$lang['subscr_style_every'] = 'skicka epost vid varje ändring'; $lang['authmodfailed'] = 'Felaktiga inställningar för användarautentisering. Var vänlig meddela wikiadministratören.'; $lang['authtempfail'] = 'Tillfälligt fel på användarautentisering. Om felet kvarstår, var vänlig meddela wikiadministratören.'; $lang['i_chooselang'] = 'Välj språk'; @@ -259,3 +279,4 @@ $lang['days'] = '%d dagar sedan'; $lang['hours'] = '%d timmar sedan'; $lang['minutes'] = '%d minuter sedan'; $lang['seconds'] = '%d sekunder sedan'; +$lang['wordblock'] = 'Din ändring sparades inte för att den innehåller otillåten text (spam).'; diff --git a/lib/plugins/config/lang/sv/lang.php b/lib/plugins/config/lang/sv/lang.php index 3b5752ea1..50c75234b 100644 --- a/lib/plugins/config/lang/sv/lang.php +++ b/lib/plugins/config/lang/sv/lang.php @@ -112,6 +112,7 @@ $lang['fetchsize'] = 'Maximal storlek (bytes) som fetch.php får lad $lang['notify'] = 'Skicka meddelande om ändrade sidor till den här e-postadressen'; $lang['registernotify'] = 'Skicka meddelande om nyregistrerade användare till en här e-postadressen'; $lang['mailfrom'] = 'Avsändaradress i automatiska e-postmeddelanden'; +$lang['mailprefix'] = 'Prefix i början på ämnesraden vid automatiska e-postmeddelanden'; $lang['gzip_output'] = 'Använd gzip Content-Encoding för xhtml'; $lang['gdlib'] = 'Version av GD-biblioteket'; $lang['im_convert'] = 'Sökväg till ImageMagicks konverteringsverktyg'; diff --git a/lib/plugins/popularity/lang/sv/lang.php b/lib/plugins/popularity/lang/sv/lang.php index 10e71b790..b461a95cf 100644 --- a/lib/plugins/popularity/lang/sv/lang.php +++ b/lib/plugins/popularity/lang/sv/lang.php @@ -15,3 +15,8 @@ */ $lang['name'] = 'Popularitets-feedback (det kan ta en stund att ladda sidan)'; $lang['submit'] = 'Sänd data'; +$lang['autosubmit'] = 'Skicka data automatiskt varje månad'; +$lang['submissionFailed'] = 'Datan kunde inte skickas för att:'; +$lang['submitDirectly'] = 'Du kan skicka datan manuellt genom att fylla i följande formulär.'; +$lang['autosubmitError'] = 'Senaste automatiska sändning av datan misslyckades för att:'; +$lang['lastSent'] = 'Datan har skickats'; diff --git a/lib/plugins/popularity/lang/sv/submitted.txt b/lib/plugins/popularity/lang/sv/submitted.txt new file mode 100644 index 000000000..fb8eab773 --- /dev/null +++ b/lib/plugins/popularity/lang/sv/submitted.txt @@ -0,0 +1,3 @@ +====== Popularitetsfeedback ====== + +Datan har skickats utan problem. \ No newline at end of file -- cgit v1.2.3 From 2b3f472a3afb7dce4cb305d08d99462eee9b9998 Mon Sep 17 00:00:00 2001 From: Hiphen Lee Date: Sat, 19 Feb 2011 08:55:44 +0100 Subject: Chinese Language update --- inc/lang/zh/lang.php | 2 ++ lib/plugins/acl/lang/zh/lang.php | 1 + lib/plugins/config/lang/zh/lang.php | 2 ++ lib/plugins/plugin/lang/zh/lang.php | 1 + lib/plugins/popularity/lang/zh/lang.php | 6 ++++++ lib/plugins/popularity/lang/zh/submitted.txt | 3 +++ lib/plugins/revert/lang/zh/lang.php | 1 + lib/plugins/usermanager/lang/zh/lang.php | 1 + 8 files changed, 17 insertions(+) create mode 100644 lib/plugins/popularity/lang/zh/submitted.txt diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index f819aff9a..52dda5986 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -11,6 +11,7 @@ * @author ben * @author lainme * @author caii + * @author Hiphen Lee */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -163,6 +164,7 @@ $lang['yours'] = '您的版本'; $lang['diff'] = '显示与当前版本的差别'; $lang['diff2'] = '显示跟目前版本的差异'; $lang['difflink'] = '到此差别页面的链接'; +$lang['diff_type'] = '查看差异:'; $lang['line'] = '行'; $lang['breadcrumb'] = '您的足迹'; $lang['youarehere'] = '您在这里'; diff --git a/lib/plugins/acl/lang/zh/lang.php b/lib/plugins/acl/lang/zh/lang.php index d79a78089..50b9d63af 100644 --- a/lib/plugins/acl/lang/zh/lang.php +++ b/lib/plugins/acl/lang/zh/lang.php @@ -11,6 +11,7 @@ * @author ben * @author lainme * @author caii + * @author Hiphen Lee */ $lang['admin_acl'] = '访问控制列表(ACL)管理器'; $lang['acl_group'] = '组'; diff --git a/lib/plugins/config/lang/zh/lang.php b/lib/plugins/config/lang/zh/lang.php index 0419968c7..93565f313 100644 --- a/lib/plugins/config/lang/zh/lang.php +++ b/lib/plugins/config/lang/zh/lang.php @@ -11,6 +11,7 @@ * @author ben * @author lainme * @author caii + * @author Hiphen Lee */ $lang['menu'] = '配置设置'; $lang['error'] = '由于非法参数,设置没有更新。请检查您做的改动并重新提交。 @@ -109,6 +110,7 @@ $lang['fetchsize'] = 'fetch.php 能从外部下载的最大文件大 $lang['notify'] = '发送更改通知给这个邮件地址'; $lang['registernotify'] = '发送新注册用户的信息给这个邮件地址'; $lang['mailfrom'] = '自动发送邮件时使用的邮件地址'; +$lang['mailprefix'] = '自动发送邮件时使用的邮件地址前缀'; $lang['gzip_output'] = '对 xhtml 使用 gzip 内容编码'; $lang['gdlib'] = 'GD 库版本'; $lang['im_convert'] = 'ImageMagick 转换工具的路径'; diff --git a/lib/plugins/plugin/lang/zh/lang.php b/lib/plugins/plugin/lang/zh/lang.php index af2db4ee5..fcc353fed 100644 --- a/lib/plugins/plugin/lang/zh/lang.php +++ b/lib/plugins/plugin/lang/zh/lang.php @@ -11,6 +11,7 @@ * @author ben * @author lainme * @author caii + * @author Hiphen Lee */ $lang['menu'] = '插件管理器'; $lang['download'] = '下载并安装新的插件'; diff --git a/lib/plugins/popularity/lang/zh/lang.php b/lib/plugins/popularity/lang/zh/lang.php index 191b9c1af..371a8fddb 100644 --- a/lib/plugins/popularity/lang/zh/lang.php +++ b/lib/plugins/popularity/lang/zh/lang.php @@ -10,6 +10,12 @@ * @author ben * @author lainme * @author caii + * @author Hiphen Lee */ $lang['name'] = '人气反馈(载入可能需要一些时间)'; $lang['submit'] = '发送数据'; +$lang['autosubmit'] = '每月自动发送'; +$lang['submissionFailed'] = '数据由于以下原因不恩你给发送:'; +$lang['submitDirectly'] = '你可以手动提交下面的表单来发送数据。'; +$lang['autosubmitError'] = '印以下原因,上一次自动提交失败:'; +$lang['lastSent'] = '数据已发送'; diff --git a/lib/plugins/popularity/lang/zh/submitted.txt b/lib/plugins/popularity/lang/zh/submitted.txt new file mode 100644 index 000000000..6039b70e1 --- /dev/null +++ b/lib/plugins/popularity/lang/zh/submitted.txt @@ -0,0 +1,3 @@ +====== 人气反馈 ====== + +数据发送成功。 \ No newline at end of file diff --git a/lib/plugins/revert/lang/zh/lang.php b/lib/plugins/revert/lang/zh/lang.php index 5ff1ed426..8ba626432 100644 --- a/lib/plugins/revert/lang/zh/lang.php +++ b/lib/plugins/revert/lang/zh/lang.php @@ -11,6 +11,7 @@ * @author ben * @author lainme * @author caii + * @author Hiphen Lee */ $lang['menu'] = '还原管理器'; $lang['filter'] = '搜索包含垃圾信息的页面'; diff --git a/lib/plugins/usermanager/lang/zh/lang.php b/lib/plugins/usermanager/lang/zh/lang.php index 5836d3346..21bbb710d 100644 --- a/lib/plugins/usermanager/lang/zh/lang.php +++ b/lib/plugins/usermanager/lang/zh/lang.php @@ -10,6 +10,7 @@ * @author ben * @author lainme * @author caii + * @author Hiphen Lee */ $lang['menu'] = '用户管理器'; $lang['noauth'] = '(用户认证不可用)'; -- cgit v1.2.3 From bf413a4e50ea09a0345533c5fb1d07e963bd6368 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 20 Feb 2011 18:33:02 +0000 Subject: added 'register' and 'resendpwd' to action links and buttons Attention: $lang['register'] has been renamed to $lang['btn_register'], anyone using that in any plugin or template should adjust it. --- inc/html.php | 14 ++++---------- inc/lang/af/lang.php | 2 +- inc/lang/ar/lang.php | 3 +-- inc/lang/az/lang.php | 2 +- inc/lang/bg/lang.php | 2 +- inc/lang/ca-valencia/lang.php | 2 +- inc/lang/ca/lang.php | 2 +- inc/lang/cs/lang.php | 2 +- inc/lang/da/lang.php | 2 +- inc/lang/de-informal/lang.php | 2 +- inc/lang/de/lang.php | 2 +- inc/lang/el/lang.php | 2 +- inc/lang/en/lang.php | 4 ++-- inc/lang/eo/lang.php | 2 +- inc/lang/es/lang.php | 2 +- inc/lang/et/lang.php | 3 ++- inc/lang/eu/lang.php | 2 +- inc/lang/fa/lang.php | 2 +- inc/lang/fi/lang.php | 2 +- inc/lang/fo/lang.php | 2 +- inc/lang/fr/lang.php | 2 +- inc/lang/gl/lang.php | 2 +- inc/lang/he/lang.php | 2 +- inc/lang/hi/lang.php | 10 +++------- inc/lang/hr/lang.php | 2 +- inc/lang/hu/lang.php | 2 +- inc/lang/ia/lang.php | 2 +- inc/lang/id-ni/lang.php | 2 +- inc/lang/id/lang.php | 2 +- inc/lang/is/lang.php | 2 +- inc/lang/it/lang.php | 2 +- inc/lang/ja/lang.php | 2 +- inc/lang/km/lang.php | 2 +- inc/lang/ko/lang.php | 2 +- inc/lang/ku/lang.php | 2 +- inc/lang/la/lang.php | 2 +- inc/lang/lb/lang.php | 2 +- inc/lang/lt/lang.php | 2 +- inc/lang/lv/lang.php | 2 +- inc/lang/mg/lang.php | 2 +- inc/lang/mk/lang.php | 2 +- inc/lang/mr/lang.php | 2 +- inc/lang/ne/lang.php | 2 +- inc/lang/nl/lang.php | 2 +- inc/lang/no/lang.php | 2 +- inc/lang/pl/lang.php | 2 +- inc/lang/pt-br/lang.php | 2 +- inc/lang/pt/lang.php | 2 +- inc/lang/ro/lang.php | 2 +- inc/lang/ru/lang.php | 2 +- inc/lang/sk/lang.php | 2 +- inc/lang/sl/lang.php | 2 +- inc/lang/sq/lang.php | 2 +- inc/lang/sr/lang.php | 2 +- inc/lang/sv/lang.php | 2 +- inc/lang/th/lang.php | 2 +- inc/lang/tr/lang.php | 2 +- inc/lang/uk/lang.php | 2 +- inc/lang/vi/lang.php | 2 +- inc/lang/zh-tw/lang.php | 2 +- inc/lang/zh/lang.php | 2 +- inc/template.php | 12 +++++++++++- lib/plugins/config/settings/extra.class.php | 1 - 63 files changed, 79 insertions(+), 80 deletions(-) diff --git a/inc/html.php b/inc/html.php index c91888494..080beb01a 100644 --- a/inc/html.php +++ b/inc/html.php @@ -62,17 +62,11 @@ function html_login(){ $form->endFieldset(); if(actionOK('register')){ - $form->addElement('

' - . $lang['reghere'] - . ': '.$lang['register'].'' - . '

'); + $form->addElement('

'.$lang['reghere'].': '.tpl_actionlink('register','','','',true).'

'); } if (actionOK('resendpwd')) { - $form->addElement('

' - . $lang['pwdforget'] - . ': '.$lang['btn_resendpwd'].'' - . '

'); + $form->addElement('

'.$lang['pwdforget'].': '.tpl_actionlink('resendpwd','','','',true).'

'); } html_form('login', $form); @@ -1111,7 +1105,7 @@ function html_register(){ print p_locale_xhtml('register'); print '
'.NL; $form = new Doku_Form(array('id' => 'dw__register')); - $form->startFieldset($lang['register']); + $form->startFieldset($lang['btn_register']); $form->addHidden('do', 'register'); $form->addHidden('save', '1'); $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], null, 'block', array('size'=>'50'))); @@ -1121,7 +1115,7 @@ function html_register(){ } $form->addElement(form_makeTextField('fullname', $_POST['fullname'], $lang['fullname'], '', 'block', array('size'=>'50'))); $form->addElement(form_makeTextField('email', $_POST['email'], $lang['email'], '', 'block', array('size'=>'50'))); - $form->addElement(form_makeButton('submit', '', $lang['register'])); + $form->addElement(form_makeButton('submit', '', $lang['btn_register'])); $form->endFieldset(); html_form('register', $form); diff --git a/inc/lang/af/lang.php b/inc/lang/af/lang.php index fce59d13e..6665196f4 100644 --- a/inc/lang/af/lang.php +++ b/inc/lang/af/lang.php @@ -26,6 +26,7 @@ $lang['btn_backlink'] = 'Wat skakel hierheen'; $lang['btn_subscribe'] = 'Hou bladsy dop'; $lang['btn_unsubscribe'] = 'Verwyder van bladsy dophoulys'; $lang['btn_resendpwd'] = 'E-pos nuwe wagwoord'; +$lang['btn_register'] = 'Skep gerus \'n rekening'; $lang['loggedinas'] = 'Ingeteken as'; $lang['user'] = 'Gebruikernaam'; $lang['pass'] = 'Wagwoord'; @@ -35,7 +36,6 @@ $lang['passchk'] = 'Herhaal wagwoord'; $lang['remember'] = 'Onthou my wagwoord oor sessies'; $lang['fullname'] = 'Regte naam'; $lang['email'] = 'E-pos'; -$lang['register'] = 'Skep gerus \'n rekening'; $lang['badlogin'] = 'Intekenfout'; $lang['minoredit'] = 'Klein wysiging'; $lang['reguexists'] = 'Die gebruikersnaam wat jy gebruik het, is alreeds gebruik. Kies asseblief \'n ander gebruikersnaam.'; diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index 0a2341b97..300ec3b9a 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -46,7 +46,7 @@ $lang['btn_draft'] = 'حرر المسودة'; $lang['btn_recover'] = 'استرجع المسودة'; $lang['btn_draftdel'] = 'احذف المسوّدة'; $lang['btn_revert'] = 'استعد -'; +$lang['btn_register'] = 'سجّل'; $lang['loggedinas'] = 'داخل باسم'; $lang['user'] = 'اسم المستخدم'; $lang['pass'] = 'كلمة السر'; @@ -56,7 +56,6 @@ $lang['passchk'] = 'مرة أخرى'; $lang['remember'] = 'تذكرني'; $lang['fullname'] = 'الاسم الحقيقي'; $lang['email'] = 'البريد الإلكتروني'; -$lang['register'] = 'سجّل'; $lang['profile'] = 'الملف الشخصي'; $lang['badlogin'] = 'عذرا، اسم المشترك أو كلمة السر غير صحيحة'; $lang['minoredit'] = 'تعديلات طفيفة'; diff --git a/inc/lang/az/lang.php b/inc/lang/az/lang.php index ca826c8e0..35b18d3a7 100644 --- a/inc/lang/az/lang.php +++ b/inc/lang/az/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'Qaralamada düzəliş etmək'; $lang['btn_recover'] = 'Qaralamanı qaytar'; $lang['btn_draftdel'] = 'Qaralamanı sil'; $lang['btn_revert'] = 'Qaytar'; +$lang['btn_register'] = 'Qeydiyyatdan keç'; $lang['loggedinas'] = 'İstifadəcinin adı'; $lang['user'] = 'istifadəci adı'; $lang['pass'] = 'Şifrə'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'təkrarlayın'; $lang['remember'] = 'Məni yadda saxla'; $lang['fullname'] = 'Tam ad'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Qeydiyyatdan keç'; $lang['profile'] = 'İstifadəçi profili'; $lang['badlogin'] = 'Təssüf ki istifadəçi adı və ya şifrə səhvdir.'; $lang['minoredit'] = 'Az dəyişiklər'; diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index d3e86c41d..a45615ed8 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -46,6 +46,7 @@ $lang['btn_draft'] = 'Редактиране на чернова'; $lang['btn_recover'] = 'Възстановяване на чернова'; $lang['btn_draftdel'] = 'Изтриване на чернова'; $lang['btn_revert'] = 'Възстановяване'; +$lang['btn_register'] = 'Регистриране'; $lang['loggedinas'] = 'Вписани сте като'; $lang['user'] = 'Потребител'; $lang['pass'] = 'Парола'; @@ -55,7 +56,6 @@ $lang['passchk'] = 'още веднъж'; $lang['remember'] = 'Запомни ме'; $lang['fullname'] = 'Пълно име'; $lang['email'] = 'Електронна поща'; -$lang['register'] = 'Регистриране'; $lang['profile'] = 'Потребителски профил'; $lang['badlogin'] = 'Грешно потребителско име или парола'; $lang['minoredit'] = 'Незначителни промени'; diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php index d49c900fa..04f7c32bf 100644 --- a/inc/lang/ca-valencia/lang.php +++ b/inc/lang/ca-valencia/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = 'Editar borrador'; $lang['btn_recover'] = 'Recuperar borrador'; $lang['btn_draftdel'] = 'Borrar borrador'; $lang['btn_revert'] = 'Recuperar'; +$lang['btn_register'] = 'Registrar-se'; $lang['loggedinas'] = 'Sessió de'; $lang['user'] = 'Nom d\'usuari'; $lang['pass'] = 'Contrasenya'; @@ -58,7 +59,6 @@ $lang['passchk'] = 'una atra volta'; $lang['remember'] = 'Recorda\'m'; $lang['fullname'] = 'Nom complet'; $lang['email'] = 'Correu electrònic'; -$lang['register'] = 'Registrar-se'; $lang['profile'] = 'Perfil d\'usuari'; $lang['badlogin'] = 'Disculpe, pero el nom d\'usuari o la contrasenya són incorrectes.'; $lang['minoredit'] = 'Canvis menors'; diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php index 19fb7c556..8e627fc69 100644 --- a/inc/lang/ca/lang.php +++ b/inc/lang/ca/lang.php @@ -50,6 +50,7 @@ $lang['btn_draft'] = 'Edita esborrany'; $lang['btn_recover'] = 'Recupera esborrany'; $lang['btn_draftdel'] = 'Suprimeix esborrany'; $lang['btn_revert'] = 'Restaura'; +$lang['btn_register'] = 'Registra\'m'; $lang['loggedinas'] = 'Heu entrat com'; $lang['user'] = 'Nom d\'usuari'; $lang['pass'] = 'Contrasenya'; @@ -59,7 +60,6 @@ $lang['passchk'] = 'una altra vegada'; $lang['remember'] = 'Recorda\'m'; $lang['fullname'] = 'Nom complet'; $lang['email'] = 'Correu electrònic'; -$lang['register'] = 'Registra\'m'; $lang['profile'] = 'Perfil d\'usuari'; $lang['badlogin'] = 'Nom d\'usuari o contrasenya incorrectes.'; $lang['minoredit'] = 'Canvis menors'; diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index 749a41a5b..32d4692be 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = 'Upravit koncept'; $lang['btn_recover'] = 'Obnovit koncept'; $lang['btn_draftdel'] = 'Vymazat koncept'; $lang['btn_revert'] = 'Vrátit zpět'; +$lang['btn_register'] = 'Registrovat'; $lang['loggedinas'] = 'Přihlášen(a) jako'; $lang['user'] = 'Uživatelské jméno'; $lang['pass'] = 'Heslo'; @@ -58,7 +59,6 @@ $lang['passchk'] = 'ještě jednou'; $lang['remember'] = 'Přihlásit se nastálo'; $lang['fullname'] = 'Celé jméno'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Registrovat'; $lang['profile'] = 'Uživatelský profil'; $lang['badlogin'] = 'Zadané uživatelské jméno a heslo není správně.'; $lang['minoredit'] = 'Drobné změny'; diff --git a/inc/lang/da/lang.php b/inc/lang/da/lang.php index 47b42be9d..80d55d6f5 100644 --- a/inc/lang/da/lang.php +++ b/inc/lang/da/lang.php @@ -53,6 +53,7 @@ $lang['btn_draft'] = 'Redigér kladde'; $lang['btn_recover'] = 'Gendan kladde'; $lang['btn_draftdel'] = 'Slet kladde'; $lang['btn_revert'] = 'Reetablér'; +$lang['btn_register'] = 'Registrér'; $lang['loggedinas'] = 'Logget ind som'; $lang['user'] = 'Brugernavn'; $lang['pass'] = 'Adgangskode'; @@ -62,7 +63,6 @@ $lang['passchk'] = 'Gentag ny adgangskode'; $lang['remember'] = 'Automatisk log ind'; $lang['fullname'] = 'Fulde navn'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Registrér'; $lang['profile'] = 'Brugerprofil'; $lang['badlogin'] = 'Brugernavn eller adgangskode var forkert.'; $lang['minoredit'] = 'Mindre ændringer'; diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index b7c446656..cfb492dfb 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -58,6 +58,7 @@ $lang['btn_draft'] = 'Entwurf bearbeiten'; $lang['btn_recover'] = 'Entwurf wiederherstellen'; $lang['btn_draftdel'] = 'Entwurf löschen'; $lang['btn_revert'] = 'Wiederherstellen'; +$lang['btn_register'] = 'Registrieren'; $lang['loggedinas'] = 'Angemeldet als'; $lang['user'] = 'Benutzername'; $lang['pass'] = 'Passwort'; @@ -67,7 +68,6 @@ $lang['passchk'] = 'und nochmal'; $lang['remember'] = 'Angemeldet bleiben'; $lang['fullname'] = 'Voller Name'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Registrieren'; $lang['profile'] = 'Benutzerprofil'; $lang['badlogin'] = 'Nutzername oder Passwort sind falsch.'; $lang['minoredit'] = 'kleine Änderung'; diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index a353b98ed..4c5f642bb 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -59,6 +59,7 @@ $lang['btn_draft'] = 'Entwurf bearbeiten'; $lang['btn_recover'] = 'Entwurf wiederherstellen'; $lang['btn_draftdel'] = 'Entwurf löschen'; $lang['btn_revert'] = 'Wiederherstellen'; +$lang['btn_register'] = 'Registrieren'; $lang['loggedinas'] = 'Angemeldet als'; $lang['user'] = 'Benutzername'; $lang['pass'] = 'Passwort'; @@ -68,7 +69,6 @@ $lang['passchk'] = 'und nochmal'; $lang['remember'] = 'Angemeldet bleiben'; $lang['fullname'] = 'Voller Name'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Registrieren'; $lang['profile'] = 'Benutzerprofil'; $lang['badlogin'] = 'Nutzername oder Passwort sind falsch.'; $lang['minoredit'] = 'kleine Änderung'; diff --git a/inc/lang/el/lang.php b/inc/lang/el/lang.php index da79e5711..11c64285e 100644 --- a/inc/lang/el/lang.php +++ b/inc/lang/el/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'Επεξεργασία αυτόματα απ $lang['btn_recover'] = 'Επαναφορά αυτόματα αποθηκευμένης σελίδας'; $lang['btn_draftdel'] = 'Διαγραφή αυτόματα αποθηκευμένης σελίδας'; $lang['btn_revert'] = 'Αποκατάσταση'; +$lang['btn_register'] = 'Εγγραφή'; $lang['loggedinas'] = 'Συνδεδεμένος ως'; $lang['user'] = 'Όνομα χρήστη'; $lang['pass'] = 'Κωδικός'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'ακόμη μια φορά'; $lang['remember'] = 'Απομνημόνευση στοιχείων λογαριασμού'; $lang['fullname'] = 'Ονοματεπώνυμο'; $lang['email'] = 'e-mail'; -$lang['register'] = 'Εγγραφή'; $lang['profile'] = 'Προφίλ χρήστη'; $lang['badlogin'] = 'Συγνώμη, το όνομα χρήστη ή ο κωδικός ήταν λανθασμένο.'; $lang['minoredit'] = 'Ασήμαντες αλλαγές'; diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 8abd4314c..51fd8f645 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -46,7 +46,8 @@ $lang['btn_resendpwd'] = 'Send new password'; $lang['btn_draft'] = 'Edit draft'; $lang['btn_recover'] = 'Recover draft'; $lang['btn_draftdel'] = 'Delete draft'; -$lang['btn_revert'] = 'Restore'; +$lang['btn_revert'] = 'Restore'; +$lang['btn_register'] = 'Register'; $lang['loggedinas'] = 'Logged in as'; $lang['user'] = 'Username'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'once again'; $lang['remember'] = 'Remember me'; $lang['fullname'] = 'Real name'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Register'; $lang['profile'] = 'User Profile'; $lang['badlogin'] = 'Sorry, username or password was wrong.'; $lang['minoredit'] = 'Minor Changes'; diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index a2457474b..dee12a670 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -54,6 +54,7 @@ $lang['btn_draft'] = 'Redakti skizon'; $lang['btn_recover'] = 'Restarigi skizon'; $lang['btn_draftdel'] = 'Forigi skizon'; $lang['btn_revert'] = 'Restarigi'; +$lang['btn_register'] = 'Registriĝi'; $lang['loggedinas'] = 'Ensalutita kiel'; $lang['user'] = 'Uzant-nomo'; $lang['pass'] = 'Pasvorto'; @@ -63,7 +64,6 @@ $lang['passchk'] = 'plian fojon'; $lang['remember'] = 'Rememoru min'; $lang['fullname'] = 'Kompleta nomo'; $lang['email'] = 'Retpoŝto'; -$lang['register'] = 'Registriĝi'; $lang['profile'] = 'Uzanto-profilo'; $lang['badlogin'] = 'Pardonu, uzant-nomo aŭ pasvorto estis erara.'; $lang['minoredit'] = 'Etaj modifoj'; diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php index 04403c821..b329ffff4 100644 --- a/inc/lang/es/lang.php +++ b/inc/lang/es/lang.php @@ -64,6 +64,7 @@ $lang['btn_draft'] = 'Editar borrador'; $lang['btn_recover'] = 'Recuperar borrador'; $lang['btn_draftdel'] = 'Eliminar borrador'; $lang['btn_revert'] = 'Restaurar'; +$lang['btn_register'] = 'Registrarse'; $lang['loggedinas'] = 'Conectado como '; $lang['user'] = 'Usuario'; $lang['pass'] = 'Contraseña'; @@ -73,7 +74,6 @@ $lang['passchk'] = 'otra vez'; $lang['remember'] = 'Recordarme'; $lang['fullname'] = 'Nombre real'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Registrarse'; $lang['profile'] = 'Perfil del usuario'; $lang['badlogin'] = 'Lo siento, el usuario o la contraseña es incorrecto.'; $lang['minoredit'] = 'Cambios menores'; diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php index ee765b5b5..5fc9c88d5 100644 --- a/inc/lang/et/lang.php +++ b/inc/lang/et/lang.php @@ -43,6 +43,8 @@ $lang['btn_resendpwd'] = 'Saada uus parool'; $lang['btn_draft'] = 'Toimeta mustandit'; $lang['btn_recover'] = 'Taata mustand'; $lang['btn_draftdel'] = 'Kustuta mustand'; +$lang['btn_register'] = 'Registreeri uus kasutaja'; + $lang['newpass'] = 'Uus parool'; $lang['oldpass'] = 'Vana parool'; $lang['passchk'] = 'Korda uut parooli'; @@ -131,7 +133,6 @@ $lang['pass'] = 'Parool'; $lang['remember'] = 'Pea mind meeles'; $lang['fullname'] = 'Täielik nimi'; $lang['email'] = 'E-post'; -$lang['register'] = 'Registreeri uus kasutaja'; $lang['badlogin'] = 'Oops, Sinu kasutajanimi või parool oli vale.'; $lang['regmissing'] = 'Kõik väljad tuleb ära täita.'; diff --git a/inc/lang/eu/lang.php b/inc/lang/eu/lang.php index 2efec00be..503b20b30 100644 --- a/inc/lang/eu/lang.php +++ b/inc/lang/eu/lang.php @@ -45,6 +45,7 @@ $lang['btn_draft'] = 'Editatu zirriborroa'; $lang['btn_recover'] = 'Berreskuratu zirriborroa'; $lang['btn_draftdel'] = 'Ezabatu zirriborroa'; $lang['btn_revert'] = 'Berrezarri'; +$lang['btn_register'] = 'Erregistratu'; $lang['loggedinas'] = 'Erabiltzailea'; $lang['user'] = 'Erabiltzailea'; $lang['pass'] = 'Pasahitza'; @@ -54,7 +55,6 @@ $lang['passchk'] = 'berriz'; $lang['remember'] = 'Gogoratu'; $lang['fullname'] = 'Izen Deiturak'; $lang['email'] = 'E-Maila'; -$lang['register'] = 'Erregistratu'; $lang['profile'] = 'Erabiltzaile Profila'; $lang['badlogin'] = 'Barkatu, prozesuak huts egin du; saiatu berriz'; $lang['minoredit'] = 'Aldaketa Txikiak'; diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php index c5be8e1c0..cc79393bd 100644 --- a/inc/lang/fa/lang.php +++ b/inc/lang/fa/lang.php @@ -53,6 +53,7 @@ $lang['btn_draft'] = 'ویرایش پیش‌نویس'; $lang['btn_recover'] = 'بازیابی پیش‌نویس'; $lang['btn_draftdel'] = 'حذف پیش‌نویس'; $lang['btn_revert'] = 'بازیابی'; +$lang['btn_register'] = 'یک حساب جدید بسازید'; $lang['loggedinas'] = 'به عنوان کاربر روبرو وارد شده‌اید:'; $lang['user'] = 'نام کاربری:'; $lang['pass'] = 'گذرواژه‌ی شما'; @@ -62,7 +63,6 @@ $lang['passchk'] = 'گذرواژه را دوباره وارد کن $lang['remember'] = 'گذرواژه را به یاد بسپار.'; $lang['fullname'] = '*نام واقعی شما'; $lang['email'] = 'ایمیل شما*'; -$lang['register'] = 'یک حساب جدید بسازید'; $lang['profile'] = 'پروفایل کاربر'; $lang['badlogin'] = 'خطا در ورود به سیستم'; $lang['minoredit'] = 'این ویرایش خُرد است'; diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index 2b1ddfa6f..36bb1e911 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -48,6 +48,7 @@ $lang['btn_draft'] = 'Muokkaa luonnosta'; $lang['btn_recover'] = 'Palauta luonnos'; $lang['btn_draftdel'] = 'Poista luonnos'; $lang['btn_revert'] = 'palauta'; +$lang['btn_register'] = 'Rekisteröidy'; $lang['loggedinas'] = 'Kirjautunut nimellä'; $lang['user'] = 'Käyttäjänimi'; $lang['pass'] = 'Salasana'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'uudelleen'; $lang['remember'] = 'Muista minut'; $lang['fullname'] = 'Koko nimi'; $lang['email'] = 'Sähköposti'; -$lang['register'] = 'Rekisteröidy'; $lang['profile'] = 'Käyttäjän profiili'; $lang['badlogin'] = 'Käyttäjänimi tai salasana oli väärä.'; $lang['minoredit'] = 'Pieni muutos'; diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php index 2bc5c3d53..8b1cd41e5 100644 --- a/inc/lang/fo/lang.php +++ b/inc/lang/fo/lang.php @@ -45,6 +45,7 @@ $lang['btn_draft'] = 'Broyt kladdu'; $lang['btn_recover'] = 'Endurbygg kladdu'; $lang['btn_draftdel'] = 'Sletta'; $lang['btn_revert'] = 'Endurbygg'; +$lang['btn_register'] = 'Melda til'; $lang['loggedinas'] = 'Ritavur inn sum'; $lang['user'] = 'Brúkaranavn'; $lang['pass'] = 'Loyniorð'; @@ -54,7 +55,6 @@ $lang['passchk'] = 'Endurtak nýtt loyniorð'; $lang['remember'] = 'Minst til loyniorðið hjá mær'; $lang['fullname'] = 'Navn'; $lang['email'] = 'T-postur'; -$lang['register'] = 'Melda til'; $lang['profile'] = 'Brúkara vangamynd'; $lang['badlogin'] = 'Skeivt brúkaranavn ella loyniorð.'; $lang['minoredit'] = 'Smærri broytingar'; diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index b6be994c6..da0ffdea0 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -62,6 +62,7 @@ $lang['btn_draft'] = 'Modifier le brouillon'; $lang['btn_recover'] = 'Récupérer le brouillon'; $lang['btn_draftdel'] = 'Effacer le brouillon'; $lang['btn_revert'] = 'Restaurer'; +$lang['btn_register'] = 'S\'enregistrer'; $lang['loggedinas'] = 'Connecté en tant que '; $lang['user'] = 'Utilisateur'; $lang['pass'] = 'Mot de passe'; @@ -71,7 +72,6 @@ $lang['passchk'] = 'Répéter nouveau mot de passe'; $lang['remember'] = 'Mémoriser'; $lang['fullname'] = 'Nom'; $lang['email'] = 'Adresse de courriel'; -$lang['register'] = 'S\'enregistrer'; $lang['profile'] = 'Profil utilisateur'; $lang['badlogin'] = 'L\'utilisateur ou le mot de passe est incorrect.'; $lang['minoredit'] = 'Modification mineure'; diff --git a/inc/lang/gl/lang.php b/inc/lang/gl/lang.php index 9f1b48173..37cf55d22 100644 --- a/inc/lang/gl/lang.php +++ b/inc/lang/gl/lang.php @@ -44,6 +44,7 @@ $lang['btn_draft'] = 'Editar borrador'; $lang['btn_recover'] = 'Recuperar borrador'; $lang['btn_draftdel'] = 'Eliminar borrador'; $lang['btn_revert'] = 'Restaurar'; +$lang['btn_register'] = 'Rexístrate'; $lang['loggedinas'] = 'Iniciaches sesión como'; $lang['user'] = 'Nome de Usuario'; $lang['pass'] = 'Contrasinal'; @@ -53,7 +54,6 @@ $lang['passchk'] = 'de novo'; $lang['remember'] = 'Lémbrame'; $lang['fullname'] = 'Nome Completo'; $lang['email'] = 'Correo-e'; -$lang['register'] = 'Rexístrate'; $lang['profile'] = 'Perfil de Usuario'; $lang['badlogin'] = 'Sentímolo, mais o nome de usuario ou o contrasinal non son correctos.'; $lang['minoredit'] = 'Trocos Menores'; diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php index 47310d4d1..47940ef53 100644 --- a/inc/lang/he/lang.php +++ b/inc/lang/he/lang.php @@ -51,6 +51,7 @@ $lang['btn_draft'] = 'עריכת טיוטה'; $lang['btn_recover'] = 'שחזור טיוטה'; $lang['btn_draftdel'] = 'מחיקת טיוטה'; $lang['btn_revert'] = 'שחזור'; +$lang['btn_register'] = 'הרשמה'; $lang['loggedinas'] = 'נכנסת בשם'; $lang['user'] = 'שם משתמש'; $lang['pass'] = 'ססמה'; @@ -60,7 +61,6 @@ $lang['passchk'] = 'פעם נוספת'; $lang['remember'] = 'שמירת הפרטים שלי'; $lang['fullname'] = 'שם מלא'; $lang['email'] = 'דוא״ל'; -$lang['register'] = 'הרשמה'; $lang['profile'] = 'פרופיל המשתמש'; $lang['badlogin'] = 'שם המשתמש או הססמה שגויים, עמך הסליחה'; $lang['minoredit'] = 'שינוים מזעריים'; diff --git a/inc/lang/hi/lang.php b/inc/lang/hi/lang.php index b8af3becd..00e5589d8 100644 --- a/inc/lang/hi/lang.php +++ b/inc/lang/hi/lang.php @@ -79,11 +79,8 @@ $lang['current'] = 'वर्तमान'; $lang['yours'] = 'आपका संस्करणः'; $lang['diff'] = 'वर्तमान संशोधन में मतभेद दिखाइये |'; $lang['diff2'] = 'चयनित संशोधन के बीच में मतभेद दिखाइये |'; -$lang['line'] = 'रेखा -'; -$lang['youarehere'] = 'आप यहाँ हैं | - -'; +$lang['line'] = 'रेखा'; +$lang['youarehere'] = 'आप यहाँ हैं |'; $lang['lastmod'] = 'अंतिम बार संशोधित'; $lang['by'] = 'के द्वारा'; $lang['deleted'] = 'हटाया'; @@ -121,8 +118,7 @@ $lang['i_superuser'] = 'महाउपयोगकर्ता'; $lang['i_retry'] = 'पुनःप्रयास'; $lang['mu_gridsize'] = 'आकार'; $lang['mu_gridstat'] = 'स्थिति'; -$lang['mu_browse'] = 'ब्राउज़ -'; +$lang['mu_browse'] = 'ब्राउज़'; $lang['mu_toobig'] = 'बहुत बड़ा'; $lang['mu_ready'] = 'अपलोड करने के लिए तैयार'; $lang['mu_done'] = 'पूर्ण'; diff --git a/inc/lang/hr/lang.php b/inc/lang/hr/lang.php index 545498dee..a42e8c96f 100644 --- a/inc/lang/hr/lang.php +++ b/inc/lang/hr/lang.php @@ -48,6 +48,7 @@ $lang['btn_resendpwd'] = 'Pošalji novu lozinku'; $lang['btn_draft'] = 'Uredi nacrt dokumenta'; $lang['btn_recover'] = 'Vrati prijašnji nacrt dokumenta'; $lang['btn_draftdel'] = 'Obriši nacrt dokumenta'; +$lang['btn_register'] = 'Registracija'; $lang['loggedinas'] = 'Prijavljen kao'; $lang['user'] = 'Korisničko ime'; $lang['pass'] = 'Lozinka'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'Ponoviti'; $lang['remember'] = 'Zapamti me'; $lang['fullname'] = 'Ime i prezime'; $lang['email'] = 'Email'; -$lang['register'] = 'Registracija'; $lang['profile'] = 'Korisnički profil'; $lang['badlogin'] = 'Ne ispravno korisničko ime ili lozinka.'; $lang['minoredit'] = 'Manje izmjene'; diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php index b3cd87c29..9f318ffec 100644 --- a/inc/lang/hu/lang.php +++ b/inc/lang/hu/lang.php @@ -50,6 +50,7 @@ $lang['btn_draft'] = 'Piszkozat szerkesztése'; $lang['btn_recover'] = 'Piszkozat folytatása'; $lang['btn_draftdel'] = 'Piszkozat törlése'; $lang['btn_revert'] = 'Helyreállítás'; +$lang['btn_register'] = 'Regisztráció'; $lang['loggedinas'] = 'Belépett felhasználó: '; $lang['user'] = 'Azonosító'; $lang['pass'] = 'Jelszó'; @@ -59,7 +60,6 @@ $lang['passchk'] = 'még egyszer'; $lang['remember'] = 'Emlékezz rám'; $lang['fullname'] = 'Teljes név'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Regisztráció'; $lang['profile'] = 'Személyes beállítások'; $lang['badlogin'] = 'Sajnáljuk, az azonosító, vagy a jelszó nem jó.'; $lang['minoredit'] = 'Apróbb változások'; diff --git a/inc/lang/ia/lang.php b/inc/lang/ia/lang.php index f68467543..bdfef88f4 100644 --- a/inc/lang/ia/lang.php +++ b/inc/lang/ia/lang.php @@ -50,6 +50,7 @@ $lang['btn_draft'] = 'Modificar version provisori'; $lang['btn_recover'] = 'Recuperar version provisori'; $lang['btn_draftdel'] = 'Deler version provisori'; $lang['btn_revert'] = 'Restaurar'; +$lang['btn_register'] = 'Crear conto'; $lang['loggedinas'] = 'Session aperite como'; $lang['user'] = 'Nomine de usator'; $lang['pass'] = 'Contrasigno'; @@ -59,7 +60,6 @@ $lang['passchk'] = 'un altere vice'; $lang['remember'] = 'Memorar me'; $lang['fullname'] = 'Nomine real'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Crear conto'; $lang['profile'] = 'Profilo de usator'; $lang['badlogin'] = 'Le nomine de usator o le contrasigno es incorrecte.'; $lang['minoredit'] = 'Modificationes minor'; diff --git a/inc/lang/id-ni/lang.php b/inc/lang/id-ni/lang.php index 4e26677e0..9c04f0259 100644 --- a/inc/lang/id-ni/lang.php +++ b/inc/lang/id-ni/lang.php @@ -41,6 +41,7 @@ $lang['btn_reset'] = 'Fawu\'a'; $lang['btn_resendpwd'] = 'Fa\'ohe\'ö kode sibohou'; $lang['btn_draft'] = 'Fawu\'a wanura'; $lang['btn_draftdel'] = 'Heta zura'; +$lang['btn_register'] = 'Fasura\'ö'; $lang['loggedinas'] = 'Möi bakha zotöi'; $lang['user'] = 'Töi'; $lang['pass'] = 'Kode'; @@ -50,7 +51,6 @@ $lang['passchk'] = 'Sura sakalitö'; $lang['remember'] = 'Töngöni ndra\'o'; $lang['fullname'] = 'Töi safönu'; $lang['email'] = 'Imele'; -$lang['register'] = 'Fasura\'ö'; $lang['profile'] = 'Töi pörofile'; $lang['badlogin'] = 'Bologö dödöu, fasala döi faoma kode.'; $lang['minoredit'] = 'Famawu\'a ma\'ifu'; diff --git a/inc/lang/id/lang.php b/inc/lang/id/lang.php index 3ea1b394a..c1480f518 100644 --- a/inc/lang/id/lang.php +++ b/inc/lang/id/lang.php @@ -45,6 +45,7 @@ $lang['btn_reset'] = 'Reset'; $lang['btn_resendpwd'] = 'Kirim password baru'; $lang['btn_draft'] = 'Edit draft'; $lang['btn_draftdel'] = 'Hapus draft'; +$lang['btn_register'] = 'Daftar'; $lang['loggedinas'] = 'Login sebagai '; $lang['user'] = 'Username'; $lang['pass'] = 'Password'; @@ -54,7 +55,6 @@ $lang['passchk'] = 'sekali lagi'; $lang['remember'] = 'Ingat saya'; $lang['fullname'] = 'Nama lengkap'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Daftar'; $lang['profile'] = 'Profil User'; $lang['badlogin'] = 'Maaf, username atau password salah.'; $lang['minoredit'] = 'Perubahan Minor'; diff --git a/inc/lang/is/lang.php b/inc/lang/is/lang.php index ba1ab2c04..7388e6908 100644 --- a/inc/lang/is/lang.php +++ b/inc/lang/is/lang.php @@ -54,6 +54,7 @@ $lang['btn_draft'] = 'Breyta uppkasti'; $lang['btn_recover'] = 'Endurheimta uppkast'; $lang['btn_draftdel'] = 'Eyða uppkasti'; $lang['btn_revert'] = 'Endurheimta'; +$lang['btn_register'] = 'Skráning'; $lang['loggedinas'] = 'Innskráning sem'; $lang['user'] = 'Notendanafn'; $lang['pass'] = 'Aðgangsorð'; @@ -63,7 +64,6 @@ $lang['passchk'] = 'Aðgangsorð (aftur)'; $lang['remember'] = 'Muna.'; $lang['fullname'] = 'Fullt nafn þitt*'; $lang['email'] = 'Tölvupóstfangið þitt*'; -$lang['register'] = 'Skráning'; $lang['profile'] = 'Notendastillingar'; $lang['badlogin'] = 'Því miður, notandanafn eða aðgangsorð var rangur.'; $lang['minoredit'] = 'Minniháttar breyting'; diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index 419b7053b..99c09c710 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -55,6 +55,7 @@ $lang['btn_draft'] = 'Modifica bozza'; $lang['btn_recover'] = 'Ripristina bozza'; $lang['btn_draftdel'] = 'Elimina bozza'; $lang['btn_revert'] = 'Ripristina'; +$lang['btn_register'] = 'Registrazione'; $lang['loggedinas'] = 'Collegato come'; $lang['user'] = 'Nome utente'; $lang['pass'] = 'Password'; @@ -64,7 +65,6 @@ $lang['passchk'] = 'Ripeti password'; $lang['remember'] = 'Memorizza nome utente e password'; $lang['fullname'] = 'Nome completo'; $lang['email'] = 'Email'; -$lang['register'] = 'Registrazione'; $lang['profile'] = 'Profilo utente'; $lang['badlogin'] = 'Il nome utente o la password non sono validi.'; $lang['minoredit'] = 'Modifiche minori'; diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index d9c02764a..d503bae31 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'ドラフトを編集'; $lang['btn_recover'] = 'ドラフトを復元'; $lang['btn_draftdel'] = 'ドラフトを削除'; $lang['btn_revert'] = '元に戻す'; +$lang['btn_register'] = 'ユーザー登録'; $lang['loggedinas'] = 'ようこそ'; $lang['user'] = 'ユーザー名'; $lang['pass'] = 'パスワード'; @@ -56,7 +57,6 @@ $lang['passchk'] = '確認'; $lang['remember'] = 'ユーザー名とパスワードを記憶する'; $lang['fullname'] = 'フルネーム'; $lang['email'] = 'メールアドレス'; -$lang['register'] = 'ユーザー登録'; $lang['profile'] = 'ユーザー情報'; $lang['badlogin'] = 'ユーザー名かパスワードが違います。'; $lang['minoredit'] = '小変更'; diff --git a/inc/lang/km/lang.php b/inc/lang/km/lang.php index 3519a484e..24dd67045 100644 --- a/inc/lang/km/lang.php +++ b/inc/lang/km/lang.php @@ -46,6 +46,7 @@ $lang['btn_resendpwd'] = 'ផ្ញើពាក្សសម្ងាត់'; $lang['btn_draft'] = 'កែគំរោង'; $lang['btn_recover'] = 'ស្រោះគំរោងឡើង'; $lang['btn_draftdel'] = 'លុបគំរោង'; +$lang['btn_register'] = 'ចុះឈ្មោះ';//'Register'; $lang['loggedinas'] = 'អ្នកប្រើ'; $lang['user'] = 'នាមបម្រើ'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'ម្ដងទាត'; $lang['remember'] = 'ចំណាំខ្ញុំ'; $lang['fullname'] = 'នាមត្រគោល'; $lang['email'] = 'អ៊ីមែល'; -$lang['register'] = 'ចុះឈ្មោះ';//'Register'; $lang['profile'] = 'ប្រវត្តិរូប';// 'User Profile'; $lang['badlogin'] = 'សុំអាទោស​ នាមបំរើ ឬ ពាក្សសម្ងាតមិនត្រវទេ។'; $lang['minoredit'] = 'កែបបណ្តិចបណ្តួច';// 'Minor Changes'; diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 3765dd011..482d233bd 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = '문서초안 편집'; $lang['btn_recover'] = '문서초안 복구'; $lang['btn_draftdel'] = '문서초안 삭제'; $lang['btn_revert'] = '복원'; +$lang['btn_register'] = '등록'; $lang['loggedinas'] = '다음 사용자로 로그인'; $lang['user'] = '사용자'; $lang['pass'] = '패스워드'; @@ -58,7 +59,6 @@ $lang['passchk'] = '패스워드 다시 확인'; $lang['remember'] = '기억하기'; $lang['fullname'] = '실제 이름'; $lang['email'] = '이메일'; -$lang['register'] = '등록'; $lang['profile'] = '개인 정보'; $lang['badlogin'] = '잘못된 사용자 이름이거나 패스워드입니다.'; $lang['minoredit'] = '일부 내용 변경'; diff --git a/inc/lang/ku/lang.php b/inc/lang/ku/lang.php index 0ff2ca4ca..9bed43cd1 100644 --- a/inc/lang/ku/lang.php +++ b/inc/lang/ku/lang.php @@ -34,6 +34,7 @@ $lang['btn_backlink'] = "Girêdanên paş"; $lang['btn_backtomedia'] = 'Back to Mediafile Selection'; $lang['btn_subscribe'] = 'Subscribe Changes'; $lang['btn_unsubscribe'] = 'Unsubscribe Changes'; +$lang['btn_register'] = 'Register'; $lang['loggedinas'] = 'Logged in as'; $lang['user'] = 'Username'; @@ -42,7 +43,6 @@ $lang['passchk'] = 'once again'; $lang['remember'] = 'Remember me'; $lang['fullname'] = 'Full name'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Register'; $lang['badlogin'] = 'Sorry, username or password was wrong.'; $lang['regmissing'] = 'Sorry, you must fill in all fields.'; diff --git a/inc/lang/la/lang.php b/inc/lang/la/lang.php index ec80ac4d1..d10c094f8 100644 --- a/inc/lang/la/lang.php +++ b/inc/lang/la/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = 'Propositum recensere'; $lang['btn_recover'] = 'Propositum reficere'; $lang['btn_draftdel'] = 'Propositum delere'; $lang['btn_revert'] = 'Reficere'; +$lang['btn_register'] = 'Te adscribere'; $lang['loggedinas'] = 'Nomen sodalis:'; $lang['user'] = 'Nomen sodalis:'; $lang['pass'] = 'Tessera tua'; @@ -58,7 +59,6 @@ $lang['passchk'] = 'Tesseram tuam adfirmare'; $lang['remember'] = 'Tesseram meam sodalitatis memento'; $lang['fullname'] = 'Nomen tuom uerum:'; $lang['email'] = 'Cursus interretialis:'; -$lang['register'] = 'Te adscribere'; $lang['profile'] = 'Tabella Sodalis'; $lang['badlogin'] = 'Error in ineundo est, rectum nomen uel tessera cedo.'; $lang['minoredit'] = 'Recensio minor'; diff --git a/inc/lang/lb/lang.php b/inc/lang/lb/lang.php index 7152b65b1..09fc41f08 100644 --- a/inc/lang/lb/lang.php +++ b/inc/lang/lb/lang.php @@ -41,6 +41,7 @@ $lang['btn_resendpwd'] = 'Nei Passwuert schécken'; $lang['btn_draft'] = 'Entworf änneren'; $lang['btn_recover'] = 'Entworf zeréckhuelen'; $lang['btn_draftdel'] = 'Entworf läschen'; +$lang['btn_register'] = 'Registréieren'; $lang['loggedinas'] = 'Ageloggt als'; $lang['user'] = 'Benotzernumm'; $lang['pass'] = 'Passwuert'; @@ -50,7 +51,6 @@ $lang['passchk'] = 'nach eng Kéier'; $lang['remember'] = 'Verhal mech'; $lang['fullname'] = 'Richtegen Numm'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Registréieren'; $lang['profile'] = 'Benotzerprofil'; $lang['badlogin'] = 'Entschëllegt, de Benotzernumm oder d\'Passwuert war falsch'; $lang['minoredit'] = 'Kleng Ännerungen'; diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php index 639ad4749..ca2f2da6c 100644 --- a/inc/lang/lt/lang.php +++ b/inc/lang/lt/lang.php @@ -50,6 +50,7 @@ $lang['btn_resendpwd'] = 'Išsiųsti naują slaptažodį'; $lang['btn_draft'] = 'Redaguoti juodraštį'; $lang['btn_recover'] = 'Atkurti juodraštį'; $lang['btn_draftdel'] = 'Šalinti juodraštį'; +$lang['btn_register'] = 'Registruotis'; $lang['loggedinas'] = 'Prisijungęs kaip'; $lang['user'] = 'Vartotojo vardas'; $lang['pass'] = 'Slaptažodis'; @@ -59,7 +60,6 @@ $lang['passchk'] = 'dar kartą'; $lang['remember'] = 'Prisiminti mane'; $lang['fullname'] = 'Visas vardas'; $lang['email'] = 'El. pašto adresas'; -$lang['register'] = 'Registruotis'; $lang['profile'] = 'Vartotojo profilis'; $lang['badlogin'] = 'Nurodėte blogą vartotojo vardą arba slaptažodį.'; $lang['minoredit'] = 'Nedidelis pataisymas'; diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php index 21c4606b3..73559c0f8 100644 --- a/inc/lang/lv/lang.php +++ b/inc/lang/lv/lang.php @@ -44,6 +44,7 @@ $lang['btn_draft'] = 'Labot melnrakstu'; $lang['btn_recover'] = 'Atjaunot melnrakstu'; $lang['btn_draftdel'] = 'Dzēst melnrakstu'; $lang['btn_revert'] = 'Atjaunot'; +$lang['btn_register'] = 'Reģistrēties'; $lang['loggedinas'] = 'Pieteicies kā'; $lang['user'] = 'Lietotājvārds'; $lang['pass'] = 'Parole'; @@ -53,7 +54,6 @@ $lang['passchk'] = 'vēlreiz'; $lang['remember'] = 'Atceries mani'; $lang['fullname'] = 'Pilns vārds'; $lang['email'] = 'E-pasts'; -$lang['register'] = 'Reģistrēties'; $lang['profile'] = 'Lietotāja vārds'; $lang['badlogin'] = 'Atvaino, lietotājvārds vai parole aplama.'; $lang['minoredit'] = 'Sīki labojumi'; diff --git a/inc/lang/mg/lang.php b/inc/lang/mg/lang.php index 3727cfe9a..8c95a9e02 100644 --- a/inc/lang/mg/lang.php +++ b/inc/lang/mg/lang.php @@ -28,6 +28,7 @@ $lang['btn_update'] = 'Update'; $lang['btn_delete'] = 'Fafao'; $lang['btn_back'] = 'Miverina'; $lang['btn_backtomedia'] = 'Fitsongana fichier Media'; +$lang['btn_register'] = 'Hisoratra'; $lang['loggedinas'] = 'Anaranao:'; $lang['user'] = 'Anarana'; @@ -36,7 +37,6 @@ $lang['passchk'] = 'Ataovy indray'; $lang['remember'] = 'Tsarovy'; $lang['fullname'] = 'Anarana feno'; $lang['email'] = 'Imailaka'; -$lang['register'] = 'Hisoratra'; $lang['badlogin'] = 'Miala tsiny fa misy diso ny anarana na ny alahidy.'; $lang['regmissing'] = 'Tsy maintsy fenoina ny saha rehetra.'; diff --git a/inc/lang/mk/lang.php b/inc/lang/mk/lang.php index ddd734e22..456a5a3d4 100644 --- a/inc/lang/mk/lang.php +++ b/inc/lang/mk/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'Уреди скица'; $lang['btn_recover'] = 'Поврати скица'; $lang['btn_draftdel'] = 'Избриши скица'; $lang['btn_revert'] = 'Обнови'; +$lang['btn_register'] = 'Регистрирај се'; $lang['loggedinas'] = 'Најавен/а како'; $lang['user'] = 'Корисничко име'; $lang['pass'] = 'Лозинка'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'уште еднаш'; $lang['remember'] = 'Запомни ме'; $lang['fullname'] = 'Вистинско име'; $lang['email'] = 'Е-пошта'; -$lang['register'] = 'Регистрирај се'; $lang['profile'] = 'Кориснички профил'; $lang['badlogin'] = 'Жалам, корисничкото име или лозинката се погрешни.'; $lang['minoredit'] = 'Мали измени'; diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php index 99561f064..d00d6d841 100644 --- a/inc/lang/mr/lang.php +++ b/inc/lang/mr/lang.php @@ -54,6 +54,7 @@ $lang['btn_resendpwd'] = 'कृपया परवलीचा नव $lang['btn_draft'] = 'प्रत संपादन'; $lang['btn_recover'] = 'प्रत परत मिळवा'; $lang['btn_draftdel'] = 'प्रत रद्द'; +$lang['btn_register'] = 'नोंदणी'; $lang['loggedinas'] = 'लॉगिन नाव'; $lang['user'] = 'वापरकर्ता'; $lang['pass'] = 'परवलीचा शब्द'; @@ -63,7 +64,6 @@ $lang['passchk'] = 'परत एकदा'; $lang['remember'] = 'लक्षात ठेवा'; $lang['fullname'] = 'पूर्ण नावं'; $lang['email'] = 'इमेल'; -$lang['register'] = 'नोंदणी'; $lang['profile'] = 'वापरकर्त्याची माहिती'; $lang['badlogin'] = 'माफ़ करा, वापरकर्ता नावात किंवा परवलीच्या शब्दात चूक झाली आहे.'; $lang['minoredit'] = 'छोटे बदल'; diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php index 6c00610ea..11d9c01bd 100644 --- a/inc/lang/ne/lang.php +++ b/inc/lang/ne/lang.php @@ -47,6 +47,7 @@ $lang['btn_resendpwd'] = 'नयाँ प्रवेश शव्द( $lang['btn_draft'] = ' ड्राफ्ट सम्पादन गर्नुहोस् '; $lang['btn_recover'] = 'पहिलेको ड्राफ्ट हासिल गर्नुहोस '; $lang['btn_draftdel'] = ' ड्राफ्ट मेटाउनुहोस् '; +$lang['btn_register'] = 'दर्ता गर्नुहोस्'; $lang['loggedinas'] = 'प्रवेश गर्नुहोस् '; $lang['user'] = 'प्रयोगकर्ता '; $lang['pass'] = 'प्रवेशशव्द'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'एकपटक पुन:'; $lang['remember'] = 'मलाई सम्झनु'; $lang['fullname'] = 'पूरा नाम'; $lang['email'] = 'इमेल'; -$lang['register'] = 'दर्ता गर्नुहोस्'; $lang['profile'] = 'प्रयोगकर्ताको प्रोफाइल'; $lang['badlogin'] = 'माफ गर्नुहोस् , प्रयोगकर्तानाम वा प्रवेशशव्द गलत भयो '; $lang['minoredit'] = 'सामान्य परिवर्तन'; diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 9d81d0ff4..1ad653e78 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -55,6 +55,7 @@ $lang['btn_draft'] = 'Bewerk concept'; $lang['btn_recover'] = 'Herstel concept'; $lang['btn_draftdel'] = 'Verwijder concept'; $lang['btn_revert'] = 'Herstellen'; +$lang['btn_register'] = 'Registreren'; $lang['loggedinas'] = 'Ingelogd als'; $lang['user'] = 'Gebruikersnaam'; $lang['pass'] = 'Wachtwoord'; @@ -64,7 +65,6 @@ $lang['passchk'] = 'nogmaals'; $lang['remember'] = 'Bewaar'; $lang['fullname'] = 'Volledige naam'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Registreren'; $lang['profile'] = 'Gebruikersprofiel'; $lang['badlogin'] = 'Sorry, gebruikersnaam of wachtwoord onjuist'; $lang['minoredit'] = 'Kleine wijziging'; diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php index ca63c0094..a41cad51b 100644 --- a/inc/lang/no/lang.php +++ b/inc/lang/no/lang.php @@ -59,6 +59,7 @@ $lang['btn_draft'] = 'Rediger kladd'; $lang['btn_recover'] = 'Gjennvinn kladd'; $lang['btn_draftdel'] = 'Slett kladd'; $lang['btn_revert'] = 'Gjenopprette'; +$lang['btn_register'] = 'Registrer deg'; $lang['loggedinas'] = 'Innlogget som'; $lang['user'] = 'Brukernavn'; $lang['pass'] = 'Passord'; @@ -68,7 +69,6 @@ $lang['passchk'] = 'Bekreft passord'; $lang['remember'] = 'Husk meg'; $lang['fullname'] = 'Fullt navn'; $lang['email'] = 'E-post'; -$lang['register'] = 'Registrer deg'; $lang['profile'] = 'Brukerprofil'; $lang['badlogin'] = 'Ugyldig brukernavn og/eller passord.'; $lang['minoredit'] = 'Mindre endringer'; diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index 5a366fbb5..bc0509df3 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -51,6 +51,7 @@ $lang['btn_draft'] = 'Edytuj szkic'; $lang['btn_recover'] = 'Przywróć szkic'; $lang['btn_draftdel'] = 'Usuń szkic'; $lang['btn_revert'] = 'Przywróć'; +$lang['btn_register'] = 'Zarejestruj się!'; $lang['loggedinas'] = 'Zalogowany jako'; $lang['user'] = 'Użytkownik'; $lang['pass'] = 'Hasło'; @@ -60,7 +61,6 @@ $lang['passchk'] = 'Powtórz hasło'; $lang['remember'] = 'Zapamiętaj'; $lang['fullname'] = 'Imię i nazwisko'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Zarejestruj się!'; $lang['profile'] = 'Profil użytkownika'; $lang['badlogin'] = 'Nazwa użytkownika lub hasło są nieprawidłowe.'; $lang['minoredit'] = 'Mniejsze zmiany'; diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php index fb05361f0..b6f445012 100644 --- a/inc/lang/pt-br/lang.php +++ b/inc/lang/pt-br/lang.php @@ -58,6 +58,7 @@ $lang['btn_draft'] = 'Editar o rascunho'; $lang['btn_recover'] = 'Recuperar o rascunho'; $lang['btn_draftdel'] = 'Excluir o rascunho'; $lang['btn_revert'] = 'Restaure'; +$lang['btn_register'] = 'Registrar'; $lang['loggedinas'] = 'Autenticado(a) como'; $lang['user'] = 'Nome de usuário'; $lang['pass'] = 'Senha'; @@ -67,7 +68,6 @@ $lang['passchk'] = 'mais uma vez'; $lang['remember'] = 'Lembre-se de mim'; $lang['fullname'] = 'Nome completo'; $lang['email'] = 'E-mail'; -$lang['register'] = 'Registrar'; $lang['profile'] = 'Perfil do usuário'; $lang['badlogin'] = 'Desculpe, mas o nome de usuário ou a senha estão incorretos.'; $lang['minoredit'] = 'Alterações mínimas'; diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php index 6b68c5fef..976077d40 100644 --- a/inc/lang/pt/lang.php +++ b/inc/lang/pt/lang.php @@ -48,6 +48,7 @@ $lang['btn_draft'] = 'Editar rascunho'; $lang['btn_recover'] = 'Recuperar rascunho'; $lang['btn_draftdel'] = 'Apagar rascunho'; $lang['btn_revert'] = 'Restaurar'; +$lang['btn_register'] = 'Registar'; $lang['loggedinas'] = 'Está em sessão como'; $lang['user'] = 'Utilizador'; $lang['pass'] = 'Senha'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'Confirmar novamente'; $lang['remember'] = 'Memorizar?'; $lang['fullname'] = 'Nome completo'; $lang['email'] = 'Email'; -$lang['register'] = 'Registar'; $lang['profile'] = 'Perfil do Utilizador'; $lang['badlogin'] = 'O utilizador inválido ou senha inválida.'; $lang['minoredit'] = 'Alterações Menores'; diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index d21249d91..61e666765 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -50,6 +50,7 @@ $lang['btn_draft'] = 'Editează schiţă'; $lang['btn_recover'] = 'Recuperează schiţă'; $lang['btn_draftdel'] = 'Şterge schiţă'; $lang['btn_revert'] = 'Revenire'; +$lang['btn_register'] = 'Înregistrează'; $lang['loggedinas'] = 'Logat ca şi'; $lang['user'] = 'Utilizator'; $lang['pass'] = 'Parola'; @@ -59,7 +60,6 @@ $lang['passchk'] = 'încă o dată'; $lang['remember'] = 'Ţine-mă minte'; $lang['fullname'] = 'Nume complet'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Înregistrează'; $lang['profile'] = 'Profil Utilizator'; $lang['badlogin'] = 'Imi pare rău, utilizatorul şi/sau parola au fost greşite.'; $lang['minoredit'] = 'Modificare Minoră'; diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index 977f7fde4..1b599bc2f 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -59,6 +59,7 @@ $lang['btn_draft'] = 'Править черновик'; $lang['btn_recover'] = 'Восстановить черновик'; $lang['btn_draftdel'] = 'Удалить черновик'; $lang['btn_revert'] = 'Восстановить'; +$lang['btn_register'] = 'Зарегистрироваться'; $lang['loggedinas'] = 'Зашли как'; $lang['user'] = 'Логин'; $lang['pass'] = 'Пароль'; @@ -68,7 +69,6 @@ $lang['passchk'] = 'повторите'; $lang['remember'] = 'Запомнить меня'; $lang['fullname'] = 'Полное имя'; $lang['email'] = 'Эл. адрес'; -$lang['register'] = 'Зарегистрироваться'; $lang['profile'] = 'Профиль пользователя'; $lang['badlogin'] = 'Извините, неверное имя пользователя или пароль.'; $lang['minoredit'] = 'Небольшие изменения'; diff --git a/inc/lang/sk/lang.php b/inc/lang/sk/lang.php index dde10c543..eaef4b679 100644 --- a/inc/lang/sk/lang.php +++ b/inc/lang/sk/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'Upraviť koncept'; $lang['btn_recover'] = 'Obnoviť koncept'; $lang['btn_draftdel'] = 'Zmazať koncept'; $lang['btn_revert'] = 'Obnoviť'; +$lang['btn_register'] = 'Registrovať'; $lang['loggedinas'] = 'Prihlásený(á) ako'; $lang['user'] = 'Užívateľské meno'; $lang['pass'] = 'Heslo'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'Ešte raz znovu'; $lang['remember'] = 'Zapamätaj si ma'; $lang['fullname'] = 'Celé meno'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Registrovať'; $lang['profile'] = 'Užívateľský profil'; $lang['badlogin'] = 'Zadané užívateľské meno a heslo nie je správne.'; $lang['minoredit'] = 'Menšie zmeny'; diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php index ed6b6db81..41723f0ba 100644 --- a/inc/lang/sl/lang.php +++ b/inc/lang/sl/lang.php @@ -48,6 +48,7 @@ $lang['btn_draft'] = 'Uredi osnutek'; $lang['btn_recover'] = 'Obnovi osnutek'; $lang['btn_draftdel'] = 'Izbriši osnutek'; $lang['btn_revert'] = 'Povrni'; +$lang['btn_register'] = 'Vpis računa'; $lang['loggedinas'] = 'Prijava kot'; $lang['user'] = 'Uporabniško ime'; $lang['pass'] = 'Geslo'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'znova'; $lang['remember'] = 'Zapomni si me'; $lang['fullname'] = 'Pravo ime'; $lang['email'] = 'Elektronski naslov'; -$lang['register'] = 'Vpis računa'; $lang['profile'] = 'Uporabniški profil'; $lang['badlogin'] = 'Uporabniško ime ali geslo je napačno.'; $lang['minoredit'] = 'Manjše spremembe'; diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php index 0213ba28b..73290b687 100644 --- a/inc/lang/sq/lang.php +++ b/inc/lang/sq/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = 'Redakto skicën'; $lang['btn_recover'] = 'Rekupero skicën'; $lang['btn_draftdel'] = 'Fshi skicën'; $lang['btn_revert'] = 'Kthe si më parë'; +$lang['btn_register'] = 'Regjsitrohuni'; $lang['loggedinas'] = 'Regjistruar si '; $lang['user'] = 'Nofka e përdoruesit:'; $lang['pass'] = 'Fjalëkalimi'; @@ -58,7 +59,6 @@ $lang['passchk'] = 'Edhe një herë'; $lang['remember'] = 'Më mbaj mend'; $lang['fullname'] = 'Emri i vërtetë'; $lang['email'] = 'Adresa e email-it*'; -$lang['register'] = 'Regjsitrohuni'; $lang['profile'] = 'Profili i përdoruesit'; $lang['badlogin'] = 'Na vjen keq, emri ose fjalëkalimi është gabim.'; $lang['minoredit'] = 'Ndryshime të Vogla'; diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php index 71dde4062..77eeb325b 100644 --- a/inc/lang/sr/lang.php +++ b/inc/lang/sr/lang.php @@ -47,6 +47,7 @@ $lang['btn_draft'] = 'Измени нацрт'; $lang['btn_recover'] = 'Опорави нацрт'; $lang['btn_draftdel'] = 'Обриши нацрт'; $lang['btn_revert'] = 'Врати на пређашњу верзију'; +$lang['btn_register'] = 'Региструј се'; $lang['loggedinas'] = 'Пријављен као'; $lang['user'] = 'Корисничко име'; $lang['pass'] = 'Лозинка'; @@ -56,7 +57,6 @@ $lang['passchk'] = 'поново'; $lang['remember'] = 'Запамти ме'; $lang['fullname'] = 'Име и презиме'; $lang['email'] = 'Е-адреса'; -$lang['register'] = 'Региструј се'; $lang['profile'] = 'Кориснички профил'; $lang['badlogin'] = 'Извините, није добро корисничко име или шифра.'; $lang['minoredit'] = 'Мала измена'; diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 9308bc6c8..47b0e0b0d 100644 --- a/inc/lang/sv/lang.php +++ b/inc/lang/sv/lang.php @@ -56,6 +56,7 @@ $lang['btn_draft'] = 'Redigera utkast'; $lang['btn_recover'] = 'Återskapa utkast'; $lang['btn_draftdel'] = 'Radera utkast'; $lang['btn_revert'] = 'Återställ'; +$lang['btn_register'] = 'Registrera'; $lang['loggedinas'] = 'Inloggad som'; $lang['user'] = 'Användarnamn'; $lang['pass'] = 'Lösenord'; @@ -65,7 +66,6 @@ $lang['passchk'] = 'en gång till'; $lang['remember'] = 'Kom ihåg mig'; $lang['fullname'] = 'Namn'; $lang['email'] = 'E-post'; -$lang['register'] = 'Registrera'; $lang['profile'] = 'Användarprofil'; $lang['badlogin'] = 'Felaktigt användarnamn eller lösenord.'; $lang['minoredit'] = 'Små ändringar'; diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php index ea27793b8..a878d1eaf 100644 --- a/inc/lang/th/lang.php +++ b/inc/lang/th/lang.php @@ -56,6 +56,7 @@ $lang['btn_draft'] = 'แก้ไขเอกสารฉบับ $lang['btn_recover'] = 'กู้คืนเอกสารฉบับร่าง'; $lang['btn_draftdel'] = 'ลบเอกสารฉบับร่าง'; $lang['btn_revert'] = 'กู้คืน'; +$lang['btn_register'] = 'สร้างบัญชีผู้ใช้'; $lang['loggedinas'] = 'ลงชื่อเข้าใช้เป็น'; $lang['user'] = 'ชื่อผู้ใช้:'; $lang['pass'] = 'รหัสผ่าน'; @@ -65,7 +66,6 @@ $lang['passchk'] = 'พิมพ์รหัสผ่านอี $lang['remember'] = 'จำชื่อและรหัสผ่าน'; $lang['fullname'] = 'ชื่อจริง:'; $lang['email'] = 'อีเมล:'; -$lang['register'] = 'สร้างบัญชีผู้ใช้'; $lang['profile'] = 'ข้อมูลส่วนตัวผู้ใช้'; $lang['badlogin'] = 'ขัดข้อง:'; $lang['minoredit'] = 'เป็นการแก้ไขเล็กน้อย'; diff --git a/inc/lang/tr/lang.php b/inc/lang/tr/lang.php index 0c8c1ff3f..0509113b0 100644 --- a/inc/lang/tr/lang.php +++ b/inc/lang/tr/lang.php @@ -48,6 +48,7 @@ $lang['btn_draft'] = 'Taslağı düzenle'; $lang['btn_recover'] = 'Taslağı geri yükle'; $lang['btn_draftdel'] = 'Taslağı sil'; $lang['btn_revert'] = 'Geri Yükle'; +$lang['btn_register'] = 'Kayıt ol'; $lang['loggedinas'] = 'Giriş ismi'; $lang['user'] = 'Kullanıcı ismi'; $lang['pass'] = 'Parola'; @@ -57,7 +58,6 @@ $lang['passchk'] = 'Bir kez daha girin'; $lang['remember'] = 'Beni hatırla'; $lang['fullname'] = 'Tam isim'; $lang['email'] = 'E-posta'; -$lang['register'] = 'Kayıt ol'; $lang['profile'] = 'Kullanıcı Bilgileri'; $lang['badlogin'] = 'Üzgünüz, Kullanıcı adı veya şifre yanlış oldu.'; $lang['minoredit'] = 'Küçük Değişiklikler'; diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index d3d5d7acf..9f5834881 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -49,6 +49,7 @@ $lang['btn_draft'] = 'Редагувати чернетку'; $lang['btn_recover'] = 'Відновити чернетку'; $lang['btn_draftdel'] = 'Знищити чернетку'; $lang['btn_revert'] = 'Відновити'; +$lang['btn_register'] = 'Реєстрація'; $lang['loggedinas'] = 'Ви'; $lang['user'] = 'Користувач'; $lang['pass'] = 'Пароль'; @@ -58,7 +59,6 @@ $lang['passchk'] = 'ще раз'; $lang['remember'] = 'Запам\'ятати мене'; $lang['fullname'] = 'Повне ім\'я'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Реєстрація'; $lang['profile'] = 'Профіль користувача'; $lang['badlogin'] = 'Вибачте, невірне ім\'я чи пароль.'; $lang['minoredit'] = 'Незначні зміни'; diff --git a/inc/lang/vi/lang.php b/inc/lang/vi/lang.php index 750433910..89c9e9cfc 100644 --- a/inc/lang/vi/lang.php +++ b/inc/lang/vi/lang.php @@ -27,6 +27,7 @@ $lang['btn_logout'] = 'Thoát'; $lang['btn_admin'] = 'Quản lý'; $lang['btn_update'] = 'Cập nhật'; $lang['btn_delete'] = 'Xoá'; +$lang['btn_register'] = 'Đăng ký'; $lang['loggedinas'] = 'Username đang dùng'; $lang['user'] = 'Username'; @@ -34,7 +35,6 @@ $lang['pass'] = 'Password'; $lang['remember'] = 'Lưu username/password lại'; $lang['fullname'] = 'Họ và tên'; $lang['email'] = 'E-Mail'; -$lang['register'] = 'Đăng ký'; $lang['badlogin'] = 'Username hoặc password không đúng.'; $lang['regmissing'] = 'Bạn cần điền vào tất cả các trường'; diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 62996ea8a..90e111dde 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -50,6 +50,7 @@ $lang['btn_draft'] = '編輯草稿'; $lang['btn_recover'] = '復原草稿'; $lang['btn_draftdel'] = '捨棄草稿'; $lang['btn_revert'] = '復原'; +$lang['btn_register'] = '註冊'; $lang['loggedinas'] = '登入為'; $lang['user'] = '帳號'; $lang['pass'] = '密碼'; @@ -59,7 +60,6 @@ $lang['passchk'] = '確認密碼'; $lang['remember'] = '記住帳號密碼'; $lang['fullname'] = '真實姓名'; $lang['email'] = 'E-Mail'; -$lang['register'] = '註冊'; $lang['profile'] = '使用者個人資料'; $lang['badlogin'] = '很抱歉,您的使用者名稱或密碼可能有錯誤'; $lang['minoredit'] = '小修改'; diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index 52dda5986..d8749b5e0 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -52,6 +52,7 @@ $lang['btn_draft'] = '编辑草稿'; $lang['btn_recover'] = '恢复草稿'; $lang['btn_draftdel'] = '删除草稿'; $lang['btn_revert'] = '恢复'; +$lang['btn_register'] = '注册'; $lang['loggedinas'] = '登录为'; $lang['user'] = '用户名'; $lang['pass'] = '密码'; @@ -61,7 +62,6 @@ $lang['passchk'] = '请再输一次'; $lang['remember'] = '记住我'; $lang['fullname'] = '全名'; $lang['email'] = 'E-Mail'; -$lang['register'] = '注册'; $lang['profile'] = '用户信息'; $lang['badlogin'] = '对不起,用户名或密码错误。'; $lang['minoredit'] = '细微修改'; diff --git a/inc/template.php b/inc/template.php index 7ac3437fb..b873d818f 100644 --- a/inc/template.php +++ b/inc/template.php @@ -93,7 +93,7 @@ function tpl_content_core(){ break; case 'index': html_index($IDX); #FIXME can this be pulled from globals? is it sanitized correctly? - break; + break; case 'backlink': html_backlinks(); break; @@ -593,6 +593,16 @@ function tpl_get_action($type) { $type = 'logout'; } break; + case 'register': + if($_SERVER['REMOTE_USER']){ + return false; + } + break; + case 'resendpwd': + if($_SERVER['REMOTE_USER']){ + return false; + } + break; case 'admin': if(!$INFO['ismanager']){ return false; diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index f6b69ead1..b4e35b1cc 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -90,7 +90,6 @@ if (!class_exists('setting_disableactions')) { // transfer some DokuWiki language strings to the plugin if (!$plugin->localised) $this->setupLocale(); $plugin->lang[$this->_key.'_revisions'] = $lang['btn_revs']; - $plugin->lang[$this->_key.'_register'] = $lang['register']; foreach ($this->_choices as $choice) if (isset($lang['btn_'.$choice])) $plugin->lang[$this->_key.'_'.$choice] = $lang['btn_'.$choice]; -- cgit v1.2.3 From 3240c7a0b3414f926ee76b2c4fff0a95ab33e916 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 20 Feb 2011 19:14:03 +0000 Subject: removed duplicate authors from language files --- inc/lang/bg/lang.php | 2 +- inc/lang/ca-valencia/lang.php | 1 - inc/lang/ca/lang.php | 2 -- inc/lang/cs/lang.php | 2 +- inc/lang/de/lang.php | 1 - inc/lang/eo/lang.php | 7 +------ inc/lang/es/lang.php | 3 +-- inc/lang/fa/lang.php | 1 - inc/lang/fi/lang.php | 1 - inc/lang/fo/lang.php | 2 +- inc/lang/fr/lang.php | 3 +-- inc/lang/he/lang.php | 1 - inc/lang/hu/lang.php | 2 -- inc/lang/it/lang.php | 8 +++----- inc/lang/km/lang.php | 3 --- inc/lang/ko/lang.php | 1 - inc/lang/lt/lang.php | 1 - inc/lang/mr/lang.php | 1 - inc/lang/ne/lang.php | 3 +-- inc/lang/nl/lang.php | 3 +-- inc/lang/no/lang.php | 5 ++--- inc/lang/pt-br/lang.php | 5 ++--- inc/lang/ro/lang.php | 3 --- inc/lang/ru/lang.php | 4 ++-- inc/lang/sq/lang.php | 2 +- inc/lang/sr/lang.php | 3 +-- inc/lang/sv/lang.php | 4 ++-- inc/lang/th/lang.php | 1 - inc/lang/uk/lang.php | 5 ++--- inc/lang/zh-tw/lang.php | 1 - inc/lang/zh/lang.php | 2 +- 31 files changed, 24 insertions(+), 59 deletions(-) diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index a45615ed8..7bd93a4cc 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -5,7 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov - * @author Kiril neohidra@gmail.com + * @author Kiril */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/ca-valencia/lang.php b/inc/lang/ca-valencia/lang.php index 04f7c32bf..c6a7dc27e 100644 --- a/inc/lang/ca-valencia/lang.php +++ b/inc/lang/ca-valencia/lang.php @@ -4,7 +4,6 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Bernat Arlandis i Mañó - * @author Bernat Arlandis * @author Bernat Arlandis */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/ca/lang.php b/inc/lang/ca/lang.php index 8e627fc69..342257d11 100644 --- a/inc/lang/ca/lang.php +++ b/inc/lang/ca/lang.php @@ -5,8 +5,6 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Carles Bellver * @author Carles Bellver - * @author carles.bellver@gmail.com - * @author carles.bellver@cent.uji.es */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/cs/lang.php b/inc/lang/cs/lang.php index 32d4692be..22aa00d7d 100644 --- a/inc/lang/cs/lang.php +++ b/inc/lang/cs/lang.php @@ -5,8 +5,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Bohumir Zamecnik * @author Tomas Valenta + * @author Tomas Valenta * @author Zbynek Krivka - * @author tomas@valenta.cz * @author Marek Sacha * @author Lefty */ diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 4c5f642bb..3a3afdc16 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -15,7 +15,6 @@ * @author Arne Pelka * @author Dirk Einecke * @author Blitzi94@gmx.de - * @author Robert Bogenschneider * @author Robert Bogenschneider * @author Niels Lange * @author Christian Wichmann diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index dee12a670..305c080f1 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -4,16 +4,11 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Antono Vasiljev - * @author Felipe Castro + * @author Felipe Castro * @author Felipe Castro * @author Felipe Castro - * @author Felipe Castro - * @author Felipo Kastro * @author Robert Bogenschneider - * @author Erik Pedersen * @author Erik Pedersen - * @author Robert Bogenschneider - * @author Robert BOGENSCHNEIDER */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/es/lang.php b/inc/lang/es/lang.php index b329ffff4..427f7e0a2 100644 --- a/inc/lang/es/lang.php +++ b/inc/lang/es/lang.php @@ -14,8 +14,7 @@ * @author oliver@samera.com.py * @author Enrico Nicoletto * @author Manuel Meco - * @author VictorCastelan - * @author Jordan Mero hack.jord@gmail.com + * @author Jordan Mero * @author Felipe Martinez * @author Javier Aranda * @author Zerial diff --git a/inc/lang/fa/lang.php b/inc/lang/fa/lang.php index cc79393bd..ceea28f8e 100644 --- a/inc/lang/fa/lang.php +++ b/inc/lang/fa/lang.php @@ -10,7 +10,6 @@ * @url http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesFa.php?view=co * @author behrad eslamifar - * @author omidmr@gmail.com * @author Omid Mottaghi * @author Mohammad Reza Shoaei */ diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index 36bb1e911..bc52625e0 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -5,7 +5,6 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Petteri * @author Matti Pöllä - * @author otto@valjakko.net * @author Otto Vainio * @author Teemu Mattila */ diff --git a/inc/lang/fo/lang.php b/inc/lang/fo/lang.php index 8b1cd41e5..3d4d0455b 100644 --- a/inc/lang/fo/lang.php +++ b/inc/lang/fo/lang.php @@ -4,7 +4,7 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Poul J. Clementsen - * @author Einar Petersen einar.petersen@gmail.com + * @author Einar Petersen */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index da0ffdea0..40384fecb 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -12,7 +12,6 @@ * @author Stéphane Chamberland * @author Delassaux Julien * @author Maurice A. LeBlanc - * @author gb@isis.u-strasbg.fr * @author stephane.gully@gmail.com * @author Guillaume Turri * @author Erik Pedersen @@ -20,7 +19,7 @@ * @author Vincent Feltz * @author Philippe Bajoit * @author Florian Gaub - * @author Samuel Dorsaz samuel.dorsaz@novelion.net + * @author Samuel Dorsaz * @author Johan Guilbaud */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/he/lang.php b/inc/lang/he/lang.php index 47940ef53..1a47ebcb8 100644 --- a/inc/lang/he/lang.php +++ b/inc/lang/he/lang.php @@ -6,7 +6,6 @@ * @link http://sourceforge.net/projects/hebdokuwiki/ * @author גיא שפר * @author Denis Simakov - * @author DoK * @author Dotan Kamber * @author Moshe Kaplan * @author Yaron Yogev diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php index 9f318ffec..fc21d1c8b 100644 --- a/inc/lang/hu/lang.php +++ b/inc/lang/hu/lang.php @@ -5,10 +5,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Ziegler Gábor * @author Sandor TIHANYI - * @author Siaynoq Siaynoq * @author Siaynoq Mage * @author schilling.janos@gmail.com - * @author Szabó Dávid (szabo.david@gyumolcstarhely.hu) * @author Szabó Dávid */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/it/lang.php b/inc/lang/it/lang.php index 99c09c710..682f5b8c2 100644 --- a/inc/lang/it/lang.php +++ b/inc/lang/it/lang.php @@ -4,16 +4,14 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Giorgio Vecchiocattivi - * @author Roberto Bolli + * @author Roberto Bolli [http://www.rbnet.it/] * @author Silvia Sargentoni * @author Diego Pierotto - * @author Diego Pierotto ita.translations@tiscali.it - * @author ita.translations@tiscali.it * @author Lorenzo Breda * @author snarchio@alice.it * @author robocap * @author Matteo Carnevali - * @author Osman Tekin osman.tekin93@hotmail.it + * @author Osman Tekin * @author Jacopo Corbetta */ $lang['encoding'] = 'utf-8'; @@ -248,7 +246,7 @@ $lang['i_enableacl'] = 'Abilita ACL (consigliato)'; $lang['i_superuser'] = 'Amministratore'; $lang['i_problems'] = 'Si sono verificati problemi durante l\'installazione, indicati di seguito. Non è possibile continuare finché non saranno risolti.'; $lang['i_modified'] = 'Per motivi di sicurezza questa procedura funziona solamente con un\'installazione Dokuwiki nuova e non modificata. -Prova a estrarre di nuovo i file dal pacchetto scaricato oppure consulta le +Prova a estrarre di nuovo i file dal pacchetto scaricato oppure consulta le istruzioni per l\'installazione di Dokuwiki'; $lang['i_funcna'] = 'La funzione PHP %s non è disponibile. Forse è stata disabilitata dal tuo provider per qualche motivo?'; $lang['i_phpver'] = 'La versione di PHP %s è inferiore a quella richiesta %s. Devi aggiornare l\'installazione di PHP.'; diff --git a/inc/lang/km/lang.php b/inc/lang/km/lang.php index 24dd67045..90cad3133 100644 --- a/inc/lang/km/lang.php +++ b/inc/lang/km/lang.php @@ -1,9 +1,6 @@ - * @author Anika Henke - * @author Matthias Grimm * @author Ratana Lim */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/ko/lang.php b/inc/lang/ko/lang.php index 482d233bd..0b45c6ce0 100644 --- a/inc/lang/ko/lang.php +++ b/inc/lang/ko/lang.php @@ -7,7 +7,6 @@ * @author jk Lee * @author dongnak@gmail.com * @author Song Younghwan - * @author SONG Younghwan * @author Seung-Chul Yoo */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/lt/lang.php b/inc/lang/lt/lang.php index ca2f2da6c..6ae5f6c73 100644 --- a/inc/lang/lt/lang.php +++ b/inc/lang/lt/lang.php @@ -7,7 +7,6 @@ * @author Edmondas Girkantas * @author Arūnas Vaitekūnas * @author audrius.klevas@gmail.com - * @author Arunas Vaitekunas */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/mr/lang.php b/inc/lang/mr/lang.php index d00d6d841..d991d46cf 100644 --- a/inc/lang/mr/lang.php +++ b/inc/lang/mr/lang.php @@ -10,7 +10,6 @@ * @url http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesMr.php?view=co * @author ghatothkach@hotmail.com * @author Padmanabh Kulkarni - * @author Padmanabh Kulkarni * @author shantanoo@gmail.com */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/ne/lang.php b/inc/lang/ne/lang.php index 11d9c01bd..e5b30ceaf 100644 --- a/inc/lang/ne/lang.php +++ b/inc/lang/ne/lang.php @@ -3,8 +3,7 @@ * Nepali language file * * @author Saroj Kumar Dhakal - * @author SarojKumar Dhakal - * @author Saroj Dhakal + * @author Saroj Kumar Dhakal */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 1ad653e78..95368223b 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -11,8 +11,7 @@ * @author John de Graaff * @author Dion Nicolaas * @author Danny Rotsaert - * @author Marijn Hofstra hofstra.m@gmail.com - * @author Matthias Carchon webmaster@c-mattic.be + * @author Matthias Carchon * @author Marijn Hofstra * @author Timon Van Overveldt */ diff --git a/inc/lang/no/lang.php b/inc/lang/no/lang.php index a41cad51b..d2be945e6 100644 --- a/inc/lang/no/lang.php +++ b/inc/lang/no/lang.php @@ -5,17 +5,16 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Reidar Mosvold * @author Jorge Barrera Grandon - * @author Rune Rasmussen http://www.syntaxerror.no/ + * @author Rune Rasmussen [http://www.syntaxerror.no/] * @author Thomas Nygreen * @author Arild Burud * @author Torkill Bruland * @author Rune M. Andersen - * @author Jakob Vad Nielsen (me@jakobnielsen.net) + * @author Jakob Vad Nielsen * @author Kjell Tore Næsgaard * @author Knut Staring * @author Lisa Ditlefsen * @author Erik Pedersen - * @author Erik Bjørn Pedersen */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/pt-br/lang.php b/inc/lang/pt-br/lang.php index b6f445012..e3568b56b 100644 --- a/inc/lang/pt-br/lang.php +++ b/inc/lang/pt-br/lang.php @@ -13,10 +13,9 @@ * @author Jeferson Propheta * @author jair.henrique@gmail.com * @author Luis Dantas - * @author Frederico Guimarães - * @author Jair Henrique * @author Luis Dantas - * @author Sergio Motta sergio@cisne.com.br + * @author Jair Henrique + * @author Sergio Motta * @author Isaias Masiero Filho */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index 61e666765..f4a2210f0 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -5,11 +5,8 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Tiberiu Micu * @author Sergiu Baltariu - * @author s_baltariu@yahoo.com - * @author Emanuel-Emeric Andrasi * @author Emanuel-Emeric Andrași * @author Emanuel-Emeric Andraşi - * @author Emanuel-Emeric Andrasi */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/ru/lang.php b/inc/lang/ru/lang.php index 1b599bc2f..1eaa488ec 100644 --- a/inc/lang/ru/lang.php +++ b/inc/lang/ru/lang.php @@ -8,10 +8,10 @@ * @author Denis Simakov * @author Kaens Bard * @author Andrew Pleshakov - * @author Змей Этерийский evil_snake@eternion.ru + * @author Змей Этерийский * @author Hikaru Nakajima * @author Alexei Tereschenko - * @author Irina Ponomareva irinaponomareva@webperfectionist.com + * @author Irina Ponomareva * @author Alexander Sorkin * @author Kirill Krasnov * @author Vlad Tsybenko diff --git a/inc/lang/sq/lang.php b/inc/lang/sq/lang.php index 73290b687..47a54d2ea 100644 --- a/inc/lang/sq/lang.php +++ b/inc/lang/sq/lang.php @@ -8,7 +8,7 @@ * lines starting with @author * * @url http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesSq.php?view=co - * @author Leonard Elezi leonard.elezi@depinfo.info + * @author Leonard Elezi */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/sr/lang.php b/inc/lang/sr/lang.php index 77eeb325b..b35956f03 100644 --- a/inc/lang/sr/lang.php +++ b/inc/lang/sr/lang.php @@ -4,8 +4,7 @@ * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Filip Brcic - * @author Иван Петровић petrovicivan@ubuntusrbija.org - * @author Ivan Petrovic + * @author Иван Петровић (Ivan Petrovic) * @author Miroslav Šolti */ $lang['encoding'] = 'utf-8'; diff --git a/inc/lang/sv/lang.php b/inc/lang/sv/lang.php index 47b0e0b0d..801e2d879 100644 --- a/inc/lang/sv/lang.php +++ b/inc/lang/sv/lang.php @@ -7,15 +7,15 @@ * @author Per Foreby * @author Nicklas Henriksson * @author Håkan Sandell + * @author Håkan Sandell * @author Dennis Karlsson * @author Tormod Otter Johansson + * @author Tormod Johansson * @author emil@sys.nu * @author Pontus Bergendahl - * @author Tormod Johansson tormod.otter.johansson@gmail.com * @author Emil Lind * @author Bogge Bogge * @author Peter Åström - * @author Håkan Sandell */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/th/lang.php b/inc/lang/th/lang.php index a878d1eaf..d40f30f4a 100644 --- a/inc/lang/th/lang.php +++ b/inc/lang/th/lang.php @@ -9,7 +9,6 @@ * * @url http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesTh.php?view=co * @author Komgrit Niyomrath - * @author Kittithat Arnontavilas mrtomyum@gmail.com * @author Arthit Suriyawongkul * @author Kittithat Arnontavilas * @author Thanasak Sompaisansin diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index 9f5834881..e5f14879f 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -5,10 +5,9 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Oleksiy Voronin * @author serg_stetsuk@ukr.net - * @author okunia@gmail.com * @author Oleksandr Kunytsia - * @author Uko uko@uar.net - * @author Ulrikhe Lukoie .com + * @author Uko + * @author Ulrikhe Lukoie */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 90e111dde..5bf790a00 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -7,7 +7,6 @@ * @author Li-Jiun Huang * @author http://www.chinese-tools.com/tools/converter-simptrad.html * @author Wayne San - * @author Li-Jiun Huang * @author Cheng-Wei Chien * @author Danny Lin */ diff --git a/inc/lang/zh/lang.php b/inc/lang/zh/lang.php index d8749b5e0..ea677ac2e 100644 --- a/inc/lang/zh/lang.php +++ b/inc/lang/zh/lang.php @@ -5,7 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author ZDYX * @author http://www.chinese-tools.com/tools/converter-tradsimp.html - * @author George Sheraton guxd@163.com + * @author George Sheraton * @author Simon zhan * @author mr.jinyi@gmail.com * @author ben -- cgit v1.2.3 From d2437563b7573fdac463306c9e25cc24b3d80e0e Mon Sep 17 00:00:00 2001 From: Marijn Hofstra Date: Mon, 21 Feb 2011 18:50:35 +0100 Subject: Dutch language update --- inc/lang/nl/lang.php | 3 +++ lib/plugins/config/lang/nl/lang.php | 1 + lib/plugins/popularity/lang/nl/intro.txt | 6 +++--- lib/plugins/popularity/lang/nl/lang.php | 5 +++++ lib/plugins/popularity/lang/nl/submitted.txt | 3 +++ 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 lib/plugins/popularity/lang/nl/submitted.txt diff --git a/inc/lang/nl/lang.php b/inc/lang/nl/lang.php index 9d81d0ff4..411fdc844 100644 --- a/inc/lang/nl/lang.php +++ b/inc/lang/nl/lang.php @@ -167,6 +167,9 @@ $lang['yours'] = 'Jouw versie'; $lang['diff'] = 'Toon verschillen met huidige revisie'; $lang['diff2'] = 'Toon verschillen tussen geselecteerde revisies'; $lang['difflink'] = 'Link naar deze vergelijking'; +$lang['diff_type'] = 'Bekijk verschillen:'; +$lang['diff_inline'] = 'Inline'; +$lang['diff_side'] = 'Zij aan zij'; $lang['line'] = 'Regel'; $lang['breadcrumb'] = 'Spoor'; $lang['youarehere'] = 'Je bent hier'; diff --git a/lib/plugins/config/lang/nl/lang.php b/lib/plugins/config/lang/nl/lang.php index a9e0d935f..1b630b12e 100644 --- a/lib/plugins/config/lang/nl/lang.php +++ b/lib/plugins/config/lang/nl/lang.php @@ -109,6 +109,7 @@ $lang['fetchsize'] = 'Maximum grootte (bytes) die fetch.php mag down $lang['notify'] = 'Stuur e-mailnotificaties naar dit adres'; $lang['registernotify'] = 'Stuur informatie over nieuw aangemelde gebruikers naar dit e-mailadres'; $lang['mailfrom'] = 'E-mailadres voor automatische e-mail'; +$lang['mailprefix'] = 'Te gebruiken voorvoegsel voor onderwerp automatische email'; $lang['gzip_output'] = 'Gebruik gzip Content-Encoding voor xhtml'; $lang['gdlib'] = 'Versie GD Lib '; $lang['im_convert'] = 'Path naar ImageMagick\'s convert tool'; diff --git a/lib/plugins/popularity/lang/nl/intro.txt b/lib/plugins/popularity/lang/nl/intro.txt index 92962944b..3c045c427 100644 --- a/lib/plugins/popularity/lang/nl/intro.txt +++ b/lib/plugins/popularity/lang/nl/intro.txt @@ -1,9 +1,9 @@ ====== Populariteitsfeedback ====== -Dit onderdeel verzamelt anonieme gegevens over je wiki en stelt je in staat deze te versturen naar de ontwikkelaars van DokuWiki. Dit helpt hen te begrijpen hoe DokuWiki wordt gebruikt door de gebruikers en zorgt er ook voor dat toekomstige ontwikkelkeuzes kunnen worden gestaafd door echte gebruikersstatistieken. +Dit onderdeel verzamelt anonieme gegevens over uw wiki en stelt u in staat deze te versturen naar de ontwikkelaars van DokuWiki. Dit helpt hen te begrijpen hoe DokuWiki wordt gebruikt door de gebruikers en zorgt er ook voor dat toekomstige ontwikkelkeuzes kunnen worden gestaafd door echte gebruikersstatistieken. -U wordt verzocht deze stap van tijd tot tijd te herhalen om ontwikkelaars op de hoogte te houden terwijl je wiki groeit. De herhaalde data zal worden geïdentificeerd door een uniek, anoniem ID. +U wordt verzocht deze stap van tijd tot tijd te herhalen om ontwikkelaars op de hoogte te houden terwijl uw wiki groeit. De herhaalde data zal worden geïdentificeerd door een uniek, anoniem ID. -De verzamelde gegevens bevat onder andere gegevens over je versie van DokuWiki, het aantal- en de grootte van de pagina's en bestanden, geïnstalleerde plugins en informatie over PHP. +De verzamelde gegevens bevat onder andere gegevens over uw versie van DokuWiki, het aantal- en de grootte van de pagina's en bestanden, geïnstalleerde plugins en informatie over PHP. De ruwe data die verzonden worden staan hieronder. Gebruik de knop "Verstuur" om de informatie te verzenden. diff --git a/lib/plugins/popularity/lang/nl/lang.php b/lib/plugins/popularity/lang/nl/lang.php index 54e12ae91..0a8386f42 100644 --- a/lib/plugins/popularity/lang/nl/lang.php +++ b/lib/plugins/popularity/lang/nl/lang.php @@ -13,3 +13,8 @@ */ $lang['name'] = 'Populariteitsfeedback (kan even duren om in te laden)'; $lang['submit'] = 'Verstuur'; +$lang['autosubmit'] = 'Gegevens automatisch maandelijks verzenden'; +$lang['submissionFailed'] = 'De gegevens konden niet verstuurd worden vanwege de volgende fouten:'; +$lang['submitDirectly'] = 'Je kan de gegevens handmatig sturen door het onderstaande formulier te verzenden.'; +$lang['autosubmitError'] = 'De laatste automatische verzending is mislukt vanwege de volgende fout:'; +$lang['lastSent'] = 'De gegevens zijn verstuurd.'; diff --git a/lib/plugins/popularity/lang/nl/submitted.txt b/lib/plugins/popularity/lang/nl/submitted.txt new file mode 100644 index 000000000..219d80fb6 --- /dev/null +++ b/lib/plugins/popularity/lang/nl/submitted.txt @@ -0,0 +1,3 @@ +===== Populariteitsfeedback ===== + +Het versturen van de gegevens is gelukt. \ No newline at end of file -- cgit v1.2.3 From 84a355b61e53b5d8969c030679612a7b456777e9 Mon Sep 17 00:00:00 2001 From: Kiril Velikov Date: Mon, 21 Feb 2011 18:51:36 +0100 Subject: Bulgarian language update --- inc/lang/bg/admin.txt | 2 +- inc/lang/bg/backlinks.txt | 2 +- inc/lang/bg/denied.txt | 2 +- inc/lang/bg/draft.txt | 2 +- inc/lang/bg/install.html | 13 ++- inc/lang/bg/lang.php | 127 ++++++++++++++--------- inc/lang/bg/login.txt | 2 +- inc/lang/bg/mailtext.txt | 18 ++-- inc/lang/bg/newpage.txt | 2 +- inc/lang/bg/password.txt | 6 +- inc/lang/bg/pwconfirm.txt | 2 +- inc/lang/bg/read.txt | 2 +- inc/lang/bg/recent.txt | 2 +- inc/lang/bg/register.txt | 4 +- inc/lang/bg/registermail.txt | 16 +-- inc/lang/bg/resendpwd.txt | 2 +- inc/lang/bg/stopwords.txt | 4 +- inc/lang/bg/subscr_digest.txt | 18 ++++ inc/lang/bg/subscr_form.txt | 3 + inc/lang/bg/subscr_list.txt | 15 +++ inc/lang/bg/subscr_single.txt | 22 ++++ inc/lang/bg/uploadmail.txt | 18 ++-- lib/plugins/acl/lang/bg/help.txt | 10 +- lib/plugins/acl/lang/bg/lang.php | 24 ++--- lib/plugins/config/lang/bg/intro.txt | 6 +- lib/plugins/config/lang/bg/lang.php | 148 ++++++++++++++------------- lib/plugins/plugin/lang/bg/admin_plugin.txt | 2 +- lib/plugins/plugin/lang/bg/lang.php | 50 ++++----- lib/plugins/popularity/lang/bg/intro.txt | 8 +- lib/plugins/popularity/lang/bg/lang.php | 12 +-- lib/plugins/popularity/lang/bg/submitted.txt | 2 +- lib/plugins/revert/lang/bg/intro.txt | 2 +- lib/plugins/revert/lang/bg/lang.php | 14 +-- lib/plugins/usermanager/lang/bg/lang.php | 46 ++++----- 34 files changed, 351 insertions(+), 257 deletions(-) create mode 100644 inc/lang/bg/subscr_digest.txt create mode 100644 inc/lang/bg/subscr_form.txt create mode 100644 inc/lang/bg/subscr_list.txt create mode 100644 inc/lang/bg/subscr_single.txt diff --git a/inc/lang/bg/admin.txt b/inc/lang/bg/admin.txt index 8958997ae..d3c14a0da 100644 --- a/inc/lang/bg/admin.txt +++ b/inc/lang/bg/admin.txt @@ -1,3 +1,3 @@ ====== Администриране ====== -Долу ще намерите списъка с администраторски задачи в DokuWiki. \ No newline at end of file +Отдолу ще намерите списъка с администраторските задачи в DokuWiki. \ No newline at end of file diff --git a/inc/lang/bg/backlinks.txt b/inc/lang/bg/backlinks.txt index 70cb81dc3..dd633d94d 100644 --- a/inc/lang/bg/backlinks.txt +++ b/inc/lang/bg/backlinks.txt @@ -1,3 +1,3 @@ ====== Обратни препратки ====== -Това е списък на страници, които препращат обратно към текущата страница. +Това е списък на страниците, които препращат обратно към текущата страница. diff --git a/inc/lang/bg/denied.txt b/inc/lang/bg/denied.txt index 91a576077..45ce63769 100644 --- a/inc/lang/bg/denied.txt +++ b/inc/lang/bg/denied.txt @@ -1,4 +1,4 @@ ====== Отказан достъп ====== -Нямате достатъчно права да продължите. Може би сте забравили да се впишете? +Нямате достатъчно права, за да продължите. Може би сте забравили да се впишете? diff --git a/inc/lang/bg/draft.txt b/inc/lang/bg/draft.txt index 6d269a72f..a59201130 100644 --- a/inc/lang/bg/draft.txt +++ b/inc/lang/bg/draft.txt @@ -1,6 +1,6 @@ ====== Намерена чернова ====== -Последната редакционна сесия на страницата не е завършена правилно. Dokuwiki автоматично запазва чернова по време на редактирането, която може сега да ползвате, за да продължите работата си. Долу може да видите данните, които бяха запазени от последната сесия. +Последната редакционна сесия на страницата не е завършена правилно. Dokuwiki автоматично запазва чернова по време на редактирането, която можете да ползвате сега, за да продължите работата си. Отдолу може да видите данните, които бяха запазени от последната сесия. Моля решете, дали искате да //възстановите// последната си редакционна сесия, //изтриете// автоматично запазената чернова или //откажете// редакцията. diff --git a/inc/lang/bg/install.html b/inc/lang/bg/install.html index 392235ecd..6dde7e4ce 100644 --- a/inc/lang/bg/install.html +++ b/inc/lang/bg/install.html @@ -1,19 +1,18 @@

Страницата помага при първа инсталация и настройване на Dokuwiki. Повече информация -за инсталатора е достъпна в неговата собствена -документация.

+за инсталатора ще намерите в документацията му.

Dokuwiki ползва обикновени файлове за хранилище на страниците и друга информация свързана с тях (примерно картинки, търсене, стари версии, и др.). -За да използвате успешно DokuWiki -трябва да имате право за писане в директориите, които съдържат тези +За да функционира нормално DokuWiki +трябва да има право за писане в директориите, които съдържат тези файлове. Инсталаторът не може да настройва правата на директориите. Обикновено трябва да направите това директно от командният ред или ако ползвате хостинг - през FTP или контролния панела на хоста (примерно cPanel).

Инсталаторът ще настрои вашата DokuWiki конфигурация на -ACL, което ще позволи на администратора да се впише и ползва администраторското меню в DokuWiki за инсталиране на приставки, контролира -на потребители, управлява достъпа до страниците и променя останалите настройки. Това не е необходимо за функционирането на DokuWiki, но направи администрирането на DokuWiki по-лесно.

+ACL, което ще позволи на администратора да се впише и ползва администраторското меню в DokuWiki за инсталиране на приставки, контрол +на потребители, управление на достъпа до страниците и промяна на останалите настройки. Това не е необходимо за функционирането на DokuWiki, но направи администрирането на DokuWiki по-лесно.

-

Опитните потребители или потребителите със специални изисквания към настройките могат да ползват тези връзки за информация относно инсталацията +

Опитните потребители или потребителите със специални изисквания към настройките имат на разположение информация относно инсталацията и настройките.

diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index d3e86c41d..b95b0b72c 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -5,7 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov - * @author Kiril neohidra@gmail.com + * @author Kiril */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -25,7 +25,7 @@ $lang['btn_top'] = 'Към началото'; $lang['btn_newer'] = '<< по-нови'; $lang['btn_older'] = 'по-стари >>'; $lang['btn_revs'] = 'История'; -$lang['btn_recent'] = 'Последни промени'; +$lang['btn_recent'] = 'Скорошни промени'; $lang['btn_upload'] = 'Качване'; $lang['btn_cancel'] = 'Отказ'; $lang['btn_index'] = 'Индекс'; @@ -33,12 +33,12 @@ $lang['btn_secedit'] = 'Редактиране'; $lang['btn_login'] = 'Вписване'; $lang['btn_logout'] = 'Отписване'; $lang['btn_admin'] = 'Настройки'; -$lang['btn_update'] = 'Обновяване'; +$lang['btn_update'] = 'Актуализиране'; $lang['btn_delete'] = 'Изтриване'; $lang['btn_back'] = 'Назад'; $lang['btn_backlink'] = 'Обратни препратки'; -$lang['btn_backtomedia'] = 'Назад към избор на медиен файл'; -$lang['btn_subscribe'] = 'Абониране за Промени'; +$lang['btn_backtomedia'] = 'Назад към избора на медиен файл'; +$lang['btn_subscribe'] = 'Абонаменти'; $lang['btn_profile'] = 'Профил'; $lang['btn_reset'] = 'Изчистване'; $lang['btn_resendpwd'] = 'Пращане на нова парола'; @@ -46,6 +46,7 @@ $lang['btn_draft'] = 'Редактиране на чернова'; $lang['btn_recover'] = 'Възстановяване на чернова'; $lang['btn_draftdel'] = 'Изтриване на чернова'; $lang['btn_revert'] = 'Възстановяване'; +$lang['register'] = 'Регистриране'; $lang['loggedinas'] = 'Вписани сте като'; $lang['user'] = 'Потребител'; $lang['pass'] = 'Парола'; @@ -53,74 +54,87 @@ $lang['newpass'] = 'Нова парола'; $lang['oldpass'] = 'Потвърждение на текуща парола'; $lang['passchk'] = 'още веднъж'; $lang['remember'] = 'Запомни ме'; -$lang['fullname'] = 'Пълно име'; +$lang['fullname'] = 'Истинско име'; $lang['email'] = 'Електронна поща'; -$lang['register'] = 'Регистриране'; $lang['profile'] = 'Потребителски профил'; -$lang['badlogin'] = 'Грешно потребителско име или парола'; +$lang['badlogin'] = 'Грешно потребителско име или парола.'; $lang['minoredit'] = 'Незначителни промени'; -$lang['draftdate'] = 'Черновата бе автоматично записана на'; +$lang['draftdate'] = 'Черновата е автоматично записана на'; $lang['nosecedit'] = 'Страницата бе междувременно променена, презареждане на страницата поради неактуална информация.'; $lang['regmissing'] = 'Моля, попълнете всички полета.'; $lang['reguexists'] = 'Вече съществува потребител с избраното име.'; -$lang['regsuccess'] = 'Потребителят бе създаден и паролата бе пратена по електронната поща.'; -$lang['regsuccess2'] = 'Потребителят бе създаден.'; +$lang['regsuccess'] = 'Потребителят е създаден, а паролата е пратена по електронната поща.'; +$lang['regsuccess2'] = 'Потребителят е създаден.'; $lang['regmailfail'] = 'Изглежда, че има проблем с пращането на писмото с паролата. Моля, свържете се с администратора!'; $lang['regbadmail'] = 'Въведеният адрес изглежда невалиден - ако мислите, че това е грешка, свържете се с администратора.'; $lang['regbadpass'] = 'Двете въведени пароли не съвпадат, моля опитайте отново.'; -$lang['regpwmail'] = 'Парола за DokuWiki'; +$lang['regpwmail'] = 'Паролата ви за DokuWiki'; $lang['reghere'] = 'Все още нямате профил? Направете си'; -$lang['profna'] = 'Това Wiki не поддържа промяна на профила'; +$lang['profna'] = 'Wiki-то не поддържа промяна на профила'; $lang['profnochange'] = 'Няма промени.'; -$lang['profnoempty'] = 'Въвеждането на име и ел. поща. е задължително'; -$lang['profchanged'] = 'Потребителският профил бе успешно обновен.'; +$lang['profnoempty'] = 'Въвеждането на име и ел. поща е задължително'; +$lang['profchanged'] = 'Потребителският профил е обновен успешно.'; $lang['pwdforget'] = 'Забравили сте паролата си? Получете нова'; -$lang['resendna'] = 'Това Wiki не поддържа повторно пращане на паролата.'; +$lang['resendna'] = 'Wiki-то не поддържа повторно пращане на паролата.'; $lang['resendpwd'] = 'Изпращане на нова парола за'; $lang['resendpwdmissing'] = 'Моля, попълнете всички полета.'; -$lang['resendpwdnouser'] = 'Потребителят не бе намерен в базата от данни.'; -$lang['resendpwdbadauth'] = 'Кодът за потвърждение е невалиден. Проверете дали сте използвали целият линк за потвърждение.'; -$lang['resendpwdconfirm'] = 'Линк за потвърждение бе пратен по електронната поща.'; -$lang['resendpwdsuccess'] = 'Паролата ви бе изпратена по електронната поща.'; -$lang['license'] = 'Освен ако не е посочено друго, съдържанието на това Wiki е лицензирано под следния лиценз:'; -$lang['licenseok'] = 'Имайте предвид, че при редактиране на страницата, Вие се съгласявате да лицензирате промените (които сте направили) под следния лиценз:'; +$lang['resendpwdnouser'] = 'Потребителят не е намерен в базата от данни.'; +$lang['resendpwdbadauth'] = 'Кодът за потвърждение е невалиден. Проверете дали сте използвали целия линк за потвърждение.'; +$lang['resendpwdconfirm'] = 'Линк за потвърждение е пратен по електронната поща.'; +$lang['resendpwdsuccess'] = 'Новата ви паролата е пратена по електронната поща.'; +$lang['license'] = 'Ако не е посочено друго, съдържанието на Wiki-то е лицензирано под следния лиценз:'; +$lang['licenseok'] = 'Бележка: Редактирайки страницата, вие се съгласявате да лицензирате промените (които сте направили) под следния лиценз:'; $lang['searchmedia'] = 'Търсене на файл: '; $lang['searchmedia_in'] = 'Търсене в %s'; $lang['txt_upload'] = 'Изберете файл за качване'; -$lang['txt_filename'] = 'Качване като (незадължително)'; +$lang['txt_filename'] = 'Качи като (незадължително)'; $lang['txt_overwrt'] = 'Презапиши съществуващите файлове'; $lang['lockedby'] = 'В момента е заключена от'; $lang['lockexpire'] = 'Ще бъде отключена на'; -$lang['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа да избегнете конфликт, ползвайте бутон "Преглед", за рестартиране на брояча за заключване.'; +$lang['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\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']['mediadisplaylnk'] = 'Показвай само препратката.'; $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'] = 'Връзките към Windows shares работят само под Internet Explorer. Можете да копирате и поставите връзката.'; -$lang['js']['linkwiz'] = 'Съветник за препратки'; +$lang['js']['linkwiz'] = 'Помощник за препратки'; $lang['js']['linkto'] = 'Препратка към: '; $lang['js']['del_confirm'] = 'Да бъдат ли изтрити избраните елементи?'; $lang['js']['mu_btn'] = 'Качване на няколко файла наведнъж'; -$lang['rssfailed'] = 'Възникна грешка при вземането на този feed: '; -$lang['nothingfound'] = 'Не е открито нищо.'; +$lang['rssfailed'] = 'Възникна грешка при получаването на емисията: '; +$lang['nothingfound'] = 'Нищо не е открито.'; $lang['mediaselect'] = 'Медийни файлове'; $lang['fileupload'] = 'Качване на медийни файлове'; -$lang['uploadsucc'] = 'Качването бе успешно'; -$lang['uploadfail'] = 'Качването бе неуспешно. Може би поради грешни права?'; -$lang['uploadwrong'] = 'Качването бе отказано. Това файлово разширение е забранено!'; -$lang['uploadexist'] = 'Файлът вече съществува. Нищо не бе направено.'; +$lang['uploadsucc'] = 'Качването е успешно'; +$lang['uploadfail'] = 'Качването се провали. Може би поради грешни права?'; +$lang['uploadwrong'] = 'Качването е отказано. Файлово разширение е забранено!'; +$lang['uploadexist'] = 'Файлът вече съществува. Нищо не е направено.'; $lang['uploadbadcontent'] = 'Каченото съдържание не съответства на файлово разширение %s .'; -$lang['uploadspam'] = 'Качването бе блокирано от SPAM списъка.'; -$lang['uploadxss'] = 'Качването бе блокирано, заради възможно зловредно съдържание.'; -$lang['uploadsize'] = 'Файльт за качване бе прекалено голям. (макс. %s)'; +$lang['uploadspam'] = 'Качването е блокирано от SPAM списъка.'; +$lang['uploadxss'] = 'Качването е блокирано, поради възможно зловредно съдържание.'; +$lang['uploadsize'] = 'Файльт за качване е прекалено голям. (макс. %s)'; $lang['deletesucc'] = 'Файлът "%s" бе изтрит.'; $lang['deletefail'] = '"%s" не може да бъде изтрит - проверете правата.'; $lang['mediainuse'] = 'Файлът "%s" не бе изтрит - все още се ползва.'; @@ -130,8 +144,8 @@ $lang['accessdenied'] = 'Нямате разрешение да пре $lang['mediausage'] = 'Ползвайте следния синтаксис, за да упоменете файла:'; $lang['mediaview'] = 'Преглед на оригиналния файл'; $lang['mediaroot'] = 'root'; -$lang['mediaupload'] = 'Качете файл в текущото именно пространство. За създаване на подимено пространство, добавите името му преди това на файла и да ги разделите с двоеточие в полето "Качване като"'; -$lang['mediaextchange'] = 'Разширението на файла бе сменено от .%s на .%s!'; +$lang['mediaupload'] = 'Качете файл в текущото именно пространство. За създаване на подимено пространство, добавете име преди това на файла като ги разделите с двоеточие в полето "Качи като"'; +$lang['mediaextchange'] = 'Разширението на файла е сменено от .%s на .%s!'; $lang['reference'] = 'Връзки за'; $lang['ref_inuse'] = 'Файлът не може да бъде изтрит, защото все още се ползва от следните страници:'; $lang['ref_hidden'] = 'Някои връзки са към страници, които нямате права да четете'; @@ -143,6 +157,9 @@ $lang['yours'] = 'Вашата версия'; $lang['diff'] = 'Преглед на разликите с текущата версия'; $lang['diff2'] = 'Показване на разликите между избрани версии'; $lang['difflink'] = 'Препратка към сравнението на версиите'; +$lang['diff_type'] = 'Преглед на разликите:'; +$lang['diff_inline'] = 'Вграден'; +$lang['diff_side'] = 'Един до друг'; $lang['line'] = 'Ред'; $lang['breadcrumb'] = 'Следа'; $lang['youarehere'] = 'Намирате се в'; @@ -187,8 +204,8 @@ $lang['qb_chars'] = 'Специални знаци'; $lang['upperns'] = 'към майчиното именно пространство'; $lang['admin_register'] = 'Добавяне на нов потребител'; $lang['metaedit'] = 'Редактиране на метаданни'; -$lang['metasaveerr'] = 'Метаданните не бяха запазени'; -$lang['metasaveok'] = 'Метаданните бяха запазени успешно'; +$lang['metasaveerr'] = 'Записването на метаданните се провали'; +$lang['metasaveok'] = 'Метаданните са запазени успешно'; $lang['img_backto'] = 'Назад към'; $lang['img_title'] = 'Заглавие'; $lang['img_caption'] = 'Надпис'; @@ -200,6 +217,22 @@ $lang['img_copyr'] = 'Авторско право'; $lang['img_format'] = 'Формат'; $lang['img_camera'] = 'Фотоапарат'; $lang['img_keywords'] = 'Ключови думи'; +$lang['subscr_subscribe_success'] = '%s е добавен към списъка с абониралите се за %s'; +$lang['subscr_subscribe_error'] = 'Грешка при добавянето на %s към списъка с абониралите се за %s'; +$lang['subscr_subscribe_noaddress'] = 'Добавянето ви към списъка с абонати не е възможно поради липсата на свързан адрес (на ел. поща) с профила ви.'; +$lang['subscr_unsubscribe_success'] = '%s е премахнат от списъка с абониралите се за %s'; +$lang['subscr_unsubscribe_error'] = 'Грешка при премахването на %s от списъка с абониралите се за %s'; +$lang['subscr_already_subscribed'] = '%s е вече абониран за %s'; +$lang['subscr_not_subscribed'] = '%s не е абониран за %s'; +$lang['subscr_m_not_subscribed'] = 'Не сте абониран за текущата страницата или именно пространство.'; +$lang['subscr_m_new_header'] = 'Добави абонамент'; +$lang['subscr_m_current_header'] = 'Текущи абонаменти'; +$lang['subscr_m_unsubscribe'] = 'Прекратяване на абонамента'; +$lang['subscr_m_subscribe'] = 'Абониране'; +$lang['subscr_m_receive'] = 'Получаване'; +$lang['subscr_style_every'] = 'на ел. писмо при всяка промяна'; +$lang['subscr_style_digest'] = 'на ел. писмо с обобщение на промените във всяка страница (всеки %.2f дни)'; +$lang['subscr_style_list'] = 'на списък с променените страници от последното ел. писмо (всеки %.2f дни)'; $lang['authmodfailed'] = 'Лоша настройки за удостоверяване. Моля, уведомете администратора на Wiki страницата.'; $lang['authtempfail'] = 'Удостоверяването на потребители не е възможно за момента. Ако продължи дълго, моля уведомете администратора на Wiki страницата.'; $lang['i_chooselang'] = 'Изберете вашия изик'; @@ -210,23 +243,23 @@ $lang['i_superuser'] = 'Супер потребител'; $lang['i_problems'] = 'Открити са проблеми, които възпрепятстват инсталирането. Ще можете да продължите след като отстраните долуизброените проблеми.'; $lang['i_modified'] = 'Поради мерки за сигурност скрипта ще работи само с нова и непроменена инсталация на Dokuwiki. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с Инструкциите за инсталация на Dokuwiki.'; $lang['i_funcna'] = 'PHP функцията %s не е достъпна. Може би е забранена от доставчика на хостинг.'; -$lang['i_phpver'] = 'Вашата PHP версия %s е по-стара от необходимата %s. Обновете PHP инсталацията си.'; +$lang['i_phpver'] = 'Инсталираната версия %s на PHP е по-стара от необходимата %s. Актуализирайте PHP инсталацията.'; $lang['i_permfail'] = '%s не е достъпна за писане от DokuWiki. Трябва да промените правата за достъп до директорията!'; $lang['i_confexists'] = '%s вече съществува'; $lang['i_writeerr'] = '%s не можа да бъде създаден. Трябва да проверите правата за достъп до директорията/файла и да създадете файла ръчно.'; $lang['i_badhash'] = 'Файлът dokuwiki.php не може да бъде разпознат или е променен (hash=%s)'; $lang['i_badval'] = '%s - непозволена или празна стойност'; $lang['i_success'] = 'Настройването приключи успешно. Вече можете да изтриете файла install.php. Продължете към Вашето ново DokuWiki.'; -$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно, за да можете да ползвате Вашето ново DokuWiki.'; +$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно, за да можете да ползвате Вашето ново DokuWiki.'; $lang['i_policy'] = 'Първоначална политика за достъп'; $lang['i_pol0'] = 'Отворено Wiki (всеки може да чете, пише и качва)'; -$lang['i_pol1'] = 'Публично Wiki (всеки може да чете, само регистрирани могат да пишат и качват)'; -$lang['i_pol2'] = 'Затворено Wiki (само регистрирани могат четат, пишат и качват)'; +$lang['i_pol1'] = 'Публично Wiki (всеки може да чете, само регистрирани пишат и качват)'; +$lang['i_pol2'] = 'Затворено Wiki (само регистрирани четат, пишат и качват)'; $lang['i_retry'] = 'Повторен опит'; -$lang['i_license'] = 'Моля, изберете лиценз под който желаете да публикувате съдържанието'; -$lang['mu_intro'] = 'От тук можете да качите няколко файла наведнъж. Натиснете бутон "Избиране", изберете файлове и натиснете "Качи". +$lang['i_license'] = 'Моля, изберете лиценз под който желаете да публикувате съдържанието:'; +$lang['mu_intro'] = 'От тук можете да качите няколко файла наведнъж. Натиснете бутона "Избиране", изберете файлове и натиснете "Качване". '; -$lang['mu_gridname'] = 'Име на файл'; +$lang['mu_gridname'] = 'Име на файла'; $lang['mu_gridsize'] = 'Големина'; $lang['mu_gridstat'] = 'Състояние'; $lang['mu_namespace'] = 'Именно пространство'; @@ -242,10 +275,10 @@ $lang['mu_info'] = 'качени файла.'; $lang['mu_lasterr'] = 'Последна грешка:'; $lang['recent_global'] = 'В момента преглеждате промените в именно пространство %s. Може да прегледате и промените в цялото Wiki.'; $lang['years'] = 'преди %d години'; -$lang['months'] = 'преди %d месеци'; +$lang['months'] = 'преди %d месеца'; $lang['weeks'] = 'преди %d седмици'; $lang['days'] = 'преди %d дни'; $lang['hours'] = 'преди %d часа'; $lang['minutes'] = 'преди %d минути'; $lang['seconds'] = 'преди %d секунди'; -$lang['wordblock'] = 'Направените от вас промени не бяха съхранени, защото съдържат забранен текст (SPAM).'; +$lang['wordblock'] = 'Направените от вас промени не са съхранени, защото съдържат забранен текст (SPAM).'; diff --git a/inc/lang/bg/login.txt b/inc/lang/bg/login.txt index 9cc85ce32..a6f53e95d 100644 --- a/inc/lang/bg/login.txt +++ b/inc/lang/bg/login.txt @@ -1,3 +1,3 @@ ====== Вписване ====== -Не сте се вписали! Въведете данните си долу, за да го направите. Бисквитките (cookies) трябва да са включени. +Не сте се вписали! Въведете данните си удостоверяване отдолу, за да го направите. Бисквитките (cookies) трябва да са включени. diff --git a/inc/lang/bg/mailtext.txt b/inc/lang/bg/mailtext.txt index 8c18767e5..ad0024a8d 100644 --- a/inc/lang/bg/mailtext.txt +++ b/inc/lang/bg/mailtext.txt @@ -1,16 +1,16 @@ -Страница във DokuWiki бе добавена или променена. Ето детайлите: +Страница във DokuWiki е добавена или променена. Ето детайлите: -Дата : @DATE@ -Браузър : @BROWSER@ -IP-адрес : @IPADDRESS@ -Име на хост : @HOSTNAME@ +Дата : @DATE@ +Браузър : @BROWSER@ +IP адрес : @IPADDRESS@ +Име на хоста : @HOSTNAME@ Стара версия: @OLDPAGE@ -Нова версия : @NEWPAGE@ -Обобщение : @SUMMARY@ -Потребител : @USER@ +Нова версия: @NEWPAGE@ +Обобщение: @SUMMARY@ +Потребител : @USER@ @DIFF@ -- -Това писмо е генерирано от DokuWiki на адрес @DOKUWIKIURL@ +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ diff --git a/inc/lang/bg/newpage.txt b/inc/lang/bg/newpage.txt index bf67b2266..22d3bb6d1 100644 --- a/inc/lang/bg/newpage.txt +++ b/inc/lang/bg/newpage.txt @@ -1,4 +1,4 @@ ====== Несъществуваща тема ====== -Последвали сте препратка към тема, която все още не съществува. Ако правата Ви позволяват, може да я създадете чрез бутона ''Създаване на страница''. +Последвали сте препратка към тема, която не съществува. Ако правата ви позволяват, може да я създадете чрез бутона ''Създаване на страница''. diff --git a/inc/lang/bg/password.txt b/inc/lang/bg/password.txt index a3ee557e9..7a70ef1d8 100644 --- a/inc/lang/bg/password.txt +++ b/inc/lang/bg/password.txt @@ -1,9 +1,9 @@ Здравейте @FULLNAME@! -Това са Вашите потребителски данни за @TITLE@ от @DOKUWIKIURL@ +Вашите потребителски данни за @TITLE@ на @DOKUWIKIURL@ -Потребител: @LOGIN@ -Парола : @PASSWORD@ +Потребител : @LOGIN@ +Парола : @PASSWORD@ -- Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/pwconfirm.txt b/inc/lang/bg/pwconfirm.txt index beb56cca3..2c4252e15 100644 --- a/inc/lang/bg/pwconfirm.txt +++ b/inc/lang/bg/pwconfirm.txt @@ -5,7 +5,7 @@ Ако не сте поискали нова парола, товава просто игнорирайте това писмо. -За да потвърдите, че искането е наистина пратено от вас, моля ползвайте следния адрес. +За да потвърдите, че искането е наистина от вас, моля ползвайте следния линк: @CONFIRM@ diff --git a/inc/lang/bg/read.txt b/inc/lang/bg/read.txt index a3a15a07f..861d47fc5 100644 --- a/inc/lang/bg/read.txt +++ b/inc/lang/bg/read.txt @@ -1,2 +1,2 @@ -Тази страница е само за четене. Може да разглеждате кода, но не и да го променяте. Обърнете се съм администратора, ако смятате, че това не е редно. +Страницата е само за четене. Може да разглеждате кода, но не и да го променяте. Обърнете се съм администратора, ако смятате, че това не е редно. diff --git a/inc/lang/bg/recent.txt b/inc/lang/bg/recent.txt index 262979e34..c92029054 100644 --- a/inc/lang/bg/recent.txt +++ b/inc/lang/bg/recent.txt @@ -1,4 +1,4 @@ -====== Последни промени ====== +====== Скорошни промени ====== Следните страници са били променени наскоро. diff --git a/inc/lang/bg/register.txt b/inc/lang/bg/register.txt index b4076e89b..51fbb83fe 100644 --- a/inc/lang/bg/register.txt +++ b/inc/lang/bg/register.txt @@ -1,4 +1,4 @@ -====== Регистрирайте се като нов потребител ====== +====== Регистриране като нов потребител ====== -Моля, попълнете всичките полета, за да бъде създаден нов профил. Уверете се, че въведения **адрес на ел. поща е правилен**. Ако няма поле за парола, ще ви бъде изпратена такава на въведения адрес. Потребителското име трябва да бъде валидно [[doku>pagename|име на страница]]. +Моля, попълнете всичките полета отдолу, за да бъде създаден нов профил. Уверете се, че въведеният **адрес на ел. поща е правилен**. Ако няма поле за парола, ще ви бъде изпратена такава на въведения адрес. Потребителското име трябва да бъде валидно [[doku>pagename|име на страница]]. diff --git a/inc/lang/bg/registermail.txt b/inc/lang/bg/registermail.txt index 7839b0910..4b0828c7b 100644 --- a/inc/lang/bg/registermail.txt +++ b/inc/lang/bg/registermail.txt @@ -1,13 +1,13 @@ -Нов потребител беше регистриран. Ето детайлите: +Регистриран е нов потребител. Ето детайлите: Потребител : @NEWUSER@ -Пълно име : @NEWNAME@ -E-поща : @NEWEMAIL@ +Пълно име : @NEWNAME@ +E. поща : @NEWEMAIL@ -Дата : @DATE@ -Браузър : @BROWSER@ -IP-адрес : @IPADDRESS@ -Име на хоста: @HOSTNAME@ +Дата : @DATE@ +Браузър : @BROWSER@ +IP адрес : @IPADDRESS@ +Име на хоста : @HOSTNAME@ -- -Това писмо е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/resendpwd.txt b/inc/lang/bg/resendpwd.txt index 4823fbf00..38e2d1fe4 100644 --- a/inc/lang/bg/resendpwd.txt +++ b/inc/lang/bg/resendpwd.txt @@ -1,3 +1,3 @@ ====== Пращане на нова парола ====== -Моля, въведете потребителското си име във формата по-долу, ако желаете да получите нова парола. Линк за потвърждение ще ви бъде пратен на адреса на ел. поща, с която сте се регистрирани. +Моля, въведете потребителското си име във формата по-долу, ако желаете да получите нова парола. По ел. поща ще получите линк, с който да потвърдите. diff --git a/inc/lang/bg/stopwords.txt b/inc/lang/bg/stopwords.txt index b1627bb9a..03fd13758 100644 --- a/inc/lang/bg/stopwords.txt +++ b/inc/lang/bg/stopwords.txt @@ -1,7 +1,7 @@ -# Това е списък на думи за игнориране, с една дума на ред +# Това е списък с думи за игнориране при индексиране, с една дума на ред # Когато редактирате този файл, не забравяйте да използвате UNIX символ за нов ред # Не е нужно да включвате думи по-кратки от 3 символа - те биват игнорирани така или иначе -# Този списък се основава на думи от http://www.ranks.nl/stopwords/ +# Списъкът се основава на думи от http://www.ranks.nl/stopwords/ about are and diff --git a/inc/lang/bg/subscr_digest.txt b/inc/lang/bg/subscr_digest.txt new file mode 100644 index 000000000..f0533daf4 --- /dev/null +++ b/inc/lang/bg/subscr_digest.txt @@ -0,0 +1,18 @@ +Здравейте! + +Страницата @PAGE@ в @TITLE@ wiki е променена. +Промените са по-долу: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Стара версия: @OLDPAGE@ +Нова версия: @NEWPAGE@ + +Ако желаете да прекратите уведомяването за страницата трябва да се впишете на адрес @DOKUWIKIURL@, да посетите +@SUBSCRIBE@ +и да прекратите абонамента за промени по страницата или именното пространство. + +-- +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/subscr_form.txt b/inc/lang/bg/subscr_form.txt new file mode 100644 index 000000000..e32a5ec26 --- /dev/null +++ b/inc/lang/bg/subscr_form.txt @@ -0,0 +1,3 @@ +====== Диспечер на абонаменти ====== + +Страницата ви позволява да управлявате текущите си абонаменти за страници и именни пространства. \ No newline at end of file diff --git a/inc/lang/bg/subscr_list.txt b/inc/lang/bg/subscr_list.txt new file mode 100644 index 000000000..e9e65bc39 --- /dev/null +++ b/inc/lang/bg/subscr_list.txt @@ -0,0 +1,15 @@ +Здравейте! + +Променени са страници от именното пространство @PAGE@ от @TITLE@ wiki. +Ето променените страници: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Ако желаете да прекратите уведомяването за страницата трябва да се впишете на адрес @DOKUWIKIURL@, да посетите +@SUBSCRIBE@ +и да прекратите абонамента за промени по страницата или именното пространство. + +-- +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/subscr_single.txt b/inc/lang/bg/subscr_single.txt new file mode 100644 index 000000000..7b26f8e96 --- /dev/null +++ b/inc/lang/bg/subscr_single.txt @@ -0,0 +1,22 @@ +Здравейте! + +Страницата @PAGE@ в @TITLE@ wiki е променена. +Промените са по-долу: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Дата : @DATE@ +Потребител : @USER@ +Обобщение: @SUMMARY@ +Стара версия: @OLDPAGE@ +Нова версия: @NEWPAGE@ + +Ако желаете да прекратите уведомяването за страницата трябва да се впишете на адрес @DOKUWIKIURL@, да посетите +@NEWPAGE@ +и да прекратите абонамента за промени по страницата или именното пространство. + +-- +Писмото е генерирано от DokuWiki на адрес +@DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/uploadmail.txt b/inc/lang/bg/uploadmail.txt index 7373adcea..ebd8d9112 100644 --- a/inc/lang/bg/uploadmail.txt +++ b/inc/lang/bg/uploadmail.txt @@ -1,13 +1,13 @@ Качен е файл на вашето DokuWiki. Ето детайлите -Файл : @MEDIA@ -Дата : @DATE@ -Браузeр : @BROWSER@ -IP-Адрес : @IPADDRESS@ -Име на хост : @HOSTNAME@ -Размер : @SIZE@ -MIME Тип : @MIME@ -Потребител : @USER@ +Файл : @MEDIA@ +Дата : @DATE@ +Браузър : @BROWSER@ +IP адрес : @IPADDRESS@ +Име на хоста : @HOSTNAME@ +Размер : @SIZE@ +MIME тип : @MIME@ +Потребител : @USER@ -- -Tова писмо е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file diff --git a/lib/plugins/acl/lang/bg/help.txt b/lib/plugins/acl/lang/bg/help.txt index 23028cb35..2de453420 100644 --- a/lib/plugins/acl/lang/bg/help.txt +++ b/lib/plugins/acl/lang/bg/help.txt @@ -1,11 +1,11 @@ === Помощ === -На тази страница можете да добавяте и премахвате разрешения за определяне на имена и страници във Вашето Wiki. +От тук можете да добавяте и премахвате права за именни пространства и страници във вашето Wiki. -Левият панел показва всички налични имена и страници. +Левият панел показва всички налични именни пространства и страници. -Формата по-горе ви позволява да видите и промените разрешенията на избрания потребител или група. +Формата отгоре ви позволява да преглеждате и променяте правата на избран потребител или група. -В таблицата по-долу са показани всички актуални правила за контрол на достъпа. Можете да я използвате за бързо изтриване или промяна на множество правила. +В таблицата отдолу са показани всички актуални правила за контрол на достъпа. Можете да я ползвате за бързо изтриване или промяна на множество правила. -Четене на [[doku>acl|ACL документацията]] може да ви помогне да разберете напълно как работи контрола на достъпа в DokuWiki. \ No newline at end of file +За да разберете как работи контрола на достъпа в DokuWiki трябва да прочетете [[doku>acl|документацията относно ACL]]. \ No newline at end of file diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php index 4efadfbba..2b956deba 100644 --- a/lib/plugins/acl/lang/bg/lang.php +++ b/lib/plugins/acl/lang/bg/lang.php @@ -5,7 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov - * @author Kiril Velikov neohidra@gmail.com + * @author Kiril */ $lang['admin_acl'] = 'Управление на списъците за достъп'; $lang['acl_group'] = 'Група'; @@ -14,15 +14,15 @@ $lang['acl_perms'] = 'Права за'; $lang['page'] = 'Страница'; $lang['namespace'] = 'Именно пространство'; $lang['btn_select'] = 'Избери'; -$lang['p_user_id'] = 'Потребителят %s има в момента следните права за страницата %s: %s.'; -$lang['p_user_ns'] = 'Потребителят %s има в момента следните права в именното пространство %s: %s.'; -$lang['p_group_id'] = 'Членове на групата %s имат в момента следните права за страницата %s: %s.'; -$lang['p_group_ns'] = 'Членове на групата %s имат в момента следните права в именното пространство %s: %s.'; -$lang['p_choose_id'] = 'Моля въведете потребител или група в полето горе, за да видите или промените правата за страницата %s.'; -$lang['p_choose_ns'] = 'Моля въведете потребител или група в полето горе, за да видите или промените правата за именното пространство %s.'; -$lang['p_inherited'] = 'Забележка: Тези разрешения не са определени изрично, но са били наследени от други групи или именни пространства.'; -$lang['p_isadmin'] = 'Забележка: Избраните група или потребител притежават пълни права, според конфигурацията им.'; -$lang['p_include'] = 'Висши разрешения включват по-нисши такива. Създаване или премахване на разрешения се прилага само за именни пространства, не за страници.'; +$lang['p_user_id'] = 'Потребителят %s в момента има следните права за страницата %s: %s.'; +$lang['p_user_ns'] = 'Потребителят %s в момента има следните права за именното пространство %s: %s.'; +$lang['p_group_id'] = 'Членовете на групата %s в момента имат следните права за страницата %s: %s.'; +$lang['p_group_ns'] = 'Членовете на групата %s в момента имат следните права за именното пространство %s: %s.'; +$lang['p_choose_id'] = 'Моля, въведете потребител или група в полето отгоре, за да видите или промените правата за страницата %s.'; +$lang['p_choose_ns'] = 'Моля, въведете потребител или група в полето отгоре, за да видите или промените правата за именното пространство %s.'; +$lang['p_inherited'] = 'Бележка: Тези разрешения не са зададени директно, а са наследени от други групи или именни пространства.'; +$lang['p_isadmin'] = 'Бележка: Избраната група или потребител има всички права, защото е определен за суперпотребител.'; +$lang['p_include'] = 'Висши права включват по-нисшите такива. Правата за създаване, качване и изтриване са приложими само за именни пространства, но не за страници.'; $lang['current'] = 'Текущи ACL права'; $lang['where'] = 'Страница/Именно постранство'; $lang['who'] = 'Потребител/Група'; @@ -33,5 +33,5 @@ $lang['acl_perm2'] = 'Редактиране'; $lang['acl_perm4'] = 'Създаване'; $lang['acl_perm8'] = 'Качване'; $lang['acl_perm16'] = 'Изтриване'; -$lang['acl_new'] = 'Добавяне на ново'; -$lang['acl_mod'] = 'Промяна на вписване'; +$lang['acl_new'] = 'Добавяне на право'; +$lang['acl_mod'] = 'Промяна на записа'; diff --git a/lib/plugins/config/lang/bg/intro.txt b/lib/plugins/config/lang/bg/intro.txt index fc455981e..db09e6838 100644 --- a/lib/plugins/config/lang/bg/intro.txt +++ b/lib/plugins/config/lang/bg/intro.txt @@ -1,7 +1,7 @@ -====== Управление на настройките ====== +====== Диспечер на настройките ====== -От страница можете да управлявате настройките на вашето Dokuwiki. За отделните настройки вижте [[doku>config]]. За повече информация относно тази приставка вижте [[doku>plugin:config]]. +От тук можете да управлявате настройките на вашето Dokuwiki. За отделните настройки вижте [[doku>config]]. За повече информация относно тази приставка вижте [[doku>plugin:config]]. -Настройките изобразени със светло червен фон за защитени и не могат да бъдат променяни с тази приставка. Настройките показани със син фон са стандартни стойности, а настройките с бял фон са били настроени локално за тази конкретна инсталация. Можете да променяте както сините, така и белите настройки. +Настройките изобразени със светло червен фон са защитени и не могат да бъдат променяни с тази приставка. Настройките показани със син фон са стандартните стойности, а настройките с бял фон са били настроени локално за тази конкретна инсталация. Можете да променяте както сините, така и белите настройки. Не забравяйте да натиснете бутона **ЗАПИС** преди да напуснете страницата, в противен случай промените няма да бъдат приложени. diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php index 8b32f182c..eb2c3a426 100644 --- a/lib/plugins/config/lang/bg/lang.php +++ b/lib/plugins/config/lang/bg/lang.php @@ -5,76 +5,76 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov - * @author Kiril Velikov neohidra@gmail.com + * @author Kiril */ $lang['menu'] = 'Настройки'; -$lang['error'] = 'Невъзможно е обновяването на настройките, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново. -
Неверните стойности ще бъдат обградени с червена рамка.'; -$lang['updated'] = 'Обновяването на настройките бе успешно.'; +$lang['error'] = 'Обновяването на настройките е невъзможно, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново. +
Неверните стойности ще бъдат обградени с червена рамка.'; +$lang['updated'] = 'Обновяването на настройките е успешно.'; $lang['nochoice'] = '(няма друг възможен избор)'; -$lang['locked'] = 'Невъзможно е обновяването на файлът с настройките, ако това не е нарочно, проверете,
дали локалните име на файл и права са верни.'; -$lang['danger'] = 'Внимание: промяна на тази опция може да направи уикито и конфигурационното меню недостъпни.'; -$lang['warning'] = 'Предупреждение: промяна на тази опция може предизвика нежелани реакции.'; -$lang['security'] = 'Предупреждение: промяната на тази опция може да представлява риск за сигурността.'; -$lang['_configuration_manager'] = 'Управление на настройките'; -$lang['_header_dokuwiki'] = 'DokuWiki настройки'; -$lang['_header_plugin'] = 'Настройки на приставките'; -$lang['_header_template'] = 'Настройки на шаблоните'; +$lang['locked'] = 'Обновяването на файла с настройките е невъзможно, ако това не е нарочно, проверете,
дали името на локалния файл с настройки и правата са верни.'; +$lang['danger'] = 'Внимание: промяна на опцията може да направи wiki-то и менюто за настройване недостъпни.'; +$lang['warning'] = 'Предупреждение: промяна на опцията може предизвика нежелани последици.'; +$lang['security'] = 'Предупреждение: промяна на опцията може да представлява риск за сигурността.'; +$lang['_configuration_manager'] = 'Диспечер на настройките'; +$lang['_header_dokuwiki'] = 'Настройки на DokuWiki'; +$lang['_header_plugin'] = 'Настройки на приставки'; +$lang['_header_template'] = 'Настройки на шаблони'; $lang['_header_undefined'] = 'Неопределени настройки'; $lang['_basic'] = 'Основни настройки'; $lang['_display'] = 'Настройки на показването'; -$lang['_authentication'] = 'Настройки на идентификацията'; -$lang['_anti_spam'] = 'Анти-спам настройки'; -$lang['_editing'] = 'Настройки на редактирането'; +$lang['_authentication'] = 'Настройки за удостоверяване'; +$lang['_anti_spam'] = 'Настройки за борба със SPAM-ма'; +$lang['_editing'] = 'Настройки за редактиране'; $lang['_links'] = 'Настройки на препратките'; $lang['_media'] = 'Настройки на медията'; $lang['_advanced'] = 'Допълнителни настройки'; $lang['_network'] = 'Мрежови настройки'; -$lang['_plugin_sufix'] = 'Настройки на приставките'; +$lang['_plugin_sufix'] = 'Настройки на приставки'; $lang['_template_sufix'] = 'Настройки на шаблони'; -$lang['_msg_setting_undefined'] = 'Няма метаданни на настройките.'; +$lang['_msg_setting_undefined'] = 'Няма метаданни за настройките.'; $lang['_msg_setting_no_class'] = 'Няма клас настройки.'; $lang['_msg_setting_no_default'] = 'Няма стандартна стойност.'; -$lang['fmode'] = 'Режим(права) на създаване на файловете'; -$lang['dmode'] = 'Режим(права) за създаване на директориите'; +$lang['fmode'] = 'Режим (права) за създаване на файлове'; +$lang['dmode'] = 'Режим (права) за създаване на директории'; $lang['lang'] = 'Език'; -$lang['basedir'] = 'Главна директория'; -$lang['baseurl'] = 'Главен адрес (URL)'; +$lang['basedir'] = 'Главна директория (напр. /dokuwiki/). Оставете празно, за да бъде засечена автоматично.'; +$lang['baseurl'] = 'URL адрес (напр. http://www.yourserver.com). Оставете празно, за да бъде засечен автоматично.'; $lang['savedir'] = 'Директория за записване на данните'; $lang['start'] = 'Име на началната страница'; -$lang['title'] = 'Име на Wiki'; +$lang['title'] = 'Име на Wiki-то'; $lang['template'] = 'Шаблон'; $lang['license'] = 'Под какъв лиценз да бъде публикувано съдържанието?'; -$lang['fullpath'] = 'Показване на пълния път до страниците в долния им край.'; -$lang['recent'] = 'Последни промени'; +$lang['fullpath'] = 'Показване на пълния път до страниците в долния колонтитул.'; +$lang['recent'] = 'Скорошни промени'; $lang['breadcrumbs'] = 'Брой на следите'; $lang['youarehere'] = 'Йерархични следи'; $lang['typography'] = 'Поправяне на разместени букви'; -$lang['htmlok'] = 'Позволяване на вграден HTML код'; -$lang['phpok'] = 'Позволяване на вграден PHP код'; +$lang['htmlok'] = 'Разрешаване вграждането на HTML код'; +$lang['phpok'] = 'Разрешаване вграждането на PHP код'; $lang['dformat'] = 'Формат на датата (виж. strftime функцията на PHP)'; $lang['signature'] = 'Подпис'; $lang['toptoclevel'] = 'Главно ниво за съдържанието'; -$lang['tocminheads'] = 'Минимална сума на заглавията, която определя дали съдържанието е създадено'; +$lang['tocminheads'] = 'Минимален брой заглавия, определящ дали съдържанието е създадено'; $lang['maxtoclevel'] = 'Максимално ниво на съдържанието'; -$lang['maxseclevel'] = 'Максимално ниво на редактиране на секция'; -$lang['camelcase'] = 'Използване на CamelCase за препратки'; -$lang['deaccent'] = 'Окончателни имена на страници'; -$lang['useheading'] = 'Използване на първото заглавие за име на страница'; +$lang['maxseclevel'] = 'Максимално ниво за редактиране на секция'; +$lang['camelcase'] = 'Ползване на CamelCase за линкове'; +$lang['deaccent'] = 'Почистване имената на страниците (на файловете)'; +$lang['useheading'] = 'Ползване на първото заглавие за име на страница'; $lang['refcheck'] = 'Проверка за препратка на медия'; -$lang['refshow'] = 'Брой на показани медийни препратки'; -$lang['allowdebug'] = 'Пускане на debug изключете, ако не е нужен!'; -$lang['usewordblock'] = 'Блокиране на спам базирано на списък от думи'; -$lang['indexdelay'] = 'Забавяне преди индексиране(секунди)'; -$lang['relnofollow'] = 'Използване на rel="nofollow" за външни връзки'; +$lang['refshow'] = 'Брой на показваните медийни препратки'; +$lang['allowdebug'] = 'Включване на debug изключете, ако не е нужен!'; +$lang['usewordblock'] = 'Блокиране на SPAM въз основа на на списък от думи'; +$lang['indexdelay'] = 'Забавяне преди индексиране (сек)'; +$lang['relnofollow'] = 'Ползване на rel="nofollow" за външни препратки'; $lang['mailguard'] = 'Промяна на адресите на ел. поща (във форма непозволяваща пращането на SPAM)'; $lang['iexssprotect'] = 'Проверяване на качените файлове за възможно зловреден JavaScript и HTML код'; -$lang['showuseras'] = 'Какво да се показва на дисплея за потребителя, който последно е променил тази страница'; -$lang['useacl'] = 'Използване на списъци за достъп'; +$lang['showuseras'] = 'Какво да се показва за потребителя, който последно е променил страницата'; +$lang['useacl'] = 'Ползване на списъци за достъп'; $lang['autopasswd'] = 'Автоматично генериране на пароли'; -$lang['authtype'] = 'Метод на идентификация'; +$lang['authtype'] = 'Метод за удостоверяване'; $lang['passcrypt'] = 'Метод за криптиране на паролите'; -$lang['defaultgroup'] = 'Група по подразбиране'; +$lang['defaultgroup'] = 'Стандартна група'; $lang['superuser'] = 'Супер потребител - група или потребител с пълен достъп до всички страници и функции без значение от настройките на списъците за достъп (ACL)'; $lang['manager'] = 'Управител - група или потребител, с достъп до определени управляващи фунции '; $lang['profileconfirm'] = 'Потвърждаване на промени в профила с парола'; @@ -83,58 +83,61 @@ $lang['disableactions_check'] = 'Проверка'; $lang['disableactions_subscription'] = 'Записване/Отписване'; $lang['disableactions_wikicode'] = 'Преглед на кода/Експортиране на оригинална версия'; $lang['disableactions_other'] = 'Други действия (разделени със запетая)'; -$lang['sneaky_index'] = 'По подразбиране DokuWiki ще показва всички именни пространства в индекса. Избирането на настройката ще доведе до скриване на тези, за които потребителят няма права за четене. Това може да означава и скриване на достъпните подименни пространства. Това може да направи индекса неизползваем при определени настрокйки на списъците за контрол на достъп (ACL). '; -$lang['auth_security_timeout'] = 'Изчакване при вписване преди Timeout (в секунди)'; -$lang['securecookie'] = 'Да се изпращат ли бисквитки, посочени чрез HTTPS, само чрез HTTPS от браузъра? Забранете тази опция, когато SSL се използва само за вписване в системата, а четенето е възможно и без SSL. +$lang['sneaky_index'] = 'Стандартно DokuWiki ще показва всички именни пространства в индекса. Опцията скрива тези, за които потребителят няма права за четене. Това може да доведе и до скриване на иначе достъпни подименни пространства. С определени настройки на списъците за контрол на достъпа (ACL) може да направи индекса неизползваем. '; +$lang['auth_security_timeout'] = 'Считане на вписване за неуспешно след (сек)'; +$lang['securecookie'] = 'Да се изпращат ли бисквитките зададени чрез HTTPS, само чрез HTTPS от браузъра? Изключете опцията, когато SSL се ползва само за вписване в системата, а четенето е възможно и без SSL. '; -$lang['xmlrpc'] = 'Включване/Изключване на XML-RPC интерфейса.'; -$lang['xmlrpcuser'] = 'Ограничаване на XML-RPC достъп до дадени тук и отделени със запетая групи или потребители. Оставете празни да даде достъп до всички.'; -$lang['updatecheck'] = 'Проверка за нови версии и предупреждения за сигурност? Dokiwiki трябва да може да се свърже със splitbrain.org за тази функционалност.'; -$lang['userewrite'] = 'Използване на валидни URL'; +$lang['xmlrpc'] = 'Включване/Изключване на интерфейса XML-RPC.'; +$lang['xmlrpcuser'] = 'Ограничаване на XML-RPC достъпа до отделени със запетая групи или потребители. Оставете празно, за да даде достъп на всеки.'; +$lang['updatecheck'] = 'Проверяване за за нови версии и предупреждения за сигурността? Необходимо е Dokiwiki да може да се свързва със splitbrain.org за тази функционалност.'; +$lang['userewrite'] = 'Ползване на nice URL адреси'; $lang['useslash'] = 'Ползване на наклонена черта за разделител на именните пространства в URL'; -$lang['usedraft'] = 'Автоматично запазване на чернова при редактиране'; +$lang['usedraft'] = 'Автоматично запазване на чернова по време на редактиране'; $lang['sepchar'] = 'Разделител между думите в имената на страници'; -$lang['canonical'] = 'Използване на уеднаквени URL'; +$lang['canonical'] = 'Ползване на напълно уеднаквени URL адреси'; $lang['fnencode'] = 'Метод за кодиране на не-ASCII именуваните файлове.'; -$lang['autoplural'] = 'Проверка за множествено число в препратките'; +$lang['autoplural'] = 'Проверяване за множествено число в препратките'; $lang['compression'] = 'Метод за компресия на attic файлове'; -$lang['cachetime'] = 'Максимална възраст на кеша (сек)'; -$lang['locktime'] = 'Максимална възраст на заключените файлове (сек)'; +$lang['cachetime'] = 'Макс. период за съхраняване на кеша (сек)'; +$lang['locktime'] = 'Макс. период за съхраняване на заключените файлове (сек)'; $lang['fetchsize'] = 'Максимален размер (байтове), който fetch.php може да сваля'; $lang['notify'] = 'Пращане на съобщения за промени на тази eл. поща'; $lang['registernotify'] = 'Пращане информация за нови потребители на тази ел. поща'; $lang['mailfrom'] = 'Ел. поща, която да се ползва за автоматично изпращане на ел. писма'; +$lang['mailprefix'] = 'Представка за темите (поле subject) на автоматично изпращаните ел. писма'; $lang['gzip_output'] = 'Кодиране на съдържанието с gzip за xhtml'; $lang['gdlib'] = 'Версия на GD Lib'; $lang['im_convert'] = 'Път до инструмента за трансформация на ImageMagick'; $lang['jpg_quality'] = 'Kачество на JPG компресията (0-100)'; $lang['subscribers'] = 'Включване на поддръжката за абониране към страници'; +$lang['subscribe_time'] = 'Време след което абонаментните списъци и обобщения се изпращат (сек); Трябва да е по-малко от времето определено в recent_days.'; $lang['compress'] = 'Компактен CSS и javascript изглед'; $lang['hidepages'] = 'Скриване на съвпадащите страници (regular expressions)'; $lang['send404'] = 'Пращане на "HTTP 404/Page Not Found" за несъществуващи страници'; $lang['sitemap'] = 'Генериране на Google sitemap (дни)'; $lang['broken_iua'] = 'Отметнете, ако ignore_user_abort функцията не работи. Може да попречи на търсенето в страниците. Знае се, че комбинацията IIS+PHP/CGI е лоша. Вижте Грешка 852 за повече информация.'; $lang['xsendfile'] = 'Ползване на Х-Sendfile header, за да може уебсървъра да дава статични файлове? Вашият уебсървър трябва да го поддържа.'; -$lang['renderer_xhtml'] = 'Показвай main (XHTML) код за wiki'; -$lang['renderer__core'] = '%s (DokuWiki ядро)'; +$lang['renderer_xhtml'] = 'Представяне на основните изходни данни (xhtml) от wiki-то с'; +$lang['renderer__core'] = '%s (ядрото на DokuWiki)'; $lang['renderer__plugin'] = '%s (приставка)'; $lang['rememberme'] = 'Ползване на постоянни бисквитки за вписване (запомни ме)'; -$lang['rss_type'] = 'Тип на XML feed'; -$lang['rss_linkto'] = 'XML feed препраща към'; -$lang['rss_content'] = 'Какво да се показва в XML feed елементите?'; -$lang['rss_update'] = 'Интервал на обновяване XML източника (сек)'; -$lang['recent_days'] = 'Колко последни промени да се пазят (дни)'; -$lang['rss_show_summary'] = 'XML feed show summary in title'; +$lang['rss_type'] = 'Тип на XML емисията'; +$lang['rss_linkto'] = 'XML емисията препраща към'; +$lang['rss_content'] = 'Какво да показват елементите на XML емисията?'; +$lang['rss_update'] = 'Интервал на актуализиране на XML емисията (сек)'; +$lang['recent_days'] = 'Колко от скорошните промени да се пазят (дни)'; +$lang['rss_show_summary'] = 'Показване на обобщение в заглавието на XML емисията'; $lang['target____wiki'] = 'Прозорец за вътрешни препратки'; -$lang['target____interwiki'] = 'Прозорец за вътреуики препратки'; +$lang['target____interwiki'] = 'Прозорец за препратки в wiki-то'; $lang['target____extern'] = 'Прозорец за външни препратки'; $lang['target____media'] = 'Прозорец за медийни препратки'; -$lang['target____windows'] = 'Прозорец за Windows препратки'; +$lang['target____windows'] = 'Прозорец за препратки към Windows'; $lang['proxy____host'] = 'Име на прокси сървър'; -$lang['proxy____port'] = 'Порт на проксито'; +$lang['proxy____port'] = 'Порт за проксито'; $lang['proxy____user'] = 'Потребител за проксито'; $lang['proxy____pass'] = 'Парола за проксито'; -$lang['proxy____ssl'] = 'Ползване на SSL за връзката с проксито'; +$lang['proxy____ssl'] = 'Ползване на SSL при свързване с проксито'; +$lang['proxy____except'] = 'Регулярен израз определящ за кои URL адреси да не се ползва прокси сървър.'; $lang['safemodehack'] = 'Ползване на хака safemode'; $lang['ftp____host'] = 'FTP сървър за хака safemode'; $lang['ftp____port'] = 'FTP порт за хака safemode'; @@ -146,11 +149,11 @@ $lang['typography_o_0'] = 'без'; $lang['typography_o_1'] = 'с изключение на единични кавички'; $lang['typography_o_2'] = 'включително единични кавички (не винаги работи)'; $lang['userewrite_o_0'] = 'без'; -$lang['userewrite_o_1'] = '.htaccess файлa'; +$lang['userewrite_o_1'] = 'файлът .htaccess'; $lang['userewrite_o_2'] = 'вътрешно от DokuWiki '; $lang['deaccent_o_0'] = 'изключено'; $lang['deaccent_o_1'] = 'премахване на акценти'; -$lang['deaccent_o_2'] = 'романизация'; +$lang['deaccent_o_2'] = 'транслитерация'; $lang['gdlib_o_0'] = 'GD Lib не е достъпна'; $lang['gdlib_o_1'] = 'Версия 1.x'; $lang['gdlib_o_2'] = 'Автоматично разпознаване'; @@ -160,12 +163,12 @@ $lang['rss_type_o_rss2'] = 'RSS версия 2.0'; $lang['rss_type_o_atom'] = 'Atom версия 0.3'; $lang['rss_type_o_atom1'] = 'Atom версия 1.0'; $lang['rss_content_o_abstract'] = 'Извлечение'; -$lang['rss_content_o_diff'] = 'Обединен Diff'; -$lang['rss_content_o_htmldiff'] = 'Diff таблица в HTML формат'; +$lang['rss_content_o_diff'] = 'Обединени разлики'; +$lang['rss_content_o_htmldiff'] = 'Таблица с разликите в HTML формат'; $lang['rss_content_o_html'] = 'Цялото съдържание на HTML страницата'; $lang['rss_linkto_o_diff'] = 'изглед на разликите'; $lang['rss_linkto_o_page'] = 'променената страница'; -$lang['rss_linkto_o_rev'] = 'списък на версииte'; +$lang['rss_linkto_o_rev'] = 'списък на версиите'; $lang['rss_linkto_o_current'] = 'текущата страница'; $lang['compression_o_0'] = 'без'; $lang['compression_o_gz'] = 'gzip'; @@ -174,11 +177,12 @@ $lang['xsendfile_o_0'] = 'не използвайте'; $lang['xsendfile_o_1'] = 'Специфичен lighttpd header (преди версия 1.5)'; $lang['xsendfile_o_2'] = 'Стандартен X-Sendfile header'; $lang['xsendfile_o_3'] = 'Специфичен Nginx X-Accel-Redirect header за пренасочване'; -$lang['showuseras_o_loginname'] = 'Потребителско име'; +$lang['showuseras_o_loginname'] = 'Име за вписване'; $lang['showuseras_o_username'] = 'Пълно потребителско име'; -$lang['showuseras_o_email'] = 'Адресите на ел, поща на потребителите (променени според настройките на mailguard)'; -$lang['showuseras_o_email_link'] = 'Адресите на ел. поща на потребителите под формата на mailto: връзка'; +$lang['showuseras_o_email'] = 'Ел, поща на потребителите (променени според настройките на mailguard)'; +$lang['showuseras_o_email_link'] = 'Ел. поща на потребителите под формата на mailto: връзки'; $lang['useheading_o_0'] = 'Никога'; $lang['useheading_o_navigation'] = 'Само за навигация'; $lang['useheading_o_content'] = 'Само за съдържанието на Wiki-то'; $lang['useheading_o_1'] = 'Винаги'; +$lang['readdircache'] = 'Максимален период за съхраняване кеша на readdir (сек)'; diff --git a/lib/plugins/plugin/lang/bg/admin_plugin.txt b/lib/plugins/plugin/lang/bg/admin_plugin.txt index e74e88d00..0227d6fe8 100644 --- a/lib/plugins/plugin/lang/bg/admin_plugin.txt +++ b/lib/plugins/plugin/lang/bg/admin_plugin.txt @@ -1,3 +1,3 @@ ====== Управление на приставките ====== -На тази страница можете на управлявате всичко свързано с [[doku>plugins|приставките]] на Dokuwiki. За да можете да свалите и инсталирате приставка, вашата plugin директория трябва да е позволена за писане от сървъра. +На тази страница можете на управлявате всичко свързано с [[doku>plugins|приставките]] на Dokuwiki. За да можете да свалите и инсталирате приставка, е необходимо писането в директорията plugin да е позволено на сървъра. diff --git a/lib/plugins/plugin/lang/bg/lang.php b/lib/plugins/plugin/lang/bg/lang.php index b4aaae5e4..40331fb54 100644 --- a/lib/plugins/plugin/lang/bg/lang.php +++ b/lib/plugins/plugin/lang/bg/lang.php @@ -5,7 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov - * @author Kiril Velikov neohidra@gmail.com + * @author Kiril */ $lang['menu'] = 'Управление на приставките'; $lang['download'] = 'Сваляне и инсталиране на нова приставка'; @@ -17,37 +17,37 @@ $lang['btn_settings'] = 'настройки'; $lang['btn_download'] = 'Сваляне'; $lang['btn_enable'] = 'Запис'; $lang['url'] = 'URL'; -$lang['installed'] = 'Инсталирани:'; -$lang['lastupdate'] = 'Последно обновени:'; +$lang['installed'] = 'Инсталирана:'; +$lang['lastupdate'] = 'Актуализирана:'; $lang['source'] = 'Източник:'; $lang['unknown'] = 'непознат'; -$lang['updating'] = 'Качване ...'; -$lang['updated'] = 'Качването на приставката %s бе упешно.'; -$lang['updates'] = 'Обновяването на следните приставки бе успешно'; -$lang['update_none'] = 'Не бяха намерени нови версии.'; +$lang['updating'] = 'Актуализиране ...'; +$lang['updated'] = 'Приставката %s е качена успешно'; +$lang['updates'] = 'Следните приставки са актуализирани успешно'; +$lang['update_none'] = 'Не са намерени нови версии.'; $lang['deleting'] = 'Изтриване ...'; -$lang['deleted'] = 'Изтриването на приставката %s бе успешно.'; +$lang['deleted'] = 'Приставката %s е изтрита успешно.'; $lang['downloading'] = 'Сваляне ...'; -$lang['downloaded'] = 'Инсталирането на приставката %s бе успешно '; -$lang['downloads'] = 'Инсталирането на следните приставки бе успешно:'; -$lang['download_none'] = 'Не бяха намерени приставки или е имало грешка при свалянето и инсталирането.'; -$lang['plugin'] = 'Приставки:'; +$lang['downloaded'] = 'Приставката %s е инсталирана успешно '; +$lang['downloads'] = 'Следните приставки са инсталирани успешно:'; +$lang['download_none'] = 'Не са намерени приставки или е възникнала непозната грешка при свалянето и инсталирането.'; +$lang['plugin'] = 'Приставка:'; $lang['components'] = 'Компоненти'; -$lang['noinfo'] = 'Тази приставка не върна информация, може да е повредена.'; +$lang['noinfo'] = 'Приставка не върна информация, може да е повредена.'; $lang['name'] = 'Име:'; $lang['date'] = 'Дата:'; $lang['type'] = 'Тип:'; $lang['desc'] = 'Описание:'; $lang['author'] = 'Автор:'; -$lang['www'] = 'Сайт:'; -$lang['error'] = 'Имаше непозната грешка.'; -$lang['error_download'] = 'Свалянето на приставката %s бе невъзможно.'; -$lang['error_badurl'] = 'Предполагаем грешен адрес - не може да се определи име на файла от адреса(url)'; -$lang['error_dircreate'] = 'Създаването на временна директория за сваляне е невъзможно.'; -$lang['error_decompress'] = 'Разархивирането на сваленият файл е невъзможно.Това може да е резултат от грешно сваляне, в такъв случай трябва да опитате отново; или формата на компресия е непозната - в този случай трябва да свалите и инсталирате приставката ръчно.'; -$lang['error_copy'] = 'Имаше грешка при копирането на файл по време на инсталацията на приставката %s: дискът е пълен или правата за достъп до файловете са грешни. Това може да е довело до частично инсталирана приставка и оставяне на нестабилна инсталация на уикито ви.'; -$lang['error_delete'] = 'Имаше грешка при изтриването на приставката %s. Най-вероятната причина е недостатъчна права за достъп до файл или директория'; -$lang['enabled'] = 'Приставката %s бе включена.'; -$lang['notenabled'] = 'Приставката %s не бе включена, моля проверете файловите разрешения.'; -$lang['disabled'] = 'Приставката %s бе изключена.'; -$lang['notdisabled'] = 'Приставката %s не бе изключена, моля проверете файловите разрешения.'; +$lang['www'] = 'Уебстраница:'; +$lang['error'] = 'Възникна непозната грешка.'; +$lang['error_download'] = 'Свалянето на приставката %s е невъзможно.'; +$lang['error_badurl'] = 'Предполагаем грешен адрес - не може да се определи име на файла от URL адреса'; +$lang['error_dircreate'] = 'Създаването на временна директория за сваляне не е възможно.'; +$lang['error_decompress'] = 'Разархивирането на сваленият файл е невъзможно. Вероятно е резултат от грешка при свалянето, в този случай трябва да опитате отново; или формата на компресия е непознат - тогава трябва да свалите и инсталирате приставката ръчно.'; +$lang['error_copy'] = 'Възникна грешка при копиране на файл по време на инсталиране на приставката %s: вероятно дискът е пълен или правата за достъп до файловете са грешни. Може да доведе до частично инсталирана приставка и да причини нестабилно функциониране на wiki-то ви.'; +$lang['error_delete'] = 'Възникна грешка при изтриването на приставката %s. Най-вероятната причина е в правата за достъп до файл или директория'; +$lang['enabled'] = 'Приставката %s е включена.'; +$lang['notenabled'] = 'Приставката %s не може да бъде включена, моля проверете правата за файловете.'; +$lang['disabled'] = 'Приставката %s е изключена.'; +$lang['notdisabled'] = 'Приставката %s не е изключена, моля проверете правата за файловете.'; diff --git a/lib/plugins/popularity/lang/bg/intro.txt b/lib/plugins/popularity/lang/bg/intro.txt index aa437f32c..35023b897 100644 --- a/lib/plugins/popularity/lang/bg/intro.txt +++ b/lib/plugins/popularity/lang/bg/intro.txt @@ -1,9 +1,9 @@ ====== Обратна връзка ====== -Инструментът събира данни за Вашето Wiki и ви позволява да ги изпратите на разработчиците DokuWiki. Данните ще им помогнат да разберат как DokuWiki се използва от потребителите и че статистиката е в подкрепа на поетата насока за развитие. +Инструментът събира данни за вашето Wiki и ви позволява да ги изпратите да разработчиците на DokuWiki. Информацията ще им помогне да разберат как DokuWiki се ползва от потребителите и че статистиката е в подкрепа на поетата насока за развитие. -Моля, ползвайте функцията, от време на време, когато уебстраницата ви се разраства, за да информирате разработчиците. Изпратените данни ще бъдат идентифицирани с анонимен номер. +Моля, ползвайте функцията, от време на време, когато уебстраницата ви се разраства, за да информирате разработчиците. Изпратените данни ще бъдат идентифицирани с анонимен идентификатор. -Събраните данни съдържат информация за версия на DokuWiki, броя и размера на вашите страници и файлове, инсталирани приставки и информация за вашата PHP инсталация. +Събираните данни съдържат информация като версията на DokuWiki, броя и размера на вашите страници и файлове, инсталирани приставки и информация за локалната инсталация на PHP. -Данните, които ще бъдат изпратени са изобразени по-долу. Моля, натиснете бутона "Изпращане на данните", за да изпратите информацията. \ No newline at end of file +Данните, които ще бъдат изпратени са изобразени отдолу. Моля, натиснете бутона "Изпращане на данните", за да бъдат изпратени. \ No newline at end of file diff --git a/lib/plugins/popularity/lang/bg/lang.php b/lib/plugins/popularity/lang/bg/lang.php index 5c89c3509..ba731c0fc 100644 --- a/lib/plugins/popularity/lang/bg/lang.php +++ b/lib/plugins/popularity/lang/bg/lang.php @@ -3,12 +3,12 @@ * Bulgarian language file * * @author Viktor Usunov - * @author Kiril Velikov neohidra@gmail.com + * @author Kiril */ -$lang['name'] = 'Обратна връзка (зареждането може да отнеме известно време)'; +$lang['name'] = 'Обратна връзка (зареждането изисква време)'; $lang['submit'] = 'Изпращане на данните'; $lang['autosubmit'] = 'Автоматично изпращане на данните веднъж в месеца'; -$lang['submissionFailed'] = 'Данните не могат да бъдат изпратени поради следната грешка"'; -$lang['submitDirectly'] = 'Можете да пратите данните ръчно като изпратите следния формуляр.'; -$lang['autosubmitError'] = 'Последното автоматично изпращане не бе осъществено, поради следната грешка:'; -$lang['lastSent'] = 'Данните бяха изпратени'; +$lang['submissionFailed'] = 'Данните не могат да бъдат изпратени поради следната грешка:'; +$lang['submitDirectly'] = 'Можете да изпратите данните ръчно чрез следния формуляр.'; +$lang['autosubmitError'] = 'Последното автоматично изпращане се провали, поради следната грешка:'; +$lang['lastSent'] = 'Данните са изпратени'; diff --git a/lib/plugins/popularity/lang/bg/submitted.txt b/lib/plugins/popularity/lang/bg/submitted.txt index 1e95f6ffd..3ecd24f96 100644 --- a/lib/plugins/popularity/lang/bg/submitted.txt +++ b/lib/plugins/popularity/lang/bg/submitted.txt @@ -1,3 +1,3 @@ ====== Обратна връзка ====== -Данните бяха изпратени успешно. \ No newline at end of file +Данните са изпратени успешно. \ No newline at end of file diff --git a/lib/plugins/revert/lang/bg/intro.txt b/lib/plugins/revert/lang/bg/intro.txt index ab7308d6d..791c96857 100644 --- a/lib/plugins/revert/lang/bg/intro.txt +++ b/lib/plugins/revert/lang/bg/intro.txt @@ -1,4 +1,4 @@ ====== Възстановяване ====== -Тази страница помага при автоматичното възстановяване от спам-атака. За да намерите списък със спамнати страници, въведете текст за търсене(пр. спам препратка), след това потвърдете, че намерените страници са наистина спам и възстановете редакциите. +Страницата помага за автоматично възстановяване след SPAM атака. За да намерите списък със спамнати страници, въведете текст за търсене (напр. линк от SPAM съобщението), след това потвърдете, че намерените страници са наистина SPAM и възстановете старите версии. diff --git a/lib/plugins/revert/lang/bg/lang.php b/lib/plugins/revert/lang/bg/lang.php index 05525c535..0819de01a 100644 --- a/lib/plugins/revert/lang/bg/lang.php +++ b/lib/plugins/revert/lang/bg/lang.php @@ -3,14 +3,14 @@ * bulgarian language file * @author Nikolay Vladimirov * @author Viktor Usunov - * @author Kiril Velikov neohidra@gmail.com + * @author Kiril */ $lang['menu'] = 'Възстановяване'; -$lang['filter'] = 'Търсене на спамната страници'; -$lang['revert'] = 'Избрани страници за възстановяване'; -$lang['reverted'] = '%s върнат до версия %s'; -$lang['removed'] = '%s премахнат'; +$lang['filter'] = 'Търсене на спамнати страници'; +$lang['revert'] = 'Възстанови избраните страници'; +$lang['reverted'] = '%s върната до версия %s'; +$lang['removed'] = '%s премахната'; $lang['revstart'] = 'Процесът на възстановяване започна. Това може да отнеме много време. Ако скриптът се просрочи преди да завърши, трябва да възстановявате на по-малки парчета.'; $lang['revstop'] = 'Процесът на възстановяване завърши успешно.'; -$lang['note1'] = 'Забележка: за търсенето имат значение малки/големи букви'; -$lang['note2'] = 'Забележка: страницата ще бъде възвърната без да съдържа спам терминът %s.'; +$lang['note1'] = 'Бележка: при търсенето се различават малки от големи букви'; +$lang['note2'] = 'Бележка: страницата ще бъде върната към стара версия без SPAM терминa %s.'; diff --git a/lib/plugins/usermanager/lang/bg/lang.php b/lib/plugins/usermanager/lang/bg/lang.php index b229ce29e..909c1e8fe 100644 --- a/lib/plugins/usermanager/lang/bg/lang.php +++ b/lib/plugins/usermanager/lang/bg/lang.php @@ -4,12 +4,12 @@ * * @author Nikolay Vladimirov * @author Viktor Usunov - * @author Kiril Velikov neohidra@gmail.com + * @author Kiril */ -$lang['menu'] = 'Управление на потребителите'; -$lang['noauth'] = '(идентифицирането на потребителите е недостъпно)'; -$lang['nosupport'] = '(не се поддържа управление на потребители)'; -$lang['badauth'] = 'невалиден механизъм при идентификация'; +$lang['menu'] = 'Диспечер на потребителите'; +$lang['noauth'] = '(удостоверяването на потребители не е налично)'; +$lang['nosupport'] = '(управлението на потребители не се поддържа)'; +$lang['badauth'] = 'невалиден механизъм за удостоверяване'; $lang['user_id'] = 'Потребител'; $lang['user_pass'] = 'Парола'; $lang['user_name'] = 'Истинско име'; @@ -17,33 +17,33 @@ $lang['user_mail'] = 'Електронна поща'; $lang['user_groups'] = 'Групи'; $lang['field'] = 'Поле'; $lang['value'] = 'Стойност'; -$lang['add'] = 'Добавяне'; -$lang['delete'] = 'Изтриване'; -$lang['delete_selected'] = 'Изтриване на избраните'; -$lang['edit'] = 'Редактиране'; +$lang['add'] = 'Добави'; +$lang['delete'] = 'Изтрий'; +$lang['delete_selected'] = 'Изтрий избраните'; +$lang['edit'] = 'Редактирай'; $lang['edit_prompt'] = 'Редактиране на потребителя'; -$lang['modify'] = 'Запис на промените'; +$lang['modify'] = 'Запиши промените'; $lang['search'] = 'Търсене'; -$lang['search_prompt'] = 'Търсене'; +$lang['search_prompt'] = 'Търси'; $lang['clear'] = 'Обновяване на търсенето'; $lang['filter'] = 'Филтър'; -$lang['summary'] = 'Показване на потребители %1$d-%2$d от %3$d намерени. %4$d потребители общо.'; -$lang['nonefound'] = 'Няма намерени потребители. Общо %d потребители.'; -$lang['delete_ok'] = '%d потребители изтрити'; -$lang['delete_fail'] = '%d не бяха изтрити'; -$lang['update_ok'] = 'Обновяването на потребителя бе успешно'; -$lang['update_fail'] = 'Обновяването на потребителя бе неуспешно'; -$lang['update_exists'] = 'Смяната на потребителското име бе невъзможна, оказаното потребителско име (%s) вече съществува (всякакви други промени ще бъдат приложени).'; -$lang['start'] = 'първи'; +$lang['summary'] = 'Показване на потребители %1$d-%2$d от %3$d намерени. Общо %4$d потребителя.'; +$lang['nonefound'] = 'Не са намерени потребители. Общо %d потребителя.'; +$lang['delete_ok'] = '%d изтрити потребителя'; +$lang['delete_fail'] = 'изтриването на %d се провали.'; +$lang['update_ok'] = 'Обновяването на потребителя е успешно'; +$lang['update_fail'] = 'Обновяването на потребителя се провали'; +$lang['update_exists'] = 'Смяната на потребителското име се провали, въведеното потребителско име (%s) вече съществува (всички други промени ще бъдат приложени).'; +$lang['start'] = 'начало'; $lang['prev'] = 'назад'; $lang['next'] = 'напред'; -$lang['last'] = 'последен'; -$lang['edit_usermissing'] = 'Избраният потребител не бе намерен, оказаното потребителско име може да е изтрито или променено другаде.'; +$lang['last'] = 'край'; +$lang['edit_usermissing'] = 'Избраният потребител не е намерен, въведеното потребителско име може да е изтрито или променено другаде.'; $lang['user_notify'] = 'Уведомяване на потребителя'; $lang['note_notify'] = 'Ел. писмо се изпраща само ако бъде променена паролата на потребителя.'; $lang['note_group'] = 'Новите потребители биват добавяни към стандартната групата (%s) ако не е посочена друга.'; $lang['note_pass'] = 'Паролата ще бъде генерирана автоматично, ако оставите полето празно и функцията за уведомяване на потребителя е включена.'; -$lang['add_ok'] = 'Добавянето на потребителя бе успешно'; -$lang['add_fail'] = 'Добавянето на потребителя бе неуспешно'; +$lang['add_ok'] = 'Добавянето на потребителя е успешно'; +$lang['add_fail'] = 'Добавянето на потребителя се провали'; $lang['notify_ok'] = 'Осведомително е-писмо бе изпратено'; $lang['notify_fail'] = 'Пращането на осведомително е-писмо е невъзможно'; -- cgit v1.2.3 From b00bd361a6fb93d2ef2433f18f3f238a7498c041 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Feb 2011 02:14:05 -0500 Subject: Indexer::lookupKey callback receives value reference as first arg --- inc/indexer.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index b6a586985..0e0340d40 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -422,7 +422,7 @@ class Doku_Indexer { * * The returned array will have the original tokens as key. The values * in the returned list is an array with the page names as keys and the - * number of times that token appeas on the page as value. + * number of times that token appears on the page as value. * * @param arrayref $tokens list of words to search for * @return array list of page names with usage counts @@ -468,16 +468,18 @@ class Doku_Indexer { * * The metadata values are compared as case-sensitive strings. Pass a * callback function that returns true or false to use a different - * comparison function + * comparison function. The function will be called with the $value being + * searched for as the first argument, and the word in the index as the + * second argument. * * @param string $key name of the metadata key to look for * @param string $value search term to look for * @param callback $func comparison function - * @return array lists with page names, keys are query values if $key is array + * @return array lists with page names, keys are query values if $value is array * @author Tom N Harris * @author Michael Hamann */ - public function lookupKey($key, $value, $func=null) { + public function lookupKey($key, &$value, $func=null) { if (!is_array($value)) $value_array = array($value); else @@ -496,9 +498,9 @@ class Doku_Indexer { } if (!is_null($func)) { - foreach ($value_array as $val) { + foreach ($value_array as &$val) { foreach ($words as $i => $word) { - if (call_user_func_array($func, array($word, $val))) + if (call_user_func_array($func, array(&$val, $word))) $value_ids[$i][] = $val; } } -- cgit v1.2.3 From 0604da3403f907227d3dfe13e6e58d2e78d0c855 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Feb 2011 02:31:20 -0500 Subject: Removing a page from the index deletes related metadata. Cache key names in index. --- inc/indexer.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/inc/indexer.php b/inc/indexer.php index 0e0340d40..1809b1c8f 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -258,6 +258,7 @@ class Doku_Indexer { foreach ($key as $name => $values) { $metaname = idx_cleanName($name); + $this->_addIndexKey('metadata', '', $metaname); $metaidx = $this->_getIndex($metaname, '_i'); $metawords = $this->_getIndex($metaname, '_w'); $addwords = false; @@ -365,8 +366,17 @@ class Doku_Indexer { return false; } - // XXX TODO: delete meta keys $this->_saveIndexKey('title', '', $pid, ""); + $keyidx = $this->_getIndex('metadata', ''); + foreach ($keyidx as $metaname) { + $val_idx = explode(':', $this->_getIndexKey($metaname.'_p', '', $pid)); + $meta_idx = $this->_getIndex($metaname.'_i', ''); + foreach ($val_idx as $id) { + $meta_idx[$id] = $this->_updateTuple($meta_idx[$id], $pid, 0); + } + $this->_saveIndex($metaname.'_i', '', $meta_idx); + $this->_saveIndexKey($metaname.'_p', '', $pid, ''); + } $this->_unlock(); return true; -- cgit v1.2.3 From d0d6fe1be56ef474d844b3556af7ba2a5961d798 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Feb 2011 02:53:20 -0500 Subject: Indexer version tag should include plugin names --- inc/indexer.php | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 1809b1c8f..bcda2a9b9 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -50,19 +50,33 @@ define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')'); * Version of the indexer taking into consideration the external tokenizer. * The indexer is only compatible with data written by the same version. * + * Triggers INDEXER_VERSION_GET + * Plugins that modify what gets indexed should hook this event and + * add their version info to the event data like so: + * $data[$plugin_name] = $plugin_version; + * * @author Tom N Harris * @author Michael Hamann */ function idx_get_version(){ - global $conf; - if($conf['external_tokenizer']) - $version = INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); - else - $version = INDEXER_VERSION; - - $data = array($version); - trigger_event('INDEXER_VERSION_GET', $data, null, false); - return implode('+', $data); + static $indexer_version = null; + if ($indexer_version == null) { + global $conf; + if($conf['external_tokenizer']) + $version = INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); + else + $version = INDEXER_VERSION; + + // DokuWiki version is included for the convenience of plugins + $data = array('dokuwiki'=>$version); + trigger_event('INDEXER_VERSION_GET', $data, null, false); + unset($data['dokuwiki']); // this needs to be first + ksort($data); + foreach ($data as $plugin=>$vers) + $version .= '+'.$plugin.'='.$vers; + $indexer_version = $version; + } + return $indexer_version; } /** -- cgit v1.2.3 From 175193d28ead34dd3a45395407813c080f1b2f25 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Feb 2011 03:38:22 -0500 Subject: Implement histogram method of indexer --- inc/indexer.php | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/inc/indexer.php b/inc/indexer.php index bcda2a9b9..c28f24f75 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -712,6 +712,54 @@ class Doku_Indexer { * @author Tom N Harris */ public function histogram($min=1, $max=0, $key=null) { + if ($min < 1) + $min = 1; + if ($max < $min) + $max = 0; + + $result = array(); + + if ($key == 'title') { + $index = $this->_getIndex('title', ''); + $index = array_count_values($index); + foreach ($index as $val => $cnt) { + if ($cnt >= $min && (!$max || $cnt <= $max)) + $result[$val] = $cnt; + } + } + elseif (!is_null($key)) { + $metaname = idx_cleanName($key); + $index = $this->_getIndex($metaname.'_i', ''); + $val_idx = array(); + foreach ($index as $wid => $line) { + $freq = $this->_countTuples($line); + if ($freq >= $min && (!$max || $freq <= $max)) + $val_idx[$wid] = $freq; + } + if (!empty($val_idx)) { + $words = $this->_getIndex($metaname.'_w', ''); + foreach ($val_idx as $wid => $freq) + $result[$words[$wid]] = $freq; + } + } + else { + $lengths = idx_listIndexLengths(); + foreach ($lengths as $length) { + $index = $this->_getIndex('i', $length); + $words = null; + foreach ($index as $wid => $line) { + $freq = $this->_countTuples($line); + if ($freq >= $min && (!$max || $freq <= $max)) { + if ($words === null) + $words = $this->_getIndex('w', $length); + $result[$words[$wid]] = $freq; + } + } + } + } + + arsort($result); + return $result; } /** @@ -1005,6 +1053,22 @@ class Doku_Indexer { } return $result; } + + /** + * Sum the counts in a list of tuples. + * + * @author Tom N Harris + */ + private function _countTuples($line) { + $freq = 0; + $parts = explode(':', $line); + foreach ($parts as $tuple) { + if ($tuple == '') continue; + list($pid, $cnt) = explode('*', $tuple); + $freq += (int)$cnt; + } + return $freq; + } } /** -- cgit v1.2.3 From 3a48618a538412994ec244d5a9fde5c4a6161d10 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Tue, 22 Feb 2011 23:04:53 +0000 Subject: improved actionOK and its use --- inc/auth.php | 13 +++---------- inc/confutils.php | 21 ++++++++++++++------- inc/template.php | 12 ++++-------- 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/inc/auth.php b/inc/auth.php index 7449fd635..164ad3df9 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -686,9 +686,8 @@ function register(){ global $conf; global $auth; - if (!$auth) return false; if(!$_POST['save']) return false; - if(!$auth->canDo('addUser')) return false; + if(!actionOK('register')) return false; //clean username $_POST['login'] = trim($auth->cleanUser($_POST['login'])); @@ -764,12 +763,10 @@ function updateprofile() { global $lang; global $auth; - if (!$auth) return false; if(empty($_POST['save'])) return false; if(!checkSecurityToken()) return false; - // should not be able to get here without Profile being possible... - if(!$auth->canDo('Profile')) { + if(!actionOK('profile')) { msg($lang['profna'],-1); return false; } @@ -840,11 +837,7 @@ function act_resendpwd(){ global $conf; global $auth; - if(!actionOK('resendpwd')) return false; - if (!$auth) return false; - - // should not be able to get here without modPass being possible... - if(!$auth->canDo('modPass')) { + if(!actionOK('resendpwd')) { msg($lang['resendna'],-1); return false; } diff --git a/inc/confutils.php b/inc/confutils.php index 26ed4f087..b2d25fb65 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -241,17 +241,24 @@ function actionOK($action){ // prepare disabled actions array and handle legacy options $disabled = explode(',',$conf['disableactions']); $disabled = array_map('trim',$disabled); - if(isset($conf['openregister']) && !$conf['openregister']) $disabled[] = 'register'; - if(isset($conf['resendpasswd']) && !$conf['resendpasswd']) $disabled[] = 'resendpwd'; - if(isset($conf['subscribers']) && !$conf['subscribers']) { - $disabled[] = 'subscribe'; - } - if (is_null($auth) || !$auth->canDo('addUser')) { + if(!empty($conf['openregister']) || is_null($auth) || !$auth->canDo('addUser')) { $disabled[] = 'register'; } - if (is_null($auth) || !$auth->canDo('modPass')) { + if(!empty($conf['resendpasswd']) || is_null($auth) || !$auth->canDo('modPass')) { $disabled[] = 'resendpwd'; } + if(!empty($conf['subscribers']) || is_null($auth)) { + $disabled[] = 'subscribe'; + } + if (is_null($auth) || !$auth->canDo('Profile')) { + $disabled[] = 'profile'; + } + if (is_null($auth)) { + $disabled[] = 'login'; + } + if (is_null($auth) || !$auth->canDo('logout')) { + $disabled[] = 'logout'; + } $disabled = array_unique($disabled); } diff --git a/inc/template.php b/inc/template.php index b873d818f..d29e3e779 100644 --- a/inc/template.php +++ b/inc/template.php @@ -581,12 +581,9 @@ function tpl_get_action($type) { $accesskey = 'b'; break; case 'login': - if(!$conf['useacl'] || !$auth){ - return false; - } $params['sectok'] = getSecurityToken(); if(isset($_SERVER['REMOTE_USER'])){ - if (!$auth->canDo('logout')) { + if (!actionOK('logout')) { return false; } $params['do'] = 'logout'; @@ -619,20 +616,19 @@ function tpl_get_action($type) { $type = 'subscribe'; $params['do'] = 'subscribe'; case 'subscribe': - if(!$conf['useacl'] || !$auth || !$conf['subscribers'] || !$_SERVER['REMOTE_USER']){ + if(!$_SERVER['REMOTE_USER']){ return false; } break; case 'backlink': break; case 'profile': - if(!$conf['useacl'] || !$auth || !isset($_SERVER['REMOTE_USER']) || - !$auth->canDo('Profile')){ + if(!isset($_SERVER['REMOTE_USER'])){ return false; } break; case 'subscribens': - // Superseeded by subscribe/subscription + // Superseded by subscribe/subscription return ''; break; default: -- cgit v1.2.3 From bd07158f0f2569ae470f980dd49d69b7f1fd2c49 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Tue, 22 Feb 2011 23:11:13 +0000 Subject: deleted redundant line --- inc/actions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/inc/actions.php b/inc/actions.php index 016af4aea..321d928b3 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -244,7 +244,6 @@ function act_permcheck($act){ $permneed = AUTH_CREATE; } }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; @@ -610,7 +609,7 @@ function act_sitemap($act) { print "Sitemap generation is disabled."; exit; } - + $sitemap = Sitemapper::getFilePath(); if(strrchr($sitemap, '.') === '.gz'){ $mime = 'application/x-gzip'; -- cgit v1.2.3 From 5981eb09ea0468a670c1cdb238962bf54180c599 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Feb 2011 23:02:46 -0500 Subject: Fix variable name type in indexer --- inc/indexer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index c28f24f75..5ab0ec002 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -120,8 +120,8 @@ class Doku_Indexer { return "locked"; // load known documents - $page_idx = $this->_addIndexKey('page', '', $page); - if ($page_idx === false) { + $pid = $this->_addIndexKey('page', '', $page); + if ($pid === false) { $this->_unlock(); return false; } @@ -348,8 +348,8 @@ class Doku_Indexer { return "locked"; // load known documents - $page_idx = $this->_getIndexKey('page', '', $page); - if ($page_idx === false) { + $pid = $this->_getIndexKey('page', '', $page); + if ($pid === false) { $this->_unlock(); return false; } -- cgit v1.2.3 From 287bc2877f03f25914816a266c305c6cf6c8c772 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 23 Feb 2011 14:32:32 -0500 Subject: Increase version tag for new indexer --- inc/indexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/indexer.php b/inc/indexer.php index 5ab0ec002..2e36b6ed7 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -10,7 +10,7 @@ if(!defined('DOKU_INC')) die('meh.'); // Version tag used to force rebuild on upgrade -define('INDEXER_VERSION', 3); +define('INDEXER_VERSION', 4); // set the minimum token length to use in the index (note, this doesn't apply to numeric tokens) if (!defined('IDX_MINWORDLENGTH')) define('IDX_MINWORDLENGTH',2); -- cgit v1.2.3 From b8c040db1fdc0eee80963e57d95a15fd3813912d Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Wed, 23 Feb 2011 15:01:10 -0500 Subject: Add minimum length option to index histogram --- inc/indexer.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 2e36b6ed7..6b21797af 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -707,11 +707,12 @@ class Doku_Indexer { * * @param int $min bottom frequency threshold * @param int $max upper frequency limit. No limit if $max<$min + * @param int $length minimum length of words to count * @param string $key metadata key to list. Uses the fulltext index if not given * @return array list of words as the keys and frequency as values * @author Tom N Harris */ - public function histogram($min=1, $max=0, $key=null) { + public function histogram($min=1, $max=0, $minlen=3, $key=null) { if ($min < 1) $min = 1; if ($max < $min) @@ -723,7 +724,7 @@ class Doku_Indexer { $index = $this->_getIndex('title', ''); $index = array_count_values($index); foreach ($index as $val => $cnt) { - if ($cnt >= $min && (!$max || $cnt <= $max)) + if ($cnt >= $min && (!$max || $cnt <= $max) && strlen($val) >= $minlen) $result[$val] = $cnt; } } @@ -733,7 +734,7 @@ class Doku_Indexer { $val_idx = array(); foreach ($index as $wid => $line) { $freq = $this->_countTuples($line); - if ($freq >= $min && (!$max || $freq <= $max)) + if ($freq >= $min && (!$max || $freq <= $max) && strlen($val) >= $minlen) $val_idx[$wid] = $freq; } if (!empty($val_idx)) { @@ -745,6 +746,7 @@ class Doku_Indexer { else { $lengths = idx_listIndexLengths(); foreach ($lengths as $length) { + if ($length < $minlen) continue; $index = $this->_getIndex('i', $length); $words = null; foreach ($index as $wid => $line) { -- cgit v1.2.3 From 7233c152c0a107c0f12dbc09f5493022b264dddb Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Thu, 24 Feb 2011 23:53:51 +0100 Subject: Fix pass by reference error, always return an array in lookupKey() --- inc/fulltext.php | 3 ++- inc/indexer.php | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/fulltext.php b/inc/fulltext.php index 891558f96..8155325ee 100644 --- a/inc/fulltext.php +++ b/inc/fulltext.php @@ -234,7 +234,8 @@ function _ft_pageLookup(&$data){ } } if ($in_title) { - foreach ($Indexer->lookupKey('title', "*$id*") as $p_id) { + $wildcard_id = "*$id*"; + foreach ($Indexer->lookupKey('title', $wildcard_id) as $p_id) { if (!isset($pages[$p_id])) $pages[$p_id] = p_get_first_heading($p_id, false); } diff --git a/inc/indexer.php b/inc/indexer.php index 5aa321d46..eaab7736a 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -566,7 +566,12 @@ class Doku_Indexer { unset($words); // free the used memory + // initialize the result so it won't be null $result = array(); + foreach ($value_array as $val) { + $result[$val] = array(); + } + $page_idx = $this->_getIndex('page', ''); // Special handling for titles -- cgit v1.2.3 From 675bf41fb9fe7d43646c3ff2de5a1e701818ed2c Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Fri, 25 Feb 2011 17:56:21 -0500 Subject: Reduce memory footprint of tokenizer; make returned arrays use contiguous keys --- inc/indexer.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index eaab7736a..6913dd4e3 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -439,14 +439,14 @@ class Doku_Indexer { $text = utf8_stripspecials($text, ' ', '\._\-:'.$wc); $wordlist = explode(' ', $text); - foreach ($wordlist as $word) { + foreach ($wordlist as $i => &$word) { $word = (preg_match('/[^0-9A-Za-z]/u', $word)) ? utf8_strtolower($word) : strtolower($word); - if (!is_numeric($word) && strlen($word) < IDX_MINWORDLENGTH) continue; - if (array_search($word, $stopwords) !== false) continue; - $words[] = $word; + if ((!is_numeric($word) && strlen($word) < IDX_MINWORDLENGTH) + || array_search($word, $stopwords) !== false) + unset($wordlist[$i]); } - return $words; + return array_values($wordlist); } /** @@ -707,7 +707,7 @@ class Doku_Indexer { array_splice($page_idx, count($title_idx)); foreach ($title_idx as $i => $title) if ($title === "") unset($page_idx[$i]); - return $page_idx; + return array_values($page_idx); } $pages = array(); @@ -1068,7 +1068,7 @@ class Doku_Indexer { if ($line == '') return $result; $parts = explode(':', $line); foreach ($parts as $tuple) { - if ($tuple == '') continue; + if ($tuple === '') continue; list($key, $cnt) = explode('*', $tuple); if (!$cnt) continue; $key = $keys[$key]; @@ -1087,7 +1087,7 @@ class Doku_Indexer { $freq = 0; $parts = explode(':', $line); foreach ($parts as $tuple) { - if ($tuple == '') continue; + if ($tuple === '') continue; list($pid, $cnt) = explode('*', $tuple); $freq += (int)$cnt; } -- cgit v1.2.3 From 1538718db8939adf4ce057f2b7fb6d2eea309757 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Fri, 25 Feb 2011 18:23:47 -0500 Subject: Restrict metadata values in indexer to string; skip unnecessary test --- inc/indexer.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 6913dd4e3..fc7813ba1 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -505,10 +505,11 @@ class Doku_Indexer { * callback function that returns true or false to use a different * comparison function. The function will be called with the $value being * searched for as the first argument, and the word in the index as the - * second argument. + * second argument. The function preg_match can be used directly if the + * values are regexes. * * @param string $key name of the metadata key to look for - * @param string $value search term to look for + * @param string $value search term to look for, must be a string or array of strings * @param callback $func comparison function * @return array lists with page names, keys are query values if $value is array * @author Tom N Harris @@ -533,9 +534,9 @@ class Doku_Indexer { } if (!is_null($func)) { - foreach ($value_array as &$val) { + foreach ($value_array as $val) { foreach ($words as $i => $word) { - if (call_user_func_array($func, array(&$val, $word))) + if (call_user_func_array($func, array($val, $word))) $value_ids[$i][] = $val; } } @@ -591,10 +592,7 @@ class Doku_Indexer { // is an array with page_id => 1, page2_id => 1 etc. so take the keys only $pages = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); foreach ($val_list as $val) { - if (!isset($result[$val])) - $result[$val] = $pages; - else - $result[$val] = array_merge($result[$val], $pages); + $result[$val] = array_merge($result[$val], $pages); } } } -- cgit v1.2.3 From aeb1fea310b2067fbd3e259b9a2822783a2b7221 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 26 Feb 2011 14:48:33 +0000 Subject: added missing user rtlstyle.css to config_cascade --- inc/config_cascade.php | 1 + 1 file changed, 1 insertion(+) diff --git a/inc/config_cascade.php b/inc/config_cascade.php index 32001be81..b016de8a0 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -50,6 +50,7 @@ $config_cascade = array_merge( ), 'userstyle' => array( 'default' => DOKU_CONF.'userstyle.css', + 'rtl' => DOKU_CONF.'rtlstyle.css', 'print' => DOKU_CONF.'printstyle.css', 'feed' => DOKU_CONF.'feedstyle.css', 'all' => DOKU_CONF.'allstyle.css', -- cgit v1.2.3 From 318cd03ee91d3a5344bab636a77c3cb19c32c5b7 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 26 Feb 2011 21:22:14 +0000 Subject: improved css.php and core styles * code cleanup in lib/exe/css.php * renamed 'default' userstyle to 'screen' in config_cascade * splitted core lib/styles/style.css up into all.css, print.css and screen.css --- inc/config_cascade.php | 2 +- lib/exe/css.php | 61 ++++++++++++------------ lib/styles/all.css | 48 +++++++++++++++++++ lib/styles/print.css | 24 ++++++++++ lib/styles/screen.css | 80 +++++++++++++++++++++++++++++++ lib/styles/style.css | 125 ------------------------------------------------- 6 files changed, 182 insertions(+), 158 deletions(-) create mode 100644 lib/styles/all.css create mode 100644 lib/styles/print.css create mode 100644 lib/styles/screen.css delete mode 100644 lib/styles/style.css diff --git a/inc/config_cascade.php b/inc/config_cascade.php index b016de8a0..96cd5d4b5 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -49,7 +49,7 @@ $config_cascade = array_merge( 'local' => array(DOKU_CONF.'wordblock.local.conf'), ), 'userstyle' => array( - 'default' => DOKU_CONF.'userstyle.css', + 'screen' => DOKU_CONF.'userstyle.css', 'rtl' => DOKU_CONF.'rtlstyle.css', 'print' => DOKU_CONF.'printstyle.css', 'feed' => DOKU_CONF.'feedstyle.css', diff --git a/lib/exe/css.php b/lib/exe/css.php index 4db81de0b..98a34860e 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -30,10 +30,10 @@ function css_out(){ global $lang; global $config_cascade; - $style = ''; + $mediatype = 'screen'; if (isset($_REQUEST['s']) && in_array($_REQUEST['s'], array('all', 'print', 'feed'))) { - $style = $_REQUEST['s']; + $mediatype = $_REQUEST['s']; } $tpl = trim(preg_replace('/[^\w-]+/','',$_REQUEST['t'])); @@ -46,7 +46,7 @@ function css_out(){ } // The generated script depends on some dynamic options - $cache = getCacheName('styles'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].DOKU_BASE.$tplinc.$style,'.css'); + $cache = getCacheName('styles'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].DOKU_BASE.$tplinc.$mediatype,'.css'); // load template styles $tplstyles = array(); @@ -60,27 +60,29 @@ function css_out(){ // Array of needed files and their web locations, the latter ones // are needed to fix relative paths in the stylesheets $files = array(); - //if (isset($tplstyles['all'])) $files = array_merge($files, $tplstyles['all']); - if(!empty($style)){ - $files[DOKU_INC.'lib/styles/'.$style.'.css'] = DOKU_BASE.'lib/styles/'; - // load plugin, template, user styles - $files = array_merge($files, css_pluginstyles($style)); - if (isset($tplstyles[$style])) $files = array_merge($files, $tplstyles[$style]); - - if(isset($config_cascade['userstyle'][$style])){ - $files[$config_cascade['userstyle'][$style]] = DOKU_BASE; - } - }else{ - $files[DOKU_INC.'lib/styles/style.css'] = DOKU_BASE.'lib/styles/'; - // load plugin, template, user styles - $files = array_merge($files, css_pluginstyles('screen')); - if (isset($tplstyles['screen'])) $files = array_merge($files, $tplstyles['screen']); + // load core styles + $files[DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/'; + // load plugin styles + $files = array_merge($files, css_pluginstyles($mediatype)); + // load template styles + if (isset($tplstyles[$mediatype])) { + $files = array_merge($files, $tplstyles[$mediatype]); + } + // if old 'default' userstyle setting exists, make it 'screen' userstyle for backwards compatibility + if (isset($config_cascade['userstyle']['default'])) { + $config_cascade['userstyle']['screen'] = $config_cascade['userstyle']['default']; + } + // load user styles + if(isset($config_cascade['userstyle'][$mediatype])){ + $files[$config_cascade['userstyle'][$mediatype]] = DOKU_BASE; + } + // load rtl styles + // @todo: this currently adds the rtl styles only to the 'screen' media type + // but 'print' and 'all' should also be supported + if ($mediatype=='screen') { if($lang['direction'] == 'rtl'){ if (isset($tplstyles['rtl'])) $files = array_merge($files, $tplstyles['rtl']); } - if(isset($config_cascade['userstyle']['default'])){ - $files[$config_cascade['userstyle']['default']] = DOKU_BASE; - } } // check cache age & handle conditional request @@ -122,7 +124,7 @@ function css_out(){ // apply style replacements $css = css_applystyle($css,$tplinc); - + // place all @import statements at the top of the file $css = css_moveimports($css); @@ -278,20 +280,15 @@ function css_loadfile($file,$location=''){ * * @author Andreas Gohr */ -function css_pluginstyles($mode='screen'){ +function css_pluginstyles($mediatype='screen'){ global $lang; $list = array(); $plugins = plugin_list(); foreach ($plugins as $p){ - if($mode == 'all'){ - $list[DOKU_PLUGIN."$p/all.css"] = DOKU_BASE."lib/plugins/$p/"; - }elseif($mode == 'print'){ - $list[DOKU_PLUGIN."$p/print.css"] = DOKU_BASE."lib/plugins/$p/"; - }elseif($mode == 'feed'){ - $list[DOKU_PLUGIN."$p/feed.css"] = DOKU_BASE."lib/plugins/$p/"; - }else{ + $list[DOKU_PLUGIN."$p/$mediatype.css"] = DOKU_BASE."lib/plugins/$p/"; + // alternative for screen.css + if ($mediatype=='screen') { $list[DOKU_PLUGIN."$p/style.css"] = DOKU_BASE."lib/plugins/$p/"; - $list[DOKU_PLUGIN."$p/screen.css"] = DOKU_BASE."lib/plugins/$p/"; } if($lang['direction'] == 'rtl'){ $list[DOKU_PLUGIN."$p/rtl.css"] = DOKU_BASE."lib/plugins/$p/"; @@ -302,7 +299,7 @@ function css_pluginstyles($mode='screen'){ /** * Move all @import statements in a combined stylesheet to the top so they - * aren't ignored by the browser. + * aren't ignored by the browser. * * @author Gabriel Birke */ diff --git a/lib/styles/all.css b/lib/styles/all.css new file mode 100644 index 000000000..dd9f46462 --- /dev/null +++ b/lib/styles/all.css @@ -0,0 +1,48 @@ +/** + * Basic styles. These styles are needed for basic DokuWiki functions + * regardless of the used template. Templates can override them of course + */ + +div.clearer { + clear: both; + line-height: 0; + height: 0; + overflow: hidden; +} + +div.no { + display: inline; + margin: 0; + padding: 0; +} + +.hidden { + display: none; +} + +/* image alignment */ +.medialeft { + float: left; +} +.mediaright { + float: right; +} +.mediacenter { + display: block; + margin-left: auto; + margin-right: auto; +} + +/* table cell alignment */ +.leftalign { text-align: left; } +.centeralign { text-align: center; } +.rightalign { text-align: right; } + +/* underline */ +em.u { + font-style: normal; + text-decoration: underline; +} +em em.u { + font-style: italic; +} diff --git a/lib/styles/print.css b/lib/styles/print.css new file mode 100644 index 000000000..16543473a --- /dev/null +++ b/lib/styles/print.css @@ -0,0 +1,24 @@ +/** + * Basic styles. These styles are needed for basic DokuWiki functions + * regardless of the used template. Templates can override them of course + */ + +/* messages with msg() */ +div.error, +div.info, +div.success, +div.notify { + display: none; +} + +/* section edit button */ +.secedit { + display: none; +} + +/* modal windows */ +.JSpopup, +#link__wiz, +#media__popup { + display: none; +} diff --git a/lib/styles/screen.css b/lib/styles/screen.css new file mode 100644 index 000000000..0a6a4f295 --- /dev/null +++ b/lib/styles/screen.css @@ -0,0 +1,80 @@ +/** + * Basic styles. These styles are needed for basic DokuWiki functions + * regardless of the used template. Templates can override them of course + */ + +/* 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-color: #fcc; + background-image: url(../images/error.png); + border-bottom-color: #faa; +} + +div.info { + background-color: #ccf; + background-image: url(../images/info.png); + border-bottom-color: #aaf; +} + +div.success { + background-color: #cfc; + background-image: url(../images/success.png); + border-bottom-color: #afa; +} + +div.notify { + background-color: #ffc; + background-image: url(../images/notify.png); + border-bottom-color: #ffa; +} + +/* modal windows */ +.JSpopup, +#link__wiz, +#media__popup { + position: absolute; + background-color: #fff; + color: #000; + z-index: 20; + overflow: hidden; +} + + +/* syntax highlighting code */ +.code .br0 { color: #66cc66; } +.code .co0 { color: #808080; font-style: italic; } +.code .co1 { color: #808080; font-style: italic; } +.code .co2 { color: #808080; font-style: italic; } +.code .co3 { color: #808080; } +.code .coMULTI { color: #808080; font-style: italic; } +.code .es0 { color: #000099; font-weight: bold; } +.code .kw1 { color: #b1b100; } +.code .kw2 { color: #000000; font-weight: bold; } +.code .kw3 { color: #000066; } +.code .kw4 { color: #993333; } +.code .kw5 { color: #0000ff; } +.code .me1 { color: #006600; } +.code .me2 { color: #006600; } +.code .nu0 { color: #cc66cc; } +.code .re0 { color: #0000ff; } +.code .re1 { color: #0000ff; } +.code .re2 { color: #0000ff; } +.code .re3 { color: #ff3333; font-weight:bold; } +.code .re4 { color: #009999; } +.code .st0 { color: #ff0000; } +.code .sy0 { color: #66cc66; } + diff --git a/lib/styles/style.css b/lib/styles/style.css deleted file mode 100644 index 395f82b78..000000000 --- a/lib/styles/style.css +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Basic styles. These styles are needed for basic DokuWiki functions - * regardless of the used template. Templates can override them of course - */ - -div.clearer { - clear: both; - line-height: 0; - height: 0; - overflow: hidden; -} - -div.no { - display: inline; - margin: 0; - padding: 0; -} - -.hidden { - 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-color: #fcc; - background-image: url(../images/error.png); - border-bottom-color: #faa; -} - -div.info { - background-color: #ccf; - background-image: url(../images/info.png); - border-bottom-color: #aaf; -} - -div.success { - background-color: #cfc; - background-image: url(../images/success.png); - border-bottom-color: #afa; -} - -div.notify { - background-color: #ffc; - background-image: url(../images/notify.png); - border-bottom-color: #ffa; -} - - -/* image alignment */ -.medialeft { - float: left; -} -.mediaright { - float: right; -} -.mediacenter { - display: block; - margin-left: auto; - margin-right: auto; -} - -/* table cell alignment */ -.leftalign { text-align: left; } -.centeralign { text-align: center; } -.rightalign { text-align: right; } - -/* underline */ -em.u { - font-style: normal; - text-decoration: underline; -} -em em.u { - font-style: italic; -} - -/* modal windows */ -.JSpopup, -#link__wiz, -#media__popup { - position: absolute; - background-color: #fff; - color: #000; - z-index: 20; - overflow: hidden; -} - - -/* syntax highlighting code */ -.code .br0 { color: #66cc66; } -.code .co0 { color: #808080; font-style: italic; } -.code .co1 { color: #808080; font-style: italic; } -.code .co2 { color: #808080; font-style: italic; } -.code .co3 { color: #808080; } -.code .coMULTI { color: #808080; font-style: italic; } -.code .es0 { color: #000099; font-weight: bold; } -.code .kw1 { color: #b1b100; } -.code .kw2 { color: #000000; font-weight: bold; } -.code .kw3 { color: #000066; } -.code .kw4 { color: #993333; } -.code .kw5 { color: #0000ff; } -.code .me1 { color: #006600; } -.code .me2 { color: #006600; } -.code .nu0 { color: #cc66cc; } -.code .re0 { color: #0000ff; } -.code .re1 { color: #0000ff; } -.code .re2 { color: #0000ff; } -.code .re3 { color: #ff3333; font-weight:bold; } -.code .re4 { color: #009999; } -.code .st0 { color: #ff0000; } -.code .sy0 { color: #66cc66; } - -- cgit v1.2.3 From 4e098b31e03d71843366023ea526608ff2377a80 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 26 Feb 2011 21:37:21 +0000 Subject: renamed userstyles In 09edb7113c19b07ca11a79c2b0571f45ed2cc2eb most of the old userstyles were wrongly named. This renames them back to what they were before that change. See also http://www.dokuwiki.org/devel:css#user_styles --- inc/config_cascade.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inc/config_cascade.php b/inc/config_cascade.php index 96cd5d4b5..48ed5a000 100644 --- a/inc/config_cascade.php +++ b/inc/config_cascade.php @@ -50,10 +50,10 @@ $config_cascade = array_merge( ), 'userstyle' => array( 'screen' => DOKU_CONF.'userstyle.css', - 'rtl' => DOKU_CONF.'rtlstyle.css', - 'print' => DOKU_CONF.'printstyle.css', - 'feed' => DOKU_CONF.'feedstyle.css', - 'all' => DOKU_CONF.'allstyle.css', + 'rtl' => DOKU_CONF.'userrtl.css', + 'print' => DOKU_CONF.'userprint.css', + 'feed' => DOKU_CONF.'userfeed.css', + 'all' => DOKU_CONF.'userall.css', ), 'userscript' => array( 'default' => DOKU_CONF.'userscript.js' -- cgit v1.2.3 From 383396f405a7c29f52175fdd71ca5b630533160e Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 27 Feb 2011 10:50:12 +0000 Subject: deleted template print styles which are now in the core styles --- lib/tpl/default/print.css | 47 +++-------------------------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) diff --git a/lib/tpl/default/print.css b/lib/tpl/default/print.css index 15c6dad29..45b60aad2 100644 --- a/lib/tpl/default/print.css +++ b/lib/tpl/default/print.css @@ -33,23 +33,10 @@ div.meta { text-align: right; } - -div.notify, -div.info, -div.success, -div.error, -div.breadcrumbs, -div.secedit { +div.breadcrumbs { display: none; } -div.clearer { - clear: both; - line-height: 0; - height: 0; - overflow: hidden; -} - /* --------------------- Text formating -------------------------------- */ @@ -110,31 +97,15 @@ img.media { margin: 3px; } +/* the styles for media images are already in + lib/styles/all.css, these are additional styles */ img.medialeft { - border: 0; - float: left; margin: 0 1.5em 0 0; } - img.mediaright { - border: 0; - float: right; 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 */ @@ -253,17 +224,5 @@ table.inline td { border: 1px solid #000000; } -.leftalign { - text-align: left; -} - -.centeralign { - text-align: center; -} - -.rightalign { - text-align: right; -} - .toc, .footerinc, .header, .bar, .user { display: none; } -- cgit v1.2.3 From b6d540bdf1d129168ec20fb4c54956edb07c189b Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Sun, 27 Feb 2011 20:36:15 -0500 Subject: Fix wildcard search --- inc/indexer.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index fc7813ba1..270f717b5 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -543,18 +543,18 @@ class Doku_Indexer { } else { foreach ($value_array as $val) { $xval = $val; - $caret = false; - $dollar = false; + $caret = '^'; + $dollar = '$'; // check for wildcards if (substr($xval, 0, 1) == '*') { $xval = substr($xval, 1); - $caret = '^'; + $caret = ''; } if (substr($xval, -1, 1) == '*') { $xval = substr($xval, 0, -1); - $dollar = '$'; + $dollar = ''; } - if ($caret || $dollar) { + if (!$caret || !$dollar) { $re = $caret.preg_quote($xval, '/').$dollar; foreach(array_keys(preg_grep('/'.$re.'/', $words)) as $i) $value_ids[$i][] = $val; @@ -619,27 +619,27 @@ class Doku_Indexer { $tokenwild = array(); foreach ($words as $word) { $result[$word] = array(); - $caret = false; - $dollar = false; + $caret = '^'; + $dollar = '$'; $xword = $word; $wlen = wordlen($word); // check for wildcards if (substr($xword, 0, 1) == '*') { $xword = substr($xword, 1); - $caret = '^'; + $caret = ''; $wlen -= 1; } if (substr($xword, -1, 1) == '*') { $xword = substr($xword, 0, -1); - $dollar = '$'; + $dollar = ''; $wlen -= 1; } - if ($wlen < IDX_MINWORDLENGTH && !$caret && !$dollar && !is_numeric($xword)) + if ($wlen < IDX_MINWORDLENGTH && $caret && $dollar && !is_numeric($xword)) continue; if (!isset($tokens[$xword])) $tokenlength[$wlen][] = $xword; - if ($caret || $dollar) { + if (!$caret || !$dollar) { $re = $caret.preg_quote($xword, '/').$dollar; $tokens[$xword][] = array($word, '/'.$re.'/'); if (!isset($tokenwild[$xword])) -- cgit v1.2.3 From 94eef7c677ed8192fffb32bcc3ae1cb34d5fcb5d Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Wed, 2 Mar 2011 10:14:57 +0000 Subject: FS#2191: fixed syntax error in ar/lang.php --- inc/lang/ar/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/lang/ar/lang.php b/inc/lang/ar/lang.php index 300ec3b9a..cc2de9e8b 100644 --- a/inc/lang/ar/lang.php +++ b/inc/lang/ar/lang.php @@ -45,7 +45,7 @@ $lang['btn_resendpwd'] = 'ارسل كلمة سر جديدة'; $lang['btn_draft'] = 'حرر المسودة'; $lang['btn_recover'] = 'استرجع المسودة'; $lang['btn_draftdel'] = 'احذف المسوّدة'; -$lang['btn_revert'] = 'استعد +$lang['btn_revert'] = 'استعد'; $lang['btn_register'] = 'سجّل'; $lang['loggedinas'] = 'داخل باسم'; $lang['user'] = 'اسم المستخدم'; -- cgit v1.2.3 From 24ea6500cc5285aac7f02df7f535ea10f8f97729 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 4 Mar 2011 20:29:24 +0100 Subject: check manager/admin role earlier for admin plugins FS#2180 --- inc/actions.php | 12 ++++++++++-- inc/template.php | 11 +++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/inc/actions.php b/inc/actions.php index 321d928b3..fa11bb7f1 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -18,6 +18,7 @@ if(!defined('DOKU_INC')) die('meh.'); function act_dispatch(){ global $ACT; global $ID; + global $INFO; global $QUERY; global $lang; global $conf; @@ -134,8 +135,15 @@ function act_dispatch(){ $pluginlist = plugin_list('admin'); if (in_array($_REQUEST['page'], $pluginlist)) { // attempt to load the plugin - if ($plugin =& plugin_load('admin',$_REQUEST['page']) !== null) - $plugin->handle(); + if ($plugin =& plugin_load('admin',$_REQUEST['page']) !== null){ + if($plugin->forAdminOnly() && !$INFO['isadmin']){ + // a manager tried to load a plugin that's for admins only + unset($_REQUEST['page']); + msg('For admins only',-1); + }else{ + $plugin->handle(); + } + } } } } diff --git a/inc/template.php b/inc/template.php index d29e3e779..0f0fb92a0 100644 --- a/inc/template.php +++ b/inc/template.php @@ -209,14 +209,9 @@ function tpl_admin(){ } if ($plugin !== null){ - if($plugin->forAdminOnly() && !$INFO['isadmin']){ - msg('For admins only',-1); - html_admin(); - }else{ - if(!is_array($TOC)) $TOC = $plugin->getTOC(); //if TOC wasn't requested yet - if($INFO['prependTOC']) tpl_toc(); - $plugin->html(); - } + if(!is_array($TOC)) $TOC = $plugin->getTOC(); //if TOC wasn't requested yet + if($INFO['prependTOC']) tpl_toc(); + $plugin->html(); }else{ html_admin(); } -- cgit v1.2.3 From 8d64d42d5876b358dcb69969a859ecb6cbcbf328 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 4 Mar 2011 20:56:43 +0100 Subject: give useful message for broken plugins FS#2068 --- inc/plugin.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/inc/plugin.php b/inc/plugin.php index 628ae39b0..ec94433b6 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -33,7 +33,15 @@ class DokuWiki_Plugin { $parts = explode('_',get_class($this)); $info = DOKU_PLUGIN.'/'.$parts[2].'/plugin.info.txt'; if(@file_exists($info)) return confToHash($info); - trigger_error('getInfo() not implemented in '.get_class($this).' and '.$info.' not found', E_USER_WARNING); + + msg('getInfo() not implemented in '.get_class($this). + ' and '.$info.' not found.
This is a bug in the '. + $parts[2].' plugin and should be reported to the '. + 'plugin author.',-1); + return array( + 'date' => '0000-00-00', + 'name' => $parts[2].' plugin', + ); } // plugin introspection methods -- cgit v1.2.3 From 5e5debec39d4912761954435b4cded9b5b41263a Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 5 Mar 2011 11:31:58 +0000 Subject: deleted obsolete word list conf file for old spellchecker --- conf/words.aspell.dist | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 conf/words.aspell.dist diff --git a/conf/words.aspell.dist b/conf/words.aspell.dist deleted file mode 100644 index a49138fcb..000000000 --- a/conf/words.aspell.dist +++ /dev/null @@ -1,5 +0,0 @@ -personal_ws-1.1 en 4 utf-8 -DokuWiki -Wiki -WikiWiki -Gohr -- cgit v1.2.3 From 33c7f9a3da533668d21db2e26f776bd854ae81fa Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 5 Mar 2011 15:52:36 +0100 Subject: avoid premature output before headers are sent --- lib/tpl/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tpl/index.php b/lib/tpl/index.php index a55081738..20abea20c 100644 --- a/lib/tpl/index.php +++ b/lib/tpl/index.php @@ -8,6 +8,9 @@ * @author Andreas Gohr * @author Anika Henke */ +if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); +if(!define('NOSESSION')) define('NOSESSION',1); +require_once(DOKU_INC.'inc/init.php'); ?> @@ -41,9 +44,6 @@ '; -- cgit v1.2.3 From 24a6c2354089305a4146c7f8802887aa895c2bd3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 5 Mar 2011 16:20:05 +0100 Subject: avoid broken page on bad non-UTF8 highlight string --- inc/html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index 080beb01a..fcfa54b6c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -284,7 +284,8 @@ function html_hilight($html,$phrases){ $regex = join('|',array_map('ft_snippet_re_preprocess', array_map('preg_quote_cb',$phrases))); if ($regex === '') return $html; - $html = preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html); + if (!utf8_check($regex)) return $html; + $html = @preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html); return $html; } -- cgit v1.2.3 From 39d6fd3051102c9f2fb5436c7bcaf44d6068fde8 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 6 Mar 2011 13:17:15 +0100 Subject: Merge the two indexer events and use string keys This merges the INDEXER_PAGE_ADD and INDEXER_METADATA_INDEX events and introduces the new string keys 'page', 'body' and 'metadata' in the event data. All plugins that use INDEXER_PAGE_ADD need to be adjusted to use the key 'page' instead of 0 and 'body' instead of 1. --- inc/indexer.php | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 270f717b5..f0d951230 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -1181,12 +1181,16 @@ function idx_addPage($page, $verbose=false) { } $body = ''; - $data = array($page, $body); + $metadata = array(); + $metadata['title'] = p_get_metadata($page, 'title', false); + if (($references = p_get_metadata($page, 'relation references', false)) !== null) + $metadata['relation_references'] = array_keys($references); + $data = compact('page', 'body', 'metadata'); $evt = new Doku_Event('INDEXER_PAGE_ADD', $data); - if ($evt->advise_before()) $data[1] = $data[1] . " " . rawWiki($page); + if ($evt->advise_before()) $data['body'] = $data['body'] . " " . rawWiki($page); $evt->advise_after(); unset($evt); - list($page,$body) = $data; + extract($data); $Indexer = idx_get_indexer(); $result = $Indexer->addPageWords($page, $body); @@ -1196,22 +1200,11 @@ function idx_addPage($page, $verbose=false) { } if ($result) { - $data = array('page' => $page, 'metadata' => array()); - - $data['metadata']['title'] = p_get_metadata($page, 'title', false); - if (($references = p_get_metadata($page, 'relation references', false)) !== null) - $data['metadata']['relation_references'] = array_keys($references); - - $evt = new Doku_Event('INDEXER_METADATA_INDEX', $data); - if ($evt->advise_before()) { - $result = $Indexer->addMetaKeys($page, $data['metadata']); - if ($result === "locked") { - if ($verbose) print("Indexer: locked".DOKU_LF); - return false; - } + $result = $Indexer->addMetaKeys($page, $metadata); + if ($result === "locked") { + if ($verbose) print("Indexer: locked".DOKU_LF); + return false; } - $evt->advise_after(); - unset($evt); } if ($result) -- cgit v1.2.3 From dea1115b59e771c401882590426074c08fed3a87 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sun, 6 Mar 2011 14:33:50 +0100 Subject: Pass edid to the mediamanager --- lib/exe/mediamanager.php | 2 +- lib/scripts/media.js | 4 +++- lib/scripts/toolbar.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php index 6f2add2be..02fde5a8d 100644 --- a/lib/exe/mediamanager.php +++ b/lib/exe/mediamanager.php @@ -91,7 +91,7 @@ if ($res & DOKU_MEDIA_EMPTY_NS) { // current namespace was removed. redirecting to root ns passing msg along send_redirect(DOKU_URL.'lib/exe/mediamanager.php?msg1='. - rawurlencode($msg)); + rawurlencode($msg).'&edid='.$_REQUEST['edid']); } msg($msg,1); } elseif ($res & DOKU_MEDIA_INUSE) { diff --git a/lib/scripts/media.js b/lib/scripts/media.js index b90f7047b..57f599163 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -536,7 +536,9 @@ var media_manager = { } } } - opener.insertTags('wiki__text','{{'+alignleft+id+opts+alignright+'|','}}',''); + var edid = String.prototype.match.call(document.location, /&edid=([^&]+)/); + edid = edid ? edid[1] : 'wiki__text'; + opener.insertTags(edid,'{{'+alignleft+id+opts+alignright+'|','}}',''); if(!media_manager.keepopen) window.close(); opener.focus(); diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js index 3f967448c..d458960ab 100644 --- a/lib/scripts/toolbar.js +++ b/lib/scripts/toolbar.js @@ -153,7 +153,7 @@ function tb_insert(btn, props, edid) { */ function tb_mediapopup(btn, props, edid) { window.open( - DOKU_BASE+props['url']+encodeURIComponent(NS), + DOKU_BASE+props['url']+encodeURIComponent(NS)+'&edid='+encodeURIComponent(edid), props['name'], props['options']); return false; -- cgit v1.2.3 From ad79cb7c93a655f864c633433e743b03685b5719 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 6 Mar 2011 14:48:58 +0100 Subject: Adjust bin/indexer.php for the new indexer Now the indexer is directly called instead of duplicating a large part of the indexer code. --- bin/indexer.php | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/bin/indexer.php b/bin/indexer.php index 85e990bbe..6ee0a9e8d 100755 --- a/bin/indexer.php +++ b/bin/indexer.php @@ -87,41 +87,15 @@ function _index($id){ global $QUIET; // if not cleared only update changed and new files - if(!$CLEAR){ + if($CLEAR){ $idxtag = metaFN($id,'.indexed'); if(@file_exists($idxtag)){ - if(io_readFile($idxtag) == idx_get_version()){ - $last = @filemtime($idxtag); - if($last > @filemtime(wikiFN($id))) return; - } + @unlink($idxtag); } } _quietecho("$id... "); - $body = ''; - $data = array($id, $body); - $evt = new Doku_Event('INDEXER_PAGE_ADD', $data); - if ($evt->advise_before()) $data[1] = $data[1] . " " . rawWiki($id); - $evt->advise_after(); - unset($evt); - list($id,$body) = $data; - $said = false; - while(true) { - $result = $INDEXER->addPageWords($id, $body); - if ($result == "locked") { - if($said){ - _quietecho("."); - }else{ - _quietecho("Waiting for lockfile (max. 5 min)"); - $said = true; - } - sleep(15); - } else { - break; - } - } - if ($result) - io_saveFile(metaFN($id,'.indexed'), idx_get_version()); + idx_addPage($id, !$QUIET); _quietecho("done.\n"); } -- cgit v1.2.3 From a424180e36bd8d0d4699597c9be6f9985d943911 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Tue, 8 Mar 2011 22:29:21 +0100 Subject: Remove relation_references from the index when it is missing --- inc/indexer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/indexer.php b/inc/indexer.php index f0d951230..7cddb7c54 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -1185,6 +1185,8 @@ function idx_addPage($page, $verbose=false) { $metadata['title'] = p_get_metadata($page, 'title', false); if (($references = p_get_metadata($page, 'relation references', false)) !== null) $metadata['relation_references'] = array_keys($references); + else + $metadata['relation_references'] = array(); $data = compact('page', 'body', 'metadata'); $evt = new Doku_Event('INDEXER_PAGE_ADD', $data); if ($evt->advise_before()) $data['body'] = $data['body'] . " " . rawWiki($page); -- cgit v1.2.3 From 7b4ea0818922673113eb39a2062d802b38492186 Mon Sep 17 00:00:00 2001 From: marklundeberg Date: Tue, 8 Mar 2011 21:44:55 -0800 Subject: Make interwiki links match with every other icon-link: need 1px top and bottom padding or else the icons' top and bottom pixel rows get cut off. --- lib/exe/css.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/exe/css.php b/lib/exe/css.php index 98a34860e..03f900034 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -204,7 +204,7 @@ function css_interwiki(){ // default style echo 'a.interwiki {'; echo ' background: transparent url('.DOKU_BASE.'lib/images/interwiki.png) 0px 1px no-repeat;'; - echo ' padding-left: 16px;'; + echo ' padding: 1px 0px 1px 16px;'; echo '}'; // additional styles when icon available -- cgit v1.2.3 From 6937406a7e057dc250e7dfde389b76324363235b Mon Sep 17 00:00:00 2001 From: Matthias Schulte Date: Mon, 14 Mar 2011 19:02:25 +0100 Subject: de/de-informal: added and updated translations --- inc/lang/de-informal/denied.txt | 2 +- inc/lang/de-informal/lang.php | 7 +++++-- inc/lang/de-informal/resendpwd.txt | 2 +- inc/lang/de-informal/revisions.txt | 2 +- inc/lang/de/denied.txt | 2 +- inc/lang/de/lang.php | 25 ++++++++++++++----------- inc/lang/de/resendpwd.txt | 2 +- inc/lang/de/revisions.txt | 2 +- 8 files changed, 25 insertions(+), 19 deletions(-) diff --git a/inc/lang/de-informal/denied.txt b/inc/lang/de-informal/denied.txt index 6d76891b1..0bc0e59a8 100644 --- a/inc/lang/de-informal/denied.txt +++ b/inc/lang/de-informal/denied.txt @@ -1,4 +1,4 @@ ====== Zugang verweigert ====== -Du hast nicht die erforderlichen Rechte, um diese Aktion durchzuführen. Eventuell bist du nicht am Wiki angemeldet? +Du hast nicht die erforderliche Berechtigung, um diese Aktion durchzuführen. Eventuell bist du nicht am Wiki angemeldet? diff --git a/inc/lang/de-informal/lang.php b/inc/lang/de-informal/lang.php index cfb492dfb..d39bf8152 100644 --- a/inc/lang/de-informal/lang.php +++ b/inc/lang/de-informal/lang.php @@ -88,7 +88,7 @@ $lang['profnoempty'] = 'Es muss ein Name oder eine E-Mail Adresse ange $lang['profchanged'] = 'Benutzerprofil erfolgreich geändert.'; $lang['pwdforget'] = 'Passwort vergessen? Fordere ein neues an'; $lang['resendna'] = 'Passwörter versenden ist in diesem Wiki nicht möglich.'; -$lang['resendpwd'] = 'Neues Passwort schicken für'; +$lang['resendpwd'] = 'Neues Passwort senden für'; $lang['resendpwdmissing'] = 'Es tut mir Leid, aber du musst alle Felder ausfüllen.'; $lang['resendpwdnouser'] = 'Es tut mir Leid, aber der Benutzer existiert nicht in unserer Datenbank.'; $lang['resendpwdbadauth'] = 'Es tut mir Leid, aber dieser Authentifizierungscode ist ungültig. Stelle sicher, dass du den kompletten Bestätigungslink verwendet haben.'; @@ -168,6 +168,9 @@ $lang['yours'] = 'Deine Version'; $lang['diff'] = 'Zeige Unterschiede zu aktueller Version'; $lang['diff2'] = 'Zeige Unterschiede der ausgewählten Versionen'; $lang['difflink'] = 'Link zu der Versionshistorie'; +$lang['diff_type'] = 'Unterschiede anzeigen:'; +$lang['diff_inline'] = 'Inline'; +$lang['diff_side'] = 'Side by Side'; $lang['line'] = 'Zeile'; $lang['breadcrumb'] = 'Zuletzt angesehen'; $lang['youarehere'] = 'Du befindest dich hier'; @@ -288,4 +291,4 @@ $lang['days'] = 'vor %d Tagen'; $lang['hours'] = 'vor %d Stunden'; $lang['minutes'] = 'vor %d Minuten'; $lang['seconds'] = 'vor %d Sekunden'; -$lang['wordblock'] = 'Deine Änderungen konnten nicht gespeichert werden, da Teile des Texts blockierte Wörter (Spam) enthalten.'; +$lang['wordblock'] = 'Deine Bearbeitung wurde nicht gespeichert, da sie gesperrten Text enthielt (Spam).'; diff --git a/inc/lang/de-informal/resendpwd.txt b/inc/lang/de-informal/resendpwd.txt index 4dcd4bb4d..a0a714218 100644 --- a/inc/lang/de-informal/resendpwd.txt +++ b/inc/lang/de-informal/resendpwd.txt @@ -1,3 +1,3 @@ ====== Neues Passwort anfordern ====== -Fülle alle Felder unten aus, um ein neues Passwort für deinen Zugang zu erhalten. Das neue Passwort wird an deine gespeicherte E-Mail-Adresse geschickt. Der Benutzername sollte dein Wiki-Benutzername sein. +Fülle alle Felder unten aus, um ein neues Passwort für deinen Zugang zu erhalten. Das neue Passwort wird an deine gespeicherte E-Mail-Adresse geschickt. Der Benutzername muss deinem Wiki-Benutzernamen entsprechen. diff --git a/inc/lang/de-informal/revisions.txt b/inc/lang/de-informal/revisions.txt index e4a7be8f1..b69169a4e 100644 --- a/inc/lang/de-informal/revisions.txt +++ b/inc/lang/de-informal/revisions.txt @@ -1,4 +1,4 @@ ====== Ältere Versionen ====== -Dies sind ältere Versionen des gewählten Dokuments. Um zu einer älteren Version zurückzukehren, wähle die entsprechende Version aus, klicke auf **''[Diese Seite bearbeiten]''** und speichere sie erneut ab. +Dies sind ältere Versionen der gewählten Seite. Um zu einer älteren Version zurückzukehren, wähle die entsprechende Version aus, klicke auf **''[Diese Seite bearbeiten]''** und speichere sie erneut ab. diff --git a/inc/lang/de/denied.txt b/inc/lang/de/denied.txt index b87965067..8efa81f1b 100644 --- a/inc/lang/de/denied.txt +++ b/inc/lang/de/denied.txt @@ -1,4 +1,4 @@ ====== Zugang verweigert ====== -Sie haben nicht die erforderlichen Rechte, um diese Aktion durchzuführen. Eventuell sind Sie nicht beim Wiki angemeldet? +Sie haben nicht die erforderliche Berechtigung, um diese Aktion durchzuführen. Eventuell sind Sie nicht am Wiki angemeldet? diff --git a/inc/lang/de/lang.php b/inc/lang/de/lang.php index 3a3afdc16..f9f250994 100644 --- a/inc/lang/de/lang.php +++ b/inc/lang/de/lang.php @@ -81,14 +81,14 @@ $lang['regmailfail'] = 'Offenbar ist ein Fehler beim Versenden der Pas $lang['regbadmail'] = 'Die angegebene E-Mail-Adresse scheint ungültig zu sein. Falls dies ein Fehler ist, wenden Sie sich bitte an den Wiki-Admin.'; $lang['regbadpass'] = 'Die beiden eingegeben Passwörter stimmen nicht überein. Bitte versuchen Sie es noch einmal.'; $lang['regpwmail'] = 'Ihr DokuWiki Passwort'; -$lang['reghere'] = 'Sie haben noch keinen Zugang? Hier anmelden'; +$lang['reghere'] = 'Sie haben noch keinen Zugang? Hier registrieren'; $lang['profna'] = 'Änderung des Benutzerprofils in diesem Wiki nicht möglich.'; $lang['profnochange'] = 'Keine Änderungen, nichts zu tun.'; -$lang['profnoempty'] = 'Es muß ein Name und eine E-Mail-Adresse angegeben werden.'; +$lang['profnoempty'] = 'Es muss ein Name und eine E-Mail-Adresse angegeben werden.'; $lang['profchanged'] = 'Benutzerprofil erfolgreich geändert.'; $lang['pwdforget'] = 'Passwort vergessen? Fordere ein neues an'; $lang['resendna'] = 'Passwörter versenden ist in diesem Wiki nicht möglich.'; -$lang['resendpwd'] = 'Neues Passwort schicken für'; +$lang['resendpwd'] = 'Neues Passwort senden für'; $lang['resendpwdmissing'] = 'Es tut mir Leid, aber Sie müssen alle Felder ausfüllen.'; $lang['resendpwdnouser'] = 'Es tut mir Leid, aber der Benutzer existiert nicht in unserer Datenbank.'; $lang['resendpwdbadauth'] = 'Es tut mir Leid, aber dieser Authentifizierungscode ist ungültig. Stellen Sie sicher, dass Sie den kompletten Bestätigungslink verwendet haben.'; @@ -113,13 +113,13 @@ $lang['js']['mediadisplay'] = 'Linktyp'; $lang['js']['mediaalign'] = 'Anordnung'; $lang['js']['mediasize'] = 'Bildgröße'; $lang['js']['mediatarget'] = 'Linkziel'; -$lang['js']['mediaclose'] = 'Schliessen'; +$lang['js']['mediaclose'] = 'Schließen'; $lang['js']['mediainsert'] = 'Einfügen'; $lang['js']['mediadisplayimg'] = 'Bild anzeigen.'; $lang['js']['mediadisplaylnk'] = 'Nur den Link anzeigen.'; $lang['js']['mediasmall'] = 'Kleine Version'; $lang['js']['mediamedium'] = 'Mittlere Version'; -$lang['js']['medialarge'] = 'Grosse Version'; +$lang['js']['medialarge'] = 'Große Version'; $lang['js']['mediaoriginal'] = 'Originalversion'; $lang['js']['medialnk'] = 'Link zur Detailseite'; $lang['js']['mediadirect'] = 'Direktlink zum Original'; @@ -169,6 +169,9 @@ $lang['yours'] = 'Ihre Version'; $lang['diff'] = 'Zeige Unterschiede zu aktueller Version'; $lang['diff2'] = 'Zeige Unterschiede der ausgewählten Versionen'; $lang['difflink'] = 'Link zu dieser Vergleichsansicht'; +$lang['diff_type'] = 'Unterschiede anzeigen:'; +$lang['diff_inline'] = 'Inline'; +$lang['diff_side'] = 'Side by Side'; $lang['line'] = 'Zeile'; $lang['breadcrumb'] = 'Zuletzt angesehen'; $lang['youarehere'] = 'Sie befinden sich hier'; @@ -179,10 +182,10 @@ $lang['created'] = 'angelegt'; $lang['restored'] = 'alte Version wieder hergestellt'; $lang['external_edit'] = 'Externe Bearbeitung'; $lang['summary'] = 'Zusammenfassung'; -$lang['noflash'] = 'Das Adobe Flash Plugin wird benötigt, um diesen Ihnalt anzuzeigen.'; +$lang['noflash'] = 'Das Adobe Flash Plugin wird benötigt, um diesen Inhalt anzuzeigen.'; $lang['download'] = 'Schnipsel herunterladen'; $lang['mail_newpage'] = 'Neue Seite:'; -$lang['mail_changed'] = 'Seite geaendert:'; +$lang['mail_changed'] = 'Seite geändert:'; $lang['mail_subscribe_list'] = 'Geänderte Seiten im Namensraum:'; $lang['mail_new_user'] = 'Neuer Benutzer:'; $lang['mail_upload'] = 'Datei hochgeladen:'; @@ -239,7 +242,7 @@ $lang['subscr_m_current_header'] = 'Aktuelle Abonnements'; $lang['subscr_m_unsubscribe'] = 'Löschen'; $lang['subscr_m_subscribe'] = 'Abonnieren'; $lang['subscr_m_receive'] = 'Benachrichtigung'; -$lang['subscr_style_every'] = 'Email bei jeder Bearbeitung'; +$lang['subscr_style_every'] = 'E-Mail bei jeder Bearbeitung'; $lang['subscr_style_digest'] = 'Zusammenfassung der Änderungen für jede veränderte Seite (Alle %.2f Tage)'; $lang['subscr_style_list'] = 'Liste der geänderten Seiten (Alle %.2f Tage)'; $lang['authmodfailed'] = 'Benutzerüberprüfung nicht möglich. Bitte wenden Sie sich an den Systembetreuer.'; @@ -251,7 +254,7 @@ $lang['i_enableacl'] = 'Zugangskontrolle (ACL) aktivieren (empfohlen)' $lang['i_superuser'] = 'Administrator Benutzername'; $lang['i_problems'] = 'Das Installationsprogramm hat unten aufgeführte Probleme festgestellt, die zunächst behoben werden müssen bevor Sie mit der Installation fortfahren können.'; $lang['i_modified'] = 'Aus Sicherheitsgründen arbeitet dieses Script nur mit einer neuen, unmodifizierten DokuWiki Installation. Sie sollten entweder alle Dateien noch einmal frisch installieren oder die Dokuwiki-Installationsanleitung konsultieren.'; -$lang['i_funcna'] = 'Die PHP Funktion %s ist nicht verfügbar. Unter Umständen wurde sie von Ihrem Hoster deaktiviert?'; +$lang['i_funcna'] = 'Die PHP-Funktion %s ist nicht verfügbar. Unter Umständen wurde sie von Ihrem Hoster deaktiviert?'; $lang['i_phpver'] = 'Ihre PHP-Version %s ist niedriger als die benötigte Version %s. Bitte aktualisieren Sie Ihre PHP-Installation.'; $lang['i_permfail'] = '%s ist nicht durch DokuWiki beschreibbar. Sie müssen die Berechtigungen dieses Ordners ändern!'; $lang['i_confexists'] = '%s existiert bereits'; @@ -273,7 +276,7 @@ $lang['mu_gridstat'] = 'Status'; $lang['mu_namespace'] = 'Namensraum'; $lang['mu_browse'] = 'Durchsuchen'; $lang['mu_toobig'] = 'zu groß'; -$lang['mu_ready'] = 'bereit zum hochladen'; +$lang['mu_ready'] = 'bereit zum Hochladen'; $lang['mu_done'] = 'fertig'; $lang['mu_fail'] = 'gescheitert'; $lang['mu_authfail'] = 'Sitzung abgelaufen'; @@ -289,4 +292,4 @@ $lang['days'] = 'vor %d Tagen'; $lang['hours'] = 'vor %d Stunden'; $lang['minutes'] = 'vor %d Minuten'; $lang['seconds'] = 'vor %d Sekunden'; -$lang['wordblock'] = 'Deine Bearbeitung wurde nicht gespeichert, da sie gesperrten Text enthielt (Spam).'; +$lang['wordblock'] = 'Ihre Bearbeitung wurde nicht gespeichert, da sie gesperrten Text enthielt (Spam).'; diff --git a/inc/lang/de/resendpwd.txt b/inc/lang/de/resendpwd.txt index 2ff639369..a63fd5d55 100644 --- a/inc/lang/de/resendpwd.txt +++ b/inc/lang/de/resendpwd.txt @@ -1,3 +1,3 @@ ====== Neues Passwort anfordern ====== -Füllen Sie alle Felder unten aus, um ein neues Passwort für Ihren Zugang zu erhalten. Das neue Passwort wird an Ihre gespeicherte E-Mail-Adresse geschickt. Der Benutzername sollte Ihr Wiki-Benutzername sein. +Füllen Sie alle Felder unten aus, um ein neues Passwort für Ihren Zugang zu erhalten. Das neue Passwort wird an Ihre gespeicherte E-Mail-Adresse geschickt. Der Benutzername muss Ihrem Wiki-Benutzernamen entsprechen. diff --git a/inc/lang/de/revisions.txt b/inc/lang/de/revisions.txt index e1bafdd2d..843c3f9f4 100644 --- a/inc/lang/de/revisions.txt +++ b/inc/lang/de/revisions.txt @@ -1,4 +1,4 @@ ====== Ältere Versionen ====== -Dies sind ältere Versionen des gewählten Dokuments. Um zu einer älteren Version zurückzukehren, wählen Sie die entsprechende Version aus, klicken auf **''[Diese Seite bearbeiten]''** und speichern Sie sie erneut ab. +Dies sind ältere Versionen der gewählten Seite. Um zu einer älteren Version zurückzukehren, wählen Sie die entsprechende Version aus, klicken auf **''[Diese Seite bearbeiten]''** und speichern Sie diese erneut ab. -- cgit v1.2.3 From 15965e387dfad6775563aebc18d38eda4fddf53b Mon Sep 17 00:00:00 2001 From: Shuo-Ting Jian Date: Fri, 18 Mar 2011 12:53:10 +0100 Subject: Traditional Chinese language update --- inc/lang/zh-tw/lang.php | 4 ++++ lib/plugins/acl/lang/zh-tw/lang.php | 1 + lib/plugins/config/lang/zh-tw/lang.php | 2 ++ lib/plugins/plugin/lang/zh-tw/lang.php | 1 + lib/plugins/popularity/lang/zh-tw/lang.php | 6 ++++++ lib/plugins/popularity/lang/zh-tw/submitted.txt | 3 +++ lib/plugins/revert/lang/zh-tw/lang.php | 6 +----- lib/plugins/usermanager/lang/zh-tw/lang.php | 1 + 8 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 lib/plugins/popularity/lang/zh-tw/submitted.txt diff --git a/inc/lang/zh-tw/lang.php b/inc/lang/zh-tw/lang.php index 5bf790a00..074c510e9 100644 --- a/inc/lang/zh-tw/lang.php +++ b/inc/lang/zh-tw/lang.php @@ -9,6 +9,7 @@ * @author Wayne San * @author Cheng-Wei Chien * @author Danny Lin + * @author Shuo-Ting Jian */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -160,6 +161,9 @@ $lang['yours'] = '您的版本'; $lang['diff'] = '顯示與目前版本的差異'; $lang['diff2'] = '顯示選擇版本間的差異'; $lang['difflink'] = '連向這個比對檢視'; +$lang['diff_type'] = '檢視差異:'; +$lang['diff_inline'] = '行內'; +$lang['diff_side'] = '並排'; $lang['line'] = '行'; $lang['breadcrumb'] = '足跡'; $lang['youarehere'] = '您在這裡'; diff --git a/lib/plugins/acl/lang/zh-tw/lang.php b/lib/plugins/acl/lang/zh-tw/lang.php index 067d15d94..085537864 100644 --- a/lib/plugins/acl/lang/zh-tw/lang.php +++ b/lib/plugins/acl/lang/zh-tw/lang.php @@ -10,6 +10,7 @@ * @author Li-Jiun Huang * @author Cheng-Wei Chien * @author Danny Lin + * @author Shuo-Ting Jian */ $lang['admin_acl'] = '管理存取控制表 (ACL)'; $lang['acl_group'] = '群組'; diff --git a/lib/plugins/config/lang/zh-tw/lang.php b/lib/plugins/config/lang/zh-tw/lang.php index 8ebdb99ad..aca415ab9 100644 --- a/lib/plugins/config/lang/zh-tw/lang.php +++ b/lib/plugins/config/lang/zh-tw/lang.php @@ -8,6 +8,7 @@ * @author Li-Jiun Huang * @author Cheng-Wei Chien * @author Danny Lin + * @author Shuo-Ting Jian */ $lang['menu'] = '系統配置設定'; $lang['error'] = '設定因為不合法的值而未更新,請檢查您的更改並重新送出。 @@ -105,6 +106,7 @@ $lang['fetchsize'] = 'fetch.php 可以從外部下載的最大檔案 $lang['notify'] = '寄送變更通知信到這個 E-mail 位址'; $lang['registernotify'] = '寄送新使用者註冊資訊到這個 E-mail 位址'; $lang['mailfrom'] = '自動發送郵件時使用的郵件地址'; +$lang['mailprefix'] = '自動發送郵件時使用的標題前綴'; $lang['gzip_output'] = '對 xhtml 使用 gzip 內容編碼'; $lang['gdlib'] = 'GD Lib 版本'; $lang['im_convert'] = 'ImageMagick 的轉換工具路徑'; diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php index f1c399c68..77e692fcf 100644 --- a/lib/plugins/plugin/lang/zh-tw/lang.php +++ b/lib/plugins/plugin/lang/zh-tw/lang.php @@ -8,6 +8,7 @@ * @author Li-Jiun Huang * @author Cheng-Wei Chien * @author Danny Lin + * @author Shuo-Ting Jian */ $lang['menu'] = '管理插件 (Plugins)'; $lang['download'] = '下載與安裝插件'; diff --git a/lib/plugins/popularity/lang/zh-tw/lang.php b/lib/plugins/popularity/lang/zh-tw/lang.php index cc96300ee..3ced0ee5a 100644 --- a/lib/plugins/popularity/lang/zh-tw/lang.php +++ b/lib/plugins/popularity/lang/zh-tw/lang.php @@ -8,6 +8,12 @@ * @author Li-Jiun Huang * @author Cheng-Wei Chien * @author Danny Lin + * @author Shuo-Ting Jian */ $lang['name'] = '人氣回饋(載入可能需要一些時間)'; $lang['submit'] = '發送資料'; +$lang['autosubmit'] = '每月自動發送'; +$lang['submissionFailed'] = '由於以下原因,資料無法發送:'; +$lang['submitDirectly'] = '你可以利用以下的表單來發手動發送資料.'; +$lang['autosubmitError'] = '由於以下原因,上次自動發送失敗:'; +$lang['lastSent'] = '資料已發送'; diff --git a/lib/plugins/popularity/lang/zh-tw/submitted.txt b/lib/plugins/popularity/lang/zh-tw/submitted.txt new file mode 100644 index 000000000..6febcd5b8 --- /dev/null +++ b/lib/plugins/popularity/lang/zh-tw/submitted.txt @@ -0,0 +1,3 @@ +====== 人氣回饋 ====== + +資料已發送成功 \ No newline at end of file diff --git a/lib/plugins/revert/lang/zh-tw/lang.php b/lib/plugins/revert/lang/zh-tw/lang.php index 68fd3dce5..a853ccd2e 100644 --- a/lib/plugins/revert/lang/zh-tw/lang.php +++ b/lib/plugins/revert/lang/zh-tw/lang.php @@ -8,13 +8,9 @@ * @author Li-Jiun Huang * @author Cheng-Wei Chien * @author Danny Lin + * @author Shuo-Ting Jian */ - -// for admin plugins, the menu prompt to be displayed in the admin menu -// if set here, the plugin doesn't need to override the getMenuText() method $lang['menu'] = '還原管理'; - -// custom language strings for the plugin $lang['filter'] = '搜索包含垃圾訊息的頁面'; $lang['revert'] = '還原選取的頁面'; $lang['reverted'] = '%s 已還原為版本 %s'; diff --git a/lib/plugins/usermanager/lang/zh-tw/lang.php b/lib/plugins/usermanager/lang/zh-tw/lang.php index a46492685..5cb20aae8 100644 --- a/lib/plugins/usermanager/lang/zh-tw/lang.php +++ b/lib/plugins/usermanager/lang/zh-tw/lang.php @@ -9,6 +9,7 @@ * @author Li-Jiun Huang * @author Cheng-Wei Chien * @author Danny Lin + * @author Shuo-Ting Jian */ $lang['menu'] = '帳號管理員'; $lang['noauth'] = '(帳號認證尚未開放)'; -- cgit v1.2.3 From dddd93c42628711c42d87c1be06c9a64ca67101a Mon Sep 17 00:00:00 2001 From: Matej Urban Date: Fri, 18 Mar 2011 13:00:03 +0100 Subject: Slovak language update --- inc/lang/sl/admin.txt | 4 +- inc/lang/sl/backlinks.txt | 3 +- inc/lang/sl/index.txt | 2 +- inc/lang/sl/install.html | 20 +++ inc/lang/sl/lang.php | 10 +- inc/lang/sl/login.txt | 2 +- inc/lang/sl/stopwords.txt | 18 +++ inc/lang/sl/subscr_single.txt | 22 ++++ lib/plugins/acl/lang/sl/help.txt | 11 ++ lib/plugins/acl/lang/sl/lang.php | 4 +- lib/plugins/config/lang/sl/intro.txt | 7 ++ lib/plugins/config/lang/sl/lang.php | 174 +++++++++++++++++++++++++-- lib/plugins/info/lang/sl/lang.php | 12 ++ lib/plugins/plugin/lang/sl/admin_plugin.txt | 3 + lib/plugins/plugin/lang/sl/lang.php | 30 +++++ lib/plugins/popularity/lang/sl/intro.txt | 9 ++ lib/plugins/popularity/lang/sl/lang.php | 11 +- lib/plugins/popularity/lang/sl/submitted.txt | 3 + lib/plugins/revert/lang/sl/intro.txt | 3 + lib/plugins/revert/lang/sl/lang.php | 12 +- lib/plugins/usermanager/lang/sl/edit.txt | 2 +- lib/plugins/usermanager/lang/sl/intro.txt | 1 + lib/plugins/usermanager/lang/sl/lang.php | 19 ++- 23 files changed, 350 insertions(+), 32 deletions(-) create mode 100644 inc/lang/sl/install.html create mode 100644 inc/lang/sl/stopwords.txt create mode 100644 inc/lang/sl/subscr_single.txt create mode 100644 lib/plugins/acl/lang/sl/help.txt create mode 100644 lib/plugins/config/lang/sl/intro.txt create mode 100644 lib/plugins/info/lang/sl/lang.php create mode 100644 lib/plugins/plugin/lang/sl/admin_plugin.txt create mode 100644 lib/plugins/popularity/lang/sl/intro.txt create mode 100644 lib/plugins/popularity/lang/sl/submitted.txt create mode 100644 lib/plugins/revert/lang/sl/intro.txt create mode 100644 lib/plugins/usermanager/lang/sl/intro.txt diff --git a/inc/lang/sl/admin.txt b/inc/lang/sl/admin.txt index 89b924e08..cee19deff 100644 --- a/inc/lang/sl/admin.txt +++ b/inc/lang/sl/admin.txt @@ -1,3 +1,3 @@ -===== Skrbnitvo ===== +===== Skrbništvo ===== -Spodaj je naveden seznam skrbnikih opravil sistema DokuWiki. \ No newline at end of file +Navedene možnosti omogočajo skrbniško prilagajanje nastavitev sistema DokuWiki. diff --git a/inc/lang/sl/backlinks.txt b/inc/lang/sl/backlinks.txt index 466f96cf4..5e4d8ffa7 100644 --- a/inc/lang/sl/backlinks.txt +++ b/inc/lang/sl/backlinks.txt @@ -1,4 +1,3 @@ ====== Povratne povezave ====== -Spodaj je naveden seznam strani, ki so povezane na trenutno stran. CamelCase povezave niso zaznane kot povratne povezave. - +Spodaj je naveden seznam strani, ki so povezane na trenutno stran. EnoBesedne povezave niso zaznane kot povratne povezave. diff --git a/inc/lang/sl/index.txt b/inc/lang/sl/index.txt index 81ccd47ad..dd54d2bed 100644 --- a/inc/lang/sl/index.txt +++ b/inc/lang/sl/index.txt @@ -1,4 +1,4 @@ ====== Kazalo ====== -Na spodnjem seznamu so izpisane vse wiki strani, ki so na voljo, urejene pa so skladno z [[doku>namespaces|imenskimi prostori]]. +Na spodnjem seznamu so izpisane vse wiki strani, ki so na voljo, razvrščene pa so po posameznih [[doku>namespaces|imenskih prostorih]]. diff --git a/inc/lang/sl/install.html b/inc/lang/sl/install.html new file mode 100644 index 000000000..6fb6bead3 --- /dev/null +++ b/inc/lang/sl/install.html @@ -0,0 +1,20 @@ +

Stran je namenjena pomoči pri prvi namestitvi in nastavitvi spletišča +Dokuwiki. Več podrobnosti o tem je mogoče najti na straneh dokumentacije +namestitve.

+ +

Sistem DokuWiki uporablja običajne besedilne datoteke za shranjevanje +wiki strani in drugih podrobnosti o teh straneh (npr. slike, kazalo, stare +različice in drugo). Za pravilno delovanje mora imeti sistem DokuWiki prost +dostop do map in datotek, zato je ključno, da so dovoljenja določena pravilno. +Z namestilnikom ni mogoče spreminjanje dovoljenj map. To je običajno najlažje +narediti v ukazni lupini ali pa, če spletišče Wiki gostuje na zunanjih +strežnikih, preko nadzornika FTP povezave (npr. cPanel).

+ +

Z namestilnikom lahko spremenite nastavitve dostopa sistema Dokuwiki +ACL, ki omogoča skrbniško prijavo in dostop do upravljanja z vstavki, +uporabniki, dovoljenji dostopa uporabnikov do določenih strani in do nekaterih +nastavitev. Za delovanje sistema ACL ni bistven, vendar pa močno vpliva na +enostavnost upravljanja strani in nastavitev.

+ +

Zahtevnejši uporabniki ali skrbniki s posebnimi zahtevami namestitve sistema +si lahko več podrobnosti ogledajo na straneh navodil namestitve in nastavitve.

\ No newline at end of file diff --git a/inc/lang/sl/lang.php b/inc/lang/sl/lang.php index 41723f0ba..0e6c0a706 100644 --- a/inc/lang/sl/lang.php +++ b/inc/lang/sl/lang.php @@ -10,7 +10,7 @@ * @author Matej Urbančič (mateju@svn.gnome.org) */ $lang['encoding'] = 'utf-8'; -$lang['direction'] = 'L-D'; +$lang['direction'] = 'ltr'; $lang['doublequoteopening'] = '„'; $lang['doublequoteclosing'] = '“'; $lang['singlequoteopening'] = '‚'; @@ -48,16 +48,16 @@ $lang['btn_draft'] = 'Uredi osnutek'; $lang['btn_recover'] = 'Obnovi osnutek'; $lang['btn_draftdel'] = 'Izbriši osnutek'; $lang['btn_revert'] = 'Povrni'; -$lang['btn_register'] = 'Vpis računa'; $lang['loggedinas'] = 'Prijava kot'; $lang['user'] = 'Uporabniško ime'; $lang['pass'] = 'Geslo'; $lang['newpass'] = 'Novo geslo'; $lang['oldpass'] = 'Potrdi trenutno geslo'; -$lang['passchk'] = 'znova'; +$lang['passchk'] = 'Ponovi novo geslo'; $lang['remember'] = 'Zapomni si me'; $lang['fullname'] = 'Pravo ime'; $lang['email'] = 'Elektronski naslov'; +$lang['register'] = 'Vpis računa'; $lang['profile'] = 'Uporabniški profil'; $lang['badlogin'] = 'Uporabniško ime ali geslo je napačno.'; $lang['minoredit'] = 'Manjše spremembe'; @@ -99,7 +99,7 @@ $lang['js']['searchmedia'] = 'Poišči datoteke'; $lang['js']['keepopen'] = 'Od izbiri ohrani okno odprto'; $lang['js']['hidedetails'] = 'Skrij podrobnosti'; $lang['js']['mediatitle'] = 'Nastavitve povezave'; -$lang['js']['mediadisplay'] = 'Vrsta povezaave'; +$lang['js']['mediadisplay'] = 'Vrsta povezave'; $lang['js']['mediaalign'] = 'Poravnava'; $lang['js']['mediasize'] = 'Velikost slike'; $lang['js']['mediatarget'] = 'Mesto povezave'; @@ -119,7 +119,7 @@ $lang['js']['medialeft'] = 'Poravnaj sliko na levo.'; $lang['js']['mediaright'] = 'Poravnaj sliko na desno.'; $lang['js']['mediacenter'] = 'Poravnaj sliko na sredini.'; $lang['js']['medianoalign'] = 'Ne uporabi poravnave.'; -$lang['js']['nosmblinks'] = 'Povezovanje do souporabenih datotek sistema Windows deluje le pri uporabi brskalnika Microsoft Internet Explorer. Povezavo je mogoče kopirati ročno.'; +$lang['js']['nosmblinks'] = 'Povezovanje do souporabnih datotek sistema Windows deluje le pri uporabi brskalnika Microsoft Internet Explorer. Povezavo je mogoče kopirati ročno.'; $lang['js']['linkwiz'] = 'Čarovnik za povezave'; $lang['js']['linkto'] = 'Poveži na:'; $lang['js']['del_confirm'] = 'Ali naj se res izbrišejo izbrani predmeti?'; diff --git a/inc/lang/sl/login.txt b/inc/lang/sl/login.txt index 297cd53f5..eeae0c96c 100644 --- a/inc/lang/sl/login.txt +++ b/inc/lang/sl/login.txt @@ -1,3 +1,3 @@ ====== Prijava ====== -Niste prijavljeni! Spodaj vnesite ustrezne podatke in se prijavite. Prijaviti se je mogoče, če so omogočeni piškotki. +Niste prijavljeni! Spodaj vnesite ustrezne podatke in se prijavite. Prijaviti se je mogoče le, če so omogočeni piškotki. diff --git a/inc/lang/sl/stopwords.txt b/inc/lang/sl/stopwords.txt new file mode 100644 index 000000000..5d61539e7 --- /dev/null +++ b/inc/lang/sl/stopwords.txt @@ -0,0 +1,18 @@ +# To je seznam besed, ki jih ustvarjalnik kazala prezre. Seznam je sestavljen iz +# besede, ki so zapisane vsaka v svoji vrstici. Datoteka mora biti zapisana s konnim +# UNIX znakom vrstice. Besede kraje od treh znakov so iz kazala izloene samodejno +# zaradi preglednosti. Seznam se s bo s asom spreminjal in dopolnjeval. +moja +moje +moji +mojo +njegovi +njegove +njegovo +njeno +njeni +njene +njihova +njihove +njihovi +njihovo diff --git a/inc/lang/sl/subscr_single.txt b/inc/lang/sl/subscr_single.txt new file mode 100644 index 000000000..9fd64be0e --- /dev/null +++ b/inc/lang/sl/subscr_single.txt @@ -0,0 +1,22 @@ +Pozdravljeni! + +Stran @PAGE@ na spletišču Wiki @TITLE@ je spremenjena. +Spremenjeno je: + +-------------------------------------------------------- +@DIFF@ +-------------------------------------------------------- + +Datum : @DATE@ +Uporabnik : @USER@ +Povzetek urejanja: @SUMMARY@ +Stara različica : @OLDPAGE@ +Nova različica : @NEWPAGE@ + +Preklic obveščanja o spremembah strani je mogoče določiti +na Wiki naslovu @DOKUWIKIURL@ in z obiskom @NEWPAGE@, +kjer se je mogoče odjaviti od spremljanja strani ali +imenskega prostora. + +-- +Sporočilo je samodejno ustvarjeno na spletišču @DOKUWIKIURL@ \ No newline at end of file diff --git a/lib/plugins/acl/lang/sl/help.txt b/lib/plugins/acl/lang/sl/help.txt new file mode 100644 index 000000000..eada41c29 --- /dev/null +++ b/lib/plugins/acl/lang/sl/help.txt @@ -0,0 +1,11 @@ +=== Hitra pomo === + +Na tej strani je mogoe dodajati, odstranjevati in spreminjati dovoljenja za delo z wiki stranmi in imenskimi prostori. + +Na veli strani so izpisani vsi imenski prostori in strani. + +Na obrazcu zgoraj je mogoe pregledovati in spreminjati dovoljenja za izbranega uporabnika ali skupino. + +V preglednici spodaj so prikazana vsa pravila nadzora. Ta je mogoe hitro spreminjati ali brisati. + +Ve podrobnosti o delovanju nadzora dostopa sistema DokuWiki je mogoe najti v [[doku>acl|uradni dokumentaciji ACL]]. diff --git a/lib/plugins/acl/lang/sl/lang.php b/lib/plugins/acl/lang/sl/lang.php index 45fdc98f4..3fb391570 100644 --- a/lib/plugins/acl/lang/sl/lang.php +++ b/lib/plugins/acl/lang/sl/lang.php @@ -7,7 +7,7 @@ * @author Gregor Skumavc (grega.skumavc@gmail.com) * @author Matej Urbančič (mateju@svn.gnome.org) */ -$lang['admin_acl'] = 'Skrbništvo ACL'; +$lang['admin_acl'] = 'Upravljanje dostopa'; $lang['acl_group'] = 'Skupina'; $lang['acl_user'] = 'Uporabnik'; $lang['acl_perms'] = 'Dovoljenja za'; @@ -23,7 +23,7 @@ $lang['p_choose_ns'] = 'Vnesite ime uporabnika ali skupine v zg $lang['p_inherited'] = 'Opomba: trenutna dovoljenja niso bila posebej določena, temveč so bila prevzeta iz drugih skupin ali višjih imenskih prostorov.'; $lang['p_isadmin'] = 'Opomba: izbrana skupina ali uporabnik imajo vsa dovoljenja za spreminjanje, saj so določeni kot skrbniki sistema.'; $lang['p_include'] = 'Višja dovoljenja vključujejo tudi nižja. '; -$lang['current'] = 'Trenutna ACL pravila'; +$lang['current'] = 'Trenutna pravila dostopa'; $lang['where'] = 'Stran / Imenski prostor'; $lang['who'] = 'Uporabnik/Skupina'; $lang['perm'] = 'Dovoljenja'; diff --git a/lib/plugins/config/lang/sl/intro.txt b/lib/plugins/config/lang/sl/intro.txt new file mode 100644 index 000000000..506cd34bd --- /dev/null +++ b/lib/plugins/config/lang/sl/intro.txt @@ -0,0 +1,7 @@ +====== Splošne nastavitve ====== + +Na tej strani je mogoče spreminjati nastavitve sistema DokuWiki. Pomoč o posameznih nastavitvah je na voljo med [[doku>config|nastavitvami]]. Več podrobnosti o vstavku je na voljo na [[doku>plugin:config|nastavitvami vstavka]]. + +Nastavitve označene s svetlo rdečim ozadjem so zaščitene in jih s tem vstavkom ni mogoče spreminjati. Nastavitve označene s svetlo modrim ozadjem so privzete vrednosti in nastavitve z belim ozadjem so tiste, ki so bile določene krajevno posebej za to nastavitev. Spreminjati je mogoče vrednosti označene z modrimi in belim ozadjem. + +Spremembe je treba **shraniti**, da se uveljavijo, sicer se spremembe prezrejo. diff --git a/lib/plugins/config/lang/sl/lang.php b/lib/plugins/config/lang/sl/lang.php index e8fd34533..dadd01595 100644 --- a/lib/plugins/config/lang/sl/lang.php +++ b/lib/plugins/config/lang/sl/lang.php @@ -5,22 +5,182 @@ * @author Dejan Levec * @author Boštjan Seničar * @author Gregor Skumavc (grega.skumavc@gmail.com) - * @author Matej Urbančič (mateju@svn.gnome.org) + * @author Matej Urbančič (mateju@svn.gnome.org) */ -$lang['lang'] = 'Jezik'; + +$lang['menu'] = 'Splošne nastavitve'; +$lang['error'] = 'Nastavitve niso shranjene zaradi neveljavne vrednosti.
Neveljavna vrednost je označena z rdečim robom vnosnega polja.'; +$lang['updated'] = 'Nastavitve so uspešno posodobljene.'; +$lang['nochoice'] = '(ni drugih možnosti na voljo)'; +$lang['locked'] = 'Nastavitvene datoteke ni mogoče posodobiti.
Preverite dovoljenja za spreminjanje in ime nastavitvene datoteke.'; +$lang['danger'] = 'Opozorilo: spreminjanje te možnosti lahko povzroči težave v delovanju sistema wiki.'; +$lang['warning'] = 'Opozorilo: spreminjanje te možnosti lahko vpliva na pravilno delovanje sistema wiki.'; +$lang['security'] = 'Varnostno opozorilo: spreminjanje te možnosti lahko vpliva na varnost sistema.'; +$lang['_configuration_manager'] = 'Upravljalnik nastavitev'; +$lang['_header_dokuwiki'] = 'Nastavitve DokuWiki'; +$lang['_header_plugin'] = 'Nastavitve vstavkov'; +$lang['_header_template'] = 'Nastavitve predlog'; +$lang['_header_undefined'] = 'Neopredeljene nastavitve'; +$lang['_basic'] = 'Osnovne nastavitve'; +$lang['_display'] = 'Nastavitve prikazovanja'; +$lang['_authentication'] = 'Nastavitve overjanja'; +$lang['_anti_spam'] = 'Nastavitve neželenih sporočil (Anti-Spam)'; +$lang['_editing'] = 'Nastavitve urejanja'; +$lang['_links'] = 'Nastavitve povezav'; +$lang['_media'] = 'Predstavnostne nastavitve'; +$lang['_advanced'] = 'Napredne nastavitve'; +$lang['_network'] = 'Omrežne nastavitve'; +$lang['_plugin_sufix'] = 'nastavitve'; +$lang['_template_sufix'] = 'nastavitve'; +$lang['_msg_setting_undefined'] = 'Ni nastavitvenih metapodatkov.'; +$lang['_msg_setting_no_class'] = 'Ni nastavitvenega razreda.'; +$lang['_msg_setting_no_default'] = 'Ni privzete vrednosti.'; +$lang['fmode'] = 'Način ustvarjanja datotek'; +$lang['dmode'] = 'Način ustvarjanja map'; +$lang['lang'] = 'Jezik vmesnika'; +$lang['basedir'] = 'Pot do strežnika (npr. /dokuwiki/). Prazno polje določa samodejno zaznavanje'; +$lang['baseurl'] = 'Naslov URL strežnika (npr. http://www.streznik.si). Prazno polje določa samodejno zaznavanje'; +$lang['savedir'] = 'Mapa za shranjevanje podatkov'; +$lang['start'] = 'Ime začetne strani wiki'; +$lang['title'] = 'Naslov Wiki spletišča'; $lang['template'] = 'Predloga'; -$lang['recent'] = 'Zadnje spremembe'; +$lang['license'] = 'Pod pogoji katerega dovoljenja je objavljena vsebina?'; +$lang['fullpath'] = 'Pokaži polno pot strani v nogi strani'; +$lang['recent'] = 'Nedavne spremembe'; +$lang['breadcrumbs'] = 'Število drobtinic poti'; +$lang['youarehere'] = 'Hierarhične drobtinice poti'; +$lang['typography'] = 'Omogoči tipografske zamenjave'; +$lang['htmlok'] = 'Dovoli vstavljeno kodo HTML'; +$lang['phpok'] = 'Dovoli vstavljeno kodo PHP'; +$lang['dformat'] = 'Oblika zapisa časa (funkcija PHP strftime)'; $lang['signature'] = 'Podpis'; +$lang['toptoclevel'] = 'Vrhnja raven kazala'; +$lang['tocminheads'] = 'Najmanjše število naslovov za izgradnjo kazala'; +$lang['maxtoclevel'] = 'Najvišja raven kazala'; +$lang['maxseclevel'] = 'Največja raven urejanja odseka'; +$lang['camelcase'] = 'Uporabi EnoBesedni zapisa za povezave'; +$lang['deaccent'] = 'Počisti imena strani'; +$lang['useheading'] = 'Uporabi prvi naslov za ime strani'; +$lang['refcheck'] = 'Preverjanje sklica predstavnih datotek'; +$lang['refshow'] = 'Število predstavnostnih sklicev za prikaz'; +$lang['allowdebug'] = 'Dovoli razhroščevanje (po potrebi!)'; +$lang['usewordblock'] = 'Zaustavi neželeno besedilo glede na seznam besed'; +$lang['indexdelay'] = 'Časovni zamik pred ustvarjanjem kazala (v sekundah)'; +$lang['relnofollow'] = 'Uporabni možnost rel="nofollow" pri zunanjih povezavah'; +$lang['mailguard'] = 'Šifriraj elektronske naslove'; +$lang['iexssprotect'] = 'Preveri poslane datoteke za zlonamerno kodo JavaScript ali HTML'; +$lang['showuseras'] = 'Kaj prikazati za prikaz uporabnika, ki je zadnji urejal stran'; +$lang['useacl'] = 'Uporabi seznam nadzora dostopa (ACL)'; +$lang['autopasswd'] = 'Samodejno ustvari gesla'; +$lang['authtype'] = 'Ozadnji način overitve'; +$lang['passcrypt'] = 'Način šifriranja gesel'; $lang['defaultgroup'] = 'Privzeta skupina'; +$lang['superuser'] = 'Skrbnik - skupina, uporabnik ali z vejico ločen seznam uporabnik1,@skupina1,uporabnik2 s polnim dostopom do vseh strani in možnosti, neodvisno od nastavitev nadzora dostopa ACL'; +$lang['manager'] = 'Upravljavec - skupina, uporabnik ali z vejico ločen seznam uporabnik1,@skupina1,uporabnik2 z dovoljenji za dostop do nekaterih možnosti upravljanja'; +$lang['profileconfirm'] = 'Potrdi spremembe profila z geslom'; +$lang['disableactions'] = 'Onemogoči dejanja DokuWiki'; $lang['disableactions_check'] = 'Preveri'; -$lang['userewrite'] = 'Uporabi olepšane naslove URL'; +$lang['disableactions_subscription'] = 'Naročanje/Preklic naročnine'; +$lang['disableactions_wikicode'] = 'Pogled izvorne kode/Surovi izvoz'; +$lang['disableactions_other'] = 'Druga dejanja (z vejico ločen seznam)'; +$lang['sneaky_index'] = 'Privzeto pokaže sistem DokuWiki vse imenske prostore v pogledu kazala. Z omogočanjem te možnosti bodo skriti vsi imenski prostori, v katere prijavljen uporabnik nima dovoljenj dostopa. S tem je mogoče preprečiti dostop do podrejenih strani. Možnost lahko vpliva na uporabnost nastavitev nadzora dostopa ACL.'; +$lang['auth_security_timeout'] = 'Varnostna časovna omejitev overitve (v sekundah)'; +$lang['securecookie'] = 'Ali naj se piškotki poslani preko varne povezave HTTPS v brskalniku pošiljajo le preko HTTPS? Onemogočanje možnosti je priporočljivo le takrat, ko je prijava varovana s protokolom SSL, brskanje po strani pa ni posebej zavarovano.'; +$lang['xmlrpc'] = 'Omogoči/Onemogoči vmesnik XML-RPC.'; +$lang['xmlrpcuser'] = 'Omejitev dostopa do vmesnika XML-RPC z vejico ločenim seznamom skupin in uporabnikov. Prazno polje pomeni, prost dostop za vse uporabnike.'; +$lang['updatecheck'] = 'Ali naj sistem preveri za posodobitve in varnostna opozorila.'; +$lang['userewrite'] = 'Uporabi olepšan zapis naslovov URL'; +$lang['useslash'] = 'Uporabi poševnico kot ločilnik imenskih prostorov v naslovih URL'; +$lang['usedraft'] = 'Samodejno shrani osnutek med urejanjem strani'; +$lang['sepchar'] = 'Ločilnik besed imen strani'; +$lang['canonical'] = 'Uporabi polni kanonični zapis naslova URL'; +$lang['fnencode'] = 'Način kodiranja ne-ASCII imen datotek.'; +$lang['autoplural'] = 'Preveri množinske oblike povezav'; +$lang['compression'] = 'Način stiskanja za arhivirane datoteke'; +$lang['cachetime'] = 'Največja dovoljena starost predpomnilnika (v sekundah)'; +$lang['locktime'] = 'Največja dovoljena starost datotek zaklepa (v sekundah)'; +$lang['fetchsize'] = 'največja dovoljena velikost zunanjega prejemanja z datoteko fetch.php (v bajtih)'; +$lang['notify'] = 'Pošlji obvestila o spremembah na določen elektronski naslov'; +$lang['registernotify'] = 'Pošlji obvestila o novih vpisanih uporabnikih na določen elektronski naslov'; +$lang['mailfrom'] = 'Elektronski naslov za samodejno poslana sporočila'; +$lang['gzip_output'] = 'Uporabi stiskanje gzip vsebine za xhtml'; +$lang['gdlib'] = 'Različica GD Lib'; +$lang['im_convert'] = 'Pot do orodja za pretvarjanje slik ImageMagick'; +$lang['jpg_quality'] = 'Kakovost stiskanja datotek JPG (0-100)'; +$lang['subscribers'] = 'Omogoči podporo naročanju na strani'; +$lang['subscribe_time'] = 'Čas po katerem so poslani povzetki sprememb (v sekundah); Vrednost mora biti krajša od časa, ki je določen z nedavno_dni.'; +$lang['compress'] = 'Združi odvod CSS in JavaScript v brskalniku'; +$lang['hidepages'] = 'Skrij skladne strani (logični izraz)'; +$lang['send404'] = 'Pošlji "HTTP 404/Strani ni mogoče najti" pri dostopu do neobstoječih strani'; +$lang['sitemap'] = 'Ustvari Google kazalo strani (v dnevih)'; +$lang['broken_iua'] = 'Ali je možnost ignore_user_abort okvarjena na sistemu? Napaka lahko vpliva na delovanje iskalnika. Napake so pogoste ob uporabi IIS+PHP/CGI. Več o tem si je mogoče prebrati v poročilu o hrošču 852.'; +$lang['xsendfile'] = 'Uporabi glavo X-Sendfile za prejemanje statičnih datotek. Spletni strežnik mora možnost podpirati.'; +$lang['renderer_xhtml'] = 'Izrisovalnik za odvod Wiki strani (xhtml)'; +$lang['renderer__core'] = '%s (jedro dokuwiki)'; +$lang['renderer__plugin'] = '%s (vstavek)'; +$lang['rememberme'] = 'Dovoli trajne prijavne piškotke (trajno pomnenje prijave)'; +$lang['rss_type'] = 'Vrsta virov XML'; +$lang['rss_linkto'] = 'XML viri so povezani z'; +$lang['rss_content'] = 'Kaj prikazati med predmeti virov XML?'; +$lang['rss_update'] = 'Časovni razmik posodobitve virov XML (v sekundah)'; +$lang['recent_days'] = 'Koliko nedavnih sprememb naj se ohrani (v dnevih)'; +$lang['rss_show_summary'] = 'Viri XML so povzeti v naslovu'; +$lang['target____wiki'] = 'Ciljno okno za notranje povezave'; +$lang['target____interwiki'] = 'Ciljno okno za notranje wiki povezave'; +$lang['target____extern'] = 'Ciljno okno za zunanje povezave'; +$lang['target____media'] = 'Ciljno okno za predstavne povezave'; +$lang['target____windows'] = 'Ciljno okno za povezave oken'; +$lang['proxy____host'] = 'Ime posredniškega strežnika'; +$lang['proxy____port'] = 'Vrata posredniškega strežnika'; +$lang['proxy____user'] = 'Uporabniško ime posredniškega strežnika'; +$lang['proxy____pass'] = 'Geslo posredniškega strežnika'; +$lang['proxy____ssl'] = 'Uporabi varno povezavo SSL za povezavo z posredniškim strežnikom'; +$lang['proxy____except'] = 'Logični izrazi morajo biti skladni z naslovi URL, ki gredo mimo posredniškega strežnika.'; +$lang['safemodehack'] = 'Omogoči obhod načina SafeMode PHP'; +$lang['ftp____host'] = 'Strežnik FTP za obhod načina SafeMode'; +$lang['ftp____port'] = 'Vrata strežnika FTP za obhod načina SafeMode'; +$lang['ftp____user'] = 'Uporabniško ime za FTP za obhod načina SafeMode'; +$lang['ftp____pass'] = 'Geslo za strežnik FTP za obhod načina SafeMode'; +$lang['ftp____root'] = 'Korenska mapa FTP za obhod načina SafeMode'; +$lang['license_o_'] = 'Ni izbranega dovoljenja'; +$lang['typography_o_0'] = 'brez'; +$lang['typography_o_1'] = 'izloči enojne narekovaje'; +$lang['typography_o_2'] = 'z enojnimi narekovaji (lahko včasih ne deluje)'; +$lang['userewrite_o_0'] = 'brez'; $lang['userewrite_o_1'] = '.htaccess'; +$lang['userewrite_o_2'] = 'notranji DokuWiki'; +$lang['deaccent_o_0'] = 'onemogočeno'; +$lang['deaccent_o_1'] = 'odstrani naglasne oznake'; +$lang['deaccent_o_2'] = 'pretvori v romanski zapis'; +$lang['gdlib_o_0'] = 'Knjižnica GD Lib ni na voljo'; +$lang['gdlib_o_1'] = 'Različica 1.x'; +$lang['gdlib_o_2'] = 'Samodejno zaznavanje'; $lang['rss_type_o_rss'] = 'RSS 0.91'; $lang['rss_type_o_rss1'] = 'RSS 1.0'; $lang['rss_type_o_rss2'] = 'RSS 2.0'; $lang['rss_type_o_atom'] = 'Atom 0.3'; $lang['rss_type_o_atom1'] = 'Atom 1.0'; +$lang['rss_content_o_abstract'] = 'Povzetek'; +$lang['rss_content_o_diff'] = 'Poenotena primerjava'; +$lang['rss_content_o_htmldiff'] = 'HTML oblikovana preglednica primerjave'; +$lang['rss_content_o_html'] = 'Polna HTML vsebina strani'; +$lang['rss_linkto_o_diff'] = 'primerjalni pogled'; +$lang['rss_linkto_o_page'] = 'pregledana stran'; +$lang['rss_linkto_o_rev'] = 'seznam pregledovanj'; $lang['rss_linkto_o_current'] = 'trenutna stran'; -$lang['compression_o_0'] = 'brez stiskanja'; -$lang['compression_o_gz'] = 'gzip stiskanje'; -$lang['compression_o_bz2'] = 'bz2 stiskanje'; +$lang['compression_o_0'] = 'brez'; +$lang['compression_o_gz'] = 'gzip'; +$lang['compression_o_bz2'] = 'bz2'; +$lang['xsendfile_o_0'] = 'ne uporabi'; +$lang['xsendfile_o_1'] = 'plačniška glava lighttpd (pred različico 1.5)'; +$lang['xsendfile_o_2'] = 'običajna glava X-Sendfile'; +$lang['xsendfile_o_3'] = 'plačniška glava Nginx X-Accel-Redirect'; +$lang['showuseras_o_loginname'] = 'Prijavno ime'; +$lang['showuseras_o_username'] = 'Polno ime uporabnika'; +$lang['showuseras_o_email'] = 'Elektronski naslov uporabnika (šifriran po določilih varovanja)'; +$lang['showuseras_o_email_link'] = 'Elektronski naslov uporabnika kot povezava mailto:'; +$lang['useheading_o_0'] = 'nikoli'; +$lang['useheading_o_navigation'] = 'le za krmarjenje'; +$lang['useheading_o_content'] = 'le za vsebino Wiki'; +$lang['useheading_o_1'] = 'vedno'; +$lang['readdircache'] = 'Največja dovoljena starost predpomnilnika prebranih map (v sekundah)'; diff --git a/lib/plugins/info/lang/sl/lang.php b/lib/plugins/info/lang/sl/lang.php new file mode 100644 index 000000000..62936947c --- /dev/null +++ b/lib/plugins/info/lang/sl/lang.php @@ -0,0 +1,12 @@ + + */ + +$lang['encoding'] = 'utf-8'; +$lang['direction'] = 'ltr'; +$lang['onHidden'] = 'Click to display ⇲'; +$lang['onVisible'] = 'Click to hide ⇱'; diff --git a/lib/plugins/plugin/lang/sl/admin_plugin.txt b/lib/plugins/plugin/lang/sl/admin_plugin.txt new file mode 100644 index 000000000..2e99c6297 --- /dev/null +++ b/lib/plugins/plugin/lang/sl/admin_plugin.txt @@ -0,0 +1,3 @@ +====== Upravljanje vstavkov ====== + +Na tej strani je mogoe spreminjati in prilagajati nastavitve Dokuwiki [[doku>plugins|vstavkov]]. Za prejemanje in nameanje vstavkov v ustrezne mape, morajo imeti te doloena ustrezna dovoljenja za pisanje spletnega strenika. diff --git a/lib/plugins/plugin/lang/sl/lang.php b/lib/plugins/plugin/lang/sl/lang.php index 2605a1948..39ba20139 100644 --- a/lib/plugins/plugin/lang/sl/lang.php +++ b/lib/plugins/plugin/lang/sl/lang.php @@ -7,18 +7,48 @@ * @author Gregor Skumavc (grega.skumavc@gmail.com) * @author Matej Urbančič (mateju@svn.gnome.org) */ + +$lang['menu'] = 'Upravljanje vstavkov'; +$lang['download'] = 'Prejmi in namesti nov vstavek'; +$lang['manage'] = 'Nameščeni vstavki'; +$lang['btn_info'] = 'Podrobnosti'; +$lang['btn_update'] = 'Posodobi'; $lang['btn_delete'] = 'Izbriši'; $lang['btn_settings'] = 'Nastavitve'; +$lang['btn_download'] = 'Prejmi'; $lang['btn_enable'] = 'Shrani'; $lang['url'] = 'URL'; $lang['installed'] = 'Nameščeno:'; $lang['lastupdate'] = 'Nazadnje posodobljeno:'; $lang['source'] = 'Vir:'; +$lang['unknown'] = 'neznano'; $lang['updating'] = 'Posodabljanje ...'; +$lang['updated'] = 'Vstavek %s je uspešno posodobljen'; +$lang['updates'] = 'Navedeni vstavki so uspešno posodobljeni'; +$lang['update_none'] = 'Posodobitev ni mogoče najti.'; $lang['deleting'] = 'Brisanje ...'; +$lang['deleted'] = 'Vstavek %s je izbrisan.'; +$lang['downloading'] = 'Prejemanje ...'; +$lang['downloaded'] = 'Vstavek %s je uspešno nameščen'; +$lang['downloads'] = 'Navedeni vstavki so uspešno nameščeni:'; +$lang['download_none'] = 'Vstavkov ni mogoče najti ali pa je prišlo do napake med prejemanjem in nameščanjem.'; +$lang['plugin'] = 'Vstavek:'; +$lang['components'] = 'Sestavni deli'; +$lang['noinfo'] = 'Vstavek nima vpisanih podrobnih podatkov, kar pomeni, da je morda neveljaven.'; $lang['name'] = 'Ime:'; $lang['date'] = 'Datum:'; $lang['type'] = 'Vrsta:'; $lang['desc'] = 'Opis:'; $lang['author'] = 'Avtor:'; $lang['www'] = 'Spletna stran:'; +$lang['error'] = 'Prišlo je do neznane napake.'; +$lang['error_download'] = 'Ni mogoče prejeti datoteke vstavka: %s'; +$lang['error_badurl'] = 'Napaka naslova URL - ni mogoče določiti imena datoteke iz naslova URL'; +$lang['error_dircreate'] = 'Ni mogoče ustvariti začasne mape za prejemanje'; +$lang['error_decompress'] = 'Z upravljalnikom vstavkov ni mogoče razširiti prejetega arhiva vstavka. Najverjetneje je prišlo do napake med prejemanjem datoteke ali pa zapis arhiva ni znan. Poskusite znova ali pa napako odpravite z ročnim nameščanjem vstavka.'; +$lang['error_copy'] = 'Prišlo je do napake med nameščanjem datotek vstavka %s: najverjetneje so težave s prostorom za namestitev ali pa ni ustreznih dovoljenj za nameščanje. Zaradi nepopolne namestitve lahko nastopijo težave v delovanju sistema Wiki.'; +$lang['error_delete'] = 'Prišlo je do napake med brisanjem vstavka %s: najverjetneje ni ustreznih dovoljenj za dostop do datoteke ali mape'; +$lang['enabled'] = 'Vstavek %s je omogočen.'; +$lang['notenabled'] = 'Vstavka %s ni mogoče omogočiti zaradi neustreznih dovoljen.'; +$lang['disabled'] = 'Vstavek %s je onemogočen.'; +$lang['notdisabled'] = 'Vstavka %s ni mogoče onemogočiti zaradi neustreznih dovoljen.'; diff --git a/lib/plugins/popularity/lang/sl/intro.txt b/lib/plugins/popularity/lang/sl/intro.txt new file mode 100644 index 000000000..ceb0e61e6 --- /dev/null +++ b/lib/plugins/popularity/lang/sl/intro.txt @@ -0,0 +1,9 @@ +====== Poroilo o uporabi ====== + +To orodje je namenjeno zbiranju brezimnih podatkov o postavljeni Dokuwiki strani in omogoa poiljanje nekaterih podatkov neposredno razvijalcem sistema. S temi podatki lahko razvijalci razumejo naine uporabe sistema, zahteve uporabnikov in pogostost uporabe, kar s statistinimi podatki vpliva tudi na nadaljnji razvoj sistema. + +Priporoeno je, da poroilo o uporabi poljete vsake toliko asa, saj lahko le tako razvijalci dobijo podatke o hitrosti rasti spletia in pogostosti uporabe. Vsi podatki so poslani oznaeni s posebno vpisno tevilko, ki omogoa brezimno sledenje. + +Zbrani podatki vsebujejo podrobnosti o razliici uporabljenega sistema DokuWiki, tevilo in velikost wiki strani, datotekah, ki so naloene na sistem in podatke o vstavkih ter PHP namestitvi in razliici. + +Surovi podatki, ki bodo poslani so prikazani spodaj. S pritiskom na gumb "Polji podatke", bodo ti poslani na strenik razvijalcev. diff --git a/lib/plugins/popularity/lang/sl/lang.php b/lib/plugins/popularity/lang/sl/lang.php index 2191d7597..5c92dd7c4 100644 --- a/lib/plugins/popularity/lang/sl/lang.php +++ b/lib/plugins/popularity/lang/sl/lang.php @@ -2,9 +2,12 @@ /** * Slovenian language file * - * @author Dejan Levec - * @author Boštjan Seničar - * @author Gregor Skumavc (grega.skumavc@gmail.com) * @author Matej Urbančič (mateju@svn.gnome.org) */ -$lang['submit'] = 'Pošlji'; +$lang['name'] = 'Poročilo o uporabi (nalaganje strani je lahko dolgotrajno)'; +$lang['submit'] = 'Pošlji podatke'; +$lang['autosubmit'] = 'Samodejno pošlji podatke enkrat mesečno'; +$lang['submissionFailed'] = 'Podatkov zaradi napake ni mogoče poslati:'; +$lang['submitDirectly'] = 'Podatke je mogoče poslati ročno s pošiljanjem preko obrazca.'; +$lang['autosubmitError'] = 'Zadnji poskus samodejnega pošiljanja je spodletel zaradi napake:'; +$lang['lastSent'] = 'Podatki so bili uspešno poslani.'; diff --git a/lib/plugins/popularity/lang/sl/submitted.txt b/lib/plugins/popularity/lang/sl/submitted.txt new file mode 100644 index 000000000..988afd837 --- /dev/null +++ b/lib/plugins/popularity/lang/sl/submitted.txt @@ -0,0 +1,3 @@ +====== Poroilo o uporabi ====== + +Podatki so bili uspeno poslani. diff --git a/lib/plugins/revert/lang/sl/intro.txt b/lib/plugins/revert/lang/sl/intro.txt new file mode 100644 index 000000000..c63f281ed --- /dev/null +++ b/lib/plugins/revert/lang/sl/intro.txt @@ -0,0 +1,3 @@ +====== Povrnitev okvarjene vsebine ====== + +Na tej strani je mogoe povrniti vsebino wiki strani na izvorne vrednosti po napadu na stran in vpisu neelenih vsebin. Za iskanje strani z neeleno vsebino, uporabite iskalnik z ustreznim nizom (npr. naslov URL), potem pa potrdite, da so najdene strani res z neeleno vsebino in nato povrnite stanje na zadnjo pravo razliico. diff --git a/lib/plugins/revert/lang/sl/lang.php b/lib/plugins/revert/lang/sl/lang.php index 9d249edbd..92b0427ce 100644 --- a/lib/plugins/revert/lang/sl/lang.php +++ b/lib/plugins/revert/lang/sl/lang.php @@ -2,8 +2,14 @@ /** * Slovenian language file * - * @author Dejan Levec - * @author Boštjan Seničar - * @author Gregor Skumavc (grega.skumavc@gmail.com) * @author Matej Urbančič (mateju@svn.gnome.org) */ +$lang['menu'] = 'Povrnitev okvarjene vsebine'; +$lang['filter'] = 'Iskanje strani z neželeno vsebino'; +$lang['revert'] = 'Povrni izbrane strani'; +$lang['reverted'] = 'stran %s je povrnjena na različico %s'; +$lang['removed'] = 'stran %s je odstranjena'; +$lang['revstart'] = 'Postopek povrnitve vsebine je začet. Opravilo je lahko dolgotrajno. V kolikor opravilo časovno poteče prek končanjem povrnitve, bo treba postopek ponoviti na manjših odsekih.'; +$lang['revstop'] = 'Postopek povrnitve vsebine je uspešno končan.'; +$lang['note1'] = 'Opomba: iskanje upošteva velikost črk'; +$lang['note2'] = 'Opomba: stran bo povrnjena na zadnjo različico brez neželenega pojma %s.'; diff --git a/lib/plugins/usermanager/lang/sl/edit.txt b/lib/plugins/usermanager/lang/sl/edit.txt index 4ad01441f..e80bc8585 100644 --- a/lib/plugins/usermanager/lang/sl/edit.txt +++ b/lib/plugins/usermanager/lang/sl/edit.txt @@ -1 +1 @@ -===== Urejanje uporabnika ===== \ No newline at end of file +===== Urejanje uporabnikov ===== \ No newline at end of file diff --git a/lib/plugins/usermanager/lang/sl/intro.txt b/lib/plugins/usermanager/lang/sl/intro.txt new file mode 100644 index 000000000..a4729a8a5 --- /dev/null +++ b/lib/plugins/usermanager/lang/sl/intro.txt @@ -0,0 +1 @@ +====== Upravljanje uporabnikov ====== diff --git a/lib/plugins/usermanager/lang/sl/lang.php b/lib/plugins/usermanager/lang/sl/lang.php index ac073b1c9..96acfd0af 100644 --- a/lib/plugins/usermanager/lang/sl/lang.php +++ b/lib/plugins/usermanager/lang/sl/lang.php @@ -7,9 +7,9 @@ * @author Gregor Skumavc (grega.skumavc@gmail.com) * @author Matej Urbančič (mateju@svn.gnome.org) */ -$lang['menu'] = 'Urejanje uporabnikov'; +$lang['menu'] = 'Upravljanje uporabnikov'; $lang['noauth'] = '(overjanje istovetnosti uporabnikov ni na voljo)'; -$lang['nosupport'] = '(urejanje uporabnikov ni podprto)'; +$lang['nosupport'] = '(upravljanje računov uporabnikov ni podprto)'; $lang['badauth'] = 'neveljaven način overjanja'; $lang['user_id'] = 'Uporabnik'; $lang['user_pass'] = 'Geslo'; @@ -26,7 +26,7 @@ $lang['edit_prompt'] = 'Uredi tega uporabnika'; $lang['modify'] = 'Shrani spremembe'; $lang['search'] = 'Iskanje'; $lang['search_prompt'] = 'Poišči'; -$lang['clear'] = 'Ponastavi filter iskanja'; +$lang['clear'] = 'Počisti filter iskanja'; $lang['filter'] = 'Filter'; $lang['summary'] = 'Izpisani so uporabniki %1$d-%2$d od skupno %3$d. Vseh uporabnikov je %4$d.'; $lang['nonefound'] = 'Ni najdenih uporabnikov. Vseh uporabnikov je %d.'; @@ -34,6 +34,17 @@ $lang['delete_ok'] = '%d uporabnikov je izbrisanih'; $lang['delete_fail'] = '%d ni bilo mogoče izbrisati'; $lang['update_ok'] = 'Uporabniški račun je uspešno posodobljen'; $lang['update_fail'] = 'Posodobitev uporabniškega računa je spodletela'; +$lang['update_exists'] = 'Spreminjanje imena uporabnika je spodletelo. Navedeno uporabniško ime (%s) že obstaja (vse ostale spremembe bodo uveljavljene).'; +$lang['start'] = 'Začetni'; $lang['prev'] = 'Predhodni'; $lang['next'] = 'Naslednji'; -$lang['last'] = 'Zadnji'; +$lang['last'] = 'Končni'; +$lang['edit_usermissing'] = 'Izbranega uporabnika ni mogoče najti. Navedeno uporabniško ime je morda izbrisano ali spremenjeno.'; +$lang['user_notify'] = 'Obvesti uporabnika'; +$lang['note_notify'] = 'Obvestilna sporočila so poslana le, če uporabnik prejme novo geslo za dostop do strani.'; +$lang['note_group'] = 'Nov uporabnik bo dodan k privzeti skupini (%s), v kolikor ni navedene druge skupine.'; +$lang['note_pass'] = 'Geslo bo ustvarjeno samodejno, v kolikor je polje izpuščeno in je omogočeno obveščanje uporabnika.'; +$lang['add_ok'] = 'Uporabnik je uspešno dodan'; +$lang['add_fail'] = 'Dodajanje uporabnika je spodletelo'; +$lang['notify_ok'] = 'Obvestilno sporočilo je poslano.'; +$lang['notify_fail'] = 'Obvestilnega sporočila ni mogoče poslati.'; -- cgit v1.2.3 From 04556a0aabe1497bd711ca45405b8cfa2888d427 Mon Sep 17 00:00:00 2001 From: Kristian Kankainen Date: Fri, 18 Mar 2011 13:04:30 +0100 Subject: Estonian language update --- inc/lang/et/lang.php | 418 ++++++++++++++++--------------- lib/plugins/acl/lang/et/lang.php | 32 ++- lib/plugins/config/lang/et/lang.php | 6 + lib/plugins/plugin/lang/et/lang.php | 6 + lib/plugins/popularity/lang/et/lang.php | 6 + lib/plugins/revert/lang/et/lang.php | 6 + lib/plugins/usermanager/lang/et/lang.php | 6 + 7 files changed, 256 insertions(+), 224 deletions(-) create mode 100644 lib/plugins/config/lang/et/lang.php create mode 100644 lib/plugins/plugin/lang/et/lang.php create mode 100644 lib/plugins/popularity/lang/et/lang.php create mode 100644 lib/plugins/revert/lang/et/lang.php create mode 100644 lib/plugins/usermanager/lang/et/lang.php diff --git a/inc/lang/et/lang.php b/inc/lang/et/lang.php index 5fc9c88d5..c7060ebca 100644 --- a/inc/lang/et/lang.php +++ b/inc/lang/et/lang.php @@ -3,213 +3,217 @@ * Estonian language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Oliver S6ro - * @author Aari Juhanson - * @author Kaiko Kaur + * @author Oliver S6ro + * @author Aari Juhanson + * @author Kaiko Kaur + * @author kristian.kankainen@kuu.la */ -$lang['encoding'] = 'utf-8'; -$lang['direction'] = 'ltr'; -$lang['doublequoteopening'] = '„';//„ -$lang['doublequoteclosing'] = '“';//“ -$lang['singlequoteopening'] = '‚';//‚ -$lang['singlequoteclosing'] = '‘';//‘ - -$lang['btn_edit'] = 'Toimeta seda lehte'; -$lang['btn_source'] = 'Näita lehepõhja'; -$lang['btn_show'] = 'Näita lehte'; -$lang['btn_create'] = 'Tekita selle lingi alla leht'; -$lang['btn_search'] = 'Otsi'; -$lang['btn_save'] = 'Salvesta'; -$lang['btn_preview']= 'Eelvaade'; -$lang['btn_top'] = 'Tagasi lehe algusesse'; -$lang['btn_revs'] = 'Eelmised versioonid'; -$lang['btn_recent'] = 'Viimased muudatused'; -$lang['btn_upload'] = 'Lae üles'; -$lang['btn_cancel'] = 'Katkesta'; -$lang['btn_index'] = 'Sisukord'; -$lang['btn_secedit']= 'Toimeta'; -$lang['btn_login'] = 'Logi sisse'; -$lang['btn_logout'] = 'Logi välja'; -$lang['btn_admin'] = 'Administreeri'; -$lang['btn_update'] = 'Uuenda'; -$lang['btn_delete'] = 'Kustuta'; -$lang['btn_newer'] = '<< varajasemad'; -$lang['btn_older'] = '>> hilisemad'; -$lang['btn_back'] = 'Tagasi'; -$lang['btn_backtomedia'] = 'Tagasi faili valikusse'; -$lang['btn_profile'] = 'Minu info'; -$lang['btn_reset'] = 'Taasta'; -$lang['btn_resendpwd'] = 'Saada uus parool'; -$lang['btn_draft'] = 'Toimeta mustandit'; -$lang['btn_recover'] = 'Taata mustand'; -$lang['btn_draftdel'] = 'Kustuta mustand'; -$lang['btn_register'] = 'Registreeri uus kasutaja'; - -$lang['newpass'] = 'Uus parool'; -$lang['oldpass'] = 'Vana parool'; -$lang['passchk'] = 'Korda uut parooli'; -$lang['profile'] = 'Kasutaja info'; -$lang['minoredit'] = 'Ebaolulised muudatused'; -$lang['draftdate'] = 'Mustand automaatselt salvestatud'; -$lang['regsuccess2'] = 'Kasutaja sai tehtud.'; -$lang['regbadpass'] = 'Uus parool on kirjutatud erinevalt. Proovi uuesti.'; -$lang['uploadexist'] = 'Fail on juba olemas. Midagi ei muudetud.'; -$lang['deletesucc'] = 'Fail nimega "%s" sai kustutatud.'; -$lang['deletefail'] = 'Faili nimega "%s" ei kustutatud (kontrolli õigusi).'; -$lang['mediainuse'] = 'Faili nimega "%s" ei kustutatud, sest see on kasutuses.'; -$lang['js']['keepopen'] = 'Jäta aken peale valiku sooritamist avatuks'; -$lang['js']['hidedetails'] = 'Peida detailid'; -$lang['mediausage'] = 'Kasuta järgmist kirjapilti sellele failile viitamaks:'; -$lang['mediaview'] = 'Vaata faili algsel kujul.'; -$lang['mediaroot'] = 'juur'; -$lang['mediaupload'] = 'Lae fail sellesse nimeruumi (kataloogi). Et tekitada veel alam nimeruum kasuta koolonit Wiki nimes.'; -$lang['mediaextchange'] = 'Faili laiend .%s-st %s-ks!'; -$lang['ref_inuse'] = 'Seda faili ei saa kustutada, sest teda kasutavad järgmised lehed:'; -$lang['ref_hidden'] = 'Mõned viidad failile on lehtedel, millele sul ei ole ligipääsu'; -$lang['youarehere'] = 'Sa oled siin'; -$lang['mail_new_user'] = 'Uus kasutaja:'; -$lang['qb_strike'] = 'Läbijoonitud tekst'; -$lang['qb_smileys'] = 'Emotikonid'; -$lang['qb_chars'] = 'Erisümbolid'; -$lang['admin_register'] = 'Lisa kasutaja'; - - -#$lang['reference'] = ''; -#$lang['btn_backlink'] = ''; -#$lang['profna'] = ''; -$lang['btn_subscribe'] = 'Jälgi seda lehte (teated meilile)'; -$lang['btn_unsubscribe'] = 'Lõpeta lehe jälgimine'; -$lang['profnochange'] = 'Muutused puuduvad.'; -$lang['profnoempty'] = 'Tühi nimi ega meiliaadress pole lubatud.'; -$lang['profchanged'] = 'Kasutaja info edukalt muudetud'; -$lang['pwdforget'] = 'Unustasid parooli? Tee uus'; -$lang['resendna'] = 'See wiki ei toeta parooli taassaatmist.'; -$lang['resendpwd'] = 'Saada uus parool'; -$lang['resendpwdmissing'] = 'Khmm... Sa pead täitma kõik väljad.'; -$lang['resendpwdnouser'] = 'Aga sellist kasutajat ei ole.'; -$lang['resendpwdbadauth'] = 'See autentimiskood ei ole õige. Kontrolli, et kopeerisid terve lingi.'; -$lang['resendpwdconfirm'] = 'Kinnituslink saadeti meilile.'; -$lang['resendpwdsuccess'] = 'Uus parool saadeti Sinu meilile.'; -$lang['txt_overwrt'] = 'Kirjutan olemasoleva faili üle'; -$lang['metaedit'] = 'Muuda lisainfot'; -$lang['metasaveerr'] = 'Lisainfo salvestamine läks untsu.'; -$lang['metasaveok'] = 'Lisainfo salvestatud'; -$lang['img_backto'] = 'Tagasi'; -$lang['img_title'] = 'Tiitel'; -$lang['img_caption'] = 'Kirjeldus'; -$lang['img_date'] = 'Kuupäev'; -$lang['img_fname'] = 'Faili nimi'; -$lang['img_fsize'] = 'Suurus'; -$lang['img_artist'] = 'Autor'; -#$lang['img_copyr'] = ''; -$lang['img_format'] = 'Formaat'; -$lang['img_camera'] = 'Kaamera'; -$lang['img_keywords'] = 'Võtmesõnad'; - -$lang['i_chooselang'] = 'Vali keel'; -$lang['i_installer'] = 'DokuWiki paigaldaja'; -$lang['i_wikiname'] = 'Wiki nimi'; -$lang['i_enableacl'] = 'Kas lubada kasutajate haldus (soovitatav)'; -$lang['i_superuser'] = 'Superkasutaja'; -$lang['i_problems'] = 'Paigaldaja leidis mõned vead, mis on allpool välja toodud. Enne vigade eemaldamist ei saa jätkata.'; -$lang['i_modified'] = 'Õnnetuste vältimiseks läheb see skript käima ainult värskelt paigaldatud ja muutmata Dokuwiki peal. - Sa peaksid ilmselt kogu koodi uuesti lahti pakkima. Vaata ka Dokuwiki installeerimis juhendit'; -$lang['i_funcna'] = 'PHP funktsiooni %s ei ole olemas.võibolla sinu serveri hooldaja on selle mingil põhjusel keelanud?'; -$lang['i_permfail'] = 'Dokuwiki ei saa kirjutada faili %s. Kontrolli serveris failide õigused üle.'; -$lang['i_confexists'] = '%s on juba olemas'; -$lang['i_writeerr'] = 'Faili %s ei lubata tekitada. Kontrolli kataloogi ja faili õigusi.'; -#$lang['i_badhash'] = ''; -$lang['i_badval'] = '%s - lubamatu või tühi väärtus'; -$lang['i_success'] = 'Seadistamine on õnnelikult lõpule viidud. Sa võid nüüd kustutada faili install.php. Alusta oma uue DokuWiki täitmist.'; -$lang['i_failure'] = 'Konfiguratsiooni faili kirjutamisel esines vigu. Võimalik, et pead need käsitsi parandama enne uue DokuWiki täitma asumist.'; -$lang['i_policy'] = 'Wiki õiguste algne poliitika'; -$lang['i_pol0'] = 'Avatud (lugemine, kirjutamine ja üleslaadimine kõigile lubatud)'; -$lang['i_pol1'] = 'Avalikuks lugemiseks (lugeda saavad kõik, kirjutada ja üles laadida vaid registreeritud kasutajad)'; -$lang['i_pol2'] = 'Suletud (kõik õigused, kaasaarvatud lugemine on lubatud vaid registreeritud kasutajatele)'; - -$lang['loggedinas'] = 'Logis sisse kui'; -$lang['user'] = 'Kasutaja'; -$lang['pass'] = 'Parool'; -$lang['remember'] = 'Pea mind meeles'; -$lang['fullname'] = 'Täielik nimi'; -$lang['email'] = 'E-post'; -$lang['badlogin'] = 'Oops, Sinu kasutajanimi või parool oli vale.'; - -$lang['regmissing'] = 'Kõik väljad tuleb ära täita.'; -$lang['reguexists'] = 'Tegelikult on sellise nimega kasutaja juba olemas.'; -$lang['regsuccess'] = 'Kasutaja sai tehtud. Parool saadeti Sulle e-posti aadressil.'; -$lang['regmailfail']= 'Ilmselt tekkis e-posti teel parooli saatmisel mingi tõrge. Palun suhtle sel teemal +$lang['encoding'] = 'utf-8'; +$lang['direction'] = 'ltr'; +$lang['doublequoteopening'] = '„'; +$lang['doublequoteclosing'] = '“'; +$lang['singlequoteopening'] = '‚'; +$lang['singlequoteclosing'] = '‘'; +$lang['btn_edit'] = 'Toimeta seda lehte'; +$lang['btn_source'] = 'Näita lehepõhja'; +$lang['btn_show'] = 'Näita lehte'; +$lang['btn_create'] = 'Tekita selle lingi alla leht'; +$lang['btn_search'] = 'Otsi'; +$lang['btn_save'] = 'Salvesta'; +$lang['btn_preview'] = 'Eelvaade'; +$lang['btn_top'] = 'Tagasi lehe algusesse'; +$lang['btn_newer'] = '<< varajasemad'; +$lang['btn_older'] = '>> hilisemad'; +$lang['btn_revs'] = 'Eelmised versioonid'; +$lang['btn_recent'] = 'Viimased muudatused'; +$lang['btn_upload'] = 'Lae üles'; +$lang['btn_cancel'] = 'Katkesta'; +$lang['btn_index'] = 'Sisukord'; +$lang['btn_secedit'] = 'Toimeta'; +$lang['btn_login'] = 'Logi sisse'; +$lang['btn_logout'] = 'Logi välja'; +$lang['btn_admin'] = 'Administreeri'; +$lang['btn_update'] = 'Uuenda'; +$lang['btn_delete'] = 'Kustuta'; +$lang['btn_back'] = 'Tagasi'; +$lang['btn_backtomedia'] = 'Tagasi faili valikusse'; +$lang['btn_subscribe'] = 'Jälgi seda lehte (teated meilile)'; +$lang['btn_profile'] = 'Minu info'; +$lang['btn_reset'] = 'Taasta'; +$lang['btn_resendpwd'] = 'Saada uus parool'; +$lang['btn_draft'] = 'Toimeta mustandit'; +$lang['btn_recover'] = 'Taata mustand'; +$lang['btn_draftdel'] = 'Kustuta mustand'; +$lang['btn_revert'] = 'Taasta'; +$lang['btn_register'] = 'Registreeri uus kasutaja'; +$lang['loggedinas'] = 'Logis sisse kui'; +$lang['user'] = 'Kasutaja'; +$lang['pass'] = 'Parool'; +$lang['newpass'] = 'Uus parool'; +$lang['oldpass'] = 'Vana parool'; +$lang['passchk'] = 'Korda uut parooli'; +$lang['remember'] = 'Pea mind meeles'; +$lang['fullname'] = 'Täielik nimi'; +$lang['email'] = 'E-post'; +$lang['profile'] = 'Kasutaja info'; +$lang['badlogin'] = 'Oops, Sinu kasutajanimi või parool oli vale.'; +$lang['minoredit'] = 'Ebaolulised muudatused'; +$lang['draftdate'] = 'Mustand automaatselt salvestatud'; +$lang['regmissing'] = 'Kõik väljad tuleb ära täita.'; +$lang['reguexists'] = 'Tegelikult on sellise nimega kasutaja juba olemas.'; +$lang['regsuccess'] = 'Kasutaja sai tehtud. Parool saadeti Sulle e-posti aadressil.'; +$lang['regsuccess2'] = 'Kasutaja sai tehtud.'; +$lang['regmailfail'] = 'Ilmselt tekkis e-posti teel parooli saatmisel mingi tõrge. Palun suhtle sel teemal oma serveri administraatoriga!'; -$lang['regbadmail'] = 'Tundub, et Sinu antud e-posti aadress ei toimi - kui Sa arvad, et tegemist on +$lang['regbadmail'] = 'Tundub, et Sinu antud e-posti aadress ei toimi - kui Sa arvad, et tegemist on ekstitusega, suhtle oma serveri administraatoriga'; -$lang['regpwmail'] = 'Sinu DokuWiki parool'; -$lang['reghere'] = 'Sul ei olegi veel kasutajakontot? No aga tekita see siis endale!'; - -$lang['txt_upload'] = 'Vali fail, mida üles laadida'; -$lang['txt_filename'] = 'Siseta oma Wikinimi (soovituslik)'; -$lang['lockedby'] = 'Praegu on selle lukustanud'; -$lang['lockexpire'] = 'Lukustus aegub'; -$lang['willexpire'] = 'Teie lukustus selle lehe toimetamisele aegub umbes minuti pärast.\nIgasugu probleemide vältimiseks kasuta eelvaate nuppu, et lukustusarvesti taas tööle panna.'; - -$lang['js']['notsavedyet'] = "Sul on seal salvestamata muudatusi, mis kohe kõige kaduva teed lähevad.\nKas Sa ikka tahad edasi liikuda?"; -$lang['rssfailed'] = 'Sinu soovitud info ammutamisel tekkis viga: '; -$lang['nothingfound']= 'Oops, aga mitte muhvigi ei leitud.'; - -$lang['mediaselect'] = 'Hunnik faile'; -$lang['fileupload'] = 'Faili üleslaadimine'; -$lang['uploadsucc'] = 'Üleslaadimine läks ootuspäraselt hästi'; -$lang['uploadfail'] = 'Üleslaadimine läks nässu. Äkki pole Sa selleks lihtsalt piisavalt võimukas tegija?'; -$lang['uploadwrong'] = 'Ei saa Sa midagi üles laadida. Oops, aga seda tüüpi faili sul lihtsalt ei lubata üles laadida'; -$lang['namespaces'] = 'Alajaotus'; -$lang['mediafiles'] = 'Failid on Sulle kättesaadavad'; - -$lang['hits'] = 'Päringu tabamused'; -$lang['quickhits'] = 'Päringule vastavad lehed'; -$lang['toc'] = 'Sisujuht'; -$lang['current'] = 'Hetkel kehtiv'; -$lang['yours'] = 'Sinu versioon'; -$lang['diff'] = 'Näita erinevusi hetkel kehtiva versiooniga'; -$lang['line'] = 'Rida'; -$lang['breadcrumb'] = 'Käidud rada'; -$lang['lastmod'] = 'Viimati muutnud'; -$lang['by'] = 'persoon'; -$lang['deleted'] = 'eemaldatud'; -$lang['created'] = 'tekitatud'; -$lang['restored'] = 'vana versioon taastatud'; -$lang['summary'] = 'kokkuvõte muudatustest'; - -$lang['mail_newpage'] = 'leht lisatud:'; -$lang['mail_changed'] = 'leht muudetud'; - -$lang['nosmblinks'] = 'Windowsis võrguarvutiga ühendamine toimib ainult Internet Exploreris ja -sisevõrgus.\nAga Sa saad õnneks omale lingi kopeerida ja hiljem kuhugi kleepida.'; - -$lang['qb_bold'] = 'Rasvane kiri'; -$lang['qb_italic'] = 'Kaldkiri'; -$lang['qb_underl'] = 'Alajoonega kiri'; -$lang['qb_code'] = 'Koodi tekst'; -$lang['qb_h1'] = '1. astme pealkiri'; -$lang['qb_h2'] = '2. astme pealkiri'; -$lang['qb_h3'] = '3. astme pealkiri'; -$lang['qb_h4'] = '4. astme pealkiri'; -$lang['qb_h5'] = '5. astme pealkiri'; -$lang['qb_link'] = 'Siselink'; -$lang['qb_extlink'] = 'Välislink'; -$lang['qb_hr'] = 'Horisontaalne vahejoon'; -$lang['qb_ol'] = 'Nummerdatud nimikiri'; -$lang['qb_ul'] = 'Mummuga nimekiri'; -$lang['qb_media'] = 'Lisa pilte ja muid faile'; -$lang['qb_sig'] = 'Lisa allkiri!'; - -$lang['authmodfailed'] = 'Vigane kasutajate autentimise konfiguratsioon. Palun teavita sellest serveri haldajat.'; -$lang['authtempfail'] = 'Kasutajate autentimine on ajutiselt rivist väljas. Kui see olukord mõne aja jooksul ei parane, siis teavita sellest serveri haldajat.'; - -$lang['js']['del_confirm']= 'Kas kustutame selle kirje?'; - -#$lang['subscribe_success'] = ''; -#$lang['subscribe_error'] = ''; -#$lang['subscribe_noaddress'] = ''; -#$lang['unsubscribe_success'] = ''; -#$lang['unsubscribe_error'] = ''; - -//Setup VIM: ex: et ts=2 : +$lang['regbadpass'] = 'Uus parool on kirjutatud erinevalt. Proovi uuesti.'; +$lang['regpwmail'] = 'Sinu DokuWiki parool'; +$lang['reghere'] = 'Sul ei olegi veel kasutajakontot? No aga tekita see siis endale!'; +$lang['profna'] = 'Viki ei toeta profiili muudatusi'; +$lang['profnochange'] = 'Muutused puuduvad.'; +$lang['profnoempty'] = 'Tühi nimi ega meiliaadress pole lubatud.'; +$lang['profchanged'] = 'Kasutaja info edukalt muudetud'; +$lang['pwdforget'] = 'Unustasid parooli? Tee uus'; +$lang['resendna'] = 'See wiki ei toeta parooli taassaatmist.'; +$lang['resendpwd'] = 'Saada uus parool'; +$lang['resendpwdmissing'] = 'Khmm... Sa pead täitma kõik väljad.'; +$lang['resendpwdnouser'] = 'Aga sellist kasutajat ei ole.'; +$lang['resendpwdbadauth'] = 'See autentimiskood ei ole õige. Kontrolli, et kopeerisid terve lingi.'; +$lang['resendpwdconfirm'] = 'Kinnituslink saadeti meilile.'; +$lang['resendpwdsuccess'] = 'Uus parool saadeti Sinu meilile.'; +$lang['searchmedia'] = 'Otsi failinime:'; +$lang['searchmedia_in'] = 'Otsi %s'; +$lang['txt_upload'] = 'Vali fail, mida üles laadida'; +$lang['txt_filename'] = 'Siseta oma Wikinimi (soovituslik)'; +$lang['txt_overwrt'] = 'Kirjutan olemasoleva faili üle'; +$lang['lockedby'] = 'Praegu on selle lukustanud'; +$lang['lockexpire'] = 'Lukustus aegub'; +$lang['willexpire'] = 'Teie lukustus selle lehe toimetamisele aegub umbes minuti pärast.\nIgasugu probleemide vältimiseks kasuta eelvaate nuppu, et lukustusarvesti taas tööle panna.'; +$lang['js']['notsavedyet'] = 'Sul on seal salvestamata muudatusi, mis kohe kõige kaduva teed lähevad. +Kas Sa ikka tahad edasi liikuda?'; +$lang['js']['searchmedia'] = 'Otsi faile'; +$lang['js']['keepopen'] = 'Jäta aken peale valiku sooritamist avatuks'; +$lang['js']['hidedetails'] = 'Peida detailid'; +$lang['js']['mediatitle'] = 'Lingi sätted'; +$lang['js']['mediadisplay'] = 'Lingi liik'; +$lang['js']['mediaalign'] = 'Joondus'; +$lang['js']['mediasize'] = 'Pildi mõõtmed'; +$lang['js']['mediatarget'] = 'Lingi siht'; +$lang['js']['mediaclose'] = 'Sulge'; +$lang['js']['mediainsert'] = 'Sisesta'; +$lang['js']['mediadisplayimg'] = 'Näita pilti.'; +$lang['js']['mediadisplaylnk'] = 'Näita ainult linki.'; +$lang['js']['mediasmall'] = 'Väiksem suurus'; +$lang['js']['mediamedium'] = 'Keskmine suurus'; +$lang['js']['medialarge'] = 'Suurem suurus'; +$lang['js']['mediaoriginal'] = 'Originaali suurus'; +$lang['js']['medialnk'] = 'Link üksikasjadele'; +$lang['js']['mediadirect'] = 'Otselink originaalile'; +$lang['js']['medianolnk'] = 'Ilma lingita'; +$lang['js']['medianolink'] = 'Ära lingi pilti'; +$lang['js']['medialeft'] = 'Joonda pilt vasakule.'; +$lang['js']['mediaright'] = 'Joonda pilt paremale.'; +$lang['js']['mediacenter'] = 'Joonda pilt keskele.'; +$lang['js']['medianoalign'] = 'Ära joonda.'; +$lang['js']['nosmblinks'] = 'Lingid \'Windows shares\'ile töötab ainult Microsoft Internet Exploreriga. +Siiski võid kopeerida ja asetada lingi.'; +$lang['js']['linkwiz'] = 'Lingi nõustaja'; +$lang['js']['linkto'] = 'Lingi:'; +$lang['js']['del_confirm'] = 'Kas kustutame selle kirje?'; +$lang['js']['mu_btn'] = 'Laadi üles mittu faili'; +$lang['rssfailed'] = 'Sinu soovitud info ammutamisel tekkis viga: '; +$lang['nothingfound'] = 'Oops, aga mitte muhvigi ei leitud.'; +$lang['mediaselect'] = 'Hunnik faile'; +$lang['fileupload'] = 'Faili üleslaadimine'; +$lang['uploadsucc'] = 'Üleslaadimine läks ootuspäraselt hästi'; +$lang['uploadfail'] = 'Üleslaadimine läks nässu. Äkki pole Sa selleks lihtsalt piisavalt võimukas tegija?'; +$lang['uploadwrong'] = 'Ei saa Sa midagi üles laadida. Oops, aga seda tüüpi faili sul lihtsalt ei lubata üles laadida'; +$lang['uploadexist'] = 'Fail on juba olemas. Midagi ei muudetud.'; +$lang['uploadbadcontent'] = 'Üles laaditu ei sobinud %s faililaiendiga.'; +$lang['uploadsize'] = 'Üles laaditud fail on liiga suur (maksimaalne suurus on %s).'; +$lang['deletesucc'] = 'Fail nimega "%s" sai kustutatud.'; +$lang['deletefail'] = 'Faili nimega "%s" ei kustutatud (kontrolli õigusi).'; +$lang['mediainuse'] = 'Faili nimega "%s" ei kustutatud, sest see on kasutuses.'; +$lang['namespaces'] = 'Alajaotus'; +$lang['mediafiles'] = 'Failid on Sulle kättesaadavad'; +$lang['accessdenied'] = 'Ligipääs keelatud.'; +$lang['mediausage'] = 'Kasuta järgmist kirjapilti sellele failile viitamaks:'; +$lang['mediaview'] = 'Vaata faili algsel kujul.'; +$lang['mediaroot'] = 'juur'; +$lang['mediaupload'] = 'Lae fail sellesse nimeruumi (kataloogi). Et tekitada veel alam nimeruum kasuta koolonit Wiki nimes.'; +$lang['mediaextchange'] = 'Faili laiend .%s-st %s-ks!'; +$lang['ref_inuse'] = 'Seda faili ei saa kustutada, sest teda kasutavad järgmised lehed:'; +$lang['ref_hidden'] = 'Mõned viidad failile on lehtedel, millele sul ei ole ligipääsu'; +$lang['hits'] = 'Päringu tabamused'; +$lang['quickhits'] = 'Päringule vastavad lehed'; +$lang['toc'] = 'Sisujuht'; +$lang['current'] = 'Hetkel kehtiv'; +$lang['yours'] = 'Sinu versioon'; +$lang['diff'] = 'Näita erinevusi hetkel kehtiva versiooniga'; +$lang['line'] = 'Rida'; +$lang['breadcrumb'] = 'Käidud rada'; +$lang['youarehere'] = 'Sa oled siin'; +$lang['lastmod'] = 'Viimati muutnud'; +$lang['by'] = 'persoon'; +$lang['deleted'] = 'eemaldatud'; +$lang['created'] = 'tekitatud'; +$lang['restored'] = 'vana versioon taastatud'; +$lang['summary'] = 'kokkuvõte muudatustest'; +$lang['mail_newpage'] = 'leht lisatud:'; +$lang['mail_changed'] = 'leht muudetud'; +$lang['mail_new_user'] = 'Uus kasutaja:'; +$lang['qb_bold'] = 'Rasvane kiri'; +$lang['qb_italic'] = 'Kaldkiri'; +$lang['qb_underl'] = 'Alajoonega kiri'; +$lang['qb_code'] = 'Koodi tekst'; +$lang['qb_strike'] = 'Läbijoonitud tekst'; +$lang['qb_h1'] = '1. astme pealkiri'; +$lang['qb_h2'] = '2. astme pealkiri'; +$lang['qb_h3'] = '3. astme pealkiri'; +$lang['qb_h4'] = '4. astme pealkiri'; +$lang['qb_h5'] = '5. astme pealkiri'; +$lang['qb_link'] = 'Siselink'; +$lang['qb_extlink'] = 'Välislink'; +$lang['qb_hr'] = 'Horisontaalne vahejoon'; +$lang['qb_ol'] = 'Nummerdatud nimikiri'; +$lang['qb_ul'] = 'Mummuga nimekiri'; +$lang['qb_media'] = 'Lisa pilte ja muid faile'; +$lang['qb_sig'] = 'Lisa allkiri!'; +$lang['qb_smileys'] = 'Emotikonid'; +$lang['qb_chars'] = 'Erisümbolid'; +$lang['admin_register'] = 'Lisa kasutaja'; +$lang['metaedit'] = 'Muuda lisainfot'; +$lang['metasaveerr'] = 'Lisainfo salvestamine läks untsu.'; +$lang['metasaveok'] = 'Lisainfo salvestatud'; +$lang['img_backto'] = 'Tagasi'; +$lang['img_title'] = 'Tiitel'; +$lang['img_caption'] = 'Kirjeldus'; +$lang['img_date'] = 'Kuupäev'; +$lang['img_fname'] = 'Faili nimi'; +$lang['img_fsize'] = 'Suurus'; +$lang['img_artist'] = 'Autor'; +$lang['img_format'] = 'Formaat'; +$lang['img_camera'] = 'Kaamera'; +$lang['img_keywords'] = 'Võtmesõnad'; +$lang['authmodfailed'] = 'Vigane kasutajate autentimise konfiguratsioon. Palun teavita sellest serveri haldajat.'; +$lang['authtempfail'] = 'Kasutajate autentimine on ajutiselt rivist väljas. Kui see olukord mõne aja jooksul ei parane, siis teavita sellest serveri haldajat.'; +$lang['i_chooselang'] = 'Vali keel'; +$lang['i_installer'] = 'DokuWiki paigaldaja'; +$lang['i_wikiname'] = 'Wiki nimi'; +$lang['i_enableacl'] = 'Kas lubada kasutajate haldus (soovitatav)'; +$lang['i_superuser'] = 'Superkasutaja'; +$lang['i_problems'] = 'Paigaldaja leidis mõned vead, mis on allpool välja toodud. Enne vigade eemaldamist ei saa jätkata.'; +$lang['i_modified'] = 'Õnnetuste vältimiseks läheb see skript käima ainult värskelt paigaldatud ja muutmata Dokuwiki peal. + Sa peaksid ilmselt kogu koodi uuesti lahti pakkima. Vaata ka Dokuwiki installeerimis juhendit'; +$lang['i_funcna'] = 'PHP funktsiooni %s ei ole olemas.võibolla sinu serveri hooldaja on selle mingil põhjusel keelanud?'; +$lang['i_permfail'] = 'Dokuwiki ei saa kirjutada faili %s. Kontrolli serveris failide õigused üle.'; +$lang['i_confexists'] = '%s on juba olemas'; +$lang['i_writeerr'] = 'Faili %s ei lubata tekitada. Kontrolli kataloogi ja faili õigusi.'; +$lang['i_badval'] = '%s - lubamatu või tühi väärtus'; +$lang['i_success'] = 'Seadistamine on õnnelikult lõpule viidud. Sa võid nüüd kustutada faili install.php. Alusta oma uue DokuWiki täitmist.'; +$lang['i_failure'] = 'Konfiguratsiooni faili kirjutamisel esines vigu. Võimalik, et pead need käsitsi parandama enne uue DokuWiki täitma asumist.'; +$lang['i_policy'] = 'Wiki õiguste algne poliitika'; +$lang['i_pol0'] = 'Avatud (lugemine, kirjutamine ja üleslaadimine kõigile lubatud)'; +$lang['i_pol1'] = 'Avalikuks lugemiseks (lugeda saavad kõik, kirjutada ja üles laadida vaid registreeritud kasutajad)'; +$lang['i_pol2'] = 'Suletud (kõik õigused, kaasaarvatud lugemine on lubatud vaid registreeritud kasutajatele)'; diff --git a/lib/plugins/acl/lang/et/lang.php b/lib/plugins/acl/lang/et/lang.php index 2f7208b7c..04ce0c08a 100644 --- a/lib/plugins/acl/lang/et/lang.php +++ b/lib/plugins/acl/lang/et/lang.php @@ -3,21 +3,19 @@ * Estonian language file * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) - * @author Oliver S6ro - * @author Aari Juhanson - * @author Kaiko Kaur + * @author Oliver S6ro + * @author Aari Juhanson + * @author Kaiko Kaur + * @author kristian.kankainen@kuu.la */ - -$lang['admin_acl'] = 'Ligipääsukontrolli nimekirja haldamine'; -$lang['acl_group'] = 'Grupp'; -$lang['acl_user'] = 'Kasutaja'; -$lang['acl_perms'] = 'Lubatud'; -$lang['page'] = 'leht'; -$lang['namespace'] = 'alajaotus'; - -$lang['acl_perm1'] = 'Lugemine'; -$lang['acl_perm2'] = 'Toimetamine'; -$lang['acl_perm4'] = 'Tekitamine'; -$lang['acl_perm8'] = 'Üles laadimine'; -$lang['acl_new'] = 'Uue kirje lisamine'; -//Setup VIM: ex: et ts=2 : +$lang['admin_acl'] = 'Ligipääsukontrolli nimekirja haldamine'; +$lang['acl_group'] = 'Grupp'; +$lang['acl_user'] = 'Kasutaja'; +$lang['acl_perms'] = 'Lubatud'; +$lang['page'] = 'leht'; +$lang['namespace'] = 'alajaotus'; +$lang['acl_perm1'] = 'Lugemine'; +$lang['acl_perm2'] = 'Toimetamine'; +$lang['acl_perm4'] = 'Tekitamine'; +$lang['acl_perm8'] = 'Üles laadimine'; +$lang['acl_new'] = 'Uue kirje lisamine'; diff --git a/lib/plugins/config/lang/et/lang.php b/lib/plugins/config/lang/et/lang.php new file mode 100644 index 000000000..0ffea1244 --- /dev/null +++ b/lib/plugins/config/lang/et/lang.php @@ -0,0 +1,6 @@ + Date: Sat, 19 Mar 2011 14:16:50 +0100 Subject: warn about wrongly installed plugin When a plugin is installed in the wrong directory, the class loading will fail. This patch tries to find the correct directory from the plugin.info.txt (using the base key) and give a hint to the user on how to fix this. --- inc/plugincontroller.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index 6e361e172..cec5c73a9 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -96,7 +96,15 @@ class Doku_Plugin_Controller { //construct class and instantiate $class = $type.'_plugin_'.$name; - if (!class_exists($class)) return null; + if (!class_exists($class)){ + # the plugin might be in the wrong directory + $inf = confToHash(DOKU_PLUGIN."$dir/plugin.info.txt"); + if($inf['base'] && $inf['base'] != $plugin){ + msg("Plugin installed incorrectly. Rename plugin directory '". + hsc($plugin)."' to '".hsc($inf['base'])."'.",-1); + } + return null; + } $DOKU_PLUGINS[$type][$name] = new $class; return $DOKU_PLUGINS[$type][$name]; -- cgit v1.2.3 From 234ce57eac492a1f07414d42c0c406666f3fa887 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 19 Mar 2011 15:32:14 +0100 Subject: store session pass as hash This avoids having the blowfish encrypted pass stored together with the decryption key on the same server. --- inc/auth.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inc/auth.php b/inc/auth.php index 164ad3df9..85c8cfd7b 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -209,8 +209,9 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ $auth->useSessionCache($user) && ($session['time'] >= time()-$conf['auth_security_timeout']) && ($session['user'] == $user) && - ($session['pass'] == $pass) && //still crypted + ($session['pass'] == sha1($pass)) && //still crypted ($session['buid'] == auth_browseruid()) ){ + // he has session, cookie and browser right - let him in $_SERVER['REMOTE_USER'] = $user; $USERINFO = $session['info']; //FIXME move all references to session @@ -979,7 +980,7 @@ function auth_setCookie($user,$pass,$sticky) { } // set session $_SESSION[DOKU_COOKIE]['auth']['user'] = $user; - $_SESSION[DOKU_COOKIE]['auth']['pass'] = $pass; + $_SESSION[DOKU_COOKIE]['auth']['pass'] = sha1($pass); $_SESSION[DOKU_COOKIE]['auth']['buid'] = auth_browseruid(); $_SESSION[DOKU_COOKIE]['auth']['info'] = $USERINFO; $_SESSION[DOKU_COOKIE]['auth']['time'] = time(); -- cgit v1.2.3 From e940aea40842bfcf6db8c09bba3135cb9cb5eef9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 19 Mar 2011 19:21:52 +0100 Subject: bind non-sticky logins to the session id FS#2202 --- inc/auth.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inc/auth.php b/inc/auth.php index 85c8cfd7b..53376be34 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -189,7 +189,9 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ if ($auth->checkPass($user,$pass)){ // make logininfo globally available $_SERVER['REMOTE_USER'] = $user; - auth_setCookie($user,PMA_blowfish_encrypt($pass,auth_cookiesalt()),$sticky); + $secret = auth_cookiesalt(); + if(!$sticky) $secret .= session_id; //bind non-sticky to session + auth_setCookie($user,PMA_blowfish_encrypt($pass,$secret),$sticky); return true; }else{ //invalid credentials - log off @@ -218,7 +220,9 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ return true; } // no we don't trust it yet - recheck pass but silent - $pass = PMA_blowfish_decrypt($pass,auth_cookiesalt()); + $secret = auth_cookiesalt(); + if(!$sticky) $secret .= session_id(); //bind non-sticky to session + $pass = PMA_blowfish_decrypt($pass,$secret); return auth_login($user,$pass,$sticky,true); } } -- cgit v1.2.3 From 8cd4c12f3e3d5e9665f20afca85123145912c0e9 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 19 Mar 2011 19:52:51 +0100 Subject: replace tokenizer_cmd with action hook as discussed at http://www.freelists.org/post/dokuwiki/tokenizer-cmd-in-indexer,1 --- inc/indexer.php | 21 ++++++++++++--------- lib/plugins/config/lang/en/lang.php | 2 -- lib/plugins/config/settings/config.metadata.php | 2 -- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 7cddb7c54..0fbd939be 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -54,7 +54,7 @@ define('IDX_ASIAN', '(?:'.IDX_ASIAN1.'|'.IDX_ASIAN2.'|'.IDX_ASIAN3.')'); * Version of the indexer taking into consideration the external tokenizer. * The indexer is only compatible with data written by the same version. * - * Triggers INDEXER_VERSION_GET + * @triggers INDEXER_VERSION_GET * Plugins that modify what gets indexed should hook this event and * add their version info to the event data like so: * $data[$plugin_name] = $plugin_version; @@ -66,10 +66,7 @@ function idx_get_version(){ static $indexer_version = null; if ($indexer_version == null) { global $conf; - if($conf['external_tokenizer']) - $version = INDEXER_VERSION . '+' . trim($conf['tokenizer_cmd']); - else - $version = INDEXER_VERSION; + $version = INDEXER_VERSION; // DokuWiki version is included for the convenience of plugins $data = array('dokuwiki'=>$version); @@ -405,6 +402,10 @@ class Doku_Indexer { * * TODO: does this also need &$stopwords ? * + * @triggers INDEXER_TEXT_PREPARE + * This event allows plugins to modify the text before it gets tokenized. + * Plugins intercepting this event should also intercept INDEX_VERSION_GET + * * @param string $text plain text * @param boolean $wc are wildcards allowed? * @return array list of words in the text @@ -417,16 +418,18 @@ class Doku_Indexer { $wc = ($wc) ? '' : '\*'; $stopwords =& idx_get_stopwords(); - if ($conf['external_tokenizer'] && $conf['tokenizer_cmd'] != '') { - if (0 == io_exec($conf['tokenizer_cmd'], $text, $output)) - $text = $output; - } else { + // prepare the text to be tokenized + $evt = new Doku_Event('INDEXER_TEXT_PREPARE', $text); + if ($evt->advise_before(true)) { if (preg_match('/[^0-9A-Za-z ]/u', $text)) { // handle asian chars as single words (may fail on older PHP version) $asia = @preg_replace('/('.IDX_ASIAN.')/u', ' \1 ', $text); if (!is_null($asia)) $text = $asia; // recover from regexp falure } } + $evt->advise_after(); + unset($evt); + $text = strtr($text, array( "\r" => ' ', diff --git a/lib/plugins/config/lang/en/lang.php b/lib/plugins/config/lang/en/lang.php index d7a544850..18bfb56fa 100644 --- a/lib/plugins/config/lang/en/lang.php +++ b/lib/plugins/config/lang/en/lang.php @@ -142,8 +142,6 @@ $lang['renderer_xhtml'] = 'Renderer to use for main (xhtml) wiki output'; $lang['renderer__core'] = '%s (dokuwiki core)'; $lang['renderer__plugin'] = '%s (plugin)'; $lang['rememberme'] = 'Allow permanent login cookies (remember me)'; -$lang['external_tokenizer'] = 'Use an external program to split pages into words for indexing'; -$lang['tokenizer_cmd'] = 'Command line to start the external tokenizer'; $lang['rss_type'] = 'XML feed type'; $lang['rss_linkto'] = 'XML feed links to'; diff --git a/lib/plugins/config/settings/config.metadata.php b/lib/plugins/config/settings/config.metadata.php index ca2cd0c12..af7e63a61 100644 --- a/lib/plugins/config/settings/config.metadata.php +++ b/lib/plugins/config/settings/config.metadata.php @@ -194,8 +194,6 @@ $meta['broken_iua'] = array('onoff'); $meta['xsendfile'] = array('multichoice','_choices' => array(0,1,2,3)); $meta['renderer_xhtml'] = array('renderer','_format' => 'xhtml','_choices' => array('xhtml')); $meta['readdircache'] = array('numeric'); -$meta['external_tokenizer'] = array('onoff'); -$meta['tokenizer_cmd'] = array('string'); $meta['_network'] = array('fieldset'); $meta['proxy____host'] = array('string','_pattern' => '#^(|[a-z0-9\-\.+]+)$#i'); -- cgit v1.2.3 From ac4be4d7b593a3b1762bd1ffb4f6ac9a5f22edd4 Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Mon, 21 Mar 2011 19:18:34 +0530 Subject: Minor: Edited the delta_time function for php5 --- inc/init.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/inc/init.php b/inc/init.php index 772f85c77..819d92bdc 100644 --- a/inc/init.php +++ b/inc/init.php @@ -5,8 +5,7 @@ // start timing Dokuwiki execution function delta_time($start=0) { - list($usec, $sec) = explode(" ", microtime()); - return ((float)$usec+(float)$sec)-((float)$start); + return microtime(true)-((float)$start); } define('DOKU_START_TIME', delta_time()); -- cgit v1.2.3 From e4eda66bb417c82549108e85453f87df5ba771fe Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 21 Mar 2011 20:37:05 +0100 Subject: fixed handling of legacy and subscriber config options FS#2208 This was broken in 3a48618a538412994ec244d5a9fde5c4a6161d10 --- inc/confutils.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/confutils.php b/inc/confutils.php index b2d25fb65..29ead1e9f 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -241,13 +241,13 @@ function actionOK($action){ // prepare disabled actions array and handle legacy options $disabled = explode(',',$conf['disableactions']); $disabled = array_map('trim',$disabled); - if(!empty($conf['openregister']) || is_null($auth) || !$auth->canDo('addUser')) { + if((isset($conf['openregister']) && !$conf['openregister']) || is_null($auth) || !$auth->canDo('addUser')) { $disabled[] = 'register'; } - if(!empty($conf['resendpasswd']) || is_null($auth) || !$auth->canDo('modPass')) { + if((isset($conf['resendpasswd']) && !$conf['resendpasswd']) || is_null($auth) || !$auth->canDo('modPass')) { $disabled[] = 'resendpwd'; } - if(!empty($conf['subscribers']) || is_null($auth)) { + if((isset($conf['subscribers']) && !$conf['subscribers']) || is_null($auth)) { $disabled[] = 'subscribe'; } if (is_null($auth) || !$auth->canDo('Profile')) { -- cgit v1.2.3 From ee1214abb2c14cf0f86ff6d9a5b49536c6b01e18 Mon Sep 17 00:00:00 2001 From: Florin Iacob Date: Mon, 21 Mar 2011 23:17:18 +0100 Subject: Romanian language update --- inc/lang/ro/lang.php | 3 +++ lib/plugins/config/lang/ro/lang.php | 3 +++ lib/plugins/popularity/lang/ro/lang.php | 5 +++++ lib/plugins/popularity/lang/ro/submitted.txt | 3 +++ 4 files changed, 14 insertions(+) create mode 100644 lib/plugins/popularity/lang/ro/submitted.txt diff --git a/inc/lang/ro/lang.php b/inc/lang/ro/lang.php index f4a2210f0..cbecf6f6c 100644 --- a/inc/lang/ro/lang.php +++ b/inc/lang/ro/lang.php @@ -159,6 +159,9 @@ $lang['yours'] = 'Versiunea ta'; $lang['diff'] = 'arată diferenţele faţă de versiunea curentă'; $lang['diff2'] = 'Arată diferenţele dintre versiunile selectate'; $lang['difflink'] = 'Link către această vizualizare comparativă'; +$lang['diff_type'] = 'Vezi diferențe:'; +$lang['diff_inline'] = 'Succesiv'; +$lang['diff_side'] = 'Alăturate'; $lang['line'] = 'Linia'; $lang['breadcrumb'] = 'Traseu'; $lang['youarehere'] = 'Sunteţi aici'; diff --git a/lib/plugins/config/lang/ro/lang.php b/lib/plugins/config/lang/ro/lang.php index 7eb22c341..c6457f311 100644 --- a/lib/plugins/config/lang/ro/lang.php +++ b/lib/plugins/config/lang/ro/lang.php @@ -104,6 +104,7 @@ $lang['fetchsize'] = 'Dimensiunea maximă (byte) pe care fetch.php p $lang['notify'] = 'Trimite notificări privind modificările pe această adresă de email'; $lang['registernotify'] = 'Trimite informare noilor utilizatori înregistraţi pe această adresă de email'; $lang['mailfrom'] = 'Adresa de email utilizată pentru mailuri automate'; +$lang['mailprefix'] = 'Prefix subiect e-mail de folosit pentru mail-uri automate'; $lang['gzip_output'] = 'Foloseşte gzip pentru codarea conţinutului xhtml'; $lang['gdlib'] = 'Versiunea GD Lib'; $lang['im_convert'] = 'Calea către instrumentul de conversie ImageMagick'; @@ -136,6 +137,7 @@ $lang['proxy____port'] = 'Port Proxy'; $lang['proxy____user'] = 'Nume utilizator Proxy'; $lang['proxy____pass'] = 'Parolă Proxy'; $lang['proxy____ssl'] = 'Foloseşte SSL pentru conectare la Proxy'; +$lang['proxy____except'] = 'Expresie regulară de potrivit cu URL-uri pentru care proxy-ul trebuie păsuit.'; $lang['safemodehack'] = 'Activează safemode hack'; $lang['ftp____host'] = 'Server FTP pentru safemode hack'; $lang['ftp____port'] = 'Port FTP pentru safemode hack'; @@ -183,3 +185,4 @@ $lang['useheading_o_0'] = 'Niciodată'; $lang['useheading_o_navigation'] = 'Doar navigare'; $lang['useheading_o_content'] = 'Doar conţinutul Wiki'; $lang['useheading_o_1'] = 'Întotdeauna'; +$lang['readdircache'] = 'Vârsta maximă depozitare readdir (sec)'; diff --git a/lib/plugins/popularity/lang/ro/lang.php b/lib/plugins/popularity/lang/ro/lang.php index 15da1cf3b..1644ea574 100644 --- a/lib/plugins/popularity/lang/ro/lang.php +++ b/lib/plugins/popularity/lang/ro/lang.php @@ -9,3 +9,8 @@ */ $lang['name'] = 'Feedback de popularitate (încărcarea poate dura mai mult)'; $lang['submit'] = 'Trimite datele'; +$lang['autosubmit'] = 'Trimite datele automat o dată pe lună'; +$lang['submissionFailed'] = 'Datele nu au fost trimise din cauza următoarei erori:'; +$lang['submitDirectly'] = 'Puteți trimite datele manual prin completarea următorului formular.'; +$lang['autosubmitError'] = 'Ultima trimitere automată a eșuat din cauza următoarei erori:'; +$lang['lastSent'] = 'Datele au fost trimise'; diff --git a/lib/plugins/popularity/lang/ro/submitted.txt b/lib/plugins/popularity/lang/ro/submitted.txt new file mode 100644 index 000000000..214ffb71f --- /dev/null +++ b/lib/plugins/popularity/lang/ro/submitted.txt @@ -0,0 +1,3 @@ +====== Feedback de popularitate ====== + +Datele au fost trimise cu succes. \ No newline at end of file -- cgit v1.2.3 From 80fb93f63fa35a09c7a9a0c7ea7a64db609a9fd6 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Mar 2011 13:16:27 -0400 Subject: Change Doku_Indexer visibility from private to protected, and get rid of ugly underscores --- inc/indexer.php | 180 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 0fbd939be..335b6e25f 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -117,41 +117,41 @@ class Doku_Indexer { * @author Andreas Gohr */ public function addPageWords($page, $text) { - if (!$this->_lock()) + if (!$this->lock()) return "locked"; // load known documents - $pid = $this->_addIndexKey('page', '', $page); + $pid = $this->addIndexKey('page', '', $page); if ($pid === false) { - $this->_unlock(); + $this->unlock(); return false; } $pagewords = array(); // get word usage in page - $words = $this->_getPageWords($text); + $words = $this->getPageWords($text); if ($words === false) { - $this->_unlock(); + $this->unlock(); return false; } if (!empty($words)) { foreach (array_keys($words) as $wlen) { - $index = $this->_getIndex('i', $wlen); + $index = $this->getIndex('i', $wlen); foreach ($words[$wlen] as $wid => $freq) { $idx = ($wid_updateTuple($idx, $pid, $freq); + $index[$wid] = $this->updateTuple($idx, $pid, $freq); $pagewords[] = "$wlen*$wid"; } - if (!$this->_saveIndex('i', $wlen, $index)) { - $this->_unlock(); + if (!$this->saveIndex('i', $wlen, $index)) { + $this->unlock(); return false; } } } // Remove obsolete index entries - $pageword_idx = $this->_getIndexKey('pageword', '', $pid); + $pageword_idx = $this->getIndexKey('pageword', '', $pid); if ($pageword_idx !== '') { $oldwords = explode(':',$pageword_idx); $delwords = array_diff($oldwords, $pagewords); @@ -164,21 +164,21 @@ class Doku_Indexer { } } foreach ($upwords as $wlen => $widx) { - $index = $this->_getIndex('i', $wlen); + $index = $this->getIndex('i', $wlen); foreach ($widx as $wid) { - $index[$wid] = $this->_updateTuple($index[$wid], $pid, 0); + $index[$wid] = $this->updateTuple($index[$wid], $pid, 0); } - $this->_saveIndex('i', $wlen, $index); + $this->saveIndex('i', $wlen, $index); } } // Save the reverse index $pageword_idx = join(':', $pagewords); - if (!$this->_saveIndexKey('pageword', '', $pid, $pageword_idx)) { - $this->_unlock(); + if (!$this->saveIndexKey('pageword', '', $pid, $pageword_idx)) { + $this->unlock(); return false; } - $this->_unlock(); + $this->unlock(); return true; } @@ -189,7 +189,7 @@ class Doku_Indexer { * @author Christopher Smith * @author Tom N Harris */ - private function _getPageWords($text) { + protected function getPageWords($text) { global $conf; $tokens = $this->tokenizer($text); @@ -209,7 +209,7 @@ class Doku_Indexer { $word_idx_modified = false; $index = array(); //resulting index foreach (array_keys($words) as $wlen) { - $word_idx = $this->_getIndex('w', $wlen); + $word_idx = $this->getIndex('w', $wlen); foreach ($words[$wlen] as $word => $freq) { $wid = array_search($word, $word_idx); if ($wid === false) { @@ -222,7 +222,7 @@ class Doku_Indexer { $index[$wlen][$wid] = $freq; } // save back the word index - if ($word_idx_modified && !$this->_saveIndex('w', $wlen, $word_idx)) + if ($word_idx_modified && !$this->saveIndex('w', $wlen, $word_idx)) return false; } @@ -252,13 +252,13 @@ class Doku_Indexer { trigger_error("array passed to addMetaKeys but value is not null", E_USER_WARNING); } - if (!$this->_lock()) + if (!$this->lock()) return "locked"; // load known documents - $pid = $this->_addIndexKey('page', '', $page); + $pid = $this->addIndexKey('page', '', $page); if ($pid === false) { - $this->_unlock(); + $this->unlock(); return false; } @@ -267,20 +267,20 @@ class Doku_Indexer { $value = $key['title']; if (is_array($value)) $value = $value[0]; - $this->_saveIndexKey('title', '', $pid, $value); + $this->saveIndexKey('title', '', $pid, $value); unset($key['title']); } foreach ($key as $name => $values) { $metaname = idx_cleanName($name); - $this->_addIndexKey('metadata', '', $metaname); - $metaidx = $this->_getIndex($metaname, '_i'); - $metawords = $this->_getIndex($metaname, '_w'); + $this->addIndexKey('metadata', '', $metaname); + $metaidx = $this->getIndex($metaname, '_i'); + $metawords = $this->getIndex($metaname, '_w'); $addwords = false; if (!is_array($values)) $values = array($values); - $val_idx = $this->_getIndexKey($metaname, '_p', $pid); + $val_idx = $this->getIndexKey($metaname, '_p', $pid); if ($val_idx != '') { $val_idx = explode(':', $val_idx); // -1 means remove, 0 keep, 1 add @@ -308,30 +308,30 @@ class Doku_Indexer { } if ($addwords) - $this->_saveIndex($metaname.'_w', '', $metawords); + $this->saveIndex($metaname.'_w', '', $metawords); $vals_changed = false; foreach ($val_idx as $id => $action) { if ($action == -1) { - $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 0); + $metaidx[$id] = $this->updateTuple($metaidx[$id], $pid, 0); $vals_changed = true; unset($val_idx[$id]); } elseif ($action == 1) { - $metaidx[$id] = $this->_updateTuple($metaidx[$id], $pid, 1); + $metaidx[$id] = $this->updateTuple($metaidx[$id], $pid, 1); $vals_changed = true; } } if ($vals_changed) { - $this->_saveIndex($metaname.'_i', '', $metaidx); + $this->saveIndex($metaname.'_i', '', $metaidx); $val_idx = implode(':', array_keys($val_idx)); - $this->_saveIndexKey($metaname.'_p', '', $pid, $val_idx); + $this->saveIndexKey($metaname.'_p', '', $pid, $val_idx); } unset($metaidx); unset($metawords); } - $this->_unlock(); + $this->unlock(); return true; } @@ -345,18 +345,18 @@ class Doku_Indexer { * @author Tom N Harris */ public function deletePage($page) { - if (!$this->_lock()) + if (!$this->lock()) return "locked"; // load known documents - $pid = $this->_getIndexKey('page', '', $page); + $pid = $this->getIndexKey('page', '', $page); if ($pid === false) { - $this->_unlock(); + $this->unlock(); return false; } // Remove obsolete index entries - $pageword_idx = $this->_getIndexKey('pageword', '', $pid); + $pageword_idx = $this->getIndexKey('pageword', '', $pid); if ($pageword_idx !== '') { $delwords = explode(':',$pageword_idx); $upwords = array(); @@ -368,32 +368,32 @@ class Doku_Indexer { } } foreach ($upwords as $wlen => $widx) { - $index = $this->_getIndex('i', $wlen); + $index = $this->getIndex('i', $wlen); foreach ($widx as $wid) { - $index[$wid] = $this->_updateTuple($index[$wid], $pid, 0); + $index[$wid] = $this->updateTuple($index[$wid], $pid, 0); } - $this->_saveIndex('i', $wlen, $index); + $this->saveIndex('i', $wlen, $index); } } // Save the reverse index - if (!$this->_saveIndexKey('pageword', '', $pid, "")) { - $this->_unlock(); + if (!$this->saveIndexKey('pageword', '', $pid, "")) { + $this->unlock(); return false; } - $this->_saveIndexKey('title', '', $pid, ""); - $keyidx = $this->_getIndex('metadata', ''); + $this->saveIndexKey('title', '', $pid, ""); + $keyidx = $this->getIndex('metadata', ''); foreach ($keyidx as $metaname) { - $val_idx = explode(':', $this->_getIndexKey($metaname.'_p', '', $pid)); - $meta_idx = $this->_getIndex($metaname.'_i', ''); + $val_idx = explode(':', $this->getIndexKey($metaname.'_p', '', $pid)); + $meta_idx = $this->getIndex($metaname.'_i', ''); foreach ($val_idx as $id) { - $meta_idx[$id] = $this->_updateTuple($meta_idx[$id], $pid, 0); + $meta_idx[$id] = $this->updateTuple($meta_idx[$id], $pid, 0); } - $this->_saveIndex($metaname.'_i', '', $meta_idx); - $this->_saveIndexKey($metaname.'_p', '', $pid, ''); + $this->saveIndex($metaname.'_i', '', $meta_idx); + $this->saveIndexKey($metaname.'_p', '', $pid, ''); } - $this->_unlock(); + $this->unlock(); return true; } @@ -469,17 +469,17 @@ class Doku_Indexer { */ public function lookup(&$tokens) { $result = array(); - $wids = $this->_getIndexWords($tokens, $result); + $wids = $this->getIndexWords($tokens, $result); if (empty($wids)) return array(); // load known words and documents - $page_idx = $this->_getIndex('page', ''); + $page_idx = $this->getIndex('page', ''); $docs = array(); foreach (array_keys($wids) as $wlen) { $wids[$wlen] = array_unique($wids[$wlen]); - $index = $this->_getIndex('i', $wlen); + $index = $this->getIndex('i', $wlen); foreach($wids[$wlen] as $ixid) { if ($ixid < count($index)) - $docs["$wlen*$ixid"] = $this->_parseTuples($page_idx, $index[$ixid]); + $docs["$wlen*$ixid"] = $this->parseTuples($page_idx, $index[$ixid]); } } // merge found pages into final result array @@ -531,9 +531,9 @@ class Doku_Indexer { // get all words in order to search the matching ids if ($key == 'title') { - $words = $this->_getIndex('title', ''); + $words = $this->getIndex('title', ''); } else { - $words = $this->_getIndex($metaname, '_w'); + $words = $this->getIndex($metaname, '_w'); } if (!is_null($func)) { @@ -576,7 +576,7 @@ class Doku_Indexer { $result[$val] = array(); } - $page_idx = $this->_getIndex('page', ''); + $page_idx = $this->getIndex('page', ''); // Special handling for titles if ($key == 'title') { @@ -588,12 +588,12 @@ class Doku_Indexer { } } else { // load all lines and pages so the used lines can be taken and matched with the pages - $lines = $this->_getIndex($metaname, '_i'); + $lines = $this->getIndex($metaname, '_i'); foreach ($value_ids as $value_id => $val_list) { // parse the tuples of the form page_id*1:page2_id*1 and so on, return value // is an array with page_id => 1, page2_id => 1 etc. so take the keys only - $pages = array_keys($this->_parseTuples($page_idx, $lines[$value_id])); + $pages = array_keys($this->parseTuples($page_idx, $lines[$value_id])); foreach ($val_list as $val) { $result[$val] = array_merge($result[$val], $pages); } @@ -616,7 +616,7 @@ class Doku_Indexer { * @return array Set to length => array(id ...) * @author Tom N Harris */ - private function _getIndexWords(&$words, &$result) { + protected function getIndexWords(&$words, &$result) { $tokens = array(); $tokenlength = array(); $tokenwild = array(); @@ -656,12 +656,12 @@ class Doku_Indexer { // $tokenlength = array( base word length => base word ... ) // $tokenwild = array( base word => base word length ... ) $length_filter = empty($tokenwild) ? $tokenlength : min(array_keys($tokenlength)); - $indexes_known = $this->_indexLengths($length_filter); + $indexes_known = $this->indexLengths($length_filter); if (!empty($tokenwild)) sort($indexes_known); // get word IDs $wids = array(); foreach ($indexes_known as $ixlen) { - $word_idx = $this->_getIndex('w', $ixlen); + $word_idx = $this->getIndex('w', $ixlen); // handle exact search if (isset($tokenlength[$ixlen])) { foreach ($tokenlength[$ixlen] as $xword) { @@ -697,14 +697,14 @@ class Doku_Indexer { * @author Tom N Harris */ public function getPages($key=null) { - $page_idx = $this->_getIndex('page', ''); + $page_idx = $this->getIndex('page', ''); if (is_null($key)) return $page_idx; $metaname = idx_cleanName($key); // Special handling for titles if ($key == 'title') { - $title_idx = $this->_getIndex('title', ''); + $title_idx = $this->getIndex('title', ''); array_splice($page_idx, count($title_idx)); foreach ($title_idx as $i => $title) if ($title === "") unset($page_idx[$i]); @@ -712,9 +712,9 @@ class Doku_Indexer { } $pages = array(); - $lines = $this->_getIndex($metaname, '_i'); + $lines = $this->getIndex($metaname, '_i'); foreach ($lines as $line) { - $pages = array_merge($pages, $this->_parseTuples($page_idx, $line)); + $pages = array_merge($pages, $this->parseTuples($page_idx, $line)); } return array_keys($pages); } @@ -738,7 +738,7 @@ class Doku_Indexer { $result = array(); if ($key == 'title') { - $index = $this->_getIndex('title', ''); + $index = $this->getIndex('title', ''); $index = array_count_values($index); foreach ($index as $val => $cnt) { if ($cnt >= $min && (!$max || $cnt <= $max) && strlen($val) >= $minlen) @@ -747,15 +747,15 @@ class Doku_Indexer { } elseif (!is_null($key)) { $metaname = idx_cleanName($key); - $index = $this->_getIndex($metaname.'_i', ''); + $index = $this->getIndex($metaname.'_i', ''); $val_idx = array(); foreach ($index as $wid => $line) { - $freq = $this->_countTuples($line); + $freq = $this->countTuples($line); if ($freq >= $min && (!$max || $freq <= $max) && strlen($val) >= $minlen) $val_idx[$wid] = $freq; } if (!empty($val_idx)) { - $words = $this->_getIndex($metaname.'_w', ''); + $words = $this->getIndex($metaname.'_w', ''); foreach ($val_idx as $wid => $freq) $result[$words[$wid]] = $freq; } @@ -764,13 +764,13 @@ class Doku_Indexer { $lengths = idx_listIndexLengths(); foreach ($lengths as $length) { if ($length < $minlen) continue; - $index = $this->_getIndex('i', $length); + $index = $this->getIndex('i', $length); $words = null; foreach ($index as $wid => $line) { - $freq = $this->_countTuples($line); + $freq = $this->countTuples($line); if ($freq >= $min && (!$max || $freq <= $max)) { if ($words === null) - $words = $this->_getIndex('w', $length); + $words = $this->getIndex('w', $length); $result[$words[$wid]] = $freq; } } @@ -786,7 +786,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _lock() { + protected function lock() { global $conf; $status = true; $run = 0; @@ -816,7 +816,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _unlock() { + protected function unlock() { global $conf; @rmdir($conf['lockdir'].'/_indexer.lock'); return true; @@ -827,7 +827,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _getIndex($idx, $suffix) { + protected function getIndex($idx, $suffix) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; if (!@file_exists($fn)) return array(); @@ -839,7 +839,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _saveIndex($idx, $suffix, &$lines) { + protected function saveIndex($idx, $suffix, &$lines) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix; $fh = @fopen($fn.'.tmp', 'w'); @@ -850,7 +850,7 @@ class Doku_Indexer { chmod($fn.'.tmp', $conf['fperm']); io_rename($fn.'.tmp', $fn.'.idx'); if ($suffix !== '') - $this->_cacheIndexDir($idx, $suffix, empty($lines)); + $this->cacheIndexDir($idx, $suffix, empty($lines)); return true; } @@ -859,7 +859,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _getIndexKey($idx, $suffix, $id) { + protected function getIndexKey($idx, $suffix, $id) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; if (!@file_exists($fn)) return ''; @@ -878,7 +878,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _saveIndexKey($idx, $suffix, $id, $line) { + protected function saveIndexKey($idx, $suffix, $id, $line) { global $conf; if (substr($line, -1) != "\n") $line .= "\n"; @@ -908,7 +908,7 @@ class Doku_Indexer { chmod($fn.'.tmp', $conf['fperm']); io_rename($fn.'.tmp', $fn.'.idx'); if ($suffix !== '') - $this->_cacheIndexDir($idx, $suffix); + $this->cacheIndexDir($idx, $suffix); return true; } @@ -917,13 +917,13 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _addIndexKey($idx, $suffix, $value) { - $index = $this->_getIndex($idx, $suffix); + protected function addIndexKey($idx, $suffix, $value) { + $index = $this->getIndex($idx, $suffix); $id = array_search($value, $index); if ($id === false) { $id = count($index); $index[$id] = $value; - if (!$this->_saveIndex($idx, $suffix, $index)) { + if (!$this->saveIndex($idx, $suffix, $index)) { trigger_error("Failed to write $idx index", E_USER_ERROR); return false; } @@ -931,7 +931,7 @@ class Doku_Indexer { return $id; } - private function _cacheIndexDir($idx, $suffix, $delete=false) { + protected function cacheIndexDir($idx, $suffix, $delete=false) { global $conf; if ($idx == 'i') $cachename = $conf['indexdir'].'/lengths'; @@ -968,7 +968,7 @@ class Doku_Indexer { * * @author YoBoY */ - private function _listIndexLengths() { + protected function listIndexLengths() { global $conf; $cachename = $conf['indexdir'].'/lengths'; clearstatcache(); @@ -1018,7 +1018,7 @@ class Doku_Indexer { * * @author YoBoY */ - private function _indexLengths($filter) { + protected function indexLengths($filter) { global $conf; $idx = array(); if (is_array($filter)) { @@ -1044,7 +1044,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _updateTuple($line, $id, $count) { + protected function updateTuple($line, $id, $count) { $newLine = $line; if ($newLine !== '') $newLine = preg_replace('/(^|:)'.preg_quote($id,'/').'\*\d*/', '', $newLine); @@ -1064,7 +1064,7 @@ class Doku_Indexer { * @author Tom N Harris * @author Andreas Gohr */ - private function _parseTuples(&$keys, $line) { + protected function parseTuples(&$keys, $line) { $result = array(); if ($line == '') return $result; $parts = explode(':', $line); @@ -1084,7 +1084,7 @@ class Doku_Indexer { * * @author Tom N Harris */ - private function _countTuples($line) { + protected function countTuples($line) { $freq = 0; $parts = explode(':', $line); foreach ($parts as $tuple) { -- cgit v1.2.3 From b9d8cc1e0b5aa06f2829aa0913283c2aca8a082c Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Mar 2011 16:56:37 -0400 Subject: Clarify usage of some indexer methods --- inc/indexer.php | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 335b6e25f..110901e58 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -185,6 +185,8 @@ class Doku_Indexer { /** * Split the words in a page and add them to the index. * + * @param string $text content of the page + * @return array list of word IDs and number of times used * @author Andreas Gohr * @author Christopher Smith * @author Tom N Harris @@ -274,13 +276,13 @@ class Doku_Indexer { foreach ($key as $name => $values) { $metaname = idx_cleanName($name); $this->addIndexKey('metadata', '', $metaname); - $metaidx = $this->getIndex($metaname, '_i'); - $metawords = $this->getIndex($metaname, '_w'); + $metaidx = $this->getIndex($metaname.'_i', ''); + $metawords = $this->getIndex($metaname.'_w', ''); $addwords = false; if (!is_array($values)) $values = array($values); - $val_idx = $this->getIndexKey($metaname, '_p', $pid); + $val_idx = $this->getIndexKey($metaname.'_p', '', $pid); if ($val_idx != '') { $val_idx = explode(':', $val_idx); // -1 means remove, 0 keep, 1 add @@ -533,7 +535,7 @@ class Doku_Indexer { if ($key == 'title') { $words = $this->getIndex('title', ''); } else { - $words = $this->getIndex($metaname, '_w'); + $words = $this->getIndex($metaname.'_w', ''); } if (!is_null($func)) { @@ -588,7 +590,7 @@ class Doku_Indexer { } } else { // load all lines and pages so the used lines can be taken and matched with the pages - $lines = $this->getIndex($metaname, '_i'); + $lines = $this->getIndex($metaname.'_i', ''); foreach ($value_ids as $value_id => $val_list) { // parse the tuples of the form page_id*1:page2_id*1 and so on, return value @@ -712,7 +714,7 @@ class Doku_Indexer { } $pages = array(); - $lines = $this->getIndex($metaname, '_i'); + $lines = $this->getIndex($metaname.'_i', ''); foreach ($lines as $line) { $pages = array_merge($pages, $this->parseTuples($page_idx, $line)); } @@ -825,6 +827,13 @@ class Doku_Indexer { /** * Retrieve the entire index. * + * The $suffix argument is for an index that is split into + * multiple parts. Different index files should use different + * base names. + * + * @param string $idx name of the index + * @param string $suffix subpart identifier + * @return array list of lines without CR or LF * @author Tom N Harris */ protected function getIndex($idx, $suffix) { @@ -837,6 +846,9 @@ class Doku_Indexer { /** * Replace the contents of the index with an array. * + * @param string $idx name of the index + * @param string $suffix subpart identifier + * @param arrayref $linex list of lines without LF * @author Tom N Harris */ protected function saveIndex($idx, $suffix, &$lines) { @@ -857,6 +869,10 @@ class Doku_Indexer { /** * Retrieve a line from the index. * + * @param string $idx name of the index + * @param string $suffix subpart identifier + * @param int $id the line number + * @return string a line with trailing whitespace removed * @author Tom N Harris */ protected function getIndexKey($idx, $suffix, $id) { @@ -876,6 +892,10 @@ class Doku_Indexer { /** * Write a line into the index. * + * @param string $idx name of the index + * @param string $suffix subpart identifier + * @param int $id the line number + * @param string $line line to write * @author Tom N Harris */ protected function saveIndexKey($idx, $suffix, $id, $line) { @@ -915,6 +935,10 @@ class Doku_Indexer { /** * Retrieve or insert a value in the index. * + * @param string $idx name of the index + * @param string $suffix subpart identifier + * @param string $value line to find in the index + * @return int line number of the value in the index * @author Tom N Harris */ protected function addIndexKey($idx, $suffix, $value) { -- cgit v1.2.3 From 8c4c7aef443f4c16d78ba8c3ff1e41c7befcb223 Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Tue, 22 Mar 2011 18:40:11 -0400 Subject: Remove config for external tokenizer --- conf/dokuwiki.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 629e7c0c6..538b9f9da 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -134,8 +134,6 @@ $conf['broken_iua'] = 0; //Platform with broken ignore_user_abor $conf['xsendfile'] = 0; //Use X-Sendfile (1 = lighttpd, 2 = standard) $conf['renderer_xhtml'] = 'xhtml'; //renderer to use for main page generation $conf['rememberme'] = 1; //Enable/disable remember me on login -$conf['external_tokenizer'] = 0; //Use an external program to split pages into words for indexing -$conf['tokenizer_cmd'] = '/usr/bin/mecab -O wakati'; //Set target to use when creating links - leave empty for same window $conf['target']['wiki'] = ''; -- cgit v1.2.3 From 988c134016f0557947bd6811e22086919f98fa8e Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Wed, 23 Mar 2011 09:43:38 +0530 Subject: Done with DifferenceEngine.php --- inc/DifferenceEngine.php | 99 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 89 insertions(+), 10 deletions(-) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 906a17b2d..5473bf7e0 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -29,8 +29,14 @@ class _DiffOp { class _DiffOp_Copy extends _DiffOp { var $type = 'copy'; - + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function _DiffOp_Copy($orig, $closing = false) { + $this->__construct($orig, $closing); + } + + function __construct($orig, $closing = false) { if (!is_array($closing)) $closing = $orig; $this->orig = $orig; @@ -44,8 +50,14 @@ class _DiffOp_Copy extends _DiffOp { class _DiffOp_Delete extends _DiffOp { var $type = 'delete'; - + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function _DiffOp_Delete($lines) { + $this->__construct($lines); + } + + function __construct($lines) { $this->orig = $lines; $this->closing = false; } @@ -57,8 +69,14 @@ class _DiffOp_Delete extends _DiffOp { class _DiffOp_Add extends _DiffOp { var $type = 'add'; - + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function _DiffOp_Add($lines) { + $this->__construct($lines); + } + + function __construct($lines) { $this->closing = $lines; $this->orig = false; } @@ -70,8 +88,14 @@ class _DiffOp_Add extends _DiffOp { class _DiffOp_Change extends _DiffOp { var $type = 'change'; - + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function _DiffOp_Change($orig, $closing) { + $this->__construct($orig, $closing); + } + + function __construct($orig, $closing) { $this->orig = $orig; $this->closing = $closing; } @@ -490,6 +514,13 @@ class _DiffEngine { class Diff { var $edits; + + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ + function Diff($from_lines, $to_lines) { + $this->__construct($from_lines, $to_lines); + } /** * Constructor. @@ -499,7 +530,7 @@ class Diff { * (Typically these are lines from a file.) * @param $to_lines array An array of strings. */ - function Diff($from_lines, $to_lines) { + function __construct($from_lines, $to_lines) { $eng = new _DiffEngine; $this->edits = $eng->diff($from_lines, $to_lines); //$this->_check($from_lines, $to_lines); @@ -622,6 +653,13 @@ class Diff { * FIXME: bad name. */ class MappedDiff extends Diff { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ + function MappedDiff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { + $this->__construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines); + } + /** * Constructor. * @@ -645,12 +683,12 @@ class MappedDiff extends Diff { * @param $mapped_to_lines array This array should * have the same number of elements as $to_lines. */ - function MappedDiff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { + function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { assert(count($from_lines) == count($mapped_from_lines)); assert(count($to_lines) == count($mapped_to_lines)); - $this->Diff($mapped_from_lines, $mapped_to_lines); + parent::__construct($mapped_from_lines, $mapped_to_lines); $xi = $yi = 0; $ecnt = count($this->edits); @@ -827,7 +865,14 @@ class DiffFormatter { define('NBSP', "\xC2\xA0"); // utf-8 non-breaking space. class _HWLDF_WordAccumulator { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function _HWLDF_WordAccumulator() { + $this->__construct(); + } + + function __construct() { $this->_lines = array(); $this->_line = ''; $this->_group = ''; @@ -882,11 +927,18 @@ class _HWLDF_WordAccumulator { class WordLevelDiff extends MappedDiff { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function WordLevelDiff($orig_lines, $closing_lines) { + $this->__construct($orig_lines, $closing_lines); + } + + function __construct($orig_lines, $closing_lines) { list ($orig_words, $orig_stripped) = $this->_split($orig_lines); list ($closing_words, $closing_stripped) = $this->_split($closing_lines); - $this->MappedDiff($orig_words, $closing_words, $orig_stripped, $closing_stripped); + parent::__construct($orig_words, $closing_words, $orig_stripped, $closing_stripped); } function _split($lines) { @@ -924,11 +976,18 @@ class WordLevelDiff extends MappedDiff { class InlineWordLevelDiff extends MappedDiff { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function InlineWordLevelDiff($orig_lines, $closing_lines) { + $this->__construct($orig_lines, $closing_lines); + } + + function __construct($orig_lines, $closing_lines) { list ($orig_words, $orig_stripped) = $this->_split($orig_lines); list ($closing_words, $closing_stripped) = $this->_split($closing_lines); - $this->MappedDiff($orig_words, $closing_words, $orig_stripped, $closing_stripped); + parent::__construct($orig_words, $closing_words, $orig_stripped, $closing_stripped); } function _split($lines) { @@ -965,7 +1024,14 @@ class InlineWordLevelDiff extends MappedDiff { */ class UnifiedDiffFormatter extends DiffFormatter { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function UnifiedDiffFormatter($context_lines = 4) { + $this->__construct($context_lines); + } + + function __construct($context_lines = 4) { $this->leading_context_lines = $context_lines; $this->trailing_context_lines = $context_lines; } @@ -996,7 +1062,14 @@ class UnifiedDiffFormatter extends DiffFormatter { */ class TableDiffFormatter extends DiffFormatter { + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function TableDiffFormatter() { + $this->__construct(); + } + + function __construct() { $this->leading_context_lines = 2; $this->trailing_context_lines = 2; } @@ -1088,8 +1161,14 @@ class TableDiffFormatter extends DiffFormatter { */ class InlineDiffFormatter extends DiffFormatter { var $colspan = 4; - + /** + * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. + */ function InlineDiffFormatter() { + $this->__construct(); + } + + function __construct() { $this->leading_context_lines = 2; $this->trailing_context_lines = 2; } -- cgit v1.2.3 From 5891862cf7012cf81a76ba0378b67c60f593507a Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Wed, 23 Mar 2011 20:51:04 +0530 Subject: Using only __construct now --- inc/DifferenceEngine.php | 82 ++---------------------------------------------- 1 file changed, 2 insertions(+), 80 deletions(-) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 5473bf7e0..2578d07ee 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -29,12 +29,6 @@ class _DiffOp { class _DiffOp_Copy extends _DiffOp { var $type = 'copy'; - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function _DiffOp_Copy($orig, $closing = false) { - $this->__construct($orig, $closing); - } function __construct($orig, $closing = false) { if (!is_array($closing)) @@ -50,12 +44,6 @@ class _DiffOp_Copy extends _DiffOp { class _DiffOp_Delete extends _DiffOp { var $type = 'delete'; - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function _DiffOp_Delete($lines) { - $this->__construct($lines); - } function __construct($lines) { $this->orig = $lines; @@ -69,12 +57,6 @@ class _DiffOp_Delete extends _DiffOp { class _DiffOp_Add extends _DiffOp { var $type = 'add'; - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function _DiffOp_Add($lines) { - $this->__construct($lines); - } function __construct($lines) { $this->closing = $lines; @@ -88,12 +70,6 @@ class _DiffOp_Add extends _DiffOp { class _DiffOp_Change extends _DiffOp { var $type = 'change'; - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function _DiffOp_Change($orig, $closing) { - $this->__construct($orig, $closing); - } function __construct($orig, $closing) { $this->orig = $orig; @@ -514,13 +490,6 @@ class _DiffEngine { class Diff { var $edits; - - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function Diff($from_lines, $to_lines) { - $this->__construct($from_lines, $to_lines); - } /** * Constructor. @@ -653,13 +622,6 @@ class Diff { * FIXME: bad name. */ class MappedDiff extends Diff { - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function MappedDiff($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { - $this->__construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines); - } - /** * Constructor. * @@ -865,13 +827,7 @@ class DiffFormatter { define('NBSP', "\xC2\xA0"); // utf-8 non-breaking space. class _HWLDF_WordAccumulator { - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function _HWLDF_WordAccumulator() { - $this->__construct(); - } - + function __construct() { $this->_lines = array(); $this->_line = ''; @@ -927,13 +883,6 @@ class _HWLDF_WordAccumulator { class WordLevelDiff extends MappedDiff { - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function WordLevelDiff($orig_lines, $closing_lines) { - $this->__construct($orig_lines, $closing_lines); - } - function __construct($orig_lines, $closing_lines) { list ($orig_words, $orig_stripped) = $this->_split($orig_lines); list ($closing_words, $closing_stripped) = $this->_split($closing_lines); @@ -975,13 +924,6 @@ class WordLevelDiff extends MappedDiff { } class InlineWordLevelDiff extends MappedDiff { - - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function InlineWordLevelDiff($orig_lines, $closing_lines) { - $this->__construct($orig_lines, $closing_lines); - } function __construct($orig_lines, $closing_lines) { list ($orig_words, $orig_stripped) = $this->_split($orig_lines); @@ -1024,13 +966,6 @@ class InlineWordLevelDiff extends MappedDiff { */ class UnifiedDiffFormatter extends DiffFormatter { - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function UnifiedDiffFormatter($context_lines = 4) { - $this->__construct($context_lines); - } - function __construct($context_lines = 4) { $this->leading_context_lines = $context_lines; $this->trailing_context_lines = $context_lines; @@ -1062,13 +997,6 @@ class UnifiedDiffFormatter extends DiffFormatter { */ class TableDiffFormatter extends DiffFormatter { - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function TableDiffFormatter() { - $this->__construct(); - } - function __construct() { $this->leading_context_lines = 2; $this->trailing_context_lines = 2; @@ -1161,13 +1089,7 @@ class TableDiffFormatter extends DiffFormatter { */ class InlineDiffFormatter extends DiffFormatter { var $colspan = 4; - /** - * DONOT USE THIS. Its just to make sure nothing breaks because of the name change. - */ - function InlineDiffFormatter() { - $this->__construct(); - } - + function __construct() { $this->leading_context_lines = 2; $this->trailing_context_lines = 2; -- cgit v1.2.3 From a3f9f75c2624b73c4a57bf2a346ae71bf6a5fb98 Mon Sep 17 00:00:00 2001 From: Marc Schiffbauer Date: Tue, 29 Mar 2011 23:48:47 +0200 Subject: Make .htaccess access protection work in more setups Before this patch with a .htaccess file on a higher level in the hierarchy with "Satisfy Any" it has been possible that the directory protection didn't work as expected. --- conf/.htaccess | 7 ++++--- data/.htaccess | 1 + inc/.htaccess | 7 ++++--- inc/lang/.htaccess | 7 ++++--- lib/_fla/.htaccess | 1 + 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/conf/.htaccess b/conf/.htaccess index 763ebf2ee..f5dda6086 100644 --- a/conf/.htaccess +++ b/conf/.htaccess @@ -1,3 +1,4 @@ -## no access to the conf directory -order allow,deny -deny from all +## no access to the conf directory +order allow,deny +deny from all +Satisfy All diff --git a/data/.htaccess b/data/.htaccess index 281d5c33d..2cbb757e7 100644 --- a/data/.htaccess +++ b/data/.htaccess @@ -1,2 +1,3 @@ order allow,deny deny from all +Satisfy All diff --git a/inc/.htaccess b/inc/.htaccess index aebb21cd2..68ae43e72 100644 --- a/inc/.htaccess +++ b/inc/.htaccess @@ -1,3 +1,4 @@ -## no access to the inc directory -order allow,deny -deny from all +## no access to the inc directory +order allow,deny +deny from all +Satisfy All diff --git a/inc/lang/.htaccess b/inc/lang/.htaccess index 2ca129b12..572f5156f 100644 --- a/inc/lang/.htaccess +++ b/inc/lang/.htaccess @@ -1,3 +1,4 @@ -## no access to the lang directory -order allow,deny -deny from all +## no access to the lang directory +order allow,deny +deny from all +Satisfy All diff --git a/lib/_fla/.htaccess b/lib/_fla/.htaccess index 9a7d38c12..055d099c7 100644 --- a/lib/_fla/.htaccess +++ b/lib/_fla/.htaccess @@ -1,3 +1,4 @@ ## no access to the fla directory order allow,deny deny from all +Satisfy All -- cgit v1.2.3 From 344763ad4e90e41c8a94b0a69a527ff2d6319ab5 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sat, 2 Apr 2011 03:32:13 +0100 Subject: FS#2122 alter SafeFN safe and post indicator characters. Note, any filenames encoded with the previous SafeFN scheme will need to be converted to the new scheme. Users of the old SafeFN scheme should not use this new scheme until after converting their filenames. --- _test/cases/inc/safefn.test.php | 35 ++++++++++++++++++++++++----------- inc/SafeFN.class.php | 6 +++--- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/_test/cases/inc/safefn.test.php b/_test/cases/inc/safefn.test.php index c789875ba..1227e5578 100644 --- a/_test/cases/inc/safefn.test.php +++ b/_test/cases/inc/safefn.test.php @@ -10,19 +10,23 @@ 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('äa.txt', '%5g]a.txt'); + $tests[] = array('ä.', '%5g].'); $tests[] = array('asciistring','asciistring'); $tests[] = array('ascii-_/.string','ascii-_/.string'); - $tests[] = array('AName','%x%1a.ame'); - $tests[] = array('A Name','%x%0%1a.ame'); - $tests[] = array('Another...Name','%x.nother...%1a.ame'); - $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('нехватка_файлового_пространства_на_сервере_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'); + $tests[] = array('AName','%x%1a]ame'); + $tests[] = array('A Name','%x%0%1a]ame'); + $tests[] = array('Another...Name','%x]nother...%1a]ame'); + $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('нехватка_файлового_пространства_на_сервере_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'); + + $tests[] = array('name[1]','name[1]'); + $tests[] = array('Name[1]','%1a]ame[1]'); + $tests[] = array('Name[A]','%1a]ame[%x]]'); foreach($tests as $test){ list($utf8,$safe) = $test; @@ -30,6 +34,15 @@ class safeFN_test extends UnitTestCase { $this->assertEqual(SafeFN::decode($safe),$utf8); } } + + function test2(){ + $tests[] = array('совместимая','%td%ta%sy%t8%t1%td%te%t4%t8%sw%tr'); + + foreach($tests as $test){ + list($utf8,$safe) = $test; + $this->assertEqual(SafeFN::decode($safe),$utf8); + } + } } //Setup VIM: ex: et ts=4 : diff --git a/inc/SafeFN.class.php b/inc/SafeFN.class.php index ac6698a63..43b19e9ab 100644 --- a/inc/SafeFN.class.php +++ b/inc/SafeFN.class.php @@ -16,9 +16,9 @@ class SafeFN { // 'safe' characters are a superset of $plain, $pre_indicator and $post_indicator - private static $plain = '-/_0123456789abcdefghijklmnopqrstuvwxyz'; // these characters aren't converted + private static $plain = '-./[_0123456789abcdefghijklmnopqrstuvwxyz'; // these characters aren't converted private static $pre_indicator = '%'; - private static $post_indicator = '.'; + private static $post_indicator = ']'; /** * Convert an UTF-8 string to a safe ASCII String @@ -37,7 +37,7 @@ class SafeFN { * - reduce codepoint value for non-printable ASCII characters (0x00 - 0x1f). Space becomes our zero. * - convert reduced value to base36 (0-9a-z) * - append $pre_indicator characater followed by base36 string to output, set converted flag - * continue to next character) + * (continue to next character) * * @param string $filename a utf8 string, should only include printable characters - not 0x00-0x1f * @return string an encoded representation of $filename using only 'safe' ASCII characters -- cgit v1.2.3 From b9d65e9d8e82713e04ebf1172d9c94fddb38df83 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 3 Apr 2011 21:55:50 +0200 Subject: Temporary conversion plugin for new fnencode FS#2197 This plugin converts existing filenames that were stored using the option "safe" in fnencode from using the dot (.) as post_indicator to using a bracket (]) as post_insdicator. It will also add a post_indicator at the end of the file name should it be missing (Bug FS#2122). This plugin needs testing by people using the safe encode option! --- lib/plugins/safefnrecode/action.php | 68 ++++++++++++++++++++++++++++++++ lib/plugins/safefnrecode/plugin.info.txt | 7 ++++ 2 files changed, 75 insertions(+) create mode 100644 lib/plugins/safefnrecode/action.php create mode 100644 lib/plugins/safefnrecode/plugin.info.txt diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php new file mode 100644 index 000000000..6d869c532 --- /dev/null +++ b/lib/plugins/safefnrecode/action.php @@ -0,0 +1,68 @@ + + */ + +// must be run within Dokuwiki +if (!defined('DOKU_INC')) die(); + +require_once DOKU_PLUGIN.'action.php'; + +class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { + + public function register(Doku_Event_Handler &$controller) { + + $controller->register_hook('INDEXER_TASKS_RUN', 'BEFORE', $this, 'handle_indexer_tasks_run'); + + } + + public function handle_indexer_tasks_run(Doku_Event &$event, $param) { + global $conf; + if($conf['fnencode'] != 'safe') return; + + if(!file_exists($conf['datadir'].'_safefn.recoded')){ + $this->recode($conf['datadir']); + touch($conf['datadir'].'_safefn.recoded'); + } + + if(!file_exists($conf['olddir'].'_safefn.recoded')){ + $this->recode($conf['olddir']); + touch($conf['olddir'].'_safefn.recoded'); + } + + if(!file_exists($conf['metadir'].'_safefn.recoded')){ + $this->recode($conf['metadir']); + touch($conf['metadir'].'_safefn.recoded'); + } + + if(!file_exists($conf['mediadir'].'_safefn.recoded')){ + $this->recode($conf['metadir']); + touch($conf['metadir'].'_safefn.recoded'); + } + + } + + /** + * Recursive function to rename all safe encoded files to use the new + * square bracket post indicator + */ + private function recode($dir){ + $dh = opendir($dir); + if(!$dh) return; + while (($file = readdir($dh)) !== false) { + if($file == '.' || $file == '..') continue; # cur and upper dir + if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse + if(strpos('%',$file) === false) continue; # no encoding used + $new = preg_replace('/(%.*?)\./','\1]',$file); # new post indicator + if(preg_match('/%[^\.]+$/',$new)) $new .= ']'; # fix end FS#2122 + rename("$dir/$file","$dir/$new"); # rename it + } + closedir($dh); + } + +} + +// vim:ts=4:sw=4:et: diff --git a/lib/plugins/safefnrecode/plugin.info.txt b/lib/plugins/safefnrecode/plugin.info.txt new file mode 100644 index 000000000..b1600060c --- /dev/null +++ b/lib/plugins/safefnrecode/plugin.info.txt @@ -0,0 +1,7 @@ +base safefnrecode +author Andreas Gohr +email andi@splitbrain.org +date 2011-04-03 +name safefnrecode plugin +desc Changes existing page and foldernames for the change in the safe filename encoding +url http://www.dokuwiki.org/plugin:safefnrecode -- cgit v1.2.3 From aa235a708b8f394fab1d95f4c5a3cf23cabffd02 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 3 Apr 2011 22:02:27 +0200 Subject: fix end indicator fix --- lib/plugins/safefnrecode/action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php index 6d869c532..4fa5530df 100644 --- a/lib/plugins/safefnrecode/action.php +++ b/lib/plugins/safefnrecode/action.php @@ -57,7 +57,7 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse if(strpos('%',$file) === false) continue; # no encoding used $new = preg_replace('/(%.*?)\./','\1]',$file); # new post indicator - if(preg_match('/%[^\.]+$/',$new)) $new .= ']'; # fix end FS#2122 + if(preg_match('/%[^\]]+$/',$new)) $new .= ']'; # fix end FS#2122 rename("$dir/$file","$dir/$new"); # rename it } closedir($dh); -- cgit v1.2.3 From 903e5bc8f1bbb8bd5c9238c020882b571bb8ea85 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 3 Apr 2011 22:06:34 +0200 Subject: safefnrecode: don't double fix filenames --- lib/plugins/safefnrecode/action.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php index 4fa5530df..76d02e4c7 100644 --- a/lib/plugins/safefnrecode/action.php +++ b/lib/plugins/safefnrecode/action.php @@ -56,7 +56,7 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { if($file == '.' || $file == '..') continue; # cur and upper dir if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse if(strpos('%',$file) === false) continue; # no encoding used - $new = preg_replace('/(%.*?)\./','\1]',$file); # new post indicator + $new = preg_replace('/(%[^\]]*?)\./','\1]',$file); # new post indicator if(preg_match('/%[^\]]+$/',$new)) $new .= ']'; # fix end FS#2122 rename("$dir/$file","$dir/$new"); # rename it } -- cgit v1.2.3 From f7f0e633f735842dfb466878eef440245a9bd3e1 Mon Sep 17 00:00:00 2001 From: Myron Turner Date: Wed, 6 Apr 2011 22:00:00 +0200 Subject: fixed two errors in safefnrecode plugin --- lib/plugins/safefnrecode/action.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugins/safefnrecode/action.php b/lib/plugins/safefnrecode/action.php index 76d02e4c7..5d3eaae3a 100644 --- a/lib/plugins/safefnrecode/action.php +++ b/lib/plugins/safefnrecode/action.php @@ -39,8 +39,8 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { } if(!file_exists($conf['mediadir'].'_safefn.recoded')){ - $this->recode($conf['metadir']); - touch($conf['metadir'].'_safefn.recoded'); + $this->recode($conf['mediadir']); + touch($conf['mediadir'].'_safefn.recoded'); } } @@ -55,7 +55,7 @@ class action_plugin_safefnrecode extends DokuWiki_Action_Plugin { while (($file = readdir($dh)) !== false) { if($file == '.' || $file == '..') continue; # cur and upper dir if(is_dir("$dir/$file")) $this->recode("$dir/$file"); #recurse - if(strpos('%',$file) === false) continue; # no encoding used + if(strpos($file,'%') === false) continue; # no encoding used $new = preg_replace('/(%[^\]]*?)\./','\1]',$file); # new post indicator if(preg_match('/%[^\]]+$/',$new)) $new .= ']'; # fix end FS#2122 rename("$dir/$file","$dir/$new"); # rename it -- cgit v1.2.3 From 6a9d97936d8cb7304d0ce22ccddc0d76bc3dba85 Mon Sep 17 00:00:00 2001 From: Kate Arzamastseva Date: Thu, 7 Apr 2011 16:13:57 +0300 Subject: indexer fix updating the search index --- inc/indexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/indexer.php b/inc/indexer.php index 0fbd939be..b42c092fa 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -1146,7 +1146,7 @@ function idx_addPage($page, $verbose=false) { if(@file_exists($idxtag)){ if(trim(io_readFile($idxtag)) == idx_get_version()){ $last = @filemtime($idxtag); - if($last > @filemtime(wikiFN($ID))){ + if($last > @filemtime(wikiFN($page))){ if ($verbose) print("Indexer: index for $page up to date".DOKU_LF); return false; } -- cgit v1.2.3 From c006739e4780df86d205d5ebc6f39af141cbc3eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Izidor=20Matu=C5=A1ov?= Date: Sun, 20 Mar 2011 23:03:20 +0100 Subject: If the page link is empty, it should link to current page -- FS#2178 --- inc/pageutils.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/inc/pageutils.php b/inc/pageutils.php index cd01dcae7..c9bf60135 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -423,8 +423,14 @@ function resolve_mediaid($ns,&$page,&$exists){ */ function resolve_pageid($ns,&$page,&$exists){ global $conf; + global $ID; $exists = false; + //empty address should point to current page + if ($page === "") { + $page = $ID; + } + //keep hashlink if exists then clean both parts if (strpos($page,'#')) { list($page,$hash) = explode('#',$page,2); -- cgit v1.2.3 From 4ab823396c3a43defae8363fec0e0eceb90720e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Izidor=20Matu=C5=A1ov?= Date: Mon, 4 Apr 2011 11:06:40 +0200 Subject: Unit test cases for FS 2178 --- _test/cases/inc/parser/xhtml_links.test.php | 89 +++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php index 0ad96c793..4954086a2 100644 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ b/_test/cases/inc/parser/xhtml_links.test.php @@ -41,4 +41,93 @@ class xhtml_links_test extends UnitTestCase { $this->assertEqual($p->doc,$expect); } + /** + * Produced by syntax like [[ ]] + */ + function test_empty_internallink(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->internallink(''); + + $expect = 'start'; + + $this->assertEqual($p->doc, $expect); + } + + /** + * Produced by syntax like [[ |my caption]] + */ + function test_empty_internallink_with_caption(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->internallink('', 'my caption'); + + $expect = 'my caption'; + + $this->assertEqual($p->doc, $expect); + } + + /** + * Produced by syntax like [[?do=index]] + */ + function test_empty_internallink_index(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->internallink('?do=index'); + + $expect = 'start'; + + $this->assertEqual($p->doc, $expect); + } + + /** + * Produced by syntax like [[?do=index|my caption]] + */ + function test_empty_internallink_index_with_caption(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->internallink('?do=index', 'my caption'); + + $expect = 'my caption'; + + $this->assertEqual($p->doc, $expect); + } + + /** + * Produced by syntax like [[#test]] + */ + function test_empty_locallink(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->locallink('test'); + + $expect = 'test'; + + $this->assertEqual($p->doc, $expect); + } + + /** + * Produced by syntax like [[#test|my caption]] + */ + function test_empty_locallink_with_caption(){ + global $ID; + $ID = 'my:space'; + + $p = new Doku_Renderer_xhtml(); + $p->locallink('test', 'my caption'); + + $expect = 'my caption'; + + $this->assertEqual($p->doc, $expect); + } } -- cgit v1.2.3 From 38574c3529746542183c68d28c6ad6fc1de2d6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Izidor=20Matu=C5=A1ov?= Date: Thu, 7 Apr 2011 11:44:16 +0200 Subject: Added configuration variables for empty link testcases and added testcases for resolve_pageid --- _test/cases/inc/pageutils_resolve_pageid.test.php | 22 ++++++++++ _test/cases/inc/parser/xhtml_links.test.php | 50 +++++++++++++++++++++-- 2 files changed, 68 insertions(+), 4 deletions(-) diff --git a/_test/cases/inc/pageutils_resolve_pageid.test.php b/_test/cases/inc/pageutils_resolve_pageid.test.php index d9ea89869..c65ed1866 100644 --- a/_test/cases/inc/pageutils_resolve_pageid.test.php +++ b/_test/cases/inc/pageutils_resolve_pageid.test.php @@ -50,6 +50,10 @@ class init_resolve_pageid_test extends UnitTestCase { $tests[] = array('foo','foo:','foo:start'); $tests[] = array('foo','playground:','playground:playground'); + // empty $page + global $ID; + $ID = 'my:space'; + $tests[] = array('my', '', 'my:space'); foreach($tests as $test){ $page = $test[1]; @@ -59,5 +63,23 @@ class init_resolve_pageid_test extends UnitTestCase { } } + /** + * Empty page on homepage should resolve to start page + */ + function test_resolve_pageid_empty_homepage() { + global $ID; + $ID = ''; + + global $conf; + $conf['start'] = 'someverystrangestartname'; + + $ns = ''; + $page = ''; + $exist = true; + + resolve_pageid($ns, $page, $exist); + $this->assertEqual($page, $conf['start']); + } + } //Setup VIM: ex: et ts=4 : diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php index 4954086a2..11883dd9c 100644 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ b/_test/cases/inc/parser/xhtml_links.test.php @@ -48,10 +48,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink(''); - $expect = 'start'; + $expect = 'start'; $this->assertEqual($p->doc, $expect); } @@ -63,10 +70,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink('', 'my caption'); - $expect = 'my caption'; + $expect = 'my caption'; $this->assertEqual($p->doc, $expect); } @@ -78,10 +92,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink('?do=index'); - $expect = 'start'; + $expect = 'start'; $this->assertEqual($p->doc, $expect); } @@ -93,10 +114,17 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->internallink('?do=index', 'my caption'); - $expect = 'my caption'; + $expect = 'my caption'; $this->assertEqual($p->doc, $expect); } @@ -108,6 +136,13 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->locallink('test'); @@ -123,6 +158,13 @@ class xhtml_links_test extends UnitTestCase { global $ID; $ID = 'my:space'; + global $conf; + $conf['basedir'] = '/'; + $conf['useheading'] = 0; + $conf['userewrite'] = 0; + $conf['useslash'] = 0; + $conf['canonical'] = 0; + $p = new Doku_Renderer_xhtml(); $p->locallink('test', 'my caption'); -- cgit v1.2.3 From fda14ffc7c57c4451df9196e8125cd39b1d5c134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Izidor=20Matu=C5=A1ov?= Date: Thu, 7 Apr 2011 19:44:54 +0200 Subject: Check if link exists and set right caption --- _test/cases/inc/parser/xhtml_links.test.php | 94 ++++++++++++++++++++++++----- inc/parser/xhtml.php | 9 +++ 2 files changed, 88 insertions(+), 15 deletions(-) diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php index 11883dd9c..74c39353e 100644 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ b/_test/cases/inc/parser/xhtml_links.test.php @@ -1,6 +1,7 @@ internallink(''); - $expect = 'start'; + + if (page_exists($page)) { + $class = 'wikilink1'; + $rel = ''; + } + else { + $class = 'wikilink2'; + $rel = ' rel="nofollow"'; + } + + $parts = split(':', $page); + $caption = $parts[count($parts)-1]; + + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } @@ -67,8 +86,11 @@ class xhtml_links_test extends UnitTestCase { * Produced by syntax like [[ |my caption]] */ function test_empty_internallink_with_caption(){ + $page = 'my:space'; + $caption = 'my caption'; + global $ID; - $ID = 'my:space'; + $ID = $page; global $conf; $conf['basedir'] = '/'; @@ -78,9 +100,18 @@ class xhtml_links_test extends UnitTestCase { $conf['canonical'] = 0; $p = new Doku_Renderer_xhtml(); - $p->internallink('', 'my caption'); + $p->internallink('', $caption); + + if (page_exists($page)) { + $class = 'wikilink1'; + $rel = ''; + } + else { + $class = 'wikilink2'; + $rel = ' rel="nofollow"'; + } - $expect = 'my caption'; + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } @@ -89,8 +120,13 @@ class xhtml_links_test extends UnitTestCase { * Produced by syntax like [[?do=index]] */ function test_empty_internallink_index(){ + $page = 'my:space'; + global $ID; - $ID = 'my:space'; + $ID = $page; + + global $conf; + $conf['start'] = 'start'; global $conf; $conf['basedir'] = '/'; @@ -102,7 +138,19 @@ class xhtml_links_test extends UnitTestCase { $p = new Doku_Renderer_xhtml(); $p->internallink('?do=index'); - $expect = 'start'; + if (page_exists($page)) { + $class = 'wikilink1'; + $rel = ''; + } + else { + $class = 'wikilink2'; + $rel = ' rel="nofollow"'; + } + + $parts = split(':', $page); + $caption = $parts[count($parts)-1]; + + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } @@ -111,8 +159,11 @@ class xhtml_links_test extends UnitTestCase { * Produced by syntax like [[?do=index|my caption]] */ function test_empty_internallink_index_with_caption(){ + $page = 'my:space'; + $caption = 'my caption'; + global $ID; - $ID = 'my:space'; + $ID = $page; global $conf; $conf['basedir'] = '/'; @@ -122,9 +173,18 @@ class xhtml_links_test extends UnitTestCase { $conf['canonical'] = 0; $p = new Doku_Renderer_xhtml(); - $p->internallink('?do=index', 'my caption'); + $p->internallink('?do=index', $caption); - $expect = 'my caption'; + if (page_exists($page)) { + $class = 'wikilink1'; + $rel = ''; + } + else { + $class = 'wikilink2'; + $rel = ' rel="nofollow"'; + } + + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } @@ -133,8 +193,9 @@ class xhtml_links_test extends UnitTestCase { * Produced by syntax like [[#test]] */ function test_empty_locallink(){ + $page = 'my:spacex'; global $ID; - $ID = 'my:space'; + $ID = $page; global $conf; $conf['basedir'] = '/'; @@ -146,7 +207,7 @@ class xhtml_links_test extends UnitTestCase { $p = new Doku_Renderer_xhtml(); $p->locallink('test'); - $expect = 'test'; + $expect = 'test'; $this->assertEqual($p->doc, $expect); } @@ -155,8 +216,11 @@ class xhtml_links_test extends UnitTestCase { * Produced by syntax like [[#test|my caption]] */ function test_empty_locallink_with_caption(){ + $page = 'my:spacex'; + $caption = 'my caption'; + global $ID; - $ID = 'my:space'; + $ID = $page; global $conf; $conf['basedir'] = '/'; @@ -166,9 +230,9 @@ class xhtml_links_test extends UnitTestCase { $conf['canonical'] = 0; $p = new Doku_Renderer_xhtml(); - $p->locallink('test', 'my caption'); + $p->locallink('test', $caption); - $expect = 'my caption'; + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 9405d9420..ab295dd01 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -574,11 +574,20 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $params = $parts[1]; } + // For empty $id we need to know the current $ID + // We need this check because _simpleTitle needs + // correct $id and resolve_pageid() use cleanID($id) + // (some things could be lost) + if ($id === '') { + $id = $ID; + } + // default name is based on $id as given $default = $this->_simpleTitle($id); // now first resolve and clean up the $id resolve_pageid(getNS($ID),$id,$exists); + $name = $this->_getLinkTitle($name, $default, $isImage, $id, $linktype); if ( !$isImage ) { if ( $exists ) { -- cgit v1.2.3 From 0c28bbb66296d814d8969a62c54001516ed3e0ad Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Sat, 9 Apr 2011 13:30:34 +0200 Subject: Fix page ID test cases & make them more robust --- _test/cases/inc/pageutils_getid.test.php | 2 +- _test/cases/inc/parser/xhtml_links.test.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_test/cases/inc/pageutils_getid.test.php b/_test/cases/inc/pageutils_getid.test.php index 7fccc3a60..6eddeb5ea 100644 --- a/_test/cases/inc/pageutils_getid.test.php +++ b/_test/cases/inc/pageutils_getid.test.php @@ -99,7 +99,7 @@ class init_getID_test extends UnitTestCase { $_SERVER['PATH_TRANSLATED'] = '/var/www/index.html'; $_SERVER['PHP_SELF'] = '/dokuwiki/doku.php/'; - $this->assertEqual(getID(), 'start'); + $this->assertEqual(getID(), cleanID($conf['start'])); } } diff --git a/_test/cases/inc/parser/xhtml_links.test.php b/_test/cases/inc/parser/xhtml_links.test.php index 74c39353e..a9a6dfdbc 100644 --- a/_test/cases/inc/parser/xhtml_links.test.php +++ b/_test/cases/inc/parser/xhtml_links.test.php @@ -232,7 +232,7 @@ class xhtml_links_test extends UnitTestCase { $p = new Doku_Renderer_xhtml(); $p->locallink('test', $caption); - $expect = ''.$caption.''; + $expect = ''.$caption.''; $this->assertEqual($p->doc, $expect); } -- cgit v1.2.3 From 32ed2b361abb0cb00bee6572d022684260f0edd2 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 11 Apr 2011 17:21:36 +0200 Subject: stay logged in when updating your password This functionality broke in recent updates to the cookie handling. This patch makes it work again. Binding to the session is now a functionality of auth_cookiesalt() --- inc/auth.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/inc/auth.php b/inc/auth.php index 53376be34..a480a4a8a 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -189,8 +189,7 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ if ($auth->checkPass($user,$pass)){ // make logininfo globally available $_SERVER['REMOTE_USER'] = $user; - $secret = auth_cookiesalt(); - if(!$sticky) $secret .= session_id; //bind non-sticky to session + $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session auth_setCookie($user,PMA_blowfish_encrypt($pass,$secret),$sticky); return true; }else{ @@ -220,8 +219,7 @@ function auth_login($user,$pass,$sticky=false,$silent=false){ return true; } // no we don't trust it yet - recheck pass but silent - $secret = auth_cookiesalt(); - if(!$sticky) $secret .= session_id(); //bind non-sticky to session + $secret = auth_cookiesalt(!$sticky); //bind non-sticky to session $pass = PMA_blowfish_decrypt($pass,$secret); return auth_login($user,$pass,$sticky,true); } @@ -303,10 +301,10 @@ function auth_browseruid(){ * and stored in this file. * * @author Andreas Gohr - * + * @param bool $addsession if true, the sessionid is added to the salt * @return string */ -function auth_cookiesalt(){ +function auth_cookiesalt($addsession=false){ global $conf; $file = $conf['metadir'].'/_htcookiesalt'; $salt = io_readFile($file); @@ -314,6 +312,9 @@ function auth_cookiesalt(){ $salt = uniqid(rand(),true); io_saveFile($file,$salt); } + if($addsession){ + $salt .= session_id(); + } return $salt; } @@ -814,11 +815,11 @@ function updateprofile() { if ($result = $auth->triggerUserMod('modify', array($_SERVER['REMOTE_USER'], $changes))) { // update cookie and session with the changed data - $cookie = base64_decode($_COOKIE[DOKU_COOKIE]); - list($user,$sticky,$pass) = explode('|',$cookie,3); - if ($changes['pass']) $pass = PMA_blowfish_encrypt($changes['pass'],auth_cookiesalt()); - - auth_setCookie($_SERVER['REMOTE_USER'],$pass,(bool)$sticky); + if ($changes['pass']){ + list($user,$sticky,$pass) = auth_getCookie(); + $pass = PMA_blowfish_encrypt($changes['pass'],auth_cookiesalt(!$sticky)); + auth_setCookie($_SERVER['REMOTE_USER'],$pass,(bool)$sticky); + } return true; } } -- cgit v1.2.3 From c6792be7965e27a806043ef0dc82c3c0ed7b4060 Mon Sep 17 00:00:00 2001 From: Tanguy Ortolo Date: Wed, 13 Apr 2011 22:22:15 +0200 Subject: chmod -x inc/lang/az/* These regular files were executable for no reason. They needed a special rule for the Debian package, better to fix it upstream. --- inc/lang/az/admin.txt | 0 inc/lang/az/adminplugins.txt | 0 inc/lang/az/backlinks.txt | 0 inc/lang/az/conflict.txt | 0 inc/lang/az/denied.txt | 0 inc/lang/az/diff.txt | 0 inc/lang/az/draft.txt | 0 inc/lang/az/edit.txt | 0 inc/lang/az/editrev.txt | 0 inc/lang/az/index.txt | 0 inc/lang/az/install.html | 0 inc/lang/az/locked.txt | 0 inc/lang/az/login.txt | 0 inc/lang/az/mailtext.txt | 0 inc/lang/az/newpage.txt | 0 inc/lang/az/norev.txt | 0 inc/lang/az/password.txt | 0 inc/lang/az/preview.txt | 0 inc/lang/az/pwconfirm.txt | 0 inc/lang/az/read.txt | 0 inc/lang/az/recent.txt | 0 inc/lang/az/register.txt | 0 inc/lang/az/registermail.txt | 0 inc/lang/az/resendpwd.txt | 0 inc/lang/az/revisions.txt | 0 inc/lang/az/searchpage.txt | 0 inc/lang/az/showrev.txt | 0 inc/lang/az/stopwords.txt | 0 inc/lang/az/updateprofile.txt | 0 inc/lang/az/uploadmail.txt | 0 inc/lang/az/wordblock.txt | 0 31 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 inc/lang/az/admin.txt mode change 100755 => 100644 inc/lang/az/adminplugins.txt mode change 100755 => 100644 inc/lang/az/backlinks.txt mode change 100755 => 100644 inc/lang/az/conflict.txt mode change 100755 => 100644 inc/lang/az/denied.txt mode change 100755 => 100644 inc/lang/az/diff.txt mode change 100755 => 100644 inc/lang/az/draft.txt mode change 100755 => 100644 inc/lang/az/edit.txt mode change 100755 => 100644 inc/lang/az/editrev.txt mode change 100755 => 100644 inc/lang/az/index.txt mode change 100755 => 100644 inc/lang/az/install.html mode change 100755 => 100644 inc/lang/az/locked.txt mode change 100755 => 100644 inc/lang/az/login.txt mode change 100755 => 100644 inc/lang/az/mailtext.txt mode change 100755 => 100644 inc/lang/az/newpage.txt mode change 100755 => 100644 inc/lang/az/norev.txt mode change 100755 => 100644 inc/lang/az/password.txt mode change 100755 => 100644 inc/lang/az/preview.txt mode change 100755 => 100644 inc/lang/az/pwconfirm.txt mode change 100755 => 100644 inc/lang/az/read.txt mode change 100755 => 100644 inc/lang/az/recent.txt mode change 100755 => 100644 inc/lang/az/register.txt mode change 100755 => 100644 inc/lang/az/registermail.txt mode change 100755 => 100644 inc/lang/az/resendpwd.txt mode change 100755 => 100644 inc/lang/az/revisions.txt mode change 100755 => 100644 inc/lang/az/searchpage.txt mode change 100755 => 100644 inc/lang/az/showrev.txt mode change 100755 => 100644 inc/lang/az/stopwords.txt mode change 100755 => 100644 inc/lang/az/updateprofile.txt mode change 100755 => 100644 inc/lang/az/uploadmail.txt mode change 100755 => 100644 inc/lang/az/wordblock.txt diff --git a/inc/lang/az/admin.txt b/inc/lang/az/admin.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/adminplugins.txt b/inc/lang/az/adminplugins.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/backlinks.txt b/inc/lang/az/backlinks.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/conflict.txt b/inc/lang/az/conflict.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/denied.txt b/inc/lang/az/denied.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/diff.txt b/inc/lang/az/diff.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/draft.txt b/inc/lang/az/draft.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/edit.txt b/inc/lang/az/edit.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/editrev.txt b/inc/lang/az/editrev.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/index.txt b/inc/lang/az/index.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/install.html b/inc/lang/az/install.html old mode 100755 new mode 100644 diff --git a/inc/lang/az/locked.txt b/inc/lang/az/locked.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/login.txt b/inc/lang/az/login.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/mailtext.txt b/inc/lang/az/mailtext.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/newpage.txt b/inc/lang/az/newpage.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/norev.txt b/inc/lang/az/norev.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/password.txt b/inc/lang/az/password.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/preview.txt b/inc/lang/az/preview.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/pwconfirm.txt b/inc/lang/az/pwconfirm.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/read.txt b/inc/lang/az/read.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/recent.txt b/inc/lang/az/recent.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/register.txt b/inc/lang/az/register.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/registermail.txt b/inc/lang/az/registermail.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/resendpwd.txt b/inc/lang/az/resendpwd.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/revisions.txt b/inc/lang/az/revisions.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/searchpage.txt b/inc/lang/az/searchpage.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/showrev.txt b/inc/lang/az/showrev.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/stopwords.txt b/inc/lang/az/stopwords.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/updateprofile.txt b/inc/lang/az/updateprofile.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/uploadmail.txt b/inc/lang/az/uploadmail.txt old mode 100755 new mode 100644 diff --git a/inc/lang/az/wordblock.txt b/inc/lang/az/wordblock.txt old mode 100755 new mode 100644 -- cgit v1.2.3 From 45a0fa152ba78aed840341ef83613c58c0ea706e Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Thu, 14 Apr 2011 07:57:49 +0200 Subject: Support the empty link [[]] --- _test/cases/inc/parser/parser_links.test.php | 15 +++++++++++++++ inc/parser/parser.php | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/_test/cases/inc/parser/parser_links.test.php b/_test/cases/inc/parser/parser_links.test.php index a4a8c5826..53871e110 100644 --- a/_test/cases/inc/parser/parser_links.test.php +++ b/_test/cases/inc/parser/parser_links.test.php @@ -221,6 +221,21 @@ class TestOfDoku_Parser_Links extends TestOfDoku_Parser { $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); } + function testInternalLinkNoChar() { + $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); + $this->P->parse("Foo [[]] Bar"); + $calls = array ( + array('document_start',array()), + array('p_open',array()), + array('cdata',array("\n".'Foo ')), + array('internallink',array('',NULL)), + array('cdata',array(' Bar')), + array('p_close',array()), + array('document_end',array()), + ); + $this->assertEqual(array_map('stripByteIndex',$this->H->calls),$calls); + } + function testInternalLinkNamespaceNoTitle() { $this->P->addMode('internallink',new Doku_Parser_Mode_InternalLink()); $this->P->parse("Foo [[foo:bar]] Bar"); diff --git a/inc/parser/parser.php b/inc/parser/parser.php index e47ce56fa..68d4e4569 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -828,7 +828,7 @@ class Doku_Parser_Mode_internallink extends Doku_Parser_Mode { function connectTo($mode) { // Word boundaries? - $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.+?)\]\]",$mode,'internallink'); + $this->Lexer->addSpecialPattern("\[\[(?:(?:[^[\]]*?\[.*?\])|.*?)\]\]",$mode,'internallink'); } function getSort() { -- cgit v1.2.3 From 8e65cd510bfa93eba1b847b6cbea1764fad480af Mon Sep 17 00:00:00 2001 From: Otto Vainio Date: Fri, 1 Apr 2011 19:56:32 +0200 Subject: Finnish language update --- inc/lang/fi/lang.php | 3 +++ inc/lang/fi/stopwords.txt | 12 ++++++++++++ lib/plugins/config/lang/fi/lang.php | 2 +- lib/plugins/plugin/lang/fi/lang.php | 2 +- lib/plugins/popularity/lang/fi/lang.php | 5 +++++ lib/plugins/popularity/lang/fi/submitted.txt | 3 +++ 6 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 lib/plugins/popularity/lang/fi/submitted.txt diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index bc52625e0..f8042a645 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -159,6 +159,9 @@ $lang['yours'] = 'Sinun versiosi'; $lang['diff'] = 'Näytä eroavaisuudet nykyiseen versioon'; $lang['diff2'] = 'Näytä eroavaisuudet valittuun versioon'; $lang['difflink'] = 'Linkki vertailunäkymään'; +$lang['diff_type'] = 'Näytä erot:'; +$lang['diff_inline'] = 'Sisäkkäin'; +$lang['diff_side'] = 'Vierekkäin'; $lang['line'] = 'Rivi'; $lang['breadcrumb'] = 'Jäljet'; $lang['youarehere'] = 'Olet täällä'; diff --git a/inc/lang/fi/stopwords.txt b/inc/lang/fi/stopwords.txt index 82d3daa44..509dd0d03 100644 --- a/inc/lang/fi/stopwords.txt +++ b/inc/lang/fi/stopwords.txt @@ -5,7 +5,19 @@ www eli tai +minä sinä +hän +tämä +tuo +nämä +nuo +kuka +mikä +kumpi sinun com oli +jos +kun +joka diff --git a/lib/plugins/config/lang/fi/lang.php b/lib/plugins/config/lang/fi/lang.php index b033e312b..5a167c9aa 100644 --- a/lib/plugins/config/lang/fi/lang.php +++ b/lib/plugins/config/lang/fi/lang.php @@ -97,7 +97,7 @@ $lang['canonical'] = 'Käytä kanonisoituja URLeja'; $lang['fnencode'] = 'Muita kuin ASCII merkkejä sisältävien tiedostonimien koodaustapa.'; $lang['autoplural'] = 'Etsi monikkomuotoja linkeistä'; $lang['compression'] = 'Attic-tiedostojen pakkausmenetelmä'; -$lang['cachetime'] = 'Välimuisti-tiedostojen maksimi-ikä (sek)'; +$lang['cachetime'] = 'Välimuisti-tiedostojen maksimi ikä (sek)'; $lang['locktime'] = 'Lukitustiedostojen maksimi-ikä (sek)'; $lang['fetchsize'] = 'Suurin koko (bytejä), jonka fetch.php voi ladata ulkopuolisesta lähteestä'; $lang['notify'] = 'Lähetä muutosilmoitukset tähän osoitteeseen'; diff --git a/lib/plugins/plugin/lang/fi/lang.php b/lib/plugins/plugin/lang/fi/lang.php index 817b4f20a..b4c95c56d 100644 --- a/lib/plugins/plugin/lang/fi/lang.php +++ b/lib/plugins/plugin/lang/fi/lang.php @@ -44,7 +44,7 @@ $lang['error_download'] = 'Liitännäistiedoston %s latauksessa tapahtui $lang['error_badurl'] = 'URL vaikuttaa olleen virheellinen. Siitä ei pystytty päättelemään tiedoston nimeä'; $lang['error_dircreate'] = 'Ei pystytty luomaan väliaikaista hakemistoa latausta varten'; $lang['error_decompress'] = 'Liitännäishallinta ei pystynyt purkamaan ladattua tiedostoa. Lataus voi olla epäonnistunut. Siinä tapauksessa voit yrittää uudestaan. Pakkaustapa voi myös olla tuntematon. Siinä tapauksessa sinun pitää ladata ja asentaa liitännäinen käsin.'; -$lang['error_copy'] = 'Tiedoston kopioinnissa tapahtui liitännäisen %s asennuksen aikana virhe. Levy voi olla täynnä tai kansioiden oikeudet voivat olla väärin. Liitännäinen voi olla osittain asennettu ja tämä voi jättää wikiasennukseesi epävakaaseen tilaan.'; +$lang['error_copy'] = 'Tiedoston kopioinnissa tapahtui liitännäisen %s asennuksen aikana virhe. Levy voi olla täynnä tai kansioiden oikeudet voivat olla väärin. Liitännäinen voi olla osittain asennettu ja tämä voi jättää wikisi epävakaaseen tilaan.'; $lang['error_delete'] = 'Liitännäisen %s poistossa tapahtui virhe. Todennäköisin syy on puutteelliset tiedoston tai hakemiston oikeudet'; $lang['enabled'] = 'Liitännäinen %s käytössä'; $lang['notenabled'] = 'Liitännäistä %s ei voitu ottaa käyttöön. Tarkista tiedostojen oikeudet.'; diff --git a/lib/plugins/popularity/lang/fi/lang.php b/lib/plugins/popularity/lang/fi/lang.php index 3aa5dc23b..dca4aa909 100644 --- a/lib/plugins/popularity/lang/fi/lang.php +++ b/lib/plugins/popularity/lang/fi/lang.php @@ -7,3 +7,8 @@ */ $lang['name'] = 'Suosion palaute (voi kestää jonkun aikaa latautua)'; $lang['submit'] = 'Lähetä tiedot'; +$lang['autosubmit'] = 'Lähetä tiedot automaattisesti kerran kuussa'; +$lang['submissionFailed'] = 'Tietoja ei voitu lähettää seuraavan virheen vuoksi:'; +$lang['submitDirectly'] = 'Voit lähettää tiedot manuaalisesti.'; +$lang['autosubmitError'] = 'Edellinen automaattinen lähetys epäonnistui seuraavan virheen vuoksi:'; +$lang['lastSent'] = 'Tiedot on nyt lähettetty.'; diff --git a/lib/plugins/popularity/lang/fi/submitted.txt b/lib/plugins/popularity/lang/fi/submitted.txt new file mode 100644 index 000000000..b36e7eb23 --- /dev/null +++ b/lib/plugins/popularity/lang/fi/submitted.txt @@ -0,0 +1,3 @@ +====== Suosion palaute ====== + +Tiedot on nyt lähetetty onnistuneesti. \ No newline at end of file -- cgit v1.2.3 From dd5aedfa30ea1210c38697bb39fb945033cf806b Mon Sep 17 00:00:00 2001 From: Constantinos Xanthopoulos Date: Sat, 16 Apr 2011 09:17:55 +0200 Subject: French language update --- lib/plugins/config/lang/fr/lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index 99e140af5..f5a8da0e2 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -103,7 +103,7 @@ $lang['useslash'] = 'Utiliser « / » comme séparateur de catég $lang['usedraft'] = 'Enregistrer automatiquement un brouillon pendant l\'édition'; $lang['sepchar'] = 'Séparateur de mots dans les noms de page'; $lang['canonical'] = 'Utiliser des URL canoniques'; -$lang['fnencode'] = 'Méhtode pou r l\'encodage des fichiers non-ASCII'; +$lang['fnencode'] = 'Méthode pour l\'encodage des fichiers non-ASCII'; $lang['autoplural'] = 'Rechercher les formes plurielles dans les liens'; $lang['compression'] = 'Méthode de compression pour les fichiers dans attic'; $lang['cachetime'] = 'Âge maximum d\'un fichier en cache (en secondes)'; -- cgit v1.2.3 From 7b89361c0d7aaa6bdf28c200aa93fc8f1435cad9 Mon Sep 17 00:00:00 2001 From: Otto Vainio Date: Sat, 16 Apr 2011 09:18:56 +0200 Subject: Finnish language update --- inc/lang/fi/lang.php | 2 +- inc/lang/fi/stopwords.txt | 12 ------------ lib/plugins/config/lang/fi/lang.php | 3 ++- lib/plugins/plugin/lang/fi/lang.php | 2 +- lib/plugins/popularity/lang/fi/lang.php | 6 +++--- lib/plugins/popularity/lang/fi/submitted.txt | 2 +- 6 files changed, 8 insertions(+), 19 deletions(-) diff --git a/inc/lang/fi/lang.php b/inc/lang/fi/lang.php index f8042a645..35f7b3c09 100644 --- a/inc/lang/fi/lang.php +++ b/inc/lang/fi/lang.php @@ -159,7 +159,7 @@ $lang['yours'] = 'Sinun versiosi'; $lang['diff'] = 'Näytä eroavaisuudet nykyiseen versioon'; $lang['diff2'] = 'Näytä eroavaisuudet valittuun versioon'; $lang['difflink'] = 'Linkki vertailunäkymään'; -$lang['diff_type'] = 'Näytä erot:'; +$lang['diff_type'] = 'Näytä eroavaisuudet:'; $lang['diff_inline'] = 'Sisäkkäin'; $lang['diff_side'] = 'Vierekkäin'; $lang['line'] = 'Rivi'; diff --git a/inc/lang/fi/stopwords.txt b/inc/lang/fi/stopwords.txt index 509dd0d03..82d3daa44 100644 --- a/inc/lang/fi/stopwords.txt +++ b/inc/lang/fi/stopwords.txt @@ -5,19 +5,7 @@ www eli tai -minä sinä -hän -tämä -tuo -nämä -nuo -kuka -mikä -kumpi sinun com oli -jos -kun -joka diff --git a/lib/plugins/config/lang/fi/lang.php b/lib/plugins/config/lang/fi/lang.php index 5a167c9aa..a4c0fbb85 100644 --- a/lib/plugins/config/lang/fi/lang.php +++ b/lib/plugins/config/lang/fi/lang.php @@ -97,12 +97,13 @@ $lang['canonical'] = 'Käytä kanonisoituja URLeja'; $lang['fnencode'] = 'Muita kuin ASCII merkkejä sisältävien tiedostonimien koodaustapa.'; $lang['autoplural'] = 'Etsi monikkomuotoja linkeistä'; $lang['compression'] = 'Attic-tiedostojen pakkausmenetelmä'; -$lang['cachetime'] = 'Välimuisti-tiedostojen maksimi ikä (sek)'; +$lang['cachetime'] = 'Välimuisti-tiedostojen maksimi-ikä (sek)'; $lang['locktime'] = 'Lukitustiedostojen maksimi-ikä (sek)'; $lang['fetchsize'] = 'Suurin koko (bytejä), jonka fetch.php voi ladata ulkopuolisesta lähteestä'; $lang['notify'] = 'Lähetä muutosilmoitukset tähän osoitteeseen'; $lang['registernotify'] = 'Lähetä ilmoitus uusista rekisteröitymisistä tähän osoitteeseen'; $lang['mailfrom'] = 'Sähköpostiosoite automaattisia postituksia varten'; +$lang['mailprefix'] = 'Etuliite automaattisesti lähetettyihin dähköposteihin'; $lang['gzip_output'] = 'Käytä gzip "Content-Encoding"-otsaketta xhtml-tiedostojen lähettämiseen'; $lang['gdlib'] = 'GD Lib versio'; $lang['im_convert'] = 'ImageMagick-muunnostyökalun polku'; diff --git a/lib/plugins/plugin/lang/fi/lang.php b/lib/plugins/plugin/lang/fi/lang.php index b4c95c56d..817b4f20a 100644 --- a/lib/plugins/plugin/lang/fi/lang.php +++ b/lib/plugins/plugin/lang/fi/lang.php @@ -44,7 +44,7 @@ $lang['error_download'] = 'Liitännäistiedoston %s latauksessa tapahtui $lang['error_badurl'] = 'URL vaikuttaa olleen virheellinen. Siitä ei pystytty päättelemään tiedoston nimeä'; $lang['error_dircreate'] = 'Ei pystytty luomaan väliaikaista hakemistoa latausta varten'; $lang['error_decompress'] = 'Liitännäishallinta ei pystynyt purkamaan ladattua tiedostoa. Lataus voi olla epäonnistunut. Siinä tapauksessa voit yrittää uudestaan. Pakkaustapa voi myös olla tuntematon. Siinä tapauksessa sinun pitää ladata ja asentaa liitännäinen käsin.'; -$lang['error_copy'] = 'Tiedoston kopioinnissa tapahtui liitännäisen %s asennuksen aikana virhe. Levy voi olla täynnä tai kansioiden oikeudet voivat olla väärin. Liitännäinen voi olla osittain asennettu ja tämä voi jättää wikisi epävakaaseen tilaan.'; +$lang['error_copy'] = 'Tiedoston kopioinnissa tapahtui liitännäisen %s asennuksen aikana virhe. Levy voi olla täynnä tai kansioiden oikeudet voivat olla väärin. Liitännäinen voi olla osittain asennettu ja tämä voi jättää wikiasennukseesi epävakaaseen tilaan.'; $lang['error_delete'] = 'Liitännäisen %s poistossa tapahtui virhe. Todennäköisin syy on puutteelliset tiedoston tai hakemiston oikeudet'; $lang['enabled'] = 'Liitännäinen %s käytössä'; $lang['notenabled'] = 'Liitännäistä %s ei voitu ottaa käyttöön. Tarkista tiedostojen oikeudet.'; diff --git a/lib/plugins/popularity/lang/fi/lang.php b/lib/plugins/popularity/lang/fi/lang.php index dca4aa909..a73f63501 100644 --- a/lib/plugins/popularity/lang/fi/lang.php +++ b/lib/plugins/popularity/lang/fi/lang.php @@ -9,6 +9,6 @@ $lang['name'] = 'Suosion palaute (voi kestää jonkun aikaa lat $lang['submit'] = 'Lähetä tiedot'; $lang['autosubmit'] = 'Lähetä tiedot automaattisesti kerran kuussa'; $lang['submissionFailed'] = 'Tietoja ei voitu lähettää seuraavan virheen vuoksi:'; -$lang['submitDirectly'] = 'Voit lähettää tiedot manuaalisesti.'; -$lang['autosubmitError'] = 'Edellinen automaattinen lähetys epäonnistui seuraavan virheen vuoksi:'; -$lang['lastSent'] = 'Tiedot on nyt lähettetty.'; +$lang['submitDirectly'] = 'Voit lähettää tiedot käsin seuraavan kaavakkeen avulla'; +$lang['autosubmitError'] = 'Edellinen automaattilähetys epäonnistui seuraavan virheen vuoksi:'; +$lang['lastSent'] = 'Tiedot on lähetetty'; diff --git a/lib/plugins/popularity/lang/fi/submitted.txt b/lib/plugins/popularity/lang/fi/submitted.txt index b36e7eb23..31059c880 100644 --- a/lib/plugins/popularity/lang/fi/submitted.txt +++ b/lib/plugins/popularity/lang/fi/submitted.txt @@ -1,3 +1,3 @@ ====== Suosion palaute ====== -Tiedot on nyt lähetetty onnistuneesti. \ No newline at end of file +Tiedot lähetettiin onnistuneesti. \ No newline at end of file -- cgit v1.2.3 From eeb828da84a0ee39a62c0c9bf4ecc3d006c6e6e9 Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sat, 16 Apr 2011 10:06:43 +0200 Subject: Update copyright year --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 76a7cf6cd..6bb9a3bd9 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ at http://www.dokuwiki.org/ For Installation Instructions see http://www.dokuwiki.org/install -DokuWiki - 2004-2010 (c) Andreas Gohr +DokuWiki - 2004-2011 (c) Andreas Gohr and the DokuWiki Community See COPYING and file headers for license info -- cgit v1.2.3 From 8dbd31e5a77929167c5dbba14c448c6acc0be95b Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sat, 16 Apr 2011 10:07:11 +0200 Subject: Fix broken link to config help page --- conf/dokuwiki.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 538b9f9da..e90e4fc23 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -7,7 +7,7 @@ * * This is a piece of PHP code so PHP syntax applies! * - * For help with the configuration see http://www.splitbrain.org/dokuwiki/wiki:config + * For help with the configuration see http://www.dokuwiki.org/config */ -- cgit v1.2.3 From 116065d2d8aa1613c8b90b01606efacc4fe846d1 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 16 Apr 2011 11:54:47 +0200 Subject: fix ACL preview for users with special chars FS#2206 The user was nameencoded twice. --- lib/plugins/acl/admin.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 3e7bd8121..8ca602533 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -17,7 +17,7 @@ if(!defined('DOKU_INC')) die(); class admin_plugin_acl extends DokuWiki_Admin_Plugin { var $acl = null; var $ns = null; - /** + /** * The currently selected item, associative array with id and type. * Populated from (in this order): * $_REQUEST['current_ns'] @@ -37,7 +37,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { return array( 'author' => 'Andreas Gohr', 'email' => 'andi@splitbrain.org', - 'date' => '2010-01-17', + 'date' => '2011-04-16', 'name' => 'ACL Manager', 'desc' => 'Manage Page Access Control Lists', 'url' => 'http://dokuwiki.org/plugin:acl', @@ -449,7 +449,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { $user = ''; $groups = array(ltrim($who,'@')); }else{ - $user = auth_nameencode($who); + $user = $who; $info = $auth->getUserData($user); if($info === false){ $groups = array(); @@ -521,7 +521,7 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { } // highlight? - if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) + if( ($item['type']== $this->current_item['type'] && $item['id'] == $this->current_item['id'])) $cl = ' cur'; // namespace or page? -- cgit v1.2.3 From e8af313f1b6657e3a1b32d6fdd40bc0133a2d371 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 12:02:38 +0100 Subject: fixed invalid html in diff options --- inc/html.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/html.php b/inc/html.php index fcfa54b6c..27f862219 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1004,7 +1004,7 @@ function html_diff($text='',$intro=true,$type=null){ if($intro) print p_locale_xhtml('diff'); if (!$text) { - ptln('
'); $form = new Doku_Form(array('action'=>wl())); $form->addHidden('id',$ID); @@ -1030,8 +1030,8 @@ function html_diff($text='',$intro=true,$type=null){ 'rev2[1]' => $r_rev, 'difftype' => $type, )); - ptln('
'.$lang['difflink'].''); - ptln('

'); + ptln('

'.$lang['difflink'].'

'); + ptln('
'); } ?>
> diff --git a/inc/lang/en/lang.php b/inc/lang/en/lang.php index 9ccbe14e0..8abd4314c 100644 --- a/inc/lang/en/lang.php +++ b/inc/lang/en/lang.php @@ -164,6 +164,9 @@ $lang['yours'] = 'Your Version'; $lang['diff'] = 'Show differences to current revisions'; $lang['diff2'] = 'Show differences between selected revisions'; $lang['difflink'] = 'Link to this comparison view'; +$lang['diff_type'] = 'View differences:'; +$lang['diff_inline']= 'Inline'; +$lang['diff_side'] = 'Side by Side'; $lang['line'] = 'Line'; $lang['breadcrumb'] = 'Trace'; $lang['youarehere'] = 'You are here'; diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css index 09a9ecf01..42f9f622e 100644 --- a/lib/tpl/default/design.css +++ b/lib/tpl/default/design.css @@ -652,10 +652,12 @@ div.dokuwiki table.diff td { font-family: monospace; font-size: 100%; } -div.dokuwiki td.diff-addedline { +div.dokuwiki td.diff-addedline, +div.dokuwiki span.diff-addedline { background-color: #ddffdd; } -div.dokuwiki td.diff-deletedline { +div.dokuwiki td.diff-deletedline, +div.dokuwiki span.diff-deletedline { background-color: #ffffbb; } div.dokuwiki td.diff-context { -- cgit v1.2.3 From 1d2abd96da5a82baaa9ebb6582f388337d02ce4e Mon Sep 17 00:00:00 2001 From: Kiril Velikov Date: Tue, 1 Feb 2011 18:03:33 +0100 Subject: Bulgarian language update --- inc/lang/bg/admin.txt | 4 +- inc/lang/bg/adminplugins.txt | 2 +- inc/lang/bg/backlinks.txt | 4 +- inc/lang/bg/conflict.txt | 6 +- inc/lang/bg/denied.txt | 2 +- inc/lang/bg/diff.txt | 2 +- inc/lang/bg/draft.txt | 4 +- inc/lang/bg/edit.txt | 2 +- inc/lang/bg/editrev.txt | 2 +- inc/lang/bg/index.txt | 2 +- inc/lang/bg/install.html | 32 ++-- inc/lang/bg/lang.php | 214 ++++++++++++++------------- inc/lang/bg/locked.txt | 4 +- inc/lang/bg/login.txt | 4 +- inc/lang/bg/newpage.txt | 2 +- inc/lang/bg/norev.txt | 2 +- inc/lang/bg/password.txt | 4 +- inc/lang/bg/preview.txt | 2 +- inc/lang/bg/pwconfirm.txt | 7 +- inc/lang/bg/read.txt | 2 +- inc/lang/bg/register.txt | 2 +- inc/lang/bg/resendpwd.txt | 2 +- inc/lang/bg/revisions.txt | 4 +- inc/lang/bg/searchpage.txt | 2 +- inc/lang/bg/showrev.txt | 2 +- inc/lang/bg/stopwords.txt | 4 +- inc/lang/bg/updateprofile.txt | 2 +- inc/lang/bg/uploadmail.txt | 2 +- lib/plugins/acl/lang/bg/lang.php | 1 + lib/plugins/config/lang/bg/intro.txt | 6 +- lib/plugins/config/lang/bg/lang.php | 66 +++++---- lib/plugins/plugin/lang/bg/lang.php | 1 + lib/plugins/popularity/lang/bg/intro.txt | 10 +- lib/plugins/popularity/lang/bg/lang.php | 10 +- lib/plugins/popularity/lang/bg/submitted.txt | 3 + lib/plugins/revert/lang/bg/lang.php | 1 + lib/plugins/usermanager/lang/bg/lang.php | 17 ++- 37 files changed, 225 insertions(+), 213 deletions(-) create mode 100644 lib/plugins/popularity/lang/bg/submitted.txt diff --git a/inc/lang/bg/admin.txt b/inc/lang/bg/admin.txt index 8d16f68aa..8958997ae 100644 --- a/inc/lang/bg/admin.txt +++ b/inc/lang/bg/admin.txt @@ -1,3 +1,3 @@ -====== Администрация ====== +====== Администриране ====== -Долу може да намерите списък с администраторски задачи в DokuWiki. \ No newline at end of file +Долу ще намерите списъка с администраторски задачи в DokuWiki. \ No newline at end of file diff --git a/inc/lang/bg/adminplugins.txt b/inc/lang/bg/adminplugins.txt index 2b0268ed4..df24b0538 100644 --- a/inc/lang/bg/adminplugins.txt +++ b/inc/lang/bg/adminplugins.txt @@ -1 +1 @@ -===== Допълнителни Plugins ===== \ No newline at end of file +===== Допълнителни приставки ===== \ No newline at end of file diff --git a/inc/lang/bg/backlinks.txt b/inc/lang/bg/backlinks.txt index 28801a8ee..70cb81dc3 100644 --- a/inc/lang/bg/backlinks.txt +++ b/inc/lang/bg/backlinks.txt @@ -1,3 +1,3 @@ -====== Задни връзки ====== +====== Обратни препратки ====== -Това е списък на страници, които изглежда препращат обратно към текущата страница. +Това е списък на страници, които препращат обратно към текущата страница. diff --git a/inc/lang/bg/conflict.txt b/inc/lang/bg/conflict.txt index 51ec4b706..8c62a3787 100644 --- a/inc/lang/bg/conflict.txt +++ b/inc/lang/bg/conflict.txt @@ -1,6 +1,6 @@ -====== По-нова версия съшествува ====== +====== Съществува по-нова версия ====== -По-нова версия на документа който сте редактирали съществува. Това се случва когато друг потребител е променил документа докато сте го редактирали. +Съществува по-нова версия на документа, който сте редактирали. Това се случва когато друг потребител е променил документа докато сте го редактирали. -Разгледайте внимателно разгледайте разликите показани долу, след това решете коя версия да запазите. Ако изберете ''Запис'', версия Ви ще бъде запазена. Изберете ''Отказ'', за да запазите текущата версия. +Разгледайте внимателно разликите, след това решете коя версия да бъде запазена. Ако натиснете ''Запис'', ще бъде запазена вашата версия. Натиснете ли ''Отказ'', ще бъде запазена текущата версия. diff --git a/inc/lang/bg/denied.txt b/inc/lang/bg/denied.txt index 7b1d5788e..91a576077 100644 --- a/inc/lang/bg/denied.txt +++ b/inc/lang/bg/denied.txt @@ -1,4 +1,4 @@ ====== Отказан достъп ====== -Нямате достатъчно права да продължите. Може би сте забравили да влезете? +Нямате достатъчно права да продължите. Може би сте забравили да се впишете? diff --git a/inc/lang/bg/diff.txt b/inc/lang/bg/diff.txt index 2bd8262c6..b1d49de92 100644 --- a/inc/lang/bg/diff.txt +++ b/inc/lang/bg/diff.txt @@ -1,4 +1,4 @@ ====== Разлики ====== -Тук са показани разликите между избраната версия на страницата и текущата. +Тук са показани разликите между избраната и текущата версия на страницата. diff --git a/inc/lang/bg/draft.txt b/inc/lang/bg/draft.txt index 1938e7d9c..6d269a72f 100644 --- a/inc/lang/bg/draft.txt +++ b/inc/lang/bg/draft.txt @@ -1,6 +1,6 @@ ====== Намерена чернова ====== -Последната редакционна сесия на тази страница не е завършена правилно. Dokuwiki автоматично запазва чернова по време на работа, която може сега да използвате, за да продължите редактирането си. Долу може да видите данните, които бяха запазени от последната сесия. +Последната редакционна сесия на страницата не е завършена правилно. Dokuwiki автоматично запазва чернова по време на редактирането, която може сега да ползвате, за да продължите работата си. Долу може да видите данните, които бяха запазени от последната сесия. -Моля решете, дали искате да //recover// последната си редакционна сесия, да //delete// автоматично запазената чернова или да //cancel// редакцията. +Моля решете, дали искате да //възстановите// последната си редакционна сесия, //изтриете// автоматично запазената чернова или //откажете// редакцията. diff --git a/inc/lang/bg/edit.txt b/inc/lang/bg/edit.txt index 90d376dbc..086d9978e 100644 --- a/inc/lang/bg/edit.txt +++ b/inc/lang/bg/edit.txt @@ -1,2 +1,2 @@ -Редактирайте страницата и натиснете ''Запис''. Погледнете [[wiki:syntax]] за Wiki синтаксис. Моля редактирайте страницата, само ако може да я **подобрите**. Ако искате да пробвате разни неща, научете се да правите първите си стъпки в [[playground:playground|пясъчника]]. +Редактирайте и натиснете ''Запис''. За информация относно ползвания синтаксис прочетете [[wiki:syntax]]. Моля, редактирайте само когато може да **подобрите** съдържанието. Ако ще пробвате разни неща, може да експериментирате в [[playground:playground|пясъчника]]. diff --git a/inc/lang/bg/editrev.txt b/inc/lang/bg/editrev.txt index 87e7b26a8..ba97f253a 100644 --- a/inc/lang/bg/editrev.txt +++ b/inc/lang/bg/editrev.txt @@ -1,2 +1,2 @@ -**Заредили сте стара версия на документа!** Ако я запазите, ще създадете нова редакция с текущите данни. +**Заредена е стара версия на документа!** Ако я запазите, ще създадете нова версия с текущите данни. ---- diff --git a/inc/lang/bg/index.txt b/inc/lang/bg/index.txt index 2ebf5128a..7dabac6af 100644 --- a/inc/lang/bg/index.txt +++ b/inc/lang/bg/index.txt @@ -1,4 +1,4 @@ ====== Индекс ====== -Това е списък на всички достъпни страници подредени по [[doku>namespaces|именни пространства]]. +Това е списък на всички налични страници подредени по [[doku>namespaces|именни пространства]]. diff --git a/inc/lang/bg/install.html b/inc/lang/bg/install.html index 0d7fd5232..392235ecd 100644 --- a/inc/lang/bg/install.html +++ b/inc/lang/bg/install.html @@ -1,25 +1,19 @@ -

Тази страница помага при първоначална инсталация и настройка на +

Страницата помага при първа инсталация и настройване на Dokuwiki. Повече информация -за този инсталатор е достъпна в неговата собствена +за инсталатора е достъпна в неговата собствена документация.

-

Dokuwiki използва обикновени файлове за хранилище на уики страниците и друга -информация свързана с тези страници(примерно картинки, търсене, стари версии, т.н.). +

Dokuwiki ползва обикновени файлове за хранилище на страниците и друга +информация свързана с тях (примерно картинки, търсене, стари версии, и др.). За да използвате успешно DokuWiki -трябва да имате достъп за писане в директориите които съдържат тези -файлове. Този инсталатор няма възможности да настройва правата на директориите. -Това обикновено трябва да бъде направено директно от командният ред или ако -използвате хостинг - през FTP или контрол панела на хоста(примерно cPanel).

+трябва да имате право за писане в директориите, които съдържат тези +файлове. Инсталаторът не може да настройва правата на директориите. +Обикновено трябва да направите това директно от командният ред или ако +ползвате хостинг - през FTP или контролния панела на хоста (примерно cPanel).

-

Този инсталатор ще настрои вашата DokuWiki конфигурация за -ACL, което на -свой ред ще позволи на администратора да влезе и да има достъп -до администраторското меню в DokuWiki за инсталиране на плъгини, контрол -на потребители, управление да достъп до уики страници и промяна на настройките -Това не е необходимо на DokuWiki да работи, но ще направи DokuWiki по-лесно за -администриране.

+

Инсталаторът ще настрои вашата DokuWiki конфигурация на +ACL, което ще позволи на администратора да се впише и ползва администраторското меню в DokuWiki за инсталиране на приставки, контролира +на потребители, управлява достъпа до страниците и променя останалите настройки. Това не е необходимо за функционирането на DokuWiki, но направи администрирането на DokuWiki по-лесно.

-

Опитните потребители или потребителите със специални изисквания -към настройките може да използват тези връзки за детайли свързани с -инструкции за инсталациянастройка.

+

Опитните потребители или потребителите със специални изисквания към настройките могат да ползват тези връзки за информация относно инсталациятанастройките.

diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index 053a7f1ba..d3e86c41d 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -5,6 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov + * @author Kiril neohidra@gmail.com */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -14,8 +15,8 @@ $lang['singlequoteopening'] = '‘'; $lang['singlequoteclosing'] = '’'; $lang['apostrophe'] = '’'; $lang['btn_edit'] = 'Редактиране'; -$lang['btn_source'] = 'Показване на кода на страницата'; -$lang['btn_show'] = 'Показване на страница'; +$lang['btn_source'] = 'Преглед на кода'; +$lang['btn_show'] = 'Преглед на страницата'; $lang['btn_create'] = 'Създаване на страница'; $lang['btn_search'] = 'Търсене'; $lang['btn_save'] = 'Запис'; @@ -29,215 +30,217 @@ $lang['btn_upload'] = 'Качване'; $lang['btn_cancel'] = 'Отказ'; $lang['btn_index'] = 'Индекс'; $lang['btn_secedit'] = 'Редактиране'; -$lang['btn_login'] = 'Вход'; -$lang['btn_logout'] = 'Изход'; +$lang['btn_login'] = 'Вписване'; +$lang['btn_logout'] = 'Отписване'; $lang['btn_admin'] = 'Настройки'; $lang['btn_update'] = 'Обновяване'; $lang['btn_delete'] = 'Изтриване'; $lang['btn_back'] = 'Назад'; -$lang['btn_backlink'] = 'Обратни връзки'; +$lang['btn_backlink'] = 'Обратни препратки'; $lang['btn_backtomedia'] = 'Назад към избор на медиен файл'; $lang['btn_subscribe'] = 'Абониране за Промени'; -$lang['btn_unsubscribe'] = 'Отписване от Промени'; -$lang['btn_subscribens'] = 'Абониране за Промени на именно пространство'; -$lang['btn_unsubscribens'] = 'Отписване от Промени на именно пространство'; -$lang['btn_profile'] = 'Актуализирай Профила'; +$lang['btn_profile'] = 'Профил'; $lang['btn_reset'] = 'Изчистване'; $lang['btn_resendpwd'] = 'Пращане на нова парола'; $lang['btn_draft'] = 'Редактиране на чернова'; $lang['btn_recover'] = 'Възстановяване на чернова'; $lang['btn_draftdel'] = 'Изтриване на чернова'; $lang['btn_revert'] = 'Възстановяване'; -$lang['loggedinas'] = 'Влезли сте като'; +$lang['loggedinas'] = 'Вписани сте като'; $lang['user'] = 'Потребител'; $lang['pass'] = 'Парола'; $lang['newpass'] = 'Нова парола'; $lang['oldpass'] = 'Потвърждение на текуща парола'; -$lang['passchk'] = 'oтново'; +$lang['passchk'] = 'още веднъж'; $lang['remember'] = 'Запомни ме'; $lang['fullname'] = 'Пълно име'; $lang['email'] = 'Електронна поща'; -$lang['register'] = 'Регистрация'; +$lang['register'] = 'Регистриране'; $lang['profile'] = 'Потребителски профил'; -$lang['badlogin'] = 'Потребителското име или паролата са грешни'; +$lang['badlogin'] = 'Грешно потребителско име или парола'; $lang['minoredit'] = 'Незначителни промени'; $lang['draftdate'] = 'Черновата бе автоматично записана на'; $lang['nosecedit'] = 'Страницата бе междувременно променена, презареждане на страницата поради неактуална информация.'; $lang['regmissing'] = 'Моля, попълнете всички полета.'; -$lang['reguexists'] = 'Потребител с такова име вече съществува.'; -$lang['regsuccess'] = 'Потребителят бе създаден и паролата бе пратена на електронната поща.'; +$lang['reguexists'] = 'Вече съществува потребител с избраното име.'; +$lang['regsuccess'] = 'Потребителят бе създаден и паролата бе пратена по електронната поща.'; $lang['regsuccess2'] = 'Потребителят бе създаден.'; -$lang['regmailfail'] = 'Изглежда, че има проблем с пращането на писмото с паролата. Моля, свържете се с администратора.'; +$lang['regmailfail'] = 'Изглежда, че има проблем с пращането на писмото с паролата. Моля, свържете се с администратора!'; $lang['regbadmail'] = 'Въведеният адрес изглежда невалиден - ако мислите, че това е грешка, свържете се с администратора.'; -$lang['regbadpass'] = 'Двете въведени пароли не съвпадат, моля опитайте отново'; +$lang['regbadpass'] = 'Двете въведени пароли не съвпадат, моля опитайте отново.'; $lang['regpwmail'] = 'Парола за DokuWiki'; -$lang['reghere'] = 'Нямате профил все още? Направете си!'; +$lang['reghere'] = 'Все още нямате профил? Направете си'; $lang['profna'] = 'Това Wiki не поддържа промяна на профила'; $lang['profnochange'] = 'Няма промени.'; -$lang['profnoempty'] = 'Невъведено име или електронна поща не са позволени.'; +$lang['profnoempty'] = 'Въвеждането на име и ел. поща. е задължително'; $lang['profchanged'] = 'Потребителският профил бе успешно обновен.'; -$lang['pwdforget'] = 'Забравили сте си паролата? Въведете нова.'; -$lang['resendna'] = 'Това Wiki не поддържа повторно пращане на парола'; +$lang['pwdforget'] = 'Забравили сте паролата си? Получете нова'; +$lang['resendna'] = 'Това Wiki не поддържа повторно пращане на паролата.'; $lang['resendpwd'] = 'Изпращане на нова парола за'; $lang['resendpwdmissing'] = 'Моля, попълнете всички полета.'; -$lang['resendpwdnouser'] = 'Потребителят не бе намерен в базата данни.'; -$lang['resendpwdbadauth'] = 'Този код за потвърждение е невалиден. Проверете дали сте използвали целият линк за потвърждение.'; -$lang['resendpwdconfirm'] = 'Адресът за потвърждение бе пратен по електронната поща.'; -$lang['resendpwdsuccess'] = 'Паролата ви бе изпратена на електронната поща.'; +$lang['resendpwdnouser'] = 'Потребителят не бе намерен в базата от данни.'; +$lang['resendpwdbadauth'] = 'Кодът за потвърждение е невалиден. Проверете дали сте използвали целият линк за потвърждение.'; +$lang['resendpwdconfirm'] = 'Линк за потвърждение бе пратен по електронната поща.'; +$lang['resendpwdsuccess'] = 'Паролата ви бе изпратена по електронната поща.'; $lang['license'] = 'Освен ако не е посочено друго, съдържанието на това Wiki е лицензирано под следния лиценз:'; -$lang['licenseok'] = 'Имайте предвид, че чрез редактирането на тази страница, Вие се съгласявате съдържанието й да бъде лицензирано под следния лиценз:'; +$lang['licenseok'] = 'Имайте предвид, че при редактиране на страницата, Вие се съгласявате да лицензирате промените (които сте направили) под следния лиценз:'; $lang['searchmedia'] = 'Търсене на файл: '; $lang['searchmedia_in'] = 'Търсене в %s'; -$lang['txt_upload'] = 'Изберете файл за качване '; -$lang['txt_filename'] = 'Качване като (по избор)'; -$lang['txt_overwrt'] = 'Запис върху съществуващ файл'; -$lang['lockedby'] = 'В момента е заключено от'; -$lang['lockexpire'] = 'Затварянето изтича в'; -$lang['willexpire'] = 'Затварянето на страницата за редактиране изтича след минута.\nЗа да избегнете противоречия, използвайте бутона, за да рестартирате броячът за затваряне.'; -$lang['js']['notsavedyet'] = "Незапазените промени ще бъдат загубени.\nИскате ли да продължите?"; +$lang['txt_upload'] = 'Изберете файл за качване'; +$lang['txt_filename'] = 'Качване като (незадължително)'; +$lang['txt_overwrt'] = 'Презапиши съществуващите файлове'; +$lang['lockedby'] = 'В момента е заключена от'; +$lang['lockexpire'] = 'Ще бъде отключена на'; +$lang['willexpire'] = 'Страницата ще бъде отключена за редактиране след минута.\nЗа да избегнете конфликт, ползвайте бутон "Преглед", за рестартиране на брояча за заключване.'; +$lang['js']['notsavedyet'] = 'Незаписаните промени ще бъдат загубени. Желаете ли да продължите?'; +$lang['js']['searchmedia'] = 'Търсене на файлове'; +$lang['js']['keepopen'] = 'Без затваряне на прозореца след избор'; +$lang['js']['hidedetails'] = 'Без подробности'; +$lang['js']['mediasize'] = 'Размер на изображението'; +$lang['js']['mediaclose'] = 'Затваряне'; +$lang['js']['mediainsert'] = 'Вмъкване'; +$lang['js']['mediasmall'] = 'Малка версия'; +$lang['js']['mediamedium'] = 'Средна версия'; +$lang['js']['medialarge'] = 'Голяма версия'; +$lang['js']['mediaoriginal'] = 'Оригинална версия'; +$lang['js']['nosmblinks'] = 'Връзките към Windows shares работят само под Internet Explorer. +Можете да копирате и поставите връзката.'; +$lang['js']['linkwiz'] = 'Съветник за препратки'; +$lang['js']['linkto'] = 'Препратка към: '; +$lang['js']['del_confirm'] = 'Да бъдат ли изтрити избраните елементи?'; +$lang['js']['mu_btn'] = 'Качване на няколко файла наведнъж'; $lang['rssfailed'] = 'Възникна грешка при вземането на този feed: '; -$lang['nothingfound'] = 'Нищо не бе намерено.'; +$lang['nothingfound'] = 'Не е открито нищо.'; $lang['mediaselect'] = 'Медийни файлове'; $lang['fileupload'] = 'Качване на медийни файлове'; $lang['uploadsucc'] = 'Качването бе успешно'; $lang['uploadfail'] = 'Качването бе неуспешно. Може би поради грешни права?'; $lang['uploadwrong'] = 'Качването бе отказано. Това файлово разширение е забранено!'; $lang['uploadexist'] = 'Файлът вече съществува. Нищо не бе направено.'; -$lang['uploadbadcontent'] = 'Каченото съдържание на съответства на файлово разширение %s .'; -$lang['uploadspam'] = 'Качването бе блокирано от спам списъка.'; -$lang['uploadxss'] = 'Качването бе блокирано, заради възможно обидно съдържание.'; +$lang['uploadbadcontent'] = 'Каченото съдържание не съответства на файлово разширение %s .'; +$lang['uploadspam'] = 'Качването бе блокирано от SPAM списъка.'; +$lang['uploadxss'] = 'Качването бе блокирано, заради възможно зловредно съдържание.'; $lang['uploadsize'] = 'Файльт за качване бе прекалено голям. (макс. %s)'; $lang['deletesucc'] = 'Файлът "%s" бе изтрит.'; -$lang['deletefail'] = '"%s" не бе изтрит, проверете правата'; +$lang['deletefail'] = '"%s" не може да бъде изтрит - проверете правата.'; $lang['mediainuse'] = 'Файлът "%s" не бе изтрит - все още се ползва.'; $lang['namespaces'] = 'Именни пространства'; -$lang['mediafiles'] = 'Достъпни файлове в'; -$lang['js']['searchmedia'] = 'Търси файлове'; -$lang['js']['keepopen'] = 'Задържане на прозореца отворен при избор'; -$lang['js']['hidedetails'] = 'Скрий детайлите'; -$lang['js']['nosmblinks'] = 'Връзките към Windows shares работят само под Internet Explorer. -Можете да копирате и поставите връзката.'; -$lang['js']['linkwiz'] = 'Линк съветник'; -$lang['js']['linkto'] = 'Линк към: '; -$lang['js']['del_confirm'] = 'Да бъдат ли изтрити избраните елементи?'; -$lang['js']['mu_btn'] = 'Качване на няколко файла наведнъж'; -$lang['mediausage'] = 'Използвайте следният синтакс, за да упоменете файла:'; +$lang['mediafiles'] = 'Налични файлове в'; +$lang['accessdenied'] = 'Нямате разрешение да преглеждате страницата.'; +$lang['mediausage'] = 'Ползвайте следния синтаксис, за да упоменете файла:'; $lang['mediaview'] = 'Преглед на оригиналния файл'; $lang['mediaroot'] = 'root'; -$lang['mediaupload'] = 'Качете файл в текущото именнопространство тук. За да създадете подименни пространства, добавете ги в началото на "Качи като" име на файл, разделени с двоеточие.'; +$lang['mediaupload'] = 'Качете файл в текущото именно пространство. За създаване на подимено пространство, добавите името му преди това на файла и да ги разделите с двоеточие в полето "Качване като"'; $lang['mediaextchange'] = 'Разширението на файла бе сменено от .%s на .%s!'; -$lang['reference'] = 'Референции за'; +$lang['reference'] = 'Връзки за'; $lang['ref_inuse'] = 'Файлът не може да бъде изтрит, защото все още се ползва от следните страници:'; -$lang['ref_hidden'] = 'Някои препратки са към страници, които нямате права да четете'; +$lang['ref_hidden'] = 'Някои връзки са към страници, които нямате права да четете'; $lang['hits'] = 'Съвпадения'; $lang['quickhits'] = 'Съвпадащи имена на страници'; $lang['toc'] = 'Съдържание'; -$lang['current'] = 'текущо'; +$lang['current'] = 'текуща'; $lang['yours'] = 'Вашата версия'; $lang['diff'] = 'Преглед на разликите с текущата версия'; -$lang['diff2'] = 'Показване на разликите между избрани преработки'; +$lang['diff2'] = 'Показване на разликите между избрани версии'; +$lang['difflink'] = 'Препратка към сравнението на версиите'; $lang['line'] = 'Ред'; $lang['breadcrumb'] = 'Следа'; $lang['youarehere'] = 'Намирате се в'; $lang['lastmod'] = 'Последна промяна'; $lang['by'] = 'от'; -$lang['deleted'] = 'изтриване'; -$lang['created'] = 'създаване'; +$lang['deleted'] = 'изтрита'; +$lang['created'] = 'създадена'; $lang['restored'] = 'възстановена предишна версия'; $lang['external_edit'] = 'външна редакция'; $lang['summary'] = 'Обобщение'; -$lang['noflash'] = 'Adobe Flash Plugin е необходим за показване на съдържанието.'; +$lang['noflash'] = 'Необходим е Adobe Flash Plugin за изобразяване на съдържанието.'; $lang['download'] = 'Изтегляне на фрагмент'; -$lang['mail_newpage'] = 'добавена страница:'; -$lang['mail_changed'] = 'променена страница:'; -$lang['mail_new_user'] = 'нов потребител:'; +$lang['mail_newpage'] = 'добавена страница: '; +$lang['mail_changed'] = 'променена страница: '; +$lang['mail_subscribe_list'] = 'променени страници в именно пространство: '; +$lang['mail_new_user'] = 'нов потребител: '; $lang['mail_upload'] = 'качен файл: '; $lang['qb_bold'] = 'Удебелен текст'; $lang['qb_italic'] = 'Курсив текст'; $lang['qb_underl'] = 'Подчертан текст'; $lang['qb_code'] = 'Код'; $lang['qb_strike'] = 'Зачеркнат текст'; -$lang['qb_h1'] = 'Заглавие ниво 1'; -$lang['qb_h2'] = 'Заглавие ниво 2'; -$lang['qb_h3'] = 'Заглавие ниво 3'; -$lang['qb_h4'] = 'Заглавие ниво 4'; -$lang['qb_h5'] = 'Заглавие ниво 5'; +$lang['qb_h1'] = 'Заглавие от 1 ниво'; +$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_hs'] = 'Изберете заглавие'; +$lang['qb_hplus'] = 'Надзаглавие'; $lang['qb_hminus'] = 'Подзаглавие'; -$lang['qb_hequal'] = 'Заглавие на същото ниво'; +$lang['qb_hequal'] = 'Заглавие от същото ниво'; $lang['qb_link'] = 'Вътрешна препратка'; $lang['qb_extlink'] = 'Външна препратка'; $lang['qb_hr'] = 'Хоризонтална линия'; -$lang['qb_ol'] = 'Подреден списък'; -$lang['qb_ul'] = 'Неподреден списък'; +$lang['qb_ol'] = 'Номериран списък'; +$lang['qb_ul'] = 'Неномериран списък'; $lang['qb_media'] = 'Добавяне на изображения и други файлове'; $lang['qb_sig'] = 'Вмъкване на подпис'; $lang['qb_smileys'] = 'Усмивчици'; $lang['qb_chars'] = 'Специални знаци'; -$lang['upperns'] = 'Към свьрзано именно пространство'; -$lang['admin_register'] = 'Добабяне на нов потребител'; +$lang['upperns'] = 'към майчиното именно пространство'; +$lang['admin_register'] = 'Добавяне на нов потребител'; $lang['metaedit'] = 'Редактиране на метаданни'; -$lang['metasaveerr'] = 'Запазването на метаданните бе неуспешно'; -$lang['metasaveok'] = 'Метаданните бяха запазени'; +$lang['metasaveerr'] = 'Метаданните не бяха запазени'; +$lang['metasaveok'] = 'Метаданните бяха запазени успешно'; $lang['img_backto'] = 'Назад към'; $lang['img_title'] = 'Заглавие'; $lang['img_caption'] = 'Надпис'; $lang['img_date'] = 'Дата'; -$lang['img_fname'] = 'Име на файл'; +$lang['img_fname'] = 'Име на файла'; $lang['img_fsize'] = 'Размер'; -$lang['img_artist'] = 'Заснет от'; +$lang['img_artist'] = 'Фотограф'; $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['authmodfailed'] = 'Лоша настройка за удостоверяване на потребителя. Моля, уведомете администратора.'; -$lang['authtempfail'] = 'Удостоверяването на потребителите е временно недостъпно. Ако това продължи дълго, моля уведомете администратора.'; -$lang['i_chooselang'] = 'Избор на език'; +$lang['authmodfailed'] = 'Лоша настройки за удостоверяване. Моля, уведомете администратора на Wiki страницата.'; +$lang['authtempfail'] = 'Удостоверяването на потребители не е възможно за момента. Ако продължи дълго, моля уведомете администратора на Wiki страницата.'; +$lang['i_chooselang'] = 'Изберете вашия изик'; $lang['i_installer'] = 'Инсталатор на DokuWiki'; -$lang['i_wikiname'] = 'Име на Wiki'; -$lang['i_enableacl'] = 'Включване на списъци за достъп ACL (препоръчително)'; +$lang['i_wikiname'] = 'Име на Wiki-то'; +$lang['i_enableacl'] = 'Ползване на списък за достъп (ACL) [препоръчително]'; $lang['i_superuser'] = 'Супер потребител'; -$lang['i_problems'] = 'Инсталатора намери проблеми указани по-долу. Не може да продължите, докато не ги отстраните.'; -$lang['i_modified'] = 'Поради мерки за сигурност този скрипт ще работи само с нова и непроменена Dokuwiki инсталация. Трябва да разархивирате отново файловете от дръпнатия пакет или да се посъветвате с пълните Инструкции за инсталация на Dokuwiki.'; +$lang['i_problems'] = 'Открити са проблеми, които възпрепятстват инсталирането. Ще можете да продължите след като отстраните долуизброените проблеми.'; +$lang['i_modified'] = 'Поради мерки за сигурност скрипта ще работи само с нова и непроменена инсталация на Dokuwiki. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с Инструкциите за инсталация на Dokuwiki.'; $lang['i_funcna'] = 'PHP функцията %s не е достъпна. Може би е забранена от доставчика на хостинг.'; $lang['i_phpver'] = 'Вашата PHP версия %s е по-стара от необходимата %s. Обновете PHP инсталацията си.'; -$lang['i_permfail'] = '%s не е достъпна за писане от DokuWiki. Трябва да промените настройките за достъп до директорията!'; +$lang['i_permfail'] = '%s не е достъпна за писане от DokuWiki. Трябва да промените правата за достъп до директорията!'; $lang['i_confexists'] = '%s вече съществува'; -$lang['i_writeerr'] = '%s не можа да бъде създаден. Трябва да проверите правата на директорията/файла за достъп и да създадете файл ръчно.'; -$lang['i_badhash'] = 'неразпознат или променен dokuwiki.php (hash=%s)'; +$lang['i_writeerr'] = '%s не можа да бъде създаден. Трябва да проверите правата за достъп до директорията/файла и да създадете файла ръчно.'; +$lang['i_badhash'] = 'Файлът dokuwiki.php не може да бъде разпознат или е променен (hash=%s)'; $lang['i_badval'] = '%s - непозволена или празна стойност'; -$lang['i_success'] = 'Настройката приключи успешно. Може да създадете файлът install.php сега. Продължете към - Ново Ви DokuWiki.'; -$lang['i_failure'] = 'Имаше грешки при записа на файловете с настройки. Може да трябва да ги редактирате ръчно. Ползвайте Ново Ви DokuWiki.'; -$lang['i_policy'] = 'Първоначална политика за достъп ACL'; -$lang['i_pol0'] = 'Отворено Wiki (четене, писане, качване от всички)'; -$lang['i_pol1'] = 'Публично Wiki (четене от всички, писане и качване от регистрирани потребители)'; -$lang['i_pol2'] = 'Затворено Wiki (четене, писане, качване само от регистрирани потребители)'; +$lang['i_success'] = 'Настройването приключи успешно. Вече можете да изтриете файла install.php. Продължете към Вашето ново DokuWiki.'; +$lang['i_failure'] = 'Възникнаха грешки при записването на файловете с настройки. Вероятно ще се наложи да ги поправите ръчно, за да можете да ползвате Вашето ново DokuWiki.'; +$lang['i_policy'] = 'Първоначална политика за достъп'; +$lang['i_pol0'] = 'Отворено Wiki (всеки може да чете, пише и качва)'; +$lang['i_pol1'] = 'Публично Wiki (всеки може да чете, само регистрирани могат да пишат и качват)'; +$lang['i_pol2'] = 'Затворено Wiki (само регистрирани могат четат, пишат и качват)'; $lang['i_retry'] = 'Повторен опит'; -$lang['mu_intro'] = 'Тук можете да качите няколко файла наведнъж. Добавете ги към съответните полета и натиснете бутона за качване. +$lang['i_license'] = 'Моля, изберете лиценз под който желаете да публикувате съдържанието'; +$lang['mu_intro'] = 'От тук можете да качите няколко файла наведнъж. Натиснете бутон "Избиране", изберете файлове и натиснете "Качи". '; $lang['mu_gridname'] = 'Име на файл'; $lang['mu_gridsize'] = 'Големина'; $lang['mu_gridstat'] = 'Състояние'; $lang['mu_namespace'] = 'Именно пространство'; -$lang['mu_browse'] = 'Избери'; +$lang['mu_browse'] = 'Избиране'; $lang['mu_toobig'] = 'прекалено голям'; $lang['mu_ready'] = 'готов за качване'; -$lang['mu_done'] = 'приключен'; -$lang['mu_fail'] = 'неуспешен'; -$lang['mu_authfail'] = 'сесията изтече'; +$lang['mu_done'] = 'качен'; +$lang['mu_fail'] = 'неуспешно качване'; +$lang['mu_authfail'] = 'приключила сесия'; $lang['mu_progress'] = '@PCT@% качен'; $lang['mu_filetypes'] = 'Позволени файлови разширения'; -$lang['mu_info'] = 'качени файлове'; +$lang['mu_info'] = 'качени файла.'; $lang['mu_lasterr'] = 'Последна грешка:'; -$lang['recent_global'] = 'В момента преглеждате промените в %s именно пространство. Може да прегледате и промените на цялото Wiki.'; +$lang['recent_global'] = 'В момента преглеждате промените в именно пространство %s. Може да прегледате и промените в цялото Wiki.'; $lang['years'] = 'преди %d години'; $lang['months'] = 'преди %d месеци'; $lang['weeks'] = 'преди %d седмици'; @@ -245,3 +248,4 @@ $lang['days'] = 'преди %d дни'; $lang['hours'] = 'преди %d часа'; $lang['minutes'] = 'преди %d минути'; $lang['seconds'] = 'преди %d секунди'; +$lang['wordblock'] = 'Направените от вас промени не бяха съхранени, защото съдържат забранен текст (SPAM).'; diff --git a/inc/lang/bg/locked.txt b/inc/lang/bg/locked.txt index 0eecc6729..7cdfba786 100644 --- a/inc/lang/bg/locked.txt +++ b/inc/lang/bg/locked.txt @@ -1,3 +1,3 @@ -====== Страницата е затворена ====== +====== Страницата е заключена ====== -В момента страницата е затворена за редакция от друг потребител. Трябва да изчаката докато този потребител приключи или затварянето изтече. +В момента страницата е заключена за редактиране от друг потребител. Трябва да изчакате потребителя да приключи с редактирането на страницата или автоматичното отключване на страницата. diff --git a/inc/lang/bg/login.txt b/inc/lang/bg/login.txt index b525f08cf..9cc85ce32 100644 --- a/inc/lang/bg/login.txt +++ b/inc/lang/bg/login.txt @@ -1,3 +1,3 @@ -====== Вход ====== +====== Вписване ====== -В момента не сте влезли! Въведете данните си долу, за да го направите. Бисквитките (cookies) трябва да са включени. +Не сте се вписали! Въведете данните си долу, за да го направите. Бисквитките (cookies) трябва да са включени. diff --git a/inc/lang/bg/newpage.txt b/inc/lang/bg/newpage.txt index fcc1c6257..bf67b2266 100644 --- a/inc/lang/bg/newpage.txt +++ b/inc/lang/bg/newpage.txt @@ -1,4 +1,4 @@ ====== Несъществуваща тема ====== -Последвали сте връзка към тема, която все още не съществува. Ако правата Ви позволяват, може да я създадете като използвате бутона ''Създаване на страницата'' +Последвали сте препратка към тема, която все още не съществува. Ако правата Ви позволяват, може да я създадете чрез бутона ''Създаване на страница''. diff --git a/inc/lang/bg/norev.txt b/inc/lang/bg/norev.txt index 0262aef60..fb7aeef89 100644 --- a/inc/lang/bg/norev.txt +++ b/inc/lang/bg/norev.txt @@ -1,4 +1,4 @@ ====== Няма такава версия ====== -Избраната версия не съществува. Използвайте бутона ''Редакции'' за списък на стари версии на документа. +Избраната версия не съществува. Натиснете бутона ''История'' за отваряне на списъка със стари версии на документа. diff --git a/inc/lang/bg/password.txt b/inc/lang/bg/password.txt index be2f10c61..a3ee557e9 100644 --- a/inc/lang/bg/password.txt +++ b/inc/lang/bg/password.txt @@ -1,9 +1,9 @@ Здравейте @FULLNAME@! -Ето Вашите потребителски данни за @TITLE@ на @DOKUWIKIURL@ +Това са Вашите потребителски данни за @TITLE@ от @DOKUWIKIURL@ Потребител: @LOGIN@ Парола : @PASSWORD@ -- -Това писмо е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ \ No newline at end of file diff --git a/inc/lang/bg/preview.txt b/inc/lang/bg/preview.txt index 442f16de2..41fde7380 100644 --- a/inc/lang/bg/preview.txt +++ b/inc/lang/bg/preview.txt @@ -1,3 +1,3 @@ ====== Преглед ====== -Ето как ще изглежда текста. Той обаче все още **не е запазен** ! +Ето как ще изглежда страницата. Текста все още **не е запазен**! \ No newline at end of file diff --git a/inc/lang/bg/pwconfirm.txt b/inc/lang/bg/pwconfirm.txt index 1cd64b151..beb56cca3 100644 --- a/inc/lang/bg/pwconfirm.txt +++ b/inc/lang/bg/pwconfirm.txt @@ -1,14 +1,13 @@ Здравейте @FULLNAME@! -Някой е поискал нова парола за потребителя @TITLE@ +Някой е поискал нова парола за потребител @TITLE@ на @DOKUWIKIURL@ Ако не сте поискали нова парола, товава просто игнорирайте това писмо. -За да потвърдите, че искането е наистина пратено от вас, моля използвайте -следния адрес. +За да потвърдите, че искането е наистина пратено от вас, моля ползвайте следния адрес. @CONFIRM@ -- -Това писмо е генерирано от DokuWiki на адрес @DOKUWIKIURL@ +Писмото е генерирано от DokuWiki на адрес @DOKUWIKIURL@ diff --git a/inc/lang/bg/read.txt b/inc/lang/bg/read.txt index 89e9a9d70..a3a15a07f 100644 --- a/inc/lang/bg/read.txt +++ b/inc/lang/bg/read.txt @@ -1,2 +1,2 @@ -Тази страница е позволена само за четене. Може да разгледате кода, но не и да го променята. Обърнете се съм администратора си, ако мислите, че това е грешно. +Тази страница е само за четене. Може да разглеждате кода, но не и да го променяте. Обърнете се съм администратора, ако смятате, че това не е редно. diff --git a/inc/lang/bg/register.txt b/inc/lang/bg/register.txt index 74a07cd90..b4076e89b 100644 --- a/inc/lang/bg/register.txt +++ b/inc/lang/bg/register.txt @@ -1,4 +1,4 @@ ====== Регистрирайте се като нов потребител ====== -Моля, попълнете всичката информация долу, за да създадете нов профил в това уики. Бъдете сигурни, че подавате **валиден адрес на електронна поща** - ако не се пита за парола тук, нова ще бъде пратена на този адрес. Потребителското име трябва да бъде валидно [[doku>pagename|име на сраница]] +Моля, попълнете всичките полета, за да бъде създаден нов профил. Уверете се, че въведения **адрес на ел. поща е правилен**. Ако няма поле за парола, ще ви бъде изпратена такава на въведения адрес. Потребителското име трябва да бъде валидно [[doku>pagename|име на страница]]. diff --git a/inc/lang/bg/resendpwd.txt b/inc/lang/bg/resendpwd.txt index 7b9b9a027..4823fbf00 100644 --- a/inc/lang/bg/resendpwd.txt +++ b/inc/lang/bg/resendpwd.txt @@ -1,3 +1,3 @@ ====== Пращане на нова парола ====== -Моля, въведете потребителското си име във формуляра долу, за да поискате нова парола за вашият профил в това Wiki. Връзка за потвърждение ще ви бъде пратена на регистрираният в това Wiki адрес на електронна поща. +Моля, въведете потребителското си име във формата по-долу, ако желаете да получите нова парола. Линк за потвърждение ще ви бъде пратен на адреса на ел. поща, с която сте се регистрирани. diff --git a/inc/lang/bg/revisions.txt b/inc/lang/bg/revisions.txt index 295f5f6cc..0e14662b7 100644 --- a/inc/lang/bg/revisions.txt +++ b/inc/lang/bg/revisions.txt @@ -1,4 +1,4 @@ -====== Стари редакции ====== +====== Стари версии====== -Това са стари редакции на този документ. За да възстановите стара версия, изберете я долу, натиснете ''Редактиране'' и я запазете. +Това са старите версии на документа. За да възстановите стара версия, изберете я долу, натиснете ''Редактиране'' и я запазете. diff --git a/inc/lang/bg/searchpage.txt b/inc/lang/bg/searchpage.txt index 03e019985..48d47515a 100644 --- a/inc/lang/bg/searchpage.txt +++ b/inc/lang/bg/searchpage.txt @@ -1,5 +1,5 @@ ====== Търсене ====== -Може да намерите резултатите на търсенето долу. Ако не сте намерили каквото сте търсили, може да създадете или редактирате страница кръстена по вашета заявка за търсене със съответният бутон +Резултата от търсенето ще намерите по-долу. Ако не намирате каквото сте търсили, може да създадете или редактирате страница, кръстена на вашата заявка, чрез съответния бутон. ===== Резултати ===== diff --git a/inc/lang/bg/showrev.txt b/inc/lang/bg/showrev.txt index c0b1709fe..a3848f8bb 100644 --- a/inc/lang/bg/showrev.txt +++ b/inc/lang/bg/showrev.txt @@ -1,2 +1,2 @@ -**Това е стара редакция на документа** +**Това е стара версия на документа!** ---- diff --git a/inc/lang/bg/stopwords.txt b/inc/lang/bg/stopwords.txt index 369f4d789..b1627bb9a 100644 --- a/inc/lang/bg/stopwords.txt +++ b/inc/lang/bg/stopwords.txt @@ -1,7 +1,7 @@ # Това е списък на думи за игнориране, с една дума на ред # Когато редактирате този файл, не забравяйте да използвате UNIX символ за нов ред -# Не е нужно да включвате думи по-кратки от 3 символа - те са игнорирани така или иначе -# Този списък се основава на думи намерени на http://www.ranks.nl/stopwords/ +# Не е нужно да включвате думи по-кратки от 3 символа - те биват игнорирани така или иначе +# Този списък се основава на думи от http://www.ranks.nl/stopwords/ about are and diff --git a/inc/lang/bg/updateprofile.txt b/inc/lang/bg/updateprofile.txt index 0a6f15297..6113f0d07 100644 --- a/inc/lang/bg/updateprofile.txt +++ b/inc/lang/bg/updateprofile.txt @@ -1,3 +1,3 @@ ====== Обновете профила си ====== -Трябва само да допълните полетата, които искате да промените. Не може да сменяте потребителското си име. +Трябва само да допълните полетата, които искате да промените. Потребителското не може да бъде променяно. diff --git a/inc/lang/bg/uploadmail.txt b/inc/lang/bg/uploadmail.txt index 74f0cdc3e..7373adcea 100644 --- a/inc/lang/bg/uploadmail.txt +++ b/inc/lang/bg/uploadmail.txt @@ -1,4 +1,4 @@ -Бе качен файл на вашето DokuWiki. Ето детайлите +Качен е файл на вашето DokuWiki. Ето детайлите Файл : @MEDIA@ Дата : @DATE@ diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php index 9facd4259..4efadfbba 100644 --- a/lib/plugins/acl/lang/bg/lang.php +++ b/lib/plugins/acl/lang/bg/lang.php @@ -5,6 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov + * @author Kiril Velikov neohidra@gmail.com */ $lang['admin_acl'] = 'Управление на списъците за достъп'; $lang['acl_group'] = 'Група'; diff --git a/lib/plugins/config/lang/bg/intro.txt b/lib/plugins/config/lang/bg/intro.txt index 8723a77a4..fc455981e 100644 --- a/lib/plugins/config/lang/bg/intro.txt +++ b/lib/plugins/config/lang/bg/intro.txt @@ -1,7 +1,7 @@ ====== Управление на настройките ====== -Използвайте тази страница за да управлявате настройките на вашета Dokuwiki инсталация. За отделните настройки вижте [[doku>config]]. За повече подробности за тази приставка вижте [[doku>plugin:config]]. +От страница можете да управлявате настройките на вашето Dokuwiki. За отделните настройки вижте [[doku>config]]. За повече информация относно тази приставка вижте [[doku>plugin:config]]. -Настройките показани със светло червен фон за защитени и не могат да се променят с тази приставка. Настройките показани със син фон са стандартните стойности и настройките с бял фон са били настроени локално за тази конкретна инсталация. Както сините, така и белите настройки могат да се променят. +Настройките изобразени със светло червен фон за защитени и не могат да бъдат променяни с тази приставка. Настройките показани със син фон са стандартни стойности, а настройките с бял фон са били настроени локално за тази конкретна инсталация. Можете да променяте както сините, така и белите настройки. -Не забравяйте да натиснете бутона **ЗАПИС** преди да напуснете страницата, иначе промените ви ще бъдат загубени. +Не забравяйте да натиснете бутона **ЗАПИС** преди да напуснете страницата, в противен случай промените няма да бъдат приложени. diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php index 855f0b2c2..8b32f182c 100644 --- a/lib/plugins/config/lang/bg/lang.php +++ b/lib/plugins/config/lang/bg/lang.php @@ -5,6 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov + * @author Kiril Velikov neohidra@gmail.com */ $lang['menu'] = 'Настройки'; $lang['error'] = 'Невъзможно е обновяването на настройките, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново. @@ -66,7 +67,7 @@ $lang['allowdebug'] = 'Пускане на debug изключет $lang['usewordblock'] = 'Блокиране на спам базирано на списък от думи'; $lang['indexdelay'] = 'Забавяне преди индексиране(секунди)'; $lang['relnofollow'] = 'Използване на rel="nofollow" за външни връзки'; -$lang['mailguard'] = 'Промяна на адреса на електронната поща във форма непозволяваща пращането на спам'; +$lang['mailguard'] = 'Промяна на адресите на ел. поща (във форма непозволяваща пращането на SPAM)'; $lang['iexssprotect'] = 'Проверяване на качените файлове за възможно зловреден JavaScript и HTML код'; $lang['showuseras'] = 'Какво да се показва на дисплея за потребителя, който последно е променил тази страница'; $lang['useacl'] = 'Използване на списъци за достъп'; @@ -86,65 +87,66 @@ $lang['sneaky_index'] = 'По подразбиране DokuWiki ще п $lang['auth_security_timeout'] = 'Изчакване при вписване преди Timeout (в секунди)'; $lang['securecookie'] = 'Да се изпращат ли бисквитки, посочени чрез HTTPS, само чрез HTTPS от браузъра? Забранете тази опция, когато SSL се използва само за вписване в системата, а четенето е възможно и без SSL. '; -$lang['xmlrpc'] = 'Включи/изключи XML-RPC интерфейса'; +$lang['xmlrpc'] = 'Включване/Изключване на XML-RPC интерфейса.'; $lang['xmlrpcuser'] = 'Ограничаване на XML-RPC достъп до дадени тук и отделени със запетая групи или потребители. Оставете празни да даде достъп до всички.'; $lang['updatecheck'] = 'Проверка за нови версии и предупреждения за сигурност? Dokiwiki трябва да може да се свърже със splitbrain.org за тази функционалност.'; $lang['userewrite'] = 'Използване на валидни URL'; -$lang['useslash'] = 'Използване на наклонена черта за разделител на именнипространсвта в URL'; +$lang['useslash'] = 'Ползване на наклонена черта за разделител на именните пространства в URL'; $lang['usedraft'] = 'Автоматично запазване на чернова при редактиране'; $lang['sepchar'] = 'Разделител между думите в имената на страници'; $lang['canonical'] = 'Използване на уеднаквени URL'; +$lang['fnencode'] = 'Метод за кодиране на не-ASCII именуваните файлове.'; $lang['autoplural'] = 'Проверка за множествено число в препратките'; $lang['compression'] = 'Метод за компресия на attic файлове'; $lang['cachetime'] = 'Максимална възраст на кеша (сек)'; -$lang['locktime'] = 'Максимална възраст на заключващите файлове (сек)'; -$lang['fetchsize'] = 'Максимален размер (байтове), който fetch.php може да дърпа'; -$lang['notify'] = 'Пращане на съобщения за промени на тази e-поща'; -$lang['registernotify'] = 'Пращане информация на нови потребители на тази е-поща'; -$lang['mailfrom'] = 'Адрес на е-поща, който да се използва за пращане на автоматичната поща'; -$lang['gzip_output'] = 'Използване gzip Кодиране на съдържанието(Content-Encoding) за xhtml'; +$lang['locktime'] = 'Максимална възраст на заключените файлове (сек)'; +$lang['fetchsize'] = 'Максимален размер (байтове), който fetch.php може да сваля'; +$lang['notify'] = 'Пращане на съобщения за промени на тази eл. поща'; +$lang['registernotify'] = 'Пращане информация за нови потребители на тази ел. поща'; +$lang['mailfrom'] = 'Ел. поща, която да се ползва за автоматично изпращане на ел. писма'; +$lang['gzip_output'] = 'Кодиране на съдържанието с gzip за xhtml'; $lang['gdlib'] = 'Версия на GD Lib'; $lang['im_convert'] = 'Път до инструмента за трансформация на ImageMagick'; $lang['jpg_quality'] = 'Kачество на JPG компресията (0-100)'; -$lang['subscribers'] = 'Поддръжка за абониране към страница'; -$lang['compress'] = 'Компактен CSS и javascript изход'; -$lang['hidepages'] = 'Скриване на съвпадащи имена на страници(regular expressions)'; +$lang['subscribers'] = 'Включване на поддръжката за абониране към страници'; +$lang['compress'] = 'Компактен CSS и javascript изглед'; +$lang['hidepages'] = 'Скриване на съвпадащите страници (regular expressions)'; $lang['send404'] = 'Пращане на "HTTP 404/Page Not Found" за несъществуващи страници'; $lang['sitemap'] = 'Генериране на Google sitemap (дни)'; -$lang['broken_iua'] = 'Отметнете, ако ignore_user_abort функцията не работи, търсенето може да не се извършва правилно.Известно е, че комбинацията IIS+PHP/CGI е лоша. Вижте Грешка 852 за повече информация.'; -$lang['xsendfile'] = 'Използване на Х-Sendfile header, за позволяване на уеб сървъра да дава статични файлове? Вашият уеб сървър трябва да поддържа това.'; +$lang['broken_iua'] = 'Отметнете, ако ignore_user_abort функцията не работи. Може да попречи на търсенето в страниците. Знае се, че комбинацията IIS+PHP/CGI е лоша. Вижте Грешка 852 за повече информация.'; +$lang['xsendfile'] = 'Ползване на Х-Sendfile header, за да може уебсървъра да дава статични файлове? Вашият уебсървър трябва да го поддържа.'; $lang['renderer_xhtml'] = 'Показвай main (XHTML) код за wiki'; $lang['renderer__core'] = '%s (DokuWiki ядро)'; $lang['renderer__plugin'] = '%s (приставка)'; -$lang['rememberme'] = 'Остави постоянни бисквитки за вход (запомни ме)'; -$lang['rss_type'] = 'Вид на XML източника (feed)'; +$lang['rememberme'] = 'Ползване на постоянни бисквитки за вписване (запомни ме)'; +$lang['rss_type'] = 'Тип на XML feed'; $lang['rss_linkto'] = 'XML feed препраща към'; $lang['rss_content'] = 'Какво да се показва в XML feed елементите?'; $lang['rss_update'] = 'Интервал на обновяване XML източника (сек)'; $lang['recent_days'] = 'Колко последни промени да се пазят (дни)'; $lang['rss_show_summary'] = 'XML feed show summary in title'; $lang['target____wiki'] = 'Прозорец за вътрешни препратки'; -$lang['target____interwiki'] = 'Прозорец за вътрешни уики препратки'; +$lang['target____interwiki'] = 'Прозорец за вътреуики препратки'; $lang['target____extern'] = 'Прозорец за външни препратки'; -$lang['target____media'] = 'Прозорец за препратки към медия'; -$lang['target____windows'] = 'Прозорец за препратки към прозорци'; +$lang['target____media'] = 'Прозорец за медийни препратки'; +$lang['target____windows'] = 'Прозорец за Windows препратки'; $lang['proxy____host'] = 'Име на прокси сървър'; $lang['proxy____port'] = 'Порт на проксито'; $lang['proxy____user'] = 'Потребител за проксито'; $lang['proxy____pass'] = 'Парола за проксито'; -$lang['proxy____ssl'] = 'Използване на ssl за връзка към проксито'; -$lang['safemodehack'] = 'Позволи safemode хак'; -$lang['ftp____host'] = 'FTP сървър за safemode хака'; -$lang['ftp____port'] = 'FTP порт за safemode хака'; -$lang['ftp____user'] = 'FTP потребител за safemode хака'; -$lang['ftp____pass'] = 'FTP парола за safemode хака'; -$lang['ftp____root'] = 'FTP главна директория safemode хака'; +$lang['proxy____ssl'] = 'Ползване на SSL за връзката с проксито'; +$lang['safemodehack'] = 'Ползване на хака safemode'; +$lang['ftp____host'] = 'FTP сървър за хака safemode'; +$lang['ftp____port'] = 'FTP порт за хака safemode'; +$lang['ftp____user'] = 'FTP потребител за хака safemode'; +$lang['ftp____pass'] = 'FTP парола за хака safemode'; +$lang['ftp____root'] = 'FTP главна директория хака safemode'; $lang['license_o_'] = 'Нищо не е избрано'; $lang['typography_o_0'] = 'без'; $lang['typography_o_1'] = 'с изключение на единични кавички'; -$lang['typography_o_2'] = 'всякаква форма за кавичките (не винаги работи)'; +$lang['typography_o_2'] = 'включително единични кавички (не винаги работи)'; $lang['userewrite_o_0'] = 'без'; -$lang['userewrite_o_1'] = '.htaccess файл'; +$lang['userewrite_o_1'] = '.htaccess файлa'; $lang['userewrite_o_2'] = 'вътрешно от DokuWiki '; $lang['deaccent_o_0'] = 'изключено'; $lang['deaccent_o_1'] = 'премахване на акценти'; @@ -163,7 +165,7 @@ $lang['rss_content_o_htmldiff'] = 'Diff таблица в HTML формат'; $lang['rss_content_o_html'] = 'Цялото съдържание на HTML страницата'; $lang['rss_linkto_o_diff'] = 'изглед на разликите'; $lang['rss_linkto_o_page'] = 'променената страница'; -$lang['rss_linkto_o_rev'] = 'списък на текущите версии'; +$lang['rss_linkto_o_rev'] = 'списък на версииte'; $lang['rss_linkto_o_current'] = 'текущата страница'; $lang['compression_o_0'] = 'без'; $lang['compression_o_gz'] = 'gzip'; @@ -174,9 +176,9 @@ $lang['xsendfile_o_2'] = 'Стандартен X-Sendfile header'; $lang['xsendfile_o_3'] = 'Специфичен Nginx X-Accel-Redirect header за пренасочване'; $lang['showuseras_o_loginname'] = 'Потребителско име'; $lang['showuseras_o_username'] = 'Пълно потребителско име'; -$lang['showuseras_o_email'] = 'Пълен адрес на електронната поща на потребителя'; -$lang['showuseras_o_email_link'] = 'Адрес на електронната поща на потребителя под формата на mailto: линк'; +$lang['showuseras_o_email'] = 'Адресите на ел, поща на потребителите (променени според настройките на mailguard)'; +$lang['showuseras_o_email_link'] = 'Адресите на ел. поща на потребителите под формата на mailto: връзка'; $lang['useheading_o_0'] = 'Никога'; $lang['useheading_o_navigation'] = 'Само за навигация'; -$lang['useheading_o_content'] = 'Само за Wiki съдържание'; +$lang['useheading_o_content'] = 'Само за съдържанието на Wiki-то'; $lang['useheading_o_1'] = 'Винаги'; diff --git a/lib/plugins/plugin/lang/bg/lang.php b/lib/plugins/plugin/lang/bg/lang.php index 99e7a2fe4..b4aaae5e4 100644 --- a/lib/plugins/plugin/lang/bg/lang.php +++ b/lib/plugins/plugin/lang/bg/lang.php @@ -5,6 +5,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Nikolay Vladimirov * @author Viktor Usunov + * @author Kiril Velikov neohidra@gmail.com */ $lang['menu'] = 'Управление на приставките'; $lang['download'] = 'Сваляне и инсталиране на нова приставка'; diff --git a/lib/plugins/popularity/lang/bg/intro.txt b/lib/plugins/popularity/lang/bg/intro.txt index 06c338585..aa437f32c 100644 --- a/lib/plugins/popularity/lang/bg/intro.txt +++ b/lib/plugins/popularity/lang/bg/intro.txt @@ -1,9 +1,9 @@ -====== Обратна връзка за популярност ====== +====== Обратна връзка ====== -Този инструмент събира данни за потребителите на Вашето Wiki и ви позволява да ги изпратите анонимно на DokuWiki. Това ни помага да разберем как DokuWiki се използва от потребителите си и да разработваме бъдещи решения, съответно реалното използване. +Инструментът събира данни за Вашето Wiki и ви позволява да ги изпратите на разработчиците DokuWiki. Данните ще им помогнат да разберат как DokuWiki се използва от потребителите и че статистиката е в подкрепа на поетата насока за развитие. -Моля изпозвайте тази опция, за да информирате разработчиците на този продукт. Вашите данни ще бъдат идентифицирани с анонимен номер. +Моля, ползвайте функцията, от време на време, когато уебстраницата ви се разраства, за да информирате разработчиците. Изпратените данни ще бъдат идентифицирани с анонимен номер. -Събраните данни съдържат информация за вашата версия на DokuWiki, броя и размера на вашите страници и файлове, инсталирани плъгини и информация за вашата PHP инсталация. +Събраните данни съдържат информация за версия на DokuWiki, броя и размера на вашите страници и файлове, инсталирани приставки и информация за вашата PHP инсталация. -Изходните данни са показано по-долу във вида, в който ще бъдат изпратени. Моля ползвайте сьответния бутон, за да изпратите тази информация. \ No newline at end of file +Данните, които ще бъдат изпратени са изобразени по-долу. Моля, натиснете бутона "Изпращане на данните", за да изпратите информацията. \ No newline at end of file diff --git a/lib/plugins/popularity/lang/bg/lang.php b/lib/plugins/popularity/lang/bg/lang.php index adf99a9f5..5c89c3509 100644 --- a/lib/plugins/popularity/lang/bg/lang.php +++ b/lib/plugins/popularity/lang/bg/lang.php @@ -3,6 +3,12 @@ * Bulgarian language file * * @author Viktor Usunov + * @author Kiril Velikov neohidra@gmail.com */ -$lang['name'] = 'Обратна връзка за популярност (може да отнеме известно време за зареждане)'; -$lang['submit'] = 'Прати данните'; +$lang['name'] = 'Обратна връзка (зареждането може да отнеме известно време)'; +$lang['submit'] = 'Изпращане на данните'; +$lang['autosubmit'] = 'Автоматично изпращане на данните веднъж в месеца'; +$lang['submissionFailed'] = 'Данните не могат да бъдат изпратени поради следната грешка"'; +$lang['submitDirectly'] = 'Можете да пратите данните ръчно като изпратите следния формуляр.'; +$lang['autosubmitError'] = 'Последното автоматично изпращане не бе осъществено, поради следната грешка:'; +$lang['lastSent'] = 'Данните бяха изпратени'; diff --git a/lib/plugins/popularity/lang/bg/submitted.txt b/lib/plugins/popularity/lang/bg/submitted.txt new file mode 100644 index 000000000..1e95f6ffd --- /dev/null +++ b/lib/plugins/popularity/lang/bg/submitted.txt @@ -0,0 +1,3 @@ +====== Обратна връзка ====== + +Данните бяха изпратени успешно. \ No newline at end of file diff --git a/lib/plugins/revert/lang/bg/lang.php b/lib/plugins/revert/lang/bg/lang.php index 6f0ff0672..05525c535 100644 --- a/lib/plugins/revert/lang/bg/lang.php +++ b/lib/plugins/revert/lang/bg/lang.php @@ -3,6 +3,7 @@ * bulgarian language file * @author Nikolay Vladimirov * @author Viktor Usunov + * @author Kiril Velikov neohidra@gmail.com */ $lang['menu'] = 'Възстановяване'; $lang['filter'] = 'Търсене на спамната страници'; diff --git a/lib/plugins/usermanager/lang/bg/lang.php b/lib/plugins/usermanager/lang/bg/lang.php index 58c8453f2..b229ce29e 100644 --- a/lib/plugins/usermanager/lang/bg/lang.php +++ b/lib/plugins/usermanager/lang/bg/lang.php @@ -4,6 +4,7 @@ * * @author Nikolay Vladimirov * @author Viktor Usunov + * @author Kiril Velikov neohidra@gmail.com */ $lang['menu'] = 'Управление на потребителите'; $lang['noauth'] = '(идентифицирането на потребителите е недостъпно)'; @@ -33,15 +34,15 @@ $lang['delete_fail'] = '%d не бяха изтрити'; $lang['update_ok'] = 'Обновяването на потребителя бе успешно'; $lang['update_fail'] = 'Обновяването на потребителя бе неуспешно'; $lang['update_exists'] = 'Смяната на потребителското име бе невъзможна, оказаното потребителско име (%s) вече съществува (всякакви други промени ще бъдат приложени).'; -$lang['start'] = 'начало'; -$lang['prev'] = 'предишно'; -$lang['next'] = 'следващо'; -$lang['last'] = 'последно'; +$lang['start'] = 'първи'; +$lang['prev'] = 'назад'; +$lang['next'] = 'напред'; +$lang['last'] = 'последен'; $lang['edit_usermissing'] = 'Избраният потребител не бе намерен, оказаното потребителско име може да е изтрито или променено другаде.'; -$lang['user_notify'] = 'Осведомяване на потребителя'; -$lang['note_notify'] = 'Осведомителната e-поща се праща само, ако на потребителя е дадена нова парола.'; -$lang['note_group'] = 'Новите потребители ще бъдат добавяни към групата (%s) ако не бъде посочена друга.'; -$lang['note_pass'] = 'Паролата ще бъде генерирана автоматично, ако полето е оставено празно и функцията за уведомяване на потребителя е включена.'; +$lang['user_notify'] = 'Уведомяване на потребителя'; +$lang['note_notify'] = 'Ел. писмо се изпраща само ако бъде променена паролата на потребителя.'; +$lang['note_group'] = 'Новите потребители биват добавяни към стандартната групата (%s) ако не е посочена друга.'; +$lang['note_pass'] = 'Паролата ще бъде генерирана автоматично, ако оставите полето празно и функцията за уведомяване на потребителя е включена.'; $lang['add_ok'] = 'Добавянето на потребителя бе успешно'; $lang['add_fail'] = 'Добавянето на потребителя бе неуспешно'; $lang['notify_ok'] = 'Осведомително е-писмо бе изпратено'; -- cgit v1.2.3 From e24ab4ab794093b0d9ca1095e321b04f9cd956d6 Mon Sep 17 00:00:00 2001 From: Johan Guilbaud Date: Tue, 1 Feb 2011 18:05:13 +0100 Subject: French language update --- inc/lang/fr/lang.php | 1 + lib/plugins/acl/lang/fr/lang.php | 1 + lib/plugins/config/lang/fr/lang.php | 2 ++ lib/plugins/plugin/lang/fr/lang.php | 1 + lib/plugins/popularity/lang/fr/lang.php | 1 + lib/plugins/revert/lang/fr/lang.php | 1 + lib/plugins/usermanager/lang/fr/lang.php | 1 + 7 files changed, 8 insertions(+) diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 76e1271bd..17d35dfa9 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -21,6 +21,7 @@ * @author Philippe Bajoit * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net + * @author Johan Guilbaud */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; diff --git a/lib/plugins/acl/lang/fr/lang.php b/lib/plugins/acl/lang/fr/lang.php index 63e529aab..36323a51f 100644 --- a/lib/plugins/acl/lang/fr/lang.php +++ b/lib/plugins/acl/lang/fr/lang.php @@ -20,6 +20,7 @@ * @author Philippe Bajoit * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net + * @author Johan Guilbaud */ $lang['admin_acl'] = 'Gestion de la liste des contrôles d\'accès (ACL)'; $lang['acl_group'] = 'Groupe'; diff --git a/lib/plugins/config/lang/fr/lang.php b/lib/plugins/config/lang/fr/lang.php index 7f3e39845..99e140af5 100644 --- a/lib/plugins/config/lang/fr/lang.php +++ b/lib/plugins/config/lang/fr/lang.php @@ -15,6 +15,7 @@ * @author Philippe Bajoit * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net + * @author Johan Guilbaud */ $lang['menu'] = 'Paramètres de configuration'; $lang['error'] = 'Paramètres non modifiés en raison d\'une valeur non valide, vérifiez vos réglages et réessayez.
Les valeurs erronées sont entourées d\'une bordure rouge.'; @@ -111,6 +112,7 @@ $lang['fetchsize'] = 'Taille maximale (en octets) du fichier que fet $lang['notify'] = 'Notifier les modifications à cette adresse de courriel'; $lang['registernotify'] = 'Envoyer un courriel annonçant les nouveaux utilisateurs enregistrés à cette adresse'; $lang['mailfrom'] = 'Expéditeur des notifications par courriel du wiki'; +$lang['mailprefix'] = 'Préfixe à utiliser dans les objets des courriels automatiques'; $lang['gzip_output'] = 'Utiliser Content-Encoding gzip pour XHTML'; $lang['gdlib'] = 'Version de GD Lib'; $lang['im_convert'] = 'Chemin vers l\'outil de conversion d\'ImageMagick'; diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php index 79080f5f3..5daf3b3ad 100644 --- a/lib/plugins/plugin/lang/fr/lang.php +++ b/lib/plugins/plugin/lang/fr/lang.php @@ -15,6 +15,7 @@ * @author Philippe Bajoit * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net + * @author Johan Guilbaud */ $lang['menu'] = 'Gestion des modules externes'; $lang['download'] = 'Télécharger et installer un nouveau module'; diff --git a/lib/plugins/popularity/lang/fr/lang.php b/lib/plugins/popularity/lang/fr/lang.php index 1157d1fa6..9aaf3c7d2 100644 --- a/lib/plugins/popularity/lang/fr/lang.php +++ b/lib/plugins/popularity/lang/fr/lang.php @@ -12,6 +12,7 @@ * @author Philippe Bajoit * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net + * @author Johan Guilbaud */ $lang['name'] = 'Enquête de popularité (peut nécessiter un certain temps pour être chargée)'; $lang['submit'] = 'Envoyer les données'; diff --git a/lib/plugins/revert/lang/fr/lang.php b/lib/plugins/revert/lang/fr/lang.php index d80ece209..d6dc3ee3d 100644 --- a/lib/plugins/revert/lang/fr/lang.php +++ b/lib/plugins/revert/lang/fr/lang.php @@ -13,6 +13,7 @@ * @author Philippe Bajoit * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net + * @author Johan Guilbaud */ $lang['menu'] = 'Gestionnaire de réversions'; $lang['filter'] = 'Trouver les pages spammées '; diff --git a/lib/plugins/usermanager/lang/fr/lang.php b/lib/plugins/usermanager/lang/fr/lang.php index 92bc127ed..49baf9d51 100644 --- a/lib/plugins/usermanager/lang/fr/lang.php +++ b/lib/plugins/usermanager/lang/fr/lang.php @@ -14,6 +14,7 @@ * @author Philippe Bajoit * @author Florian Gaub * @author Samuel Dorsaz samuel.dorsaz@novelion.net + * @author Johan Guilbaud */ $lang['menu'] = 'Gestion des utilisateurs'; $lang['noauth'] = '(authentification utilisateur non disponible)'; -- cgit v1.2.3 From 7b84afa2e557a05fcd900a1cbf5715a6988828dc Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 3 Feb 2011 16:12:32 +0100 Subject: Replace COMMON_PAGE_FROMTEMPLATE with COMMON_PAGETPL_LOAD event As discussed on the mailing list [1] this patch replaces the COMMON_PAGE_FROMTEMPLATE with a more flexible event to better intercept page template use. Plugin authors need to change their plugins. Details on the event are available at [2] [1] http://www.freelists.org/post/dokuwiki/COMMON-PAGE-FROMTEMPLATE-event [2] http://www.dokuwiki.org/devel:event:common_pagetpl_load --- inc/common.php | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/inc/common.php b/inc/common.php index b4866bccf..eab5f1129 100644 --- a/inc/common.php +++ b/inc/common.php @@ -804,7 +804,7 @@ function rawWiki($id,$rev=''){ /** * Returns the pagetemplate contents for the ID's namespace * - * @triggers COMMON_PAGE_FROMTEMPLATE + * @triggers COMMON_PAGETPL_LOAD * @author Andreas Gohr */ function pageTemplate($id){ @@ -812,29 +812,50 @@ function pageTemplate($id){ if (is_array($id)) $id = $id[0]; - $path = dirname(wikiFN($id)); - $tpl = ''; - if(@file_exists($path.'/_template.txt')){ - $tpl = io_readFile($path.'/_template.txt'); - }else{ - // search upper namespaces for templates - $len = strlen(rtrim($conf['datadir'],'/')); - while (strlen($path) >= $len){ - if(@file_exists($path.'/__template.txt')){ - $tpl = io_readFile($path.'/__template.txt'); - break; + // prepare initial event data + $data = array( + 'id' => $id, // the id of the page to be created + 'tpl' => '', // the text used as template + 'tplfile' => '', // the file above text was/should be loaded from + 'doreplace' => true // should wildcard replacements be done on the text? + ); + + $evt = new Doku_Event('COMMON_PAGETPL_LOAD',$data); + if($evt->advise_before(true)){ + // the before event might have loaded the content already + if(empty($data['tpl'])){ + // if the before event did not set a template file, try to find one + if(empty($data['tplfile'])){ + $path = dirname(wikiFN($id)); + $tpl = ''; + if(@file_exists($path.'/_template.txt')){ + $data['tplfile'] = $path.'/_template.txt'; + }else{ + // search upper namespaces for templates + $len = strlen(rtrim($conf['datadir'],'/')); + while (strlen($path) >= $len){ + if(@file_exists($path.'/__template.txt')){ + $data['tplfile'] = $path.'/__template.txt'; + break; + } + $path = substr($path, 0, strrpos($path, '/')); + } + } } - $path = substr($path, 0, strrpos($path, '/')); + // load the content + $data['tpl'] = io_readFile($data['tpl']); } + if($data['doreplace']) parsePageTemplate(&$data); } - $data = compact('tpl', 'id'); - trigger_event('COMMON_PAGE_FROMTEMPLATE', $data, 'parsePageTemplate', true); + $evt->advise_after(); + unset($evt); + return $data['tpl']; } /** * Performs common page template replacements - * This is the default action for COMMON_PAGE_FROMTEMPLATE + * This works on data from COMMON_PAGETPL_LOAD * * @author Andreas Gohr */ -- cgit v1.2.3 From cac0cda399557496cb6c3216ddb6ad764ba13c71 Mon Sep 17 00:00:00 2001 From: Georgios Petsagourakis Date: Fri, 4 Feb 2011 14:05:35 +0100 Subject: Greek translation update --- lib/plugins/config/lang/el/lang.php | 1 + lib/plugins/popularity/lang/el/lang.php | 5 +++++ lib/plugins/popularity/lang/el/submitted.txt | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 lib/plugins/popularity/lang/el/submitted.txt diff --git a/lib/plugins/config/lang/el/lang.php b/lib/plugins/config/lang/el/lang.php index df9029506..ebd676886 100644 --- a/lib/plugins/config/lang/el/lang.php +++ b/lib/plugins/config/lang/el/lang.php @@ -108,6 +108,7 @@ $lang['fetchsize'] = 'Μέγιστο μέγεθος (σε bytes) ε $lang['notify'] = 'Αποστολή ενημέρωσης για αλλαγές σε αυτή την e-mail διεύθυνση'; $lang['registernotify'] = 'Αποστολή ενημερωτικών μηνυμάτων σε αυτή την e-mail διεύθυνση κατά την εγγραφή νέων χρηστών'; $lang['mailfrom'] = 'e-mail διεύθυνση αποστολέα για μηνύματα από την εφαρμογή'; +$lang['mailprefix'] = 'Πρόθεμα θέματος που να χρησιμοποιείται για τα αυτόματα μηνύματα ηλεκτρονικού ταχυδρομείου.'; $lang['gzip_output'] = 'Χρήση gzip Content-Encoding για την xhtml'; $lang['gdlib'] = 'Έκδοση βιβλιοθήκης GD'; $lang['im_convert'] = 'Διαδρομή προς το εργαλείο μετατροπής εικόνων του ImageMagick'; diff --git a/lib/plugins/popularity/lang/el/lang.php b/lib/plugins/popularity/lang/el/lang.php index 0d16bbf86..41704fa06 100644 --- a/lib/plugins/popularity/lang/el/lang.php +++ b/lib/plugins/popularity/lang/el/lang.php @@ -7,3 +7,8 @@ */ $lang['name'] = 'Αναφορά Δημοτικότητας (ίσως αργήσει λίγο να εμφανιστεί)'; $lang['submit'] = 'Αποστολή Δεδομένων'; +$lang['autosubmit'] = 'Να αποστέλονται τα δεδομένα αυτόματα μια φορά το μήνα.'; +$lang['submissionFailed'] = 'Τα δεδομένα δεν ήταν δυνατό να αποσταλλούν λόγω του παρακάτω σφάλματος:'; +$lang['submitDirectly'] = 'Μπορείτε να αποστείλλετε τα δεδομένα χειροκίνητα με την υποβολή της παρακάτω φόρμας.'; +$lang['autosubmitError'] = 'Η τελευταία αυτόματη υποβολή των δεδομένων απέτυχε με το παρακάτω μήνυμα σφάλματος:'; +$lang['lastSent'] = 'Τα δεδομένα έχουν σταλεί.'; diff --git a/lib/plugins/popularity/lang/el/submitted.txt b/lib/plugins/popularity/lang/el/submitted.txt new file mode 100644 index 000000000..8004f9997 --- /dev/null +++ b/lib/plugins/popularity/lang/el/submitted.txt @@ -0,0 +1,3 @@ +====== Αποτέλεσμα Υποβολής Δημοσιότητας ====== + +Τα δεδομένα στάλθηκαν επιτυχώς. \ No newline at end of file -- cgit v1.2.3 From 53281602cea7a66dd909c3b5cb4e7c07a82cd54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Esp=C3=ADrito=20Santo?= Date: Sat, 5 Feb 2011 12:55:53 +0100 Subject: Portuguese language update --- inc/lang/pt/lang.php | 2 ++ lib/plugins/config/lang/pt/lang.php | 1 + lib/plugins/popularity/lang/pt/lang.php | 4 ++++ lib/plugins/popularity/lang/pt/submitted.txt | 3 +++ 4 files changed, 10 insertions(+) create mode 100644 lib/plugins/popularity/lang/pt/submitted.txt diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php index 4c0ec02d2..6b68c5fef 100644 --- a/inc/lang/pt/lang.php +++ b/inc/lang/pt/lang.php @@ -160,6 +160,8 @@ $lang['yours'] = 'A sua versão'; $lang['diff'] = 'mostrar diferenças com a versão actual'; $lang['diff2'] = 'mostrar diferenças entre versões escolhidas'; $lang['difflink'] = 'Ligação para esta vista de comparação'; +$lang['diff_type'] = 'Ver diferenças'; +$lang['diff_side'] = 'Lado a lado'; $lang['line'] = 'Linha'; $lang['breadcrumb'] = 'Está em'; $lang['youarehere'] = 'Está aqui'; diff --git a/lib/plugins/config/lang/pt/lang.php b/lib/plugins/config/lang/pt/lang.php index 336de5b36..c0ada0a26 100644 --- a/lib/plugins/config/lang/pt/lang.php +++ b/lib/plugins/config/lang/pt/lang.php @@ -103,6 +103,7 @@ $lang['fetchsize'] = 'Tamanho máximo (bytes) que o fetch.php pode t $lang['notify'] = 'Enviar notificações de mudanças para este endereço de email'; $lang['registernotify'] = 'Enviar informações de utilizadores registados para este endereço de email'; $lang['mailfrom'] = 'Endereço de email a ser utilizado para mensagens automáticas'; +$lang['mailprefix'] = 'Prefixo de email a ser utilizado para mensagens automáticas'; $lang['gzip_output'] = 'Usar "Content-Encoding" do gzip para o código xhtml'; $lang['gdlib'] = 'Versão GD Lib'; $lang['im_convert'] = 'Caminho para a ferramenta "convert" do ImageMagick'; diff --git a/lib/plugins/popularity/lang/pt/lang.php b/lib/plugins/popularity/lang/pt/lang.php index da92ee729..35fac0fc0 100644 --- a/lib/plugins/popularity/lang/pt/lang.php +++ b/lib/plugins/popularity/lang/pt/lang.php @@ -8,3 +8,7 @@ */ $lang['name'] = 'Retorno (feedback) de Popularidade (pode levar algum tempo a carregar)'; $lang['submit'] = 'Enviar Dados'; +$lang['autosubmit'] = 'Enviar dados automáticamente uma vez por mês'; +$lang['submissionFailed'] = 'Os dados não foram enviados devido ao seguinte erro:'; +$lang['submitDirectly'] = 'Pode enviar os dados manualmente, submetendo o seguinte formulário.'; +$lang['lastSent'] = 'Os dados foram enviados'; diff --git a/lib/plugins/popularity/lang/pt/submitted.txt b/lib/plugins/popularity/lang/pt/submitted.txt new file mode 100644 index 000000000..d2bb2b7ae --- /dev/null +++ b/lib/plugins/popularity/lang/pt/submitted.txt @@ -0,0 +1,3 @@ +====== Retorno de Popularidade ====== + +Os dados foram enviados com sucesso. \ No newline at end of file -- cgit v1.2.3 From 1b885c58f9e8294f0b866e2c327942ce3ab9de3f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 5 Feb 2011 13:26:08 +0100 Subject: fixed inline diff selector loosing page context --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index 7abb05d2e..4d5d557af 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1012,7 +1012,7 @@ function html_diff($text='',$intro=true,$type=null){ ptln('
@@ ' . $lang['line'] . + ' -1 +1 @@ ' . $lang['deleted'] . + ' ' . $lang['created'] . + '
example example2
' . $lang['line'] . ' 1:' . $lang['line'] . ' 1:
-example+example example2
-- cgit v1.2.3 From be62ff971ce968b0e42730e7316728d13abe3489 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 12:08:10 +0100 Subject: removed nbsps from some clearer divs --- inc/html.php | 2 +- lib/tpl/default/main.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/html.php b/inc/html.php index 27f862219..be4cb4f9c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -355,7 +355,7 @@ function html_search(){ } print ' '; //clear float (see http://www.complexspiral.com/publications/containing-floats/) - print '
 
'; + print '
'; print ''; } flush(); diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index 754a6e482..94c2322aa 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -92,7 +92,7 @@ if (!defined('DOKU_INC')) die(); -
 
+
-- cgit v1.2.3 From ecd7c1d6b68a5f3eeef348295558dfaa14c471b2 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 12:21:26 +0100 Subject: avoid empty optgroup in acl admin --- lib/plugins/acl/admin.php | 64 +++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/lib/plugins/acl/admin.php b/lib/plugins/acl/admin.php index 8ca602533..c8b7b1e6e 100644 --- a/lib/plugins/acl/admin.php +++ b/lib/plugins/acl/admin.php @@ -800,38 +800,42 @@ class admin_plugin_acl extends DokuWiki_Admin_Plugin { echo ''.NL; return $inlist; } -- cgit v1.2.3 From 6cd259d7de1e82b753b5b7ce593637e58b36288b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 12:25:08 +0100 Subject: closed hidden input in popularity plugin --- lib/plugins/popularity/admin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index 40c3f5452..f9f6ceb65 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -137,8 +137,8 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { .($this->helper->isAutosubmitEnabled() ? 'checked' : '' ) .'/>' . $this->getLang('autosubmit') .'
' .'' - .'' - .''; + .'' + .''; } $form .= '' .'' -- cgit v1.2.3 From c2e7388603824fb21afecae11b46d07de5d1c54c Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 12:51:56 +0100 Subject: don't use form_makeTag() for blank.gif as empty attributes are not passed on (which resulted in a missing alt attribute) --- inc/html.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/inc/html.php b/inc/html.php index be4cb4f9c..0774086f9 100644 --- a/inc/html.php +++ b/inc/html.php @@ -457,11 +457,7 @@ function html_revisions($first=0){ $form->addElement($date); $form->addElement(form_makeCloseTag('span')); - $form->addElement(form_makeTag('img', array( - 'src' => DOKU_BASE.'lib/images/blank.gif', - 'width' => '15', - 'height' => '11', - 'alt' => ''))); + $form->addElement(''); $form->addElement(form_makeOpenTag('a', array( 'class' => 'wikilink1', @@ -499,11 +495,7 @@ function html_revisions($first=0){ 'name' => 'rev2[]', 'value' => $rev))); }else{ - $form->addElement(form_makeTag('img', array( - 'src' => DOKU_BASE.'lib/images/blank.gif', - 'width' => 14, - 'height' => 11, - 'alt' => ''))); + $form->addElement(''); } $form->addElement(form_makeOpenTag('span', array('class' => 'date'))); @@ -524,11 +516,7 @@ function html_revisions($first=0){ $form->addElement($ID); $form->addElement(form_makeCloseTag('a')); }else{ - $form->addElement(form_makeTag('img', array( - 'src' => DOKU_BASE.'lib/images/blank.gif', - 'width' => '15', - 'height' => '11', - 'alt' => ''))); + $form->addElement(''); $form->addElement($ID); } -- cgit v1.2.3 From d8f5fe8a1b2231ff584f43c25217b16950600656 Mon Sep 17 00:00:00 2001 From: lupo49 Date: Sat, 16 Apr 2011 14:37:13 +0200 Subject: eo: updates for esperanto language --- inc/lang/eo/lang.php | 3 +++ lib/plugins/config/lang/eo/lang.php | 1 + lib/plugins/popularity/lang/eo/lang.php | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/inc/lang/eo/lang.php b/inc/lang/eo/lang.php index 305c080f1..4bb1c005d 100644 --- a/inc/lang/eo/lang.php +++ b/inc/lang/eo/lang.php @@ -161,6 +161,9 @@ $lang['yours'] = 'Via Versio'; $lang['diff'] = 'Montri diferencojn el la aktuala versio'; $lang['diff2'] = 'Montri diferencojn inter la elektitaj revizioj'; $lang['difflink'] = 'Ligilo al kompara rigardo'; +$lang['diff_type'] = 'Rigardi malsamojn:'; +$lang['diff_inline'] = 'Samlinie'; +$lang['diff_side'] = 'Apude'; $lang['line'] = 'Linio'; $lang['breadcrumb'] = 'Paŝoj'; $lang['youarehere'] = 'Vi estas ĉi tie'; diff --git a/lib/plugins/config/lang/eo/lang.php b/lib/plugins/config/lang/eo/lang.php index b519aa4e3..a3b74691f 100644 --- a/lib/plugins/config/lang/eo/lang.php +++ b/lib/plugins/config/lang/eo/lang.php @@ -108,6 +108,7 @@ $lang['fetchsize'] = 'Maksimuma grandeco (bitokoj) permesita al "fet $lang['notify'] = 'Sendi avizojn pri ŝanĝoj al tiu ĉi retadreso'; $lang['registernotify'] = 'Sendi informon pri ĵus aliĝintoj al tiu ĉi retadreso'; $lang['mailfrom'] = 'Retadreso uzota por aŭtomataj retmesaĝoj '; +$lang['mailprefix'] = 'Retpoŝta temo-prefikso por uzi en aŭtomataj mesaĝoj'; $lang['gzip_output'] = 'Uzi gzip-a enhav-enkodigo por XHTML'; $lang['gdlib'] = 'Versio de GD Lib'; $lang['im_convert'] = 'Pado al la konvertilo de ImageMagick'; diff --git a/lib/plugins/popularity/lang/eo/lang.php b/lib/plugins/popularity/lang/eo/lang.php index 9326cc741..a7c124f51 100644 --- a/lib/plugins/popularity/lang/eo/lang.php +++ b/lib/plugins/popularity/lang/eo/lang.php @@ -12,3 +12,8 @@ */ $lang['name'] = 'Populareca enketo (eble la ŝargo prokrastos iomete)'; $lang['submit'] = 'Sendi datenaron'; +$lang['autosubmit'] = 'Aŭtomate sendi datumaron monate'; +$lang['submissionFailed'] = 'La datumaro ne povis esti sendata pro la jena eraro:'; +$lang['submitDirectly'] = 'Vi povas sendi vi mem la datumaron per la sekva informilo.'; +$lang['autosubmitError'] = 'La lasta aŭtomata sendo malsukcesis, pro la jena eraro:'; +$lang['lastSent'] = 'La datumaro estas sendita'; -- cgit v1.2.3 From f4ca4fedd6f501293173d2ab4b4a730f75d4c467 Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sat, 16 Apr 2011 15:14:19 +0200 Subject: Removed hard coded strings from plugin manager --- lib/plugins/plugin/classes/ap_delete.class.php | 2 +- lib/plugins/plugin/classes/ap_download.class.php | 2 +- lib/plugins/plugin/lang/en/lang.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/plugins/plugin/classes/ap_delete.class.php b/lib/plugins/plugin/classes/ap_delete.class.php index 231147479..581a6295f 100644 --- a/lib/plugins/plugin/classes/ap_delete.class.php +++ b/lib/plugins/plugin/classes/ap_delete.class.php @@ -6,7 +6,7 @@ class ap_delete extends ap_manage { if (!$this->dir_delete(DOKU_PLUGIN.plugin_directory($this->manager->plugin))) { $this->manager->error = sprintf($this->lang['error_delete'],$this->manager->plugin); } else { - msg("Plugin {$this->manager->plugin} successfully deleted."); + msg(sprintf($this->lang['deleted'],$this->plugin)); $this->refresh(); } } diff --git a/lib/plugins/plugin/classes/ap_download.class.php b/lib/plugins/plugin/classes/ap_download.class.php index 784095aaf..e3afd142a 100644 --- a/lib/plugins/plugin/classes/ap_download.class.php +++ b/lib/plugins/plugin/classes/ap_download.class.php @@ -114,7 +114,7 @@ class ap_download extends ap_manage { if ($tmp) $this->dir_delete($tmp); if (!$this->manager->error) { - msg('Plugin package ('.count($this->downloaded).' plugin'.(count($this->downloaded) != 1?'s':'').': '.join(',',$this->downloaded).') successfully installed.',1); + msg(sprintf($this->lang['packageinstalled'], count($this->downloaded), (count($this->downloaded) != 1?'s':''), join(',',$this->downloaded)),1); $this->refresh(); return true; } diff --git a/lib/plugins/plugin/lang/en/lang.php b/lib/plugins/plugin/lang/en/lang.php index ccbd207e9..437c168bd 100644 --- a/lib/plugins/plugin/lang/en/lang.php +++ b/lib/plugins/plugin/lang/en/lang.php @@ -73,5 +73,6 @@ $lang['enabled'] = 'Plugin %s enabled.'; $lang['notenabled'] = 'Plugin %s could not be enabled, check file permissions.'; $lang['disabled'] = 'Plugin %s disabled.'; $lang['notdisabled'] = 'Plugin %s could not be disabled, check file permissions.'; +$lang['packageinstalled'] = 'Plugin package (%d plugin%s: %s) successfully installed.'; //Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From ff9a8d11b604e75395a9dd4d0d3700653a2adf1f Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sat, 16 Apr 2011 15:15:25 +0200 Subject: French strings update --- lib/plugins/plugin/lang/fr/lang.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/plugins/plugin/lang/fr/lang.php b/lib/plugins/plugin/lang/fr/lang.php index 5daf3b3ad..618e7a75b 100644 --- a/lib/plugins/plugin/lang/fr/lang.php +++ b/lib/plugins/plugin/lang/fr/lang.php @@ -61,3 +61,4 @@ $lang['enabled'] = 'Module %s activé.'; $lang['notenabled'] = 'Le module %s n\'a pas pu être activé, vérifiez le fichier des permissions.'; $lang['disabled'] = 'Module %s désactivé.'; $lang['notdisabled'] = 'Le module %s n\'a pas pu être désactivé, vérifiez le fichier des permissions.'; +$lang['packageinstalled'] = 'Ensemble de modules (%d module%s: %s) installé avec succès.'; -- cgit v1.2.3 From cfcd890b39045ce68b2589654b508b4d8d62a802 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sat, 16 Apr 2011 20:16:25 +0100 Subject: removed incorrect nbsps in diff view (FS#2223) --- inc/DifferenceEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php index 2578d07ee..6e1d07382 100644 --- a/inc/DifferenceEngine.php +++ b/inc/DifferenceEngine.php @@ -1021,7 +1021,7 @@ class TableDiffFormatter extends DiffFormatter { $l1 = $lang['line'].' '.$xbeg; $l2 = $lang['line'].' '.$ybeg; $r = '
\n". - ' \n". + '\n". "\n"; return $r; } -- cgit v1.2.3 From 23ae1b94a29fd9c3219a8cb37f3f2e21fbe03bc6 Mon Sep 17 00:00:00 2001 From: Kiril Velikov Date: Sun, 17 Apr 2011 08:55:59 +0200 Subject: Bulgarian language update --- inc/lang/bg/install.html | 9 ++++----- inc/lang/bg/lang.php | 4 ++-- inc/lang/bg/pwconfirm.txt | 2 +- lib/plugins/acl/lang/bg/lang.php | 2 +- lib/plugins/config/lang/bg/lang.php | 8 ++++---- lib/plugins/plugin/lang/bg/admin_plugin.txt | 2 +- lib/plugins/revert/lang/bg/intro.txt | 2 +- lib/plugins/usermanager/lang/bg/lang.php | 4 ++-- lib/plugins/usermanager/lang/bg/list.txt | 2 +- 9 files changed, 17 insertions(+), 18 deletions(-) diff --git a/inc/lang/bg/install.html b/inc/lang/bg/install.html index 6dde7e4ce..9d275d82a 100644 --- a/inc/lang/bg/install.html +++ b/inc/lang/bg/install.html @@ -7,12 +7,11 @@ За да функционира нормално DokuWiki трябва да има право за писане в директориите, които съдържат тези файлове. Инсталаторът не може да настройва правата на директориите. -Обикновено трябва да направите това директно от командният ред или ако -ползвате хостинг - през FTP или контролния панела на хоста (примерно cPanel).

+Вие трябва да направите това директно от командният ред или ако ползвате хостинг през FTP или контролния панела на хоста (примерно cPanel).

Инсталаторът ще настрои вашата DokuWiki конфигурация на ACL, което ще позволи на администратора да се впише и ползва администраторското меню в DokuWiki за инсталиране на приставки, контрол -на потребители, управление на достъпа до страниците и промяна на останалите настройки. Това не е необходимо за функционирането на DokuWiki, но направи администрирането на DokuWiki по-лесно.

+на потребители, управление на достъпа до страниците и промяна на останалите настройки. Това не е необходимо за функционирането на DokuWiki, но направи администрирането по-лесно.

-

Опитните потребители или потребителите със специални изисквания към настройките имат на разположение информация относно инсталациятанастройките.

+

Опитните потребители и потребителите със специални изисквания към настройките имат на разположение допълнителна информация относно инсталиранетонастройването.

diff --git a/inc/lang/bg/lang.php b/inc/lang/bg/lang.php index c7c52b70f..1acf39acb 100644 --- a/inc/lang/bg/lang.php +++ b/inc/lang/bg/lang.php @@ -134,7 +134,7 @@ $lang['uploadexist'] = 'Файлът вече съществува. Н $lang['uploadbadcontent'] = 'Каченото съдържание не съответства на файлово разширение %s .'; $lang['uploadspam'] = 'Качването е блокирано от SPAM списъка.'; $lang['uploadxss'] = 'Качването е блокирано, поради възможно зловредно съдържание.'; -$lang['uploadsize'] = 'Файльт за качване е прекалено голям. (макс. %s)'; +$lang['uploadsize'] = 'Файлът за качване е прекалено голям. (макс. %s)'; $lang['deletesucc'] = 'Файлът "%s" бе изтрит.'; $lang['deletefail'] = '"%s" не може да бъде изтрит - проверете правата.'; $lang['mediainuse'] = 'Файлът "%s" не бе изтрит - все още се ползва.'; @@ -241,7 +241,7 @@ $lang['i_wikiname'] = 'Име на Wiki-то'; $lang['i_enableacl'] = 'Ползване на списък за достъп (ACL) [препоръчително]'; $lang['i_superuser'] = 'Супер потребител'; $lang['i_problems'] = 'Открити са проблеми, които възпрепятстват инсталирането. Ще можете да продължите след като отстраните долуизброените проблеми.'; -$lang['i_modified'] = 'Поради мерки за сигурност скрипта ще работи само с нова и непроменена инсталация на Dokuwiki. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с Инструкциите за инсталация на Dokuwiki.'; +$lang['i_modified'] = 'Поради мерки за сигурност инсталатора работи само с нова и непроменена инсталация на Dokuwiki. Трябва да разархивирате отново файловете от сваления архив или да се посъветвате с Инструкциите за инсталиране на Dokuwiki.'; $lang['i_funcna'] = 'PHP функцията %s не е достъпна. Може би е забранена от доставчика на хостинг.'; $lang['i_phpver'] = 'Инсталираната версия %s на PHP е по-стара от необходимата %s. Актуализирайте PHP инсталацията.'; $lang['i_permfail'] = '%s не е достъпна за писане от DokuWiki. Трябва да промените правата за достъп до директорията!'; diff --git a/inc/lang/bg/pwconfirm.txt b/inc/lang/bg/pwconfirm.txt index 2c4252e15..802153fd4 100644 --- a/inc/lang/bg/pwconfirm.txt +++ b/inc/lang/bg/pwconfirm.txt @@ -3,7 +3,7 @@ Някой е поискал нова парола за потребител @TITLE@ на @DOKUWIKIURL@ -Ако не сте поискали нова парола, товава просто игнорирайте това писмо. +Ако не сте поискали нова парола, тогава просто игнорирайте това писмо. За да потвърдите, че искането е наистина от вас, моля ползвайте следния линк: diff --git a/lib/plugins/acl/lang/bg/lang.php b/lib/plugins/acl/lang/bg/lang.php index 2b956deba..0746e32c9 100644 --- a/lib/plugins/acl/lang/bg/lang.php +++ b/lib/plugins/acl/lang/bg/lang.php @@ -24,7 +24,7 @@ $lang['p_inherited'] = 'Бележка: Тези разрешения $lang['p_isadmin'] = 'Бележка: Избраната група или потребител има всички права, защото е определен за суперпотребител.'; $lang['p_include'] = 'Висши права включват по-нисшите такива. Правата за създаване, качване и изтриване са приложими само за именни пространства, но не за страници.'; $lang['current'] = 'Текущи ACL права'; -$lang['where'] = 'Страница/Именно постранство'; +$lang['where'] = 'Страница/Именно пространство'; $lang['who'] = 'Потребител/Група'; $lang['perm'] = 'Права'; $lang['acl_perm0'] = 'Никакви'; diff --git a/lib/plugins/config/lang/bg/lang.php b/lib/plugins/config/lang/bg/lang.php index eb2c3a426..5f9088c3e 100644 --- a/lib/plugins/config/lang/bg/lang.php +++ b/lib/plugins/config/lang/bg/lang.php @@ -8,11 +8,11 @@ * @author Kiril */ $lang['menu'] = 'Настройки'; -$lang['error'] = 'Обновяването на настройките е невъзможно, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново. +$lang['error'] = 'Обновяването на настройките не е възможно, поради невалидна стойност, моля, прегледайте промените си и пробвайте отново.
Неверните стойности ще бъдат обградени с червена рамка.'; $lang['updated'] = 'Обновяването на настройките е успешно.'; $lang['nochoice'] = '(няма друг възможен избор)'; -$lang['locked'] = 'Обновяването на файла с настройките е невъзможно, ако това не е нарочно, проверете,
дали името на локалния файл с настройки и правата са верни.'; +$lang['locked'] = 'Обновяването на файла с настройките не е възможно, ако това не е нарочно, проверете,
дали името на локалния файл с настройки и правата са верни.'; $lang['danger'] = 'Внимание: промяна на опцията може да направи wiki-то и менюто за настройване недостъпни.'; $lang['warning'] = 'Предупреждение: промяна на опцията може предизвика нежелани последици.'; $lang['security'] = 'Предупреждение: промяна на опцията може да представлява риск за сигурността.'; @@ -84,8 +84,8 @@ $lang['disableactions_subscription'] = 'Записване/Отписване'; $lang['disableactions_wikicode'] = 'Преглед на кода/Експортиране на оригинална версия'; $lang['disableactions_other'] = 'Други действия (разделени със запетая)'; $lang['sneaky_index'] = 'Стандартно DokuWiki ще показва всички именни пространства в индекса. Опцията скрива тези, за които потребителят няма права за четене. Това може да доведе и до скриване на иначе достъпни подименни пространства. С определени настройки на списъците за контрол на достъпа (ACL) може да направи индекса неизползваем. '; -$lang['auth_security_timeout'] = 'Считане на вписване за неуспешно след (сек)'; -$lang['securecookie'] = 'Да се изпращат ли бисквитките зададени чрез HTTPS, само чрез HTTPS от браузъра? Изключете опцията, когато SSL се ползва само за вписване в системата, а четенето е възможно и без SSL. +$lang['auth_security_timeout'] = 'Автоматично проверяване на удостоверяването всеки (сек)'; +$lang['securecookie'] = 'Да се изпращат ли бисквитките зададени чрез HTTPS, само чрез HTTPS от браузъра? Изключете опцията, когато SSL се ползва само за вписване, а четенето е без SSL. '; $lang['xmlrpc'] = 'Включване/Изключване на интерфейса XML-RPC.'; $lang['xmlrpcuser'] = 'Ограничаване на XML-RPC достъпа до отделени със запетая групи или потребители. Оставете празно, за да даде достъп на всеки.'; diff --git a/lib/plugins/plugin/lang/bg/admin_plugin.txt b/lib/plugins/plugin/lang/bg/admin_plugin.txt index 0227d6fe8..bad73e136 100644 --- a/lib/plugins/plugin/lang/bg/admin_plugin.txt +++ b/lib/plugins/plugin/lang/bg/admin_plugin.txt @@ -1,3 +1,3 @@ ====== Управление на приставките ====== -На тази страница можете на управлявате всичко свързано с [[doku>plugins|приставките]] на Dokuwiki. За да можете да свалите и инсталирате приставка, е необходимо писането в директорията plugin да е позволено на сървъра. +От тази страница можете на управлявате [[doku>plugins|приставките]] на Dokuwiki. За да свалите и инсталирате приставка, е необходимо писането в директорията .../lib/plugins/ да е позволено на сървъра. diff --git a/lib/plugins/revert/lang/bg/intro.txt b/lib/plugins/revert/lang/bg/intro.txt index 791c96857..44d5a0938 100644 --- a/lib/plugins/revert/lang/bg/intro.txt +++ b/lib/plugins/revert/lang/bg/intro.txt @@ -1,4 +1,4 @@ ====== Възстановяване ====== -Страницата помага за автоматично възстановяване след SPAM атака. За да намерите списък със спамнати страници, въведете текст за търсене (напр. линк от SPAM съобщението), след това потвърдете, че намерените страници са наистина SPAM и възстановете старите версии. +Страницата помага за автоматично възстановяване след SPAM атака. За да намерите спамнатите страници, въведете текст за търсене (напр. линк от SPAM съобщението), след това потвърдете, че намерените страници са наистина SPAM и възстановете старите им версии. diff --git a/lib/plugins/usermanager/lang/bg/lang.php b/lib/plugins/usermanager/lang/bg/lang.php index 909c1e8fe..9ed27f42a 100644 --- a/lib/plugins/usermanager/lang/bg/lang.php +++ b/lib/plugins/usermanager/lang/bg/lang.php @@ -45,5 +45,5 @@ $lang['note_group'] = 'Новите потребители биват $lang['note_pass'] = 'Паролата ще бъде генерирана автоматично, ако оставите полето празно и функцията за уведомяване на потребителя е включена.'; $lang['add_ok'] = 'Добавянето на потребителя е успешно'; $lang['add_fail'] = 'Добавянето на потребителя се провали'; -$lang['notify_ok'] = 'Осведомително е-писмо бе изпратено'; -$lang['notify_fail'] = 'Пращането на осведомително е-писмо е невъзможно'; +$lang['notify_ok'] = 'Изпратено е осведомително ел. писмо'; +$lang['notify_fail'] = 'Изпращането на осведомително ел. писмо не е възможно'; diff --git a/lib/plugins/usermanager/lang/bg/list.txt b/lib/plugins/usermanager/lang/bg/list.txt index e90205fe6..106856c0e 100644 --- a/lib/plugins/usermanager/lang/bg/list.txt +++ b/lib/plugins/usermanager/lang/bg/list.txt @@ -1 +1 @@ -===== Списък с потребителите ===== +===== Списък на потребителите ===== -- cgit v1.2.3 From 02097e2a6cbd4191438781890d484326aa60af19 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 Apr 2011 09:09:10 +0200 Subject: attach textChanged property to window attempt to fix FS#2196 --- lib/scripts/edit.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index 45c1fb111..eaa3030e9 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -261,7 +261,7 @@ function currentHeadlineLevel(textboxId){ /** * global var used for not saved yet warning */ -var textChanged = false; +window.textChanged = false; /** * Delete the draft before leaving the page @@ -305,14 +305,14 @@ addInitEvent(function (){ } var checkfunc = function(){ - textChanged = true; //global var + window.textChanged = true; //global var summaryCheck(); }; addEvent(editform, 'change', checkfunc); addEvent(editform, 'keydown', checkfunc); window.onbeforeunload = function(){ - if(textChanged) { + if(window.textChanged) { return LANG.notsavedyet; } }; @@ -320,17 +320,17 @@ addInitEvent(function (){ // reset change memory var on submit addEvent($('edbtn__save'), 'click', function(){ - textChanged = false; + window.textChanged = false; }); addEvent($('edbtn__preview'), 'click', function(){ - textChanged = false; + window.textChanged = false; window.keepDraft = true; // needed to keep draft on page unload }); var summary = $('edit__summary'); addEvent(summary, 'change', summaryCheck); addEvent(summary, 'keyup', summaryCheck); - if (textChanged) summaryCheck(); + if (window.textChanged) summaryCheck(); }); /** -- cgit v1.2.3 From 9f09385fc680aa6ef95555c50854d5867ea7831c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 Apr 2011 09:18:10 +0200 Subject: do not strip empty form parameters FS#2222 --- inc/form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/form.php b/inc/form.php index 30e16b626..e74c52c5d 100644 --- a/inc/form.php +++ b/inc/form.php @@ -252,7 +252,7 @@ class Doku_Form { global $lang; $form = ''; $this->params['accept-charset'] = $lang['encoding']; - $form .= '
params,true) . '>
' . DOKU_LF; + $form .= 'params,false) . '>
' . DOKU_LF; if (!empty($this->_hidden)) { foreach ($this->_hidden as $name=>$value) $form .= form_hidden(array('name'=>$name, 'value'=>$value)); -- cgit v1.2.3 From 90f84a7bade2815d67930b18333a327777e22e53 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 17 Apr 2011 10:41:35 +0100 Subject: removed empty id in register form (FS#2222) --- inc/html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/html.php b/inc/html.php index 0774086f9..4c206327d 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1097,7 +1097,7 @@ function html_register(){ $form->startFieldset($lang['btn_register']); $form->addHidden('do', 'register'); $form->addHidden('save', '1'); - $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], null, 'block', array('size'=>'50'))); + $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block', array('size'=>'50'))); if (!$conf['autopasswd']) { $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size'=>'50'))); $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size'=>'50'))); -- cgit v1.2.3 From f24af5915f464b0df29700b68b51a16ac41aeabf Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 17 Apr 2011 11:14:45 +0100 Subject: tiny fixes for xhtml strict --- inc/html.php | 2 +- lib/plugins/config/admin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/html.php b/inc/html.php index 4c206327d..6e187ebe1 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1424,7 +1424,7 @@ function html_admin(){ // data security check // @todo: could be checked and only displayed if $conf['savedir'] is under the web root - echo ' Your data directory seems to be protected properly.'; diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index d245d3fce..e24f3b87b 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -113,7 +113,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { // rewrite config is broken. Add $ID as hidden field to remember // current ID in most cases. ptln(''); - ptln(''); + ptln('
'); formSecurityToken(); $this->_print_h1('dokuwiki_settings', $this->getLang('_header_dokuwiki')); -- cgit v1.2.3 From 7d643c17962849f1c9953b0936b37e8d2175a9d6 Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sun, 17 Apr 2011 16:04:10 +0200 Subject: Trap onbeforeunload when event fired (attempt to fix FS#2196) --- lib/scripts/edit.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js index eaa3030e9..e8a59deb9 100644 --- a/lib/scripts/edit.js +++ b/lib/scripts/edit.js @@ -320,9 +320,11 @@ addInitEvent(function (){ // reset change memory var on submit addEvent($('edbtn__save'), 'click', function(){ + window.onbeforeunload = ''; window.textChanged = false; }); addEvent($('edbtn__preview'), 'click', function(){ + window.onbeforeunload = ''; window.textChanged = false; window.keepDraft = true; // needed to keep draft on page unload }); -- cgit v1.2.3 From f76f425eb307e0ab1a44dc2808da622fd752ae36 Mon Sep 17 00:00:00 2001 From: Yuji TAKENAKA Date: Sun, 17 Apr 2011 16:17:48 +0200 Subject: Japanese update Signed-off-by: Guy Brand --- inc/lang/ja/lang.php | 3 +++ lib/plugins/config/lang/ja/lang.php | 1 + lib/plugins/plugin/lang/ja/lang.php | 1 + lib/plugins/popularity/lang/ja/lang.php | 5 +++++ 4 files changed, 10 insertions(+) diff --git a/inc/lang/ja/lang.php b/inc/lang/ja/lang.php index d503bae31..e8999e05b 100644 --- a/inc/lang/ja/lang.php +++ b/inc/lang/ja/lang.php @@ -158,6 +158,9 @@ $lang['yours'] = 'あなたのバージョン'; $lang['diff'] = '現在のリビジョンとの差分を表示'; $lang['diff2'] = '選択したリビジョン間の差分を表示'; $lang['difflink'] = 'この比較画面にリンクする'; +$lang['diff_type'] = '差分の表示方法:'; +$lang['diff_inline'] = 'インライン'; +$lang['diff_side'] = '横に並べる'; $lang['line'] = 'ライン'; $lang['breadcrumb'] = 'トレース'; $lang['youarehere'] = '現在位置'; diff --git a/lib/plugins/config/lang/ja/lang.php b/lib/plugins/config/lang/ja/lang.php index 9ec416196..35f288b03 100644 --- a/lib/plugins/config/lang/ja/lang.php +++ b/lib/plugins/config/lang/ja/lang.php @@ -106,6 +106,7 @@ $lang['fetchsize'] = '外部からのダウンロード最大サイ $lang['notify'] = '変更を通知するメールアドレス'; $lang['registernotify'] = '新規ユーザー登録を通知するメールアドレス'; $lang['mailfrom'] = 'メール送信時の送信元アドレス'; +$lang['mailprefix'] = '自動メールの題名に使用する接頭語'; $lang['gzip_output'] = 'xhtmlに対するコンテンツ圧縮(gzip)を使用'; $lang['gdlib'] = 'GDlibバージョン'; $lang['im_convert'] = 'ImageMagick変換ツールへのパス'; diff --git a/lib/plugins/plugin/lang/ja/lang.php b/lib/plugins/plugin/lang/ja/lang.php index 0deb420c9..56a827b7e 100644 --- a/lib/plugins/plugin/lang/ja/lang.php +++ b/lib/plugins/plugin/lang/ja/lang.php @@ -53,3 +53,4 @@ $lang['enabled'] = 'プラグイン %s が有効です。'; $lang['notenabled'] = 'プラグイン %s を有効にすることができません。権限を確認してください。'; $lang['disabled'] = 'プラグイン %s が無効です。'; $lang['notdisabled'] = 'プラグイン %s を無効にすることができません。権限を確認してください。'; +$lang['packageinstalled'] = 'プラグインパッケージ(%d plugin%s: %s)は正しくインストールされました。'; diff --git a/lib/plugins/popularity/lang/ja/lang.php b/lib/plugins/popularity/lang/ja/lang.php index 1e0dbdc3f..736924bb1 100644 --- a/lib/plugins/popularity/lang/ja/lang.php +++ b/lib/plugins/popularity/lang/ja/lang.php @@ -9,3 +9,8 @@ */ $lang['name'] = '利用状況調査(ロードに少し時間が掛かります)'; $lang['submit'] = 'データ送信'; +$lang['autosubmit'] = '月に一度は自動的にデータを送付'; +$lang['submissionFailed'] = '次のエラーによりデータが送信できませんでした:'; +$lang['submitDirectly'] = '次のフォームを使ってデータを手動で送信することができます。'; +$lang['autosubmitError'] = '以下のエラーにより最後の自動送信に失敗しました:'; +$lang['lastSent'] = 'データを送信しました。'; -- cgit v1.2.3 From ee379b013d58938f9f5b9372979b40a4d6f58ccf Mon Sep 17 00:00:00 2001 From: Yuji TAKENAKA Date: Sun, 17 Apr 2011 16:38:50 +0200 Subject: Japanese update (missing file) Signed-off-by: Guy Brand --- lib/plugins/popularity/lang/ja/submitted.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 lib/plugins/popularity/lang/ja/submitted.txt diff --git a/lib/plugins/popularity/lang/ja/submitted.txt b/lib/plugins/popularity/lang/ja/submitted.txt new file mode 100644 index 000000000..604f8e55f --- /dev/null +++ b/lib/plugins/popularity/lang/ja/submitted.txt @@ -0,0 +1,3 @@ +====== 利用状況調査 ====== + +データの送信に成功しました。 \ No newline at end of file -- cgit v1.2.3 From 7349aca1eff0f1fce77cdcd87b62e6729867ad82 Mon Sep 17 00:00:00 2001 From: Guy Brand Date: Sun, 17 Apr 2011 16:39:28 +0200 Subject: Don't ignore bundled plugin paths --- .gitignore | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 4fb846732..b96a0554b 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,15 @@ /data/tmp/* /lib/tpl/* /lib/plugins/* +!/lib/plugins/acl +!/lib/plugins/config +!/lib/plugins/info +!/lib/plugins/plugin +!/lib/plugins/popularity +!/lib/plugins/revert +!/lib/plugins/safefnrecode +!/lib/plugins/usermanager +!/lib/plugins/action.php +!/lib/plugins/admin.php +!/lib/plugins/index.html +!/lib/plugins/syntax.php -- cgit v1.2.3 From 53b4f65b95e301c1dbd4894b6b26d85bba94d289 Mon Sep 17 00:00:00 2001 From: Shuo-Ting Jian Date: Sun, 17 Apr 2011 20:29:39 +0200 Subject: Traditional Chinese update --- lib/plugins/plugin/lang/zh-tw/lang.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/plugins/plugin/lang/zh-tw/lang.php b/lib/plugins/plugin/lang/zh-tw/lang.php index 77e692fcf..54234212d 100644 --- a/lib/plugins/plugin/lang/zh-tw/lang.php +++ b/lib/plugins/plugin/lang/zh-tw/lang.php @@ -54,3 +54,4 @@ $lang['enabled'] = '插件 %s 已啟用。'; $lang['notenabled'] = '插件 %s 無法啟用,請檢查檔案權限。'; $lang['disabled'] = '插件 %s 已停用。'; $lang['notdisabled'] = '插件 %s 無法停用,請檢查檔案權限。'; +$lang['packageinstalled'] = '插件 (%d 插件%s: %s) 已成功地安裝。'; -- cgit v1.2.3 From 342e58c8c048bfd5f57f10bd88cee95aa2732e96 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 Apr 2011 22:39:21 +0200 Subject: correctly disable unfinished media options popup We disabled the media options shortly before the last release because of an unfixed bug. The disabling was not complete which caused problems with templates not incorporating the needed CSS. Since the option dialog hasn't been fixed yet, this patch also disables the creation of the corresponding HTML to avoid the mentioned template problems. --- lib/scripts/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 57f599163..530e93055 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -774,6 +774,6 @@ addInitEvent(function(){ media_manager.selectorattach($('media__content')); media_manager.confirmattach($('media__content')); media_manager.attachoptions($('media__opts')); - media_manager.initpopup(); + //media_manager.initpopup(); media_manager.initFlashUpload(); }); -- cgit v1.2.3 From 1ffa31036850f608129920b6c088ce3c73be2cd1 Mon Sep 17 00:00:00 2001 From: Kate Arzamastseva Date: Mon, 18 Apr 2011 00:11:10 +0300 Subject: Ukrainian language update --- inc/lang/uk/lang.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/inc/lang/uk/lang.php b/inc/lang/uk/lang.php index e5f14879f..7bda02501 100644 --- a/inc/lang/uk/lang.php +++ b/inc/lang/uk/lang.php @@ -8,6 +8,7 @@ * @author Oleksandr Kunytsia * @author Uko * @author Ulrikhe Lukoie + * @author Kate Arzamastseva pshns@ukr.net */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -42,7 +43,7 @@ $lang['btn_backlink'] = 'Посилання сюди'; $lang['btn_backtomedia'] = 'Назад до вибору медіа-файлу'; $lang['btn_subscribe'] = 'Підписатися'; $lang['btn_profile'] = 'Оновити профіль'; -$lang['btn_reset'] = 'Очисти'; +$lang['btn_reset'] = 'Очистити'; $lang['btn_resendpwd'] = 'Надіслати новий пароль'; $lang['btn_draft'] = 'Редагувати чернетку'; $lang['btn_recover'] = 'Відновити чернетку'; @@ -107,11 +108,11 @@ $lang['js']['mediatarget'] = 'Ціль посилання'; $lang['js']['mediaclose'] = 'Закрити'; $lang['js']['mediainsert'] = 'Вставити'; $lang['js']['mediadisplayimg'] = 'Показати зображення.'; -$lang['js']['mediadisplaylnk'] = 'Показати тілки посилання.'; -$lang['js']['mediasmall'] = 'Зменшена версіяЁ'; +$lang['js']['mediadisplaylnk'] = 'Показати тільки посилання.'; +$lang['js']['mediasmall'] = 'Зменшена версія'; $lang['js']['mediamedium'] = 'Середня версія'; $lang['js']['medialarge'] = 'Велика версія'; -$lang['js']['mediaoriginal'] = 'Оигінальна версія'; +$lang['js']['mediaoriginal'] = 'Оригінальна версія'; $lang['js']['medialnk'] = 'Посилання на сторінку з описом'; $lang['js']['mediadirect'] = 'Пряме посилання на оригінал'; $lang['js']['medianolnk'] = 'Немає посилання'; @@ -160,6 +161,9 @@ $lang['yours'] = 'Ваша версія'; $lang['diff'] = 'показати відмінності від поточної версії'; $lang['diff2'] = 'Показати відмінності між вибраними версіями'; $lang['difflink'] = 'Посилання на цей список змін'; +$lang['diff_type'] = 'Переглянути відмінності:'; +$lang['diff_inline'] = 'Вбудувати'; +$lang['diff_side'] = 'Поряд'; $lang['line'] = 'Рядок'; $lang['breadcrumb'] = 'Відвідано'; $lang['youarehere'] = 'Ви тут'; @@ -219,9 +223,9 @@ $lang['img_camera'] = 'Камера'; $lang['img_keywords'] = 'Ключові слова'; $lang['subscr_subscribe_success'] = 'Додано %s до списку підписки для %s'; $lang['subscr_subscribe_error'] = 'Помилка при додавані %s до списку підписки для %s'; -$lang['subscr_subscribe_noaddress'] = 'Немає адреси, асоційованої з Вашим логіном, тому Ві не можете бути додані до списку підписки.'; +$lang['subscr_subscribe_noaddress'] = 'Немає адреси, асоційованої з Вашим логіном, тому Ви не можете бути додані до списку підписки.'; $lang['subscr_unsubscribe_success'] = 'Видалено %s із списку підписки для %s'; -$lang['subscr_unsubscribe_error'] = 'Помилка при видаленні %s із списку підписки для %s'; +$lang['subscr_unsubscribe_error'] = 'Помилка при видаленні %s зі списку підписки для %s'; $lang['subscr_already_subscribed'] = '%s вже підписаний до %s'; $lang['subscr_not_subscribed'] = '%s не підписаний до %s'; $lang['subscr_m_not_subscribed'] = 'Ви зараз не підписані до цієї сторінки або простору імен.'; @@ -230,9 +234,9 @@ $lang['subscr_m_current_header'] = 'Поточні підписки'; $lang['subscr_m_unsubscribe'] = 'Відписатися'; $lang['subscr_m_subscribe'] = 'Підписатися'; $lang['subscr_m_receive'] = 'Отримувати'; -$lang['subscr_style_every'] = 'пошту про кожну зміну'; +$lang['subscr_style_every'] = 'повідомляти на пошту про кожну зміну'; $lang['subscr_style_digest'] = 'лист з дайджестом для зміни кожної сторінки (кожні %.2f днів)'; -$lang['subscr_style_list'] = 'список змінених сторінок від часу отримання останньоголиста (кожні %.2f днів)'; +$lang['subscr_style_list'] = 'список змінених сторінок від часу отримання останнього листа (кожні %.2f днів)'; $lang['authmodfailed'] = 'Неправильна настройка автентифікації користувача. Будь ласка, повідомте про це адміністратора.'; $lang['authtempfail'] = 'Автентифікація користувача тимчасово не доступна. Якщо це буде продовжуватись, будь ласка, повідомте адміністратора.'; $lang['i_chooselang'] = 'Виберіть мову'; -- cgit v1.2.3 From 058f1c3e98b1437a691cc77a36002dee1c41f007 Mon Sep 17 00:00:00 2001 From: Kate Arzamastseva Date: Mon, 18 Apr 2011 00:19:20 +0300 Subject: Ukrainian language update --- lib/plugins/config/lang/uk/lang.php | 4 +++- lib/plugins/plugin/lang/uk/lang.php | 6 ++++-- lib/plugins/popularity/lang/uk/lang.php | 6 ++++++ lib/plugins/revert/lang/uk/lang.php | 3 ++- lib/plugins/usermanager/lang/uk/edit.txt | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/lib/plugins/config/lang/uk/lang.php b/lib/plugins/config/lang/uk/lang.php index f98e9463c..aa1720966 100644 --- a/lib/plugins/config/lang/uk/lang.php +++ b/lib/plugins/config/lang/uk/lang.php @@ -9,6 +9,7 @@ * @author Oleksandr Kunytsia * @author Uko uko@uar.net * @author Ulrikhe Lukoie .com + * @author Kate Arzamastseva pshns@ukr.net */ $lang['menu'] = 'Настройка конфігурації'; $lang['error'] = 'Параметри не збережено через помилкові значення. Будь ласка, перегляньте ваші зміни та спробуйте ще раз @@ -107,6 +108,7 @@ $lang['fetchsize'] = 'Максимальний розмір (в ба $lang['notify'] = 'E-mail для сповіщень'; $lang['registernotify'] = 'Надсилати інформацію про нових користувачів на цю адресу'; $lang['mailfrom'] = 'E-mail для автоматичних повідомлень'; +$lang['mailprefix'] = 'Префікс теми повідомлення, що використовується в автоматичній розсилці електронних листів'; $lang['gzip_output'] = 'Використовувати gzip, як Content-Encoding для xhtml'; $lang['gdlib'] = 'Версія GD Lib'; $lang['im_convert'] = 'Шлях до ImageMagick'; @@ -187,4 +189,4 @@ $lang['useheading_o_0'] = 'Ніколи'; $lang['useheading_o_navigation'] = 'Лише для навігації'; $lang['useheading_o_content'] = 'Лише у змісті'; $lang['useheading_o_1'] = 'Завжди'; -$lang['readdircache'] = 'Макссимальний вік для файлів кешу (сек.)'; +$lang['readdircache'] = 'Максимальний вік для файлів кешу (сек.)'; diff --git a/lib/plugins/plugin/lang/uk/lang.php b/lib/plugins/plugin/lang/uk/lang.php index c5bab816f..69ee9ded1 100644 --- a/lib/plugins/plugin/lang/uk/lang.php +++ b/lib/plugins/plugin/lang/uk/lang.php @@ -9,13 +9,14 @@ * @author Oleksandr Kunytsia * @author Uko uko@uar.net * @author Ulrikhe Lukoie .com + * @author Kate Arzamastseva pshns@ukr.net */ $lang['menu'] = 'Керування доданками'; $lang['download'] = 'Завантажити та встановити новий доданок'; $lang['manage'] = 'Встановлені доданки'; $lang['btn_info'] = 'дані'; $lang['btn_update'] = 'оновити'; -$lang['btn_delete'] = 'вилучити'; +$lang['btn_delete'] = 'видалити'; $lang['btn_settings'] = 'параметри'; $lang['btn_download'] = 'Завантажити'; $lang['btn_enable'] = 'Зберегти'; @@ -49,8 +50,9 @@ $lang['error_badurl'] = 'Можливо, невірна адреса - $lang['error_dircreate'] = 'Не можливо створити тимчасову папку для завантаження'; $lang['error_decompress'] = 'Менеджеру доданків не вдалося розпакувати завантажений файл. Це може бути результатом помилки при завантаженні, в цьому разі ви можете спробувати знову; або ж доданок упакований невідомим архіватором, тоді вам необхідно завантажити та встановити доданок вручну.'; $lang['error_copy'] = 'Виникла помилка копіювання при спробі установки файлів для доданка %s: переповнення диску або невірні права доступу. Це могло привести до часткової установки доданка и нестійкості вашої Вікі.'; -$lang['error_delete'] = 'При спробі вилучення доданка %s виникла помилка. Найбільш вірогідно, що немає необхідних прав доступу до файлів або тек'; +$lang['error_delete'] = 'При спробі вилучення доданка %s виникла помилка. Найбільш вірогідно, що немає необхідних прав доступу до файлів або директорії'; $lang['enabled'] = 'Доданок %s увімкнено.'; $lang['notenabled'] = 'Не вдається увімкнути доданок %s. Перевірте права доступу до файлу.'; $lang['disabled'] = 'Доданок %s вимкнено.'; $lang['notdisabled'] = 'Не вдається вимкнути доданок %s. Перевірте права доступу до файлу.'; +$lang['packageinstalled'] = 'Пакет плагінів (%d plugin%s: %s) успішно встановлений.'; diff --git a/lib/plugins/popularity/lang/uk/lang.php b/lib/plugins/popularity/lang/uk/lang.php index 157944fe4..584641482 100644 --- a/lib/plugins/popularity/lang/uk/lang.php +++ b/lib/plugins/popularity/lang/uk/lang.php @@ -7,6 +7,12 @@ * @author Oleksandr Kunytsia * @author Uko uko@uar.net * @author Ulrikhe Lukoie .com + * @author Kate Arzamastseva pshns@ukr.net */ $lang['name'] = 'Відгук популярності (може зайняти деякий час)'; $lang['submit'] = 'Передати дані'; +$lang['autosubmit'] = 'Автоматично надсилати дані один раз на місяць'; +$lang['submissionFailed'] = 'Дані не можуть бути відправлені через таку помилку:'; +$lang['submitDirectly'] = 'Ви можете надіслати дані вручну, відправивши наступну форму.'; +$lang['autosubmitError'] = 'Останнє автоматичне відправлення не вдалося через таку помилку:'; +$lang['lastSent'] = 'Дані були відправлені'; diff --git a/lib/plugins/revert/lang/uk/lang.php b/lib/plugins/revert/lang/uk/lang.php index ffc394f43..310f8e8da 100644 --- a/lib/plugins/revert/lang/uk/lang.php +++ b/lib/plugins/revert/lang/uk/lang.php @@ -7,13 +7,14 @@ * @author Oleksandr Kunytsia * @author Uko uko@uar.net * @author Ulrikhe Lukoie .com + * @author Kate Arzamastseva pshns@ukr.net */ $lang['menu'] = 'Менеджер відновлення'; $lang['filter'] = 'Пошук спамних сторінок'; $lang['revert'] = 'Відновити обрані сторінки'; $lang['reverted'] = '%s відновлено до версії %s'; $lang['removed'] = '%s вилучено'; -$lang['revstart'] = 'Розпочато процес відновлення. Це може зайняти багато часу. Якщо скрипт закінчує роботу по таймауту, необхідно відновлювати меншими частинами.'; +$lang['revstart'] = 'Розпочато процес відновлення. Це може зайняти багато часу. Якщо скрипт не закінчує роботу до таймауту, необхідно відновлювати меншими частинами.'; $lang['revstop'] = 'Процес відновлення успішно закінчено.'; $lang['note1'] = 'Увага: пошук залежить від регістру символів'; $lang['note2'] = 'Увага: сторінку буде відновлено до останньої версії, яка не містить спамерського терміну %s.'; diff --git a/lib/plugins/usermanager/lang/uk/edit.txt b/lib/plugins/usermanager/lang/uk/edit.txt index e359f748c..efc84be89 100644 --- a/lib/plugins/usermanager/lang/uk/edit.txt +++ b/lib/plugins/usermanager/lang/uk/edit.txt @@ -1 +1 @@ -===== Змінити користувача ===== +===== Редагувати користувача ===== -- cgit v1.2.3 From 1f663d37c117a05d8343a100b7fac1736d24512c Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 18 Apr 2011 20:23:08 +0200 Subject: Revert "correctly disable unfinished media options popup" This reverts commit 342e58c8c048bfd5f57f10bd88cee95aa2732e96. The options code had already been fixed. My mistake. --- lib/scripts/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scripts/media.js b/lib/scripts/media.js index 530e93055..57f599163 100644 --- a/lib/scripts/media.js +++ b/lib/scripts/media.js @@ -774,6 +774,6 @@ addInitEvent(function(){ media_manager.selectorattach($('media__content')); media_manager.confirmattach($('media__content')); media_manager.attachoptions($('media__opts')); - //media_manager.initpopup(); + media_manager.initpopup(); media_manager.initFlashUpload(); }); -- cgit v1.2.3 From 02172c3b15bc80599e0aed20ff88bcdd6704edf6 Mon Sep 17 00:00:00 2001 From: Aivars Miska Date: Tue, 19 Apr 2011 21:26:19 +0200 Subject: Latvian language update --- inc/lang/lv/lang.php | 3 +++ lib/plugins/config/lang/lv/lang.php | 1 + lib/plugins/popularity/lang/lv/lang.php | 5 +++++ lib/plugins/popularity/lang/lv/submitted.txt | 3 +++ 4 files changed, 12 insertions(+) create mode 100644 lib/plugins/popularity/lang/lv/submitted.txt diff --git a/inc/lang/lv/lang.php b/inc/lang/lv/lang.php index 73559c0f8..519ca231a 100644 --- a/inc/lang/lv/lang.php +++ b/inc/lang/lv/lang.php @@ -156,6 +156,9 @@ $lang['yours'] = 'Tava versija'; $lang['diff'] = 'atšķirības no patreizējas versijas'; $lang['diff2'] = 'norādīto versiju atšķirības'; $lang['difflink'] = 'Saite uz salīdzināšanas skatu.'; +$lang['diff_type'] = 'Skatīt atšķirības:'; +$lang['diff_inline'] = 'Iekļauti'; +$lang['diff_side'] = 'Blakus'; $lang['line'] = 'Rinda'; $lang['breadcrumb'] = 'Ceļš'; $lang['youarehere'] = 'Tu atrodies šeit'; diff --git a/lib/plugins/config/lang/lv/lang.php b/lib/plugins/config/lang/lv/lang.php index 64c828f77..bedb1c465 100644 --- a/lib/plugins/config/lang/lv/lang.php +++ b/lib/plugins/config/lang/lv/lang.php @@ -101,6 +101,7 @@ $lang['fetchsize'] = 'Maksimālais faila apjoms baitos, ko fetch.php $lang['notify'] = 'Nosūtīt izmaiņu paziņojumu uz epasta adresi'; $lang['registernotify'] = 'Nosūtīt paziņojumu par jauniem lietotājiem uz epasta adresi'; $lang['mailfrom'] = 'Epasta adrese automātiskajiem paziņojumiem'; +$lang['mailprefix'] = 'E-pasta temata prefikss automātiskajiem paziņojumiem'; $lang['gzip_output'] = 'Lietot gzip Content-Encoding priekš xhtml'; $lang['gdlib'] = 'GD Lib versija'; $lang['im_convert'] = 'Ceļš uz ImageMagick convert rīku'; diff --git a/lib/plugins/popularity/lang/lv/lang.php b/lib/plugins/popularity/lang/lv/lang.php index 7dba689e0..f0c940b6f 100644 --- a/lib/plugins/popularity/lang/lv/lang.php +++ b/lib/plugins/popularity/lang/lv/lang.php @@ -6,3 +6,8 @@ */ $lang['name'] = 'Popularitātes atsauksmes (ielāde var aizņemt kādu laiku)'; $lang['submit'] = 'Nosūtīt datus'; +$lang['autosubmit'] = 'Automātiski reizi mēnesī nosūtīt datus'; +$lang['submissionFailed'] = 'Datus nevar nosūtīt kļūdas dēļ:'; +$lang['submitDirectly'] = 'Jūs pats varat pats nosūtīt datus no šīs veidlapas.'; +$lang['autosubmitError'] = 'Pēdējā automātiskā nosūtīšana kļūdas dēļ:'; +$lang['lastSent'] = 'Dati nosūtīti'; diff --git a/lib/plugins/popularity/lang/lv/submitted.txt b/lib/plugins/popularity/lang/lv/submitted.txt new file mode 100644 index 000000000..c31338abf --- /dev/null +++ b/lib/plugins/popularity/lang/lv/submitted.txt @@ -0,0 +1,3 @@ +====== Popularitātes atsauksmes ====== + +Dati veiksmīgi nosūtīti \ No newline at end of file -- cgit v1.2.3 From c9fc06d99a8741235f5c7cf63e7f67ea6fbc0139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tihanyi=20S=C3=A1ndor?= Date: Tue, 19 Apr 2011 21:30:59 +0200 Subject: Hungarian language update --- inc/lang/hu/lang.php | 4 ++++ lib/plugins/acl/lang/hu/lang.php | 2 +- lib/plugins/config/lang/hu/lang.php | 2 +- lib/plugins/plugin/lang/hu/lang.php | 3 ++- lib/plugins/popularity/lang/hu/lang.php | 7 ++++++- lib/plugins/popularity/lang/hu/submitted.txt | 3 +++ lib/plugins/revert/lang/hu/lang.php | 2 +- lib/plugins/usermanager/lang/hu/lang.php | 2 +- 8 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 lib/plugins/popularity/lang/hu/submitted.txt diff --git a/inc/lang/hu/lang.php b/inc/lang/hu/lang.php index fc21d1c8b..52422b53c 100644 --- a/inc/lang/hu/lang.php +++ b/inc/lang/hu/lang.php @@ -8,6 +8,7 @@ * @author Siaynoq Mage * @author schilling.janos@gmail.com * @author Szabó Dávid + * @author Sándor TIHANYI */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -160,6 +161,9 @@ $lang['yours'] = 'A te változatod'; $lang['diff'] = 'a különbségeket mutatja az aktuális változathoz képest'; $lang['diff2'] = 'a különbségeket mutatja a kiválasztott változatok között'; $lang['difflink'] = 'Összehasonlító nézet linkje'; +$lang['diff_type'] = 'Összehasonlítás módja:'; +$lang['diff_inline'] = 'Sorok között'; +$lang['diff_side'] = 'Kétoldalas'; $lang['line'] = 'sorszám'; $lang['breadcrumb'] = 'Nyomvonal'; $lang['youarehere'] = 'Itt vagy'; diff --git a/lib/plugins/acl/lang/hu/lang.php b/lib/plugins/acl/lang/hu/lang.php index 318287073..30401b315 100644 --- a/lib/plugins/acl/lang/hu/lang.php +++ b/lib/plugins/acl/lang/hu/lang.php @@ -5,8 +5,8 @@ * @author Sandor TIHANYI * @author Siaynoq Mage * @author schilling.janos@gmail.com - * @author Szabó Dávid (szabo.david@gyumolcstarhely.hu) * @author Szabó Dávid + * @author Sándor TIHANYI */ $lang['admin_acl'] = 'Hozzáférési lista (ACL) kezelő'; $lang['acl_group'] = 'Csoport:'; diff --git a/lib/plugins/config/lang/hu/lang.php b/lib/plugins/config/lang/hu/lang.php index 47c1e67c7..54317e39c 100644 --- a/lib/plugins/config/lang/hu/lang.php +++ b/lib/plugins/config/lang/hu/lang.php @@ -5,8 +5,8 @@ * @author Sandor TIHANYI * @author Siaynoq Mage * @author schilling.janos@gmail.com - * @author Szabó Dávid (szabo.david@gyumolcstarhely.hu) * @author Szabó Dávid + * @author Sándor TIHANYI */ $lang['menu'] = 'Beállító Központ'; $lang['error'] = 'Helytelen érték miatt a módosítások nem mentődtek. Nézd át a módosításokat, és ments újra. diff --git a/lib/plugins/plugin/lang/hu/lang.php b/lib/plugins/plugin/lang/hu/lang.php index 32242ece9..f2ad8c713 100644 --- a/lib/plugins/plugin/lang/hu/lang.php +++ b/lib/plugins/plugin/lang/hu/lang.php @@ -5,8 +5,8 @@ * @author Sandor TIHANYI * @author Siaynoq Mage * @author schilling.janos@gmail.com - * @author Szabó Dávid (szabo.david@gyumolcstarhely.hu) * @author Szabó Dávid + * @author Sándor TIHANYI */ $lang['menu'] = 'Bővítménykezelő'; $lang['download'] = 'Új bővítmény letöltése és telepítése'; @@ -52,3 +52,4 @@ $lang['enabled'] = 'A(z) %s bővítmény bekapcsolva.'; $lang['notenabled'] = 'A(z) %s bővítmény engedélyezése nem sikerült. Ellenőrizze a fájl-hozzáférési engedélyeket.'; $lang['disabled'] = 'A(z) %s bővítmény kikapcsolva.'; $lang['notdisabled'] = 'A(z) %s bővítmény kikapcsolása nem sikerült. Ellenőrizze a fájl-hozzáférési engedélyeket.'; +$lang['packageinstalled'] = 'A bővítmény csomag(ok) feltelepült(ek): %d plugin%s: %s'; diff --git a/lib/plugins/popularity/lang/hu/lang.php b/lib/plugins/popularity/lang/hu/lang.php index d1510ed75..fbd554d0d 100644 --- a/lib/plugins/popularity/lang/hu/lang.php +++ b/lib/plugins/popularity/lang/hu/lang.php @@ -5,8 +5,13 @@ * @author Sandor TIHANYI * @author Siaynoq Mage * @author schilling.janos@gmail.com - * @author Szabó Dávid (szabo.david@gyumolcstarhely.hu) * @author Szabó Dávid + * @author Sándor TIHANYI */ $lang['name'] = 'Visszajelzés a DokuWiki használatáról (sok időt vehet igénybe a betöltése)'; $lang['submit'] = 'Adatok elküldése'; +$lang['autosubmit'] = 'Adatok havonkénti automatikus elküldése.'; +$lang['submissionFailed'] = 'Az adatok a következő hiba miatt nem kerültek elküldésre:'; +$lang['submitDirectly'] = 'Az adatokat a következő űrlap segítségével lehet elküldeni.'; +$lang['autosubmitError'] = 'Az adatok a következő hiba miatt nem kerültek automatikusan elküldésre:'; +$lang['lastSent'] = 'Az adatokat elküldtük.'; diff --git a/lib/plugins/popularity/lang/hu/submitted.txt b/lib/plugins/popularity/lang/hu/submitted.txt new file mode 100644 index 000000000..30ab8bd8e --- /dev/null +++ b/lib/plugins/popularity/lang/hu/submitted.txt @@ -0,0 +1,3 @@ +====== Visszajelzés a DokuWiki használatáról ====== + +Az adatokat sikeresen elküldtük. \ No newline at end of file diff --git a/lib/plugins/revert/lang/hu/lang.php b/lib/plugins/revert/lang/hu/lang.php index 6cbdf3643..7add3014d 100644 --- a/lib/plugins/revert/lang/hu/lang.php +++ b/lib/plugins/revert/lang/hu/lang.php @@ -5,8 +5,8 @@ * @author Sandor TIHANYI * @author Siaynoq Mage * @author schilling.janos@gmail.com - * @author Szabó Dávid (szabo.david@gyumolcstarhely.hu) * @author Szabó Dávid + * @author Sándor TIHANYI */ $lang['menu'] = 'Visszaállítás kezelő (anti-SPAM)'; $lang['filter'] = 'SPAM tartalmú oldalak keresése'; diff --git a/lib/plugins/usermanager/lang/hu/lang.php b/lib/plugins/usermanager/lang/hu/lang.php index 7b22dfb48..c3914b24d 100644 --- a/lib/plugins/usermanager/lang/hu/lang.php +++ b/lib/plugins/usermanager/lang/hu/lang.php @@ -5,8 +5,8 @@ * @author Sandor TIHANYI * @author Siaynoq Mage * @author schilling.janos@gmail.com - * @author Szabó Dávid (szabo.david@gyumolcstarhely.hu) * @author Szabó Dávid + * @author Sándor TIHANYI */ $lang['menu'] = 'Felhasználók kezelése'; $lang['noauth'] = '(A felhasználói azonosítás nem működik.)'; -- cgit v1.2.3 From 93475e69b36ecdf63d7890948b96e29a9bbda4a4 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Wed, 20 Apr 2011 16:02:16 +0200 Subject: Enable metadata rendering in the indexer Metadata is rendered now in the indexer when it's cache is invalid. --- inc/indexer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/indexer.php b/inc/indexer.php index 1db966656..714feb4f7 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -1191,7 +1191,7 @@ function idx_addPage($page, $verbose=false) { @unlink($idxtag); return $result; } - $indexenabled = p_get_metadata($page, 'internal index', false); + $indexenabled = p_get_metadata($page, 'internal index', true); if ($indexenabled === false) { $result = false; if (@file_exists($idxtag)) { @@ -1209,8 +1209,8 @@ function idx_addPage($page, $verbose=false) { $body = ''; $metadata = array(); - $metadata['title'] = p_get_metadata($page, 'title', false); - if (($references = p_get_metadata($page, 'relation references', false)) !== null) + $metadata['title'] = p_get_metadata($page, 'title', true); + if (($references = p_get_metadata($page, 'relation references', true)) !== null) $metadata['relation_references'] = array_keys($references); else $metadata['relation_references'] = array(); -- cgit v1.2.3 From 30d5f023681653193648e9997dded12bbdcb3623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Campos?= Date: Wed, 20 Apr 2011 21:12:42 +0200 Subject: Portuguese language update --- inc/lang/pt/lang.php | 2 ++ lib/plugins/acl/lang/pt/lang.php | 1 + lib/plugins/config/lang/pt/lang.php | 1 + lib/plugins/plugin/lang/pt/lang.php | 2 ++ lib/plugins/popularity/lang/pt/lang.php | 2 ++ lib/plugins/revert/lang/pt/lang.php | 1 + lib/plugins/usermanager/lang/pt/lang.php | 1 + 7 files changed, 10 insertions(+) diff --git a/inc/lang/pt/lang.php b/inc/lang/pt/lang.php index 976077d40..41406ee60 100644 --- a/inc/lang/pt/lang.php +++ b/inc/lang/pt/lang.php @@ -8,6 +8,7 @@ * @author Enrico Nicoletto * @author Fil * @author André Neves + * @author José Campos zecarlosdecampos@gmail.com */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -161,6 +162,7 @@ $lang['diff'] = 'mostrar diferenças com a versão actual'; $lang['diff2'] = 'mostrar diferenças entre versões escolhidas'; $lang['difflink'] = 'Ligação para esta vista de comparação'; $lang['diff_type'] = 'Ver diferenças'; +$lang['diff_inline'] = 'Embutido'; $lang['diff_side'] = 'Lado a lado'; $lang['line'] = 'Linha'; $lang['breadcrumb'] = 'Está em'; diff --git a/lib/plugins/acl/lang/pt/lang.php b/lib/plugins/acl/lang/pt/lang.php index 6e094fd74..d90bab624 100644 --- a/lib/plugins/acl/lang/pt/lang.php +++ b/lib/plugins/acl/lang/pt/lang.php @@ -8,6 +8,7 @@ * @author Enrico Nicoletto * @author Fil * @author André Neves + * @author José Campos zecarlosdecampos@gmail.com */ $lang['admin_acl'] = 'Gestão de ACLs'; $lang['acl_group'] = 'Grupo'; diff --git a/lib/plugins/config/lang/pt/lang.php b/lib/plugins/config/lang/pt/lang.php index c0ada0a26..7f5eb9971 100644 --- a/lib/plugins/config/lang/pt/lang.php +++ b/lib/plugins/config/lang/pt/lang.php @@ -6,6 +6,7 @@ * @author Enrico Nicoletto * @author Fil * @author André Neves + * @author José Campos zecarlosdecampos@gmail.com */ $lang['menu'] = 'Configuração'; $lang['error'] = 'Parâmetros de Configuração não actualizados devido a valores inválidos. Por favor, reveja as modificações que pretende efectuar antes de re-submetê-las.
Os valores incorrectos serão mostrados dentro de uma "moldura" vermelha.'; diff --git a/lib/plugins/plugin/lang/pt/lang.php b/lib/plugins/plugin/lang/pt/lang.php index 3e9e6ae04..1567741f9 100644 --- a/lib/plugins/plugin/lang/pt/lang.php +++ b/lib/plugins/plugin/lang/pt/lang.php @@ -6,6 +6,7 @@ * @author Enrico Nicoletto * @author Fil * @author André Neves + * @author José Campos zecarlosdecampos@gmail.com */ $lang['menu'] = 'Gerir Plugins'; $lang['download'] = 'Descarregar e instalar um novo plugin'; @@ -51,3 +52,4 @@ $lang['enabled'] = 'Plugin %s habilitado.'; $lang['notenabled'] = 'Plugin %s não pôde ser habilitado, verifique as permissões.'; $lang['disabled'] = 'Plugin %s desabilitado.'; $lang['notdisabled'] = 'Plugin %s não pôde ser desabilitado, verifique as permissões.'; +$lang['packageinstalled'] = 'Pacote de Plugins (%d plugin%s: %s) instalado com sucesso.'; diff --git a/lib/plugins/popularity/lang/pt/lang.php b/lib/plugins/popularity/lang/pt/lang.php index 35fac0fc0..ac27dc8c0 100644 --- a/lib/plugins/popularity/lang/pt/lang.php +++ b/lib/plugins/popularity/lang/pt/lang.php @@ -5,10 +5,12 @@ * @author Enrico Nicoletto * @author Fil * @author André Neves + * @author José Campos zecarlosdecampos@gmail.com */ $lang['name'] = 'Retorno (feedback) de Popularidade (pode levar algum tempo a carregar)'; $lang['submit'] = 'Enviar Dados'; $lang['autosubmit'] = 'Enviar dados automáticamente uma vez por mês'; $lang['submissionFailed'] = 'Os dados não foram enviados devido ao seguinte erro:'; $lang['submitDirectly'] = 'Pode enviar os dados manualmente, submetendo o seguinte formulário.'; +$lang['autosubmitError'] = 'A última auto-submissão falhou, por causa do seguinte erro:'; $lang['lastSent'] = 'Os dados foram enviados'; diff --git a/lib/plugins/revert/lang/pt/lang.php b/lib/plugins/revert/lang/pt/lang.php index 4ad114efe..3b2850f41 100644 --- a/lib/plugins/revert/lang/pt/lang.php +++ b/lib/plugins/revert/lang/pt/lang.php @@ -6,6 +6,7 @@ * @author Enrico Nicoletto * @author Fil * @author André Neves + * @author José Campos zecarlosdecampos@gmail.com */ $lang['menu'] = 'Gestor de Reversões'; $lang['filter'] = 'Pesquisar por páginas "spammy"'; diff --git a/lib/plugins/usermanager/lang/pt/lang.php b/lib/plugins/usermanager/lang/pt/lang.php index 8c4607922..6d0d85e38 100644 --- a/lib/plugins/usermanager/lang/pt/lang.php +++ b/lib/plugins/usermanager/lang/pt/lang.php @@ -6,6 +6,7 @@ * @author Enrico Nicoletto * @author Fil * @author André Neves + * @author José Campos zecarlosdecampos@gmail.com */ $lang['menu'] = 'Gestor de Perfis'; $lang['noauth'] = '(autenticação indisponível)'; -- cgit v1.2.3 From 4b1755bd15d9e5427c81f638e2b06d4716cd8642 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Thu, 21 Apr 2011 09:18:05 +0200 Subject: Make locktimer more robust If no HTML element with the id wiki__text exists, locktimer.init led to a JavaScript error. --- lib/exe/js.php | 2 +- lib/scripts/locktimer.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/exe/js.php b/lib/exe/js.php index 645ab3cc4..5f376ee24 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -113,7 +113,7 @@ function js_out(){ js_runonstart("initSizeCtl('size__ctl','wiki__text')"); js_runonstart("initToolbar('tool__bar','wiki__text',toolbar)"); if($conf['locktime'] != 0){ - js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].")"); + js_runonstart("locktimer.init(".($conf['locktime'] - 60).",'".js_escape($lang['willexpire'])."',".$conf['usedraft'].", 'wiki__text')"); } js_runonstart('scrollToMarker()'); js_runonstart('focusMarker()'); diff --git a/lib/scripts/locktimer.js b/lib/scripts/locktimer.js index f5ba1c60d..0db7d2b15 100644 --- a/lib/scripts/locktimer.js +++ b/lib/scripts/locktimer.js @@ -9,7 +9,11 @@ var locktimer = { msg: '', pageid: '', - init: function(timeout,msg,draft){ + init: function(timeout,msg,draft,edid){ + var edit = $(edid); + if(!edit) return; + if(edit.readOnly) return; + // init values locktimer.timeout = timeout*1000; locktimer.msg = msg; @@ -19,7 +23,6 @@ var locktimer = { if(!$('dw__editform')) return; locktimer.pageid = $('dw__editform').elements.id.value; if(!locktimer.pageid) return; - if($('wiki__text').readOnly) return; // init ajax component locktimer.sack = new sack(DOKU_BASE + 'lib/exe/ajax.php'); -- cgit v1.2.3 From 9bd9209784da464af4591c41fe065dbf0415e75f Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Thu, 21 Apr 2011 17:29:01 +0200 Subject: Fix HTML in DifferenceEngine tests --- _test/cases/inc/DifferenceEngine.test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_test/cases/inc/DifferenceEngine.test.php b/_test/cases/inc/DifferenceEngine.test.php index 294f0e6e3..aa1756114 100644 --- a/_test/cases/inc/DifferenceEngine.test.php +++ b/_test/cases/inc/DifferenceEngine.test.php @@ -22,7 +22,7 @@ class differenceengine_test extends UnitTestCase { '); $this->assertEqual($tdf->format($df), '
-     + '); -- cgit v1.2.3 From 23d27376b2a2f6a1ccf0777c48435717494d85b1 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 22 Apr 2011 22:29:45 +0200 Subject: Release preparations --- data/deleted.files | 3 +++ doku.php | 2 +- install.php | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/data/deleted.files b/data/deleted.files index 4d6f31dbf..e154ce179 100644 --- a/data/deleted.files +++ b/data/deleted.files @@ -4,6 +4,9 @@ # A copy of this list is maintained at # http://www.dokuwiki.org/install:upgrade#files_to_remove +# removed in rc2011-04-22 +conf/words.aspell.dist +lib/styles/style.css # removed in 2010-11-07 inc/lang/ar/subscribermail.txt diff --git a/doku.php b/doku.php index dc5e0ec66..3e038e3e3 100644 --- a/doku.php +++ b/doku.php @@ -7,7 +7,7 @@ */ // update message version -$updateVersion = 30; +$updateVersion = 31; // xdebug_start_profiling(); diff --git a/install.php b/install.php index 9b852977f..27f888523 100644 --- a/install.php +++ b/install.php @@ -46,7 +46,8 @@ $dokuwiki_hash = array( '2008-05-04' => '1e5c42eac3219d9e21927c39e3240aad', '2009-02-14' => 'ec8c04210732a14fdfce0f7f6eead865', '2009-12-25' => '993c4b2b385643efe5abf8e7010e11f4', - '2010-11-07' => '7921d48195f4db21b8ead6d9bea801b8' + '2010-11-07' => '7921d48195f4db21b8ead6d9bea801b8', + 'rc2011-04-22' => '4241865472edb6fa14a1227721008072', ); -- cgit v1.2.3
'.$l1.":'.$l2.":'.$l2.":
' . $lang['line'] . ' 1:' . $lang['line'] . ' 1:' . $lang['line'] . ' 1:
-example+example example2